Class StagedOrderSetShippingMethodActionBuilder
- All Implemented Interfaces:
Builder<StagedOrderSetShippingMethodAction>
Example to create an instance using the builder pattern
StagedOrderSetShippingMethodAction stagedOrderSetShippingMethodAction = StagedOrderSetShippingMethodAction.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds StagedOrderSetShippingMethodAction with checking for non-null required valuesbuilds StagedOrderSetShippingMethodAction without checking for non-null required valuesexternalTaxRate
(ExternalTaxRateDraft externalTaxRate) An external Tax Rate can be set if the Cart has theExternal
TaxMode.An external Tax Rate can be set if the Cart has theExternal
TaxMode.An external Tax Rate can be set if the Cart has theExternal
TaxMode.Value to set.of()
factory method for an instance of StagedOrderSetShippingMethodActionBuilderof
(StagedOrderSetShippingMethodAction template) create builder for StagedOrderSetShippingMethodAction instanceshippingMethod
(ShippingMethodResourceIdentifier shippingMethod) Value to set.shippingMethod
(Function<ShippingMethodResourceIdentifierBuilder, ShippingMethodResourceIdentifierBuilder> builder) Value to set.An external Tax Rate can be set if the Cart has theExternal
TaxMode.withShippingMethod
(Function<ShippingMethodResourceIdentifierBuilder, ShippingMethodResourceIdentifier> builder) Value to set.
-
Constructor Details
-
StagedOrderSetShippingMethodActionBuilder
public StagedOrderSetShippingMethodActionBuilder()
-
-
Method Details
-
shippingMethod
public StagedOrderSetShippingMethodActionBuilder shippingMethod(Function<ShippingMethodResourceIdentifierBuilder, ShippingMethodResourceIdentifierBuilder> builder) Value to set. If empty, any existing value will be removed. If the referenced Shipping Method has a predicate that does not match the Cart, an InvalidOperation error is returned.
- Parameters:
builder
- function to build the shippingMethod value- Returns:
- Builder
-
withShippingMethod
public StagedOrderSetShippingMethodActionBuilder withShippingMethod(Function<ShippingMethodResourceIdentifierBuilder, ShippingMethodResourceIdentifier> builder) Value to set. If empty, any existing value will be removed. If the referenced Shipping Method has a predicate that does not match the Cart, an InvalidOperation error is returned.
- Parameters:
builder
- function to build the shippingMethod value- Returns:
- Builder
-
shippingMethod
public StagedOrderSetShippingMethodActionBuilder shippingMethod(@Nullable ShippingMethodResourceIdentifier shippingMethod) Value to set. If empty, any existing value will be 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- Returns:
- Builder
-
externalTaxRate
public StagedOrderSetShippingMethodActionBuilder externalTaxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraftBuilder> builder) An external Tax Rate can be set if the Cart has the
External
TaxMode.- Parameters:
builder
- function to build the externalTaxRate value- Returns:
- Builder
-
withExternalTaxRate
public StagedOrderSetShippingMethodActionBuilder withExternalTaxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraft> builder) An external Tax Rate can be set if the Cart has the
External
TaxMode.- Parameters:
builder
- function to build the externalTaxRate value- Returns:
- Builder
-
externalTaxRate
public StagedOrderSetShippingMethodActionBuilder externalTaxRate(@Nullable ExternalTaxRateDraft externalTaxRate) An external Tax Rate can be set if the Cart has the
External
TaxMode.- Parameters:
externalTaxRate
- value to be set- Returns:
- Builder
-
getShippingMethod
Value to set. If empty, any existing value will be 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
-
build
builds StagedOrderSetShippingMethodAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<StagedOrderSetShippingMethodAction>
- Returns:
- StagedOrderSetShippingMethodAction
-
buildUnchecked
builds StagedOrderSetShippingMethodAction without checking for non-null required values- Returns:
- StagedOrderSetShippingMethodAction
-
of
factory method for an instance of StagedOrderSetShippingMethodActionBuilder- Returns:
- builder
-
of
public static StagedOrderSetShippingMethodActionBuilder of(StagedOrderSetShippingMethodAction template) create builder for StagedOrderSetShippingMethodAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-