| @@ 204-218 (lines=15) @@ | ||
| 201 | * |
|
| 202 | * @return DeleteCredentialResponse|array|ResponseInterface |
|
| 203 | */ |
|
| 204 | public function deleteCredential($domain, $login) |
|
| 205 | { |
|
| 206 | Assert::stringNotEmpty($domain); |
|
| 207 | Assert::stringNotEmpty($login); |
|
| 208 | ||
| 209 | $response = $this->httpDelete( |
|
| 210 | sprintf( |
|
| 211 | '/v3/domains/%s/credentials/%s', |
|
| 212 | $domain, |
|
| 213 | $login |
|
| 214 | ) |
|
| 215 | ); |
|
| 216 | ||
| 217 | return $this->safeDeserialize($response, DeleteCredentialResponse::class); |
|
| 218 | } |
|
| 219 | ||
| 220 | /** |
|
| 221 | * Returns delivery connection settings for the specified domain. |
|
| @@ 43-50 (lines=8) @@ | ||
| 40 | * |
|
| 41 | * @return ShowResponse |
|
| 42 | */ |
|
| 43 | public function show($domain, $webhook) |
|
| 44 | { |
|
| 45 | Assert::notEmpty($domain); |
|
| 46 | Assert::notEmpty($webhook); |
|
| 47 | $response = $this->httpGet(sprintf('/v3/domains/%s/webhooks/%s', $domain, $webhook)); |
|
| 48 | ||
| 49 | return $this->safeDeserialize($response, ShowResponse::class); |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @param string $domain |
|
| @@ 103-111 (lines=9) @@ | ||
| 100 | * |
|
| 101 | * @return DeleteResponse |
|
| 102 | */ |
|
| 103 | public function delete($domain, $id) |
|
| 104 | { |
|
| 105 | Assert::notEmpty($domain); |
|
| 106 | Assert::notEmpty($id); |
|
| 107 | ||
| 108 | $response = $this->httpDelete(sprintf('/v3/domains/%s/webhooks/%s', $domain, $id)); |
|
| 109 | ||
| 110 | return $this->safeDeserialize($response, DeleteResponse::class); |
|
| 111 | } |
|
| 112 | } |
|
| 113 | ||
| @@ 149-156 (lines=8) @@ | ||
| 146 | * |
|
| 147 | * @return DeleteResponse |
|
| 148 | */ |
|
| 149 | public function delete($routeId) |
|
| 150 | { |
|
| 151 | Assert::stringNotEmpty($routeId); |
|
| 152 | ||
| 153 | $response = $this->httpDelete(sprintf('/v3/routes/%s', $routeId)); |
|
| 154 | ||
| 155 | return $this->safeDeserialize($response, DeleteResponse::class); |
|
| 156 | } |
|
| 157 | } |
|
| 158 | ||