@@ -42,7 +42,8 @@ final case class Client(code: ClientID)
42
42
final case class ClientID (id : UUID )
43
43
44
44
/**
45
- * A promotion for a [[Client client ]], with an expiry date, containing promotion lines for some products.
45
+ * A promotion for a [[Client client ]], with an expiry date, containing
46
+ * [[PromotionLine promotion lines ]] for some [[Product products ]].
46
47
*/
47
48
final case class Promotion (client : Client , expiryDate : LocalDateTime , lines : NonEmptyList [PromotionLine ])
48
49
@@ -51,7 +52,8 @@ final case class Promotion(client: Client, expiryDate: LocalDateTime, lines: Non
51
52
*/
52
53
enum PromotionLine (val product : Product ):
53
54
/**
54
- * This promotion line specifies the discounted product and how much to discount it by.
55
+ * This promotion line specifies the discounted [[Product product ]] and
56
+ * [[DiscountPercentage how much to discount it by ]].
55
57
*
56
58
* Every order line which contains the product is discounted by the specified amount.
57
59
*
@@ -61,7 +63,8 @@ enum PromotionLine(val product: Product):
61
63
case Fixed (override val product : Product , discount : DiscountPercentage ) extends PromotionLine (product)
62
64
63
65
/**
64
- * This promotion line specifies the discounted product, the threshold and how much to discount it by.
66
+ * This promotion line specifies the discounted [[Product product ]],
67
+ * the [[ThresholdQuantity threshold ]] and [[DiscountPercentage how much to discount it by ]].
65
68
*
66
69
* Only the products above the threshold are discounted; the other ones are at full price.
67
70
*
0 commit comments