Class FreeGiftItem
java.lang.Object
com.broadleafcommerce.promotion.offer.client.web.context.info.FreeGiftItem
- All Implemented Interfaces:
Serializable
Represents a free gift item to be automatically added to cart from free gift offers.
- Author:
- Sunny Yu
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanTheAdjustmentfor this free gift item.Indicates the cost of the free gift item.A reference to theOfferRef.The sku of the item to be automatically added.intThe quantity of the item to be automatically added.inthashCode()voidsetAdjustment(Adjustment adjustment) TheAdjustmentfor this free gift item.voidsetGiftFee(ItemProrationDetail giftFee) Indicates the cost of the free gift item.voidsetOfferRef(OfferRef offerRef) A reference to theOfferRef.voidsetProductId(String productId) The sku of the item to be automatically added.voidsetQuantity(int quantity) The quantity of the item to be automatically added.toString()
-
Constructor Details
-
FreeGiftItem
public FreeGiftItem()
-
-
Method Details
-
getOfferRef
A reference to theOfferRef. -
getProductId
The sku of the item to be automatically added. -
getQuantity
public int getQuantity()The quantity of the item to be automatically added. -
getAdjustment
TheAdjustmentfor this free gift item. Note that if this item has agiftFee, the adjustment amount is not known during offer evaluation. It is up to the consumer to determine the adjustment amount based on thegiftFeeand the price of the item. -
getGiftFee
Indicates the cost of the free gift item. TheItemProrationDetail.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
A reference to theOfferRef. -
setProductId
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
TheAdjustmentfor this free gift item. Note that if this item has agiftFee, the adjustment amount is not known during offer evaluation. It is up to the consumer to determine the adjustment amount based on thegiftFeeand the price of the item. -
setGiftFee
Indicates the cost of the free gift item. TheItemProrationDetail.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
-
canEqual
-
hashCode
public int hashCode() -
toString
-