Interface StagedOrderSetShippingAddressAndShippingMethodAction
- All Superinterfaces:
ResourceUpdateAction<StagedOrderUpdateAction>
,StagedOrderUpdateAction
public interface StagedOrderSetShippingAddressAndShippingMethodAction
extends StagedOrderUpdateAction
Sets the shipping address and Shipping Method together to prevent an inconsistent state.
Example to create an instance using the builder pattern
StagedOrderSetShippingAddressAndShippingMethodAction stagedOrderSetShippingAddressAndShippingMethodAction = StagedOrderSetShippingAddressAndShippingMethodAction.builder()
.address(addressBuilder -> addressBuilder)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
discriminator value for StagedOrderSetShippingAddressAndShippingMethodAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for StagedOrderSetShippingAddressAndShippingMethodActioncreate builder for StagedOrderSetShippingAddressAndShippingMethodAction instancefactory method to create a deep copy of StagedOrderSetShippingAddressAndShippingMethodAction@NotNull @Valid BaseAddress
Value to set forshippingAddress
.@Valid ExternalTaxRateDraft
An external Tax Rate can be set if the Cart has theExternal
TaxMode.Value to set.of()
factory methodfactory method to create a shallow copy StagedOrderSetShippingAddressAndShippingMethodActionvoid
setAddress
(BaseAddress address) Value to set forshippingAddress
.void
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<StagedOrderSetShippingAddressAndShippingMethodAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withStagedOrderSetShippingAddressAndShippingMethodAction
(Function<StagedOrderSetShippingAddressAndShippingMethodAction, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
Methods inherited from interface com.commercetools.api.models.order.StagedOrderUpdateAction
getAction, withStagedOrderUpdateAction
-
Field Details
-
SET_SHIPPING_ADDRESS_AND_SHIPPING_METHOD
discriminator value for StagedOrderSetShippingAddressAndShippingMethodAction- See Also:
-
-
Method Details
-
getAddress
Value to set for
shippingAddress
.- Returns:
- address
-
getShippingMethod
Value to set.
- Returns:
- shippingMethod
-
getExternalTaxRate
An external Tax Rate can be set if the Cart has the
External
TaxMode.- Returns:
- externalTaxRate
-
setAddress
Value to set for
shippingAddress
.- Parameters:
address
- value to be set
-
setShippingMethod
Value to set.
- 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 StagedOrderSetShippingAddressAndShippingMethodAction
-
of
static StagedOrderSetShippingAddressAndShippingMethodAction of(StagedOrderSetShippingAddressAndShippingMethodAction template) factory method to create a shallow copy StagedOrderSetShippingAddressAndShippingMethodAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static StagedOrderSetShippingAddressAndShippingMethodAction deepCopy(@Nullable StagedOrderSetShippingAddressAndShippingMethodAction template) factory method to create a deep copy of StagedOrderSetShippingAddressAndShippingMethodAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for StagedOrderSetShippingAddressAndShippingMethodAction- Returns:
- builder
-
builder
static StagedOrderSetShippingAddressAndShippingMethodActionBuilder builder(StagedOrderSetShippingAddressAndShippingMethodAction template) create builder for StagedOrderSetShippingAddressAndShippingMethodAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withStagedOrderSetShippingAddressAndShippingMethodAction
default <T> T withStagedOrderSetShippingAddressAndShippingMethodAction(Function<StagedOrderSetShippingAddressAndShippingMethodAction, 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<StagedOrderSetShippingAddressAndShippingMethodAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-