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 instancecopyDeep()static DiscountedLineItemPortiondeepCopy(DiscountedLineItemPortion template) factory method to create a deep copy of DiscountedLineItemPortion@NotNull @Valid CartDiscountKeyReferenceReferences a cart discount by key.@NotNull @Valid MoneyMoney value for the discount applicable.static DiscountedLineItemPortionof()factory methodstatic DiscountedLineItemPortionof(DiscountedLineItemPortion template) factory method to create a shallow copy DiscountedLineItemPortionvoidsetDiscount(CartDiscountKeyReference discount) References a cart discount by key.voidsetDiscountedAmount(Money discountedAmount) Money value for the discount applicable.static com.fasterxml.jackson.core.type.TypeReference<DiscountedLineItemPortion>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map function
-
Method Details
-
getDiscount
References a cart discount by key. If the referenced CartDiscount does not exist, the
stateof the ImportOperation will be set tounresolveduntil the referenced CartDiscount is created.- Returns:
- discount
-
getDiscountedAmount
Money value for the discount applicable.
- Returns:
- discountedAmount
-
setDiscount
References a cart discount by key. If the referenced CartDiscount does not exist, the
stateof the ImportOperation will be set tounresolveduntil the referenced CartDiscount is created.- Parameters:
discount- value to be set
-
setDiscountedAmount
Money value for the discount applicable.
- 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
-
copyDeep
DiscountedLineItemPortion copyDeep() -
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
-