1 /**
2 * @schema OrderExchange
3 * type: object
4 * description: The order change's exchange.
5 * x-schemaName: OrderExchange
6 * required:
7 * - id
8 * - order_id
9 * - order_version
10 * - display_id
11 * - additional_items
12 * - metadata
13 * properties:
14 * order_id:
15 * type: string
16 * title: order_id
17 * description: The ID of the order the exchange is created for.
18 * additional_items:
19 * type: array
20 * description: The new items (outbound) sent by the exchange.
21 * items:
22 * $ref: "#/components/schemas/BaseExchangeItem"
23 * no_notification:
24 * type: boolean
25 * title: no_notification
26 * description: Whether to send the customer notifications when the exchange is updated.
27 * difference_due:
28 * type: number
29 * title: difference_due
30 * description: The amount to be exchanged or refunded. If the amount is negative, it must be refunded. If positive, additional payment is required from the customer.
31 * return:
32 * $ref: "#/components/schemas/Return"
33 * return_id:
34 * type: string
35 * title: return_id
36 * description: The ID of the associated exchange.
37 * id:
38 * type: string
39 * title: id
40 * description: The exchange's ID.
41 * display_id:
42 * type: number
43 * title: display_id
44 * description: The exchange's display ID.
45 * shipping_methods:
46 * type: array
47 * description: The shipping methods used to send the new (outbound) items.
48 * items:
49 * $ref: "#/components/schemas/OrderShippingMethod"
50 * transactions:
51 * type: array
52 * description: The exchange's transactions.
53 * externalDocs:
54 * url: https://docs.medusajs.com/resources/commerce-modules/order/transactions
55 * items:
56 * $ref: "#/components/schemas/OrderTransaction"
57 * metadata:
58 * type: object
59 * description: The exchange's metadata, can hold custom key-value pairs.
60 * externalDocs:
61 * url: https://docs.medusajs.com/api/store#manage-metadata
62 * description: Learn how to manage metadata
63 * created_at:
64 * type: string
65 * format: date-time
66 * title: created_at
67 * description: The date that the exchange was created.
68 * updated_at:
69 * type: string
70 * format: date-time
71 * title: updated_at
72 * description: The date that the exchange was updated.
73 * order:
74 * $ref: "#/components/schemas/Order"
75 * order_version:
76 * type: number
77 * title: order_version
78 * description: The version of the order when the exchange is applied.
79 * raw_difference_due:
80 * oneOf:
81 * - type: string
82 * title: raw_difference_due
83 * description: The exchange's raw difference due.
84 * - type: number
85 * title: raw_difference_due
86 * description: The exchange's raw difference due.
87 * - type: string
88 * title: raw_difference_due
89 * description: The exchange's raw difference due.
90 * - type: number
91 * title: raw_difference_due
92 * description: The exchange's raw difference due.
93 * allow_backorder:
94 * type: boolean
95 * title: allow_backorder
96 * description: Whether variants that are out of stock can be added to the exchange as outbound items.
97 * created_by:
98 * type: string
99 * title: created_by
100 * description: The ID of the user that created the exchange.
101 * deleted_at:
102 * type: string
103 * format: date-time
104 * title: deleted_at
105 * description: The date the exchange was deleted.
106 * canceled_at:
107 * type: string
108 * title: canceled_at
109 * description: The date the exchange was canceled.
110 * format: date-time
111 *
112 */
113