Total Complexity | 6 |
Total Lines | 57 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class Authentication |
||
6 | { |
||
7 | /** |
||
8 | * test endpoint for Estonia |
||
9 | */ |
||
10 | const EE_TEST_ENDPOINT_URL = 'https://ee.integration.dpd.eo.pl/ws-mapper-rest/'; |
||
11 | |||
12 | /** |
||
13 | * production endpoint for Estonia |
||
14 | */ |
||
15 | const EE_PRODUCTION_ENDPOINT_URL = 'https://integration.dpd.ee:8443/ws-mapper-rest/'; |
||
16 | |||
17 | /** |
||
18 | * test endpoint for Latvia |
||
19 | */ |
||
20 | const LV_TEST_ENDPOINT_URL = 'https://lv.integration.dpd.eo.pl/ws-mapper-rest/'; |
||
21 | |||
22 | /** |
||
23 | * production endpoint for Latvia |
||
24 | */ |
||
25 | const LV_PRODUCTION_ENDPOINT_URL = 'https://integration.dpd.lv:8443/ws-mapper-rest/'; |
||
26 | |||
27 | /** |
||
28 | * test endpoint for Lithuania |
||
29 | */ |
||
30 | const LT_TEST_ENDPOINT_URL = 'https://lt.integration.dpd.eo.pl/ws-mapper-rest/'; |
||
31 | |||
32 | /** |
||
33 | * production endpoint for Lithuania |
||
34 | */ |
||
35 | const LT_PRODUCTION_ENDPOINT_URL = 'https://integracijos.dpd.lt/ws-mapper-rest/'; |
||
36 | |||
37 | public function __construct(string $username, string $password, string $country = 'EE') |
||
38 | { |
||
39 | $this->username = $username; |
||
|
|||
40 | $this->password = $password; |
||
41 | $this->country = $country; |
||
42 | } |
||
43 | |||
44 | public function toArray(): array |
||
49 | ]; |
||
50 | } |
||
51 | |||
52 | public function getEndpointUrl(): string |
||
64 | } |