1 | <?php |
||
24 | final class BillogramClient |
||
25 | { |
||
26 | /** |
||
27 | * @var HttpClient |
||
28 | */ |
||
29 | private $httpClient; |
||
30 | |||
31 | /** |
||
32 | * @var Hydrator |
||
33 | */ |
||
34 | private $hydrator; |
||
35 | |||
36 | /** |
||
37 | * @var RequestBuilder |
||
38 | */ |
||
39 | private $requestBuilder; |
||
40 | |||
41 | /** |
||
42 | * The constructor accepts already configured HTTP clients. |
||
43 | * Use the configure method to pass a configuration to the Client and create an HTTP Client. |
||
44 | * |
||
45 | * @param HttpClient $httpClient |
||
46 | * @param Hydrator|null $hydrator |
||
47 | * @param RequestBuilder|null $requestBuilder |
||
48 | */ |
||
49 | 19 | public function __construct( |
|
58 | |||
59 | /** |
||
60 | * @param HttpClientConfigurator $httpClientConfigurator |
||
61 | * @param Hydrator|null $hydrator |
||
62 | * @param RequestBuilder|null $requestBuilder |
||
63 | * |
||
64 | * @return BillogramClient |
||
65 | */ |
||
66 | 19 | public static function configure( |
|
75 | |||
76 | /** |
||
77 | * @param string $apiKey |
||
78 | * |
||
79 | * @return BillogramClient |
||
80 | */ |
||
81 | public static function create(string $username, string $apiKey): self |
||
87 | |||
88 | /** |
||
89 | * @return Api\Customer |
||
90 | */ |
||
91 | 4 | public function customers(): Customer |
|
95 | |||
96 | /** |
||
97 | * @return Api\Item |
||
98 | */ |
||
99 | 5 | public function items(): Item |
|
103 | |||
104 | /** |
||
105 | * @return Api\Invoice |
||
106 | */ |
||
107 | 4 | public function invoices(): Invoice |
|
111 | |||
112 | /** |
||
113 | * @return Api\Report |
||
114 | */ |
||
115 | 2 | public function report(): Report |
|
119 | |||
120 | /** |
||
121 | * @return Api\Settings |
||
122 | */ |
||
123 | 2 | public function settings(): Settings |
|
127 | |||
128 | /** |
||
129 | * @return Api\LogoType |
||
130 | */ |
||
131 | 2 | public function logotype(): LogoType |
|
135 | } |
||
136 |