@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 @@ Register a digital wallet like Apple Pay, Google Pay, or Click to Pay.
|
|
|
19
19
|
|
|
20
20
|
<!-- UsageSnippet language="typescript" operationID="configure_digital_wallet" method="post" path="/digital-wallets" -->
|
|
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() {
|
|
@@ -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 { digitalWalletsCreate } from "@gr4vy/sdk/funcs/digitalWalletsCreate.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() {
|
|
@@ -120,15 +116,16 @@ List configured digital wallets.
|
|
|
120
116
|
|
|
121
117
|
<!-- UsageSnippet language="typescript" operationID="list_digital_wallets" method="get" path="/digital-wallets" -->
|
|
122
118
|
```typescript
|
|
123
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
119
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
120
|
+
import fs from "fs";
|
|
124
121
|
|
|
125
122
|
const gr4vy = new Gr4vy({
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
123
|
+
id: "example",
|
|
124
|
+
server: "sandbox",
|
|
125
|
+
merchantAccountId: "default",
|
|
126
|
+
bearerAuth: withToken({
|
|
127
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
128
|
+
}),
|
|
132
129
|
});
|
|
133
130
|
|
|
134
131
|
async function run() {
|
|
@@ -146,18 +143,13 @@ The standalone function version of this method:
|
|
|
146
143
|
|
|
147
144
|
```typescript
|
|
148
145
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
149
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
150
146
|
import { digitalWalletsList } from "@gr4vy/sdk/funcs/digitalWalletsList.js";
|
|
151
147
|
|
|
152
148
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
153
149
|
// You can create one instance of it to use across an application.
|
|
154
150
|
const gr4vy = new Gr4vyCore({
|
|
155
151
|
merchantAccountId: "<id>",
|
|
156
|
-
|
|
157
|
-
id: "example",
|
|
158
|
-
bearerAuth: withToken({
|
|
159
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
160
|
-
}),
|
|
152
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
161
153
|
});
|
|
162
154
|
|
|
163
155
|
async function run() {
|
|
@@ -212,15 +204,16 @@ Fetch the details a digital wallet.
|
|
|
212
204
|
|
|
213
205
|
<!-- UsageSnippet language="typescript" operationID="get_digital_wallet" method="get" path="/digital-wallets/{digital_wallet_id}" -->
|
|
214
206
|
```typescript
|
|
215
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
207
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
208
|
+
import fs from "fs";
|
|
216
209
|
|
|
217
210
|
const gr4vy = new Gr4vy({
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
211
|
+
id: "example",
|
|
212
|
+
server: "sandbox",
|
|
213
|
+
merchantAccountId: "default",
|
|
214
|
+
bearerAuth: withToken({
|
|
215
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
216
|
+
}),
|
|
224
217
|
});
|
|
225
218
|
|
|
226
219
|
async function run() {
|
|
@@ -238,18 +231,13 @@ The standalone function version of this method:
|
|
|
238
231
|
|
|
239
232
|
```typescript
|
|
240
233
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
241
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
242
234
|
import { digitalWalletsGet } from "@gr4vy/sdk/funcs/digitalWalletsGet.js";
|
|
243
235
|
|
|
244
236
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
245
237
|
// You can create one instance of it to use across an application.
|
|
246
238
|
const gr4vy = new Gr4vyCore({
|
|
247
239
|
merchantAccountId: "<id>",
|
|
248
|
-
|
|
249
|
-
id: "example",
|
|
250
|
-
bearerAuth: withToken({
|
|
251
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
252
|
-
}),
|
|
240
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
253
241
|
});
|
|
254
242
|
|
|
255
243
|
async function run() {
|
|
@@ -305,15 +293,16 @@ Delete a configured digital wallet.
|
|
|
305
293
|
|
|
306
294
|
<!-- UsageSnippet language="typescript" operationID="delete_digital_wallet" method="delete" path="/digital-wallets/{digital_wallet_id}" -->
|
|
307
295
|
```typescript
|
|
308
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
296
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
297
|
+
import fs from "fs";
|
|
309
298
|
|
|
310
299
|
const gr4vy = new Gr4vy({
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
300
|
+
id: "example",
|
|
301
|
+
server: "sandbox",
|
|
302
|
+
merchantAccountId: "default",
|
|
303
|
+
bearerAuth: withToken({
|
|
304
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
305
|
+
}),
|
|
317
306
|
});
|
|
318
307
|
|
|
319
308
|
async function run() {
|
|
@@ -331,18 +320,13 @@ The standalone function version of this method:
|
|
|
331
320
|
|
|
332
321
|
```typescript
|
|
333
322
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
334
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
335
323
|
import { digitalWalletsDelete } from "@gr4vy/sdk/funcs/digitalWalletsDelete.js";
|
|
336
324
|
|
|
337
325
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
338
326
|
// You can create one instance of it to use across an application.
|
|
339
327
|
const gr4vy = new Gr4vyCore({
|
|
340
328
|
merchantAccountId: "<id>",
|
|
341
|
-
|
|
342
|
-
id: "example",
|
|
343
|
-
bearerAuth: withToken({
|
|
344
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
345
|
-
}),
|
|
329
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
346
330
|
});
|
|
347
331
|
|
|
348
332
|
async function run() {
|
|
@@ -398,15 +382,16 @@ Update a digital wallet.
|
|
|
398
382
|
|
|
399
383
|
<!-- UsageSnippet language="typescript" operationID="update_digital_wallet" method="put" path="/digital-wallets/{digital_wallet_id}" -->
|
|
400
384
|
```typescript
|
|
401
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
385
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
386
|
+
import fs from "fs";
|
|
402
387
|
|
|
403
388
|
const gr4vy = new Gr4vy({
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
389
|
+
id: "example",
|
|
390
|
+
server: "sandbox",
|
|
391
|
+
merchantAccountId: "default",
|
|
392
|
+
bearerAuth: withToken({
|
|
393
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
394
|
+
}),
|
|
410
395
|
});
|
|
411
396
|
|
|
412
397
|
async function run() {
|
|
@@ -424,18 +409,13 @@ The standalone function version of this method:
|
|
|
424
409
|
|
|
425
410
|
```typescript
|
|
426
411
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
427
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
428
412
|
import { digitalWalletsUpdate } from "@gr4vy/sdk/funcs/digitalWalletsUpdate.js";
|
|
429
413
|
|
|
430
414
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
431
415
|
// You can create one instance of it to use across an application.
|
|
432
416
|
const gr4vy = new Gr4vyCore({
|
|
433
417
|
merchantAccountId: "<id>",
|
|
434
|
-
|
|
435
|
-
id: "example",
|
|
436
|
-
bearerAuth: withToken({
|
|
437
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
438
|
-
}),
|
|
418
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
439
419
|
});
|
|
440
420
|
|
|
441
421
|
async function run() {
|
|
@@ -16,15 +16,16 @@ Register a digital wallet domain (Apple Pay only).
|
|
|
16
16
|
|
|
17
17
|
<!-- UsageSnippet language="typescript" operationID="register_digital_wallet_domain" method="post" path="/digital-wallets/{digital_wallet_id}/domains" -->
|
|
18
18
|
```typescript
|
|
19
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
19
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
20
|
+
import fs from "fs";
|
|
20
21
|
|
|
21
22
|
const gr4vy = new Gr4vy({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
id: "example",
|
|
24
|
+
server: "sandbox",
|
|
25
|
+
merchantAccountId: "default",
|
|
26
|
+
bearerAuth: withToken({
|
|
27
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
28
|
+
}),
|
|
28
29
|
});
|
|
29
30
|
|
|
30
31
|
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 { digitalWalletsDomainsCreate } from "@gr4vy/sdk/funcs/digitalWalletsDomainsCreate.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() {
|
|
@@ -114,15 +110,16 @@ Remove a digital wallet domain (Apple Pay only).
|
|
|
114
110
|
|
|
115
111
|
<!-- UsageSnippet language="typescript" operationID="unregister_digital_wallet_domain" method="delete" path="/digital-wallets/{digital_wallet_id}/domains" -->
|
|
116
112
|
```typescript
|
|
117
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
113
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
114
|
+
import fs from "fs";
|
|
118
115
|
|
|
119
116
|
const gr4vy = new Gr4vy({
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
117
|
+
id: "example",
|
|
118
|
+
server: "sandbox",
|
|
119
|
+
merchantAccountId: "default",
|
|
120
|
+
bearerAuth: withToken({
|
|
121
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
122
|
+
}),
|
|
126
123
|
});
|
|
127
124
|
|
|
128
125
|
async function run() {
|
|
@@ -142,18 +139,13 @@ The standalone function version of this method:
|
|
|
142
139
|
|
|
143
140
|
```typescript
|
|
144
141
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
145
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
146
142
|
import { digitalWalletsDomainsDelete } from "@gr4vy/sdk/funcs/digitalWalletsDomainsDelete.js";
|
|
147
143
|
|
|
148
144
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
149
145
|
// You can create one instance of it to use across an application.
|
|
150
146
|
const gr4vy = new Gr4vyCore({
|
|
151
147
|
merchantAccountId: "<id>",
|
|
152
|
-
|
|
153
|
-
id: "example",
|
|
154
|
-
bearerAuth: withToken({
|
|
155
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
156
|
-
}),
|
|
148
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
157
149
|
});
|
|
158
150
|
|
|
159
151
|
async function run() {
|
|
@@ -15,15 +15,16 @@ Retrieve a paginated list of events related to processing a transaction, includi
|
|
|
15
15
|
|
|
16
16
|
<!-- UsageSnippet language="typescript" operationID="list_transaction_events" method="get" path="/transactions/{transaction_id}/events" -->
|
|
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 { transactionsEventsList } from "@gr4vy/sdk/funcs/transactionsEventsList.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() {
|
|
@@ -17,15 +17,16 @@ List all executions of a specific report.
|
|
|
17
17
|
|
|
18
18
|
<!-- UsageSnippet language="typescript" operationID="list_report_executions" method="get" path="/reports/{report_id}/executions" -->
|
|
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() {
|
|
@@ -45,18 +46,13 @@ The standalone function version of this method:
|
|
|
45
46
|
|
|
46
47
|
```typescript
|
|
47
48
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
48
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
49
49
|
import { reportsExecutionsList } from "@gr4vy/sdk/funcs/reportsExecutionsList.js";
|
|
50
50
|
|
|
51
51
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
52
52
|
// You can create one instance of it to use across an application.
|
|
53
53
|
const gr4vy = new Gr4vyCore({
|
|
54
54
|
merchantAccountId: "<id>",
|
|
55
|
-
|
|
56
|
-
id: "example",
|
|
57
|
-
bearerAuth: withToken({
|
|
58
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
59
|
-
}),
|
|
55
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
60
56
|
});
|
|
61
57
|
|
|
62
58
|
async function run() {
|
|
@@ -116,15 +112,16 @@ Creates a download URL for a specific execution of a report.
|
|
|
116
112
|
|
|
117
113
|
<!-- UsageSnippet language="typescript" operationID="create_report_execution_url" method="post" path="/reports/{report_id}/executions/{report_execution_id}/url" -->
|
|
118
114
|
```typescript
|
|
119
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
115
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
116
|
+
import fs from "fs";
|
|
120
117
|
|
|
121
118
|
const gr4vy = new Gr4vy({
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
119
|
+
id: "example",
|
|
120
|
+
server: "sandbox",
|
|
121
|
+
merchantAccountId: "default",
|
|
122
|
+
bearerAuth: withToken({
|
|
123
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
124
|
+
}),
|
|
128
125
|
});
|
|
129
126
|
|
|
130
127
|
async function run() {
|
|
@@ -142,18 +139,13 @@ The standalone function version of this method:
|
|
|
142
139
|
|
|
143
140
|
```typescript
|
|
144
141
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
145
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
146
142
|
import { reportsExecutionsUrl } from "@gr4vy/sdk/funcs/reportsExecutionsUrl.js";
|
|
147
143
|
|
|
148
144
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
149
145
|
// You can create one instance of it to use across an application.
|
|
150
146
|
const gr4vy = new Gr4vyCore({
|
|
151
147
|
merchantAccountId: "<id>",
|
|
152
|
-
|
|
153
|
-
id: "example",
|
|
154
|
-
bearerAuth: withToken({
|
|
155
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
156
|
-
}),
|
|
148
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
157
149
|
});
|
|
158
150
|
|
|
159
151
|
async function run() {
|
|
@@ -210,15 +202,16 @@ Fetch a specific executed report.
|
|
|
210
202
|
|
|
211
203
|
<!-- UsageSnippet language="typescript" operationID="get_report_execution" method="get" path="/report-executions/{report_execution_id}" -->
|
|
212
204
|
```typescript
|
|
213
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
205
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
206
|
+
import fs from "fs";
|
|
214
207
|
|
|
215
208
|
const gr4vy = new Gr4vy({
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
209
|
+
id: "example",
|
|
210
|
+
server: "sandbox",
|
|
211
|
+
merchantAccountId: "default",
|
|
212
|
+
bearerAuth: withToken({
|
|
213
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
214
|
+
}),
|
|
222
215
|
});
|
|
223
216
|
|
|
224
217
|
async function run() {
|
|
@@ -236,18 +229,13 @@ The standalone function version of this method:
|
|
|
236
229
|
|
|
237
230
|
```typescript
|
|
238
231
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
239
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
240
232
|
import { reportsExecutionsGet } from "@gr4vy/sdk/funcs/reportsExecutionsGet.js";
|
|
241
233
|
|
|
242
234
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
243
235
|
// You can create one instance of it to use across an application.
|
|
244
236
|
const gr4vy = new Gr4vyCore({
|
|
245
237
|
merchantAccountId: "<id>",
|
|
246
|
-
|
|
247
|
-
id: "example",
|
|
248
|
-
bearerAuth: withToken({
|
|
249
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
250
|
-
}),
|
|
238
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
251
239
|
});
|
|
252
240
|
|
|
253
241
|
async function run() {
|
|
@@ -18,15 +18,16 @@ Fetch details about a gift card.
|
|
|
18
18
|
|
|
19
19
|
<!-- UsageSnippet language="typescript" operationID="get_gift_card" method="get" path="/gift-cards/{gift_card_id}" -->
|
|
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 { giftCardsGet } from "@gr4vy/sdk/funcs/giftCardsGet.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 @@ Removes a gift card from our system.
|
|
|
111
107
|
|
|
112
108
|
<!-- UsageSnippet language="typescript" operationID="delete_gift_card" method="delete" path="/gift-cards/{gift_card_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 { giftCardsDelete } from "@gr4vy/sdk/funcs/giftCardsDelete.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() {
|
|
@@ -204,15 +196,16 @@ Store a new gift card in the vault.
|
|
|
204
196
|
|
|
205
197
|
<!-- UsageSnippet language="typescript" operationID="create_gift_card" method="post" path="/gift-cards" -->
|
|
206
198
|
```typescript
|
|
207
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
199
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
200
|
+
import fs from "fs";
|
|
208
201
|
|
|
209
202
|
const gr4vy = new Gr4vy({
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
203
|
+
id: "example",
|
|
204
|
+
server: "sandbox",
|
|
205
|
+
merchantAccountId: "default",
|
|
206
|
+
bearerAuth: withToken({
|
|
207
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
208
|
+
}),
|
|
216
209
|
});
|
|
217
210
|
|
|
218
211
|
async function run() {
|
|
@@ -233,18 +226,13 @@ The standalone function version of this method:
|
|
|
233
226
|
|
|
234
227
|
```typescript
|
|
235
228
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
236
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
237
229
|
import { giftCardsCreate } from "@gr4vy/sdk/funcs/giftCardsCreate.js";
|
|
238
230
|
|
|
239
231
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
240
232
|
// You can create one instance of it to use across an application.
|
|
241
233
|
const gr4vy = new Gr4vyCore({
|
|
242
234
|
merchantAccountId: "<id>",
|
|
243
|
-
|
|
244
|
-
id: "example",
|
|
245
|
-
bearerAuth: withToken({
|
|
246
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
247
|
-
}),
|
|
235
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
248
236
|
});
|
|
249
237
|
|
|
250
238
|
async function run() {
|
|
@@ -303,15 +291,16 @@ Browser all gift cards.
|
|
|
303
291
|
|
|
304
292
|
<!-- UsageSnippet language="typescript" operationID="list_gift_cards" method="get" path="/gift-cards" -->
|
|
305
293
|
```typescript
|
|
306
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
294
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
295
|
+
import fs from "fs";
|
|
307
296
|
|
|
308
297
|
const gr4vy = new Gr4vy({
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
298
|
+
id: "example",
|
|
299
|
+
server: "sandbox",
|
|
300
|
+
merchantAccountId: "default",
|
|
301
|
+
bearerAuth: withToken({
|
|
302
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
303
|
+
}),
|
|
315
304
|
});
|
|
316
305
|
|
|
317
306
|
async function run() {
|
|
@@ -331,18 +320,13 @@ The standalone function version of this method:
|
|
|
331
320
|
|
|
332
321
|
```typescript
|
|
333
322
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
334
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
335
323
|
import { giftCardsList } from "@gr4vy/sdk/funcs/giftCardsList.js";
|
|
336
324
|
|
|
337
325
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
338
326
|
// You can create one instance of it to use across an application.
|
|
339
327
|
const gr4vy = new Gr4vyCore({
|
|
340
328
|
merchantAccountId: "<id>",
|
|
341
|
-
|
|
342
|
-
id: "example",
|
|
343
|
-
bearerAuth: withToken({
|
|
344
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
345
|
-
}),
|
|
329
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
346
330
|
});
|
|
347
331
|
|
|
348
332
|
async function run() {
|