Class MethodTaxRateBuilder
java.lang.Object
com.commercetools.api.models.cart.MethodTaxRateBuilder
- All Implemented Interfaces:
Builder<MethodTaxRate>
MethodTaxRateBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
MethodTaxRate methodTaxRate = MethodTaxRate.builder()
.shippingMethodKey("{shippingMethodKey}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds MethodTaxRate with checking for non-null required valuesbuilds MethodTaxRate without checking for non-null required valuesUser-defined unique identifier of the Shipping Method in a Cart withMultipleShippingMode.Tax Rate for the Shipping Method.static MethodTaxRateBuilderof()factory method for an instance of MethodTaxRateBuilderstatic MethodTaxRateBuilderof(MethodTaxRate template) create builder for MethodTaxRate instanceshippingMethodKey(String shippingMethodKey) User-defined unique identifier of the Shipping Method in a Cart withMultipleShippingMode.Tax Rate for the Shipping Method.taxRate(Function<TaxRateBuilder, TaxRateBuilder> builder) Tax Rate for the Shipping Method.withTaxRate(Function<TaxRateBuilder, TaxRate> builder) Tax Rate for the Shipping Method.
-
Constructor Details
-
MethodTaxRateBuilder
public MethodTaxRateBuilder()
-
-
Method Details
-
shippingMethodKey
User-defined unique identifier of the Shipping Method in a Cart with
MultipleShippingMode.- Parameters:
shippingMethodKey- value to be set- Returns:
- Builder
-
taxRate
Tax Rate for the Shipping Method.
- Parameters:
builder- function to build the taxRate value- Returns:
- Builder
-
withTaxRate
Tax Rate for the Shipping Method.
- Parameters:
builder- function to build the taxRate value- Returns:
- Builder
-
taxRate
Tax Rate for the Shipping Method.
- Parameters:
taxRate- value to be set- Returns:
- Builder
-
getShippingMethodKey
User-defined unique identifier of the Shipping Method in a Cart with
MultipleShippingMode.- Returns:
- shippingMethodKey
-
getTaxRate
Tax Rate for the Shipping Method.
- Returns:
- taxRate
-
build
builds MethodTaxRate with checking for non-null required values- Specified by:
buildin interfaceBuilder<MethodTaxRate>- Returns:
- MethodTaxRate
-
buildUnchecked
builds MethodTaxRate without checking for non-null required values- Returns:
- MethodTaxRate
-
of
factory method for an instance of MethodTaxRateBuilder- Returns:
- builder
-
of
create builder for MethodTaxRate instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-