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

public class FreeGiftItem extends Object implements Serializable
Represents a free gift item to be automatically added to cart from free gift offers.
Author:
Sunny Yu
See Also:
  • Constructor Details

    • FreeGiftItem

      public FreeGiftItem()
  • Method Details

    • getOfferRef

      public OfferRef getOfferRef()
      A reference to the OfferRef.
    • getProductId

      public String getProductId()
      The sku of the item to be automatically added.
    • getQuantity

      public int getQuantity()
      The quantity of the item to be automatically added.
    • getAdjustment

      public Adjustment getAdjustment()
      The Adjustment for this free gift item. Note that if this item has a giftFee, the adjustment amount is not known during offer evaluation. It is up to the consumer to determine the adjustment amount based on the giftFee and the price of the item.
    • getGiftFee

      public ItemProrationDetail getGiftFee()
      Indicates the cost of the free gift item. The ItemProrationDetail.getUnitAmount() is the price of the item. If this field is not null, the item is technically not free, but instead is an offer that behaves the same as a "free" gift item, but has a cost.
    • setOfferRef

      public void setOfferRef(OfferRef offerRef)
      A reference to the OfferRef.
    • setProductId

      public void setProductId(String productId)
      The sku of the item to be automatically added.
    • setQuantity

      public void setQuantity(int quantity)
      The quantity of the item to be automatically added.
    • setAdjustment

      public void setAdjustment(Adjustment adjustment)
      The Adjustment for this free gift item. Note that if this item has a giftFee, the adjustment amount is not known during offer evaluation. It is up to the consumer to determine the adjustment amount based on the giftFee and the price of the item.
    • setGiftFee

      public void setGiftFee(ItemProrationDetail giftFee)
      Indicates the cost of the free gift item. The ItemProrationDetail.getUnitAmount() is the price of the item. If this field is not null, the item is technically not free, but instead is an offer that behaves the same as a "free" gift item, but has a cost.
    • 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