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.MonetaryAmountThe amount of the prorated adjustment for the item.default StringThe 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.TheLineItemRefof theLineItemthat gets this adjustment.getOffer()TheOfferReffor the offer where this prorated adjustment is from.default intThe quantity of merchandising items from theLineItemto which this adjustment applies.voidsetAmount(javax.money.MonetaryAmount amount) The amount of the prorated adjustment for the item.default voidsetCodeUsed(String codeUsed) The code used (if any) that triggered the application of the offer for this adjustment.default voidsetItemProrationDetails(List<ItemProrationDetail> itemProrationDetails) The details about how this prorated adjustment on a per-quantity basis.voidsetLineItem(LineItemRef lineItem) TheLineItemRefof theLineItemthat gets this adjustment.voidTheOfferReffor the offer where this prorated adjustment is from.default voidsetQuantity(int quantity) The quantity of merchandising items from theLineItemto which this adjustment applies.
-
Method Details
-
getLineItem
LineItemRef getLineItem()TheLineItemRefof theLineItemthat gets this adjustment.- Returns:
- The
LineItemRefof theLineItemthat gets this adjustment.
-
setLineItem
TheLineItemRefof theLineItemthat gets this adjustment. -
getOffer
OfferRef getOffer()TheOfferReffor the offer where this prorated adjustment is from.- Returns:
- The
OfferReffor the offer where this prorated adjustment is from.
-
setOffer
TheOfferReffor 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 theLineItemto which this adjustment applies.- Returns:
- The quantity of merchandising items from the
LineItemto which this adjustment applies.
-
setQuantity
default void setQuantity(int quantity) The quantity of merchandising items from theLineItemto which this adjustment applies.- Parameters:
quantity- The quantity of merchandising items from theLineItemto which this adjustment applies.
-