@gr4vy/sdk 1.5.8 → 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 (39) 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/package.json +1 -1
  6. package/src/lib/config.ts +3 -3
  7. package/docs/sdks/all/README.md +0 -98
  8. package/docs/sdks/auditlogs/README.md +0 -100
  9. package/docs/sdks/balances/README.md +0 -123
  10. package/docs/sdks/buyers/README.md +0 -461
  11. package/docs/sdks/cardschemedefinitions/README.md +0 -96
  12. package/docs/sdks/checkoutsessions/README.md +0 -367
  13. package/docs/sdks/cryptogram/README.md +0 -103
  14. package/docs/sdks/digitalwallets/README.md +0 -465
  15. package/docs/sdks/domains/README.md +0 -197
  16. package/docs/sdks/events/README.md +0 -99
  17. package/docs/sdks/executions/README.md +0 -285
  18. package/docs/sdks/giftcards/README.md +0 -376
  19. package/docs/sdks/gr4vygiftcards/README.md +0 -98
  20. package/docs/sdks/gr4vypaymentmethods/README.md +0 -96
  21. package/docs/sdks/gr4vyrefunds/README.md +0 -279
  22. package/docs/sdks/jobs/README.md +0 -107
  23. package/docs/sdks/merchantaccounts/README.md +0 -382
  24. package/docs/sdks/networktokens/README.md +0 -467
  25. package/docs/sdks/paymentlinks/README.md +0 -381
  26. package/docs/sdks/paymentmethods/README.md +0 -376
  27. package/docs/sdks/paymentoptions/README.md +0 -97
  28. package/docs/sdks/paymentservicedefinitions/README.md +0 -281
  29. package/docs/sdks/paymentservices/README.md +0 -706
  30. package/docs/sdks/paymentservicetokens/README.md +0 -286
  31. package/docs/sdks/payouts/README.md +0 -298
  32. package/docs/sdks/refunds/README.md +0 -97
  33. package/docs/sdks/reportexecutions/README.md +0 -100
  34. package/docs/sdks/reports/README.md +0 -403
  35. package/docs/sdks/sessions/README.md +0 -289
  36. package/docs/sdks/settlements/README.md +0 -188
  37. package/docs/sdks/shippingdetails/README.md +0 -462
  38. package/docs/sdks/transactions/README.md +0 -752
  39. package/examples/README.md +0 -31
