Interface CartSetShippingMethodAction
- All Superinterfaces:
CartUpdateAction,ResourceUpdateAction<CartUpdateAction>
To set the Cart's Shipping Method the Cart must have the Single ShippingMode and a shippingAddress.
Example to create an instance using the builder pattern
CartSetShippingMethodAction cartSetShippingMethodAction = CartSetShippingMethodAction.builder()
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for CartSetShippingMethodAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for CartSetShippingMethodActionbuilder(CartSetShippingMethodAction template) create builder for CartSetShippingMethodAction instancecopyDeep()static CartSetShippingMethodActiondeepCopy(CartSetShippingMethodAction template) factory method to create a deep copy of CartSetShippingMethodAction@Valid ExternalTaxRateDraftAn external Tax Rate can be set if the Cart has theExternalTaxMode.Value to set.static CartSetShippingMethodActionof()factory methodstatic CartSetShippingMethodActionof(CartSetShippingMethodAction template) factory method to create a shallow copy CartSetShippingMethodActionvoidsetExternalTaxRate(ExternalTaxRateDraft externalTaxRate) An external Tax Rate can be set if the Cart has theExternalTaxMode.voidsetShippingMethod(ShippingMethodResourceIdentifier shippingMethod) Value to set.static com.fasterxml.jackson.core.type.TypeReference<CartSetShippingMethodAction>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_METHOD
discriminator value for CartSetShippingMethodAction- See Also:
-
-
Method Details
-
getShippingMethod
Value to set. If empty, any existing value is removed.
If the referenced Shipping Method is inactive, or has a predicate that does not match the Cart, an InvalidOperation error is returned.
- Returns:
- shippingMethod
-
getExternalTaxRate
An external Tax Rate can be set if the Cart has the
ExternalTaxMode.- Returns:
- externalTaxRate
-
setShippingMethod
Value to set. If empty, any existing value is removed.
If the referenced Shipping Method is inactive, or has a predicate that does not match the Cart, an InvalidOperation error is returned.
- Parameters:
shippingMethod- value to be set
-
setExternalTaxRate
An external Tax Rate can be set if the Cart has the
ExternalTaxMode.- Parameters:
externalTaxRate- value to be set
-
of
factory method- Returns:
- instance of CartSetShippingMethodAction
-
of
factory method to create a shallow copy CartSetShippingMethodAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CartSetShippingMethodAction copyDeep()- Specified by:
copyDeepin interfaceCartUpdateAction
-
deepCopy
@Nullable static CartSetShippingMethodAction deepCopy(@Nullable CartSetShippingMethodAction template) factory method to create a deep copy of CartSetShippingMethodAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartSetShippingMethodAction- Returns:
- builder
-
builder
create builder for CartSetShippingMethodAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCartSetShippingMethodAction
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
-