1 /**
2 * @schema AdminPromotion
3 * type: object
4 * description: The promotion's details.
5 * x-schemaName: AdminPromotion
6 * required:
7 * - id
8 * - created_at
9 * - updated_at
10 * - deleted_at
11 * properties:
12 * application_method:
13 * $ref: "#/components/schemas/AdminApplicationMethod"
14 * rules:
15 * type: array
16 * description: The promotion's rules.
17 * items:
18 * $ref: "#/components/schemas/AdminPromotionRule"
19 * id:
20 * type: string
21 * title: id
22 * description: The promotion's ID.
23 * code:
24 * type: string
25 * title: code
26 * description: The promotion's code.
27 * example: OFF50
28 * type:
29 * type: string
30 * description: The promotion's type.
31 * enum:
32 * - standard
33 * - buyget
34 * is_automatic:
35 * type: boolean
36 * title: is_automatic
37 * description: Whether the promotion is applied on a cart automatically if it matches the promotion's rules.
38 * campaign_id:
39 * type: string
40 * title: campaign_id
41 * description: The ID of the campaign this promotion belongs to.
42 * campaign:
43 * $ref: "#/components/schemas/AdminCampaign"
44 * created_at:
45 * type: string
46 * format: date-time
47 * title: created_at
48 * description: The date the promotion was created.
49 * updated_at:
50 * type: string
51 * format: date-time
52 * title: updated_at
53 * description: The date the promotion was updated.
54 * deleted_at:
55 * type: string
56 * format: date-time
57 * title: deleted_at
58 * description: The date the promotion was deleted.
59 * status:
60 * type: string
61 * description: The promotion's status.
62 * enum:
63 * - draft
64 * - active
65 * - inactive
66 * is_tax_inclusive:
67 * type: boolean
68 * title: is_tax_inclusive
69 * description: Whether the promotion is tax inclusive. If enabled, the promotion is applied after tax is calculated.
70 * limit:
71 * type: number
72 * title: limit
73 * description: The limit of times the promotion can be used.
74 * used:
75 * type: number
76 * title: used
77 * description: The number of times the promotion has been used.
78 * metadata:
79 * type: object
80 * description: Custom key-value pairs for the promotion.
81 *
82 */
83