forked from OMGStandards/DigitalReceipt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathamountmodifier.yaml
215 lines (206 loc) · 7.01 KB
/
amountmodifier.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
AmountModificationRule:
description: |
Rule that is used to modify the amounts at transaction and item level.
type: object
properties:
amountModificationRuleID:
description: |
A unique identifier of the Amount Modification Rule that was used
to calculate new amount.
type: string
amountModificationTypeCode:
description: |
The type of amount modifiction.
It can be percentage or amount off, or replacing the whole
amount with a new value
$ref: "#/AmountModificationTypeCodeEnum"
amount:
description: |
The amount of the modification if rule type is AmountOff or NewAmount.
$ref: "common.yaml#/MonetaryAmount"
percent:
description: |
Percent value of the modification if rule type is PercentOff.
$ref: "common.yaml#/DecimalString"
manualFlag:
description: |
A flag that indicates that amount modification was triggered by
manual actions of the Operator.
type: boolean
default: false
employeeFlag:
description: |
A flag that indicates that amount modification was triggered by some
Employee reward program. In this case purchasing Employee should
be captured as part of the transaction.
type: boolean
default: false
name:
description: |
Name of the amount modification rule.
type: string
description:
description: |
Description of the amount modification rule.
type: string
promotionID:
description: |
Unique identifier for the Promotion associated with the amount
modification.
type: string
promotionName:
description: |
Name of the promotion associated with amount modification.
type: string
amountModificationLevel:
description: |
Level at wich amount modification rule is applied.
It can be Item, Group, or Transaction.
$ref: "#/AmountModificationLevelEnum"
additionalProperties: false
AmountModificationTypeCodeEnum:
description: |
Defines the type of amount modification.
type: string
enum:
- PercentOff
- AmountOff
- NewAmount
AmountModificationLevelEnum:
description: |
Defines the level of amount modification.
type: string
enum:
- Item
- Group
- Transaction
AmountModificationTrigger:
description: |
Trigger that causes the amount modification.
type: object
properties:
triggerType:
description: |
Type of amount modification trigger.
$ref: "#/AmountModificationTriggerTypeEnum"
rewardCoupon:
description: |
Reward Coupon that was part of the amount modification trigger.
$ref: "reward-coupon.yaml#/RewardCoupon"
additionalProperties: false
AmountModificationTriggerTypeEnum:
description: |
Type of the amount modification trigger.
Triggers can be of the following types:
Coupon - amount modification was triggered by applying a coupon.
AutoCoupon - amount modification was triggered by auto-coupon.
type: string
enum:
- Coupon
- AutoCoupon
AmountModifier:
description: |
An adjustment that is applied to a monetary amount, expressed as either a
percentage of the monetary amount or a flat amount that is added or subtracted.
type: object
properties:
amount:
description: |
The amount of modification expressed in terms of default currency,
specified in the transaction header.
$ref: "common.yaml#/MonetaryAmount"
actionCode:
description: |
Amount modification action code that describes if the amount was
modified as subtraction, addition, or replacement.
$ref: "#/AmountModificationActionEnum"
sequenceNumber:
description: |
A sequence number of the amount modifier.
It is used when multiple amount modifiers are applied to the same
line item. The order in which different amount modifiers are applied
is important.
type: integer
format: int32
amountBefore:
description: |
The amount before the modification.
$ref: "common.yaml#/MonetaryAmount"
amountAfter:
description: |
The amount after the modification.
$ref: "common.yaml#/MonetaryAmount"
aggregationIndex:
description: |
An index associated with a particlar transaction or group level rule.
Such index allows to pull together all modification related to the
same application of a particular rule. It is necessary since
all the amount modifiers prorated to line item level.
type: integer
format: int32
amountModificationRule:
description: |
Rule that was used to get this amount modification.
$ref: "#/AmountModificationRule"
amountModificationTrigger:
description: |
Trigger for this amount modification.
$ref: "#/AmountModificationTrigger"
controlledOperation:
description: |
Additional control information about manual amount modifiction.
$ref: "common.yaml#/ControlledOperation"
extensibilityData:
description: |
Data that provides extensibility to the defined data structure.
This property is an array of DataSets where each DataSet is a
named collection of name-value pairs.
$ref: "common.yaml#/ExtensibilityData"
required:
- amount
- actionCode
additionalProperties: false
AmountModifierCollection:
description: |
Collection of the Amount Modifiers.
type: array
items:
$ref: "#/AmountModifier"
AmountModificationActionEnum:
description: |
Enumeration of actions used to modify amounts.
type: string
enum:
- Add
- Subtract
- Replace
PriceOverride:
description: |
Manual price override. This is different from manual amount |
modifications such as discounts and markdowns. The Price |
Override is used to override price that was obtained as |
initial price lookup when it is necessary to establish correct |
unit price. For example, it could happen if item is not on file.
type: object
properties:
lookupUnitPrice:
description: |
Unit price that was obtained as part of item lookup.
$ref: "common.yaml#/MonetaryAmount"
overrideUnitPrice:
description: |
New unit price specified by the Operator.
$ref: "common.yaml#/MonetaryAmount"
controlledOperation:
description: |
Additional control information about Price Override.
$ref: "common.yaml#/ControlledOperation"
extensibilityData:
description: |
Data that provides extensibility to the defined data structure.
This property is an array of DataSets where each DataSet is a
named collection of name-value pairs.
$ref: "common.yaml#/ExtensibilityData"
required:
- overrideUnitPrice
additionalProperties: false