| @@ 99-106 (lines=8) @@ | ||
| 96 | * |
|
| 97 | * @throws \Exception |
|
| 98 | */ |
|
| 99 | public function show(string $address) |
|
| 100 | { |
|
| 101 | Assert::stringNotEmpty($address); |
|
| 102 | ||
| 103 | $response = $this->httpGet(sprintf('/v3/lists/%s', $address)); |
|
| 104 | ||
| 105 | return $this->hydrateResponse($response, ShowResponse::class); |
|
| 106 | } |
|
| 107 | ||
| 108 | /** |
|
| 109 | * Updates a mailing list. |
|
| @@ 188-195 (lines=8) @@ | ||
| 185 | * |
|
| 186 | * @throws \Exception |
|
| 187 | */ |
|
| 188 | public function getValidationStatus(string $address) |
|
| 189 | { |
|
| 190 | Assert::stringNotEmpty($address); |
|
| 191 | ||
| 192 | $response = $this->httpGet(sprintf('/v3/lists/%s/validate', $address)); |
|
| 193 | ||
| 194 | return $this->hydrateResponse($response, ValidationStatusResponse::class); |
|
| 195 | } |
|
| 196 | ||
| 197 | /** |
|
| 198 | * Cancel mailing list validation. |
|
| @@ 70-78 (lines=9) @@ | ||
| 67 | * |
|
| 68 | * @throws \Exception |
|
| 69 | */ |
|
| 70 | public function show(string $list, string $address) |
|
| 71 | { |
|
| 72 | Assert::stringNotEmpty($list); |
|
| 73 | Assert::stringNotEmpty($address); |
|
| 74 | ||
| 75 | $response = $this->httpGet(sprintf('/v3/lists/%s/members/%s', $list, $address)); |
|
| 76 | ||
| 77 | return $this->hydrateResponse($response, ShowResponse::class); |
|
| 78 | } |
|
| 79 | ||
| 80 | /** |
|
| 81 | * Creates (or updates) a member of the mailing list. |
|
| @@ 59-66 (lines=8) @@ | ||
| 56 | * |
|
| 57 | * @return ShowResponse |
|
| 58 | */ |
|
| 59 | public function show(string $routeId) |
|
| 60 | { |
|
| 61 | Assert::stringNotEmpty($routeId); |
|
| 62 | ||
| 63 | $response = $this->httpGet(sprintf('/v3/routes/%s', $routeId)); |
|
| 64 | ||
| 65 | return $this->hydrateResponse($response, ShowResponse::class); |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * Creates a new Route. |
|
| @@ 57-65 (lines=9) @@ | ||
| 54 | * |
|
| 55 | * @return ShowResponse |
|
| 56 | */ |
|
| 57 | public function show(string $domain, string $address) |
|
| 58 | { |
|
| 59 | Assert::stringNotEmpty($domain); |
|
| 60 | Assert::stringNotEmpty($address); |
|
| 61 | ||
| 62 | $response = $this->httpGet(sprintf('/v3/%s/bounces/%s', $domain, $address)); |
|
| 63 | ||
| 64 | return $this->hydrateResponse($response, ShowResponse::class); |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * @param string $domain Domain to create a bounce for |
|
| @@ 57-64 (lines=8) @@ | ||
| 54 | * |
|
| 55 | * @return ShowResponse |
|
| 56 | */ |
|
| 57 | public function show(string $domain, string $address) |
|
| 58 | { |
|
| 59 | Assert::stringNotEmpty($domain); |
|
| 60 | Assert::stringNotEmpty($address); |
|
| 61 | $response = $this->httpGet(sprintf('/v3/%s/complaints/%s', $domain, $address)); |
|
| 62 | ||
| 63 | return $this->hydrateResponse($response, ShowResponse::class); |
|
| 64 | } |
|
| 65 | ||
| 66 | /** |
|
| 67 | * @param string $domain Domain to create complaint for |
|
| @@ 57-65 (lines=9) @@ | ||
| 54 | * |
|
| 55 | * @return ShowResponse |
|
| 56 | */ |
|
| 57 | public function show(string $domain, string $address) |
|
| 58 | { |
|
| 59 | Assert::stringNotEmpty($domain); |
|
| 60 | Assert::stringNotEmpty($address); |
|
| 61 | ||
| 62 | $response = $this->httpGet(sprintf('/v3/%s/unsubscribes/%s', $domain, $address)); |
|
| 63 | ||
| 64 | return $this->hydrateResponse($response, ShowResponse::class); |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * @param string $domain Domain to create unsubscribe for |
|
| @@ 57-65 (lines=9) @@ | ||
| 54 | * |
|
| 55 | * @return ShowResponse|ResponseInterface |
|
| 56 | */ |
|
| 57 | public function show(string $domain, string $tag) |
|
| 58 | { |
|
| 59 | Assert::stringNotEmpty($domain); |
|
| 60 | Assert::stringNotEmpty($tag); |
|
| 61 | ||
| 62 | $response = $this->httpGet(sprintf('/v3/%s/tags/%s', $domain, $tag)); |
|
| 63 | ||
| 64 | return $this->hydrateResponse($response, ShowResponse::class); |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * Update a tag. |
|
| @@ 119-127 (lines=9) @@ | ||
| 116 | /** |
|
| 117 | * @return CountryResponse|ResponseInterface |
|
| 118 | */ |
|
| 119 | public function countries(string $domain, string $tag) |
|
| 120 | { |
|
| 121 | Assert::stringNotEmpty($domain); |
|
| 122 | Assert::stringNotEmpty($tag); |
|
| 123 | ||
| 124 | $response = $this->httpGet(sprintf('/v3/%s/tags/%s/stats/aggregates/countries', $domain, $tag)); |
|
| 125 | ||
| 126 | return $this->hydrateResponse($response, CountryResponse::class); |
|
| 127 | } |
|
| 128 | ||
| 129 | /** |
|
| 130 | * @return ProviderResponse|ResponseInterface |
|
| @@ 132-140 (lines=9) @@ | ||
| 129 | /** |
|
| 130 | * @return ProviderResponse|ResponseInterface |
|
| 131 | */ |
|
| 132 | public function providers(string $domain, string $tag) |
|
| 133 | { |
|
| 134 | Assert::stringNotEmpty($domain); |
|
| 135 | Assert::stringNotEmpty($tag); |
|
| 136 | ||
| 137 | $response = $this->httpGet(sprintf('/v3/%s/tags/%s/stats/aggregates/providers', $domain, $tag)); |
|
| 138 | ||
| 139 | return $this->hydrateResponse($response, ProviderResponse::class); |
|
| 140 | } |
|
| 141 | ||
| 142 | /** |
|
| 143 | * @return DeviceResponse|ResponseInterface |
|
| @@ 145-153 (lines=9) @@ | ||
| 142 | /** |
|
| 143 | * @return DeviceResponse|ResponseInterface |
|
| 144 | */ |
|
| 145 | public function devices(string $domain, string $tag) |
|
| 146 | { |
|
| 147 | Assert::stringNotEmpty($domain); |
|
| 148 | Assert::stringNotEmpty($tag); |
|
| 149 | ||
| 150 | $response = $this->httpGet(sprintf('/v3/%s/tags/%s/stats/aggregates/devices', $domain, $tag)); |
|
| 151 | ||
| 152 | return $this->hydrateResponse($response, DeviceResponse::class); |
|
| 153 | } |
|
| 154 | } |
|
| 155 | ||