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