1 /**
2 * @schema OrderChange
3 * type: object
4 * description: The order change's details.
5 * x-schemaName: OrderChange
6 * required:
7 * - id
8 * - version
9 * - order_id
10 * - return_id
11 * - exchange_id
12 * - claim_id
13 * - order
14 * - return_order
15 * - exchange
16 * - claim
17 * - actions
18 * - status
19 * - requested_by
20 * - requested_at
21 * - confirmed_by
22 * - confirmed_at
23 * - declined_by
24 * - declined_reason
25 * - metadata
26 * - declined_at
27 * - canceled_by
28 * - canceled_at
29 * - created_at
30 * - updated_at
31 * properties:
32 * id:
33 * type: string
34 * title: id
35 * description: The order change's ID.
36 * version:
37 * type: number
38 * title: version
39 * description: The order change's version. This will be the order's version when the change is applied.
40 * change_type:
41 * type: string
42 * description: The order change's type.
43 * enum:
44 * - return
45 * - exchange
46 * - claim
47 * - edit
48 * order_id:
49 * type: string
50 * title: order_id
51 * description: The ID of the order this change applies on.
52 * return_id:
53 * type: string
54 * title: return_id
55 * description: The ID of the associated return.
56 * exchange_id:
57 * type: string
58 * title: exchange_id
59 * description: The ID of the associated exchange.
60 * claim_id:
61 * type: string
62 * title: claim_id
63 * description: The ID of the associated claim.
64 * order:
65 * $ref: "#/components/schemas/Order"
66 * return_order:
67 * $ref: "#/components/schemas/Return"
68 * exchange:
69 * $ref: "#/components/schemas/OrderExchange"
70 * claim:
71 * $ref: "#/components/schemas/OrderClaim"
72 * actions:
73 * type: array
74 * description: The order change's actions.
75 * items:
76 * $ref: "#/components/schemas/OrderChangeAction"
77 * status:
78 * type: string
79 * description: The order change's status.
80 * enum:
81 * - canceled
82 * - requested
83 * - pending
84 * - confirmed
85 * - declined
86 * requested_by:
87 * type: string
88 * title: requested_by
89 * description: The ID of the user that requested the change.
90 * requested_at:
91 * type: string
92 * title: requested_at
93 * description: The date the order change was requested.
94 * format: date-time
95 * confirmed_by:
96 * type: string
97 * title: confirmed_by
98 * description: The ID of the user that confirmed the order change.
99 * confirmed_at:
100 * type: string
101 * title: confirmed_at
102 * description: The date the order change was confirmed.
103 * format: date-time
104 * declined_by:
105 * type: string
106 * title: declined_by
107 * description: The ID of the user that declined the order change.
108 * declined_reason:
109 * type: string
110 * title: declined_reason
111 * description: The reason the order change was declined.
112 * metadata:
113 * type: object
114 * description: The order change's metadata, can hold custom key-value pairs.
115 * externalDocs:
116 * url: https://docs.medusajs.com/api/store#manage-metadata
117 * description: Learn how to manage metadata
118 * declined_at:
119 * type: string
120 * title: declined_at
121 * description: The date the order change was declined.
122 * format: date-time
123 * canceled_by:
124 * type: string
125 * title: canceled_by
126 * description: The ID of the user that canceled the order change.
127 * canceled_at:
128 * type: string
129 * title: canceled_at
130 * description: The date the order change was canceled.
131 * format: date-time
132 * created_at:
133 * type: string
134 * format: date-time
135 * title: created_at
136 * description: The date the order change was created.
137 * updated_at:
138 * type: string
139 * format: date-time
140 * title: updated_at
141 * description: The date the order change was updated.
142 * carry_over_promotions:
143 * type: boolean
144 * title: carry_over_promotions
145 * description: Whether promotions from the original order should be carried over to the order change (specifically, exchanges).
146 * no_notification:
147 * type: boolean
148 * title: no_notification
149 * description: Whether to send notifications to the customer regarding the order change's updates.
150 *
151 */
152