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 CartDiscountKeyReference
References a cart discount by key.@NotNull @Valid Money
static DiscountedLineItemPortion
of()
factory methodstatic DiscountedLineItemPortion
of
(DiscountedLineItemPortion template) factory method to create a shallow copy DiscountedLineItemPortionvoid
setDiscount
(CartDiscountKeyReference discount) References a cart discount by key.void
setDiscountedAmount
(Money discountedAmount) set discountedAmountstatic com.fasterxml.jackson.core.type.TypeReference<DiscountedLineItemPortion>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map function
-
Method Details
-
getDiscount
References a cart discount by key.
- Returns:
- discount
-
getDiscountedAmount
- Returns:
- discountedAmount
-
setDiscount
References a cart discount by key.
- Parameters:
discount
- value to be set
-
setDiscountedAmount
set discountedAmount- 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
-