Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
711 changes: 360 additions & 351 deletions changes.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,19 @@ function (ApiRequestBuilder $builder): RequestInterface {
'get',
'test_projectKey/in-store/key=test_storeKey/product-projections/test_ID?localeProjection=localeProjection',
],
'ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet_withFilterAttributes' => [
function (ApiRequestBuilder $builder): RequestInterface {
return $builder
->withProjectKey('test_projectKey')
->inStoreKeyWithStoreKeyValue('test_storeKey')
->productProjections()
->withId('test_ID')
->get()
->withFilterAttributes('filter[attributes]');
},
'get',
'test_projectKey/in-store/key=test_storeKey/product-projections/test_ID?filter%5Battributes%5D=filter%5Battributes%5D',
],
'ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet_withExpand' => [
function (ApiRequestBuilder $builder): RequestInterface {
return $builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,19 @@ function (ApiRequestBuilder $builder): RequestInterface {
'get',
'test_projectKey/in-store/key=test_storeKey/product-projections/key=test_key?localeProjection=localeProjection',
],
'ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet_withFilterAttributes' => [
function (ApiRequestBuilder $builder): RequestInterface {
return $builder
->withProjectKey('test_projectKey')
->inStoreKeyWithStoreKeyValue('test_storeKey')
->productProjections()
->withKey('test_key')
->get()
->withFilterAttributes('filter[attributes]');
},
'get',
'test_projectKey/in-store/key=test_storeKey/product-projections/key=test_key?filter%5Battributes%5D=filter%5Battributes%5D',
],
'ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet_withExpand' => [
function (ApiRequestBuilder $builder): RequestInterface {
return $builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,18 @@ function (ApiRequestBuilder $builder): RequestInterface {
'get',
'test_projectKey/product-projections/test_ID?storeProjection=storeProjection',
],
'ByProjectKeyProductProjectionsByIDGet_withFilterAttributes' => [
function (ApiRequestBuilder $builder): RequestInterface {
return $builder
->withProjectKey('test_projectKey')
->productProjections()
->withId('test_ID')
->get()
->withFilterAttributes('filter[attributes]');
},
'get',
'test_projectKey/product-projections/test_ID?filter%5Battributes%5D=filter%5Battributes%5D',
],
'ByProjectKeyProductProjectionsByIDGet_withExpand' => [
function (ApiRequestBuilder $builder): RequestInterface {
return $builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,18 @@ function (ApiRequestBuilder $builder): RequestInterface {
'get',
'test_projectKey/product-projections/key=test_key?storeProjection=storeProjection',
],
'ByProjectKeyProductProjectionsKeyByKeyGet_withFilterAttributes' => [
function (ApiRequestBuilder $builder): RequestInterface {
return $builder
->withProjectKey('test_projectKey')
->productProjections()
->withKey('test_key')
->get()
->withFilterAttributes('filter[attributes]');
},
'get',
'test_projectKey/product-projections/key=test_key?filter%5Battributes%5D=filter%5Battributes%5D',
],
'ByProjectKeyProductProjectionsKeyByKeyGet_withExpand' => [
function (ApiRequestBuilder $builder): RequestInterface {
return $builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,17 @@ function (ApiRequestBuilder $builder): RequestInterface {
'get',
'test_projectKey/product-projections?storeProjection=storeProjection',
],
'ByProjectKeyProductProjectionsGet_withFilterAttributes' => [
function (ApiRequestBuilder $builder): RequestInterface {
return $builder
->withProjectKey('test_projectKey')
->productProjections()
->get()
->withFilterAttributes('filter[attributes]');
},
'get',
'test_projectKey/product-projections?filter%5Battributes%5D=filter%5Battributes%5D',
],
'ByProjectKeyProductProjectionsGet_withExpand' => [
function (ApiRequestBuilder $builder): RequestInterface {
return $builder
Expand Down
1 change: 1 addition & 0 deletions lib/commercetools-api/docs/RequestBuilder.md
Original file line number Diff line number Diff line change
Expand Up @@ -2014,6 +2014,7 @@ $request = $builder

Creating a Cart Discount produces the [CartDiscountCreated](ctp:api:type:CartDiscountCreatedMessage) Message.


### Example
```php
use Commercetools\Api\Client\ApiRequestBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

declare(strict_types=1);
/**
* This file has been auto generated
* Do not change it.
*/

namespace Commercetools\Api\Client\Resource;

use Commercetools\Client\ApiRequestInterface;

/**
* @template T of ApiRequestInterface
* @template-extends ApiRequestInterface<T>
*/
interface AttributeFiltering extends ApiRequestInterface
{
/**
* @return ApiRequestInterface
* @psalm-return T
*/
public function withFilterAttributes(string $filterAttributes);
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
* @template-implements ProjectionSelectingTailoring<ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet>
* @template-implements PriceSelecting<ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet>
* @template-implements LocaleProjecting<ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet>
* @template-implements AttributeFiltering<ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet>
* @template-implements Expandable<ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet>
* @template-implements Errorable<ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet>
* @template-implements Deprecatable200<ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet>
*/
class ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet extends ApiRequest implements ProjectionSelectingTailoring, PriceSelecting, LocaleProjecting, Expandable, Errorable, Deprecatable200
class ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet extends ApiRequest implements ProjectionSelectingTailoring, PriceSelecting, LocaleProjecting, AttributeFiltering, Expandable, Errorable, Deprecatable200
{
/**
* @param ?object|array|string $body
Expand Down Expand Up @@ -219,6 +220,15 @@ public function withLocaleProjection($localeProjection): ByProjectKeyInStoreKeyB
return $this->withQueryParam('localeProjection', $localeProjection);
}

/**
*
* @psalm-param scalar|scalar[] $filterAttributes
*/
public function withFilterAttributes($filterAttributes): ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet
{
return $this->withQueryParam('filter[attributes]', $filterAttributes);
}

/**
*
* @psalm-param scalar|scalar[] $expand
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
* @template-implements ProjectionSelectingTailoring<ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet>
* @template-implements PriceSelecting<ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet>
* @template-implements LocaleProjecting<ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet>
* @template-implements AttributeFiltering<ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet>
* @template-implements Expandable<ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet>
* @template-implements Errorable<ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet>
* @template-implements Deprecatable200<ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet>
*/
class ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet extends ApiRequest implements ProjectionSelectingTailoring, PriceSelecting, LocaleProjecting, Expandable, Errorable, Deprecatable200
class ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet extends ApiRequest implements ProjectionSelectingTailoring, PriceSelecting, LocaleProjecting, AttributeFiltering, Expandable, Errorable, Deprecatable200
{
/**
* @param ?object|array|string $body
Expand Down Expand Up @@ -219,6 +220,15 @@ public function withLocaleProjection($localeProjection): ByProjectKeyInStoreKeyB
return $this->withQueryParam('localeProjection', $localeProjection);
}

/**
*
* @psalm-param scalar|scalar[] $filterAttributes
*/
public function withFilterAttributes($filterAttributes): ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet
{
return $this->withQueryParam('filter[attributes]', $filterAttributes);
}

/**
*
* @psalm-param scalar|scalar[] $expand
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@
* @template-implements PriceSelecting<ByProjectKeyProductProjectionsByIDGet>
* @template-implements LocaleProjecting<ByProjectKeyProductProjectionsByIDGet>
* @template-implements StoreProjectingTailoring<ByProjectKeyProductProjectionsByIDGet>
* @template-implements AttributeFiltering<ByProjectKeyProductProjectionsByIDGet>
* @template-implements Expandable<ByProjectKeyProductProjectionsByIDGet>
* @template-implements Errorable<ByProjectKeyProductProjectionsByIDGet>
* @template-implements Deprecatable200<ByProjectKeyProductProjectionsByIDGet>
*/
class ByProjectKeyProductProjectionsByIDGet extends ApiRequest implements ProjectionSelecting, PriceSelecting, LocaleProjecting, StoreProjectingTailoring, Expandable, Errorable, Deprecatable200
class ByProjectKeyProductProjectionsByIDGet extends ApiRequest implements ProjectionSelecting, PriceSelecting, LocaleProjecting, StoreProjectingTailoring, AttributeFiltering, Expandable, Errorable, Deprecatable200
{
/**
* @param ?object|array|string $body
Expand Down Expand Up @@ -229,6 +230,15 @@ public function withStoreProjection($storeProjection): ByProjectKeyProductProjec
return $this->withQueryParam('storeProjection', $storeProjection);
}

/**
*
* @psalm-param scalar|scalar[] $filterAttributes
*/
public function withFilterAttributes($filterAttributes): ByProjectKeyProductProjectionsByIDGet
{
return $this->withQueryParam('filter[attributes]', $filterAttributes);
}

/**
*
* @psalm-param scalar|scalar[] $expand
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@
* @template-implements PriceSelecting<ByProjectKeyProductProjectionsGet>
* @template-implements LocaleProjecting<ByProjectKeyProductProjectionsGet>
* @template-implements StoreProjectingTailoring<ByProjectKeyProductProjectionsGet>
* @template-implements AttributeFiltering<ByProjectKeyProductProjectionsGet>
* @template-implements Expandable<ByProjectKeyProductProjectionsGet>
* @template-implements Sortable<ByProjectKeyProductProjectionsGet>
* @template-implements Paging<ByProjectKeyProductProjectionsGet>
* @template-implements Query<ByProjectKeyProductProjectionsGet>
* @template-implements Errorable<ByProjectKeyProductProjectionsGet>
* @template-implements Deprecatable200<ByProjectKeyProductProjectionsGet>
*/
class ByProjectKeyProductProjectionsGet extends ApiRequest implements ProjectionSelecting, PriceSelecting, LocaleProjecting, StoreProjectingTailoring, Expandable, Sortable, Paging, Query, Errorable, Deprecatable200
class ByProjectKeyProductProjectionsGet extends ApiRequest implements ProjectionSelecting, PriceSelecting, LocaleProjecting, StoreProjectingTailoring, AttributeFiltering, Expandable, Sortable, Paging, Query, Errorable, Deprecatable200
{
/**
* @param ?object|array|string $body
Expand Down Expand Up @@ -232,6 +233,15 @@ public function withStoreProjection($storeProjection): ByProjectKeyProductProjec
return $this->withQueryParam('storeProjection', $storeProjection);
}

/**
*
* @psalm-param scalar|scalar[] $filterAttributes
*/
public function withFilterAttributes($filterAttributes): ByProjectKeyProductProjectionsGet
{
return $this->withQueryParam('filter[attributes]', $filterAttributes);
}

/**
*
* @psalm-param scalar|scalar[] $expand
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@
* @template-implements PriceSelecting<ByProjectKeyProductProjectionsKeyByKeyGet>
* @template-implements LocaleProjecting<ByProjectKeyProductProjectionsKeyByKeyGet>
* @template-implements StoreProjectingTailoring<ByProjectKeyProductProjectionsKeyByKeyGet>
* @template-implements AttributeFiltering<ByProjectKeyProductProjectionsKeyByKeyGet>
* @template-implements Expandable<ByProjectKeyProductProjectionsKeyByKeyGet>
* @template-implements Errorable<ByProjectKeyProductProjectionsKeyByKeyGet>
* @template-implements Deprecatable200<ByProjectKeyProductProjectionsKeyByKeyGet>
*/
class ByProjectKeyProductProjectionsKeyByKeyGet extends ApiRequest implements ProjectionSelecting, PriceSelecting, LocaleProjecting, StoreProjectingTailoring, Expandable, Errorable, Deprecatable200
class ByProjectKeyProductProjectionsKeyByKeyGet extends ApiRequest implements ProjectionSelecting, PriceSelecting, LocaleProjecting, StoreProjectingTailoring, AttributeFiltering, Expandable, Errorable, Deprecatable200
{
/**
* @param ?object|array|string $body
Expand Down Expand Up @@ -229,6 +230,15 @@ public function withStoreProjection($storeProjection): ByProjectKeyProductProjec
return $this->withQueryParam('storeProjection', $storeProjection);
}

/**
*
* @psalm-param scalar|scalar[] $filterAttributes
*/
public function withFilterAttributes($filterAttributes): ByProjectKeyProductProjectionsKeyByKeyGet
{
return $this->withQueryParam('filter[attributes]', $filterAttributes);
}

/**
*
* @psalm-param scalar|scalar[] $expand
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ interface CartDiscountChangeTargetAction extends CartDiscountUpdateAction

/**
* <p>New value to set.</p>
* <p>For a <a href="ctp:api:type:CartDiscountValueRelative">CartDiscountValueRelative</a>, if <code>applicationMode</code> is set, the target must be <a href="ctp:api:type:CartDiscountPatternTarget">CartDiscountPatternTarget</a>.
* If <code>applicationMode</code> is <code>ProportionateDistribution</code> or <code>EvenDistribution</code>, the <a href="ctp:api:type:CartDiscountPatternTarget">CartDiscountPatternTarget</a> <code>triggerPattern</code> must be non-empty.
* If either conditions are not met, an <a href="ctp:api:type:InvalidOperationError">InvalidOperation</a> error is returned.</p>
*

* @return null|CartDiscountTarget
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ final class CartDiscountChangeTargetActionBuilder implements Builder

/**
* <p>New value to set.</p>
* <p>For a <a href="ctp:api:type:CartDiscountValueRelative">CartDiscountValueRelative</a>, if <code>applicationMode</code> is set, the target must be <a href="ctp:api:type:CartDiscountPatternTarget">CartDiscountPatternTarget</a>.
* If <code>applicationMode</code> is <code>ProportionateDistribution</code> or <code>EvenDistribution</code>, the <a href="ctp:api:type:CartDiscountPatternTarget">CartDiscountPatternTarget</a> <code>triggerPattern</code> must be non-empty.
* If either conditions are not met, an <a href="ctp:api:type:InvalidOperationError">InvalidOperation</a> error is returned.</p>
*

* @return null|CartDiscountTarget
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ public function getAction()

/**
* <p>New value to set.</p>
* <p>For a <a href="ctp:api:type:CartDiscountValueRelative">CartDiscountValueRelative</a>, if <code>applicationMode</code> is set, the target must be <a href="ctp:api:type:CartDiscountPatternTarget">CartDiscountPatternTarget</a>.
* If <code>applicationMode</code> is <code>ProportionateDistribution</code> or <code>EvenDistribution</code>, the <a href="ctp:api:type:CartDiscountPatternTarget">CartDiscountPatternTarget</a> <code>triggerPattern</code> must be non-empty.
* If either conditions are not met, an <a href="ctp:api:type:InvalidOperationError">InvalidOperation</a> error is returned.</p>
*
*
* @return null|CartDiscountTarget
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ interface CartDiscountChangeValueAction extends CartDiscountUpdateAction
public const FIELD_VALUE = 'value';

/**
* <p>New value to set.
* When trying to set a <a href="ctp:api:type:CartDiscountValueGiftLineItemDraft">CartDiscountValueGiftLineItemDraft</a> an <a href="ctp:api:type:InvalidInputError">InvalidInput</a> error is returned.</p>
* <p>New value to set.</p>
* <p>When trying to set a <a href="ctp:api:type:CartDiscountValueGiftLineItemDraft">CartDiscountValueGiftLineItemDraft</a> an <a href="ctp:api:type:InvalidInputError">InvalidInput</a> error is returned.</p>
*

* @return null|CartDiscountValueDraft
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ final class CartDiscountChangeValueActionBuilder implements Builder
private $value;

/**
* <p>New value to set.
* When trying to set a <a href="ctp:api:type:CartDiscountValueGiftLineItemDraft">CartDiscountValueGiftLineItemDraft</a> an <a href="ctp:api:type:InvalidInputError">InvalidInput</a> error is returned.</p>
* <p>New value to set.</p>
* <p>When trying to set a <a href="ctp:api:type:CartDiscountValueGiftLineItemDraft">CartDiscountValueGiftLineItemDraft</a> an <a href="ctp:api:type:InvalidInputError">InvalidInput</a> error is returned.</p>
*

* @return null|CartDiscountValueDraft
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public function getAction()
}

/**
* <p>New value to set.
* When trying to set a <a href="ctp:api:type:CartDiscountValueGiftLineItemDraft">CartDiscountValueGiftLineItemDraft</a> an <a href="ctp:api:type:InvalidInputError">InvalidInput</a> error is returned.</p>
* <p>New value to set.</p>
* <p>When trying to set a <a href="ctp:api:type:CartDiscountValueGiftLineItemDraft">CartDiscountValueGiftLineItemDraft</a> an <a href="ctp:api:type:InvalidInputError">InvalidInput</a> error is returned.</p>
*
*
* @return null|CartDiscountValueDraft
Expand Down
Loading