Class ExternalTaxRateDraftBuilder
 All Implemented Interfaces:
Builder<ExternalTaxRateDraft>
Example to create an instance using the builder pattern
ExternalTaxRateDraft externalTaxRateDraft = ExternalTaxRateDraft.builder()
.name("{name}")
.country("{country}")
.build()

Constructor Summary

Method Summary
Modifier and TypeMethodDescriptionaddSubRates
(Function<SubRateBuilder, SubRate> builder) For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes).Percentage in the range of 01.build()
builds ExternalTaxRateDraft with checking for nonnull required valuesbuilds ExternalTaxRateDraft without checking for nonnull required valuesCountry for which the tax applies.Percentage in the range of 01.Country for which the tax applies.If set tofalse
, the related price is considered the net price and the providedamount
is applied to calculate the gross price. If set totrue
, the related price is considered the gross price, and the providedamount
is applied to calculate the net price.getName()
Name of the Tax Rate.getState()
State within the specified country.For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes).includedInPrice
(Boolean includedInPrice) If set tofalse
, the related price is considered the net price and the providedamount
is applied to calculate the gross price. If set totrue
, the related price is considered the gross price, and the providedamount
is applied to calculate the net price.Name of the Tax Rate.static ExternalTaxRateDraftBuilder
of()
factory method for an instance of ExternalTaxRateDraftBuilderstatic ExternalTaxRateDraftBuilder
of
(ExternalTaxRateDraft template) create builder for ExternalTaxRateDraft instanceplusSubRates
(SubRate... subRates) For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes).plusSubRates
(Function<SubRateBuilder, SubRateBuilder> builder) For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes).setSubRates
(Function<SubRateBuilder, SubRate> builder) For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes).State within the specified country.For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes).For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes).withSubRates
(Function<SubRateBuilder, SubRateBuilder> builder) For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes).

Constructor Details

ExternalTaxRateDraftBuilder
public ExternalTaxRateDraftBuilder()


Method Details

name
Name of the Tax Rate.
 Parameters:
name
 value to be set Returns:
 Builder

amount
Percentage in the range of 01.
 If no
subRates
are specified, a value must be defined.  If
subRates
are specified, this can be omitted or its value must be the sum of allsubRates
amounts.
 Parameters:
amount
 value to be set Returns:
 Builder
 If no

includedInPrice
 If set to
false
, the related price is considered the net price and the providedamount
is applied to calculate the gross price.  If set to
true
, the related price is considered the gross price, and the providedamount
is applied to calculate the net price.
 Parameters:
includedInPrice
 value to be set Returns:
 Builder
 If set to

country
Country for which the tax applies.
 Parameters:
country
 value to be set Returns:
 Builder

state
State within the specified country.
 Parameters:
state
 value to be set Returns:
 Builder

subRates
For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes). The total of all subrates must equal the TaxRate
amount
. Parameters:
subRates
 value to be set Returns:
 Builder

subRates
For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes). The total of all subrates must equal the TaxRate
amount
. Parameters:
subRates
 value to be set Returns:
 Builder

plusSubRates
For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes). The total of all subrates must equal the TaxRate
amount
. Parameters:
subRates
 value to be set Returns:
 Builder

plusSubRates
For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes). The total of all subrates must equal the TaxRate
amount
. Parameters:
builder
 function to build the subRates value Returns:
 Builder

withSubRates
For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes). The total of all subrates must equal the TaxRate
amount
. Parameters:
builder
 function to build the subRates value Returns:
 Builder

addSubRates
For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes). The total of all subrates must equal the TaxRate
amount
. Parameters:
builder
 function to build the subRates value Returns:
 Builder

setSubRates
For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes). The total of all subrates must equal the TaxRate
amount
. Parameters:
builder
 function to build the subRates value Returns:
 Builder

getName
Name of the Tax Rate.
 Returns:
 name

getAmount
Percentage in the range of 01.
 If no
subRates
are specified, a value must be defined.  If
subRates
are specified, this can be omitted or its value must be the sum of allsubRates
amounts.
 Returns:
 amount
 If no

getIncludedInPrice
 If set to
false
, the related price is considered the net price and the providedamount
is applied to calculate the gross price.  If set to
true
, the related price is considered the gross price, and the providedamount
is applied to calculate the net price.
 Returns:
 includedInPrice
 If set to

getCountry
Country for which the tax applies.
 Returns:
 country

getState
State within the specified country.
 Returns:
 state

getSubRates
For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes). The total of all subrates must equal the TaxRate
amount
. Returns:
 subRates

build
builds ExternalTaxRateDraft with checking for nonnull required values Specified by:
build
in interfaceBuilder<ExternalTaxRateDraft>
 Returns:
 ExternalTaxRateDraft

buildUnchecked
builds ExternalTaxRateDraft without checking for nonnull required values Returns:
 ExternalTaxRateDraft

of
factory method for an instance of ExternalTaxRateDraftBuilder Returns:
 builder

of
create builder for ExternalTaxRateDraft instance Parameters:
template
 instance with prefilled values for the builder Returns:
 builder
