@gr4vy/sdk 1.1.28 → 1.1.30
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.
- package/FUNCTIONS.md +9 -9
- package/README.md +91 -61
- package/docs/sdks/all/README.md +9 -13
- package/docs/sdks/auditlogs/README.md +9 -13
- package/docs/sdks/balances/README.md +9 -13
- package/docs/sdks/buyers/README.md +45 -65
- package/docs/sdks/cardschemedefinitions/README.md +9 -13
- package/docs/sdks/checkoutsessions/README.md +36 -52
- package/docs/sdks/cryptogram/README.md +9 -13
- package/docs/sdks/digitalwallets/README.md +45 -65
- package/docs/sdks/domains/README.md +18 -26
- package/docs/sdks/events/README.md +9 -13
- package/docs/sdks/executions/README.md +27 -39
- package/docs/sdks/giftcards/README.md +36 -52
- package/docs/sdks/gr4vy/README.md +0 -83
- package/docs/sdks/gr4vygiftcards/README.md +9 -13
- package/docs/sdks/gr4vypaymentmethods/README.md +9 -13
- package/docs/sdks/gr4vyrefunds/README.md +27 -39
- package/docs/sdks/jobs/README.md +9 -13
- package/docs/sdks/merchantaccounts/README.md +36 -48
- package/docs/sdks/networktokens/README.md +45 -65
- package/docs/sdks/paymentlinks/README.md +36 -52
- package/docs/sdks/paymentmethods/README.md +36 -52
- package/docs/sdks/paymentoptions/README.md +9 -13
- package/docs/sdks/paymentservicedefinitions/README.md +27 -36
- package/docs/sdks/paymentservices/README.md +63 -91
- package/docs/sdks/paymentservicetokens/README.md +27 -39
- package/docs/sdks/payouts/README.md +27 -39
- package/docs/sdks/refunds/README.md +9 -13
- package/docs/sdks/reportexecutions/README.md +9 -13
- package/docs/sdks/reports/README.md +36 -52
- package/docs/sdks/sessions/README.md +27 -38
- package/docs/sdks/settlements/README.md +18 -26
- package/docs/sdks/shippingdetails/README.md +45 -65
- package/docs/sdks/transactions/README.md +63 -91
- package/examples/accountUpdaterJobsCreate.example.ts +37 -0
- package/examples/package-lock.json +2716 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/operations/index.d.ts +0 -1
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -1
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/sdk.d.ts +1 -5
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +0 -8
- package/sdk/sdk.js.map +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/operations/index.ts +0 -1
- package/src/sdk/sdk.ts +1 -17
- package/examples/browsePaymentMethodDefinitionsGet.example.ts +0 -27
- package/funcs/browsePaymentMethodDefinitionsGet.d.ts +0 -14
- package/funcs/browsePaymentMethodDefinitionsGet.d.ts.map +0 -1
- package/funcs/browsePaymentMethodDefinitionsGet.js +0 -130
- package/funcs/browsePaymentMethodDefinitionsGet.js.map +0 -1
- package/models/operations/browsepaymentmethoddefinitionsget.d.ts +0 -57
- package/models/operations/browsepaymentmethoddefinitionsget.d.ts.map +0 -1
- package/models/operations/browsepaymentmethoddefinitionsget.js +0 -96
- package/models/operations/browsepaymentmethoddefinitionsget.js.map +0 -1
- package/src/funcs/browsePaymentMethodDefinitionsGet.ts +0 -188
- package/src/models/operations/browsepaymentmethoddefinitionsget.ts +0 -149
|
@@ -17,14 +17,16 @@ List the definitions of each payment service that can be configured.
|
|
|
17
17
|
|
|
18
18
|
<!-- UsageSnippet language="typescript" operationID="list_payment_service_definitions" method="get" path="/payment-service-definitions" -->
|
|
19
19
|
```typescript
|
|
20
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
20
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
21
|
+
import fs from "fs";
|
|
21
22
|
|
|
22
23
|
const gr4vy = new Gr4vy({
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
id: "example",
|
|
25
|
+
server: "sandbox",
|
|
26
|
+
merchantAccountId: "default",
|
|
27
|
+
bearerAuth: withToken({
|
|
28
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
29
|
+
}),
|
|
28
30
|
});
|
|
29
31
|
|
|
30
32
|
async function run() {
|
|
@@ -44,17 +46,12 @@ The standalone function version of this method:
|
|
|
44
46
|
|
|
45
47
|
```typescript
|
|
46
48
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
47
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
48
49
|
import { paymentServiceDefinitionsList } from "@gr4vy/sdk/funcs/paymentServiceDefinitionsList.js";
|
|
49
50
|
|
|
50
51
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
51
52
|
// You can create one instance of it to use across an application.
|
|
52
53
|
const gr4vy = new Gr4vyCore({
|
|
53
|
-
|
|
54
|
-
id: "example",
|
|
55
|
-
bearerAuth: withToken({
|
|
56
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
57
|
-
}),
|
|
54
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
58
55
|
});
|
|
59
56
|
|
|
60
57
|
async function run() {
|
|
@@ -112,14 +109,16 @@ Get the definition of a payment service that can be configured.
|
|
|
112
109
|
|
|
113
110
|
<!-- UsageSnippet language="typescript" operationID="get_payment_service_definition" method="get" path="/payment-service-definitions/{payment_service_definition_id}" -->
|
|
114
111
|
```typescript
|
|
115
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
112
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
113
|
+
import fs from "fs";
|
|
116
114
|
|
|
117
115
|
const gr4vy = new Gr4vy({
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
id: "example",
|
|
117
|
+
server: "sandbox",
|
|
118
|
+
merchantAccountId: "default",
|
|
119
|
+
bearerAuth: withToken({
|
|
120
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
121
|
+
}),
|
|
123
122
|
});
|
|
124
123
|
|
|
125
124
|
async function run() {
|
|
@@ -137,17 +136,12 @@ The standalone function version of this method:
|
|
|
137
136
|
|
|
138
137
|
```typescript
|
|
139
138
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
140
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
141
139
|
import { paymentServiceDefinitionsGet } from "@gr4vy/sdk/funcs/paymentServiceDefinitionsGet.js";
|
|
142
140
|
|
|
143
141
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
144
142
|
// You can create one instance of it to use across an application.
|
|
145
143
|
const gr4vy = new Gr4vyCore({
|
|
146
|
-
|
|
147
|
-
id: "example",
|
|
148
|
-
bearerAuth: withToken({
|
|
149
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
150
|
-
}),
|
|
144
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
151
145
|
});
|
|
152
146
|
|
|
153
147
|
async function run() {
|
|
@@ -202,14 +196,16 @@ Creates a session for a payment service that supports sessions.
|
|
|
202
196
|
|
|
203
197
|
<!-- UsageSnippet language="typescript" operationID="create_payment_service_definition_session" method="post" path="/payment-service-definitions/{payment_service_definition_id}/sessions" -->
|
|
204
198
|
```typescript
|
|
205
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
199
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
200
|
+
import fs from "fs";
|
|
206
201
|
|
|
207
202
|
const gr4vy = new Gr4vy({
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
203
|
+
id: "example",
|
|
204
|
+
server: "sandbox",
|
|
205
|
+
merchantAccountId: "default",
|
|
206
|
+
bearerAuth: withToken({
|
|
207
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
208
|
+
}),
|
|
213
209
|
});
|
|
214
210
|
|
|
215
211
|
async function run() {
|
|
@@ -229,17 +225,12 @@ The standalone function version of this method:
|
|
|
229
225
|
|
|
230
226
|
```typescript
|
|
231
227
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
232
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
233
228
|
import { paymentServiceDefinitionsSession } from "@gr4vy/sdk/funcs/paymentServiceDefinitionsSession.js";
|
|
234
229
|
|
|
235
230
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
236
231
|
// You can create one instance of it to use across an application.
|
|
237
232
|
const gr4vy = new Gr4vyCore({
|
|
238
|
-
|
|
239
|
-
id: "example",
|
|
240
|
-
bearerAuth: withToken({
|
|
241
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
242
|
-
}),
|
|
233
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
243
234
|
});
|
|
244
235
|
|
|
245
236
|
async function run() {
|
|
@@ -21,15 +21,16 @@ List the configured payment services.
|
|
|
21
21
|
|
|
22
22
|
<!-- UsageSnippet language="typescript" operationID="list_payment_services" method="get" path="/payment-services" -->
|
|
23
23
|
```typescript
|
|
24
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
24
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
25
|
+
import fs from "fs";
|
|
25
26
|
|
|
26
27
|
const gr4vy = new Gr4vy({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
id: "example",
|
|
29
|
+
server: "sandbox",
|
|
30
|
+
merchantAccountId: "default",
|
|
31
|
+
bearerAuth: withToken({
|
|
32
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
33
|
+
}),
|
|
33
34
|
});
|
|
34
35
|
|
|
35
36
|
async function run() {
|
|
@@ -49,18 +50,13 @@ The standalone function version of this method:
|
|
|
49
50
|
|
|
50
51
|
```typescript
|
|
51
52
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
52
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
53
53
|
import { paymentServicesList } from "@gr4vy/sdk/funcs/paymentServicesList.js";
|
|
54
54
|
|
|
55
55
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
56
56
|
// You can create one instance of it to use across an application.
|
|
57
57
|
const gr4vy = new Gr4vyCore({
|
|
58
58
|
merchantAccountId: "<id>",
|
|
59
|
-
|
|
60
|
-
id: "example",
|
|
61
|
-
bearerAuth: withToken({
|
|
62
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
63
|
-
}),
|
|
59
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
64
60
|
});
|
|
65
61
|
|
|
66
62
|
async function run() {
|
|
@@ -117,15 +113,16 @@ Updates the configuration of a payment service.
|
|
|
117
113
|
|
|
118
114
|
<!-- UsageSnippet language="typescript" operationID="update_payment_service" method="post" path="/payment-services" -->
|
|
119
115
|
```typescript
|
|
120
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
116
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
117
|
+
import fs from "fs";
|
|
121
118
|
|
|
122
119
|
const gr4vy = new Gr4vy({
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
120
|
+
id: "example",
|
|
121
|
+
server: "sandbox",
|
|
122
|
+
merchantAccountId: "default",
|
|
123
|
+
bearerAuth: withToken({
|
|
124
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
125
|
+
}),
|
|
129
126
|
});
|
|
130
127
|
|
|
131
128
|
async function run() {
|
|
@@ -168,18 +165,13 @@ The standalone function version of this method:
|
|
|
168
165
|
|
|
169
166
|
```typescript
|
|
170
167
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
171
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
172
168
|
import { paymentServicesCreate } from "@gr4vy/sdk/funcs/paymentServicesCreate.js";
|
|
173
169
|
|
|
174
170
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
175
171
|
// You can create one instance of it to use across an application.
|
|
176
172
|
const gr4vy = new Gr4vyCore({
|
|
177
173
|
merchantAccountId: "<id>",
|
|
178
|
-
|
|
179
|
-
id: "example",
|
|
180
|
-
bearerAuth: withToken({
|
|
181
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
182
|
-
}),
|
|
174
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
183
175
|
});
|
|
184
176
|
|
|
185
177
|
async function run() {
|
|
@@ -260,15 +252,16 @@ Get the details of a configured payment service.
|
|
|
260
252
|
|
|
261
253
|
<!-- UsageSnippet language="typescript" operationID="get_payment_service" method="get" path="/payment-services/{payment_service_id}" -->
|
|
262
254
|
```typescript
|
|
263
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
255
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
256
|
+
import fs from "fs";
|
|
264
257
|
|
|
265
258
|
const gr4vy = new Gr4vy({
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
259
|
+
id: "example",
|
|
260
|
+
server: "sandbox",
|
|
261
|
+
merchantAccountId: "default",
|
|
262
|
+
bearerAuth: withToken({
|
|
263
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
264
|
+
}),
|
|
272
265
|
});
|
|
273
266
|
|
|
274
267
|
async function run() {
|
|
@@ -286,18 +279,13 @@ The standalone function version of this method:
|
|
|
286
279
|
|
|
287
280
|
```typescript
|
|
288
281
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
289
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
290
282
|
import { paymentServicesGet } from "@gr4vy/sdk/funcs/paymentServicesGet.js";
|
|
291
283
|
|
|
292
284
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
293
285
|
// You can create one instance of it to use across an application.
|
|
294
286
|
const gr4vy = new Gr4vyCore({
|
|
295
287
|
merchantAccountId: "<id>",
|
|
296
|
-
|
|
297
|
-
id: "example",
|
|
298
|
-
bearerAuth: withToken({
|
|
299
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
300
|
-
}),
|
|
288
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
301
289
|
});
|
|
302
290
|
|
|
303
291
|
async function run() {
|
|
@@ -353,15 +341,16 @@ Configures a new payment service for use by merchants.
|
|
|
353
341
|
|
|
354
342
|
<!-- UsageSnippet language="typescript" operationID="create_payment_service" method="put" path="/payment-services/{payment_service_id}" -->
|
|
355
343
|
```typescript
|
|
356
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
344
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
345
|
+
import fs from "fs";
|
|
357
346
|
|
|
358
347
|
const gr4vy = new Gr4vy({
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
348
|
+
id: "example",
|
|
349
|
+
server: "sandbox",
|
|
350
|
+
merchantAccountId: "default",
|
|
351
|
+
bearerAuth: withToken({
|
|
352
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
353
|
+
}),
|
|
365
354
|
});
|
|
366
355
|
|
|
367
356
|
async function run() {
|
|
@@ -381,18 +370,13 @@ The standalone function version of this method:
|
|
|
381
370
|
|
|
382
371
|
```typescript
|
|
383
372
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
384
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
385
373
|
import { paymentServicesUpdate } from "@gr4vy/sdk/funcs/paymentServicesUpdate.js";
|
|
386
374
|
|
|
387
375
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
388
376
|
// You can create one instance of it to use across an application.
|
|
389
377
|
const gr4vy = new Gr4vyCore({
|
|
390
378
|
merchantAccountId: "<id>",
|
|
391
|
-
|
|
392
|
-
id: "example",
|
|
393
|
-
bearerAuth: withToken({
|
|
394
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
395
|
-
}),
|
|
379
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
396
380
|
});
|
|
397
381
|
|
|
398
382
|
async function run() {
|
|
@@ -451,15 +435,16 @@ Deletes all the configuration of a payment service.
|
|
|
451
435
|
|
|
452
436
|
<!-- UsageSnippet language="typescript" operationID="delete_payment_service" method="delete" path="/payment-services/{payment_service_id}" -->
|
|
453
437
|
```typescript
|
|
454
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
438
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
439
|
+
import fs from "fs";
|
|
455
440
|
|
|
456
441
|
const gr4vy = new Gr4vy({
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
442
|
+
id: "example",
|
|
443
|
+
server: "sandbox",
|
|
444
|
+
merchantAccountId: "default",
|
|
445
|
+
bearerAuth: withToken({
|
|
446
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
447
|
+
}),
|
|
463
448
|
});
|
|
464
449
|
|
|
465
450
|
async function run() {
|
|
@@ -477,18 +462,13 @@ The standalone function version of this method:
|
|
|
477
462
|
|
|
478
463
|
```typescript
|
|
479
464
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
480
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
481
465
|
import { paymentServicesDelete } from "@gr4vy/sdk/funcs/paymentServicesDelete.js";
|
|
482
466
|
|
|
483
467
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
484
468
|
// You can create one instance of it to use across an application.
|
|
485
469
|
const gr4vy = new Gr4vyCore({
|
|
486
470
|
merchantAccountId: "<id>",
|
|
487
|
-
|
|
488
|
-
id: "example",
|
|
489
|
-
bearerAuth: withToken({
|
|
490
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
491
|
-
}),
|
|
471
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
492
472
|
});
|
|
493
473
|
|
|
494
474
|
async function run() {
|
|
@@ -544,15 +524,16 @@ Verify the credentials of a configured payment service
|
|
|
544
524
|
|
|
545
525
|
<!-- UsageSnippet language="typescript" operationID="verify_payment_service_credentials" method="post" path="/payment-services/verify" -->
|
|
546
526
|
```typescript
|
|
547
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
527
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
528
|
+
import fs from "fs";
|
|
548
529
|
|
|
549
530
|
const gr4vy = new Gr4vy({
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
531
|
+
id: "example",
|
|
532
|
+
server: "sandbox",
|
|
533
|
+
merchantAccountId: "default",
|
|
534
|
+
bearerAuth: withToken({
|
|
535
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
536
|
+
}),
|
|
556
537
|
});
|
|
557
538
|
|
|
558
539
|
async function run() {
|
|
@@ -573,18 +554,13 @@ The standalone function version of this method:
|
|
|
573
554
|
|
|
574
555
|
```typescript
|
|
575
556
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
576
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
577
557
|
import { paymentServicesVerify } from "@gr4vy/sdk/funcs/paymentServicesVerify.js";
|
|
578
558
|
|
|
579
559
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
580
560
|
// You can create one instance of it to use across an application.
|
|
581
561
|
const gr4vy = new Gr4vyCore({
|
|
582
562
|
merchantAccountId: "<id>",
|
|
583
|
-
|
|
584
|
-
id: "example",
|
|
585
|
-
bearerAuth: withToken({
|
|
586
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
587
|
-
}),
|
|
563
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
588
564
|
});
|
|
589
565
|
|
|
590
566
|
async function run() {
|
|
@@ -643,15 +619,16 @@ Creates a session for a payment service that supports sessions.
|
|
|
643
619
|
|
|
644
620
|
<!-- UsageSnippet language="typescript" operationID="create_payment_service_session" method="post" path="/payment-services/{payment_service_id}/sessions" -->
|
|
645
621
|
```typescript
|
|
646
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
622
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
623
|
+
import fs from "fs";
|
|
647
624
|
|
|
648
625
|
const gr4vy = new Gr4vy({
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
626
|
+
id: "example",
|
|
627
|
+
server: "sandbox",
|
|
628
|
+
merchantAccountId: "default",
|
|
629
|
+
bearerAuth: withToken({
|
|
630
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
631
|
+
}),
|
|
655
632
|
});
|
|
656
633
|
|
|
657
634
|
async function run() {
|
|
@@ -671,18 +648,13 @@ The standalone function version of this method:
|
|
|
671
648
|
|
|
672
649
|
```typescript
|
|
673
650
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
674
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
675
651
|
import { paymentServicesSession } from "@gr4vy/sdk/funcs/paymentServicesSession.js";
|
|
676
652
|
|
|
677
653
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
678
654
|
// You can create one instance of it to use across an application.
|
|
679
655
|
const gr4vy = new Gr4vyCore({
|
|
680
656
|
merchantAccountId: "<id>",
|
|
681
|
-
|
|
682
|
-
id: "example",
|
|
683
|
-
bearerAuth: withToken({
|
|
684
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
685
|
-
}),
|
|
657
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
686
658
|
});
|
|
687
659
|
|
|
688
660
|
async function run() {
|
|
@@ -17,15 +17,16 @@ List all gateway tokens stored for a payment method.
|
|
|
17
17
|
|
|
18
18
|
<!-- UsageSnippet language="typescript" operationID="list_payment_method_payment_service_tokens" method="get" path="/payment-methods/{payment_method_id}/payment-service-tokens" -->
|
|
19
19
|
```typescript
|
|
20
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
20
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
21
|
+
import fs from "fs";
|
|
21
22
|
|
|
22
23
|
const gr4vy = new Gr4vy({
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
id: "example",
|
|
25
|
+
server: "sandbox",
|
|
26
|
+
merchantAccountId: "default",
|
|
27
|
+
bearerAuth: withToken({
|
|
28
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
29
|
+
}),
|
|
29
30
|
});
|
|
30
31
|
|
|
31
32
|
async function run() {
|
|
@@ -43,18 +44,13 @@ The standalone function version of this method:
|
|
|
43
44
|
|
|
44
45
|
```typescript
|
|
45
46
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
46
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
47
47
|
import { paymentMethodsPaymentServiceTokensList } from "@gr4vy/sdk/funcs/paymentMethodsPaymentServiceTokensList.js";
|
|
48
48
|
|
|
49
49
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
50
50
|
// You can create one instance of it to use across an application.
|
|
51
51
|
const gr4vy = new Gr4vyCore({
|
|
52
52
|
merchantAccountId: "<id>",
|
|
53
|
-
|
|
54
|
-
id: "example",
|
|
55
|
-
bearerAuth: withToken({
|
|
56
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
57
|
-
}),
|
|
53
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
58
54
|
});
|
|
59
55
|
|
|
60
56
|
async function run() {
|
|
@@ -111,15 +107,16 @@ Create a gateway tokens for a payment method.
|
|
|
111
107
|
|
|
112
108
|
<!-- UsageSnippet language="typescript" operationID="create_payment_method_payment_service_token" method="post" path="/payment-methods/{payment_method_id}/payment-service-tokens" -->
|
|
113
109
|
```typescript
|
|
114
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
110
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
111
|
+
import fs from "fs";
|
|
115
112
|
|
|
116
113
|
const gr4vy = new Gr4vy({
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
114
|
+
id: "example",
|
|
115
|
+
server: "sandbox",
|
|
116
|
+
merchantAccountId: "default",
|
|
117
|
+
bearerAuth: withToken({
|
|
118
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
119
|
+
}),
|
|
123
120
|
});
|
|
124
121
|
|
|
125
122
|
async function run() {
|
|
@@ -140,18 +137,13 @@ The standalone function version of this method:
|
|
|
140
137
|
|
|
141
138
|
```typescript
|
|
142
139
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
143
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
144
140
|
import { paymentMethodsPaymentServiceTokensCreate } from "@gr4vy/sdk/funcs/paymentMethodsPaymentServiceTokensCreate.js";
|
|
145
141
|
|
|
146
142
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
147
143
|
// You can create one instance of it to use across an application.
|
|
148
144
|
const gr4vy = new Gr4vyCore({
|
|
149
145
|
merchantAccountId: "<id>",
|
|
150
|
-
|
|
151
|
-
id: "example",
|
|
152
|
-
bearerAuth: withToken({
|
|
153
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
154
|
-
}),
|
|
146
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
155
147
|
});
|
|
156
148
|
|
|
157
149
|
async function run() {
|
|
@@ -211,15 +203,16 @@ Delete a gateway tokens for a payment method.
|
|
|
211
203
|
|
|
212
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}" -->
|
|
213
205
|
```typescript
|
|
214
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
206
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
207
|
+
import fs from "fs";
|
|
215
208
|
|
|
216
209
|
const gr4vy = new Gr4vy({
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
210
|
+
id: "example",
|
|
211
|
+
server: "sandbox",
|
|
212
|
+
merchantAccountId: "default",
|
|
213
|
+
bearerAuth: withToken({
|
|
214
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
215
|
+
}),
|
|
223
216
|
});
|
|
224
217
|
|
|
225
218
|
async function run() {
|
|
@@ -237,18 +230,13 @@ The standalone function version of this method:
|
|
|
237
230
|
|
|
238
231
|
```typescript
|
|
239
232
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
240
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
241
233
|
import { paymentMethodsPaymentServiceTokensDelete } from "@gr4vy/sdk/funcs/paymentMethodsPaymentServiceTokensDelete.js";
|
|
242
234
|
|
|
243
235
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
244
236
|
// You can create one instance of it to use across an application.
|
|
245
237
|
const gr4vy = new Gr4vyCore({
|
|
246
238
|
merchantAccountId: "<id>",
|
|
247
|
-
|
|
248
|
-
id: "example",
|
|
249
|
-
bearerAuth: withToken({
|
|
250
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
251
|
-
}),
|
|
239
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
252
240
|
});
|
|
253
241
|
|
|
254
242
|
async function run() {
|