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