Class TaxedItemPriceBuilder
java.lang.Object
com.commercetools.history.models.common.TaxedItemPriceBuilder
- All Implemented Interfaces:
Builder<TaxedItemPrice>
TaxedItemPriceBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
TaxedItemPrice taxedItemPrice = TaxedItemPrice.builder()
.totalNet(totalNetBuilder -> totalNetBuilder)
.totalGross(totalGrossBuilder -> totalGrossBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds TaxedItemPrice with checking for non-null required valuesbuilds TaxedItemPrice without checking for non-null required valuesvalue of totalGross}value of totalNet}static TaxedItemPriceBuilder
of()
factory method for an instance of TaxedItemPriceBuilderstatic TaxedItemPriceBuilder
of
(TaxedItemPrice template) create builder for TaxedItemPrice instancetotalGross
(Money totalGross) set the value to the totalGrosstotalGross
(Function<MoneyBuilder, MoneyBuilder> builder) set the value to the totalGross using the builder functionset the value to the totalNettotalNet
(Function<MoneyBuilder, MoneyBuilder> builder) set the value to the totalNet using the builder functionwithTotalGross
(Function<MoneyBuilder, Money> builder) set the value to the totalGross using the builder functionwithTotalNet
(Function<MoneyBuilder, Money> builder) set the value to the totalNet using the builder function
-
Constructor Details
-
TaxedItemPriceBuilder
public TaxedItemPriceBuilder()
-
-
Method Details
-
totalNet
set the value to the totalNet using the builder function- Parameters:
builder
- function to build the totalNet value- Returns:
- Builder
-
withTotalNet
set the value to the totalNet using the builder function- Parameters:
builder
- function to build the totalNet value- Returns:
- Builder
-
totalNet
set the value to the totalNet- Parameters:
totalNet
- value to be set- Returns:
- Builder
-
totalGross
set the value to the totalGross using the builder function- Parameters:
builder
- function to build the totalGross value- Returns:
- Builder
-
withTotalGross
set the value to the totalGross using the builder function- Parameters:
builder
- function to build the totalGross value- Returns:
- Builder
-
totalGross
set the value to the totalGross- Parameters:
totalGross
- value to be set- Returns:
- Builder
-
getTotalNet
value of totalNet}- Returns:
- totalNet
-
getTotalGross
value of totalGross}- Returns:
- totalGross
-
build
builds TaxedItemPrice with checking for non-null required values- Specified by:
build
in interfaceBuilder<TaxedItemPrice>
- Returns:
- TaxedItemPrice
-
buildUnchecked
builds TaxedItemPrice without checking for non-null required values- Returns:
- TaxedItemPrice
-
of
factory method for an instance of TaxedItemPriceBuilder- Returns:
- builder
-
of
create builder for TaxedItemPrice instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-