Class MyCartSetShippingMethodActionBuilder
- All Implemented Interfaces:
Builder<MyCartSetShippingMethodAction>
Example to create an instance using the builder pattern
MyCartSetShippingMethodAction myCartSetShippingMethodAction = MyCartSetShippingMethodAction.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds MyCartSetShippingMethodAction with checking for non-null required valuesbuilds MyCartSetShippingMethodAction 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 MyCartSetShippingMethodActionBuilderof
(MyCartSetShippingMethodAction template) create builder for MyCartSetShippingMethodAction 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
-
MyCartSetShippingMethodActionBuilder
public MyCartSetShippingMethodActionBuilder()
-
-
Method Details
-
shippingMethod
public MyCartSetShippingMethodActionBuilder 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 MyCartSetShippingMethodActionBuilder 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 MyCartSetShippingMethodActionBuilder 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 MyCartSetShippingMethodActionBuilder 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 MyCartSetShippingMethodActionBuilder 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 MyCartSetShippingMethodActionBuilder 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 MyCartSetShippingMethodAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<MyCartSetShippingMethodAction>
- Returns:
- MyCartSetShippingMethodAction
-
buildUnchecked
builds MyCartSetShippingMethodAction without checking for non-null required values- Returns:
- MyCartSetShippingMethodAction
-
of
factory method for an instance of MyCartSetShippingMethodActionBuilder- Returns:
- builder
-
of
create builder for MyCartSetShippingMethodAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-