|
1
|
/** |
|
2
|
* @schema Order |
|
3
|
* type: object |
|
4
|
* description: The order change's order. |
|
5
|
* x-schemaName: Order |
|
6
|
* required: |
|
7
|
* - id |
|
8
|
* - version |
|
9
|
* - display_id |
|
10
|
* - status |
|
11
|
* - currency_code |
|
12
|
* - created_at |
|
13
|
* - updated_at |
|
14
|
* - original_item_total |
|
15
|
* - original_item_subtotal |
|
16
|
* - original_item_tax_total |
|
17
|
* - item_total |
|
18
|
* - item_subtotal |
|
19
|
* - item_tax_total |
|
20
|
* - item_discount_total |
|
21
|
* - original_total |
|
22
|
* - original_subtotal |
|
23
|
* - original_tax_total |
|
24
|
* - total |
|
25
|
* - subtotal |
|
26
|
* - tax_total |
|
27
|
* - discount_subtotal |
|
28
|
* - discount_total |
|
29
|
* - discount_tax_total |
|
30
|
* - credit_line_total |
|
31
|
* - gift_card_total |
|
32
|
* - gift_card_tax_total |
|
33
|
* - shipping_total |
|
34
|
* - shipping_subtotal |
|
35
|
* - shipping_tax_total |
|
36
|
* - shipping_discount_total |
|
37
|
* - original_shipping_total |
|
38
|
* - original_shipping_subtotal |
|
39
|
* - original_shipping_tax_total |
|
40
|
* properties: |
|
41
|
* id: |
|
42
|
* type: string |
|
43
|
* title: id |
|
44
|
* description: The order's ID. |
|
45
|
* version: |
|
46
|
* type: number |
|
47
|
* title: version |
|
48
|
* description: The order's version. |
|
49
|
* order_change: |
|
50
|
* $ref: "#/components/schemas/OrderChange" |
|
51
|
* status: |
|
52
|
* type: string |
|
53
|
* description: The order's status. |
|
54
|
* enum: |
|
55
|
* - canceled |
|
56
|
* - requires_action |
|
57
|
* - pending |
|
58
|
* - completed |
|
59
|
* - draft |
|
60
|
* - archived |
|
61
|
* region_id: |
|
62
|
* type: string |
|
63
|
* title: region_id |
|
64
|
* description: The ID of the region the order belongs to. |
|
65
|
* customer_id: |
|
66
|
* type: string |
|
67
|
* title: customer_id |
|
68
|
* description: The ID of the customer that placed the order. |
|
69
|
* sales_channel_id: |
|
70
|
* type: string |
|
71
|
* title: sales_channel_id |
|
72
|
* description: The ID of the sales channel the order was placed in. |
|
73
|
* email: |
|
74
|
* type: string |
|
75
|
* title: email |
|
76
|
* description: The email of the customer that placed the order. |
|
77
|
* format: email |
|
78
|
* currency_code: |
|
79
|
* type: string |
|
80
|
* title: currency_code |
|
81
|
* description: The order's currency code. |
|
82
|
* example: usd |
|
83
|
* shipping_address: |
|
84
|
* $ref: "#/components/schemas/OrderAddress" |
|
85
|
* billing_address: |
|
86
|
* $ref: "#/components/schemas/OrderAddress" |
|
87
|
* items: |
|
88
|
* type: array |
|
89
|
* description: The order's items. |
|
90
|
* items: |
|
91
|
* $ref: "#/components/schemas/OrderLineItem" |
|
92
|
* shipping_methods: |
|
93
|
* type: array |
|
94
|
* description: The order's shipping methods. |
|
95
|
* items: |
|
96
|
* $ref: "#/components/schemas/OrderShippingMethod" |
|
97
|
* transactions: |
|
98
|
* type: array |
|
99
|
* description: The order's transactions. |
|
100
|
* items: |
|
101
|
* $ref: "#/components/schemas/OrderTransaction" |
|
102
|
* summary: |
|
103
|
* type: object |
|
104
|
* description: The order's summary. |
|
105
|
* properties: |
|
106
|
* pending_difference: |
|
107
|
* type: number |
|
108
|
* title: pending_difference |
|
109
|
* description: The remaining amount to be paid or refunded. |
|
110
|
* current_order_total: |
|
111
|
* type: number |
|
112
|
* title: current_order_total |
|
113
|
* description: The order's current total. |
|
114
|
* original_order_total: |
|
115
|
* type: number |
|
116
|
* title: original_order_total |
|
117
|
* description: The order's total before any changes. |
|
118
|
* transaction_total: |
|
119
|
* type: number |
|
120
|
* title: transaction_total |
|
121
|
* description: The total of the transactions (payments and refunds) made on the order. |
|
122
|
* paid_total: |
|
123
|
* type: number |
|
124
|
* title: paid_total |
|
125
|
* description: The total paid amount. |
|
126
|
* refunded_total: |
|
127
|
* type: number |
|
128
|
* title: refunded_total |
|
129
|
* description: The total refunded amount. |
|
130
|
* credit_line_total: |
|
131
|
* type: number |
|
132
|
* title: credit_line_total |
|
133
|
* description: The total credit line amount. |
|
134
|
* accounting_total: |
|
135
|
* type: number |
|
136
|
* title: accounting_total |
|
137
|
* description: The total amount for accounting purposes. |
|
138
|
* raw_pending_difference: |
|
139
|
* type: object |
|
140
|
* description: The summary's raw pending difference. |
|
141
|
* raw_current_order_total: |
|
142
|
* type: object |
|
143
|
* description: The summary's raw current order total. |
|
144
|
* raw_original_order_total: |
|
145
|
* type: object |
|
146
|
* description: The summary's raw original order total. |
|
147
|
* raw_transaction_total: |
|
148
|
* type: object |
|
149
|
* description: The summary's raw transaction total. |
|
150
|
* raw_paid_total: |
|
151
|
* type: object |
|
152
|
* description: The summary's raw paid total. |
|
153
|
* raw_refunded_total: |
|
154
|
* type: object |
|
155
|
* description: The summary's raw refunded total. |
|
156
|
* raw_credit_line_total: |
|
157
|
* type: object |
|
158
|
* description: The summary's raw credit line total. |
|
159
|
* raw_accounting_total: |
|
160
|
* type: object |
|
161
|
* description: The summary's raw accounting total. |
|
162
|
* required: |
|
163
|
* - pending_difference |
|
164
|
* - current_order_total |
|
165
|
* - original_order_total |
|
166
|
* - transaction_total |
|
167
|
* - paid_total |
|
168
|
* - refunded_total |
|
169
|
* - credit_line_total |
|
170
|
* - accounting_total |
|
171
|
* - raw_pending_difference |
|
172
|
* - raw_current_order_total |
|
173
|
* - raw_original_order_total |
|
174
|
* - raw_transaction_total |
|
175
|
* - raw_paid_total |
|
176
|
* - raw_refunded_total |
|
177
|
* - raw_credit_line_total |
|
178
|
* - raw_accounting_total |
|
179
|
* metadata: |
|
180
|
* type: object |
|
181
|
* description: The order's metadata, can hold custom key-value pairs. |
|
182
|
* externalDocs: |
|
183
|
* url: https://docs.medusajs.com/api/store#manage-metadata |
|
184
|
* description: Learn how to manage metadata |
|
185
|
* canceled_at: |
|
186
|
* type: string |
|
187
|
* format: date-time |
|
188
|
* title: canceled_at |
|
189
|
* description: The date the order was canceled. |
|
190
|
* created_at: |
|
191
|
* type: string |
|
192
|
* format: date-time |
|
193
|
* title: created_at |
|
194
|
* description: The date the order was created. |
|
195
|
* updated_at: |
|
196
|
* type: string |
|
197
|
* format: date-time |
|
198
|
* title: updated_at |
|
199
|
* description: The date the order was updated. |
|
200
|
* original_item_total: |
|
201
|
* type: number |
|
202
|
* title: original_item_total |
|
203
|
* description: The order items' total including taxes, excluding promotions. |
|
204
|
* original_item_subtotal: |
|
205
|
* type: number |
|
206
|
* title: original_item_subtotal |
|
207
|
* description: The order items' total excluding taxes, including promotions. |
|
208
|
* original_item_tax_total: |
|
209
|
* type: number |
|
210
|
* title: original_item_tax_total |
|
211
|
* description: The taxes total for order items, excluding promotions. |
|
212
|
* item_total: |
|
213
|
* type: number |
|
214
|
* title: item_total |
|
215
|
* description: The order items' total including taxes and promotions. |
|
216
|
* item_subtotal: |
|
217
|
* type: number |
|
218
|
* title: item_subtotal |
|
219
|
* description: The order items' total excluding taxes, including promotions. |
|
220
|
* item_tax_total: |
|
221
|
* type: number |
|
222
|
* title: item_tax_total |
|
223
|
* description: The tax total of the order items including promotions. |
|
224
|
* original_total: |
|
225
|
* type: number |
|
226
|
* title: original_total |
|
227
|
* description: The order's total including taxes, excluding promotions. |
|
228
|
* original_subtotal: |
|
229
|
* type: number |
|
230
|
* title: original_subtotal |
|
231
|
* description: The order's total excluding taxes, including promotions. |
|
232
|
* original_tax_total: |
|
233
|
* type: number |
|
234
|
* title: original_tax_total |
|
235
|
* description: The tax total of the order excluding promotions. |
|
236
|
* total: |
|
237
|
* type: number |
|
238
|
* title: total |
|
239
|
* description: The order's total including taxes and promotions. |
|
240
|
* subtotal: |
|
241
|
* type: number |
|
242
|
* title: subtotal |
|
243
|
* description: The order's subtotal excluding taxes, including promotions. |
|
244
|
* tax_total: |
|
245
|
* type: number |
|
246
|
* title: tax_total |
|
247
|
* description: The tax total of the order including promotions. |
|
248
|
* discount_subtotal: |
|
249
|
* type: number |
|
250
|
* title: discount_subtotal |
|
251
|
* description: The total discount excluding taxes. |
|
252
|
* discount_total: |
|
253
|
* type: number |
|
254
|
* title: discount_total |
|
255
|
* description: The total discount including taxes. |
|
256
|
* discount_tax_total: |
|
257
|
* type: number |
|
258
|
* title: discount_tax_total |
|
259
|
* description: The tax total applied on the discount. |
|
260
|
* gift_card_total: |
|
261
|
* type: number |
|
262
|
* title: gift_card_total |
|
263
|
* description: The order's gift card total. |
|
264
|
* gift_card_tax_total: |
|
265
|
* type: number |
|
266
|
* title: gift_card_tax_total |
|
267
|
* description: The order's gift card tax total. |
|
268
|
* shipping_total: |
|
269
|
* type: number |
|
270
|
* title: shipping_total |
|
271
|
* description: The order's shipping total including taxes and promotions. |
|
272
|
* shipping_subtotal: |
|
273
|
* type: number |
|
274
|
* title: shipping_subtotal |
|
275
|
* description: The order's shipping total excluding taxes, including promotions. |
|
276
|
* shipping_tax_total: |
|
277
|
* type: number |
|
278
|
* title: shipping_tax_total |
|
279
|
* description: The total taxes of the order's shipping including taxes. |
|
280
|
* original_shipping_total: |
|
281
|
* type: number |
|
282
|
* title: original_shipping_total |
|
283
|
* description: The order's shipping total including taxes, excluding promotions. |
|
284
|
* original_shipping_subtotal: |
|
285
|
* type: number |
|
286
|
* title: original_shipping_subtotal |
|
287
|
* description: The order's shipping total excluding taxes, including promotions. |
|
288
|
* original_shipping_tax_total: |
|
289
|
* type: number |
|
290
|
* title: original_shipping_tax_total |
|
291
|
* description: The total taxes of the order's shipping excluding promotions. |
|
292
|
* display_id: |
|
293
|
* type: number |
|
294
|
* title: display_id |
|
295
|
* description: The order's display ID. |
|
296
|
* credit_lines: |
|
297
|
* type: array |
|
298
|
* description: The order's credit lines, useful to add additional payment amounts for an order. |
|
299
|
* items: |
|
300
|
* $ref: "#/components/schemas/OrderCreditLine" |
|
301
|
* is_draft_order: |
|
302
|
* type: boolean |
|
303
|
* title: is_draft_order |
|
304
|
* description: Whether the order is a draft order. |
|
305
|
* deleted_at: |
|
306
|
* type: string |
|
307
|
* format: date-time |
|
308
|
* title: deleted_at |
|
309
|
* description: The date the order was deleted. |
|
310
|
* credit_line_total: |
|
311
|
* type: number |
|
312
|
* title: credit_line_total |
|
313
|
* description: The order's credit line total. |
|
314
|
* item_discount_total: |
|
315
|
* type: number |
|
316
|
* title: item_discount_total |
|
317
|
* description: The total discount amount applied on the order's items. |
|
318
|
* shipping_discount_total: |
|
319
|
* type: number |
|
320
|
* title: shipping_discount_total |
|
321
|
* description: The total discount amount applied on the order's shipping. |
|
322
|
* custom_display_id: |
|
323
|
* type: string |
|
324
|
* title: custom_display_id |
|
325
|
* description: The custom display ID of the order. |
|
326
|
* externalDocs: |
|
327
|
* url: https://docs.medusajs.com/resources/commerce-modules/order/custom-display-id |
|
328
|
* locale: |
|
329
|
* type: string |
|
330
|
* title: locale |
|
331
|
* description: The order's locale in [BCP 47](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1) format. |
|
332
|
* example: en-US |
|
333
|
* |
|
334
|
*/ |
|
335
|
|