Interface DiscountedLineItemPortion
public interface DiscountedLineItemPortion
DiscountedLineItemPortion
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DiscountedLineItemPortion discountedLineItemPortion = DiscountedLineItemPortion.builder()
.discount(discountBuilder -> discountBuilder)
.discountedAmount(discountedAmountBuilder -> discountedAmountBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for DiscountedLineItemPortionbuilder
(DiscountedLineItemPortion template) create builder for DiscountedLineItemPortion instancestatic DiscountedLineItemPortion
deepCopy
(DiscountedLineItemPortion template) factory method to create a deep copy of DiscountedLineItemPortion@NotNull @Valid Reference
A CartDiscountReference or DirectDiscountReference of the applicable discount on the Line Item.@NotNull @Valid TypedMoney
Money value of the applicable discount.static DiscountedLineItemPortion
of()
factory methodstatic DiscountedLineItemPortion
of
(DiscountedLineItemPortion template) factory method to create a shallow copy DiscountedLineItemPortionvoid
setDiscount
(Reference discount) A CartDiscountReference or DirectDiscountReference of the applicable discount on the Line Item.void
setDiscountedAmount
(TypedMoney discountedAmount) Money value of the applicable discount.static com.fasterxml.jackson.core.type.TypeReference<DiscountedLineItemPortion>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map function
-
Method Details
-
getDiscount
A CartDiscountReference or DirectDiscountReference of the applicable discount on the Line Item.
- Returns:
- discount
-
getDiscountedAmount
Money value of the applicable discount.
- Returns:
- discountedAmount
-
setDiscount
A CartDiscountReference or DirectDiscountReference of the applicable discount on the Line Item.
- Parameters:
discount
- value to be set
-
setDiscountedAmount
Money value of the applicable discount.
- Parameters:
discountedAmount
- value to be set
-
of
factory method- Returns:
- instance of DiscountedLineItemPortion
-
of
factory method to create a shallow copy DiscountedLineItemPortion- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of DiscountedLineItemPortion- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DiscountedLineItemPortion- Returns:
- builder
-
builder
create builder for DiscountedLineItemPortion instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withDiscountedLineItemPortion
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
-