Class ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsPost

java.lang.Object
io.vrap.rmf.base.client.ApiMethod<T,TResult>
io.vrap.rmf.base.client.BodyApiMethod<T,TResult,TBody>
io.vrap.rmf.base.client.TypeBodyApiMethod<ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsPost,Cart,CartDraft>
com.commercetools.api.client.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsPost
All Implemented Interfaces:
Deprecatable201Trait<ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsPost>, ErrorableTrait<ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsPost>, ExpandableTrait<ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsPost>, io.vrap.rmf.base.client.ClientRequestCommand<Cart>, io.vrap.rmf.base.client.CreateHttpRequestCommand, io.vrap.rmf.base.client.HttpRequestCommand<Cart>, io.vrap.rmf.base.client.RequestCommand<Cart>

Creates a Cart in the BusinessUnit referenced by businessUnitKey. As such, the businessUnit field on CartDraft is ignored for this request. Creating a Cart can fail with an InvalidOperation if the referenced ShippingMethod in the CartDraft has a predicate that does not match the Cart.



   CompletableFuture<ApiHttpResponse<com.commercetools.api.models.cart.Cart>> result = apiRoot
            .withProjectKey("{projectKey}")
            .asAssociate()
            .withAssociateIdValue("{associateId}")
            .inBusinessUnitKeyWithBusinessUnitKeyValue("{businessUnitKey}")
            .carts()
            .post(null)
            .execute()