@@ -1,382 +0,0 @@
1
- # MerchantAccounts
2
- (*merchantAccounts*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [list](#list) - List all merchant accounts
9
- * [create](#create) - Create a merchant account
10
- * [get](#get) - Get a merchant account
11
- * [update](#update) - Update a merchant account
12
-
13
- ## list
14
-
15
- List all merchant accounts in an instance.
16
-
17
- ### Example Usage
18
-
19
- <!-- UsageSnippet language="typescript" operationID="list_merchant_accounts" method="get" path="/merchant-accounts" -->
20
- ```typescript
21
- import { Gr4vy, withToken } from "@gr4vy/sdk";
22
- import fs from "fs";
23
-
24
- const gr4vy = new Gr4vy({
25
- id: "example",
26
- server: "sandbox",
27
- merchantAccountId: "default",
28
- bearerAuth: withToken({
29
- privateKey: fs.readFileSync("private_key.pem", "utf8"),
30
- }),
31
- });
32
-
33
- async function run() {
34
- const result = await gr4vy.merchantAccounts.list();
35
-
36
- for await (const page of result) {
37
- console.log(page);
38
- }
39
- }
40
-
41
- run();
42
- ```
43
-
44
- ### Standalone function
45
-
46
- The standalone function version of this method:
47
-
48
- ```typescript
49
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
50
- import { merchantAccountsList } from "@gr4vy/sdk/funcs/merchantAccountsList.js";
51
-
52
- // Use `Gr4vyCore` for best tree-shaking performance.
53
- // You can create one instance of it to use across an application.
54
- const gr4vy = new Gr4vyCore({
55
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
56
- });
57
-
58
- async function run() {
59
- const res = await merchantAccountsList(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("merchantAccountsList 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
- | `search` | *string* | :heavy_minus_sign: | The search term to filter merchant accounts by. | [object Object] |
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.ListMerchantAccountsResponse](../../models/operations/listmerchantaccountsresponse.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
- Create a new merchant account in an instance.
109
-
110
- ### Example Usage
111
-
112
- <!-- UsageSnippet language="typescript" operationID="create_merchant_account" method="post" path="/merchant-accounts" -->
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.merchantAccounts.create({
128
- accountUpdaterEnabled: true,
129
- asyncNetworkTokensEnabled: true,
130
- id: "merchant-12345",
131
- displayName: "Example",
132
- });
133
-
134
- console.log(result);
135
- }
136
-
137
- run();
138
- ```
139
-
140
- ### Standalone function
141
-
142
- The standalone function version of this method:
143
-
144
- ```typescript
145
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
146
- import { merchantAccountsCreate } from "@gr4vy/sdk/funcs/merchantAccountsCreate.js";
147
-
148
- // Use `Gr4vyCore` for best tree-shaking performance.
149
- // You can create one instance of it to use across an application.
150
- const gr4vy = new Gr4vyCore({
151
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
152
- });
153
-
154
- async function run() {
155
- const res = await merchantAccountsCreate(gr4vy, {
156
- accountUpdaterEnabled: true,
157
- asyncNetworkTokensEnabled: true,
158
- id: "merchant-12345",
159
- displayName: "Example",
160
- });
161
- if (res.ok) {
162
- const { value: result } = res;
163
- console.log(result);
164
- } else {
165
- console.log("merchantAccountsCreate failed:", res.error);
166
- }
167
- }
168
-
169
- run();
170
- ```
171
-
172
- ### Parameters
173
-
174
- | Parameter | Type | Required | Description |
175
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
176
- | `request` | [components.MerchantAccountCreate](../../models/components/merchantaccountcreate.md) | :heavy_check_mark: | The request object to use for the request. |
177
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
178
- | `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. |
179
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
180
-
181
- ### Response
182
-
183
- **Promise\<[components.MerchantAccount](../../models/components/merchantaccount.md)\>**
184
-
185
- ### Errors
186
-
187
- | Error Type | Status Code | Content Type |
188
- | -------------------------- | -------------------------- | -------------------------- |
189
- | errors.Error400 | 400 | application/json |
190
- | errors.Error401 | 401 | application/json |
191
- | errors.Error403 | 403 | application/json |
192
- | errors.Error404 | 404 | application/json |
193
- | errors.Error405 | 405 | application/json |
194
- | errors.Error409 | 409 | application/json |
195
- | errors.HTTPValidationError | 422 | application/json |
196
- | errors.Error425 | 425 | application/json |
197
- | errors.Error429 | 429 | application/json |
198
- | errors.Error500 | 500 | application/json |
199
- | errors.Error502 | 502 | application/json |
200
- | errors.Error504 | 504 | application/json |
201
- | errors.SDKError | 4XX, 5XX | \*/\* |
202
-
203
- ## get
204
-
205
- Get info about a merchant account in an instance.
206
-
207
- ### Example Usage
208
-
209
- <!-- UsageSnippet language="typescript" operationID="get_merchant_account" method="get" path="/merchant-accounts/{merchant_account_id}" -->
210
- ```typescript
211
- import { Gr4vy, withToken } from "@gr4vy/sdk";
212
- import fs from "fs";
213
-
214
- const gr4vy = new Gr4vy({
215
- id: "example",
216
- server: "sandbox",
217
- merchantAccountId: "default",
218
- bearerAuth: withToken({
219
- privateKey: fs.readFileSync("private_key.pem", "utf8"),
220
- }),
221
- });
222
-
223
- async function run() {
224
- const result = await gr4vy.merchantAccounts.get("merchant-12345");
225
-
226
- console.log(result);
227
- }
228
-
229
- run();
230
- ```
231
-
232
- ### Standalone function
233
-
234
- The standalone function version of this method:
235
-
236
- ```typescript
237
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
238
- import { merchantAccountsGet } from "@gr4vy/sdk/funcs/merchantAccountsGet.js";
239
-
240
- // Use `Gr4vyCore` for best tree-shaking performance.
241
- // You can create one instance of it to use across an application.
242
- const gr4vy = new Gr4vyCore({
243
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
244
- });
245
-
246
- async function run() {
247
- const res = await merchantAccountsGet(gr4vy, "merchant-12345");
248
- if (res.ok) {
249
- const { value: result } = res;
250
- console.log(result);
251
- } else {
252
- console.log("merchantAccountsGet failed:", res.error);
253
- }
254
- }
255
-
256
- run();
257
- ```
258
-
259
- ### Parameters
260
-
261
- | Parameter | Type | Required | Description | Example |
262
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
263
- | `merchantAccountId` | *string* | :heavy_check_mark: | The ID of the merchant account | [object Object] |
264
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
265
- | `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. | |
266
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
267
-
268
- ### Response
269
-
270
- **Promise\<[components.MerchantAccount](../../models/components/merchantaccount.md)\>**
271
-
272
- ### Errors
273
-
274
- | Error Type | Status Code | Content Type |
275
- | -------------------------- | -------------------------- | -------------------------- |
276
- | errors.Error400 | 400 | application/json |
277
- | errors.Error401 | 401 | application/json |
278
- | errors.Error403 | 403 | application/json |
279
- | errors.Error404 | 404 | application/json |
280
- | errors.Error405 | 405 | application/json |
281
- | errors.Error409 | 409 | application/json |
282
- | errors.HTTPValidationError | 422 | application/json |
283
- | errors.Error425 | 425 | application/json |
284
- | errors.Error429 | 429 | application/json |
285
- | errors.Error500 | 500 | application/json |
286
- | errors.Error502 | 502 | application/json |
287
- | errors.Error504 | 504 | application/json |
288
- | errors.SDKError | 4XX, 5XX | \*/\* |
289
-
290
- ## update
291
-
292
- Update info for a merchant account in an instance.
293
-
294
- ### Example Usage
295
-
296
- <!-- UsageSnippet language="typescript" operationID="update_merchant_account" method="put" path="/merchant-accounts/{merchant_account_id}" -->
297
- ```typescript
298
- import { Gr4vy, withToken } from "@gr4vy/sdk";
299
- import fs from "fs";
300
-
301
- const gr4vy = new Gr4vy({
302
- id: "example",
303
- server: "sandbox",
304
- merchantAccountId: "default",
305
- bearerAuth: withToken({
306
- privateKey: fs.readFileSync("private_key.pem", "utf8"),
307
- }),
308
- });
309
-
310
- async function run() {
311
- const result = await gr4vy.merchantAccounts.update({
312
- accountUpdaterEnabled: true,
313
- asyncNetworkTokensEnabled: true,
314
- }, "merchant-12345");
315
-
316
- console.log(result);
317
- }
318
-
319
- run();
320
- ```
321
-
322
- ### Standalone function
323
-
324
- The standalone function version of this method:
325
-
326
- ```typescript
327
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
328
- import { merchantAccountsUpdate } from "@gr4vy/sdk/funcs/merchantAccountsUpdate.js";
329
-
330
- // Use `Gr4vyCore` for best tree-shaking performance.
331
- // You can create one instance of it to use across an application.
332
- const gr4vy = new Gr4vyCore({
333
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
334
- });
335
-
336
- async function run() {
337
- const res = await merchantAccountsUpdate(gr4vy, {
338
- accountUpdaterEnabled: true,
339
- asyncNetworkTokensEnabled: true,
340
- }, "merchant-12345");
341
- if (res.ok) {
342
- const { value: result } = res;
343
- console.log(result);
344
- } else {
345
- console.log("merchantAccountsUpdate failed:", res.error);
346
- }
347
- }
348
-
349
- run();
350
- ```
351
-
352
- ### Parameters
353
-
354
- | Parameter | Type | Required | Description | Example |
355
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
356
- | `merchantAccountId` | *string* | :heavy_check_mark: | The ID of the merchant account | [object Object] |
357
- | `merchantAccountUpdate` | [components.MerchantAccountUpdate](../../models/components/merchantaccountupdate.md) | :heavy_check_mark: | N/A | |
358
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
359
- | `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. | |
360
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
361
-
362
- ### Response
363
-
364
- **Promise\<[components.MerchantAccount](../../models/components/merchantaccount.md)\>**
365
-
366
- ### Errors
367
-
368
- | Error Type | Status Code | Content Type |
369
- | -------------------------- | -------------------------- | -------------------------- |
370
- | errors.Error400 | 400 | application/json |
371
- | errors.Error401 | 401 | application/json |
372
- | errors.Error403 | 403 | application/json |
373
- | errors.Error404 | 404 | application/json |
374
- | errors.Error405 | 405 | application/json |
375
- | errors.Error409 | 409 | application/json |
376
- | errors.HTTPValidationError | 422 | application/json |
377
- | errors.Error425 | 425 | application/json |
378
- | errors.Error429 | 429 | application/json |
379
- | errors.Error500 | 500 | application/json |
380
- | errors.Error502 | 502 | application/json |
381
- | errors.Error504 | 504 | application/json |
382
- | errors.SDKError | 4XX, 5XX | \*/\* |