1 /**
2 * @oas [post] /admin/refund-reasons/{id}
3 * operationId: PostRefundReasonsId
4 * summary: Update a Refund Reason
5 * description: Update a refund reason's details.
6 * x-authenticated: true
7 * parameters:
8 * - name: id
9 * in: path
10 * description: The refund reason's ID.
11 * required: true
12 * schema:
13 * type: string
14 * - name: fields
15 * in: query
16 * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
17 * fields. without prefix it will replace the entire default fields.
18 * required: false
19 * schema:
20 * type: string
21 * title: fields
22 * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
23 * fields. without prefix it will replace the entire default fields.
24 * externalDocs:
25 * url: "#select-fields-and-relations"
26 * security:
27 * - api_token: []
28 * - cookie_auth: []
29 * - jwt_token: []
30 * requestBody:
31 * content:
32 * application/json:
33 * schema:
34 * $ref: "#/components/schemas/AdminUpdateRefundReason"
35 * x-codeSamples:
36 * - lang: JavaScript
37 * label: JS SDK
38 * source: |-
39 * import Medusa from "@medusajs/js-sdk"
40 *
41 * export const sdk = new Medusa({
42 * baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
43 * debug: import.meta.env.DEV,
44 * auth: {
45 * type: "session",
46 * },
47 * })
48 *
49 * sdk.admin.refundReason.update("ret_123", {
50 * code: "refund",
51 * label: "Refund",
52 * })
53 * .then(({ refund_reason }) => {
54 * console.log(refund_reason)
55 * })
56 * - lang: Shell
57 * label: cURL
58 * source: |-
59 * curl -X POST '{backend_url}/admin/refund-reasons/{id}' \
60 * -H 'Authorization: Bearer {jwt_token}' \
61 * -H 'Content-Type: application/json' \
62 * --data-raw '{
63 * "description": "{value}"
64 * }'
65 * tags:
66 * - Refund Reasons
67 * responses:
68 * "200":
69 * description: OK
70 * content:
71 * application/json:
72 * schema:
73 * $ref: "#/components/schemas/RefundReasonResponse"
74 * "400":
75 * $ref: "#/components/responses/400_error"
76 * "401":
77 * $ref: "#/components/responses/unauthorized"
78 * "404":
79 * $ref: "#/components/responses/not_found_error"
80 * "409":
81 * $ref: "#/components/responses/invalid_state_error"
82 * "422":
83 * $ref: "#/components/responses/invalid_request_error"
84 * "500":
85 * $ref: "#/components/responses/500_error"
86 * x-workflow: updateRefundReasonsWorkflow
87 * x-events: []
88 *
89 */
90