java.lang.Object
com.broadleafcommerce.promotion.offer.client.web.context.discounts.ItemResponse<P>
All Implemented Interfaces:
Serializable

public class ItemResponse<P extends ProratedItemOfferAdjustment> extends Object implements Serializable
A DTO structure that provides pricing information for a given LineItem via offer adjustments. These adjustments are a result of running an Order through the offer engine.
Author:
Chad Harchar (charchar)
See Also:
  • Constructor Details

    • ItemResponse

      public ItemResponse()
  • Method Details

    • getItemId

      public String getItemId()
      The id for the LineItem that this ItemResponse represents.
    • getItemResponseDetails

      public List<ItemResponseDetail<P>> getItemResponseDetails()
      Detailed pricing information for this item. See ItemResponseDetail for more info.
    • getProratedAdjustments

      public List<ProratedOfferAdjustment> getProratedAdjustments()
      Prorated adjustment information for this line item. The prorated adjustments typically come from order or fulfillment group level offers.
    • getBasePricePerItem

      public javax.money.MonetaryAmount getBasePricePerItem()
      The original unadjusted price for each item.
    • getBaseRecurringPricePerItem

      public RecurringPriceDetail getBaseRecurringPricePerItem()
      The original unadjusted recurring price for each item used for discount calculations.
      Since:
      Offer Client 2.0.2
    • isAppliedToSalePrice

      public boolean isAppliedToSalePrice()
      Whether the sale price or the standard price was adjusted.
      Since:
      Offer Client 2.0.2
    • isAppliedToSaleRecurringPrice

      public boolean isAppliedToSaleRecurringPrice()
      Whether the sale recurring price or the standard recurring price was adjusted.
      Since:
      Offer Client 2.0.2
    • getQuantity

      public int getQuantity()
      The total quantity across all price variations of this item.
    • getSavings

      public javax.money.MonetaryAmount getSavings()
      The total savings across all itemResponseDetails. This does not include futureCreditSavings.
    • getAdjustedTotal

      public javax.money.MonetaryAmount getAdjustedTotal()
      The total final price of this item with adjustments applied.
    • getRecurringAdjustedTotal

      public javax.money.MonetaryAmount getRecurringAdjustedTotal()
      The final recurring (a.k.a., subscription) price of this item with adjustments applied.
      Since:
      Offer Client 2.0.2
    • getFutureCreditSavings

      public javax.money.MonetaryAmount getFutureCreditSavings()
      The future credit savings across itemResponseDetails, indicated by Adjustment.isFutureCredit().
    • getRecurringSavings

      public javax.money.MonetaryAmount getRecurringSavings()
      The savings to apply to recurring (a.k.a., subscription) prices.
      Since:
      Offer Client 2.0.2
    • isFreeTrialApplied

      public boolean isFreeTrialApplied()
      Whether a free trial offer was applied.
      Since:
      Offer Client 2.0.2
    • setItemId

      public void setItemId(String itemId)
      The id for the LineItem that this ItemResponse represents.
    • setItemResponseDetails

      public void setItemResponseDetails(List<ItemResponseDetail<P>> itemResponseDetails)
      Detailed pricing information for this item. See ItemResponseDetail for more info.
    • setProratedAdjustments

      public void setProratedAdjustments(List<ProratedOfferAdjustment> proratedAdjustments)
      Prorated adjustment information for this line item. The prorated adjustments typically come from order or fulfillment group level offers.
    • setBasePricePerItem

      public void setBasePricePerItem(javax.money.MonetaryAmount basePricePerItem)
      The original unadjusted price for each item.
    • setBaseRecurringPricePerItem

      public void setBaseRecurringPricePerItem(RecurringPriceDetail baseRecurringPricePerItem)
      The original unadjusted recurring price for each item used for discount calculations.
      Since:
      Offer Client 2.0.2
    • setAppliedToSalePrice

      public void setAppliedToSalePrice(boolean appliedToSalePrice)
      Whether the sale price or the standard price was adjusted.
      Since:
      Offer Client 2.0.2
    • setAppliedToSaleRecurringPrice

      public void setAppliedToSaleRecurringPrice(boolean appliedToSaleRecurringPrice)
      Whether the sale recurring price or the standard recurring price was adjusted.
      Since:
      Offer Client 2.0.2
    • setQuantity

      public void setQuantity(int quantity)
      The total quantity across all price variations of this item.
    • setSavings

      public void setSavings(javax.money.MonetaryAmount savings)
      The total savings across all itemResponseDetails. This does not include futureCreditSavings.
    • setAdjustedTotal

      public void setAdjustedTotal(javax.money.MonetaryAmount adjustedTotal)
      The total final price of this item with adjustments applied.
    • setRecurringAdjustedTotal

      public void setRecurringAdjustedTotal(javax.money.MonetaryAmount recurringAdjustedTotal)
      The final recurring (a.k.a., subscription) price of this item with adjustments applied.
      Since:
      Offer Client 2.0.2
    • setFutureCreditSavings

      public void setFutureCreditSavings(javax.money.MonetaryAmount futureCreditSavings)
      The future credit savings across itemResponseDetails, indicated by Adjustment.isFutureCredit().
    • setRecurringSavings

      public void setRecurringSavings(javax.money.MonetaryAmount recurringSavings)
      The savings to apply to recurring (a.k.a., subscription) prices.
      Since:
      Offer Client 2.0.2
    • setFreeTrialApplied

      public void setFreeTrialApplied(boolean freeTrialApplied)
      Whether a free trial offer was applied.
      Since:
      Offer Client 2.0.2
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object