Interface TaxedItemPrice
public interface TaxedItemPrice
TaxedItemPrice
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)
.plusTaxPortions(taxPortionsBuilder -> taxPortionsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic TaxedItemPriceBuilderbuilder()builder factory method for TaxedItemPricestatic TaxedItemPriceBuilderbuilder(TaxedItemPrice template) create builder for TaxedItemPrice instancecopyDeep()static TaxedItemPricedeepCopy(TaxedItemPrice template) factory method to create a deep copy of TaxedItemPrice@NotNull @Valid List<TaxPortion>Taxable portions added to the total net price.@NotNull @Valid CentPrecisionMoneyTotal gross amount of the Line Item or Custom Line Item.@NotNull @Valid CentPrecisionMoneyTotal net amount of the Line Item or Custom Line Item.@Valid CentPrecisionMoneyTotal tax applicable for the Line Item or Custom Line Item.static TaxedItemPriceof()factory methodstatic TaxedItemPriceof(TaxedItemPrice template) factory method to create a shallow copy TaxedItemPricevoidsetTaxPortions(TaxPortion... taxPortions) Taxable portions added to the total net price.voidsetTaxPortions(List<TaxPortion> taxPortions) Taxable portions added to the total net price.voidsetTotalGross(CentPrecisionMoney totalGross) Total gross amount of the Line Item or Custom Line Item.voidsetTotalNet(CentPrecisionMoney totalNet) Total net amount of the Line Item or Custom Line Item.voidsetTotalTax(CentPrecisionMoney totalTax) Total tax applicable for the Line Item or Custom Line Item.static com.fasterxml.jackson.core.type.TypeReference<TaxedItemPrice>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithTaxedItemPrice(Function<TaxedItemPrice, T> helper) accessor map function
-
Method Details
-
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
totalGrossandtotalNetvalues.- Returns:
- totalTax
-
setTotalNet
Total net amount of the Line Item or Custom Line Item.
- Parameters:
totalNet- value to be set
-
setTotalGross
Total gross amount of the Line Item or Custom Line Item.
- Parameters:
totalGross- value to be set
-
setTaxPortions
Taxable portions added to the total net price.
Calculated from the TaxRates.
- Parameters:
taxPortions- values to be set
-
setTaxPortions
Taxable portions added to the total net price.
Calculated from the TaxRates.
- Parameters:
taxPortions- values to be set
-
setTotalTax
Total tax applicable for the Line Item or Custom Line Item. Automatically calculated as the difference between the
totalGrossandtotalNetvalues.- Parameters:
totalTax- value to be set
-
of
factory method- Returns:
- instance of TaxedItemPrice
-
of
factory method to create a shallow copy TaxedItemPrice- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
TaxedItemPrice copyDeep() -
deepCopy
factory method to create a deep copy of TaxedItemPrice- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for TaxedItemPrice- Returns:
- builder
-
builder
create builder for TaxedItemPrice instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withTaxedItemPrice
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-