Interface CartSetShippingAddressAction
- All Superinterfaces:
CartUpdateAction,ResourceUpdateAction<CartUpdateAction>
Setting the shipping address also sets the TaxRate of Line Items and calculates the TaxedPrice.
If a matching price cannot be found for the given shipping address during Line Item price selection, a MissingTaxRateForCountry error is returned.
If you want to allow shipping to states inside a country that are not explicitly covered by a TaxRate, set the countryTaxRateFallbackEnabled field to true in the CartsConfiguration by using the Change CountryTaxRateFallbackEnabled update action.
Example to create an instance using the builder pattern
CartSetShippingAddressAction cartSetShippingAddressAction = CartSetShippingAddressAction.builder()
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for CartSetShippingAddressAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for CartSetShippingAddressActionbuilder(CartSetShippingAddressAction template) create builder for CartSetShippingAddressAction instancecopyDeep()static CartSetShippingAddressActiondeepCopy(CartSetShippingAddressAction template) factory method to create a deep copy of CartSetShippingAddressAction@Valid BaseAddressValue to set.static CartSetShippingAddressActionof()factory methodstatic CartSetShippingAddressActionof(CartSetShippingAddressAction template) factory method to create a shallow copy CartSetShippingAddressActionvoidsetAddress(BaseAddress address) Value to set.static tools.jackson.core.type.TypeReference<CartSetShippingAddressAction>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_SHIPPING_ADDRESS
discriminator value for CartSetShippingAddressAction- See Also:
-
-
Method Details
-
getAddress
Value to set. It replaces the entire address, including Custom Fields if
customis not included. To preserve Custom Fields, include thecustomobject in the request.If not set, the shipping address is unset, and the
taxedPriceandtaxRateare unset in all Line Items of the Cart.- Returns:
- address
-
setAddress
Value to set. It replaces the entire address, including Custom Fields if
customis not included. To preserve Custom Fields, include thecustomobject in the request.If not set, the shipping address is unset, and the
taxedPriceandtaxRateare unset in all Line Items of the Cart.- Parameters:
address- value to be set
-
of
factory method- Returns:
- instance of CartSetShippingAddressAction
-
of
factory method to create a shallow copy CartSetShippingAddressAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CartSetShippingAddressAction copyDeep()- Specified by:
copyDeepin interfaceCartUpdateAction
-
deepCopy
@Nullable static CartSetShippingAddressAction deepCopy(@Nullable CartSetShippingAddressAction template) factory method to create a deep copy of CartSetShippingAddressAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartSetShippingAddressAction- Returns:
- builder
-
builder
create builder for CartSetShippingAddressAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCartSetShippingAddressAction
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
-