Class MethodExternalTaxRateDraftBuilder
java.lang.Object
com.commercetools.api.models.cart.MethodExternalTaxRateDraftBuilder
- All Implemented Interfaces:
Builder<MethodExternalTaxRateDraft>
public class MethodExternalTaxRateDraftBuilder
extends Object
implements Builder<MethodExternalTaxRateDraft>
MethodExternalTaxRateDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
MethodExternalTaxRateDraft methodExternalTaxRateDraft = MethodExternalTaxRateDraft.builder()
.shippingMethodKey("{shippingMethodKey}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds MethodExternalTaxRateDraft with checking for non-null required valuesbuilds MethodExternalTaxRateDraft without checking for non-null required valuesUser-defined unique identifier of the Shipping Method in a Cart withMultipleShippingMode.External Tax Rate for the Shipping Method, if the Cart hasExternalTaxMode.of()factory method for an instance of MethodExternalTaxRateDraftBuilderof(MethodExternalTaxRateDraft template) create builder for MethodExternalTaxRateDraft instanceshippingMethodKey(String shippingMethodKey) User-defined unique identifier of the Shipping Method in a Cart withMultipleShippingMode.taxRate(ExternalTaxRateDraft taxRate) External Tax Rate for the Shipping Method, if the Cart hasExternalTaxMode.External Tax Rate for the Shipping Method, if the Cart hasExternalTaxMode.External Tax Rate for the Shipping Method, if the Cart hasExternalTaxMode.
-
Constructor Details
-
MethodExternalTaxRateDraftBuilder
public MethodExternalTaxRateDraftBuilder()
-
-
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
public MethodExternalTaxRateDraftBuilder taxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraftBuilder> builder) External Tax Rate for the Shipping Method, if the Cart has
ExternalTaxMode.- Parameters:
builder- function to build the taxRate value- Returns:
- Builder
-
withTaxRate
public MethodExternalTaxRateDraftBuilder withTaxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraft> builder) External Tax Rate for the Shipping Method, if the Cart has
ExternalTaxMode.- Parameters:
builder- function to build the taxRate value- Returns:
- Builder
-
taxRate
External Tax Rate for the Shipping Method, if the Cart has
ExternalTaxMode.- 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
External Tax Rate for the Shipping Method, if the Cart has
ExternalTaxMode.- Returns:
- taxRate
-
build
builds MethodExternalTaxRateDraft with checking for non-null required values- Specified by:
buildin interfaceBuilder<MethodExternalTaxRateDraft>- Returns:
- MethodExternalTaxRateDraft
-
buildUnchecked
builds MethodExternalTaxRateDraft without checking for non-null required values- Returns:
- MethodExternalTaxRateDraft
-
of
factory method for an instance of MethodExternalTaxRateDraftBuilder- Returns:
- builder
-
of
create builder for MethodExternalTaxRateDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-