Total Complexity | 8 |
Total Lines | 69 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | final class RequestConfig |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $apiKey; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | private $apiSecret; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $customerId; |
||
25 | |||
26 | /** |
||
27 | * @var bool |
||
28 | */ |
||
29 | private $test; |
||
30 | |||
31 | /** |
||
32 | * @var \GuzzleHttp\Client |
||
33 | */ |
||
34 | private $client; |
||
35 | |||
36 | public function __construct(string $apiKey, string $apiSecret, string $customerId, bool $test = false) |
||
37 | { |
||
38 | $this->apiKey = $apiKey; |
||
39 | $this->apiSecret = $apiSecret; |
||
40 | $this->customerId = $customerId; |
||
41 | $this->test = $test; |
||
42 | } |
||
43 | |||
44 | public function getApiKey(): string |
||
45 | { |
||
46 | return $this->apiKey; |
||
47 | } |
||
48 | |||
49 | public function getApiSecret(): string |
||
50 | { |
||
51 | return $this->apiSecret; |
||
52 | } |
||
53 | |||
54 | public function getCustomerId(): string |
||
57 | } |
||
58 | |||
59 | public function isTest(): bool |
||
60 | { |
||
61 | return $this->test; |
||
62 | } |
||
63 | |||
64 | public function setClient(Client $client): self |
||
65 | { |
||
66 | $this->client = $client; |
||
67 | |||
68 | return $this; |
||
69 | } |
||
70 | |||
71 | public function getClient(): Client |
||
78 | } |
||
79 | } |
||
80 |