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