Class ExternalTaxAmountDraftBuilder
java.lang.Object
com.commercetools.api.models.cart.ExternalTaxAmountDraftBuilder
- All Implemented Interfaces:
Builder<ExternalTaxAmountDraft>
public class ExternalTaxAmountDraftBuilder
extends Object
implements Builder<ExternalTaxAmountDraft>
ExternalTaxAmountDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ExternalTaxAmountDraft externalTaxAmountDraft = ExternalTaxAmountDraft.builder()
.totalGross(totalGrossBuilder -> totalGrossBuilder)
.taxRate(taxRateBuilder -> taxRateBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ExternalTaxAmountDraft with checking for non-null required valuesbuilds ExternalTaxAmountDraft without checking for non-null required valuesTax Rates and subrates of states and countries.Total gross amount (totalNet
+taxPortions
) of the Line Item or Custom Line Item.of()
factory method for an instance of ExternalTaxAmountDraftBuilderof
(ExternalTaxAmountDraft template) create builder for ExternalTaxAmountDraft instancetaxRate
(ExternalTaxRateDraft taxRate) Tax Rates and subrates of states and countries.Tax Rates and subrates of states and countries.totalGross
(Money totalGross) Total gross amount (totalNet
+taxPortions
) of the Line Item or Custom Line Item.totalGross
(Function<MoneyBuilder, MoneyBuilder> builder) Total gross amount (totalNet
+taxPortions
) of the Line Item or Custom Line Item.Tax Rates and subrates of states and countries.withTotalGross
(Function<MoneyBuilder, Money> builder) Total gross amount (totalNet
+taxPortions
) of the Line Item or Custom Line Item.
-
Constructor Details
-
ExternalTaxAmountDraftBuilder
public ExternalTaxAmountDraftBuilder()
-
-
Method Details
-
totalGross
Total gross amount (
totalNet
+taxPortions
) of the Line Item or Custom Line Item.- Parameters:
builder
- function to build the totalGross value- Returns:
- Builder
-
withTotalGross
Total gross amount (
totalNet
+taxPortions
) of the Line Item or Custom Line Item.- Parameters:
builder
- function to build the totalGross value- Returns:
- Builder
-
totalGross
Total gross amount (
totalNet
+taxPortions
) of the Line Item or Custom Line Item.- Parameters:
totalGross
- value to be set- Returns:
- Builder
-
taxRate
public ExternalTaxAmountDraftBuilder taxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraftBuilder> builder) Tax Rates and subrates of states and countries.
- Parameters:
builder
- function to build the taxRate value- Returns:
- Builder
-
withTaxRate
public ExternalTaxAmountDraftBuilder withTaxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraft> builder) Tax Rates and subrates of states and countries.
- Parameters:
builder
- function to build the taxRate value- Returns:
- Builder
-
taxRate
Tax Rates and subrates of states and countries.
- Parameters:
taxRate
- value to be set- Returns:
- Builder
-
getTotalGross
Total gross amount (
totalNet
+taxPortions
) of the Line Item or Custom Line Item.- Returns:
- totalGross
-
getTaxRate
Tax Rates and subrates of states and countries.
- Returns:
- taxRate
-
build
builds ExternalTaxAmountDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<ExternalTaxAmountDraft>
- Returns:
- ExternalTaxAmountDraft
-
buildUnchecked
builds ExternalTaxAmountDraft without checking for non-null required values- Returns:
- ExternalTaxAmountDraft
-
of
factory method for an instance of ExternalTaxAmountDraftBuilder- Returns:
- builder
-
of
create builder for ExternalTaxAmountDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-