@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,281 +0,0 @@
1
- # PaymentServiceDefinitions
2
- (*paymentServiceDefinitions*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [list](#list) - List payment service definitions
9
- * [get](#get) - Get a payment service definition
10
- * [session](#session) - Create a session for a payment service definition
11
-
12
- ## list
13
-
14
- List the definitions of each payment service that can be configured.
15
-
16
- ### Example Usage
17
-
18
- <!-- UsageSnippet language="typescript" operationID="list_payment_service_definitions" method="get" path="/payment-service-definitions" -->
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.paymentServiceDefinitions.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 { paymentServiceDefinitionsList } from "@gr4vy/sdk/funcs/paymentServiceDefinitionsList.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
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
55
- });
56
-
57
- async function run() {
58
- const res = await paymentServiceDefinitionsList(gr4vy);
59
- if (res.ok) {
60
- const { value: result } = res;
61
- for await (const page of result) {
62
- console.log(page);
63
- }
64
- } else {
65
- console.log("paymentServiceDefinitionsList failed:", res.error);
66
- }
67
- }
68
-
69
- run();
70
- ```
71
-
72
- ### Parameters
73
-
74
- | Parameter | Type | Required | Description | Example |
75
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
76
- | `cursor` | *string* | :heavy_minus_sign: | A pointer to the page of results to return. | [object Object] |
77
- | `limit` | *number* | :heavy_minus_sign: | The maximum number of items that are at returned. | [object Object] |
78
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
79
- | `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. | |
80
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
81
-
82
- ### Response
83
-
84
- **Promise\<[operations.ListPaymentServiceDefinitionsResponse](../../models/operations/listpaymentservicedefinitionsresponse.md)\>**
85
-
86
- ### Errors
87
-
88
- | Error Type | Status Code | Content Type |
89
- | -------------------------- | -------------------------- | -------------------------- |
90
- | errors.Error400 | 400 | application/json |
91
- | errors.Error401 | 401 | application/json |
92
- | errors.Error403 | 403 | application/json |
93
- | errors.Error404 | 404 | application/json |
94
- | errors.Error405 | 405 | application/json |
95
- | errors.Error409 | 409 | application/json |
96
- | errors.HTTPValidationError | 422 | application/json |
97
- | errors.Error425 | 425 | application/json |
98
- | errors.Error429 | 429 | application/json |
99
- | errors.Error500 | 500 | application/json |
100
- | errors.Error502 | 502 | application/json |
101
- | errors.Error504 | 504 | application/json |
102
- | errors.SDKError | 4XX, 5XX | \*/\* |
103
-
104
- ## get
105
-
106
- Get the definition of a payment service that can be configured.
107
-
108
- ### Example Usage
109
-
110
- <!-- UsageSnippet language="typescript" operationID="get_payment_service_definition" method="get" path="/payment-service-definitions/{payment_service_definition_id}" -->
111
- ```typescript
112
- import { Gr4vy, withToken } from "@gr4vy/sdk";
113
- import fs from "fs";
114
-
115
- const gr4vy = new Gr4vy({
116
- id: "example",
117
- server: "sandbox",
118
- merchantAccountId: "default",
119
- bearerAuth: withToken({
120
- privateKey: fs.readFileSync("private_key.pem", "utf8"),
121
- }),
122
- });
123
-
124
- async function run() {
125
- const result = await gr4vy.paymentServiceDefinitions.get("adyen-ideal");
126
-
127
- console.log(result);
128
- }
129
-
130
- run();
131
- ```
132
-
133
- ### Standalone function
134
-
135
- The standalone function version of this method:
136
-
137
- ```typescript
138
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
139
- import { paymentServiceDefinitionsGet } from "@gr4vy/sdk/funcs/paymentServiceDefinitionsGet.js";
140
-
141
- // Use `Gr4vyCore` for best tree-shaking performance.
142
- // You can create one instance of it to use across an application.
143
- const gr4vy = new Gr4vyCore({
144
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
145
- });
146
-
147
- async function run() {
148
- const res = await paymentServiceDefinitionsGet(gr4vy, "adyen-ideal");
149
- if (res.ok) {
150
- const { value: result } = res;
151
- console.log(result);
152
- } else {
153
- console.log("paymentServiceDefinitionsGet failed:", res.error);
154
- }
155
- }
156
-
157
- run();
158
- ```
159
-
160
- ### Parameters
161
-
162
- | Parameter | Type | Required | Description | Example |
163
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
164
- | `paymentServiceDefinitionId` | *string* | :heavy_check_mark: | N/A | [object Object] |
165
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
166
- | `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. | |
167
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
168
-
169
- ### Response
170
-
171
- **Promise\<[components.PaymentServiceDefinition](../../models/components/paymentservicedefinition.md)\>**
172
-
173
- ### Errors
174
-
175
- | Error Type | Status Code | Content Type |
176
- | -------------------------- | -------------------------- | -------------------------- |
177
- | errors.Error400 | 400 | application/json |
178
- | errors.Error401 | 401 | application/json |
179
- | errors.Error403 | 403 | application/json |
180
- | errors.Error404 | 404 | application/json |
181
- | errors.Error405 | 405 | application/json |
182
- | errors.Error409 | 409 | application/json |
183
- | errors.HTTPValidationError | 422 | application/json |
184
- | errors.Error425 | 425 | application/json |
185
- | errors.Error429 | 429 | application/json |
186
- | errors.Error500 | 500 | application/json |
187
- | errors.Error502 | 502 | application/json |
188
- | errors.Error504 | 504 | application/json |
189
- | errors.SDKError | 4XX, 5XX | \*/\* |
190
-
191
- ## session
192
-
193
- Creates a session for a payment service that supports sessions.
194
-
195
- ### Example Usage
196
-
197
- <!-- UsageSnippet language="typescript" operationID="create_payment_service_definition_session" method="post" path="/payment-service-definitions/{payment_service_definition_id}/sessions" -->
198
- ```typescript
199
- import { Gr4vy, withToken } from "@gr4vy/sdk";
200
- import fs from "fs";
201
-
202
- const gr4vy = new Gr4vy({
203
- id: "example",
204
- server: "sandbox",
205
- merchantAccountId: "default",
206
- bearerAuth: withToken({
207
- privateKey: fs.readFileSync("private_key.pem", "utf8"),
208
- }),
209
- });
210
-
211
- async function run() {
212
- const result = await gr4vy.paymentServiceDefinitions.session({
213
-
214
- }, "adyen-ideal");
215
-
216
- console.log(result);
217
- }
218
-
219
- run();
220
- ```
221
-
222
- ### Standalone function
223
-
224
- The standalone function version of this method:
225
-
226
- ```typescript
227
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
228
- import { paymentServiceDefinitionsSession } from "@gr4vy/sdk/funcs/paymentServiceDefinitionsSession.js";
229
-
230
- // Use `Gr4vyCore` for best tree-shaking performance.
231
- // You can create one instance of it to use across an application.
232
- const gr4vy = new Gr4vyCore({
233
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
234
- });
235
-
236
- async function run() {
237
- const res = await paymentServiceDefinitionsSession(gr4vy, {
238
-
239
- }, "adyen-ideal");
240
- if (res.ok) {
241
- const { value: result } = res;
242
- console.log(result);
243
- } else {
244
- console.log("paymentServiceDefinitionsSession failed:", res.error);
245
- }
246
- }
247
-
248
- run();
249
- ```
250
-
251
- ### Parameters
252
-
253
- | Parameter | Type | Required | Description | Example |
254
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
255
- | `paymentServiceDefinitionId` | *string* | :heavy_check_mark: | N/A | [object Object] |
256
- | `requestBody` | Record<string, *any*> | :heavy_check_mark: | N/A | |
257
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
258
- | `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. | |
259
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
260
-
261
- ### Response
262
-
263
- **Promise\<[components.CreateSession](../../models/components/createsession.md)\>**
264
-
265
- ### Errors
266
-
267
- | Error Type | Status Code | Content Type |
268
- | -------------------------- | -------------------------- | -------------------------- |
269
- | errors.Error400 | 400 | application/json |
270
- | errors.Error401 | 401 | application/json |
271
- | errors.Error403 | 403 | application/json |
272
- | errors.Error404 | 404 | application/json |
273
- | errors.Error405 | 405 | application/json |
274
- | errors.Error409 | 409 | application/json |
275
- | errors.HTTPValidationError | 422 | application/json |
276
- | errors.Error425 | 425 | application/json |
277
- | errors.Error429 | 429 | application/json |
278
- | errors.Error500 | 500 | application/json |
279
- | errors.Error502 | 502 | application/json |
280
- | errors.Error504 | 504 | application/json |
281
- | errors.SDKError | 4XX, 5XX | \*/\* |