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
Original file line number Diff line number Diff line change
Expand Up @@ -67,38 +67,38 @@ public function getRequests()
public function getResources()
{
return [
'ResourceByProjectKeyInStoreKeyByStoreKeyCarts' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyCarts {
'ResourceByProjectKeyInStoreKeyByStoreKeyBusinessUnits' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyBusinessUnits {
return $builder
->withProjectKey("test_projectKey")
->inStoreKeyWithStoreKeyValue("test_storeKey")
->carts();
->businessUnits();
},
ResourceByProjectKeyInStoreKeyByStoreKeyCarts::class,
ResourceByProjectKeyInStoreKeyByStoreKeyBusinessUnits::class,
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
'/{projectKey}/in-store/key={storeKey}/carts'
'/{projectKey}/in-store/key={storeKey}/business-units'
],
'ResourceByProjectKeyInStoreKeyByStoreKeyOrders' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyOrders {
'ResourceByProjectKeyInStoreKeyByStoreKeyCartDiscounts' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyCartDiscounts {
return $builder
->withProjectKey("test_projectKey")
->inStoreKeyWithStoreKeyValue("test_storeKey")
->orders();
->cartDiscounts();
},
ResourceByProjectKeyInStoreKeyByStoreKeyOrders::class,
ResourceByProjectKeyInStoreKeyByStoreKeyCartDiscounts::class,
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
'/{projectKey}/in-store/key={storeKey}/orders'
'/{projectKey}/in-store/key={storeKey}/cart-discounts'
],
'ResourceByProjectKeyInStoreKeyByStoreKeyMe' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyMe {
'ResourceByProjectKeyInStoreKeyByStoreKeyCarts' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyCarts {
return $builder
->withProjectKey("test_projectKey")
->inStoreKeyWithStoreKeyValue("test_storeKey")
->me();
->carts();
},
ResourceByProjectKeyInStoreKeyByStoreKeyMe::class,
ResourceByProjectKeyInStoreKeyByStoreKeyCarts::class,
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
'/{projectKey}/in-store/key={storeKey}/me'
'/{projectKey}/in-store/key={storeKey}/carts'
],
'ResourceByProjectKeyInStoreKeyByStoreKeyCustomers' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyCustomers {
Expand All @@ -111,38 +111,27 @@ function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyC
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
'/{projectKey}/in-store/key={storeKey}/customers'
],
'ResourceByProjectKeyInStoreKeyByStoreKeyLogin' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyLogin {
return $builder
->withProjectKey("test_projectKey")
->inStoreKeyWithStoreKeyValue("test_storeKey")
->login();
},
ResourceByProjectKeyInStoreKeyByStoreKeyLogin::class,
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
'/{projectKey}/in-store/key={storeKey}/login'
],
'ResourceByProjectKeyInStoreKeyByStoreKeyShippingMethods' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyShippingMethods {
'ResourceByProjectKeyInStoreKeyByStoreKeyMe' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyMe {
return $builder
->withProjectKey("test_projectKey")
->inStoreKeyWithStoreKeyValue("test_storeKey")
->shippingMethods();
->me();
},
ResourceByProjectKeyInStoreKeyByStoreKeyShippingMethods::class,
ResourceByProjectKeyInStoreKeyByStoreKeyMe::class,
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
'/{projectKey}/in-store/key={storeKey}/shipping-methods'
'/{projectKey}/in-store/key={storeKey}/me'
],
'ResourceByProjectKeyInStoreKeyByStoreKeyShoppingLists' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyShoppingLists {
'ResourceByProjectKeyInStoreKeyByStoreKeyOrders' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyOrders {
return $builder
->withProjectKey("test_projectKey")
->inStoreKeyWithStoreKeyValue("test_storeKey")
->shoppingLists();
->orders();
},
ResourceByProjectKeyInStoreKeyByStoreKeyShoppingLists::class,
ResourceByProjectKeyInStoreKeyByStoreKeyOrders::class,
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
'/{projectKey}/in-store/key={storeKey}/shopping-lists'
'/{projectKey}/in-store/key={storeKey}/orders'
],
'ResourceByProjectKeyInStoreKeyByStoreKeyProductProjections' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyProductProjections {
Expand All @@ -166,17 +155,6 @@ function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyP
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
'/{projectKey}/in-store/key={storeKey}/product-selection-assignments'
],
'ResourceByProjectKeyInStoreKeyByStoreKeyCartDiscounts' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyCartDiscounts {
return $builder
->withProjectKey("test_projectKey")
->inStoreKeyWithStoreKeyValue("test_storeKey")
->cartDiscounts();
},
ResourceByProjectKeyInStoreKeyByStoreKeyCartDiscounts::class,
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
'/{projectKey}/in-store/key={storeKey}/cart-discounts'
],
'ResourceByProjectKeyInStoreKeyByStoreKeyProductTailoring' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyProductTailoring {
return $builder
Expand Down Expand Up @@ -210,38 +188,60 @@ function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyQ
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
'/{projectKey}/in-store/key={storeKey}/quote-requests'
],
'ResourceByProjectKeyInStoreKeyByStoreKeyStagedQuotes' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyStagedQuotes {
'ResourceByProjectKeyInStoreKeyByStoreKeyQuotes' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyQuotes {
return $builder
->withProjectKey("test_projectKey")
->inStoreKeyWithStoreKeyValue("test_storeKey")
->stagedQuotes();
->quotes();
},
ResourceByProjectKeyInStoreKeyByStoreKeyStagedQuotes::class,
ResourceByProjectKeyInStoreKeyByStoreKeyQuotes::class,
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
'/{projectKey}/in-store/key={storeKey}/staged-quotes'
'/{projectKey}/in-store/key={storeKey}/quotes'
],
'ResourceByProjectKeyInStoreKeyByStoreKeyQuotes' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyQuotes {
'ResourceByProjectKeyInStoreKeyByStoreKeyShippingMethods' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyShippingMethods {
return $builder
->withProjectKey("test_projectKey")
->inStoreKeyWithStoreKeyValue("test_storeKey")
->quotes();
->shippingMethods();
},
ResourceByProjectKeyInStoreKeyByStoreKeyQuotes::class,
ResourceByProjectKeyInStoreKeyByStoreKeyShippingMethods::class,
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
'/{projectKey}/in-store/key={storeKey}/quotes'
'/{projectKey}/in-store/key={storeKey}/shipping-methods'
],
'ResourceByProjectKeyInStoreKeyByStoreKeyBusinessUnits' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyBusinessUnits {
'ResourceByProjectKeyInStoreKeyByStoreKeyShoppingLists' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyShoppingLists {
return $builder
->withProjectKey("test_projectKey")
->inStoreKeyWithStoreKeyValue("test_storeKey")
->businessUnits();
->shoppingLists();
},
ResourceByProjectKeyInStoreKeyByStoreKeyBusinessUnits::class,
ResourceByProjectKeyInStoreKeyByStoreKeyShoppingLists::class,
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
'/{projectKey}/in-store/key={storeKey}/business-units'
'/{projectKey}/in-store/key={storeKey}/shopping-lists'
],
'ResourceByProjectKeyInStoreKeyByStoreKeyStagedQuotes' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyStagedQuotes {
return $builder
->withProjectKey("test_projectKey")
->inStoreKeyWithStoreKeyValue("test_storeKey")
->stagedQuotes();
},
ResourceByProjectKeyInStoreKeyByStoreKeyStagedQuotes::class,
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
'/{projectKey}/in-store/key={storeKey}/staged-quotes'
],
'ResourceByProjectKeyInStoreKeyByStoreKeyLogin' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyLogin {
return $builder
->withProjectKey("test_projectKey")
->inStoreKeyWithStoreKeyValue("test_storeKey")
->login();
},
ResourceByProjectKeyInStoreKeyByStoreKeyLogin::class,
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
'/{projectKey}/in-store/key={storeKey}/login'
]
];
}
Expand Down
14 changes: 7 additions & 7 deletions lib/commercetools-api/docs/RequestBuilder.md
Original file line number Diff line number Diff line change
Expand Up @@ -4989,7 +4989,7 @@ $request = $builder
```
## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->me()->activeCart()->head()`

