Skip to content

Commit d2b4092

Browse files
committed
build(codegen): updating SDK
1 parent e78f1f2 commit d2b4092

File tree

4 files changed

+100
-99
lines changed

4 files changed

+100
-99
lines changed

lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyTest.php

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -67,38 +67,38 @@ public function getRequests()
6767
public function getResources()
6868
{
6969
return [
70-
'ResourceByProjectKeyInStoreKeyByStoreKeyCarts' => [
71-
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyCarts {
70+
'ResourceByProjectKeyInStoreKeyByStoreKeyBusinessUnits' => [
71+
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyBusinessUnits {
7272
return $builder
7373
->withProjectKey("test_projectKey")
7474
->inStoreKeyWithStoreKeyValue("test_storeKey")
75-
->carts();
75+
->businessUnits();
7676
},
77-
ResourceByProjectKeyInStoreKeyByStoreKeyCarts::class,
77+
ResourceByProjectKeyInStoreKeyByStoreKeyBusinessUnits::class,
7878
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
79-
'/{projectKey}/in-store/key={storeKey}/carts'
79+
'/{projectKey}/in-store/key={storeKey}/business-units'
8080
],
81-
'ResourceByProjectKeyInStoreKeyByStoreKeyOrders' => [
82-
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyOrders {
81+
'ResourceByProjectKeyInStoreKeyByStoreKeyCartDiscounts' => [
82+
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyCartDiscounts {
8383
return $builder
8484
->withProjectKey("test_projectKey")
8585
->inStoreKeyWithStoreKeyValue("test_storeKey")
86-
->orders();
86+
->cartDiscounts();
8787
},
88-
ResourceByProjectKeyInStoreKeyByStoreKeyOrders::class,
88+
ResourceByProjectKeyInStoreKeyByStoreKeyCartDiscounts::class,
8989
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
90-
'/{projectKey}/in-store/key={storeKey}/orders'
90+
'/{projectKey}/in-store/key={storeKey}/cart-discounts'
9191
],
92-
'ResourceByProjectKeyInStoreKeyByStoreKeyMe' => [
93-
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyMe {
92+
'ResourceByProjectKeyInStoreKeyByStoreKeyCarts' => [
93+
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyCarts {
9494
return $builder
9595
->withProjectKey("test_projectKey")
9696
->inStoreKeyWithStoreKeyValue("test_storeKey")
97-
->me();
97+
->carts();
9898
},
99-
ResourceByProjectKeyInStoreKeyByStoreKeyMe::class,
99+
ResourceByProjectKeyInStoreKeyByStoreKeyCarts::class,
100100
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
101-
'/{projectKey}/in-store/key={storeKey}/me'
101+
'/{projectKey}/in-store/key={storeKey}/carts'
102102
],
103103
'ResourceByProjectKeyInStoreKeyByStoreKeyCustomers' => [
104104
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyCustomers {
@@ -111,38 +111,27 @@ function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyC
111111
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
112112
'/{projectKey}/in-store/key={storeKey}/customers'
113113
],
114-
'ResourceByProjectKeyInStoreKeyByStoreKeyLogin' => [
115-
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyLogin {
116-
return $builder
117-
->withProjectKey("test_projectKey")
118-
->inStoreKeyWithStoreKeyValue("test_storeKey")
119-
->login();
120-
},
121-
ResourceByProjectKeyInStoreKeyByStoreKeyLogin::class,
122-
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
123-
'/{projectKey}/in-store/key={storeKey}/login'
124-
],
125-
'ResourceByProjectKeyInStoreKeyByStoreKeyShippingMethods' => [
126-
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyShippingMethods {
114+
'ResourceByProjectKeyInStoreKeyByStoreKeyMe' => [
115+
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyMe {
127116
return $builder
128117
->withProjectKey("test_projectKey")
129118
->inStoreKeyWithStoreKeyValue("test_storeKey")
130-
->shippingMethods();
119+
->me();
131120
},
132-
ResourceByProjectKeyInStoreKeyByStoreKeyShippingMethods::class,
121+
ResourceByProjectKeyInStoreKeyByStoreKeyMe::class,
133122
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
134-
'/{projectKey}/in-store/key={storeKey}/shipping-methods'
123+
'/{projectKey}/in-store/key={storeKey}/me'
135124
],
136-
'ResourceByProjectKeyInStoreKeyByStoreKeyShoppingLists' => [
137-
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyShoppingLists {
125+
'ResourceByProjectKeyInStoreKeyByStoreKeyOrders' => [
126+
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyOrders {
138127
return $builder
139128
->withProjectKey("test_projectKey")
140129
->inStoreKeyWithStoreKeyValue("test_storeKey")
141-
->shoppingLists();
130+
->orders();
142131
},
143-
ResourceByProjectKeyInStoreKeyByStoreKeyShoppingLists::class,
132+
ResourceByProjectKeyInStoreKeyByStoreKeyOrders::class,
144133
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
145-
'/{projectKey}/in-store/key={storeKey}/shopping-lists'
134+
'/{projectKey}/in-store/key={storeKey}/orders'
146135
],
147136
'ResourceByProjectKeyInStoreKeyByStoreKeyProductProjections' => [
148137
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyProductProjections {
@@ -166,17 +155,6 @@ function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyP
166155
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
167156
'/{projectKey}/in-store/key={storeKey}/product-selection-assignments'
168157
],
169-
'ResourceByProjectKeyInStoreKeyByStoreKeyCartDiscounts' => [
170-
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyCartDiscounts {
171-
return $builder
172-
->withProjectKey("test_projectKey")
173-
->inStoreKeyWithStoreKeyValue("test_storeKey")
174-
->cartDiscounts();
175-
},
176-
ResourceByProjectKeyInStoreKeyByStoreKeyCartDiscounts::class,
177-
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
178-
'/{projectKey}/in-store/key={storeKey}/cart-discounts'
179-
],
180158
'ResourceByProjectKeyInStoreKeyByStoreKeyProductTailoring' => [
181159
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyProductTailoring {
182160
return $builder
@@ -210,38 +188,60 @@ function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyQ
210188
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
211189
'/{projectKey}/in-store/key={storeKey}/quote-requests'
212190
],
213-
'ResourceByProjectKeyInStoreKeyByStoreKeyStagedQuotes' => [
214-
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyStagedQuotes {
191+
'ResourceByProjectKeyInStoreKeyByStoreKeyQuotes' => [
192+
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyQuotes {
215193
return $builder
216194
->withProjectKey("test_projectKey")
217195
->inStoreKeyWithStoreKeyValue("test_storeKey")
218-
->stagedQuotes();
196+
->quotes();
219197
},
220-
ResourceByProjectKeyInStoreKeyByStoreKeyStagedQuotes::class,
198+
ResourceByProjectKeyInStoreKeyByStoreKeyQuotes::class,
221199
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
222-
'/{projectKey}/in-store/key={storeKey}/staged-quotes'
200+
'/{projectKey}/in-store/key={storeKey}/quotes'
223201
],
224-
'ResourceByProjectKeyInStoreKeyByStoreKeyQuotes' => [
225-
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyQuotes {
202+
'ResourceByProjectKeyInStoreKeyByStoreKeyShippingMethods' => [
203+
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyShippingMethods {
226204
return $builder
227205
->withProjectKey("test_projectKey")
228206
->inStoreKeyWithStoreKeyValue("test_storeKey")
229-
->quotes();
207+
->shippingMethods();
230208
},
231-
ResourceByProjectKeyInStoreKeyByStoreKeyQuotes::class,
209+
ResourceByProjectKeyInStoreKeyByStoreKeyShippingMethods::class,
232210
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
233-
'/{projectKey}/in-store/key={storeKey}/quotes'
211+
'/{projectKey}/in-store/key={storeKey}/shipping-methods'
234212
],
235-
'ResourceByProjectKeyInStoreKeyByStoreKeyBusinessUnits' => [
236-
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyBusinessUnits {
213+
'ResourceByProjectKeyInStoreKeyByStoreKeyShoppingLists' => [
214+
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyShoppingLists {
237215
return $builder
238216
->withProjectKey("test_projectKey")
239217
->inStoreKeyWithStoreKeyValue("test_storeKey")
240-
->businessUnits();
218+
->shoppingLists();
241219
},
242-
ResourceByProjectKeyInStoreKeyByStoreKeyBusinessUnits::class,
220+
ResourceByProjectKeyInStoreKeyByStoreKeyShoppingLists::class,
243221
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
244-
'/{projectKey}/in-store/key={storeKey}/business-units'
222+
'/{projectKey}/in-store/key={storeKey}/shopping-lists'
223+
],
224+
'ResourceByProjectKeyInStoreKeyByStoreKeyStagedQuotes' => [
225+
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyStagedQuotes {
226+
return $builder
227+
->withProjectKey("test_projectKey")
228+
->inStoreKeyWithStoreKeyValue("test_storeKey")
229+
->stagedQuotes();
230+
},
231+
ResourceByProjectKeyInStoreKeyByStoreKeyStagedQuotes::class,
232+
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
233+
'/{projectKey}/in-store/key={storeKey}/staged-quotes'
234+
],
235+
'ResourceByProjectKeyInStoreKeyByStoreKeyLogin' => [
236+
function (ApiRequestBuilder $builder): ResourceByProjectKeyInStoreKeyByStoreKeyLogin {
237+
return $builder
238+
->withProjectKey("test_projectKey")
239+
->inStoreKeyWithStoreKeyValue("test_storeKey")
240+
->login();
241+
},
242+
ResourceByProjectKeyInStoreKeyByStoreKeyLogin::class,
243+
['projectKey' => 'test_projectKey', 'storeKey' => 'test_storeKey'],
244+
'/{projectKey}/in-store/key={storeKey}/login'
245245
]
246246
];
247247
}

lib/commercetools-api/docs/RequestBuilder.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4989,7 +4989,7 @@ $request = $builder
49894989
```
49904990
## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->me()->activeCart()->head()`
49914991

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

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

@@ -5394,7 +5394,7 @@ $request = $builder
53945394
```
53955395
## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->me()->shoppingLists()->get()`
53965396

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

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

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

5420-
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.
5420+
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.
54215421

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

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

5463-
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.
5463+
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.
54645464

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

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

5559-
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.
5559+
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.
55605560

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

55635563
- If no ShoppingList matches the provided `key` in a Store.
55645564
- If a ShoppingList matches the provided `key` but does not have a `store` specified, or the `store` field references a different Store.
55655565
- 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,
5566-
or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope.
5566+
or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope.
55675567

55685568

55695569
### Example
@@ -6615,7 +6615,7 @@ $request = $builder
66156615
```
66166616
## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->shoppingLists()->head()`
66176617

6618-
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.
6618+
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.
66196619

66206620
### Example
66216621
```php

0 commit comments

Comments
 (0)