Interface DiscountOnTotalPrice
Example to create an instance using the builder pattern
DiscountOnTotalPrice discountOnTotalPrice = DiscountOnTotalPrice.builder()
.discountedAmount(discountedAmountBuilder -> discountedAmountBuilder)
.plusIncludedDiscounts(includedDiscountsBuilder -> includedDiscountsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic DiscountOnTotalPriceBuilderbuilder()builder factory method for DiscountOnTotalPricestatic DiscountOnTotalPriceBuilderbuilder(DiscountOnTotalPrice template) create builder for DiscountOnTotalPrice instancecopyDeep()static DiscountOnTotalPricedeepCopy(DiscountOnTotalPrice template) factory method to create a deep copy of DiscountOnTotalPrice@NotNull @Valid TypedMoneyMoney value of the discount on the total price of the Cart or Order.@Valid TypedMoneyMoney value of the discount on the total gross price of the Cart or Order.@Valid TypedMoneyMoney value of the discount on the total net price of the Cart or Order.@NotNull @Valid List<DiscountedTotalPricePortion>Discounts that impact the total price of the Cart or Order.static DiscountOnTotalPriceof()factory methodstatic DiscountOnTotalPriceof(DiscountOnTotalPrice template) factory method to create a shallow copy DiscountOnTotalPricevoidsetDiscountedAmount(TypedMoney discountedAmount) Money value of the discount on the total price of the Cart or Order.voidsetDiscountedGrossAmount(TypedMoney discountedGrossAmount) Money value of the discount on the total gross price of the Cart or Order.voidsetDiscountedNetAmount(TypedMoney discountedNetAmount) Money value of the discount on the total net price of the Cart or Order.voidsetIncludedDiscounts(DiscountedTotalPricePortion... includedDiscounts) Discounts that impact the total price of the Cart or Order.voidsetIncludedDiscounts(List<DiscountedTotalPricePortion> includedDiscounts) Discounts that impact the total price of the Cart or Order.static com.fasterxml.jackson.core.type.TypeReference<DiscountOnTotalPrice>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithDiscountOnTotalPrice(Function<DiscountOnTotalPrice, T> helper) accessor map function
-
Method Details
-
getDiscountedAmount
Money value of the discount on the total price of the Cart or Order.
- Returns:
- discountedAmount
-
getIncludedDiscounts
Discounts that impact the total price of the Cart or Order.
- Returns:
- includedDiscounts
-
getDiscountedNetAmount
Money value of the discount on the total net price of the Cart or Order.
The same percentage of discount applies as on the
discountedAmount. Present only whentaxedPriceof the Cart or Order exists.- Returns:
- discountedNetAmount
-
getDiscountedGrossAmount
Money value of the discount on the total gross price of the Cart or Order.
The same percentage of discount applies as on the
discountedAmount. Present only whentaxedPriceof the Cart or Order exists.- Returns:
- discountedGrossAmount
-
setDiscountedAmount
Money value of the discount on the total price of the Cart or Order.
- Parameters:
discountedAmount- value to be set
-
setIncludedDiscounts
Discounts that impact the total price of the Cart or Order.
- Parameters:
includedDiscounts- values to be set
-
setIncludedDiscounts
Discounts that impact the total price of the Cart or Order.
- Parameters:
includedDiscounts- values to be set
-
setDiscountedNetAmount
Money value of the discount on the total net price of the Cart or Order.
The same percentage of discount applies as on the
discountedAmount. Present only whentaxedPriceof the Cart or Order exists.- Parameters:
discountedNetAmount- value to be set
-
setDiscountedGrossAmount
Money value of the discount on the total gross price of the Cart or Order.
The same percentage of discount applies as on the
discountedAmount. Present only whentaxedPriceof the Cart or Order exists.- Parameters:
discountedGrossAmount- value to be set
-
of
factory method- Returns:
- instance of DiscountOnTotalPrice
-
of
factory method to create a shallow copy DiscountOnTotalPrice- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
DiscountOnTotalPrice copyDeep() -
deepCopy
factory method to create a deep copy of DiscountOnTotalPrice- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DiscountOnTotalPrice- Returns:
- builder
-
builder
create builder for DiscountOnTotalPrice instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withDiscountOnTotalPrice
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
-