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 boolean
boolean
TheAdjustment
for 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.int
The quantity of the item to be automatically added.int
hashCode()
void
setAdjustment
(Adjustment adjustment) TheAdjustment
for this free gift item.void
setGiftFee
(ItemProrationDetail giftFee) Indicates the cost of the free gift item.void
setOfferRef
(OfferRef offerRef) A reference to theOfferRef
.void
setProductId
(String productId) The sku of the item to be automatically added.void
setQuantity
(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
TheAdjustment
for 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 thegiftFee
and 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
TheAdjustment
for 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 thegiftFee
and 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
-