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
28 changes: 28 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
**Api changes**

<details>
<summary>Added Enum(s)</summary>

- added enum `ViewMyShoppingLists` to type `Permission`
- added enum `ViewOthersShoppingLists` to type `Permission`
- added enum `UpdateMyShoppingLists` to type `Permission`
- added enum `UpdateOthersShoppingLists` to type `Permission`
- added enum `CreateMyShoppingLists` to type `Permission`
- added enum `CreateOthersShoppingLists` to type `Permission`
- added enum `DeleteMyShoppingLists` to type `Permission`
- added enum `DeleteOthersShoppingLists` to type `Permission`
</details>


<details>
<summary>Required Property(s)</summary>

Expand Down Expand Up @@ -66,6 +80,9 @@
<details>
<summary>Added Resource(s)</summary>

- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists`
- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/key={key}`
- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/{ID}`
- added resource `/{projectKey}/business-units/key={key}/associates/{associateId}`
- added resource `/{projectKey}/business-units/{businessUnitId}/associates/{associateId}`
- added resource `/{projectKey}/in-store/key={storeKey}/business-units`
Expand All @@ -79,6 +96,17 @@
<details>
<summary>Added Method(s)</summary>

- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->get()`
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->head()`
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->post()`
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withKey()->get()`
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withKey()->head()`
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withKey()->post()`
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withKey()->delete()`
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withId()->get()`
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withId()->head()`
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withId()->post()`
- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withId()->delete()`
- added method `$apiRoot->withProjectKey()->businessUnits()->keyWithKeyValueAssociatesWithAssociateIdValue()->get()`
- added method `$apiRoot->withProjectKey()->businessUnits()->withBusinessUnitIdValueAssociatesWithAssociateIdValue()->get()`
- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->get()`
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Commercetools\Api\Client\Resource\ResourceByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyOrders;
use Commercetools\Api\Client\Resource\ResourceByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuoteRequests;
use Commercetools\Api\Client\Resource\ResourceByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotes;
use Commercetools\Api\Client\Resource\ResourceByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingLists;
use Commercetools\Base\JsonObject;
use Commercetools\Client\ApiRequest;
use Commercetools\Exception\ApiClientException;
Expand Down Expand Up @@ -96,6 +97,19 @@ function (ApiRequestBuilder $builder): ResourceByProjectKeyAsAssociateByAssociat
['projectKey' => 'test_projectKey', 'associateId' => 'test_associateId', 'businessUnitKey' => 'test_businessUnitKey'],
'/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/carts'
],
'ResourceByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingLists' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingLists {
return $builder
->withProjectKey("test_projectKey")
->asAssociate()
->withAssociateIdValue("test_associateId")
->inBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
->shoppingLists();
},
ResourceByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingLists::class,
['projectKey' => 'test_projectKey', 'associateId' => 'test_associateId', 'businessUnitKey' => 'test_businessUnitKey'],
'/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists'
],
'ResourceByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyOrders' => [
function (ApiRequestBuilder $builder): ResourceByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyOrders {
return $builder
Expand Down
205 changes: 205 additions & 0 deletions lib/commercetools-api/docs/RequestBuilder.md
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,211 @@ $request = $builder
->withKey("key")
->post(null);
```
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->get()`

null

### Example
```php
use Commercetools\Api\Client\ApiRequestBuilder;

$builder = new ApiRequestBuilder();
$request = $builder
->withProjectKey("projectKey")
->asAssociate()
->withAssociateIdValue("associateId")
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
->shoppingLists()
->get();
```
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->head()`

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.


### Example
```php
use Commercetools\Api\Client\ApiRequestBuilder;

$builder = new ApiRequestBuilder();
$request = $builder
->withProjectKey("projectKey")
->asAssociate()
->withAssociateIdValue("associateId")
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
->shoppingLists()
->head();
```
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->post(null)`

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.


### Example
```php
use Commercetools\Api\Client\ApiRequestBuilder;

$builder = new ApiRequestBuilder();
$request = $builder
->withProjectKey("projectKey")
->asAssociate()
->withAssociateIdValue("associateId")
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
->shoppingLists()
->post(null);
```
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->withId("ID")->get()`

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.


### Example
```php
use Commercetools\Api\Client\ApiRequestBuilder;

$builder = new ApiRequestBuilder();
$request = $builder
->withProjectKey("projectKey")
->asAssociate()
->withAssociateIdValue("associateId")
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
->shoppingLists()
->withId("ID")
->get();
```
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->withId("ID")->head()`

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.


### Example
```php
use Commercetools\Api\Client\ApiRequestBuilder;

$builder = new ApiRequestBuilder();
$request = $builder
->withProjectKey("projectKey")
->asAssociate()
->withAssociateIdValue("associateId")
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
->shoppingLists()
->withId("ID")
->head();
```
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->withId("ID")->post(null)`

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.


### Example
```php
use Commercetools\Api\Client\ApiRequestBuilder;

$builder = new ApiRequestBuilder();
$request = $builder
->withProjectKey("projectKey")
->asAssociate()
->withAssociateIdValue("associateId")
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
->shoppingLists()
->withId("ID")
->post(null);
```
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->withId("ID")->delete()`

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.


### Example
```php
use Commercetools\Api\Client\ApiRequestBuilder;

$builder = new ApiRequestBuilder();
$request = $builder
->withProjectKey("projectKey")
->asAssociate()
->withAssociateIdValue("associateId")
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
->shoppingLists()
->withId("ID")
->delete();
```
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->withKey("key")->get()`

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.


### Example
```php
use Commercetools\Api\Client\ApiRequestBuilder;

$builder = new ApiRequestBuilder();
$request = $builder
->withProjectKey("projectKey")
->asAssociate()
->withAssociateIdValue("associateId")
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
->shoppingLists()
->withKey("key")
->get();
```
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->withKey("key")->head()`

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.


### Example
```php
use Commercetools\Api\Client\ApiRequestBuilder;

$builder = new ApiRequestBuilder();
$request = $builder
->withProjectKey("projectKey")
->asAssociate()
->withAssociateIdValue("associateId")
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
->shoppingLists()
->withKey("key")
->head();
```
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->withKey("key")->post(null)`

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.


### Example
```php
use Commercetools\Api\Client\ApiRequestBuilder;

$builder = new ApiRequestBuilder();
$request = $builder
->withProjectKey("projectKey")
->asAssociate()
->withAssociateIdValue("associateId")
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
->shoppingLists()
->withKey("key")
->post(null);
```
## `withProjectKey("projectKey")->asAssociate()->withAssociateIdValue("associateId")->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")->shoppingLists()->withKey("key")->delete()`

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.


### Example
```php
use Commercetools\Api\Client\ApiRequestBuilder;

$builder = new ApiRequestBuilder();
$request = $builder
->withProjectKey("projectKey")
->asAssociate()
->withAssociateIdValue("associateId")
->inBusinessUnitKeyWithBusinessUnitKeyValue("businessUnitKey")
->shoppingLists()
->withKey("key")
->delete();
```
## `withProjectKey("projectKey")->associateRoles()->get()`

null
Expand Down
Loading