| Total Complexity | 3 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| 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 | private $username; |
||
| 38 | private $password; |
||
| 39 | private $country; |
||
| 40 | |||
| 41 | public function __construct(string $username, string $password, string $country = 'EE') |
||
| 42 | { |
||
| 43 | $this->username = $username; |
||
| 44 | $this->password = $password; |
||
| 45 | $this->country = $country; |
||
| 46 | } |
||
| 47 | |||
| 48 | public function toArray(): array |
||
| 53 | ]; |
||
| 54 | } |
||
| 55 | |||
| 56 | public function getEndpointUrl(): string |
||
| 61 | } |
||
| 62 | } |