Class CartSetShippingMethodActionBuilder
- All Implemented Interfaces:
Builder<CartSetShippingMethodAction>
Example to create an instance using the builder pattern
CartSetShippingMethodAction cartSetShippingMethodAction = CartSetShippingMethodAction.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartSetShippingMethodAction with checking for non-null required valuesbuilds CartSetShippingMethodAction 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 CartSetShippingMethodActionBuilderof
(CartSetShippingMethodAction template) create builder for CartSetShippingMethodAction 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
-
CartSetShippingMethodActionBuilder
public CartSetShippingMethodActionBuilder()
-
-
Method Details
-
shippingMethod
public CartSetShippingMethodActionBuilder shippingMethod(Function<ShippingMethodResourceIdentifierBuilder, ShippingMethodResourceIdentifierBuilder> builder) Value to set. If empty, any existing value is 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 CartSetShippingMethodActionBuilder withShippingMethod(Function<ShippingMethodResourceIdentifierBuilder, ShippingMethodResourceIdentifier> builder) Value to set. If empty, any existing value is 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 CartSetShippingMethodActionBuilder shippingMethod(@Nullable ShippingMethodResourceIdentifier shippingMethod) Value to set. If empty, any existing value is 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 CartSetShippingMethodActionBuilder 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 CartSetShippingMethodActionBuilder 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 CartSetShippingMethodActionBuilder 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 is 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 CartSetShippingMethodAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartSetShippingMethodAction>
- Returns:
- CartSetShippingMethodAction
-
buildUnchecked
builds CartSetShippingMethodAction without checking for non-null required values- Returns:
- CartSetShippingMethodAction
-
of
factory method for an instance of CartSetShippingMethodActionBuilder- Returns:
- builder
-
of
create builder for CartSetShippingMethodAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-