Interface TaxedPriceDraft
- All Superinterfaces:
Draft<TaxedPriceDraft>
TaxedPriceDraft
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
TaxedPriceDraft taxedPriceDraft = TaxedPriceDraft.builder()
.totalNet(totalNetBuilder -> totalNetBuilder)
.totalGross(totalGrossBuilder -> totalGrossBuilder)
.plusTaxPortions(taxPortionsBuilder -> taxPortionsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic TaxedPriceDraftBuilderbuilder()builder factory method for TaxedPriceDraftstatic TaxedPriceDraftBuilderbuilder(TaxedPriceDraft template) create builder for TaxedPriceDraft instancecopyDeep()static TaxedPriceDraftdeepCopy(TaxedPriceDraft template) factory method to create a deep copy of TaxedPriceDraft@NotNull @Valid List<TaxPortionDraft>Taxable portions added to thetotalGross.@NotNull @Valid MoneyTotal gross price of the Cart or Order.@NotNull @Valid MoneyTotal net price of the Cart or Order.@Valid TypedMoneyDraftTotal tax applicable for the Cart or Order.static TaxedPriceDraftof()factory methodstatic TaxedPriceDraftof(TaxedPriceDraft template) factory method to create a shallow copy TaxedPriceDraftvoidsetTaxPortions(TaxPortionDraft... taxPortions) Taxable portions added to thetotalGross.voidsetTaxPortions(List<TaxPortionDraft> taxPortions) Taxable portions added to thetotalGross.voidsetTotalGross(Money totalGross) Total gross price of the Cart or Order.voidsetTotalNet(Money totalNet) Total net price of the Cart or Order.voidsetTotalTax(TypedMoneyDraft totalTax) Total tax applicable for the Cart or Order.static com.fasterxml.jackson.core.type.TypeReference<TaxedPriceDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithTaxedPriceDraft(Function<TaxedPriceDraft, T> helper) accessor map function
-
Method Details
-
getTotalNet
Total net price of the Cart or Order.
- Returns:
- totalNet
-
getTotalGross
Total gross price of the Cart or Order.
- Returns:
- totalGross
-
getTaxPortions
Taxable portions added to the
totalGross.Calculated from the TaxRates.
- Returns:
- taxPortions
-
getTotalTax
Total tax applicable for the Cart or Order.
- Returns:
- totalTax
-
setTotalNet
Total net price of the Cart or Order.
- Parameters:
totalNet- value to be set
-
setTotalGross
Total gross price of the Cart or Order.
- Parameters:
totalGross- value to be set
-
setTaxPortions
Taxable portions added to the
totalGross.Calculated from the TaxRates.
- Parameters:
taxPortions- values to be set
-
setTaxPortions
Taxable portions added to the
totalGross.Calculated from the TaxRates.
- Parameters:
taxPortions- values to be set
-
setTotalTax
Total tax applicable for the Cart or Order.
- Parameters:
totalTax- value to be set
-
of
factory method- Returns:
- instance of TaxedPriceDraft
-
of
factory method to create a shallow copy TaxedPriceDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
TaxedPriceDraft copyDeep() -
deepCopy
factory method to create a deep copy of TaxedPriceDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for TaxedPriceDraft- Returns:
- builder
-
builder
create builder for TaxedPriceDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withTaxedPriceDraft
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
-