@gr4vy/sdk 1.5.7 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/examples/package-lock.json +1 -1
  2. package/jsr.json +1 -1
  3. package/lib/config.d.ts +3 -3
  4. package/lib/config.js +3 -3
  5. package/models/components/index.d.ts +1 -0
  6. package/models/components/index.d.ts.map +1 -1
  7. package/models/components/index.js +1 -0
  8. package/models/components/index.js.map +1 -1
  9. package/models/components/monatospeioptions.d.ts +32 -0
  10. package/models/components/monatospeioptions.d.ts.map +1 -0
  11. package/models/components/monatospeioptions.js +78 -0
  12. package/models/components/monatospeioptions.js.map +1 -0
  13. package/models/components/transactionconnectionoptions.d.ts +6 -0
  14. package/models/components/transactionconnectionoptions.d.ts.map +1 -1
  15. package/models/components/transactionconnectionoptions.js +5 -0
  16. package/models/components/transactionconnectionoptions.js.map +1 -1
  17. package/package.json +1 -1
  18. package/src/lib/config.ts +3 -3
  19. package/src/models/components/index.ts +1 -0
  20. package/src/models/components/monatospeioptions.ts +78 -0
  21. package/src/models/components/transactionconnectionoptions.ts +15 -0
  22. package/docs/sdks/all/README.md +0 -98
  23. package/docs/sdks/auditlogs/README.md +0 -100
  24. package/docs/sdks/balances/README.md +0 -123
  25. package/docs/sdks/buyers/README.md +0 -461
  26. package/docs/sdks/cardschemedefinitions/README.md +0 -96
  27. package/docs/sdks/checkoutsessions/README.md +0 -367
  28. package/docs/sdks/cryptogram/README.md +0 -103
  29. package/docs/sdks/digitalwallets/README.md +0 -465
  30. package/docs/sdks/domains/README.md +0 -197
  31. package/docs/sdks/events/README.md +0 -99
  32. package/docs/sdks/executions/README.md +0 -285
  33. package/docs/sdks/giftcards/README.md +0 -376
  34. package/docs/sdks/gr4vygiftcards/README.md +0 -98
  35. package/docs/sdks/gr4vypaymentmethods/README.md +0 -96
  36. package/docs/sdks/gr4vyrefunds/README.md +0 -279
  37. package/docs/sdks/jobs/README.md +0 -107
  38. package/docs/sdks/merchantaccounts/README.md +0 -382
  39. package/docs/sdks/networktokens/README.md +0 -467
  40. package/docs/sdks/paymentlinks/README.md +0 -381
  41. package/docs/sdks/paymentmethods/README.md +0 -376
  42. package/docs/sdks/paymentoptions/README.md +0 -97
  43. package/docs/sdks/paymentservicedefinitions/README.md +0 -281
  44. package/docs/sdks/paymentservices/README.md +0 -706
  45. package/docs/sdks/paymentservicetokens/README.md +0 -286
  46. package/docs/sdks/payouts/README.md +0 -298
  47. package/docs/sdks/refunds/README.md +0 -97
  48. package/docs/sdks/reportexecutions/README.md +0 -100
  49. package/docs/sdks/reports/README.md +0 -403
  50. package/docs/sdks/sessions/README.md +0 -289
  51. package/docs/sdks/settlements/README.md +0 -188
  52. package/docs/sdks/shippingdetails/README.md +0 -462
  53. package/docs/sdks/transactions/README.md +0 -752
  54. package/examples/README.md +0 -31
