Class TaxedItemPriceBuilder
- All Implemented Interfaces:
Builder<TaxedItemPrice>
Example to create an instance using the builder pattern
TaxedItemPrice taxedItemPrice = TaxedItemPrice.builder()
.totalNet(totalNetBuilder -> totalNetBuilder)
.totalGross(totalGrossBuilder -> totalGrossBuilder)
.plusTaxPortions(taxPortionsBuilder -> taxPortionsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddTaxPortions
(Function<TaxPortionBuilder, TaxPortion> builder) Taxable portions added to the total net price.build()
builds TaxedItemPrice with checking for non-null required valuesbuilds TaxedItemPrice without checking for non-null required valuesTaxable portions added to the total net price.Total gross amount of the Line Item or Custom Line Item.Total net amount of the Line Item or Custom Line Item.Total tax applicable for the Line Item or Custom Line Item.static TaxedItemPriceBuilder
of()
factory method for an instance of TaxedItemPriceBuilderstatic TaxedItemPriceBuilder
of
(TaxedItemPrice template) create builder for TaxedItemPrice instanceplusTaxPortions
(TaxPortion... taxPortions) Taxable portions added to the total net price.Taxable portions added to the total net price.setTaxPortions
(Function<TaxPortionBuilder, TaxPortion> builder) Taxable portions added to the total net price.taxPortions
(TaxPortion... taxPortions) Taxable portions added to the total net price.taxPortions
(List<TaxPortion> taxPortions) Taxable portions added to the total net price.totalGross
(CentPrecisionMoney totalGross) Total gross amount of the Line Item or Custom Line Item.Total gross amount of the Line Item or Custom Line Item.totalNet
(CentPrecisionMoney totalNet) Total net amount of the Line Item or Custom Line Item.Total net amount of the Line Item or Custom Line Item.totalTax
(CentPrecisionMoney totalTax) Total tax applicable for the Line Item or Custom Line Item.Total tax applicable for the Line Item or Custom Line Item.Taxable portions added to the total net price.Total gross amount of the Line Item or Custom Line Item.Total net amount of the Line Item or Custom Line Item.Total tax applicable for the Line Item or Custom Line Item.
-
Constructor Details
-
TaxedItemPriceBuilder
public TaxedItemPriceBuilder()
-
-
Method Details
-
totalNet
public TaxedItemPriceBuilder totalNet(Function<CentPrecisionMoneyBuilder, CentPrecisionMoneyBuilder> builder) Total net amount of the Line Item or Custom Line Item.
- Parameters:
builder
- function to build the totalNet value- Returns:
- Builder
-
withTotalNet
public TaxedItemPriceBuilder withTotalNet(Function<CentPrecisionMoneyBuilder, CentPrecisionMoney> builder) Total net amount of the Line Item or Custom Line Item.
- Parameters:
builder
- function to build the totalNet value- Returns:
- Builder
-
totalNet
Total net amount of the Line Item or Custom Line Item.
- Parameters:
totalNet
- value to be set- Returns:
- Builder
-
totalGross
public TaxedItemPriceBuilder totalGross(Function<CentPrecisionMoneyBuilder, CentPrecisionMoneyBuilder> builder) Total gross amount of the Line Item or Custom Line Item.
- Parameters:
builder
- function to build the totalGross value- Returns:
- Builder
-
withTotalGross
public TaxedItemPriceBuilder withTotalGross(Function<CentPrecisionMoneyBuilder, CentPrecisionMoney> builder) Total gross amount of the Line Item or Custom Line Item.
- Parameters:
builder
- function to build the totalGross value- Returns:
- Builder
-
totalGross
Total gross amount of the Line Item or Custom Line Item.
- Parameters:
totalGross
- value to be set- Returns:
- Builder
-
taxPortions
Taxable portions added to the total net price.
Calculated from the TaxRates.
- Parameters:
taxPortions
- value to be set- Returns:
- Builder
-
taxPortions
Taxable portions added to the total net price.
Calculated from the TaxRates.
- Parameters:
taxPortions
- value to be set- Returns:
- Builder
-
plusTaxPortions
Taxable portions added to the total net price.
Calculated from the TaxRates.
- Parameters:
taxPortions
- value to be set- Returns:
- Builder
-
plusTaxPortions
Taxable portions added to the total net price.
Calculated from the TaxRates.
- Parameters:
builder
- function to build the taxPortions value- Returns:
- Builder
-
withTaxPortions
Taxable portions added to the total net price.
Calculated from the TaxRates.
- Parameters:
builder
- function to build the taxPortions value- Returns:
- Builder
-
addTaxPortions
Taxable portions added to the total net price.
Calculated from the TaxRates.
- Parameters:
builder
- function to build the taxPortions value- Returns:
- Builder
-
setTaxPortions
Taxable portions added to the total net price.
Calculated from the TaxRates.
- Parameters:
builder
- function to build the taxPortions value- Returns:
- Builder
-
totalTax
public TaxedItemPriceBuilder totalTax(Function<CentPrecisionMoneyBuilder, CentPrecisionMoneyBuilder> builder) Total tax applicable for the Line Item or Custom Line Item. Automatically calculated as the difference between the
totalGross
andtotalNet
values.- Parameters:
builder
- function to build the totalTax value- Returns:
- Builder
-
withTotalTax
public TaxedItemPriceBuilder withTotalTax(Function<CentPrecisionMoneyBuilder, CentPrecisionMoney> builder) Total tax applicable for the Line Item or Custom Line Item. Automatically calculated as the difference between the
totalGross
andtotalNet
values.- Parameters:
builder
- function to build the totalTax value- Returns:
- Builder
-
totalTax
Total tax applicable for the Line Item or Custom Line Item. Automatically calculated as the difference between the
totalGross
andtotalNet
values.- Parameters:
totalTax
- value to be set- Returns:
- Builder
-
getTotalNet
Total net amount of the Line Item or Custom Line Item.
- Returns:
- totalNet
-
getTotalGross
Total gross amount of the Line Item or Custom Line Item.
- Returns:
- totalGross
-
getTaxPortions
Taxable portions added to the total net price.
Calculated from the TaxRates.
- Returns:
- taxPortions
-
getTotalTax
Total tax applicable for the Line Item or Custom Line Item. Automatically calculated as the difference between the
totalGross
andtotalNet
values.- Returns:
- totalTax
-
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
-