Interface CartRecalculateAction
- All Superinterfaces:
CartUpdateAction
,ResourceUpdateAction<CartUpdateAction>
This update action does not set any Cart field in particular, but it triggers several Cart updates to bring prices and discounts to the latest state. Those can become stale over time when no Cart updates have been performed for a while and prices on related Products have changed in the meanwhile.
If the priceMode
of the Product related to a Line Item is of Embedded
ProductPriceMode, the updated price
of that LineItem may not correspond to a Price in the variant.prices
anymore.
Example to create an instance using the builder pattern
CartRecalculateAction cartRecalculateAction = CartRecalculateAction.builder()
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
discriminator value for CartRecalculateAction -
Method Summary
Modifier and TypeMethodDescriptionstatic CartRecalculateActionBuilder
builder()
builder factory method for CartRecalculateActionstatic CartRecalculateActionBuilder
builder
(CartRecalculateAction template) create builder for CartRecalculateAction instancecopyDeep()
static CartRecalculateAction
deepCopy
(CartRecalculateAction template) factory method to create a deep copy of CartRecalculateActionLeave empty or set asfalse
to update only the Prices and TaxRates of the Line Items. Set astrue
to update the Product data (such asname
,variant
,productType
, and Product Attributes) of the Line Items.static CartRecalculateAction
of()
factory methodstatic CartRecalculateAction
of
(CartRecalculateAction template) factory method to create a shallow copy CartRecalculateActionvoid
setUpdateProductData
(Boolean updateProductData) Leave empty or set asfalse
to update only the Prices and TaxRates of the Line Items. Set astrue
to update the Product data (such asname
,variant
,productType
, and Product Attributes) of the Line Items.static com.fasterxml.jackson.core.type.TypeReference<CartRecalculateAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.cart.CartUpdateAction
getAction, withCartUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
RECALCULATE
discriminator value for CartRecalculateAction- See Also:
-
-
Method Details
-
getUpdateProductData
Boolean getUpdateProductData()- Leave empty or set as
false
to update only the Prices and TaxRates of the Line Items. - Set as
true
to update the Product data (such asname
,variant
,productType
, and Product Attributes) of the Line Items.
- Returns:
- updateProductData
- Leave empty or set as
-
setUpdateProductData
- Leave empty or set as
false
to update only the Prices and TaxRates of the Line Items. - Set as
true
to update the Product data (such asname
,variant
,productType
, and Product Attributes) of the Line Items.
- Parameters:
updateProductData
- value to be set
- Leave empty or set as
-
of
factory method- Returns:
- instance of CartRecalculateAction
-
of
factory method to create a shallow copy CartRecalculateAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
copyDeep
CartRecalculateAction copyDeep()- Specified by:
copyDeep
in interfaceCartUpdateAction
-
deepCopy
factory method to create a deep copy of CartRecalculateAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartRecalculateAction- Returns:
- builder
-
builder
create builder for CartRecalculateAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCartRecalculateAction
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-