@@ -1,286 +0,0 @@
1
- # PaymentServiceTokens
2
- (*paymentMethods.paymentServiceTokens*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [list](#list) - List payment service tokens
9
- * [create](#create) - Create payment service token
10
- * [delete](#delete) - Delete payment service token
11
-
12
- ## list
13
-
14
- List all gateway tokens stored for a payment method.
15
-
16
- ### Example Usage
17
-
18
- <!-- UsageSnippet language="typescript" operationID="list_payment_method_payment_service_tokens" method="get" path="/payment-methods/{payment_method_id}/payment-service-tokens" -->
19
- ```typescript
20
- import { Gr4vy, withToken } from "@gr4vy/sdk";
21
- import fs from "fs";
22
-
23
- const gr4vy = new Gr4vy({
24
- id: "example",
25
- server: "sandbox",
26
- merchantAccountId: "default",
27
- bearerAuth: withToken({
28
- privateKey: fs.readFileSync("private_key.pem", "utf8"),
29
- }),
30
- });
31
-
32
- async function run() {
33
- const result = await gr4vy.paymentMethods.paymentServiceTokens.list("ef9496d8-53a5-4aad-8ca2-00eb68334389");
34
-
35
- console.log(result);
36
- }
37
-
38
- run();
39
- ```
40
-
41
- ### Standalone function
42
-
43
- The standalone function version of this method:
44
-
45
- ```typescript
46
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
47
- import { paymentMethodsPaymentServiceTokensList } from "@gr4vy/sdk/funcs/paymentMethodsPaymentServiceTokensList.js";
48
-
49
- // Use `Gr4vyCore` for best tree-shaking performance.
50
- // You can create one instance of it to use across an application.
51
- const gr4vy = new Gr4vyCore({
52
- merchantAccountId: "<id>",
53
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
54
- });
55
-
56
- async function run() {
57
- const res = await paymentMethodsPaymentServiceTokensList(gr4vy, "ef9496d8-53a5-4aad-8ca2-00eb68334389");
58
- if (res.ok) {
59
- const { value: result } = res;
60
- console.log(result);
61
- } else {
62
- console.log("paymentMethodsPaymentServiceTokensList failed:", res.error);
63
- }
64
- }
65
-
66
- run();
67
- ```
68
-
69
- ### Parameters
70
-
71
- | Parameter | Type | Required | Description | Example |
72
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
73
- | `paymentMethodId` | *string* | :heavy_check_mark: | The ID of the payment method | [object Object] |
74
- | `paymentServiceId` | *string* | :heavy_minus_sign: | The ID of the payment service | [object Object] |
75
- | `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | |
76
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
77
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | |
78
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
79
-
80
- ### Response
81
-
82
- **Promise\<[components.PaymentServiceTokens](../../models/components/paymentservicetokens.md)\>**
83
-
84
- ### Errors
85
-
86
- | Error Type | Status Code | Content Type |
87
- | -------------------------- | -------------------------- | -------------------------- |
88
- | errors.Error400 | 400 | application/json |
89
- | errors.Error401 | 401 | application/json |
90
- | errors.Error403 | 403 | application/json |
91
- | errors.Error404 | 404 | application/json |
92
- | errors.Error405 | 405 | application/json |
93
- | errors.Error409 | 409 | application/json |
94
- | errors.HTTPValidationError | 422 | application/json |
95
- | errors.Error425 | 425 | application/json |
96
- | errors.Error429 | 429 | application/json |
97
- | errors.Error500 | 500 | application/json |
98
- | errors.Error502 | 502 | application/json |
99
- | errors.Error504 | 504 | application/json |
100
- | errors.SDKError | 4XX, 5XX | \*/\* |
101
-
102
- ## create
103
-
104
- Create a gateway tokens for a payment method.
105
-
106
- ### Example Usage
107
-
108
- <!-- UsageSnippet language="typescript" operationID="create_payment_method_payment_service_token" method="post" path="/payment-methods/{payment_method_id}/payment-service-tokens" -->
109
- ```typescript
110
- import { Gr4vy, withToken } from "@gr4vy/sdk";
111
- import fs from "fs";
112
-
113
- const gr4vy = new Gr4vy({
114
- id: "example",
115
- server: "sandbox",
116
- merchantAccountId: "default",
117
- bearerAuth: withToken({
118
- privateKey: fs.readFileSync("private_key.pem", "utf8"),
119
- }),
120
- });
121
-
122
- async function run() {
123
- const result = await gr4vy.paymentMethods.paymentServiceTokens.create({
124
- paymentServiceId: "fffd152a-9532-4087-9a4f-de58754210f0",
125
- redirectUrl: "https://dual-futon.biz",
126
- }, "ef9496d8-53a5-4aad-8ca2-00eb68334389");
127
-
128
- console.log(result);
129
- }
130
-
131
- run();
132
- ```
133
-
134
- ### Standalone function
135
-
136
- The standalone function version of this method:
137
-
138
- ```typescript
139
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
140
- import { paymentMethodsPaymentServiceTokensCreate } from "@gr4vy/sdk/funcs/paymentMethodsPaymentServiceTokensCreate.js";
141
-
142
- // Use `Gr4vyCore` for best tree-shaking performance.
143
- // You can create one instance of it to use across an application.
144
- const gr4vy = new Gr4vyCore({
145
- merchantAccountId: "<id>",
146
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
147
- });
148
-
149
- async function run() {
150
- const res = await paymentMethodsPaymentServiceTokensCreate(gr4vy, {
151
- paymentServiceId: "fffd152a-9532-4087-9a4f-de58754210f0",
152
- redirectUrl: "https://dual-futon.biz",
153
- }, "ef9496d8-53a5-4aad-8ca2-00eb68334389");
154
- if (res.ok) {
155
- const { value: result } = res;
156
- console.log(result);
157
- } else {
158
- console.log("paymentMethodsPaymentServiceTokensCreate failed:", res.error);
159
- }
160
- }
161
-
162
- run();
163
- ```
164
-
165
- ### Parameters
166
-
167
- | Parameter | Type | Required | Description | Example |
168
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
169
- | `paymentMethodId` | *string* | :heavy_check_mark: | The ID of the payment method | [object Object] |
170
- | `paymentServiceTokenCreate` | [components.PaymentServiceTokenCreate](../../models/components/paymentservicetokencreate.md) | :heavy_check_mark: | N/A | |
171
- | `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | |
172
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
173
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | |
174
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
175
-
176
- ### Response
177
-
178
- **Promise\<[components.PaymentServiceToken](../../models/components/paymentservicetoken.md)\>**
179
-
180
- ### Errors
181
-
182
- | Error Type | Status Code | Content Type |
183
- | -------------------------- | -------------------------- | -------------------------- |
184
- | errors.Error400 | 400 | application/json |
185
- | errors.Error401 | 401 | application/json |
186
- | errors.Error403 | 403 | application/json |
187
- | errors.Error404 | 404 | application/json |
188
- | errors.Error405 | 405 | application/json |
189
- | errors.Error409 | 409 | application/json |
190
- | errors.HTTPValidationError | 422 | application/json |
191
- | errors.Error425 | 425 | application/json |
192
- | errors.Error429 | 429 | application/json |
193
- | errors.Error500 | 500 | application/json |
194
- | errors.Error502 | 502 | application/json |
195
- | errors.Error504 | 504 | application/json |
196
- | errors.SDKError | 4XX, 5XX | \*/\* |
197
-
198
- ## delete
199
-
200
- Delete a gateway tokens for a payment method.
201
-
202
- ### Example Usage
203
-
204
- <!-- UsageSnippet language="typescript" operationID="delete_payment_method_payment_service_token" method="delete" path="/payment-methods/{payment_method_id}/payment-service-tokens/{payment_service_token_id}" -->
205
- ```typescript
206
- import { Gr4vy, withToken } from "@gr4vy/sdk";
207
- import fs from "fs";
208
-
209
- const gr4vy = new Gr4vy({
210
- id: "example",
211
- server: "sandbox",
212
- merchantAccountId: "default",
213
- bearerAuth: withToken({
214
- privateKey: fs.readFileSync("private_key.pem", "utf8"),
215
- }),
216
- });
217
-
218
- async function run() {
219
- await gr4vy.paymentMethods.paymentServiceTokens.delete("ef9496d8-53a5-4aad-8ca2-00eb68334389", "703f2d99-3fd1-44bc-9cbd-a25a2d597886");
220
-
221
-
222
- }
223
-
224
- run();
225
- ```
226
-
227
- ### Standalone function
228
-
229
- The standalone function version of this method:
230
-
231
- ```typescript
232
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
233
- import { paymentMethodsPaymentServiceTokensDelete } from "@gr4vy/sdk/funcs/paymentMethodsPaymentServiceTokensDelete.js";
234
-
235
- // Use `Gr4vyCore` for best tree-shaking performance.
236
- // You can create one instance of it to use across an application.
237
- const gr4vy = new Gr4vyCore({
238
- merchantAccountId: "<id>",
239
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
240
- });
241
-
242
- async function run() {
243
- const res = await paymentMethodsPaymentServiceTokensDelete(gr4vy, "ef9496d8-53a5-4aad-8ca2-00eb68334389", "703f2d99-3fd1-44bc-9cbd-a25a2d597886");
244
- if (res.ok) {
245
- const { value: result } = res;
246
-
247
- } else {
248
- console.log("paymentMethodsPaymentServiceTokensDelete failed:", res.error);
249
- }
250
- }
251
-
252
- run();
253
- ```
254
-
255
- ### Parameters
256
-
257
- | Parameter | Type | Required | Description | Example |
258
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
259
- | `paymentMethodId` | *string* | :heavy_check_mark: | The ID of the payment method | [object Object] |
260
- | `paymentServiceTokenId` | *string* | :heavy_check_mark: | The ID of the payment service token | [object Object] |
261
- | `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | |
262
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
263
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | |
264
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
265
-
266
- ### Response
267
-
268
- **Promise\<void\>**
269
-
270
- ### Errors
271
-
272
- | Error Type | Status Code | Content Type |
273
- | -------------------------- | -------------------------- | -------------------------- |
274
- | errors.Error400 | 400 | application/json |
275
- | errors.Error401 | 401 | application/json |
276
- | errors.Error403 | 403 | application/json |
277
- | errors.Error404 | 404 | application/json |
278
- | errors.Error405 | 405 | application/json |
279
- | errors.Error409 | 409 | application/json |
280
- | errors.HTTPValidationError | 422 | application/json |
281
- | errors.Error425 | 425 | application/json |
282
- | errors.Error429 | 429 | application/json |
283
- | errors.Error500 | 500 | application/json |
284
- | errors.Error502 | 502 | application/json |
285
- | errors.Error504 | 504 | application/json |
286
- | errors.SDKError | 4XX, 5XX | \*/\* |
@@ -1,298 +0,0 @@
1
- # Payouts
2
- (*payouts*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [list](#list) - List payouts created
9
- * [create](#create) - Create a payout
10
- * [get](#get) - Get a payout
11
-
12
- ## list
13
-
14
- Returns a list of payouts made.
15
-
16
- ### Example Usage
17
-
18
- <!-- UsageSnippet language="typescript" operationID="list_payouts" method="get" path="/payouts" -->
19
- ```typescript
20
- import { Gr4vy, withToken } from "@gr4vy/sdk";
21
- import fs from "fs";
22
-
23
- const gr4vy = new Gr4vy({
24
- id: "example",
25
- server: "sandbox",
26
- merchantAccountId: "default",
27
- bearerAuth: withToken({
28
- privateKey: fs.readFileSync("private_key.pem", "utf8"),
29
- }),
30
- });
31
-
32
- async function run() {
33
- const result = await gr4vy.payouts.list();
34
-
35
- for await (const page of result) {
36
- console.log(page);
37
- }
38
- }
39
-
40
- run();
41
- ```
42
-
43
- ### Standalone function
44
-
45
- The standalone function version of this method:
46
-
47
- ```typescript
48
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
49
- import { payoutsList } from "@gr4vy/sdk/funcs/payoutsList.js";
50
-
51
- // Use `Gr4vyCore` for best tree-shaking performance.
52
- // You can create one instance of it to use across an application.
53
- const gr4vy = new Gr4vyCore({
54
- merchantAccountId: "<id>",
55
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
56
- });
57
-
58
- async function run() {
59
- const res = await payoutsList(gr4vy);
60
- if (res.ok) {
61
- const { value: result } = res;
62
- for await (const page of result) {
63
- console.log(page);
64
- }
65
- } else {
66
- console.log("payoutsList failed:", res.error);
67
- }
68
- }
69
-
70
- run();
71
- ```
72
-
73
- ### Parameters
74
-
75
- | Parameter | Type | Required | Description | Example |
76
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
77
- | `cursor` | *string* | :heavy_minus_sign: | A pointer to the page of results to return. | [object Object] |
78
- | `limit` | *number* | :heavy_minus_sign: | The maximum number of items that are at returned. | [object Object] |
79
- | `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | |
80
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
81
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | |
82
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
83
-
84
- ### Response
85
-
86
- **Promise\<[operations.ListPayoutsResponse](../../models/operations/listpayoutsresponse.md)\>**
87
-
88
- ### Errors
89
-
90
- | Error Type | Status Code | Content Type |
91
- | -------------------------- | -------------------------- | -------------------------- |
92
- | errors.Error400 | 400 | application/json |
93
- | errors.Error401 | 401 | application/json |
94
- | errors.Error403 | 403 | application/json |
95
- | errors.Error404 | 404 | application/json |
96
- | errors.Error405 | 405 | application/json |
97
- | errors.Error409 | 409 | application/json |
98
- | errors.HTTPValidationError | 422 | application/json |
99
- | errors.Error425 | 425 | application/json |
100
- | errors.Error429 | 429 | application/json |
101
- | errors.Error500 | 500 | application/json |
102
- | errors.Error502 | 502 | application/json |
103
- | errors.Error504 | 504 | application/json |
104
- | errors.SDKError | 4XX, 5XX | \*/\* |
105
-
106
- ## create
107
-
108
- Creates a new payout.
109
-
110
- ### Example Usage
111
-
112
- <!-- UsageSnippet language="typescript" operationID="create_payout" method="post" path="/payouts" -->
113
- ```typescript
114
- import { Gr4vy, withToken } from "@gr4vy/sdk";
115
- import fs from "fs";
116
-
117
- const gr4vy = new Gr4vy({
118
- id: "example",
119
- server: "sandbox",
120
- merchantAccountId: "default",
121
- bearerAuth: withToken({
122
- privateKey: fs.readFileSync("private_key.pem", "utf8"),
123
- }),
124
- });
125
-
126
- async function run() {
127
- const result = await gr4vy.payouts.create({
128
- amount: 1299,
129
- currency: "EUR",
130
- paymentServiceId: "ed8bd87d-85ad-40cf-8e8f-007e21e55aad",
131
- paymentMethod: {
132
- method: "id",
133
- id: "852b951c-d7ea-4c98-b09e-4a1c9e97c077",
134
- },
135
- });
136
-
137
- console.log(result);
138
- }
139
-
140
- run();
141
- ```
142
-
143
- ### Standalone function
144
-
145
- The standalone function version of this method:
146
-
147
- ```typescript
148
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
149
- import { payoutsCreate } from "@gr4vy/sdk/funcs/payoutsCreate.js";
150
-
151
- // Use `Gr4vyCore` for best tree-shaking performance.
152
- // You can create one instance of it to use across an application.
153
- const gr4vy = new Gr4vyCore({
154
- merchantAccountId: "<id>",
155
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
156
- });
157
-
158
- async function run() {
159
- const res = await payoutsCreate(gr4vy, {
160
- amount: 1299,
161
- currency: "EUR",
162
- paymentServiceId: "ed8bd87d-85ad-40cf-8e8f-007e21e55aad",
163
- paymentMethod: {
164
- method: "id",
165
- id: "852b951c-d7ea-4c98-b09e-4a1c9e97c077",
166
- },
167
- });
168
- if (res.ok) {
169
- const { value: result } = res;
170
- console.log(result);
171
- } else {
172
- console.log("payoutsCreate failed:", res.error);
173
- }
174
- }
175
-
176
- run();
177
- ```
178
-
179
- ### Parameters
180
-
181
- | Parameter | Type | Required | Description |
182
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
183
- | `payoutCreate` | [components.PayoutCreate](../../models/components/payoutcreate.md) | :heavy_check_mark: | N/A |
184
- | `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. |
185
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
186
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
187
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
188
-
189
- ### Response
190
-
191
- **Promise\<[components.PayoutSummary](../../models/components/payoutsummary.md)\>**
192
-
193
- ### Errors
194
-
195
- | Error Type | Status Code | Content Type |
196
- | -------------------------- | -------------------------- | -------------------------- |
197
- | errors.Error400 | 400 | application/json |
198
- | errors.Error401 | 401 | application/json |
199
- | errors.Error403 | 403 | application/json |
200
- | errors.Error404 | 404 | application/json |
201
- | errors.Error405 | 405 | application/json |
202
- | errors.Error409 | 409 | application/json |
203
- | errors.HTTPValidationError | 422 | application/json |
204
- | errors.Error425 | 425 | application/json |
205
- | errors.Error429 | 429 | application/json |
206
- | errors.Error500 | 500 | application/json |
207
- | errors.Error502 | 502 | application/json |
208
- | errors.Error504 | 504 | application/json |
209
- | errors.SDKError | 4XX, 5XX | \*/\* |
210
-
211
- ## get
212
-
213
- Retrieves a payout.
214
-
215
- ### Example Usage
216
-
217
- <!-- UsageSnippet language="typescript" operationID="get_payout" method="get" path="/payouts/{payout_id}" -->
218
- ```typescript
219
- import { Gr4vy, withToken } from "@gr4vy/sdk";
220
- import fs from "fs";
221
-
222
- const gr4vy = new Gr4vy({
223
- id: "example",
224
- server: "sandbox",
225
- merchantAccountId: "default",
226
- bearerAuth: withToken({
227
- privateKey: fs.readFileSync("private_key.pem", "utf8"),
228
- }),
229
- });
230
-
231
- async function run() {
232
- const result = await gr4vy.payouts.get("4344fef2-bc2f-49a6-924f-343e62f67224");
233
-
234
- console.log(result);
235
- }
236
-
237
- run();
238
- ```
239
-
240
- ### Standalone function
241
-
242
- The standalone function version of this method:
243
-
244
- ```typescript
245
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
246
- import { payoutsGet } from "@gr4vy/sdk/funcs/payoutsGet.js";
247
-
248
- // Use `Gr4vyCore` for best tree-shaking performance.
249
- // You can create one instance of it to use across an application.
250
- const gr4vy = new Gr4vyCore({
251
- merchantAccountId: "<id>",
252
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
253
- });
254
-
255
- async function run() {
256
- const res = await payoutsGet(gr4vy, "4344fef2-bc2f-49a6-924f-343e62f67224");
257
- if (res.ok) {
258
- const { value: result } = res;
259
- console.log(result);
260
- } else {
261
- console.log("payoutsGet failed:", res.error);
262
- }
263
- }
264
-
265
- run();
266
- ```
267
-
268
- ### Parameters
269
-
270
- | Parameter | Type | Required | Description |
271
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
272
- | `payoutId` | *string* | :heavy_check_mark: | N/A |
273
- | `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. |
274
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
275
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
276
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
277
-
278
- ### Response
279
-
280
- **Promise\<[components.PayoutSummary](../../models/components/payoutsummary.md)\>**
281
-
282
- ### Errors
283
-
284
- | Error Type | Status Code | Content Type |
285
- | -------------------------- | -------------------------- | -------------------------- |
286
- | errors.Error400 | 400 | application/json |
287
- | errors.Error401 | 401 | application/json |
288
- | errors.Error403 | 403 | application/json |
289
- | errors.Error404 | 404 | application/json |
290
- | errors.Error405 | 405 | application/json |
291
- | errors.Error409 | 409 | application/json |
292
- | errors.HTTPValidationError | 422 | application/json |
293
- | errors.Error425 | 425 | application/json |
294
- | errors.Error429 | 429 | application/json |
295
- | errors.Error500 | 500 | application/json |
296
- | errors.Error502 | 502 | application/json |
297
- | errors.Error504 | 504 | application/json |
298
- | errors.SDKError | 4XX, 5XX | \*/\* |