@gr4vy/sdk 0.18.15 → 0.18.16
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 +6 -1
- package/README.md +40 -8
- package/bin/mcp-server.js +5 -5
- package/bin/mcp-server.js.map +4 -4
- package/docs/sdks/all/README.md +11 -2
- package/docs/sdks/auditlogs/README.md +11 -2
- package/docs/sdks/balances/README.md +11 -2
- package/docs/sdks/buyers/README.md +55 -10
- package/docs/sdks/cardschemedefinitions/README.md +11 -2
- package/docs/sdks/checkoutsessions/README.md +44 -8
- package/docs/sdks/cryptogram/README.md +11 -2
- package/docs/sdks/digitalwallets/README.md +55 -10
- package/docs/sdks/domains/README.md +22 -4
- package/docs/sdks/giftcards/README.md +44 -8
- package/docs/sdks/gr4vygiftcards/README.md +11 -2
- package/docs/sdks/gr4vypaymentmethods/README.md +11 -2
- package/docs/sdks/gr4vyrefunds/README.md +11 -2
- package/docs/sdks/gr4vytransactionsrefunds/README.md +22 -4
- package/docs/sdks/jobs/README.md +11 -2
- package/docs/sdks/merchantaccounts/README.md +44 -8
- package/docs/sdks/networktokens/README.md +55 -10
- package/docs/sdks/paymentmethods/README.md +44 -8
- package/docs/sdks/paymentoptions/README.md +11 -2
- package/docs/sdks/paymentservicetokens/README.md +33 -6
- package/docs/sdks/payouts/README.md +33 -6
- package/docs/sdks/refunds/README.md +11 -2
- package/docs/sdks/sessions/README.md +33 -6
- package/docs/sdks/shippingdetails/README.md +55 -10
- package/docs/sdks/transactions/README.md +77 -14
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
package/docs/sdks/all/README.md
CHANGED
|
@@ -17,7 +17,11 @@ Create a refund for all instruments on a transaction.
|
|
|
17
17
|
import { Gr4vy } from "@gr4vy/sdk";
|
|
18
18
|
|
|
19
19
|
const gr4vy = new Gr4vy({
|
|
20
|
-
|
|
20
|
+
server: "sandbox",
|
|
21
|
+
id: "example",
|
|
22
|
+
bearerAuth: withToken({
|
|
23
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
24
|
+
}),
|
|
21
25
|
});
|
|
22
26
|
|
|
23
27
|
async function run() {
|
|
@@ -39,12 +43,17 @@ The standalone function version of this method:
|
|
|
39
43
|
|
|
40
44
|
```typescript
|
|
41
45
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
46
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
42
47
|
import { transactionRefundsAllCreate } from "@gr4vy/sdk/funcs/transactionRefundsAllCreate.js";
|
|
43
48
|
|
|
44
49
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
45
50
|
// You can create one instance of it to use across an application.
|
|
46
51
|
const gr4vy = new Gr4vyCore({
|
|
47
|
-
|
|
52
|
+
server: "sandbox",
|
|
53
|
+
id: "example",
|
|
54
|
+
bearerAuth: withToken({
|
|
55
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
56
|
+
}),
|
|
48
57
|
});
|
|
49
58
|
|
|
50
59
|
async function run() {
|
|
@@ -17,7 +17,11 @@ Returns a list of activity by dashboard users.
|
|
|
17
17
|
import { Gr4vy } from "@gr4vy/sdk";
|
|
18
18
|
|
|
19
19
|
const gr4vy = new Gr4vy({
|
|
20
|
-
|
|
20
|
+
server: "sandbox",
|
|
21
|
+
id: "example",
|
|
22
|
+
bearerAuth: withToken({
|
|
23
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
24
|
+
}),
|
|
21
25
|
});
|
|
22
26
|
|
|
23
27
|
async function run() {
|
|
@@ -43,12 +47,17 @@ The standalone function version of this method:
|
|
|
43
47
|
|
|
44
48
|
```typescript
|
|
45
49
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
50
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
46
51
|
import { auditLogsList } from "@gr4vy/sdk/funcs/auditLogsList.js";
|
|
47
52
|
|
|
48
53
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
49
54
|
// You can create one instance of it to use across an application.
|
|
50
55
|
const gr4vy = new Gr4vyCore({
|
|
51
|
-
|
|
56
|
+
server: "sandbox",
|
|
57
|
+
id: "example",
|
|
58
|
+
bearerAuth: withToken({
|
|
59
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
60
|
+
}),
|
|
52
61
|
});
|
|
53
62
|
|
|
54
63
|
async function run() {
|
|
@@ -17,7 +17,11 @@ Fetch the balances for one or more gift cards.
|
|
|
17
17
|
import { Gr4vy } from "@gr4vy/sdk";
|
|
18
18
|
|
|
19
19
|
const gr4vy = new Gr4vy({
|
|
20
|
-
|
|
20
|
+
server: "sandbox",
|
|
21
|
+
id: "example",
|
|
22
|
+
bearerAuth: withToken({
|
|
23
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
24
|
+
}),
|
|
21
25
|
});
|
|
22
26
|
|
|
23
27
|
async function run() {
|
|
@@ -49,12 +53,17 @@ The standalone function version of this method:
|
|
|
49
53
|
|
|
50
54
|
```typescript
|
|
51
55
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
56
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
52
57
|
import { giftCardsBalancesList } from "@gr4vy/sdk/funcs/giftCardsBalancesList.js";
|
|
53
58
|
|
|
54
59
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
55
60
|
// You can create one instance of it to use across an application.
|
|
56
61
|
const gr4vy = new Gr4vyCore({
|
|
57
|
-
|
|
62
|
+
server: "sandbox",
|
|
63
|
+
id: "example",
|
|
64
|
+
bearerAuth: withToken({
|
|
65
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
66
|
+
}),
|
|
58
67
|
});
|
|
59
68
|
|
|
60
69
|
async function run() {
|
|
@@ -21,7 +21,11 @@ List all buyers or search for a specific buyer.
|
|
|
21
21
|
import { Gr4vy } from "@gr4vy/sdk";
|
|
22
22
|
|
|
23
23
|
const gr4vy = new Gr4vy({
|
|
24
|
-
|
|
24
|
+
server: "sandbox",
|
|
25
|
+
id: "example",
|
|
26
|
+
bearerAuth: withToken({
|
|
27
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
28
|
+
}),
|
|
25
29
|
});
|
|
26
30
|
|
|
27
31
|
async function run() {
|
|
@@ -46,12 +50,17 @@ The standalone function version of this method:
|
|
|
46
50
|
|
|
47
51
|
```typescript
|
|
48
52
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
53
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
49
54
|
import { buyersList } from "@gr4vy/sdk/funcs/buyersList.js";
|
|
50
55
|
|
|
51
56
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
52
57
|
// You can create one instance of it to use across an application.
|
|
53
58
|
const gr4vy = new Gr4vyCore({
|
|
54
|
-
|
|
59
|
+
server: "sandbox",
|
|
60
|
+
id: "example",
|
|
61
|
+
bearerAuth: withToken({
|
|
62
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
63
|
+
}),
|
|
55
64
|
});
|
|
56
65
|
|
|
57
66
|
async function run() {
|
|
@@ -119,7 +128,11 @@ Create a new buyer record.
|
|
|
119
128
|
import { Gr4vy } from "@gr4vy/sdk";
|
|
120
129
|
|
|
121
130
|
const gr4vy = new Gr4vy({
|
|
122
|
-
|
|
131
|
+
server: "sandbox",
|
|
132
|
+
id: "example",
|
|
133
|
+
bearerAuth: withToken({
|
|
134
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
135
|
+
}),
|
|
123
136
|
});
|
|
124
137
|
|
|
125
138
|
async function run() {
|
|
@@ -162,12 +175,17 @@ The standalone function version of this method:
|
|
|
162
175
|
|
|
163
176
|
```typescript
|
|
164
177
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
178
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
165
179
|
import { buyersCreate } from "@gr4vy/sdk/funcs/buyersCreate.js";
|
|
166
180
|
|
|
167
181
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
168
182
|
// You can create one instance of it to use across an application.
|
|
169
183
|
const gr4vy = new Gr4vyCore({
|
|
170
|
-
|
|
184
|
+
server: "sandbox",
|
|
185
|
+
id: "example",
|
|
186
|
+
bearerAuth: withToken({
|
|
187
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
188
|
+
}),
|
|
171
189
|
});
|
|
172
190
|
|
|
173
191
|
async function run() {
|
|
@@ -255,7 +273,11 @@ Fetches a buyer by its ID.
|
|
|
255
273
|
import { Gr4vy } from "@gr4vy/sdk";
|
|
256
274
|
|
|
257
275
|
const gr4vy = new Gr4vy({
|
|
258
|
-
|
|
276
|
+
server: "sandbox",
|
|
277
|
+
id: "example",
|
|
278
|
+
bearerAuth: withToken({
|
|
279
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
280
|
+
}),
|
|
259
281
|
});
|
|
260
282
|
|
|
261
283
|
async function run() {
|
|
@@ -274,12 +296,17 @@ The standalone function version of this method:
|
|
|
274
296
|
|
|
275
297
|
```typescript
|
|
276
298
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
299
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
277
300
|
import { buyersGet } from "@gr4vy/sdk/funcs/buyersGet.js";
|
|
278
301
|
|
|
279
302
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
280
303
|
// You can create one instance of it to use across an application.
|
|
281
304
|
const gr4vy = new Gr4vyCore({
|
|
282
|
-
|
|
305
|
+
server: "sandbox",
|
|
306
|
+
id: "example",
|
|
307
|
+
bearerAuth: withToken({
|
|
308
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
309
|
+
}),
|
|
283
310
|
});
|
|
284
311
|
|
|
285
312
|
async function run() {
|
|
@@ -342,7 +369,11 @@ Updates a buyer record.
|
|
|
342
369
|
import { Gr4vy } from "@gr4vy/sdk";
|
|
343
370
|
|
|
344
371
|
const gr4vy = new Gr4vy({
|
|
345
|
-
|
|
372
|
+
server: "sandbox",
|
|
373
|
+
id: "example",
|
|
374
|
+
bearerAuth: withToken({
|
|
375
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
376
|
+
}),
|
|
346
377
|
});
|
|
347
378
|
|
|
348
379
|
async function run() {
|
|
@@ -385,12 +416,17 @@ The standalone function version of this method:
|
|
|
385
416
|
|
|
386
417
|
```typescript
|
|
387
418
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
419
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
388
420
|
import { buyersUpdate } from "@gr4vy/sdk/funcs/buyersUpdate.js";
|
|
389
421
|
|
|
390
422
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
391
423
|
// You can create one instance of it to use across an application.
|
|
392
424
|
const gr4vy = new Gr4vyCore({
|
|
393
|
-
|
|
425
|
+
server: "sandbox",
|
|
426
|
+
id: "example",
|
|
427
|
+
bearerAuth: withToken({
|
|
428
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
429
|
+
}),
|
|
394
430
|
});
|
|
395
431
|
|
|
396
432
|
async function run() {
|
|
@@ -479,7 +515,11 @@ Permanently removes a buyer record.
|
|
|
479
515
|
import { Gr4vy } from "@gr4vy/sdk";
|
|
480
516
|
|
|
481
517
|
const gr4vy = new Gr4vy({
|
|
482
|
-
|
|
518
|
+
server: "sandbox",
|
|
519
|
+
id: "example",
|
|
520
|
+
bearerAuth: withToken({
|
|
521
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
522
|
+
}),
|
|
483
523
|
});
|
|
484
524
|
|
|
485
525
|
async function run() {
|
|
@@ -497,12 +537,17 @@ The standalone function version of this method:
|
|
|
497
537
|
|
|
498
538
|
```typescript
|
|
499
539
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
540
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
500
541
|
import { buyersDelete } from "@gr4vy/sdk/funcs/buyersDelete.js";
|
|
501
542
|
|
|
502
543
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
503
544
|
// You can create one instance of it to use across an application.
|
|
504
545
|
const gr4vy = new Gr4vyCore({
|
|
505
|
-
|
|
546
|
+
server: "sandbox",
|
|
547
|
+
id: "example",
|
|
548
|
+
bearerAuth: withToken({
|
|
549
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
550
|
+
}),
|
|
506
551
|
});
|
|
507
552
|
|
|
508
553
|
async function run() {
|
|
@@ -17,7 +17,11 @@ Fetch a list of the definitions of each card scheme.
|
|
|
17
17
|
import { Gr4vy } from "@gr4vy/sdk";
|
|
18
18
|
|
|
19
19
|
const gr4vy = new Gr4vy({
|
|
20
|
-
|
|
20
|
+
server: "sandbox",
|
|
21
|
+
id: "example",
|
|
22
|
+
bearerAuth: withToken({
|
|
23
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
24
|
+
}),
|
|
21
25
|
});
|
|
22
26
|
|
|
23
27
|
async function run() {
|
|
@@ -36,12 +40,17 @@ The standalone function version of this method:
|
|
|
36
40
|
|
|
37
41
|
```typescript
|
|
38
42
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
43
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
39
44
|
import { cardSchemeDefinitionsList } from "@gr4vy/sdk/funcs/cardSchemeDefinitionsList.js";
|
|
40
45
|
|
|
41
46
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
42
47
|
// You can create one instance of it to use across an application.
|
|
43
48
|
const gr4vy = new Gr4vyCore({
|
|
44
|
-
|
|
49
|
+
server: "sandbox",
|
|
50
|
+
id: "example",
|
|
51
|
+
bearerAuth: withToken({
|
|
52
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
53
|
+
}),
|
|
45
54
|
});
|
|
46
55
|
|
|
47
56
|
async function run() {
|
|
@@ -21,7 +21,11 @@ import { Gr4vy } from "@gr4vy/sdk";
|
|
|
21
21
|
import { RFCDate } from "@gr4vy/sdk/types";
|
|
22
22
|
|
|
23
23
|
const gr4vy = new Gr4vy({
|
|
24
|
-
|
|
24
|
+
server: "sandbox",
|
|
25
|
+
id: "example",
|
|
26
|
+
bearerAuth: withToken({
|
|
27
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
28
|
+
}),
|
|
25
29
|
});
|
|
26
30
|
|
|
27
31
|
async function run() {
|
|
@@ -161,12 +165,17 @@ The standalone function version of this method:
|
|
|
161
165
|
|
|
162
166
|
```typescript
|
|
163
167
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
168
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
164
169
|
import { checkoutSessionsCreate } from "@gr4vy/sdk/funcs/checkoutSessionsCreate.js";
|
|
165
170
|
|
|
166
171
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
167
172
|
// You can create one instance of it to use across an application.
|
|
168
173
|
const gr4vy = new Gr4vyCore({
|
|
169
|
-
|
|
174
|
+
server: "sandbox",
|
|
175
|
+
id: "example",
|
|
176
|
+
bearerAuth: withToken({
|
|
177
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
178
|
+
}),
|
|
170
179
|
});
|
|
171
180
|
|
|
172
181
|
async function run() {
|
|
@@ -233,7 +242,11 @@ import { Gr4vy } from "@gr4vy/sdk";
|
|
|
233
242
|
import { RFCDate } from "@gr4vy/sdk/types";
|
|
234
243
|
|
|
235
244
|
const gr4vy = new Gr4vy({
|
|
236
|
-
|
|
245
|
+
server: "sandbox",
|
|
246
|
+
id: "example",
|
|
247
|
+
bearerAuth: withToken({
|
|
248
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
249
|
+
}),
|
|
237
250
|
});
|
|
238
251
|
|
|
239
252
|
async function run() {
|
|
@@ -455,13 +468,18 @@ The standalone function version of this method:
|
|
|
455
468
|
|
|
456
469
|
```typescript
|
|
457
470
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
471
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
458
472
|
import { checkoutSessionsUpdate } from "@gr4vy/sdk/funcs/checkoutSessionsUpdate.js";
|
|
459
473
|
import { RFCDate } from "@gr4vy/sdk/types";
|
|
460
474
|
|
|
461
475
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
462
476
|
// You can create one instance of it to use across an application.
|
|
463
477
|
const gr4vy = new Gr4vyCore({
|
|
464
|
-
|
|
478
|
+
server: "sandbox",
|
|
479
|
+
id: "example",
|
|
480
|
+
bearerAuth: withToken({
|
|
481
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
482
|
+
}),
|
|
465
483
|
});
|
|
466
484
|
|
|
467
485
|
async function run() {
|
|
@@ -729,7 +747,11 @@ Retrieve the information stored on a checkout session.
|
|
|
729
747
|
import { Gr4vy } from "@gr4vy/sdk";
|
|
730
748
|
|
|
731
749
|
const gr4vy = new Gr4vy({
|
|
732
|
-
|
|
750
|
+
server: "sandbox",
|
|
751
|
+
id: "example",
|
|
752
|
+
bearerAuth: withToken({
|
|
753
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
754
|
+
}),
|
|
733
755
|
});
|
|
734
756
|
|
|
735
757
|
async function run() {
|
|
@@ -748,12 +770,17 @@ The standalone function version of this method:
|
|
|
748
770
|
|
|
749
771
|
```typescript
|
|
750
772
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
773
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
751
774
|
import { checkoutSessionsGet } from "@gr4vy/sdk/funcs/checkoutSessionsGet.js";
|
|
752
775
|
|
|
753
776
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
754
777
|
// You can create one instance of it to use across an application.
|
|
755
778
|
const gr4vy = new Gr4vyCore({
|
|
756
|
-
|
|
779
|
+
server: "sandbox",
|
|
780
|
+
id: "example",
|
|
781
|
+
bearerAuth: withToken({
|
|
782
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
783
|
+
}),
|
|
757
784
|
});
|
|
758
785
|
|
|
759
786
|
async function run() {
|
|
@@ -816,7 +843,11 @@ Deleta a checkout session and all of its (PCI) data.
|
|
|
816
843
|
import { Gr4vy } from "@gr4vy/sdk";
|
|
817
844
|
|
|
818
845
|
const gr4vy = new Gr4vy({
|
|
819
|
-
|
|
846
|
+
server: "sandbox",
|
|
847
|
+
id: "example",
|
|
848
|
+
bearerAuth: withToken({
|
|
849
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
850
|
+
}),
|
|
820
851
|
});
|
|
821
852
|
|
|
822
853
|
async function run() {
|
|
@@ -834,12 +865,17 @@ The standalone function version of this method:
|
|
|
834
865
|
|
|
835
866
|
```typescript
|
|
836
867
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
868
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
837
869
|
import { checkoutSessionsDelete } from "@gr4vy/sdk/funcs/checkoutSessionsDelete.js";
|
|
838
870
|
|
|
839
871
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
840
872
|
// You can create one instance of it to use across an application.
|
|
841
873
|
const gr4vy = new Gr4vyCore({
|
|
842
|
-
|
|
874
|
+
server: "sandbox",
|
|
875
|
+
id: "example",
|
|
876
|
+
bearerAuth: withToken({
|
|
877
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
878
|
+
}),
|
|
843
879
|
});
|
|
844
880
|
|
|
845
881
|
async function run() {
|
|
@@ -17,7 +17,11 @@ Provision a cryptogram for a network token.
|
|
|
17
17
|
import { Gr4vy } from "@gr4vy/sdk";
|
|
18
18
|
|
|
19
19
|
const gr4vy = new Gr4vy({
|
|
20
|
-
|
|
20
|
+
server: "sandbox",
|
|
21
|
+
id: "example",
|
|
22
|
+
bearerAuth: withToken({
|
|
23
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
24
|
+
}),
|
|
21
25
|
});
|
|
22
26
|
|
|
23
27
|
async function run() {
|
|
@@ -42,12 +46,17 @@ The standalone function version of this method:
|
|
|
42
46
|
|
|
43
47
|
```typescript
|
|
44
48
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
49
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
45
50
|
import { paymentMethodsNetworkTokensCryptogramCreate } from "@gr4vy/sdk/funcs/paymentMethodsNetworkTokensCryptogramCreate.js";
|
|
46
51
|
|
|
47
52
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
48
53
|
// You can create one instance of it to use across an application.
|
|
49
54
|
const gr4vy = new Gr4vyCore({
|
|
50
|
-
|
|
55
|
+
server: "sandbox",
|
|
56
|
+
id: "example",
|
|
57
|
+
bearerAuth: withToken({
|
|
58
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
59
|
+
}),
|
|
51
60
|
});
|
|
52
61
|
|
|
53
62
|
async function run() {
|
|
@@ -21,7 +21,11 @@ Register a digital wallet like Apple Pay, Google Pay, or Click to Pay.
|
|
|
21
21
|
import { Gr4vy } from "@gr4vy/sdk";
|
|
22
22
|
|
|
23
23
|
const gr4vy = new Gr4vy({
|
|
24
|
-
|
|
24
|
+
server: "sandbox",
|
|
25
|
+
id: "example",
|
|
26
|
+
bearerAuth: withToken({
|
|
27
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
28
|
+
}),
|
|
25
29
|
});
|
|
26
30
|
|
|
27
31
|
async function run() {
|
|
@@ -45,12 +49,17 @@ The standalone function version of this method:
|
|
|
45
49
|
|
|
46
50
|
```typescript
|
|
47
51
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
52
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
48
53
|
import { digitalWalletsCreate } from "@gr4vy/sdk/funcs/digitalWalletsCreate.js";
|
|
49
54
|
|
|
50
55
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
51
56
|
// You can create one instance of it to use across an application.
|
|
52
57
|
const gr4vy = new Gr4vyCore({
|
|
53
|
-
|
|
58
|
+
server: "sandbox",
|
|
59
|
+
id: "example",
|
|
60
|
+
bearerAuth: withToken({
|
|
61
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
62
|
+
}),
|
|
54
63
|
});
|
|
55
64
|
|
|
56
65
|
async function run() {
|
|
@@ -119,7 +128,11 @@ List configured digital wallets.
|
|
|
119
128
|
import { Gr4vy } from "@gr4vy/sdk";
|
|
120
129
|
|
|
121
130
|
const gr4vy = new Gr4vy({
|
|
122
|
-
|
|
131
|
+
server: "sandbox",
|
|
132
|
+
id: "example",
|
|
133
|
+
bearerAuth: withToken({
|
|
134
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
135
|
+
}),
|
|
123
136
|
});
|
|
124
137
|
|
|
125
138
|
async function run() {
|
|
@@ -138,12 +151,17 @@ The standalone function version of this method:
|
|
|
138
151
|
|
|
139
152
|
```typescript
|
|
140
153
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
154
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
141
155
|
import { digitalWalletsList } from "@gr4vy/sdk/funcs/digitalWalletsList.js";
|
|
142
156
|
|
|
143
157
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
144
158
|
// You can create one instance of it to use across an application.
|
|
145
159
|
const gr4vy = new Gr4vyCore({
|
|
146
|
-
|
|
160
|
+
server: "sandbox",
|
|
161
|
+
id: "example",
|
|
162
|
+
bearerAuth: withToken({
|
|
163
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
164
|
+
}),
|
|
147
165
|
});
|
|
148
166
|
|
|
149
167
|
async function run() {
|
|
@@ -205,7 +223,11 @@ Fetch the details a digital wallet.
|
|
|
205
223
|
import { Gr4vy } from "@gr4vy/sdk";
|
|
206
224
|
|
|
207
225
|
const gr4vy = new Gr4vy({
|
|
208
|
-
|
|
226
|
+
server: "sandbox",
|
|
227
|
+
id: "example",
|
|
228
|
+
bearerAuth: withToken({
|
|
229
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
230
|
+
}),
|
|
209
231
|
});
|
|
210
232
|
|
|
211
233
|
async function run() {
|
|
@@ -224,12 +246,17 @@ The standalone function version of this method:
|
|
|
224
246
|
|
|
225
247
|
```typescript
|
|
226
248
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
249
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
227
250
|
import { digitalWalletsGet } from "@gr4vy/sdk/funcs/digitalWalletsGet.js";
|
|
228
251
|
|
|
229
252
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
230
253
|
// You can create one instance of it to use across an application.
|
|
231
254
|
const gr4vy = new Gr4vyCore({
|
|
232
|
-
|
|
255
|
+
server: "sandbox",
|
|
256
|
+
id: "example",
|
|
257
|
+
bearerAuth: withToken({
|
|
258
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
259
|
+
}),
|
|
233
260
|
});
|
|
234
261
|
|
|
235
262
|
async function run() {
|
|
@@ -292,7 +319,11 @@ Delete a configured digital wallet.
|
|
|
292
319
|
import { Gr4vy } from "@gr4vy/sdk";
|
|
293
320
|
|
|
294
321
|
const gr4vy = new Gr4vy({
|
|
295
|
-
|
|
322
|
+
server: "sandbox",
|
|
323
|
+
id: "example",
|
|
324
|
+
bearerAuth: withToken({
|
|
325
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
326
|
+
}),
|
|
296
327
|
});
|
|
297
328
|
|
|
298
329
|
async function run() {
|
|
@@ -311,12 +342,17 @@ The standalone function version of this method:
|
|
|
311
342
|
|
|
312
343
|
```typescript
|
|
313
344
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
345
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
314
346
|
import { digitalWalletsDelete } from "@gr4vy/sdk/funcs/digitalWalletsDelete.js";
|
|
315
347
|
|
|
316
348
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
317
349
|
// You can create one instance of it to use across an application.
|
|
318
350
|
const gr4vy = new Gr4vyCore({
|
|
319
|
-
|
|
351
|
+
server: "sandbox",
|
|
352
|
+
id: "example",
|
|
353
|
+
bearerAuth: withToken({
|
|
354
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
355
|
+
}),
|
|
320
356
|
});
|
|
321
357
|
|
|
322
358
|
async function run() {
|
|
@@ -380,7 +416,11 @@ Update a digital wallet.
|
|
|
380
416
|
import { Gr4vy } from "@gr4vy/sdk";
|
|
381
417
|
|
|
382
418
|
const gr4vy = new Gr4vy({
|
|
383
|
-
|
|
419
|
+
server: "sandbox",
|
|
420
|
+
id: "example",
|
|
421
|
+
bearerAuth: withToken({
|
|
422
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
423
|
+
}),
|
|
384
424
|
});
|
|
385
425
|
|
|
386
426
|
async function run() {
|
|
@@ -401,12 +441,17 @@ The standalone function version of this method:
|
|
|
401
441
|
|
|
402
442
|
```typescript
|
|
403
443
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
444
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
404
445
|
import { digitalWalletsUpdate } from "@gr4vy/sdk/funcs/digitalWalletsUpdate.js";
|
|
405
446
|
|
|
406
447
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
407
448
|
// You can create one instance of it to use across an application.
|
|
408
449
|
const gr4vy = new Gr4vyCore({
|
|
409
|
-
|
|
450
|
+
server: "sandbox",
|
|
451
|
+
id: "example",
|
|
452
|
+
bearerAuth: withToken({
|
|
453
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
454
|
+
}),
|
|
410
455
|
});
|
|
411
456
|
|
|
412
457
|
async function run() {
|
|
@@ -18,7 +18,11 @@ Register a digital wallet domain (Apple Pay only).
|
|
|
18
18
|
import { Gr4vy } from "@gr4vy/sdk";
|
|
19
19
|
|
|
20
20
|
const gr4vy = new Gr4vy({
|
|
21
|
-
|
|
21
|
+
server: "sandbox",
|
|
22
|
+
id: "example",
|
|
23
|
+
bearerAuth: withToken({
|
|
24
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
25
|
+
}),
|
|
22
26
|
});
|
|
23
27
|
|
|
24
28
|
async function run() {
|
|
@@ -39,12 +43,17 @@ The standalone function version of this method:
|
|
|
39
43
|
|
|
40
44
|
```typescript
|
|
41
45
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
46
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
42
47
|
import { digitalWalletsDomainsCreate } from "@gr4vy/sdk/funcs/digitalWalletsDomainsCreate.js";
|
|
43
48
|
|
|
44
49
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
45
50
|
// You can create one instance of it to use across an application.
|
|
46
51
|
const gr4vy = new Gr4vyCore({
|
|
47
|
-
|
|
52
|
+
server: "sandbox",
|
|
53
|
+
id: "example",
|
|
54
|
+
bearerAuth: withToken({
|
|
55
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
56
|
+
}),
|
|
48
57
|
});
|
|
49
58
|
|
|
50
59
|
async function run() {
|
|
@@ -111,7 +120,11 @@ Remove a digital wallet domain (Apple Pay only).
|
|
|
111
120
|
import { Gr4vy } from "@gr4vy/sdk";
|
|
112
121
|
|
|
113
122
|
const gr4vy = new Gr4vy({
|
|
114
|
-
|
|
123
|
+
server: "sandbox",
|
|
124
|
+
id: "example",
|
|
125
|
+
bearerAuth: withToken({
|
|
126
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
127
|
+
}),
|
|
115
128
|
});
|
|
116
129
|
|
|
117
130
|
async function run() {
|
|
@@ -132,12 +145,17 @@ The standalone function version of this method:
|
|
|
132
145
|
|
|
133
146
|
```typescript
|
|
134
147
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
148
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
135
149
|
import { digitalWalletsDomainsDelete } from "@gr4vy/sdk/funcs/digitalWalletsDomainsDelete.js";
|
|
136
150
|
|
|
137
151
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
138
152
|
// You can create one instance of it to use across an application.
|
|
139
153
|
const gr4vy = new Gr4vyCore({
|
|
140
|
-
|
|
154
|
+
server: "sandbox",
|
|
155
|
+
id: "example",
|
|
156
|
+
bearerAuth: withToken({
|
|
157
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
158
|
+
}),
|
|
141
159
|
});
|
|
142
160
|
|
|
143
161
|
async function run() {
|