| Total Complexity | 2 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | class SubscriberGetHandler extends AbstractHandler |
||
| 19 | { |
||
| 20 | const API_ENDPOINT = '/rest/subscriber/get'; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param string $email |
||
| 24 | * @param string $listHash |
||
| 25 | * @return \stdClass |
||
| 26 | */ |
||
| 27 | 21 | public function getSubscriber(string $email, string $listHash): \stdClass |
|
| 28 | { |
||
| 29 | 6 | $getParameters = [ |
|
| 30 | 21 | $listHash, |
|
| 31 | 21 | ||
| 32 | ]; |
||
| 33 | 21 | $postParameters = []; |
|
| 34 | |||
| 35 | 21 | $response = $this->processRequest($getParameters, $postParameters); |
|
| 36 | 7 | return $response->data; |
|
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | 7 | protected function getApiEndpoint(): string |
|
| 45 | } |
||
| 46 | } |
||
| 47 |