Class ExternalTaxRateDraftBuilder
java.lang.Object
com.commercetools.importapi.models.orders.ExternalTaxRateDraftBuilder
- All Implemented Interfaces:
Builder<ExternalTaxRateDraft>
ExternalTaxRateDraftBuilder
Example to create an instance using the builder pattern
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) add the value to the subRates using the builder functionset the value to the amountbuild()
builds ExternalTaxRateDraft with checking for non-null required valuesbuilds ExternalTaxRateDraft without checking for non-null required valuesset the value to the countryvalue of amount}value of country}value of includedInPrice}getName()
value of name}getState()
value of state}value of subRates}includedInPrice
(Boolean includedInPrice) set the value to the includedInPriceset the value to the namestatic ExternalTaxRateDraftBuilder
of()
factory method for an instance of ExternalTaxRateDraftBuilderstatic ExternalTaxRateDraftBuilder
of
(ExternalTaxRateDraft template) create builder for ExternalTaxRateDraft instanceplusSubRates
(SubRate... subRates) add values to the subRatesplusSubRates
(Function<SubRateBuilder, SubRateBuilder> builder) add the value to the subRates using the builder functionsetSubRates
(Function<SubRateBuilder, SubRate> builder) set the value to the subRates using the builder functionset the value to the stateset values to the subRatesset value to the subRateswithSubRates
(Function<SubRateBuilder, SubRateBuilder> builder) set the value to the subRates using the builder function
-
Constructor Details
-
ExternalTaxRateDraftBuilder
public ExternalTaxRateDraftBuilder()
-
-
Method Details
-
name
set the value to the name- Parameters:
name
- value to be set- Returns:
- Builder
-
amount
set the value to the amount- Parameters:
amount
- value to be set- Returns:
- Builder
-
country
set the value to the country- Parameters:
country
- value to be set- Returns:
- Builder
-
state
set the value to the state- Parameters:
state
- value to be set- Returns:
- Builder
-
subRates
set values to the subRates- Parameters:
subRates
- value to be set- Returns:
- Builder
-
subRates
set value to the subRates- Parameters:
subRates
- value to be set- Returns:
- Builder
-
plusSubRates
add values to the subRates- Parameters:
subRates
- value to be set- Returns:
- Builder
-
plusSubRates
add the value to the subRates using the builder function- Parameters:
builder
- function to build the subRates value- Returns:
- Builder
-
withSubRates
set the value to the subRates using the builder function- Parameters:
builder
- function to build the subRates value- Returns:
- Builder
-
addSubRates
add the value to the subRates using the builder function- Parameters:
builder
- function to build the subRates value- Returns:
- Builder
-
setSubRates
set the value to the subRates using the builder function- Parameters:
builder
- function to build the subRates value- Returns:
- Builder
-
includedInPrice
set the value to the includedInPrice- Parameters:
includedInPrice
- value to be set- Returns:
- Builder
-
getName
value of name}- Returns:
- name
-
getAmount
value of amount}- Returns:
- amount
-
getCountry
value of country}- Returns:
- country
-
getState
value of state}- Returns:
- state
-
getSubRates
value of subRates}- Returns:
- subRates
-
getIncludedInPrice
value of includedInPrice}- Returns:
- includedInPrice
-
build
builds ExternalTaxRateDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<ExternalTaxRateDraft>
- Returns:
- ExternalTaxRateDraft
-
buildUnchecked
builds ExternalTaxRateDraft without checking for non-null 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
-