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 ReferenceA CartDiscountReference or DirectDiscountReference of the applicable discount on the Line Item.@NotNull @Valid TypedMoneyMoney value of the applicable discount.static DiscountedLineItemPortionof()factory methodstatic DiscountedLineItemPortionof(DiscountedLineItemPortion template) factory method to create a shallow copy DiscountedLineItemPortionvoidsetDiscount(Reference discount) A CartDiscountReference or DirectDiscountReference of the applicable discount on the Line Item.voidsetDiscountedAmount(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> Taccessor 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
-
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
-