Checks if an active Cart exists in a Store. Returns `200` status if successful.
Checks if an active Cart exists in a Store. Returns `200 OK` status if successful.

A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:

Expand Down Expand Up @@ -5394,7 +5394,7 @@ $request = $builder
```
## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->me()->shoppingLists()->get()`

Retrieves ShoppingLists for the authenticated Customer or anonymous user in a [Store](ctp:api:type:Store). Returns `200` status if successful.
Retrieves ShoppingLists for the authenticated Customer or anonymous user in a [Store](ctp:api:type:Store). Returns `200 OK` status if successful.

A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:

Expand All @@ -5417,7 +5417,7 @@ $request = $builder
```
## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->me()->shoppingLists()->head()`

Checks if one or more ShoppingLists exist for the provided query predicate for the authenticated Customer or anonymous user in a [Store](ctp:api:type:Store). Returns `200` status if successful.
Checks if one or more ShoppingLists exist for the provided query predicate for the authenticated Customer or anonymous user in a [Store](ctp:api:type:Store). Returns `200 OK` status if successful.

A [Not Found](/../api/errors#404-not-found) error is returned in the following scenarios:

Expand Down Expand Up @@ -5460,7 +5460,7 @@ $request = $builder
```
## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->me()->shoppingLists()->withId("ID")->get()`

Retrieves a ShoppingList with the provided `id` for the authenticated Customer or anonymous user in a [Store](ctp:api:type:Store). Returns `200` status if successful.
Retrieves a ShoppingList with the provided `id` for the authenticated Customer or anonymous user in a [Store](ctp:api:type:Store). Returns `200 OK` status if successful.

A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:

Expand Down Expand Up @@ -5556,14 +5556,14 @@ $request = $builder
```
## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->me()->shoppingLists()->withKey("key")->get()`

Retrieves a ShoppingList with the provided `key` for the authenticated Customer or anonymous user in a [Store](ctp:api:type:Store). Returns `200` status if successful.
Retrieves a ShoppingList with the provided `key` for the authenticated Customer or anonymous user in a [Store](ctp:api:type:Store). Returns `200 OK` status if successful.

A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:

- If no ShoppingList matches the provided `key` in a Store.
- If a ShoppingList matches the provided `key` but does not have a `store` specified, or the `store` field references a different Store.
- If a ShoppingList matches the provided `key` in a Store but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope,
or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope.
or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope.


### Example
Expand Down Expand Up @@ -6615,7 +6615,7 @@ $request = $builder
```
## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->shoppingLists()->head()`

Checks if one or more ShoppingLists exist for the provided query predicate in a [Store](ctp:api:type:Store). Returns a `200` status if any ShoppingLists match the query predicate, or a `404` status otherwise.
Checks if one or more ShoppingLists exist for the provided query predicate in a [Store](ctp:api:type:Store). Returns a `200` status if any ShoppingLists match the query predicate or, or a `404` status otherwise.

### Example
```php
Expand Down
Loading