Class TaxPortionBuilder
java.lang.Object
com.commercetools.importapi.models.orders.TaxPortionBuilder
- All Implemented Interfaces:
Builder<TaxPortion>
TaxPortionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
TaxPortion taxPortion = TaxPortion.builder()
.rate(0.3)
.amount(amountBuilder -> amountBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionamount
(TypedMoney amount) set the value to the amountamount
(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) set the value to the amount using the builder functionbuild()
builds TaxPortion with checking for non-null required valuesbuilds TaxPortion without checking for non-null required valuesvalue of amount}getName()
value of name}getRate()
value of rate}set the value to the namestatic TaxPortionBuilder
of()
factory method for an instance of TaxPortionBuilderstatic TaxPortionBuilder
of
(TaxPortion template) create builder for TaxPortion instanceset the value to the rate
-
Constructor Details
-
TaxPortionBuilder
public TaxPortionBuilder()
-
-
Method Details
-
name
set the value to the name- Parameters:
name
- value to be set- Returns:
- Builder
-
rate
set the value to the rate- Parameters:
rate
- value to be set- Returns:
- Builder
-
amount
set the value to the amount- Parameters:
amount
- value to be set- Returns:
- Builder
-
amount
set the value to the amount using the builder function- Parameters:
builder
- function to build the amount value- Returns:
- Builder
-
getName
value of name}- Returns:
- name
-
getRate
value of rate}- Returns:
- rate
-
getAmount
value of amount}- Returns:
- amount
-
build
builds TaxPortion with checking for non-null required values- Specified by:
build
in interfaceBuilder<TaxPortion>
- Returns:
- TaxPortion
-
buildUnchecked
builds TaxPortion without checking for non-null required values- Returns:
- TaxPortion
-
of
factory method for an instance of TaxPortionBuilder- Returns:
- builder
-
of
create builder for TaxPortion instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-