Interface StagedOrderSetCustomShippingMethodAction
- All Superinterfaces:
ResourceUpdateAction<StagedOrderUpdateAction>,StagedOrderUpdateAction
To set the Cart's custom Shipping Method (independent of the ShippingMethods managed through the Shipping Methods API) the Cart must have the Single ShippingMode and a shippingAddress.
To unset a custom Shipping Method on a Cart, use the Set ShippingMethod update action without the shippingMethod field instead.
Example to create an instance using the builder pattern
StagedOrderSetCustomShippingMethodAction stagedOrderSetCustomShippingMethodAction = StagedOrderSetCustomShippingMethodAction.builder()
.shippingMethodName("{shippingMethodName}")
.shippingRate(shippingRateBuilder -> shippingRateBuilder)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for StagedOrderSetCustomShippingMethodAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for StagedOrderSetCustomShippingMethodActioncreate builder for StagedOrderSetCustomShippingMethodAction instancecopyDeep()factory method to create a deep copy of StagedOrderSetCustomShippingMethodAction@Valid CustomFieldsDraftCustom Fields for the custom Shipping Method.@Valid ExternalTaxRateDraft@NotNull StringName of the custom Shipping Method.@NotNull @Valid ShippingRateDraftDetermines the shipping price.Tax Category used to determine the Tax Rate when the Cart has thePlatformTaxMode.of()factory methodof(StagedOrderSetCustomShippingMethodAction template) factory method to create a shallow copy StagedOrderSetCustomShippingMethodActionvoidsetCustom(CustomFieldsDraft custom) Custom Fields for the custom Shipping Method.voidsetExternalTaxRate(ExternalTaxRateDraft externalTaxRate) voidsetShippingMethodName(String shippingMethodName) Name of the custom Shipping Method.voidsetShippingRate(ShippingRateDraft shippingRate) Determines the shipping price.voidsetTaxCategory(TaxCategoryResourceIdentifier taxCategory) Tax Category used to determine the Tax Rate when the Cart has thePlatformTaxMode.static com.fasterxml.jackson.core.type.TypeReference<StagedOrderSetCustomShippingMethodAction>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithStagedOrderSetCustomShippingMethodAction(Function<StagedOrderSetCustomShippingMethodAction, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
getMethods inherited from interface com.commercetools.api.models.order.StagedOrderUpdateAction
getAction, withStagedOrderUpdateAction
-
Field Details
-
SET_CUSTOM_SHIPPING_METHOD
discriminator value for StagedOrderSetCustomShippingMethodAction- See Also:
-
-
Method Details
-
getShippingMethodName
Name of the custom Shipping Method.
- Returns:
- shippingMethodName
-
getShippingRate
Determines the shipping price.
- Returns:
- shippingRate
-
getTaxCategory
Tax Category used to determine the Tax Rate when the Cart has the
PlatformTaxMode.- Returns:
- taxCategory
-
getExternalTaxRate
External Tax Rate for the
shippingRateto be set if the Cart has theExternalTaxMode.- Returns:
- externalTaxRate
-
getCustom
Custom Fields for the custom Shipping Method.
- Returns:
- custom
-
setShippingMethodName
Name of the custom Shipping Method.
- Parameters:
shippingMethodName- value to be set
-
setShippingRate
Determines the shipping price.
- Parameters:
shippingRate- value to be set
-
setTaxCategory
Tax Category used to determine the Tax Rate when the Cart has the
PlatformTaxMode.- Parameters:
taxCategory- value to be set
-
setExternalTaxRate
External Tax Rate for the
shippingRateto be set if the Cart has theExternalTaxMode.- Parameters:
externalTaxRate- value to be set
-
setCustom
Custom Fields for the custom Shipping Method.
- Parameters:
custom- value to be set
-
of
factory method- Returns:
- instance of StagedOrderSetCustomShippingMethodAction
-
of
static StagedOrderSetCustomShippingMethodAction of(StagedOrderSetCustomShippingMethodAction template) factory method to create a shallow copy StagedOrderSetCustomShippingMethodAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
StagedOrderSetCustomShippingMethodAction copyDeep()- Specified by:
copyDeepin interfaceStagedOrderUpdateAction
-
deepCopy
@Nullable static StagedOrderSetCustomShippingMethodAction deepCopy(@Nullable StagedOrderSetCustomShippingMethodAction template) factory method to create a deep copy of StagedOrderSetCustomShippingMethodAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for StagedOrderSetCustomShippingMethodAction- Returns:
- builder
-
builder
static StagedOrderSetCustomShippingMethodActionBuilder builder(StagedOrderSetCustomShippingMethodAction template) create builder for StagedOrderSetCustomShippingMethodAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withStagedOrderSetCustomShippingMethodAction
default <T> T withStagedOrderSetCustomShippingMethodAction(Function<StagedOrderSetCustomShippingMethodAction, T> helper) accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<StagedOrderSetCustomShippingMethodAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-