Represents a free gift product sku awarded by a promotion or reward. When added to the cart it contributes a zero-cost line item for the gifted sku, and when converted to a debit it records the gift as a free-gift debit so it appears in fulfilment and reporting.
Implements: IPromotionItem
Properties
| Property | Returns | Description |
|---|---|---|
| currency | Currency | The currency associated with the promotion that granted this gift. The gift itself is always zero cost. |
| giftSku | ProductSku | The product sku awarded as the free gift. |
| promotion | RewardFolder | The reward or promotion folder that granted this gift. |
Methods
getGiftSku()
Returns: ProductSku
The product sku awarded as the free gift.
getPromotion()
Returns: RewardFolder
The reward or promotion folder that granted this gift.
getCurrency()
Returns: Currency
The currency associated with the promotion that granted this gift. The gift itself is always zero cost.
addToCart(List<ShoppingCartItemBean> scib)
Returns: void
Adds a zero-cost line item for the gifted sku to the cart, using the sku's title as the description and the promotion's href as the item link.
| Parameter | Description |
|---|---|
scib | the list of shopping cart items to add the gift line item to |
addToDebits(List<DebitItem> debitList)
Returns: void
Adds a zero-amount debit item of type "free-gift" for the gifted sku, so the gift is recorded even though no currency is actually debited.
| Parameter | Description |
|---|---|
debitList | the list of debit items to add the gift debit to |