Class TaxedPriceBuilder
java.lang.Object
com.commercetools.importapi.models.orders.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)
.plusTaxPortions(taxPortionsBuilder -> taxPortionsBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddTaxPortions(Function<TaxPortionBuilder, TaxPortion> builder) Maps toTaxedPrice.taxPortions.build()builds TaxedPrice with checking for non-null required valuesbuilds TaxedPrice without checking for non-null required valuesMaps toTaxedPrice.taxPortions.Maps toTaxedPrice.totalGross.Maps toTaxedPrice.totalNet.static TaxedPriceBuilderof()factory method for an instance of TaxedPriceBuilderstatic TaxedPriceBuilderof(TaxedPrice template) create builder for TaxedPrice instanceplusTaxPortions(TaxPortion... taxPortions) Maps toTaxedPrice.taxPortions.Maps toTaxedPrice.taxPortions.setTaxPortions(Function<TaxPortionBuilder, TaxPortion> builder) Maps toTaxedPrice.taxPortions.taxPortions(TaxPortion... taxPortions) Maps toTaxedPrice.taxPortions.taxPortions(List<TaxPortion> taxPortions) Maps toTaxedPrice.taxPortions.totalGross(Money totalGross) Maps toTaxedPrice.totalGross.totalGross(Function<MoneyBuilder, MoneyBuilder> builder) Maps toTaxedPrice.totalGross.Maps toTaxedPrice.totalNet.totalNet(Function<MoneyBuilder, MoneyBuilder> builder) Maps toTaxedPrice.totalNet.Maps toTaxedPrice.taxPortions.withTotalGross(Function<MoneyBuilder, Money> builder) Maps toTaxedPrice.totalGross.withTotalNet(Function<MoneyBuilder, Money> builder) Maps toTaxedPrice.totalNet.
-
Constructor Details
-
TaxedPriceBuilder
public TaxedPriceBuilder()
-
-
Method Details
-
totalNet
Maps to
TaxedPrice.totalNet.- Parameters:
builder- function to build the totalNet value- Returns:
- Builder
-
withTotalNet
Maps to
TaxedPrice.totalNet.- Parameters:
builder- function to build the totalNet value- Returns:
- Builder
-
totalNet
Maps to
TaxedPrice.totalNet.- Parameters:
totalNet- value to be set- Returns:
- Builder
-
totalGross
Maps to
TaxedPrice.totalGross.- Parameters:
builder- function to build the totalGross value- Returns:
- Builder
-
withTotalGross
Maps to
TaxedPrice.totalGross.- Parameters:
builder- function to build the totalGross value- Returns:
- Builder
-
totalGross
Maps to
TaxedPrice.totalGross.- Parameters:
totalGross- value to be set- Returns:
- Builder
-
taxPortions
Maps to
TaxedPrice.taxPortions.- Parameters:
taxPortions- value to be set- Returns:
- Builder
-
taxPortions
Maps to
TaxedPrice.taxPortions.- Parameters:
taxPortions- value to be set- Returns:
- Builder
-
plusTaxPortions
Maps to
TaxedPrice.taxPortions.- Parameters:
taxPortions- value to be set- Returns:
- Builder
-
plusTaxPortions
Maps to
TaxedPrice.taxPortions.- Parameters:
builder- function to build the taxPortions value- Returns:
- Builder
-
withTaxPortions
Maps to
TaxedPrice.taxPortions.- Parameters:
builder- function to build the taxPortions value- Returns:
- Builder
-
addTaxPortions
Maps to
TaxedPrice.taxPortions.- Parameters:
builder- function to build the taxPortions value- Returns:
- Builder
-
setTaxPortions
Maps to
TaxedPrice.taxPortions.- Parameters:
builder- function to build the taxPortions value- Returns:
- Builder
-
getTotalNet
Maps to
TaxedPrice.totalNet.- Returns:
- totalNet
-
getTotalGross
Maps to
TaxedPrice.totalGross.- Returns:
- totalGross
-
getTaxPortions
Maps to
TaxedPrice.taxPortions.- Returns:
- taxPortions
-
build
builds TaxedPrice with checking for non-null required values- Specified by:
buildin 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
-