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 Details

    • getLineItem

      LineItemRef getLineItem()
      The LineItemRef of the LineItem that gets this adjustment.
      Returns:
      The LineItemRef of the LineItem that gets this adjustment.
    • setLineItem

      void setLineItem(LineItemRef lineItem)
      The LineItemRef of the LineItem that gets this adjustment.
    • getOffer

      OfferRef getOffer()
      The OfferRef for the offer where this prorated adjustment is from.
      Returns:
      The OfferRef for the offer where this prorated adjustment is from.
    • setOffer

      void setOffer(OfferRef offer)
      The OfferRef 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

      default List<ItemProrationDetail> 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

      default void setItemProrationDetails(List<ItemProrationDetail> itemProrationDetails)
      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

      default String 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

      default void setCodeUsed(String codeUsed)
      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 the LineItem 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 the LineItem to which this adjustment applies.
      Parameters:
      quantity - The quantity of merchandising items from the LineItem to which this adjustment applies.