Class TaxedPriceBuilder
java.lang.Object
com.commercetools.history.models.common.TaxedPriceBuilder
- All Implemented Interfaces:
Builder<TaxedPrice>
TaxedPriceBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
TaxedPrice taxedPrice = TaxedPrice.builder()
.totalNet(totalNetBuilder -> totalNetBuilder)
.totalGross(totalGrossBuilder -> totalGrossBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds TaxedPrice with checking for non-null required valuesbuilds TaxedPrice without checking for non-null required valuesTotal gross price of the Order.Total net price of the Order.static TaxedPriceBuilder
of()
factory method for an instance of TaxedPriceBuilderstatic TaxedPriceBuilder
of
(TaxedPrice template) create builder for TaxedPrice instancetotalGross
(Money totalGross) Total gross price of the Order.totalGross
(Function<MoneyBuilder, MoneyBuilder> builder) Total gross price of the Order.Total net price of the Order.totalNet
(Function<MoneyBuilder, MoneyBuilder> builder) Total net price of the Order.withTotalGross
(Function<MoneyBuilder, Money> builder) Total gross price of the Order.withTotalNet
(Function<MoneyBuilder, Money> builder) Total net price of the Order.
-
Constructor Details
-
TaxedPriceBuilder
public TaxedPriceBuilder()
-
-
Method Details
-
totalNet
Total net price of the Order.
- Parameters:
builder
- function to build the totalNet value- Returns:
- Builder
-
withTotalNet
Total net price of the Order.
- Parameters:
builder
- function to build the totalNet value- Returns:
- Builder
-
totalNet
Total net price of the Order.
- Parameters:
totalNet
- value to be set- Returns:
- Builder
-
totalGross
Total gross price of the Order.
- Parameters:
builder
- function to build the totalGross value- Returns:
- Builder
-
withTotalGross
Total gross price of the Order.
- Parameters:
builder
- function to build the totalGross value- Returns:
- Builder
-
totalGross
Total gross price of the Order.
- Parameters:
totalGross
- value to be set- Returns:
- Builder
-
getTotalNet
Total net price of the Order.
- Returns:
- totalNet
-
getTotalGross
Total gross price of the Order.
- Returns:
- totalGross
-
build
builds TaxedPrice with checking for non-null required values- Specified by:
build
in interfaceBuilder<TaxedPrice>
- Returns:
- TaxedPrice
-
buildUnchecked
builds TaxedPrice without checking for non-null required values- Returns:
- TaxedPrice
-
of
factory method for an instance of TaxedPriceBuilder- Returns:
- builder
-
of
create builder for TaxedPrice instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-