-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAccountLookupServiceInterface.php
More file actions
44 lines (39 loc) · 1.53 KB
/
AccountLookupServiceInterface.php
File metadata and controls
44 lines (39 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* Copyright © Klevu Oy. All rights reserved. See LICENSE.txt for license details.
*/
declare(strict_types=1);
namespace Klevu\PhpSDK\Api\Service\Account;
use Klevu\PhpSDK\Api\Model\AccountInterface;
use Klevu\PhpSDK\Exception\AccountNotFoundException;
use Klevu\PhpSDK\Exception\Api\BadRequestException;
use Klevu\PhpSDK\Exception\Api\BadResponseException;
use Klevu\PhpSDK\Exception\ApiExceptionInterface;
use Klevu\PhpSDK\Exception\ValidationException;
use Klevu\PhpSDK\Model\AccountCredentials;
use Klevu\PhpSDK\Service\ApiServiceInterface;
/**
* Contract for service handling look-ups of Klevu account information via API
*
* @see AccountInterface
* @api
* @since 1.0.0
*/
interface AccountLookupServiceInterface extends ApiServiceInterface
{
/**
* Send a request to Klevu to retrieve details for the account specified in $accountCredentials
*
* @api
*
* @param AccountCredentials $accountCredentials
*
* @return AccountInterface
* @throws ApiExceptionInterface
* @throws BadRequestException Where the Klevu service rejects the request as invalid (4xx response code)
* @throws BadResponseException Where the Klevu service does not return a valid response (timeouts, 5xx response)
* @throws AccountNotFoundException Where no account is found for the provided credentials
* @throws ValidationException Where provided credentials fail internal validation. API request is NOT sent
*/
public function execute(AccountCredentials $accountCredentials): AccountInterface;
}