Interface ProratedOfferAdjustment
- All Known Implementing Classes:
ProratedOfferAdjustmentDto
public interface ProratedOfferAdjustment
DTO containing prorated price adjustment information for a
EnhancedLineItem
caused by an
order-level or fulfillment group-level offer.
If there's an order-level offer applied to the order, the offer adjustment would be spread across
all the discountable EnhancedLineItems
.
Practically, this information is only needed for downstream services since the total discount is
the same for the EnhancedLineItem
.
- Author:
- Sunny Yu
-
Method Summary
Modifier and TypeMethodDescriptionjavax.money.MonetaryAmount
The amount of the prorated adjustment for the item.default String
The code used (if any) that triggered the application of the offer for this adjustment.default List<ItemProrationDetail>
The details about how this prorated adjustment on a per-quantity basis.TheLineItemRef
of theLineItem
that gets this adjustment.getOffer()
TheOfferRef
for the offer where this prorated adjustment is from.default int
The quantity of merchandising items from theLineItem
to which this adjustment applies.void
setAmount
(javax.money.MonetaryAmount amount) The amount of the prorated adjustment for the item.default void
setCodeUsed
(String codeUsed) The code used (if any) that triggered the application of the offer for this adjustment.default void
setItemProrationDetails
(List<ItemProrationDetail> itemProrationDetails) The details about how this prorated adjustment on a per-quantity basis.void
setLineItem
(LineItemRef lineItem) TheLineItemRef
of theLineItem
that gets this adjustment.void
TheOfferRef
for the offer where this prorated adjustment is from.default void
setQuantity
(int quantity) The quantity of merchandising items from theLineItem
to which this adjustment applies.
-
Method Details
-
getLineItem
LineItemRef getLineItem()TheLineItemRef
of theLineItem
that gets this adjustment.- Returns:
- The
LineItemRef
of theLineItem
that gets this adjustment.
-
setLineItem
TheLineItemRef
of theLineItem
that gets this adjustment. -
getOffer
OfferRef getOffer()TheOfferRef
for the offer where this prorated adjustment is from.- Returns:
- The
OfferRef
for the offer where this prorated adjustment is from.
-
setOffer
TheOfferRef
for the offer where this prorated adjustment is from. -
getAmount
javax.money.MonetaryAmount getAmount()The amount of the prorated adjustment for the item.- Returns:
- The amount of the prorated adjustment for the item.
-
setAmount
void setAmount(javax.money.MonetaryAmount amount) The amount of the prorated adjustment for the item. -
getItemProrationDetails
The details about how this prorated adjustment on a per-quantity basis.For example, if the prorated adjustment for this item is $5 and this item has a quantity of 3, there should be one detail with quantity of 2 and amount of $1.67, and one detail with quantity of 1 and amount of $1.66, totaling to $5
- Returns:
- The details about how this prorated adjustment on a per-quantity basis.
-
setItemProrationDetails
The details about how this prorated adjustment on a per-quantity basis.For example, if the prorated adjustment for this item is $5 and this item has a quantity of 3, there should be one detail with quantity of 2 and amount of $1.67, and one detail with quantity of 1 and amount of $1.66, totaling to $5
-
getCodeUsed
The code used (if any) that triggered the application of the offer for this adjustment.- Returns:
- The code used (if any) that triggered the application of the offer for this adjustment.
-
setCodeUsed
The code used (if any) that triggered the application of the offer for this adjustment.- Parameters:
codeUsed
- The code used (if any) that triggered the application of the offer for this adjustment.
-
getQuantity
default int getQuantity()The quantity of merchandising items from theLineItem
to which this adjustment applies.- Returns:
- The quantity of merchandising items from the
LineItem
to which this adjustment applies.
-
setQuantity
default void setQuantity(int quantity) The quantity of merchandising items from theLineItem
to which this adjustment applies.- Parameters:
quantity
- The quantity of merchandising items from theLineItem
to which this adjustment applies.
-