Interface CartAddShippingMethodAction
- All Superinterfaces:
CartUpdateAction
,ResourceUpdateAction<CartUpdateAction>
Adds a Shipping Method for a specified shipping address to a Cart with Multiple
ShippingMode.
Example to create an instance using the builder pattern
CartAddShippingMethodAction cartAddShippingMethodAction = CartAddShippingMethodAction.builder()
.shippingKey("{shippingKey}")
.shippingMethod(shippingMethodBuilder -> shippingMethodBuilder)
.shippingAddress(shippingAddressBuilder -> shippingAddressBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for CartAddShippingMethodAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for CartAddShippingMethodActionbuilder
(CartAddShippingMethodAction template) create builder for CartAddShippingMethodAction instancestatic CartAddShippingMethodAction
deepCopy
(CartAddShippingMethodAction template) factory method to create a deep copy of CartAddShippingMethodAction@Valid CustomFieldsDraft
Custom Fields for the Shipping Method.@Valid List<DeliveryDraft>
Deliveries to be shipped with the referenced Shipping Method.@Valid ExternalTaxRateDraft
Tax Rate used to tax a shipping expense if the Cart has theExternal
TaxMode.@NotNull @Valid BaseAddress
Determines the shipping rate and Tax Rate of the Line Items.@NotNull String
User-defined identifier for the Shipping that must be unique across the Cart withMultiple
ShippingMode.@NotNull @Valid ShippingMethodResourceIdentifier
RecourceIdentifier to a ShippingMethod to add to the Cart withMultiple
ShippingMode.@Valid ShippingRateInputDraft
Input used to select a ShippingRatePriceTier.static CartAddShippingMethodAction
of()
factory methodstatic CartAddShippingMethodAction
of
(CartAddShippingMethodAction template) factory method to create a shallow copy CartAddShippingMethodActionvoid
setCustom
(CustomFieldsDraft custom) Custom Fields for the Shipping Method.void
setDeliveries
(DeliveryDraft... deliveries) Deliveries to be shipped with the referenced Shipping Method.void
setDeliveries
(List<DeliveryDraft> deliveries) Deliveries to be shipped with the referenced Shipping Method.void
setExternalTaxRate
(ExternalTaxRateDraft externalTaxRate) Tax Rate used to tax a shipping expense if the Cart has theExternal
TaxMode.void
setShippingAddress
(BaseAddress shippingAddress) Determines the shipping rate and Tax Rate of the Line Items.void
setShippingKey
(String shippingKey) User-defined identifier for the Shipping that must be unique across the Cart withMultiple
ShippingMode.void
setShippingMethod
(ShippingMethodResourceIdentifier shippingMethod) RecourceIdentifier to a ShippingMethod to add to the Cart withMultiple
ShippingMode.void
setShippingRateInput
(ShippingRateInputDraft shippingRateInput) Input used to select a ShippingRatePriceTier.static com.fasterxml.jackson.core.type.TypeReference<CartAddShippingMethodAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.cart.CartUpdateAction
getAction, withCartUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
ADD_SHIPPING_METHOD
discriminator value for CartAddShippingMethodAction- See Also:
-
-
Method Details
-
getShippingKey
User-defined identifier for the Shipping that must be unique across the Cart with
Multiple
ShippingMode.- Returns:
- shippingKey
-
getShippingMethod
RecourceIdentifier to a ShippingMethod to add to the Cart with
Multiple
ShippingMode. If the referenced Shipping Method has a predicate that does not match the Cart, an InvalidOperation error is returned.- Returns:
- shippingMethod
-
getShippingAddress
Determines the shipping rate and Tax Rate of the Line Items.
- Returns:
- shippingAddress
-
getShippingRateInput
Input used to select a ShippingRatePriceTier. The data type of this field depends on the
shippingRateInputType.type
configured in the Project:- If
CartClassification
, it must be ClassificationShippingRateInputDraft. - If
CartScore
, it must be ScoreShippingRateInputDraft. - If
CartValue
, it cannot be set.
- Returns:
- shippingRateInput
- If
-
getExternalTaxRate
Tax Rate used to tax a shipping expense if the Cart has the
External
TaxMode.- Returns:
- externalTaxRate
-
getDeliveries
Deliveries to be shipped with the referenced Shipping Method.
- Returns:
- deliveries
-
getCustom
Custom Fields for the Shipping Method.
- Returns:
- custom
-
setShippingKey
User-defined identifier for the Shipping that must be unique across the Cart with
Multiple
ShippingMode.- Parameters:
shippingKey
- value to be set
-
setShippingMethod
RecourceIdentifier to a ShippingMethod to add to the Cart with
Multiple
ShippingMode. 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
-
setShippingAddress
Determines the shipping rate and Tax Rate of the Line Items.
- Parameters:
shippingAddress
- value to be set
-
setShippingRateInput
Input used to select a ShippingRatePriceTier. The data type of this field depends on the
shippingRateInputType.type
configured in the Project:- If
CartClassification
, it must be ClassificationShippingRateInputDraft. - If
CartScore
, it must be ScoreShippingRateInputDraft. - If
CartValue
, it cannot be set.
- Parameters:
shippingRateInput
- value to be set
- If
-
setExternalTaxRate
Tax Rate used to tax a shipping expense if the Cart has the
External
TaxMode.- Parameters:
externalTaxRate
- value to be set
-
setDeliveries
Deliveries to be shipped with the referenced Shipping Method.
- Parameters:
deliveries
- values to be set
-
setDeliveries
Deliveries to be shipped with the referenced Shipping Method.
- Parameters:
deliveries
- values to be set
-
setCustom
Custom Fields for the Shipping Method.
- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of CartAddShippingMethodAction
-
of
factory method to create a shallow copy CartAddShippingMethodAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static CartAddShippingMethodAction deepCopy(@Nullable CartAddShippingMethodAction template) factory method to create a deep copy of CartAddShippingMethodAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartAddShippingMethodAction- Returns:
- builder
-
builder
create builder for CartAddShippingMethodAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCartAddShippingMethodAction
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
-