PromotionLine

enum PromotionLine(val product: Product)

A promotion line, which describes the promotion.

trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case Fixed

Type members

Enum entries

case Fixed(product: Product, discount: DiscountPercentage) extends PromotionLine

This promotion line specifies the discounted product and how much to discount it by.

This promotion line specifies the discounted product and how much to discount it by.

Every order line which contains the product is discounted by the specified amount.

Note:

For example, if a 100g casatella normally costs 100 cents and the promotion line specifies a 50% discount, each 100g casatella will cost 50 cents.

case Threshold(product: Product, threshold: ThresholdQuantity, discount: DiscountPercentage) extends PromotionLine

This promotion line specifies the discounted product, the threshold and how much to discount it by.

This promotion line specifies the discounted product, the threshold and how much to discount it by.

Only the products above the threshold are discounted; the other ones are at full price.

Note:

For example, if a 100g casatella normally costs 100 cents and the promotion line specifies a 50% discount above 5 casatellas, the first 5 casatella will cost 100 cents, while from the 6th onwards they will cost 50 cents each.