@gr4vy/sdk 1.1.40 → 1.1.41
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 +1 -6
- package/README.md +32 -37
- 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/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 +72 -104
- package/examples/accountUpdaterJobsCreate.example.ts +8 -3
- package/examples/package-lock.json +620 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
|
@@ -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() {
|
|
@@ -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() {
|