Interface StagedOrderSetShippingAddressAndCustomShippingMethodAction
- All Superinterfaces:
ResourceUpdateAction<StagedOrderUpdateAction>,StagedOrderUpdateAction
public interface StagedOrderSetShippingAddressAndCustomShippingMethodAction
extends StagedOrderUpdateAction
Sets the shipping address and a custom Shipping Method together to prevent an inconsistent state.
Example to create an instance using the builder pattern
StagedOrderSetShippingAddressAndCustomShippingMethodAction stagedOrderSetShippingAddressAndCustomShippingMethodAction = StagedOrderSetShippingAddressAndCustomShippingMethodAction.builder()
.address(addressBuilder -> addressBuilder)
.shippingMethodName("{shippingMethodName}")
.shippingRate(shippingRateBuilder -> shippingRateBuilder)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for StagedOrderSetShippingAddressAndCustomShippingMethodAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for StagedOrderSetShippingAddressAndCustomShippingMethodActioncreate builder for StagedOrderSetShippingAddressAndCustomShippingMethodAction instancecopyDeep()factory method to create a deep copy of StagedOrderSetShippingAddressAndCustomShippingMethodAction@NotNull @Valid BaseAddressValue to set forshippingAddress.@Valid CustomFieldsDraftCustom Fields for the custom Shipping Method.@Valid ExternalTaxRateDraftAn external Tax Rate can be set if the Cart has theExternalTaxMode.@NotNull StringValue to set.@NotNull @Valid ShippingRateDraftValue to set.Used to select a Tax Rate when the Order has thePlatformTaxMode.of()factory methodfactory method to create a shallow copy StagedOrderSetShippingAddressAndCustomShippingMethodActionvoidsetAddress(BaseAddress address) Value to set forshippingAddress.voidsetCustom(CustomFieldsDraft custom) Custom Fields for the custom Shipping Method.voidsetExternalTaxRate(ExternalTaxRateDraft externalTaxRate) An external Tax Rate can be set if the Cart has theExternalTaxMode.voidsetShippingMethodName(String shippingMethodName) Value to set.voidsetShippingRate(ShippingRateDraft shippingRate) Value to set.voidsetTaxCategory(TaxCategoryResourceIdentifier taxCategory) Used to select a Tax Rate when the Order has thePlatformTaxMode.static com.fasterxml.jackson.core.type.TypeReference<StagedOrderSetShippingAddressAndCustomShippingMethodAction>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithStagedOrderSetShippingAddressAndCustomShippingMethodAction(Function<StagedOrderSetShippingAddressAndCustomShippingMethodAction, 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_SHIPPING_ADDRESS_AND_CUSTOM_SHIPPING_METHOD
discriminator value for StagedOrderSetShippingAddressAndCustomShippingMethodAction- See Also:
-
-
Method Details
-
getAddress
Value to set for
shippingAddress.- Returns:
- address
-
getShippingMethodName
Value to set.
- Returns:
- shippingMethodName
-
getShippingRate
Value to set.
- Returns:
- shippingRate
-
getTaxCategory
Used to select a Tax Rate when the Order has the
PlatformTaxMode.- Returns:
- taxCategory
-
getExternalTaxRate
An external Tax Rate can be set if the Cart has the
ExternalTaxMode.- Returns:
- externalTaxRate
-
getCustom
Custom Fields for the custom Shipping Method.
- Returns:
- custom
-
setAddress
Value to set for
shippingAddress.- Parameters:
address- value to be set
-
setShippingMethodName
Value to set.
- Parameters:
shippingMethodName- value to be set
-
setShippingRate
Value to set.
- Parameters:
shippingRate- value to be set
-
setTaxCategory
Used to select a Tax Rate when the Order has the
PlatformTaxMode.- Parameters:
taxCategory- value to be set
-
setExternalTaxRate
An external Tax Rate can be set if the Cart has the
ExternalTaxMode.- 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 StagedOrderSetShippingAddressAndCustomShippingMethodAction
-
of
static StagedOrderSetShippingAddressAndCustomShippingMethodAction of(StagedOrderSetShippingAddressAndCustomShippingMethodAction template) factory method to create a shallow copy StagedOrderSetShippingAddressAndCustomShippingMethodAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
- Specified by:
copyDeepin interfaceStagedOrderUpdateAction
-
deepCopy
@Nullable static StagedOrderSetShippingAddressAndCustomShippingMethodAction deepCopy(@Nullable StagedOrderSetShippingAddressAndCustomShippingMethodAction template) factory method to create a deep copy of StagedOrderSetShippingAddressAndCustomShippingMethodAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for StagedOrderSetShippingAddressAndCustomShippingMethodAction- Returns:
- builder
-
builder
static StagedOrderSetShippingAddressAndCustomShippingMethodActionBuilder builder(StagedOrderSetShippingAddressAndCustomShippingMethodAction template) create builder for StagedOrderSetShippingAddressAndCustomShippingMethodAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withStagedOrderSetShippingAddressAndCustomShippingMethodAction
default <T> T withStagedOrderSetShippingAddressAndCustomShippingMethodAction(Function<StagedOrderSetShippingAddressAndCustomShippingMethodAction, 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<StagedOrderSetShippingAddressAndCustomShippingMethodAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-