1 /**
2 * @schema AdminOrderPreview
3 * type: object
4 * description: A preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
5 * x-schemaName: AdminOrderPreview
6 * required:
7 * - return_requested_total
8 * - order_change
9 * - items
10 * - id
11 * - version
12 * - region_id
13 * - customer_id
14 * - sales_channel_id
15 * - email
16 * - currency_code
17 * - status
18 * - payment_collections
19 * - payment_status
20 * - fulfillment_status
21 * - summary
22 * - created_at
23 * - updated_at
24 * - original_item_total
25 * - original_item_subtotal
26 * - original_item_tax_total
27 * - item_total
28 * - item_subtotal
29 * - item_tax_total
30 * - item_discount_total
31 * - original_total
32 * - original_subtotal
33 * - original_tax_total
34 * - total
35 * - subtotal
36 * - tax_total
37 * - discount_total
38 * - discount_tax_total
39 * - gift_card_total
40 * - gift_card_tax_total
41 * - shipping_total
42 * - shipping_subtotal
43 * - shipping_tax_total
44 * - shipping_discount_total
45 * - original_shipping_total
46 * - original_shipping_subtotal
47 * - original_shipping_tax_total
48 * - credit_line_total
49 * properties:
50 * return_requested_total:
51 * type: number
52 * title: return_requested_total
53 * description: The total of the requested return.
54 * order_change:
55 * $ref: "#/components/schemas/AdminOrderChange"
56 * items:
57 * type: array
58 * description: The order's items.
59 * items:
60 * $ref: "#/components/schemas/AdminOrderLinePreview"
61 * shipping_methods:
62 * type: array
63 * description: The order's shipping methods.
64 * items:
65 * allOf:
66 * - $ref: "#/components/schemas/BaseOrderShippingMethod"
67 * - type: object
68 * description: The shipping method's details.
69 * properties:
70 * actions:
71 * type: array
72 * description: The actions applied on the shipping method.
73 * items:
74 * $ref: "#/components/schemas/BaseOrderChangeAction"
75 * currency_code:
76 * type: string
77 * title: currency_code
78 * description: The order's currency code.
79 * version:
80 * type: number
81 * title: version
82 * description: The order's version when this preview is applied.
83 * id:
84 * type: string
85 * title: id
86 * description: The order's ID.
87 * region_id:
88 * type: string
89 * title: region_id
90 * description: The ID of the order's associated region.
91 * customer_id:
92 * type: string
93 * title: customer_id
94 * description: The ID of the customer that placed the order.
95 * sales_channel_id:
96 * type: string
97 * title: sales_channel_id
98 * description: The ID of the sales channel that the order was placed in.
99 * email:
100 * type: string
101 * title: email
102 * description: The email of the customer that placed the order.
103 * format: email
104 * display_id:
105 * type: number
106 * title: display_id
107 * description: The order's display ID.
108 * shipping_address:
109 * $ref: "#/components/schemas/AdminOrderAddress"
110 * billing_address:
111 * $ref: "#/components/schemas/AdminOrderAddress"
112 * payment_collections:
113 * type: array
114 * description: The order's payment collections.
115 * items:
116 * $ref: "#/components/schemas/AdminPaymentCollection"
117 * payment_status:
118 * type: string
119 * description: The order's payment status.
120 * enum:
121 * - canceled
122 * - not_paid
123 * - awaiting
124 * - authorized
125 * - partially_authorized
126 * - captured
127 * - partially_captured
128 * - partially_refunded
129 * - refunded
130 * - requires_action
131 * fulfillments:
132 * type: array
133 * description: The order's fulfillments.
134 * items:
135 * $ref: "#/components/schemas/AdminOrderFulfillment"
136 * fulfillment_status:
137 * type: string
138 * description: The order's fulfillment status.
139 * enum:
140 * - canceled
141 * - not_fulfilled
142 * - partially_fulfilled
143 * - fulfilled
144 * - partially_shipped
145 * - shipped
146 * - partially_delivered
147 * - delivered
148 * transactions:
149 * type: array
150 * description: The order's transactions.
151 * items:
152 * $ref: "#/components/schemas/BaseOrderTransaction"
153 * summary:
154 * $ref: "#/components/schemas/BaseOrderSummary"
155 * metadata:
156 * type: object
157 * description: The order's metadata, can hold custom key-value pairs.
158 * externalDocs:
159 * url: https://docs.medusajs.com/api/admin#manage-metadata
160 * description: Learn how to manage metadata
161 * created_at:
162 * type: string
163 * format: date-time
164 * title: created_at
165 * description: The date the order was created.
166 * updated_at:
167 * type: string
168 * format: date-time
169 * title: updated_at
170 * description: The date the order was updated.
171 * original_item_total:
172 * type: number
173 * title: original_item_total
174 * description: The total of the order's items including taxes, excluding promotions.
175 * original_item_subtotal:
176 * type: number
177 * title: original_item_subtotal
178 * description: The total of the order's items excluding taxes, including promotions.
179 * original_item_tax_total:
180 * type: number
181 * title: original_item_tax_total
182 * description: The tax total of the order's items excluding promotions.
183 * item_total:
184 * type: number
185 * title: item_total
186 * description: The total of the order's items including taxes and promotions.
187 * item_subtotal:
188 * type: number
189 * title: item_subtotal
190 * description: The total of the order's items excluding taxes, including promotions.
191 * item_tax_total:
192 * type: number
193 * title: item_tax_total
194 * description: The tax total of the order's items including promotions.
195 * original_total:
196 * type: number
197 * title: original_total
198 * description: The order's total excluding promotions, including taxes.
199 * original_subtotal:
200 * type: number
201 * title: original_subtotal
202 * description: The order's total excluding taxes, including promotions.
203 * original_tax_total:
204 * type: number
205 * title: original_tax_total
206 * description: The order's tax total, excluding promotions.
207 * total:
208 * type: number
209 * title: total
210 * description: The order's total including taxes and promotions.
211 * subtotal:
212 * type: number
213 * title: subtotal
214 * description: The order's total excluding taxes, including promotions.
215 * tax_total:
216 * type: number
217 * title: tax_total
218 * description: The order's tax total including promotions.
219 * discount_total:
220 * type: number
221 * title: discount_total
222 * description: The order's discount or promotions total.
223 * discount_tax_total:
224 * type: number
225 * title: discount_tax_total
226 * description: The tax total of order's discount or promotion.
227 * gift_card_total:
228 * type: number
229 * title: gift_card_total
230 * description: The order's gift card total.
231 * gift_card_tax_total:
232 * type: number
233 * title: gift_card_tax_total
234 * description: The tax total of the order's gift card.
235 * shipping_total:
236 * type: number
237 * title: shipping_total
238 * description: The order's shipping total including taxes and promotions.
239 * shipping_subtotal:
240 * type: number
241 * title: shipping_subtotal
242 * description: The order's shipping total excluding taxes, including promotions.
243 * shipping_tax_total:
244 * type: number
245 * title: shipping_tax_total
246 * description: The tax total of the order's shipping.
247 * original_shipping_total:
248 * type: number
249 * title: original_shipping_total
250 * description: The order's shipping total including taxes, excluding promotions.
251 * original_shipping_subtotal:
252 * type: number
253 * title: original_shipping_subtotal
254 * description: The order's shipping total excluding taxes, including promotions.
255 * original_shipping_tax_total:
256 * type: number
257 * title: original_shipping_tax_total
258 * description: The tax total of the order's shipping excluding promotions.
259 * customer:
260 * $ref: "#/components/schemas/AdminCustomer"
261 * sales_channel:
262 * $ref: "#/components/schemas/AdminSalesChannel"
263 * status:
264 * type: string
265 * title: status
266 * description: The order's status.
267 * region:
268 * $ref: "#/components/schemas/AdminRegion"
269 * credit_lines:
270 * type: array
271 * description: The order preview's credit lines.
272 * items:
273 * $ref: "#/components/schemas/OrderCreditLine"
274 * credit_line_total:
275 * type: number
276 * title: credit_line_total
277 * description: The order preview's credit line total.
278 * item_discount_total:
279 * type: number
280 * title: item_discount_total
281 * description: The total discount amount applied on the order's items.
282 * shipping_discount_total:
283 * type: number
284 * title: shipping_discount_total
285 * description: The total discount amount applied on the order's shipping.
286 * custom_display_id:
287 * type: string
288 * title: custom_display_id
289 * description: The custom display ID of the order.
290 * externalDocs:
291 * url: https://docs.medusajs.com/resources/commerce-modules/order/custom-display-id
292 *
293 */
294