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 DiscountOnTotalPriceBuilder
builder()
builder factory method for DiscountOnTotalPricestatic DiscountOnTotalPriceBuilder
builder
(DiscountOnTotalPrice template) create builder for DiscountOnTotalPrice instancestatic DiscountOnTotalPrice
deepCopy
(DiscountOnTotalPrice template) factory method to create a deep copy of DiscountOnTotalPrice@NotNull @Valid TypedMoney
Money value of the discount on the total price of the Cart or Order.@Valid TypedMoney
Money value of the discount on the total gross price of the Cart or Order.@Valid TypedMoney
Money 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 DiscountOnTotalPrice
of()
factory methodstatic DiscountOnTotalPrice
of
(DiscountOnTotalPrice template) factory method to create a shallow copy DiscountOnTotalPricevoid
setDiscountedAmount
(TypedMoney discountedAmount) Money value of the discount on the total price of the Cart or Order.void
setDiscountedGrossAmount
(TypedMoney discountedGrossAmount) Money value of the discount on the total gross price of the Cart or Order.void
setDiscountedNetAmount
(TypedMoney discountedNetAmount) Money value of the discount on the total net price of the Cart or Order.void
setIncludedDiscounts
(DiscountedTotalPricePortion... includedDiscounts) Discounts that impact the total price of the Cart or Order.void
setIncludedDiscounts
(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> T
withDiscountOnTotalPrice
(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. Present only when
taxedPrice
of the Cart or Order exists.- Returns:
- discountedNetAmount
-
getDiscountedGrossAmount
Money value of the discount on the total gross price of the Cart or Order. Present only when
taxedPrice
of 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. Present only when
taxedPrice
of 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. Present only when
taxedPrice
of 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
-
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
-