diff --git a/changes.md b/changes.md index d7c8bf8d89f..63b56284c5d 100644 --- a/changes.md +++ b/changes.md @@ -490,9 +490,11 @@ - added method `$apiRoot->withProjectKey()->recurrencePolicies()->withKey()->get()` - added method `$apiRoot->withProjectKey()->recurrencePolicies()->withKey()->head()` - added method `$apiRoot->withProjectKey()->recurrencePolicies()->withKey()->post()` +- added method `$apiRoot->withProjectKey()->recurrencePolicies()->withKey()->delete()` - added method `$apiRoot->withProjectKey()->recurrencePolicies()->withId()->get()` - added method `$apiRoot->withProjectKey()->recurrencePolicies()->withId()->head()` - added method `$apiRoot->withProjectKey()->recurrencePolicies()->withId()->post()` +- added method `$apiRoot->withProjectKey()->recurrencePolicies()->withId()->delete()` - added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->get()` - added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->head()` - added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->post()` diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyRecurrencePoliciesByIDTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyRecurrencePoliciesByIDTest.php index 4c13f929283..2b1051080d5 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyRecurrencePoliciesByIDTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyRecurrencePoliciesByIDTest.php @@ -24,6 +24,7 @@ * @covers \Commercetools\Api\Client\Resource\ByProjectKeyRecurrencePoliciesByIDGet * @covers \Commercetools\Api\Client\Resource\ByProjectKeyRecurrencePoliciesByIDHead * @covers \Commercetools\Api\Client\Resource\ByProjectKeyRecurrencePoliciesByIDPost + * @covers \Commercetools\Api\Client\Resource\ByProjectKeyRecurrencePoliciesByIDDelete * @covers \Commercetools\Api\Client\Resource\ResourceByProjectKeyRecurrencePoliciesByID */ class ResourceByProjectKeyRecurrencePoliciesByIDTest extends TestCase @@ -148,6 +149,41 @@ function (ApiRequestBuilder $builder): RequestInterface { }, 'post', 'test_projectKey/recurrence-policies/test_ID', + ], + 'ByProjectKeyRecurrencePoliciesByIDDelete_withVersion' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->recurrencePolicies() + ->withId('test_ID') + ->delete() + ->withVersion('version'); + }, + 'delete', + 'test_projectKey/recurrence-policies/test_ID?version=version', + ], + 'ByProjectKeyRecurrencePoliciesByIDDelete_withExpand' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->recurrencePolicies() + ->withId('test_ID') + ->delete() + ->withExpand('expand'); + }, + 'delete', + 'test_projectKey/recurrence-policies/test_ID?expand=expand', + ], + 'ByProjectKeyRecurrencePoliciesByIDDelete' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("test_projectKey") + ->recurrencePolicies() + ->withId("test_ID") + ->delete(); + }, + 'delete', + 'test_projectKey/recurrence-policies/test_ID', ] ]; } @@ -187,6 +223,15 @@ function (ApiRequestBuilder $builder): RequestInterface { ->withId("ID") ->post(null); } + ], + 'ByProjectKeyRecurrencePoliciesByIDDelete' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withId("ID") + ->delete(); + } ] ]; } @@ -473,6 +518,106 @@ function (ApiRequestBuilder $builder): RequestInterface { ->post(null); }, 599 + ], + 'ByProjectKeyRecurrencePoliciesByIDDelete_200' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withId("ID") + ->delete(); + }, + 200 + ], + 'ByProjectKeyRecurrencePoliciesByIDDelete_409' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withId("ID") + ->delete(); + }, + 409 + ], + 'ByProjectKeyRecurrencePoliciesByIDDelete_400' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withId("ID") + ->delete(); + }, + 400 + ], + 'ByProjectKeyRecurrencePoliciesByIDDelete_401' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withId("ID") + ->delete(); + }, + 401 + ], + 'ByProjectKeyRecurrencePoliciesByIDDelete_403' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withId("ID") + ->delete(); + }, + 403 + ], + 'ByProjectKeyRecurrencePoliciesByIDDelete_404' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withId("ID") + ->delete(); + }, + 404 + ], + 'ByProjectKeyRecurrencePoliciesByIDDelete_500' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withId("ID") + ->delete(); + }, + 500 + ], + 'ByProjectKeyRecurrencePoliciesByIDDelete_502' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withId("ID") + ->delete(); + }, + 502 + ], + 'ByProjectKeyRecurrencePoliciesByIDDelete_503' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withId("ID") + ->delete(); + }, + 503 + ], + 'ByProjectKeyRecurrencePoliciesByIDDelete_599' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withId("ID") + ->delete(); + }, + 599 ] ]; } diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyRecurrencePoliciesKeyByKeyTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyRecurrencePoliciesKeyByKeyTest.php index 2cd34cabd2d..9e3e777fa87 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyRecurrencePoliciesKeyByKeyTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyRecurrencePoliciesKeyByKeyTest.php @@ -24,6 +24,7 @@ * @covers \Commercetools\Api\Client\Resource\ByProjectKeyRecurrencePoliciesKeyByKeyGet * @covers \Commercetools\Api\Client\Resource\ByProjectKeyRecurrencePoliciesKeyByKeyHead * @covers \Commercetools\Api\Client\Resource\ByProjectKeyRecurrencePoliciesKeyByKeyPost + * @covers \Commercetools\Api\Client\Resource\ByProjectKeyRecurrencePoliciesKeyByKeyDelete * @covers \Commercetools\Api\Client\Resource\ResourceByProjectKeyRecurrencePoliciesKeyByKey */ class ResourceByProjectKeyRecurrencePoliciesKeyByKeyTest extends TestCase @@ -148,6 +149,41 @@ function (ApiRequestBuilder $builder): RequestInterface { }, 'post', 'test_projectKey/recurrence-policies/key=test_key', + ], + 'ByProjectKeyRecurrencePoliciesKeyByKeyDelete_withVersion' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->recurrencePolicies() + ->withKey('test_key') + ->delete() + ->withVersion('version'); + }, + 'delete', + 'test_projectKey/recurrence-policies/key=test_key?version=version', + ], + 'ByProjectKeyRecurrencePoliciesKeyByKeyDelete_withExpand' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->recurrencePolicies() + ->withKey('test_key') + ->delete() + ->withExpand('expand'); + }, + 'delete', + 'test_projectKey/recurrence-policies/key=test_key?expand=expand', + ], + 'ByProjectKeyRecurrencePoliciesKeyByKeyDelete' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("test_projectKey") + ->recurrencePolicies() + ->withKey("test_key") + ->delete(); + }, + 'delete', + 'test_projectKey/recurrence-policies/key=test_key', ] ]; } @@ -187,6 +223,15 @@ function (ApiRequestBuilder $builder): RequestInterface { ->withKey("key") ->post(null); } + ], + 'ByProjectKeyRecurrencePoliciesKeyByKeyDelete' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withKey("key") + ->delete(); + } ] ]; } @@ -473,6 +518,106 @@ function (ApiRequestBuilder $builder): RequestInterface { ->post(null); }, 599 + ], + 'ByProjectKeyRecurrencePoliciesKeyByKeyDelete_200' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withKey("key") + ->delete(); + }, + 200 + ], + 'ByProjectKeyRecurrencePoliciesKeyByKeyDelete_409' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withKey("key") + ->delete(); + }, + 409 + ], + 'ByProjectKeyRecurrencePoliciesKeyByKeyDelete_400' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withKey("key") + ->delete(); + }, + 400 + ], + 'ByProjectKeyRecurrencePoliciesKeyByKeyDelete_401' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withKey("key") + ->delete(); + }, + 401 + ], + 'ByProjectKeyRecurrencePoliciesKeyByKeyDelete_403' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withKey("key") + ->delete(); + }, + 403 + ], + 'ByProjectKeyRecurrencePoliciesKeyByKeyDelete_404' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withKey("key") + ->delete(); + }, + 404 + ], + 'ByProjectKeyRecurrencePoliciesKeyByKeyDelete_500' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withKey("key") + ->delete(); + }, + 500 + ], + 'ByProjectKeyRecurrencePoliciesKeyByKeyDelete_502' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withKey("key") + ->delete(); + }, + 502 + ], + 'ByProjectKeyRecurrencePoliciesKeyByKeyDelete_503' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withKey("key") + ->delete(); + }, + 503 + ], + 'ByProjectKeyRecurrencePoliciesKeyByKeyDelete_599' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withKey("key") + ->delete(); + }, + 599 ] ]; } diff --git a/lib/commercetools-api/docs/RequestBuilder.md b/lib/commercetools-api/docs/RequestBuilder.md index 975fa825d35..805c575ff69 100644 --- a/lib/commercetools-api/docs/RequestBuilder.md +++ b/lib/commercetools-api/docs/RequestBuilder.md @@ -10782,6 +10782,24 @@ $request = $builder ->withId("ID") ->post(null); ``` +## `withProjectKey("projectKey")->recurrencePolicies()->withId("ID")->delete()` + +Deletes a Recurrence Policy in the Project. + +A Recurrence Policy can be deleted only if it is not referenced by any Embedded Price, Standalone Price, or (Custom) Line Item, otherwise a [ReferenceExists](ctp:api:type:ReferenceExistsError) error is returned. + + +### Example +```php +use Commercetools\Api\Client\ApiRequestBuilder; + +$builder = new ApiRequestBuilder(); +$request = $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withId("ID") + ->delete(); +``` ## `withProjectKey("projectKey")->recurrencePolicies()->withKey("key")->get()` Retrieves a Recurrence Policy with the provided `key`. @@ -10830,6 +10848,24 @@ $request = $builder ->withKey("key") ->post(null); ``` +## `withProjectKey("projectKey")->recurrencePolicies()->withKey("key")->delete()` + +Deletes a Recurrence Policy in the Project. + +A Recurrence Policy can be deleted only if it is not referenced by any Embedded Price, Standalone Price, or (Custom) Line Item, otherwise a [ReferenceExists](ctp:api:type:ReferenceExistsError) error is returned. + + +### Example +```php +use Commercetools\Api\Client\ApiRequestBuilder; + +$builder = new ApiRequestBuilder(); +$request = $builder + ->withProjectKey("projectKey") + ->recurrencePolicies() + ->withKey("key") + ->delete(); +``` ## `withProjectKey("projectKey")->recurringOrders()->get()` Retrieves Recurring Orders in the Project. diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyRecurrencePoliciesByIDDelete.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyRecurrencePoliciesByIDDelete.php new file mode 100644 index 00000000000..e0a11481310 --- /dev/null +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyRecurrencePoliciesByIDDelete.php @@ -0,0 +1,170 @@ + + * @template-implements Conflicting + * @template-implements Expandable + * @template-implements Errorable + * @template-implements Deprecatable200 + */ +class ByProjectKeyRecurrencePoliciesByIDDelete extends ApiRequest implements Versioned, Conflicting, Expandable, Errorable, Deprecatable200 +{ + /** + * @param ?object|array|string $body + * @psalm-param array $headers + */ + public function __construct(string $projectKey, string $ID, $body = null, array $headers = [], ?ClientInterface $client = null) + { + $uri = str_replace(['{projectKey}', '{ID}'], [$projectKey, $ID], '{projectKey}/recurrence-policies/{ID}'); + parent::__construct($client, 'DELETE', $uri, $headers, is_object($body) || is_array($body) ? json_encode($body) : $body); + } + + /** + * @template T of JsonObject + * @psalm-param ?class-string $resultType + * @return ErrorResponse|JsonObject|RecurrencePolicy|T|null + */ + public function mapFromResponse(?ResponseInterface $response, ?string $resultType = null) + { + if (is_null($response)) { + return null; + } + if (is_null($resultType)) { + switch ($response->getStatusCode()) { + case '200': + $resultType = RecurrencePolicyModel::class; + + break; + case '409': + $resultType = ErrorResponseModel::class; + + break; + case '400': + $resultType = ErrorResponseModel::class; + + break; + case '401': + $resultType = ErrorResponseModel::class; + + break; + case '403': + $resultType = ErrorResponseModel::class; + + break; + case '500': + $resultType = ErrorResponseModel::class; + + break; + case '502': + $resultType = ErrorResponseModel::class; + + break; + case '503': + $resultType = ErrorResponseModel::class; + + break; + default: + $resultType = JsonObjectModel::class; + + break; + } + } + + return $resultType::of($this->responseData($response)); + } + + /** + * @template T of JsonObject + * @psalm-param ?class-string $resultType + * + * @return null|T|ErrorResponse|JsonObject|RecurrencePolicy + */ + public function execute(array $options = [], ?string $resultType = null) + { + try { + $response = $this->send($options); + } catch (ServerException $e) { + $response = $e->getResponse(); + $e = ExceptionFactory::createServerException($e, $this, $response, $this->mapFromResponse($response, $resultType)); + throw $e; + } catch (ClientException $e) { + $response = $e->getResponse(); + $e = ExceptionFactory::createClientException($e, $this, $response, $this->mapFromResponse($response, $resultType)); + throw $e; + } + + return $this->mapFromResponse($response, $resultType); + } + + /** + * @template T of JsonObject + * @psalm-param ?class-string $resultType + * + * @return PromiseInterface + */ + public function executeAsync(array $options = [], ?string $resultType = null) + { + return $this->sendAsync($options)->then( + function (ResponseInterface $response) use ($resultType) { + return $this->mapFromResponse($response, $resultType); + }, + function (RequestException $e) use ($resultType) { + $response = $e->getResponse(); + if ($e instanceof ServerException) { + $e = ExceptionFactory::createServerException($e, $this, $response, $this->mapFromResponse($response, $resultType)); + } + if ($e instanceof ClientException) { + $e = ExceptionFactory::createClientException($e, $this, $response, $this->mapFromResponse($response, $resultType)); + } + throw $e; + } + ); + } + + /** + * + * @psalm-param scalar|scalar[] $version + */ + public function withVersion($version): ByProjectKeyRecurrencePoliciesByIDDelete + { + return $this->withQueryParam('version', $version); + } + + /** + * + * @psalm-param scalar|scalar[] $expand + */ + public function withExpand($expand): ByProjectKeyRecurrencePoliciesByIDDelete + { + return $this->withQueryParam('expand', $expand); + } +} diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyRecurrencePoliciesKeyByKeyDelete.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyRecurrencePoliciesKeyByKeyDelete.php new file mode 100644 index 00000000000..f4cf0069688 --- /dev/null +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyRecurrencePoliciesKeyByKeyDelete.php @@ -0,0 +1,170 @@ + + * @template-implements Conflicting + * @template-implements Expandable + * @template-implements Errorable + * @template-implements Deprecatable200 + */ +class ByProjectKeyRecurrencePoliciesKeyByKeyDelete extends ApiRequest implements Versioned, Conflicting, Expandable, Errorable, Deprecatable200 +{ + /** + * @param ?object|array|string $body + * @psalm-param array $headers + */ + public function __construct(string $projectKey, string $key, $body = null, array $headers = [], ?ClientInterface $client = null) + { + $uri = str_replace(['{projectKey}', '{key}'], [$projectKey, $key], '{projectKey}/recurrence-policies/key={key}'); + parent::__construct($client, 'DELETE', $uri, $headers, is_object($body) || is_array($body) ? json_encode($body) : $body); + } + + /** + * @template T of JsonObject + * @psalm-param ?class-string $resultType + * @return ErrorResponse|JsonObject|RecurrencePolicy|T|null + */ + public function mapFromResponse(?ResponseInterface $response, ?string $resultType = null) + { + if (is_null($response)) { + return null; + } + if (is_null($resultType)) { + switch ($response->getStatusCode()) { + case '200': + $resultType = RecurrencePolicyModel::class; + + break; + case '409': + $resultType = ErrorResponseModel::class; + + break; + case '400': + $resultType = ErrorResponseModel::class; + + break; + case '401': + $resultType = ErrorResponseModel::class; + + break; + case '403': + $resultType = ErrorResponseModel::class; + + break; + case '500': + $resultType = ErrorResponseModel::class; + + break; + case '502': + $resultType = ErrorResponseModel::class; + + break; + case '503': + $resultType = ErrorResponseModel::class; + + break; + default: + $resultType = JsonObjectModel::class; + + break; + } + } + + return $resultType::of($this->responseData($response)); + } + + /** + * @template T of JsonObject + * @psalm-param ?class-string $resultType + * + * @return null|T|ErrorResponse|JsonObject|RecurrencePolicy + */ + public function execute(array $options = [], ?string $resultType = null) + { + try { + $response = $this->send($options); + } catch (ServerException $e) { + $response = $e->getResponse(); + $e = ExceptionFactory::createServerException($e, $this, $response, $this->mapFromResponse($response, $resultType)); + throw $e; + } catch (ClientException $e) { + $response = $e->getResponse(); + $e = ExceptionFactory::createClientException($e, $this, $response, $this->mapFromResponse($response, $resultType)); + throw $e; + } + + return $this->mapFromResponse($response, $resultType); + } + + /** + * @template T of JsonObject + * @psalm-param ?class-string $resultType + * + * @return PromiseInterface + */ + public function executeAsync(array $options = [], ?string $resultType = null) + { + return $this->sendAsync($options)->then( + function (ResponseInterface $response) use ($resultType) { + return $this->mapFromResponse($response, $resultType); + }, + function (RequestException $e) use ($resultType) { + $response = $e->getResponse(); + if ($e instanceof ServerException) { + $e = ExceptionFactory::createServerException($e, $this, $response, $this->mapFromResponse($response, $resultType)); + } + if ($e instanceof ClientException) { + $e = ExceptionFactory::createClientException($e, $this, $response, $this->mapFromResponse($response, $resultType)); + } + throw $e; + } + ); + } + + /** + * + * @psalm-param scalar|scalar[] $version + */ + public function withVersion($version): ByProjectKeyRecurrencePoliciesKeyByKeyDelete + { + return $this->withQueryParam('version', $version); + } + + /** + * + * @psalm-param scalar|scalar[] $expand + */ + public function withExpand($expand): ByProjectKeyRecurrencePoliciesKeyByKeyDelete + { + return $this->withQueryParam('expand', $expand); + } +} diff --git a/lib/commercetools-api/src/Client/Resource/ResourceByProjectKeyRecurrencePoliciesByID.php b/lib/commercetools-api/src/Client/Resource/ResourceByProjectKeyRecurrencePoliciesByID.php index 35c2826893b..724296c56a9 100644 --- a/lib/commercetools-api/src/Client/Resource/ResourceByProjectKeyRecurrencePoliciesByID.php +++ b/lib/commercetools-api/src/Client/Resource/ResourceByProjectKeyRecurrencePoliciesByID.php @@ -56,4 +56,14 @@ public function post(?RecurrencePolicyUpdate $body = null, array $headers = []): return new ByProjectKeyRecurrencePoliciesByIDPost($args['projectKey'], $args['ID'], $body, $headers, $this->getClient()); } + /** + * @psalm-param ?object|array|string $body + * @psalm-param array $headers + */ + public function delete($body = null, array $headers = []): ByProjectKeyRecurrencePoliciesByIDDelete + { + $args = $this->getArgs(); + + return new ByProjectKeyRecurrencePoliciesByIDDelete($args['projectKey'], $args['ID'], $body, $headers, $this->getClient()); + } } diff --git a/lib/commercetools-api/src/Client/Resource/ResourceByProjectKeyRecurrencePoliciesKeyByKey.php b/lib/commercetools-api/src/Client/Resource/ResourceByProjectKeyRecurrencePoliciesKeyByKey.php index 40881faa8d0..5b59f47233c 100644 --- a/lib/commercetools-api/src/Client/Resource/ResourceByProjectKeyRecurrencePoliciesKeyByKey.php +++ b/lib/commercetools-api/src/Client/Resource/ResourceByProjectKeyRecurrencePoliciesKeyByKey.php @@ -56,4 +56,14 @@ public function post(?RecurrencePolicyUpdate $body = null, array $headers = []): return new ByProjectKeyRecurrencePoliciesKeyByKeyPost($args['projectKey'], $args['key'], $body, $headers, $this->getClient()); } + /** + * @psalm-param ?object|array|string $body + * @psalm-param array $headers + */ + public function delete($body = null, array $headers = []): ByProjectKeyRecurrencePoliciesKeyByKeyDelete + { + $args = $this->getArgs(); + + return new ByProjectKeyRecurrencePoliciesKeyByKeyDelete($args['projectKey'], $args['key'], $body, $headers, $this->getClient()); + } } diff --git a/references.txt b/references.txt index 23627f49e52..42c0490e149 100644 --- a/references.txt +++ b/references.txt @@ -491,3 +491,4 @@ d084ab15a8dfa7bd18efa10417a0bb263c08f269 cb9cca64ecfb31885e7b9fb0ad52a9954b990ed9 48dc5d57bbfede103bdf01023deea4f649dc5cae 291e2569b7c0e4f1db3bb99761c7b23e0cc1659f +b6d7def74db12344b0e0821407b45a3f214b8bd9