-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b25ab22
commit 6aee8ce
Showing
190 changed files
with
12,280 additions
and
2,676 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.0.2 | ||
3.0.0 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file has been auto generated by Jane, | ||
* | ||
* Do no edit it directly. | ||
*/ | ||
|
||
namespace Krystal\Katapult\KatapultAPI\Endpoint; | ||
|
||
class DeleteAddressList extends \Krystal\Katapult\KatapultAPI\Runtime\Client\BaseEndpoint implements \Krystal\Katapult\KatapultAPI\Runtime\Client\Endpoint | ||
{ | ||
use \Krystal\Katapult\KatapultAPI\Runtime\Client\EndpointTrait; | ||
|
||
public function __construct(\Krystal\Katapult\KatapultAPI\Model\AddressListsAddressListDeleteBody $requestBody = null) | ||
{ | ||
$this->body = $requestBody; | ||
} | ||
|
||
public function getMethod(): string | ||
{ | ||
return 'DELETE'; | ||
} | ||
|
||
public function getUri(): string | ||
{ | ||
return '/address_lists/:address_list'; | ||
} | ||
|
||
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array | ||
{ | ||
if ($this->body instanceof \Krystal\Katapult\KatapultAPI\Model\AddressListsAddressListDeleteBody) { | ||
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')]; | ||
} | ||
|
||
return [[], null]; | ||
} | ||
|
||
public function getExtraHeaders(): array | ||
{ | ||
return ['Accept' => ['application/json']]; | ||
} | ||
|
||
/** | ||
* @return \Krystal\Katapult\KatapultAPI\Model\AddressListsAddressListDeleteResponse200|null | ||
* | ||
* @throws \Krystal\Katapult\KatapultAPI\Exception\DeleteAddressListBadRequestException | ||
* @throws \Krystal\Katapult\KatapultAPI\Exception\DeleteAddressListForbiddenException | ||
* @throws \Krystal\Katapult\KatapultAPI\Exception\DeleteAddressListNotFoundException | ||
* @throws \Krystal\Katapult\KatapultAPI\Exception\DeleteAddressListTooManyRequestsException | ||
*/ | ||
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null) | ||
{ | ||
$status = $response->getStatusCode(); | ||
$body = (string) $response->getBody(); | ||
if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
return $serializer->deserialize($body, 'Krystal\\Katapult\\KatapultAPI\\Model\\AddressListsAddressListDeleteResponse200', 'json'); | ||
} | ||
if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \Krystal\Katapult\KatapultAPI\Exception\DeleteAddressListBadRequestException($serializer->deserialize($body, 'Krystal\\Katapult\\KatapultAPI\\Model\\ResponseAPIAuthenticator400Response', 'json'), $response); | ||
} | ||
if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \Krystal\Katapult\KatapultAPI\Exception\DeleteAddressListForbiddenException($response); | ||
} | ||
if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \Krystal\Katapult\KatapultAPI\Exception\DeleteAddressListNotFoundException($serializer->deserialize($body, 'Krystal\\Katapult\\KatapultAPI\\Model\\ResponseAddressListNotFoundResponse', 'json'), $response); | ||
} | ||
if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \Krystal\Katapult\KatapultAPI\Exception\DeleteAddressListTooManyRequestsException($serializer->deserialize($body, 'Krystal\\Katapult\\KatapultAPI\\Model\\ResponseAPIAuthenticator429Response', 'json'), $response); | ||
} | ||
} | ||
|
||
public function getAuthenticationScopes(): array | ||
{ | ||
return ['Authenticator']; | ||
} | ||
} |
Oops, something went wrong.