1 /**
2 * @oas [get] /admin/payments/payment-providers
3 * operationId: GetPaymentsPaymentProviders
4 * summary: List Payment Providers
5 * description: Retrieve a list of payment providers. The payment providers can be filtered by fields such as `id`. The payment providers can also be sorted or paginated.
6 * x-authenticated: true
7 * parameters:
8 * - name: fields
9 * in: query
10 * 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
11 * fields. without prefix it will replace the entire default fields.
12 * required: false
13 * schema:
14 * type: string
15 * title: fields
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 * externalDocs:
19 * url: "#select-fields-and-relations"
20 * - name: offset
21 * in: query
22 * description: The number of items to skip when retrieving a list.
23 * required: false
24 * schema:
25 * type: number
26 * title: offset
27 * description: The number of items to skip when retrieving a list.
28 * externalDocs:
29 * url: "#pagination"
30 * - name: limit
31 * in: query
32 * description: Limit the number of items returned in the list.
33 * required: false
34 * schema:
35 * type: number
36 * title: limit
37 * description: Limit the number of items returned in the list.
38 * externalDocs:
39 * url: "#pagination"
40 * - name: order
41 * in: query
42 * description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
43 * required: false
44 * schema:
45 * type: string
46 * title: order
47 * description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
48 * - name: id
49 * in: query
50 * required: true
51 * schema:
52 * oneOf:
53 * - type: string
54 * title: id
55 * description: Filter by a payment provider's ID.
56 * - type: array
57 * description: Filter by payment provider IDs.
58 * items:
59 * type: string
60 * title: id
61 * description: A payment provider ID.
62 * - name: is_enabled
63 * in: query
64 * description: Filter by whether the payment provider is enabled.
65 * required: false
66 * schema:
67 * type: boolean
68 * title: is_enabled
69 * description: Filter by whether the payment provider is enabled.
70 * - name: $and
71 * in: query
72 * required: false
73 * schema:
74 * type: array
75 * description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
76 * items:
77 * type: object
78 * title: $and
79 * - name: $or
80 * in: query
81 * required: false
82 * schema:
83 * type: array
84 * description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
85 * items:
86 * type: object
87 * title: $or
88 * - name: with_deleted
89 * in: query
90 * description: Whether to include deleted records in the result.
91 * required: false
92 * schema:
93 * type: boolean
94 * title: with_deleted
95 * description: Whether to include deleted records in the result.
96 * security:
97 * - api_token: []
98 * - cookie_auth: []
99 * - jwt_token: []
100 * x-codeSamples:
101 * - lang: JavaScript
102 * label: JS SDK
103 * source: |-
104 * import Medusa from "@medusajs/js-sdk"
105 *
106 * export const sdk = new Medusa({
107 * baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
108 * debug: import.meta.env.DEV,
109 * auth: {
110 * type: "session",
111 * },
112 * })
113 *
114 * sdk.admin.payment.listPaymentProviders()
115 * .then(({ payment_providers, count, limit, offset }) => {
116 * console.log(payment_providers)
117 * })
118 * - lang: Shell
119 * label: cURL
120 * source: |-
121 * curl '{backend_url}/admin/payments/payment-providers' \
122 * -H 'Authorization: Bearer {jwt_token}'
123 * tags:
124 * - Payments
125 * responses:
126 * "200":
127 * description: OK
128 * content:
129 * application/json:
130 * schema:
131 * allOf:
132 * - type: object
133 * description: The list of payment providers.
134 * required:
135 * - limit
136 * - offset
137 * - count
138 * properties:
139 * limit:
140 * type: number
141 * title: limit
142 * description: The maximum number of items returned.
143 * offset:
144 * type: number
145 * title: offset
146 * description: The number of items skipped before the returned items.
147 * count:
148 * type: number
149 * title: count
150 * description: The total number of items.
151 * - type: object
152 * description: The paginated list of payment providers.
153 * required:
154 * - payment_providers
155 * properties:
156 * payment_providers:
157 * type: array
158 * description: The list of payment providers.
159 * items:
160 * $ref: "#/components/schemas/AdminPaymentProvider"
161 * "400":
162 * $ref: "#/components/responses/400_error"
163 * "401":
164 * $ref: "#/components/responses/unauthorized"
165 * "404":
166 * $ref: "#/components/responses/not_found_error"
167 * "409":
168 * $ref: "#/components/responses/invalid_state_error"
169 * "422":
170 * $ref: "#/components/responses/invalid_request_error"
171 * "500":
172 * $ref: "#/components/responses/500_error"
173 *
174 */
175