Class CartSetCustomShippingMethodActionBuilder
- All Implemented Interfaces:
Builder<CartSetCustomShippingMethodAction>
Example to create an instance using the builder pattern
CartSetCustomShippingMethodAction cartSetCustomShippingMethodAction = CartSetCustomShippingMethodAction.builder()
.shippingMethodName("{shippingMethodName}")
.shippingRate(shippingRateBuilder -> shippingRateBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartSetCustomShippingMethodAction with checking for non-null required valuesbuilds CartSetCustomShippingMethodAction without checking for non-null required valuesexternalTaxRate
(ExternalTaxRateDraft externalTaxRate) External Tax Rate for theshippingRate
to be set if the Cart has theExternal
TaxMode.External Tax Rate for theshippingRate
to be set if the Cart has theExternal
TaxMode.External Tax Rate for theshippingRate
to be set if the Cart has theExternal
TaxMode.Name of the custom Shipping Method.Determines the shipping price.Tax Category used to determine the Tax Rate when the Cart has thePlatform
TaxMode.of()
factory method for an instance of CartSetCustomShippingMethodActionBuilderof
(CartSetCustomShippingMethodAction template) create builder for CartSetCustomShippingMethodAction instanceshippingMethodName
(String shippingMethodName) Name of the custom Shipping Method.shippingRate
(ShippingRateDraft shippingRate) Determines the shipping price.Determines the shipping price.taxCategory
(TaxCategoryResourceIdentifier taxCategory) Tax Category used to determine the Tax Rate when the Cart has thePlatform
TaxMode.taxCategory
(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifierBuilder> builder) Tax Category used to determine the Tax Rate when the Cart has thePlatform
TaxMode.External Tax Rate for theshippingRate
to be set if the Cart has theExternal
TaxMode.Determines the shipping price.withTaxCategory
(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifier> builder) Tax Category used to determine the Tax Rate when the Cart has thePlatform
TaxMode.
-
Constructor Details
-
CartSetCustomShippingMethodActionBuilder
public CartSetCustomShippingMethodActionBuilder()
-
-
Method Details
-
shippingMethodName
Name of the custom Shipping Method.
- Parameters:
shippingMethodName
- value to be set- Returns:
- Builder
-
shippingRate
public CartSetCustomShippingMethodActionBuilder shippingRate(Function<ShippingRateDraftBuilder, ShippingRateDraftBuilder> builder) Determines the shipping price.
- Parameters:
builder
- function to build the shippingRate value- Returns:
- Builder
-
withShippingRate
public CartSetCustomShippingMethodActionBuilder withShippingRate(Function<ShippingRateDraftBuilder, ShippingRateDraft> builder) Determines the shipping price.
- Parameters:
builder
- function to build the shippingRate value- Returns:
- Builder
-
shippingRate
Determines the shipping price.
- Parameters:
shippingRate
- value to be set- Returns:
- Builder
-
taxCategory
public CartSetCustomShippingMethodActionBuilder taxCategory(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifierBuilder> builder) Tax Category used to determine the Tax Rate when the Cart has the
Platform
TaxMode.- Parameters:
builder
- function to build the taxCategory value- Returns:
- Builder
-
withTaxCategory
public CartSetCustomShippingMethodActionBuilder withTaxCategory(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifier> builder) Tax Category used to determine the Tax Rate when the Cart has the
Platform
TaxMode.- Parameters:
builder
- function to build the taxCategory value- Returns:
- Builder
-
taxCategory
public CartSetCustomShippingMethodActionBuilder taxCategory(@Nullable TaxCategoryResourceIdentifier taxCategory) Tax Category used to determine the Tax Rate when the Cart has the
Platform
TaxMode.- Parameters:
taxCategory
- value to be set- Returns:
- Builder
-
externalTaxRate
public CartSetCustomShippingMethodActionBuilder externalTaxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraftBuilder> builder) External Tax Rate for the
shippingRate
to be set if the Cart has theExternal
TaxMode.- Parameters:
builder
- function to build the externalTaxRate value- Returns:
- Builder
-
withExternalTaxRate
public CartSetCustomShippingMethodActionBuilder withExternalTaxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraft> builder) External Tax Rate for the
shippingRate
to be set if the Cart has theExternal
TaxMode.- Parameters:
builder
- function to build the externalTaxRate value- Returns:
- Builder
-
externalTaxRate
public CartSetCustomShippingMethodActionBuilder externalTaxRate(@Nullable ExternalTaxRateDraft externalTaxRate) External Tax Rate for the
shippingRate
to be set if the Cart has theExternal
TaxMode.- Parameters:
externalTaxRate
- value to be set- Returns:
- Builder
-
getShippingMethodName
Name of the custom Shipping Method.
- Returns:
- shippingMethodName
-
getShippingRate
Determines the shipping price.
- Returns:
- shippingRate
-
getTaxCategory
Tax Category used to determine the Tax Rate when the Cart has the
Platform
TaxMode.- Returns:
- taxCategory
-
getExternalTaxRate
External Tax Rate for the
shippingRate
to be set if the Cart has theExternal
TaxMode.- Returns:
- externalTaxRate
-
build
builds CartSetCustomShippingMethodAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartSetCustomShippingMethodAction>
- Returns:
- CartSetCustomShippingMethodAction
-
buildUnchecked
builds CartSetCustomShippingMethodAction without checking for non-null required values- Returns:
- CartSetCustomShippingMethodAction
-
of
factory method for an instance of CartSetCustomShippingMethodActionBuilder- Returns:
- builder
-
of
public static CartSetCustomShippingMethodActionBuilder of(CartSetCustomShippingMethodAction template) create builder for CartSetCustomShippingMethodAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-