1 /**
2 * @schema AdminApplicationMethod
3 * type: object
4 * description: The application method's details.
5 * x-schemaName: AdminApplicationMethod
6 * required:
7 * - id
8 * properties:
9 * promotion:
10 * $ref: "#/components/schemas/AdminPromotion"
11 * target_rules:
12 * type: array
13 * description: The application method's target rules.
14 * items:
15 * $ref: "#/components/schemas/AdminPromotionRule"
16 * buy_rules:
17 * type: array
18 * description: The application method's buy rules.
19 * items:
20 * $ref: "#/components/schemas/AdminPromotionRule"
21 * id:
22 * type: string
23 * title: id
24 * description: The application method's ID.
25 * type:
26 * type: string
27 * description: The application method's type. If it's `fixed`, the promotion discounts a fixed amount. If it's `percentage`, the promotion discounts a percentage.
28 * enum:
29 * - fixed
30 * - percentage
31 * target_type:
32 * type: string
33 * description: Which item does the promotion apply to. `items` mean the promotion applies to the cart's items; `shipping_methods` means the promotion applies to the cart's shipping methods; `order`
34 * means the promotion applies on the entire order.
35 * enum:
36 * - items
37 * - shipping_methods
38 * - order
39 * allocation:
40 * type: string
41 * description: How is the promotion amount discounted. `each` means the discounted amount is applied on each applicable item; `across` means the discounted amount is split accross the applicable items.
42 * enum:
43 * - each
44 * - across
45 * value:
46 * type: number
47 * title: value
48 * description: The amount to be discounted.
49 * currency_code:
50 * type: string
51 * title: currency_code
52 * description: The application method's currency code.
53 * example: usd
54 * max_quantity:
55 * type: number
56 * title: max_quantity
57 * description: The max quantity allowed in the cart for the associated promotion to be applied.
58 * buy_rules_min_quantity:
59 * type: number
60 * title: buy_rules_min_quantity
61 * description: The minimum quantity required for a `buyget` promotion to be applied. For example, if the promotion is a "Buy 2 shirts get 1 free", the value of this attribute is `2`.
62 * apply_to_quantity:
63 * type: number
64 * title: apply_to_quantity
65 * description: The quantity that results from matching the `buyget` promotion's condition. For example, if the promotion is a "Buy 2 shirts get 1 free", the value of this attribute is `1`.
66 *
67 */
68