Package com.commercetools.api.client
Class ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost
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<ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost,Cart,ReplicaCartDraft>
com.commercetools.api.client.ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost
- All Implemented Interfaces:
ErrorableTrait<ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost>,ClientRequestCommand<Cart>,CreateHttpRequestCommand,HttpRequestCommand<Cart>,RequestCommand<Cart>
public class ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost
extends TypeBodyApiMethod<ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost,Cart,ReplicaCartDraft>
implements ErrorableTrait<ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost>
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
customerGroupfield (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
customerGroupAssignmentsfield (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:
CompletableFuture<ApiHttpResponse<com.commercetools.api.models.cart.Cart>> result = apiRoot
.withProjectKey("{projectKey}")
.inStoreKeyWithStoreKeyValue("{storeKey}")
.carts()
.replicate()
.post(null)
.execute()
-
Nested Class Summary
Nested classes/interfaces inherited from class io.vrap.rmf.base.client.ApiMethod
ApiMethod.ParamEntry<K,V> -
Constructor Summary
ConstructorsConstructorDescriptionByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost(ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost t) ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost(ApiHttpClient apiHttpClient, String projectKey, String storeKey, ReplicaCartDraft replicaCartDraft) -
Method Summary
Modifier and TypeMethodDescriptionbooleanexecute(ApiHttpClient client) executeBlocking(ApiHttpClient client, Duration timeout) getBody()inthashCode()intcom.fasterxml.jackson.core.type.TypeReference<Cart>voidsetProjectKey(String projectKey) voidsetStoreKey(String storeKey) toString()withBody(ReplicaCartDraft replicaCartDraft) 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, withQueryParamsMethods inherited from interface io.vrap.rmf.base.client.ClientRequestCommand
executeBlockingMethods inherited from interface io.vrap.rmf.base.client.CreateHttpRequestCommand
createHttpRequestMethods inherited from interface com.commercetools.api.client.ErrorableTrait
asErrorableTrait, asErrorableTraitToBaseTypeMethods inherited from interface io.vrap.rmf.base.client.RequestCommand
executeBlocking
-
Constructor Details
-
ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost
public ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost(ApiHttpClient apiHttpClient, String projectKey, String storeKey, ReplicaCartDraft replicaCartDraft) -
ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost
public ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost(ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost t)
-
-
Method Details
-
resultType
- Specified by:
resultTypein interfaceHttpRequestCommand<Cart>
-
executeBlocking
- Specified by:
executeBlockingin interfaceClientRequestCommand<Cart>- Specified by:
executeBlockingin classApiMethod<ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost,Cart>
-
execute
- Specified by:
executein interfaceClientRequestCommand<Cart>- Specified by:
executein classApiMethod<ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost,Cart>
-
getProjectKey
-
getStoreKey
-
setProjectKey
-
setStoreKey
-
getBody
- Overrides:
getBodyin classTypeBodyApiMethod<ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost,Cart, ReplicaCartDraft>
-
withBody
public ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost withBody(ReplicaCartDraft replicaCartDraft) - Overrides:
withBodyin classTypeBodyApiMethod<ByProjectKeyInStoreKeyByStoreKeyCartsReplicatePost,Cart, ReplicaCartDraft>
-
equals
-
hashCode
public int hashCode() -
toString
-
reflectionHashCode
public int reflectionHashCode()
-