@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
|
@@ -19,15 +19,16 @@ List all buyers or search for a specific buyer.
|
|
|
19
19
|
|
|
20
20
|
<!-- UsageSnippet language="typescript" operationID="list_buyers" method="get" path="/buyers" -->
|
|
21
21
|
```typescript
|
|
22
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
22
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
23
|
+
import fs from "fs";
|
|
23
24
|
|
|
24
25
|
const gr4vy = new Gr4vy({
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
id: "example",
|
|
27
|
+
server: "sandbox",
|
|
28
|
+
merchantAccountId: "default",
|
|
29
|
+
bearerAuth: withToken({
|
|
30
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
31
|
+
}),
|
|
31
32
|
});
|
|
32
33
|
|
|
33
34
|
async function run() {
|
|
@@ -47,18 +48,13 @@ The standalone function version of this method:
|
|
|
47
48
|
|
|
48
49
|
```typescript
|
|
49
50
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
50
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
51
51
|
import { buyersList } from "@gr4vy/sdk/funcs/buyersList.js";
|
|
52
52
|
|
|
53
53
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
54
54
|
// You can create one instance of it to use across an application.
|
|
55
55
|
const gr4vy = new Gr4vyCore({
|
|
56
56
|
merchantAccountId: "<id>",
|
|
57
|
-
|
|
58
|
-
id: "example",
|
|
59
|
-
bearerAuth: withToken({
|
|
60
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
61
|
-
}),
|
|
57
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
62
58
|
});
|
|
63
59
|
|
|
64
60
|
async function run() {
|
|
@@ -115,15 +111,16 @@ Create a new buyer record.
|
|
|
115
111
|
|
|
116
112
|
<!-- UsageSnippet language="typescript" operationID="add_buyer" method="post" path="/buyers" -->
|
|
117
113
|
```typescript
|
|
118
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
114
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
115
|
+
import fs from "fs";
|
|
119
116
|
|
|
120
117
|
const gr4vy = new Gr4vy({
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
118
|
+
id: "example",
|
|
119
|
+
server: "sandbox",
|
|
120
|
+
merchantAccountId: "default",
|
|
121
|
+
bearerAuth: withToken({
|
|
122
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
123
|
+
}),
|
|
127
124
|
});
|
|
128
125
|
|
|
129
126
|
async function run() {
|
|
@@ -141,18 +138,13 @@ The standalone function version of this method:
|
|
|
141
138
|
|
|
142
139
|
```typescript
|
|
143
140
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
144
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
145
141
|
import { buyersCreate } from "@gr4vy/sdk/funcs/buyersCreate.js";
|
|
146
142
|
|
|
147
143
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
148
144
|
// You can create one instance of it to use across an application.
|
|
149
145
|
const gr4vy = new Gr4vyCore({
|
|
150
146
|
merchantAccountId: "<id>",
|
|
151
|
-
|
|
152
|
-
id: "example",
|
|
153
|
-
bearerAuth: withToken({
|
|
154
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
155
|
-
}),
|
|
147
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
156
148
|
});
|
|
157
149
|
|
|
158
150
|
async function run() {
|
|
@@ -208,15 +200,16 @@ Fetches a buyer by its ID.
|
|
|
208
200
|
|
|
209
201
|
<!-- UsageSnippet language="typescript" operationID="get_buyer" method="get" path="/buyers/{buyer_id}" -->
|
|
210
202
|
```typescript
|
|
211
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
203
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
204
|
+
import fs from "fs";
|
|
212
205
|
|
|
213
206
|
const gr4vy = new Gr4vy({
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
207
|
+
id: "example",
|
|
208
|
+
server: "sandbox",
|
|
209
|
+
merchantAccountId: "default",
|
|
210
|
+
bearerAuth: withToken({
|
|
211
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
212
|
+
}),
|
|
220
213
|
});
|
|
221
214
|
|
|
222
215
|
async function run() {
|
|
@@ -234,18 +227,13 @@ The standalone function version of this method:
|
|
|
234
227
|
|
|
235
228
|
```typescript
|
|
236
229
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
237
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
238
230
|
import { buyersGet } from "@gr4vy/sdk/funcs/buyersGet.js";
|
|
239
231
|
|
|
240
232
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
241
233
|
// You can create one instance of it to use across an application.
|
|
242
234
|
const gr4vy = new Gr4vyCore({
|
|
243
235
|
merchantAccountId: "<id>",
|
|
244
|
-
|
|
245
|
-
id: "example",
|
|
246
|
-
bearerAuth: withToken({
|
|
247
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
248
|
-
}),
|
|
236
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
249
237
|
});
|
|
250
238
|
|
|
251
239
|
async function run() {
|
|
@@ -301,15 +289,16 @@ Updates a buyer record.
|
|
|
301
289
|
|
|
302
290
|
<!-- UsageSnippet language="typescript" operationID="update_buyer" method="put" path="/buyers/{buyer_id}" -->
|
|
303
291
|
```typescript
|
|
304
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
292
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
293
|
+
import fs from "fs";
|
|
305
294
|
|
|
306
295
|
const gr4vy = new Gr4vy({
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
296
|
+
id: "example",
|
|
297
|
+
server: "sandbox",
|
|
298
|
+
merchantAccountId: "default",
|
|
299
|
+
bearerAuth: withToken({
|
|
300
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
301
|
+
}),
|
|
313
302
|
});
|
|
314
303
|
|
|
315
304
|
async function run() {
|
|
@@ -327,18 +316,13 @@ The standalone function version of this method:
|
|
|
327
316
|
|
|
328
317
|
```typescript
|
|
329
318
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
330
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
331
319
|
import { buyersUpdate } from "@gr4vy/sdk/funcs/buyersUpdate.js";
|
|
332
320
|
|
|
333
321
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
334
322
|
// You can create one instance of it to use across an application.
|
|
335
323
|
const gr4vy = new Gr4vyCore({
|
|
336
324
|
merchantAccountId: "<id>",
|
|
337
|
-
|
|
338
|
-
id: "example",
|
|
339
|
-
bearerAuth: withToken({
|
|
340
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
341
|
-
}),
|
|
325
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
342
326
|
});
|
|
343
327
|
|
|
344
328
|
async function run() {
|
|
@@ -395,15 +379,16 @@ Permanently removes a buyer record.
|
|
|
395
379
|
|
|
396
380
|
<!-- UsageSnippet language="typescript" operationID="delete_buyer" method="delete" path="/buyers/{buyer_id}" -->
|
|
397
381
|
```typescript
|
|
398
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
382
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
383
|
+
import fs from "fs";
|
|
399
384
|
|
|
400
385
|
const gr4vy = new Gr4vy({
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
386
|
+
id: "example",
|
|
387
|
+
server: "sandbox",
|
|
388
|
+
merchantAccountId: "default",
|
|
389
|
+
bearerAuth: withToken({
|
|
390
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
391
|
+
}),
|
|
407
392
|
});
|
|
408
393
|
|
|
409
394
|
async function run() {
|
|
@@ -421,18 +406,13 @@ The standalone function version of this method:
|
|
|
421
406
|
|
|
422
407
|
```typescript
|
|
423
408
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
424
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
425
409
|
import { buyersDelete } from "@gr4vy/sdk/funcs/buyersDelete.js";
|
|
426
410
|
|
|
427
411
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
428
412
|
// You can create one instance of it to use across an application.
|
|
429
413
|
const gr4vy = new Gr4vyCore({
|
|
430
414
|
merchantAccountId: "<id>",
|
|
431
|
-
|
|
432
|
-
id: "example",
|
|
433
|
-
bearerAuth: withToken({
|
|
434
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
435
|
-
}),
|
|
415
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
436
416
|
});
|
|
437
417
|
|
|
438
418
|
async function run() {
|
|
@@ -15,15 +15,16 @@ Fetch a list of the definitions of each card scheme.
|
|
|
15
15
|
|
|
16
16
|
<!-- UsageSnippet language="typescript" operationID="list_card_scheme_definitions" method="get" path="/card-scheme-definitions" -->
|
|
17
17
|
```typescript
|
|
18
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
18
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
19
|
+
import fs from "fs";
|
|
19
20
|
|
|
20
21
|
const gr4vy = new Gr4vy({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
id: "example",
|
|
23
|
+
server: "sandbox",
|
|
24
|
+
merchantAccountId: "default",
|
|
25
|
+
bearerAuth: withToken({
|
|
26
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
27
|
+
}),
|
|
27
28
|
});
|
|
28
29
|
|
|
29
30
|
async function run() {
|
|
@@ -41,18 +42,13 @@ The standalone function version of this method:
|
|
|
41
42
|
|
|
42
43
|
```typescript
|
|
43
44
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
44
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
45
45
|
import { cardSchemeDefinitionsList } from "@gr4vy/sdk/funcs/cardSchemeDefinitionsList.js";
|
|
46
46
|
|
|
47
47
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
48
48
|
// You can create one instance of it to use across an application.
|
|
49
49
|
const gr4vy = new Gr4vyCore({
|
|
50
50
|
merchantAccountId: "<id>",
|
|
51
|
-
|
|
52
|
-
id: "example",
|
|
53
|
-
bearerAuth: withToken({
|
|
54
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
55
|
-
}),
|
|
51
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
56
52
|
});
|
|
57
53
|
|
|
58
54
|
async function run() {
|
|
@@ -18,15 +18,16 @@ Create a new checkout session.
|
|
|
18
18
|
|
|
19
19
|
<!-- UsageSnippet language="typescript" operationID="create_checkout_session" method="post" path="/checkout/sessions" -->
|
|
20
20
|
```typescript
|
|
21
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
21
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
22
|
+
import fs from "fs";
|
|
22
23
|
|
|
23
24
|
const gr4vy = new Gr4vy({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
id: "example",
|
|
26
|
+
server: "sandbox",
|
|
27
|
+
merchantAccountId: "default",
|
|
28
|
+
bearerAuth: withToken({
|
|
29
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
30
|
+
}),
|
|
30
31
|
});
|
|
31
32
|
|
|
32
33
|
async function run() {
|
|
@@ -44,18 +45,13 @@ The standalone function version of this method:
|
|
|
44
45
|
|
|
45
46
|
```typescript
|
|
46
47
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
47
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
48
48
|
import { checkoutSessionsCreate } from "@gr4vy/sdk/funcs/checkoutSessionsCreate.js";
|
|
49
49
|
|
|
50
50
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
51
51
|
// You can create one instance of it to use across an application.
|
|
52
52
|
const gr4vy = new Gr4vyCore({
|
|
53
53
|
merchantAccountId: "<id>",
|
|
54
|
-
|
|
55
|
-
id: "example",
|
|
56
|
-
bearerAuth: withToken({
|
|
57
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
58
|
-
}),
|
|
54
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
59
55
|
});
|
|
60
56
|
|
|
61
57
|
async function run() {
|
|
@@ -111,15 +107,16 @@ Update the information stored on a checkout session.
|
|
|
111
107
|
|
|
112
108
|
<!-- UsageSnippet language="typescript" operationID="update_checkout_session" method="put" path="/checkout/sessions/{session_id}" -->
|
|
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() {
|
|
@@ -137,18 +134,13 @@ The standalone function version of this method:
|
|
|
137
134
|
|
|
138
135
|
```typescript
|
|
139
136
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
140
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
141
137
|
import { checkoutSessionsUpdate } from "@gr4vy/sdk/funcs/checkoutSessionsUpdate.js";
|
|
142
138
|
|
|
143
139
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
144
140
|
// You can create one instance of it to use across an application.
|
|
145
141
|
const gr4vy = new Gr4vyCore({
|
|
146
142
|
merchantAccountId: "<id>",
|
|
147
|
-
|
|
148
|
-
id: "example",
|
|
149
|
-
bearerAuth: withToken({
|
|
150
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
151
|
-
}),
|
|
143
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
152
144
|
});
|
|
153
145
|
|
|
154
146
|
async function run() {
|
|
@@ -205,15 +197,16 @@ Retrieve the information stored on a checkout session.
|
|
|
205
197
|
|
|
206
198
|
<!-- UsageSnippet language="typescript" operationID="get_checkout_session" method="get" path="/checkout/sessions/{session_id}" -->
|
|
207
199
|
```typescript
|
|
208
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
200
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
201
|
+
import fs from "fs";
|
|
209
202
|
|
|
210
203
|
const gr4vy = new Gr4vy({
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
204
|
+
id: "example",
|
|
205
|
+
server: "sandbox",
|
|
206
|
+
merchantAccountId: "default",
|
|
207
|
+
bearerAuth: withToken({
|
|
208
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
209
|
+
}),
|
|
217
210
|
});
|
|
218
211
|
|
|
219
212
|
async function run() {
|
|
@@ -231,18 +224,13 @@ The standalone function version of this method:
|
|
|
231
224
|
|
|
232
225
|
```typescript
|
|
233
226
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
234
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
235
227
|
import { checkoutSessionsGet } from "@gr4vy/sdk/funcs/checkoutSessionsGet.js";
|
|
236
228
|
|
|
237
229
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
238
230
|
// You can create one instance of it to use across an application.
|
|
239
231
|
const gr4vy = new Gr4vyCore({
|
|
240
232
|
merchantAccountId: "<id>",
|
|
241
|
-
|
|
242
|
-
id: "example",
|
|
243
|
-
bearerAuth: withToken({
|
|
244
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
245
|
-
}),
|
|
233
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
246
234
|
});
|
|
247
235
|
|
|
248
236
|
async function run() {
|
|
@@ -297,15 +285,16 @@ Delete a checkout session and all of its (PCI) data.
|
|
|
297
285
|
|
|
298
286
|
<!-- UsageSnippet language="typescript" operationID="delete_checkout_session" method="delete" path="/checkout/sessions/{session_id}" -->
|
|
299
287
|
```typescript
|
|
300
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
288
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
289
|
+
import fs from "fs";
|
|
301
290
|
|
|
302
291
|
const gr4vy = new Gr4vy({
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
292
|
+
id: "example",
|
|
293
|
+
server: "sandbox",
|
|
294
|
+
merchantAccountId: "default",
|
|
295
|
+
bearerAuth: withToken({
|
|
296
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
297
|
+
}),
|
|
309
298
|
});
|
|
310
299
|
|
|
311
300
|
async function run() {
|
|
@@ -323,18 +312,13 @@ The standalone function version of this method:
|
|
|
323
312
|
|
|
324
313
|
```typescript
|
|
325
314
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
326
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
327
315
|
import { checkoutSessionsDelete } from "@gr4vy/sdk/funcs/checkoutSessionsDelete.js";
|
|
328
316
|
|
|
329
317
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
330
318
|
// You can create one instance of it to use across an application.
|
|
331
319
|
const gr4vy = new Gr4vyCore({
|
|
332
320
|
merchantAccountId: "<id>",
|
|
333
|
-
|
|
334
|
-
id: "example",
|
|
335
|
-
bearerAuth: withToken({
|
|
336
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
337
|
-
}),
|
|
321
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
338
322
|
});
|
|
339
323
|
|
|
340
324
|
async function run() {
|
|
@@ -15,15 +15,16 @@ Provision a cryptogram for a network token.
|
|
|
15
15
|
|
|
16
16
|
<!-- UsageSnippet language="typescript" operationID="create_payment_method_network_token_cryptogram" method="post" path="/payment-methods/{payment_method_id}/network-tokens/{network_token_id}/cryptogram" -->
|
|
17
17
|
```typescript
|
|
18
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
18
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
19
|
+
import fs from "fs";
|
|
19
20
|
|
|
20
21
|
const gr4vy = new Gr4vy({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
id: "example",
|
|
23
|
+
server: "sandbox",
|
|
24
|
+
merchantAccountId: "default",
|
|
25
|
+
bearerAuth: withToken({
|
|
26
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
27
|
+
}),
|
|
27
28
|
});
|
|
28
29
|
|
|
29
30
|
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 { paymentMethodsNetworkTokensCryptogramCreate } from "@gr4vy/sdk/funcs/paymentMethodsNetworkTokensCryptogramCreate.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() {
|