diff --git a/changes.md b/changes.md index 208cb3f1ff7..7b038d2ae2d 100644 --- a/changes.md +++ b/changes.md @@ -7,3 +7,11 @@ - :warning: changed property `column` of type `GraphQLErrorLocation` from type `integer` to `number` + +
+Added QueryParameter(s) + +- added query parameter `where` to method `get /{projectKey}/product-selections/key={key}/products` +- added query parameter `where` to method `get /{projectKey}/product-selections/{ID}/products` +
+ diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductSelectionsByIDProductsTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductSelectionsByIDProductsTest.php index 482d629c83a..12d1441c690 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductSelectionsByIDProductsTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductSelectionsByIDProductsTest.php @@ -90,6 +90,19 @@ public function testExecuteServerException(callable $builderFunction) public function getRequests() { return [ + 'ByProjectKeyProductSelectionsByIDProductsGet_withWhere' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->productSelections() + ->withId('test_ID') + ->products() + ->get() + ->withWhere('where'); + }, + 'get', + 'test_projectKey/product-selections/test_ID/products?where=where', + ], 'ByProjectKeyProductSelectionsByIDProductsGet_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductSelectionsKeyByKeyProductsTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductSelectionsKeyByKeyProductsTest.php index 437e23d4f0a..f2e28922497 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductSelectionsKeyByKeyProductsTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductSelectionsKeyByKeyProductsTest.php @@ -90,6 +90,19 @@ public function testExecuteServerException(callable $builderFunction) public function getRequests() { return [ + 'ByProjectKeyProductSelectionsKeyByKeyProductsGet_withWhere' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->productSelections() + ->withKey('test_key') + ->products() + ->get() + ->withWhere('where'); + }, + 'get', + 'test_projectKey/product-selections/key=test_key/products?where=where', + ], 'ByProjectKeyProductSelectionsKeyByKeyProductsGet_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductSelectionsByIDProductsGet.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductSelectionsByIDProductsGet.php index 6ed040f941f..1f8ae074541 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductSelectionsByIDProductsGet.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductSelectionsByIDProductsGet.php @@ -146,6 +146,15 @@ function (RequestException $e) use ($resultType) { ); } + /** + * + * @psalm-param scalar|scalar[] $where + */ + public function withWhere($where): ByProjectKeyProductSelectionsByIDProductsGet + { + return $this->withQueryParam('where', $where); + } + /** * * @psalm-param scalar|scalar[] $expand diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductSelectionsKeyByKeyProductsGet.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductSelectionsKeyByKeyProductsGet.php index 6204d0d2472..cb2537606bf 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductSelectionsKeyByKeyProductsGet.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductSelectionsKeyByKeyProductsGet.php @@ -146,6 +146,15 @@ function (RequestException $e) use ($resultType) { ); } + /** + * + * @psalm-param scalar|scalar[] $where + */ + public function withWhere($where): ByProjectKeyProductSelectionsKeyByKeyProductsGet + { + return $this->withQueryParam('where', $where); + } + /** * * @psalm-param scalar|scalar[] $expand diff --git a/references.txt b/references.txt index a5feab92960..a62bc2a137a 100644 --- a/references.txt +++ b/references.txt @@ -324,3 +324,4 @@ ccf4522140c12b0093aefe0e2a27d62bcc4834a6 8e09aa861a0ba58755289bc185dcb268ac4f1c13 0be69283d6aba9d3a2f895140378673f2f80f7b0 f254d17f05343dcc4299fc53ff9b335b5ef63d69 +6892be230f1ad73f1150dd544c9fa7fee0e6b123