1 | <?php |
||
21 | final class ApiClient |
||
22 | { |
||
23 | /** |
||
24 | * @var HttpClient |
||
25 | */ |
||
26 | private $httpClient; |
||
27 | |||
28 | /** |
||
29 | * @var Hydrator |
||
30 | */ |
||
31 | private $hydrator; |
||
32 | |||
33 | /** |
||
34 | * @var RequestBuilder |
||
35 | */ |
||
36 | private $requestBuilder; |
||
37 | |||
38 | /** |
||
39 | * The constructor accepts already configured HTTP clients. |
||
40 | * Use the configure method to pass a configuration to the Client and create an HTTP Client. |
||
41 | */ |
||
42 | public function __construct( |
||
51 | |||
52 | /** |
||
53 | * @return ApiClient |
||
54 | */ |
||
55 | public static function configure( |
||
64 | |||
65 | public static function create(string $clientSecret, string $accessToken): self |
||
73 | |||
74 | public function customer(): Customer |
||
78 | |||
79 | public function invoice(): Invoice |
||
83 | } |
||
84 |