Class ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost

All Implemented Interfaces:
ErrorableTrait<ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost>, ClientRequestCommand<Cart>, CreateHttpRequestCommand, HttpRequestCommand<Cart>, RequestCommand<Cart>

Merges items from an anonymous Cart into the most recently modified active Cart of a Customer. If no active Cart exists, the anonymous Cart becomes the Customer's active Cart.

If the Cart exists in the Project but does not have a store specified, or the store field references a different Store, a ResourceNotFound error is returned.

For more information, see Merge behavior.



   CompletableFuture<ApiHttpResponse<com.commercetools.api.models.cart.Cart>> result = apiRoot
            .withProjectKey("{projectKey}")
            .inStoreKeyWithStoreKeyValue("{storeKey}")
            .carts()
            .customerIdWithCustomerIdValueMerge("{customerId}")
            .post(null)
            .execute()