Package com.commercetools.api.client
Class ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePostString
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<T,TResult,String>
io.vrap.rmf.base.client.StringBodyApiMethod<ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePostString,Cart>
com.commercetools.api.client.ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePostString
- All Implemented Interfaces:
ErrorableTrait<ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePostString>
,ClientRequestCommand<Cart>
,CreateHttpRequestCommand
,HttpRequestCommand<Cart>
,RequestCommand<Cart>
public class ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePostString
extends StringBodyApiMethod<ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePostString,Cart>
implements ErrorableTrait<ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePostString>
Creates a new Cart in a Store by replicating an existing Cart or Order.
The following applies to the new Cart:
- It contains the same Customer information, Line Items and Custom Line Items, Custom Fields, Discount Codes, and other settings of the originating Cart or Order.
- If a Line Item becomes invalid, it is removed from the new Cart. A common reason for this is removed Products or Prices.
- Line items and Custom Line Items are reset to their initial state.
- It contains no payments or delivery information.
- It contains up-to-date Tax Rates, Prices, and Line Item product data.
- The CartState is
Active
. - If using the
customerGroup
field (for a single Customer Group) and the referenced Customer switched to another Customer Group, the new Cart is automatically updated to reflect the new group and corresponding prices. - If using the
customerGroupAssignments
field (for multiple Customer Groups), the Cart no longer keeps a direct reference to a Customer Group. If a Customer’s group assignments change, the Cart and its Line Item prices are not updated automatically. Prices are only updated when the Cart is changed via a direct update action.
Specific Error Codes:
- MatchingPriceNotFound
- MissingTaxRateForCountry
CompletableFuture<ApiHttpResponse<com.commercetools.api.models.cart.Cart>> result = apiRoot
.withProjectKey("{projectKey}")
.inStoreKeyWithStoreKeyValue("{storeKey}")
.carts()
.replicate()
.post("")
.execute()
-
Nested Class Summary
Nested classes/interfaces inherited from class io.vrap.rmf.base.client.ApiMethod
ApiMethod.ParamEntry<K,
V> -
Constructor Summary
ConstructorsConstructorDescriptionByProjectKeyInStoreKeyByStoreKeyCartsReplicatePostString
(ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePostString t) ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePostString
(ApiHttpClient apiHttpClient, String projectKey, String storeKey, String replicaCartDraft) -
Method Summary
Modifier and TypeMethodDescriptionboolean
execute
(ApiHttpClient client) executeBlocking
(ApiHttpClient client, Duration timeout) getBody()
int
hashCode()
int
com.fasterxml.jackson.core.type.TypeReference<Cart>
void
setProjectKey
(String projectKey) void
setStoreKey
(String storeKey) toString()
Methods inherited from class io.vrap.rmf.base.client.ApiMethod
addHeader, addQueryParam, addQueryParams, contentType, createHttpRequest, execute, execute, execute, execute, execute, execute, execute, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, getFirstQueryParam, getHeaders, getQueryParam, getQueryParams, getQueryParamUriString, getQueryParamUriStrings, send, sendBlocking, sendBlocking, with, with, withHeader, withHeaders, withHttpRequest, withoutHeader, withoutQueryParam, withQueryParam, withQueryParams
Methods inherited from interface io.vrap.rmf.base.client.ClientRequestCommand
executeBlocking
Methods inherited from interface io.vrap.rmf.base.client.CreateHttpRequestCommand
createHttpRequest
Methods inherited from interface com.commercetools.api.client.ErrorableTrait
asErrorableTrait, asErrorableTraitToBaseType
Methods inherited from interface io.vrap.rmf.base.client.RequestCommand
executeBlocking
-
Constructor Details
-
ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePostString
public ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePostString(ApiHttpClient apiHttpClient, String projectKey, String storeKey, String replicaCartDraft) -
ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePostString
public ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePostString(ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePostString t)
-
-
Method Details
-
resultType
- Specified by:
resultType
in interfaceHttpRequestCommand<Cart>
-
executeBlocking
- Specified by:
executeBlocking
in interfaceClientRequestCommand<Cart>
- Specified by:
executeBlocking
in classApiMethod<ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePostString,
Cart>
-
execute
- Specified by:
execute
in interfaceClientRequestCommand<Cart>
- Specified by:
execute
in classApiMethod<ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePostString,
Cart>
-
getProjectKey
-
getStoreKey
-
setProjectKey
-
setStoreKey
-
getBody
- Overrides:
getBody
in classStringBodyApiMethod<ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePostString,
Cart>
-
withBody
- Overrides:
withBody
in classStringBodyApiMethod<ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePostString,
Cart>
-
equals
-
hashCode
public int hashCode() -
toString
-
reflectionHashCode
public int reflectionHashCode()
-