Class EnhancedProratedItemOfferAdjustment

java.lang.Object
com.broadleafcommerce.promotion.offer.web.context.info.EnhancedProratedItemOfferAdjustment
All Implemented Interfaces:
com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment, Serializable

public class EnhancedProratedItemOfferAdjustment extends Object implements com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment, Serializable
DTO containing prorated price adjustment information for a EnhancedLineItem caused by a CandidateItemOffer targeting it (see Offer.getTargetItemCriteria()) or using it as a qualifier (see Offer.getItemQualifierCriteria()).

If an offer's discount's proration type is ProrationType.TARGET_AND_QUALIFIER, then the discount should be spread between target items and item qualifiers. Thus, this DTO will contain the additional adjustments created for qualifiers. Practically, this information is only needed for reporting services since the total discount is the same for the EnhancedLineItem however it gets distributed amongst its individual merchandising items.

Author:
Nathan Moore (nathanmoore).
See Also:
  • Constructor Details

    • EnhancedProratedItemOfferAdjustment

      public EnhancedProratedItemOfferAdjustment()
  • Method Details

    • addSelfToParentDetail

      public void addSelfToParentDetail()
    • getLineItem

      public com.broadleafcommerce.promotion.offer.client.web.context.info.LineItemRef getLineItem()
      The LineItemRef of the EnhancedLineItem that gets this adjustment.
      Specified by:
      getLineItem in interface com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment
      Returns:
      The LineItemRef of the EnhancedLineItem that gets this adjustment.
    • getOffer

      public com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef getOffer()
      The OfferRef for the Offer that caused this adjustment to be applied.
      Specified by:
      getOffer in interface com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment
      Returns:
      The OfferRef for the Offer that caused this adjustment to be applied.
    • getAmount

      public javax.money.MonetaryAmount getAmount()
      The amount of the adjustment applied to the item.
      Specified by:
      getAmount in interface com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment
      Returns:
      The amount of the adjustment applied to the item.
    • getQuantity

      public int getQuantity()
      The quantity of merchandising items from the EnhancedLineItem to which this adjustment applies.
      Specified by:
      getQuantity in interface com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment
      Returns:
      The quantity of merchandising items from the EnhancedLineItem to which this adjustment applies.
    • getCodeUsed

      public String getCodeUsed()
      The code used (if any) that triggered the application of the offer for this adjustment.
      Specified by:
      getCodeUsed in interface com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment
      Returns:
      The code used (if any) that triggered the application of the offer for this adjustment.
    • getParentDetail

      public LineItemOfferDetail getParentDetail()
    • setLineItem

      public void setLineItem(com.broadleafcommerce.promotion.offer.client.web.context.info.LineItemRef lineItem)
      The LineItemRef of the EnhancedLineItem that gets this adjustment.
      Specified by:
      setLineItem in interface com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment
      Parameters:
      itemLineNumber - The LineItemRef of the EnhancedLineItem that gets this adjustment.
    • setOffer

      public void setOffer(com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef offer)
      The OfferRef for the Offer that caused this adjustment to be applied.
      Specified by:
      setOffer in interface com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment
      Parameters:
      offer - The OfferRef for the Offer that caused this adjustment to be applied.
    • setAmount

      public void setAmount(javax.money.MonetaryAmount amount)
      The amount of the adjustment applied to the item.
      Specified by:
      setAmount in interface com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment
      Parameters:
      amount - The amount of the adjustment applied to the item.
    • setQuantity

      public void setQuantity(int quantity)
      The quantity of merchandising items from the EnhancedLineItem to which this adjustment applies.
      Specified by:
      setQuantity in interface com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment
      Parameters:
      quantity - The quantity of merchandising items from the EnhancedLineItem to which this adjustment applies.
    • setCodeUsed

      public void setCodeUsed(String codeUsed)
      The code used (if any) that triggered the application of the offer for this adjustment.
      Specified by:
      setCodeUsed in interface com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustment
      Parameters:
      codeUsed - The code used (if any) that triggered the application of the offer for this adjustment.
    • setParentDetail

      public void setParentDetail(LineItemOfferDetail parentDetail)
    • 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