Package com.commercetools.api.models.me
Interface MyCartRecalculateAction
- All Superinterfaces:
MyCartUpdateAction,ResourceUpdateAction<MyCartUpdateAction>
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
MyCartRecalculateAction myCartRecalculateAction = MyCartRecalculateAction.builder()
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for MyCartRecalculateAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for MyCartRecalculateActionbuilder(MyCartRecalculateAction template) create builder for MyCartRecalculateAction instancecopyDeep()static MyCartRecalculateActiondeepCopy(MyCartRecalculateAction template) factory method to create a deep copy of MyCartRecalculateActionLeave empty or set tofalseto only update the Prices and TaxRates of the Line Items. Set totrueto update the Line Items' product data (likename,variantandproductType) also.static MyCartRecalculateActionof()factory methodstatic MyCartRecalculateActionof(MyCartRecalculateAction template) factory method to create a shallow copy MyCartRecalculateActionvoidsetUpdateProductData(Boolean updateProductData) Leave empty or set tofalseto only update the Prices and TaxRates of the Line Items. Set totrueto update the Line Items' product data (likename,variantandproductType) also.static com.fasterxml.jackson.core.type.TypeReference<MyCartRecalculateAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.me.MyCartUpdateAction
getAction, withMyCartUpdateActionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
RECALCULATE
discriminator value for MyCartRecalculateAction- See Also:
-
-
Method Details
-
getUpdateProductData
Boolean getUpdateProductData()- Leave empty or set to
falseto only update the Prices and TaxRates of the Line Items. - Set to
trueto update the Line Items' product data (likename,variantandproductType) also.
- Returns:
- updateProductData
- Leave empty or set to
-
setUpdateProductData
- Leave empty or set to
falseto only update the Prices and TaxRates of the Line Items. - Set to
trueto update the Line Items' product data (likename,variantandproductType) also.
- Parameters:
updateProductData- value to be set
- Leave empty or set to
-
of
factory method- Returns:
- instance of MyCartRecalculateAction
-
of
factory method to create a shallow copy MyCartRecalculateAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
MyCartRecalculateAction copyDeep()- Specified by:
copyDeepin interfaceMyCartUpdateAction
-
deepCopy
factory method to create a deep copy of MyCartRecalculateAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for MyCartRecalculateAction- Returns:
- builder
-
builder
create builder for MyCartRecalculateAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withMyCartRecalculateAction
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
-