Skip to content

Commit 37bb022

Browse files
committed
build(codegen): updating SDK
1 parent a09cab0 commit 37bb022

File tree

36 files changed

+4541
-28
lines changed

36 files changed

+4541
-28
lines changed

changes.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
**Api changes**
22

3+
<details>
4+
<summary>Added Enum(s)</summary>
5+
6+
- added enum `ViewMyShoppingLists` to type `Permission`
7+
- added enum `ViewOthersShoppingLists` to type `Permission`
8+
- added enum `UpdateMyShoppingLists` to type `Permission`
9+
- added enum `UpdateOthersShoppingLists` to type `Permission`
10+
- added enum `CreateMyShoppingLists` to type `Permission`
11+
- added enum `CreateOthersShoppingLists` to type `Permission`
12+
- added enum `DeleteMyShoppingLists` to type `Permission`
13+
- added enum `DeleteOthersShoppingLists` to type `Permission`
14+
</details>
15+
16+
317
<details>
418
<summary>Required Property(s)</summary>
519

@@ -66,6 +80,9 @@
6680
<details>
6781
<summary>Added Resource(s)</summary>
6882

83+
- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists`
84+
- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/key={key}`
85+
- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/{ID}`
6986
- added resource `/{projectKey}/business-units/key={key}/associates/{associateId}`
7087
- added resource `/{projectKey}/business-units/{businessUnitId}/associates/{associateId}`
7188
- added resource `/{projectKey}/in-store/key={storeKey}/business-units`
@@ -79,6 +96,17 @@
7996
<details>
8097
<summary>Added Method(s)</summary>
8198

99+
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->get()`
100+
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->head()`
101+
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->post()`
102+
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withKey()->get()`
103+
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withKey()->head()`
104+
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withKey()->post()`
105+
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withKey()->delete()`
106+
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withId()->get()`
107+
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withId()->head()`
108+
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withId()->post()`
109+
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withId()->delete()`
82110
- added method `$apiRoot->withProjectKey()->businessUnits()->keyWithKeyValueAssociatesWithAssociateIdValue()->get()`
83111
- added method `$apiRoot->withProjectKey()->businessUnits()->withBusinessUnitIdValueAssociatesWithAssociateIdValue()->get()`
84112
- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->get()`

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

Lines changed: 789 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 789 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 676 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Commercetools\Api\Client\Resource\ResourceByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyOrders;
1616
use Commercetools\Api\Client\Resource\ResourceByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuoteRequests;
1717
use Commercetools\Api\Client\Resource\ResourceByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotes;
18+
use Commercetools\Api\Client\Resource\ResourceByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingLists;
1819
use Commercetools\Base\JsonObject;
1920
use Commercetools\Client\ApiRequest;
2021
use Commercetools\Exception\ApiClientException;
@@ -96,6 +97,19 @@ function (ApiRequestBuilder $builder): ResourceByProjectKeyAsAssociateByAssociat
9697
['projectKey' => 'test_projectKey', 'associateId' => 'test_associateId', 'businessUnitKey' => 'test_businessUnitKey'],
9798
'/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/carts'
9899
],
100+
'ResourceByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingLists' => [
101+
function (ApiRequestBuilder $builder): ResourceByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingLists {
102+
return $builder
103+
->withProjectKey("test_projectKey")
104+
->asAssociate()
105+
->withAssociateIdValue("test_associateId")
106+
->inBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
107+
->shoppingLists();
108+
},
109+
ResourceByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingLists::class,
110+
['projectKey' => 'test_projectKey', 'associateId' => 'test_associateId', 'businessUnitKey' => 'test_businessUnitKey'],
111+
'/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists'
112+
],
99113
'ResourceByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyOrders' => [
100114
function (ApiRequestBuilder $builder): ResourceByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyOrders {
101115
return $builder

lib/commercetools-api/docs/RequestBuilder.md

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,211 @@ $request = $builder
11931193
->withKey("key")
11941194
->post(null);
11951195
```
1196+
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->get()`
1197+
1198+
null
1199+
1200+
### Example
1201+
```php
1202+
use Commercetools\Api\Client\ApiRequestBuilder;
1203+
1204+
$builder = new ApiRequestBuilder();
1205+
$request = $builder
1206+
->withProjectKey("projectKey")
1207+
->asAssociate()
1208+
->withAssociateIdValue("associateId")
1209+
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
1210+
->shoppingLists()
1211+
->get();
1212+
```
1213+
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->head()`
1214+
1215+
Checks if a ShoppingList exists for a given Query Predicate. Returns a `200 OK` if any ShoppingLists match the Query Predicate; otherwise, returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
1216+
1217+
1218+
### Example
1219+
```php
1220+
use Commercetools\Api\Client\ApiRequestBuilder;
1221+
1222+
$builder = new ApiRequestBuilder();
1223+
$request = $builder
1224+
->withProjectKey("projectKey")
1225+
->asAssociate()
1226+
->withAssociateIdValue("associateId")
1227+
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
1228+
->shoppingLists()
1229+
->head();
1230+
```
1231+
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->post(null)`
1232+
1233+
Creates a ShoppingList in the [BusinessUnit](ctp:api:type:BusinessUnit) referenced by `businessUnitKey`. As such, the `businessUnit` field on [ShoppingListDraft](ctp:api:type:ShoppingListDraft) is ignored for this request.
1234+
1235+
1236+
### Example
1237+
```php
1238+
use Commercetools\Api\Client\ApiRequestBuilder;
1239+
1240+
$builder = new ApiRequestBuilder();
1241+
$request = $builder
1242+
->withProjectKey("projectKey")
1243+
->asAssociate()
1244+
->withAssociateIdValue("associateId")
1245+
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
1246+
->shoppingLists()
1247+
->post(null);
1248+
```
1249+
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->withId("ID")->get()`
1250+
1251+
If the ShoppingList exists in the Project but does not reference the requested [BusinessUnit](ctp:api:type:BusinessUnit), this method returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
1252+
1253+
1254+
### Example
1255+
```php
1256+
use Commercetools\Api\Client\ApiRequestBuilder;
1257+
1258+
$builder = new ApiRequestBuilder();
1259+
$request = $builder
1260+
->withProjectKey("projectKey")
1261+
->asAssociate()
1262+
->withAssociateIdValue("associateId")
1263+
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
1264+
->shoppingLists()
1265+
->withId("ID")
1266+
->get();
1267+
```
1268+
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->withId("ID")->head()`
1269+
1270+
Checks if a ShoppingList exists for a given `id`. Returns a `200 OK` if the ShoppingList exists; otherwise, returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
1271+
1272+
1273+
### Example
1274+
```php
1275+
use Commercetools\Api\Client\ApiRequestBuilder;
1276+
1277+
$builder = new ApiRequestBuilder();
1278+
$request = $builder
1279+
->withProjectKey("projectKey")
1280+
->asAssociate()
1281+
->withAssociateIdValue("associateId")
1282+
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
1283+
->shoppingLists()
1284+
->withId("ID")
1285+
->head();
1286+
```
1287+
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->withId("ID")->post(null)`
1288+
1289+
If the ShoppingList exists in the Project but does not reference the requested [BusinessUnit](ctp:api:type:BusinessUnit), this method returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
1290+
1291+
1292+
### Example
1293+
```php
1294+
use Commercetools\Api\Client\ApiRequestBuilder;
1295+
1296+
$builder = new ApiRequestBuilder();
1297+
$request = $builder
1298+
->withProjectKey("projectKey")
1299+
->asAssociate()
1300+
->withAssociateIdValue("associateId")
1301+
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
1302+
->shoppingLists()
1303+
->withId("ID")
1304+
->post(null);
1305+
```
1306+
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->withId("ID")->delete()`
1307+
1308+
If the ShoppingList exists in the Project but does not reference the requested [BusinessUnit](ctp:api:type:BusinessUnit), this method returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
1309+
1310+
1311+
### Example
1312+
```php
1313+
use Commercetools\Api\Client\ApiRequestBuilder;
1314+
1315+
$builder = new ApiRequestBuilder();
1316+
$request = $builder
1317+
->withProjectKey("projectKey")
1318+
->asAssociate()
1319+
->withAssociateIdValue("associateId")
1320+
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
1321+
->shoppingLists()
1322+
->withId("ID")
1323+
->delete();
1324+
```
1325+
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->withKey("key")->get()`
1326+
1327+
If the ShoppingList exists in the Project but does not reference the requested [BusinessUnit](ctp:api:type:BusinessUnit), this method returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
1328+
1329+
1330+
### Example
1331+
```php
1332+
use Commercetools\Api\Client\ApiRequestBuilder;
1333+
1334+
$builder = new ApiRequestBuilder();
1335+
$request = $builder
1336+
->withProjectKey("projectKey")
1337+
->asAssociate()
1338+
->withAssociateIdValue("associateId")
1339+
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
1340+
->shoppingLists()
1341+
->withKey("key")
1342+
->get();
1343+
```
1344+
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->withKey("key")->head()`
1345+
1346+
Checks if a ShoppingList exists for a given `key`. Returns a `200 OK` if the ShoppingList exists; otherwise, returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
1347+
1348+
1349+
### Example
1350+
```php
1351+
use Commercetools\Api\Client\ApiRequestBuilder;
1352+
1353+
$builder = new ApiRequestBuilder();
1354+
$request = $builder
1355+
->withProjectKey("projectKey")
1356+
->asAssociate()
1357+
->withAssociateIdValue("associateId")
1358+
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
1359+
->shoppingLists()
1360+
->withKey("key")
1361+
->head();
1362+
```
1363+
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->withKey("key")->post(null)`
1364+
1365+
If the Shopping List exists in the [Project](ctp:api:type:Project) but does not reference the requested [BusinessUnit](ctp:api:type:BusinessUnit), this method returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
1366+
1367+
1368+
### Example
1369+
```php
1370+
use Commercetools\Api\Client\ApiRequestBuilder;
1371+
1372+
$builder = new ApiRequestBuilder();
1373+
$request = $builder
1374+
->withProjectKey("projectKey")
1375+
->asAssociate()
1376+
->withAssociateIdValue("associateId")
1377+
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
1378+
->shoppingLists()
1379+
->withKey("key")
1380+
->post(null);
1381+
```
1382+
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->withKey("key")->delete()`
1383+
1384+
If the ShoppingList exists in the Project but does not reference the requested [BusinessUnit](ctp:api:type:BusinessUnit), this method returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
1385+
1386+
1387+
### Example
1388+
```php
1389+
use Commercetools\Api\Client\ApiRequestBuilder;
1390+
1391+
$builder = new ApiRequestBuilder();
1392+
$request = $builder
1393+
->withProjectKey("projectKey")
1394+
->asAssociate()
1395+
->withAssociateIdValue("associateId")
1396+
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
1397+
->shoppingLists()
1398+
->withKey("key")
1399+
->delete();
1400+
```
11961401
## `withProjectKey("projectKey")->associateRoles()->get()`
11971402

11981403
null

0 commit comments

Comments
 (0)