Records that a promotion has been applied to a shopping cart, keeping the code the shopper entered as well as the promotion it resolved to. A cart can carry more than one of these, and they can be listed by cart or by shopper and code, which is how repeat use of a promo code is detected. The cart and the promotion must belong to the same account.

Group: Database Entities

Implements: Serializable


Properties

PropertyReturnsDescription
adminOrgOrganisationThe Kademi account holder that owns both the cart and the promotion. Applying a promotion from a different account is rejected.
cartCartThe shopping cart the promotion was applied to.
idlongThe database identifier of this applied promotion.
orderedDateDateWhen the promotion was applied to the cart, as a timestamp. Never null.
promoCodeStringThe code the shopper typed in to claim the promotion, kept exactly as entered and limited to 1000 characters. Searching on it together with the shopper is how previous uses of a code are found.
promotionRewardThe promotion that was activated, which is held as a Reward. It must belong to the same account as the cart.

Methods

getId() · getAdminOrg() · setAdminOrg(Organisation adminOrg) · getOrderedDate() · setOrderedDate(Date orderedDate) · getPromoCode() · setPromoCode(String promoCode) · getPromotion() · setPromotion(Reward promotion) · getCart() · setCart(Cart cart)

getId()

Returns: long

The database identifier of this applied promotion.

getAdminOrg()

Returns: Organisation

The Kademi account holder that owns both the cart and the promotion. Applying a promotion from a different account is rejected.

setAdminOrg(Organisation adminOrg)

Returns: void

Sets the Kademi account holder that owns the cart and the promotion.

ParameterDescription
adminOrgthe owning account

getOrderedDate()

Returns: Date

When the promotion was applied to the cart, as a timestamp. Never null.

setOrderedDate(Date orderedDate)

Returns: void

Sets when the promotion was applied to the cart.

ParameterDescription
orderedDatethe date and time the promotion was applied

getPromoCode()

Returns: String

The code the shopper typed in to claim the promotion, kept exactly as entered and limited to 1000 characters. Searching on it together with the shopper is how previous uses of a code are found.

setPromoCode(String promoCode)

Returns: void

Sets the code the shopper typed in to claim the promotion.

ParameterDescription
promoCodethe promo code as entered, at most 1000 characters

getPromotion()

Returns: Reward

The promotion that was activated, which is held as a Reward. It must belong to the same account as the cart.

setPromotion(Reward promotion)

Returns: void

Sets the promotion that was activated.

ParameterDescription
promotionthe promotion applied to the cart

getCart()

Returns: Cart

The shopping cart the promotion was applied to.

setCart(Cart cart)

Returns: void

Sets the shopping cart the promotion was applied to.

ParameterDescription
cartthe cart carrying this promotion
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.