Interface CartSetCartTotalTaxAction
- All Superinterfaces:
CartUpdateAction,ResourceUpdateAction<CartUpdateAction>
Can be used if the Cart has the ExternalAmount TaxMode. This update action adds the taxedPrice field to the Cart. It sets the totalGross amount, and Composable Commerce calculates the totalNet and totalTax values based on the provided externalTotalGross. You must use this update action after any price-affecting change occurs within the Cart.
Example to create an instance using the builder pattern
CartSetCartTotalTaxAction cartSetCartTotalTaxAction = CartSetCartTotalTaxAction.builder()
.externalTotalGross(externalTotalGrossBuilder -> externalTotalGrossBuilder)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for CartSetCartTotalTaxAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for CartSetCartTotalTaxActionbuilder(CartSetCartTotalTaxAction template) create builder for CartSetCartTotalTaxAction instancecopyDeep()static CartSetCartTotalTaxActiondeepCopy(CartSetCartTotalTaxAction template) factory method to create a deep copy of CartSetCartTotalTaxAction@Valid List<TaxPortionDraft>Set if theexternalTotalGrossprice is a sum of portions with different tax rates.@NotNull @Valid MoneyThe total gross amount of the Cart, including tax.static CartSetCartTotalTaxActionof()factory methodstatic CartSetCartTotalTaxActionof(CartSetCartTotalTaxAction template) factory method to create a shallow copy CartSetCartTotalTaxActionvoidsetExternalTaxPortions(TaxPortionDraft... externalTaxPortions) Set if theexternalTotalGrossprice is a sum of portions with different tax rates.voidsetExternalTaxPortions(List<TaxPortionDraft> externalTaxPortions) Set if theexternalTotalGrossprice is a sum of portions with different tax rates.voidsetExternalTotalGross(Money externalTotalGross) The total gross amount of the Cart, including tax.static com.fasterxml.jackson.core.type.TypeReference<CartSetCartTotalTaxAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.cart.CartUpdateAction
getAction, withCartUpdateActionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
SET_CART_TOTAL_TAX
discriminator value for CartSetCartTotalTaxAction- See Also:
-
-
Method Details
-
getExternalTotalGross
The total gross amount of the Cart, including tax. This value is used to calculate the
totalNetandtotalTaxfields of the Cart'staxedPrice.- Returns:
- externalTotalGross
-
getExternalTaxPortions
Set if the
externalTotalGrossprice is a sum of portions with different tax rates.- Returns:
- externalTaxPortions
-
setExternalTotalGross
The total gross amount of the Cart, including tax. This value is used to calculate the
totalNetandtotalTaxfields of the Cart'staxedPrice.- Parameters:
externalTotalGross- value to be set
-
setExternalTaxPortions
Set if the
externalTotalGrossprice is a sum of portions with different tax rates.- Parameters:
externalTaxPortions- values to be set
-
setExternalTaxPortions
Set if the
externalTotalGrossprice is a sum of portions with different tax rates.- Parameters:
externalTaxPortions- values to be set
-
of
factory method- Returns:
- instance of CartSetCartTotalTaxAction
-
of
factory method to create a shallow copy CartSetCartTotalTaxAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CartSetCartTotalTaxAction copyDeep()- Specified by:
copyDeepin interfaceCartUpdateAction
-
deepCopy
factory method to create a deep copy of CartSetCartTotalTaxAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartSetCartTotalTaxAction- Returns:
- builder
-
builder
create builder for CartSetCartTotalTaxAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCartSetCartTotalTaxAction
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
-