Package com.commercetools.api.models.me
Interface MyCartSetShippingMethodAction
- All Superinterfaces:
MyCartUpdateAction
,ResourceUpdateAction<MyCartUpdateAction>
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
MyCartSetShippingMethodAction myCartSetShippingMethodAction = MyCartSetShippingMethodAction.builder()
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for MyCartSetShippingMethodAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for MyCartSetShippingMethodActionbuilder
(MyCartSetShippingMethodAction template) create builder for MyCartSetShippingMethodAction instancedeepCopy
(MyCartSetShippingMethodAction template) factory method to create a deep copy of MyCartSetShippingMethodAction@Valid ExternalTaxRateDraft
An external Tax Rate can be set if the Cart has theExternal
TaxMode.Value to set.of()
factory methodof
(MyCartSetShippingMethodAction template) factory method to create a shallow copy MyCartSetShippingMethodActionvoid
setExternalTaxRate
(ExternalTaxRateDraft externalTaxRate) An external Tax Rate can be set if the Cart has theExternal
TaxMode.void
setShippingMethod
(ShippingMethodResourceIdentifier shippingMethod) Value to set.static com.fasterxml.jackson.core.type.TypeReference<MyCartSetShippingMethodAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.me.MyCartUpdateAction
getAction, withMyCartUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
SET_SHIPPING_METHOD
discriminator value for MyCartSetShippingMethodAction- See Also:
-
-
Method Details
-
getShippingMethod
Value to set. If empty, any existing value is removed.
If the referenced Shipping Method 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
External
TaxMode.- Returns:
- externalTaxRate
-
setShippingMethod
Value to set. If empty, any existing value is removed.
If the referenced Shipping Method 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
External
TaxMode.- Parameters:
externalTaxRate
- value to be set
-
of
factory method- Returns:
- instance of MyCartSetShippingMethodAction
-
of
factory method to create a shallow copy MyCartSetShippingMethodAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static MyCartSetShippingMethodAction deepCopy(@Nullable MyCartSetShippingMethodAction template) factory method to create a deep copy of MyCartSetShippingMethodAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for MyCartSetShippingMethodAction- Returns:
- builder
-
builder
create builder for MyCartSetShippingMethodAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withMyCartSetShippingMethodAction
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
-