@gr4vy/sdk 1.1.30 → 1.1.32
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 +37 -32
- package/docs/sdks/all/README.md +13 -9
- package/docs/sdks/auditlogs/README.md +13 -9
- package/docs/sdks/balances/README.md +13 -9
- package/docs/sdks/buyers/README.md +65 -45
- package/docs/sdks/cardschemedefinitions/README.md +13 -9
- package/docs/sdks/checkoutsessions/README.md +52 -36
- package/docs/sdks/cryptogram/README.md +13 -9
- package/docs/sdks/digitalwallets/README.md +65 -45
- package/docs/sdks/domains/README.md +26 -18
- package/docs/sdks/events/README.md +13 -9
- package/docs/sdks/executions/README.md +39 -27
- package/docs/sdks/giftcards/README.md +52 -36
- package/docs/sdks/gr4vygiftcards/README.md +13 -9
- package/docs/sdks/gr4vypaymentmethods/README.md +13 -9
- package/docs/sdks/gr4vyrefunds/README.md +39 -27
- package/docs/sdks/jobs/README.md +13 -9
- package/docs/sdks/merchantaccounts/README.md +48 -36
- package/docs/sdks/networktokens/README.md +65 -45
- package/docs/sdks/paymentlinks/README.md +52 -36
- package/docs/sdks/paymentmethods/README.md +52 -36
- package/docs/sdks/paymentoptions/README.md +13 -9
- package/docs/sdks/paymentservicedefinitions/README.md +36 -27
- package/docs/sdks/paymentservices/README.md +91 -63
- package/docs/sdks/paymentservicetokens/README.md +39 -27
- package/docs/sdks/payouts/README.md +39 -27
- package/docs/sdks/refunds/README.md +13 -9
- package/docs/sdks/reportexecutions/README.md +13 -9
- package/docs/sdks/reports/README.md +52 -36
- package/docs/sdks/sessions/README.md +38 -27
- package/docs/sdks/settlements/README.md +26 -18
- package/docs/sdks/shippingdetails/README.md +65 -45
- package/docs/sdks/transactions/README.md +91 -63
- package/examples/accountUpdaterJobsCreate.example.ts +3 -8
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js.map +1 -1
- package/models/components/stripeconnectoptions.d.ts +5 -0
- package/models/components/stripeconnectoptions.d.ts.map +1 -1
- package/models/components/stripeconnectoptions.js +4 -0
- package/models/components/stripeconnectoptions.js.map +1 -1
- package/models/components/transactionevent.d.ts +2 -0
- package/models/components/transactionevent.d.ts.map +1 -1
- package/models/components/transactionevent.js +2 -0
- package/models/components/transactionevent.js.map +1 -1
- package/models/components/travelhuboptions.d.ts +5 -0
- package/models/components/travelhuboptions.d.ts.map +1 -1
- package/models/components/travelhuboptions.js +2 -0
- package/models/components/travelhuboptions.js.map +1 -1
- package/models/components/trustlyoptions.d.ts +5 -0
- package/models/components/trustlyoptions.d.ts.map +1 -1
- package/models/components/trustlyoptions.js +2 -0
- package/models/components/trustlyoptions.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/security.ts +4 -1
- package/src/models/components/stripeconnectoptions.ts +9 -0
- package/src/models/components/transactionevent.ts +4 -0
- package/src/models/components/travelhuboptions.ts +7 -0
- package/src/models/components/trustlyoptions.ts +7 -0
- package/examples/package-lock.json +0 -2716
|
@@ -18,16 +18,15 @@ 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
|
|
22
|
-
import fs from "fs";
|
|
21
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
23
22
|
|
|
24
23
|
const gr4vy = new Gr4vy({
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
merchantAccountId: "<id>",
|
|
25
|
+
server: "sandbox",
|
|
26
|
+
id: "example",
|
|
27
|
+
bearerAuth: withToken({
|
|
28
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
29
|
+
}),
|
|
31
30
|
});
|
|
32
31
|
|
|
33
32
|
async function run() {
|
|
@@ -45,13 +44,18 @@ The standalone function version of this method:
|
|
|
45
44
|
|
|
46
45
|
```typescript
|
|
47
46
|
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
|
-
|
|
54
|
+
server: "sandbox",
|
|
55
|
+
id: "example",
|
|
56
|
+
bearerAuth: withToken({
|
|
57
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
58
|
+
}),
|
|
55
59
|
});
|
|
56
60
|
|
|
57
61
|
async function run() {
|
|
@@ -107,16 +111,15 @@ Update the information stored on a checkout session.
|
|
|
107
111
|
|
|
108
112
|
<!-- UsageSnippet language="typescript" operationID="update_checkout_session" method="put" path="/checkout/sessions/{session_id}" -->
|
|
109
113
|
```typescript
|
|
110
|
-
import { Gr4vy
|
|
111
|
-
import fs from "fs";
|
|
114
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
112
115
|
|
|
113
116
|
const gr4vy = new Gr4vy({
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
merchantAccountId: "<id>",
|
|
118
|
+
server: "sandbox",
|
|
119
|
+
id: "example",
|
|
120
|
+
bearerAuth: withToken({
|
|
121
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
122
|
+
}),
|
|
120
123
|
});
|
|
121
124
|
|
|
122
125
|
async function run() {
|
|
@@ -134,13 +137,18 @@ The standalone function version of this method:
|
|
|
134
137
|
|
|
135
138
|
```typescript
|
|
136
139
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
140
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
137
141
|
import { checkoutSessionsUpdate } from "@gr4vy/sdk/funcs/checkoutSessionsUpdate.js";
|
|
138
142
|
|
|
139
143
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
140
144
|
// You can create one instance of it to use across an application.
|
|
141
145
|
const gr4vy = new Gr4vyCore({
|
|
142
146
|
merchantAccountId: "<id>",
|
|
143
|
-
|
|
147
|
+
server: "sandbox",
|
|
148
|
+
id: "example",
|
|
149
|
+
bearerAuth: withToken({
|
|
150
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
151
|
+
}),
|
|
144
152
|
});
|
|
145
153
|
|
|
146
154
|
async function run() {
|
|
@@ -197,16 +205,15 @@ Retrieve the information stored on a checkout session.
|
|
|
197
205
|
|
|
198
206
|
<!-- UsageSnippet language="typescript" operationID="get_checkout_session" method="get" path="/checkout/sessions/{session_id}" -->
|
|
199
207
|
```typescript
|
|
200
|
-
import { Gr4vy
|
|
201
|
-
import fs from "fs";
|
|
208
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
202
209
|
|
|
203
210
|
const gr4vy = new Gr4vy({
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
211
|
+
merchantAccountId: "<id>",
|
|
212
|
+
server: "sandbox",
|
|
213
|
+
id: "example",
|
|
214
|
+
bearerAuth: withToken({
|
|
215
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
216
|
+
}),
|
|
210
217
|
});
|
|
211
218
|
|
|
212
219
|
async function run() {
|
|
@@ -224,13 +231,18 @@ The standalone function version of this method:
|
|
|
224
231
|
|
|
225
232
|
```typescript
|
|
226
233
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
234
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
227
235
|
import { checkoutSessionsGet } from "@gr4vy/sdk/funcs/checkoutSessionsGet.js";
|
|
228
236
|
|
|
229
237
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
230
238
|
// You can create one instance of it to use across an application.
|
|
231
239
|
const gr4vy = new Gr4vyCore({
|
|
232
240
|
merchantAccountId: "<id>",
|
|
233
|
-
|
|
241
|
+
server: "sandbox",
|
|
242
|
+
id: "example",
|
|
243
|
+
bearerAuth: withToken({
|
|
244
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
245
|
+
}),
|
|
234
246
|
});
|
|
235
247
|
|
|
236
248
|
async function run() {
|
|
@@ -285,16 +297,15 @@ Delete a checkout session and all of its (PCI) data.
|
|
|
285
297
|
|
|
286
298
|
<!-- UsageSnippet language="typescript" operationID="delete_checkout_session" method="delete" path="/checkout/sessions/{session_id}" -->
|
|
287
299
|
```typescript
|
|
288
|
-
import { Gr4vy
|
|
289
|
-
import fs from "fs";
|
|
300
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
290
301
|
|
|
291
302
|
const gr4vy = new Gr4vy({
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
303
|
+
merchantAccountId: "<id>",
|
|
304
|
+
server: "sandbox",
|
|
305
|
+
id: "example",
|
|
306
|
+
bearerAuth: withToken({
|
|
307
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
308
|
+
}),
|
|
298
309
|
});
|
|
299
310
|
|
|
300
311
|
async function run() {
|
|
@@ -312,13 +323,18 @@ The standalone function version of this method:
|
|
|
312
323
|
|
|
313
324
|
```typescript
|
|
314
325
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
326
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
315
327
|
import { checkoutSessionsDelete } from "@gr4vy/sdk/funcs/checkoutSessionsDelete.js";
|
|
316
328
|
|
|
317
329
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
318
330
|
// You can create one instance of it to use across an application.
|
|
319
331
|
const gr4vy = new Gr4vyCore({
|
|
320
332
|
merchantAccountId: "<id>",
|
|
321
|
-
|
|
333
|
+
server: "sandbox",
|
|
334
|
+
id: "example",
|
|
335
|
+
bearerAuth: withToken({
|
|
336
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
337
|
+
}),
|
|
322
338
|
});
|
|
323
339
|
|
|
324
340
|
async function run() {
|
|
@@ -15,16 +15,15 @@ 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
|
|
19
|
-
import fs from "fs";
|
|
18
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
20
19
|
|
|
21
20
|
const gr4vy = new Gr4vy({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
merchantAccountId: "<id>",
|
|
22
|
+
server: "sandbox",
|
|
23
|
+
id: "example",
|
|
24
|
+
bearerAuth: withToken({
|
|
25
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
26
|
+
}),
|
|
28
27
|
});
|
|
29
28
|
|
|
30
29
|
async function run() {
|
|
@@ -44,13 +43,18 @@ The standalone function version of this method:
|
|
|
44
43
|
|
|
45
44
|
```typescript
|
|
46
45
|
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
|
-
|
|
53
|
+
server: "sandbox",
|
|
54
|
+
id: "example",
|
|
55
|
+
bearerAuth: withToken({
|
|
56
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
57
|
+
}),
|
|
54
58
|
});
|
|
55
59
|
|
|
56
60
|
async function run() {
|
|
@@ -19,16 +19,15 @@ 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
|
|
23
|
-
import fs from "fs";
|
|
22
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
24
23
|
|
|
25
24
|
const gr4vy = new Gr4vy({
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
merchantAccountId: "<id>",
|
|
26
|
+
server: "sandbox",
|
|
27
|
+
id: "example",
|
|
28
|
+
bearerAuth: withToken({
|
|
29
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
30
|
+
}),
|
|
32
31
|
});
|
|
33
32
|
|
|
34
33
|
async function run() {
|
|
@@ -50,13 +49,18 @@ The standalone function version of this method:
|
|
|
50
49
|
|
|
51
50
|
```typescript
|
|
52
51
|
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
|
-
|
|
59
|
+
server: "sandbox",
|
|
60
|
+
id: "example",
|
|
61
|
+
bearerAuth: withToken({
|
|
62
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
63
|
+
}),
|
|
60
64
|
});
|
|
61
65
|
|
|
62
66
|
async function run() {
|
|
@@ -116,16 +120,15 @@ List configured digital wallets.
|
|
|
116
120
|
|
|
117
121
|
<!-- UsageSnippet language="typescript" operationID="list_digital_wallets" method="get" path="/digital-wallets" -->
|
|
118
122
|
```typescript
|
|
119
|
-
import { Gr4vy
|
|
120
|
-
import fs from "fs";
|
|
123
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
121
124
|
|
|
122
125
|
const gr4vy = new Gr4vy({
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
merchantAccountId: "<id>",
|
|
127
|
+
server: "sandbox",
|
|
128
|
+
id: "example",
|
|
129
|
+
bearerAuth: withToken({
|
|
130
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
131
|
+
}),
|
|
129
132
|
});
|
|
130
133
|
|
|
131
134
|
async function run() {
|
|
@@ -143,13 +146,18 @@ The standalone function version of this method:
|
|
|
143
146
|
|
|
144
147
|
```typescript
|
|
145
148
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
149
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
146
150
|
import { digitalWalletsList } from "@gr4vy/sdk/funcs/digitalWalletsList.js";
|
|
147
151
|
|
|
148
152
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
149
153
|
// You can create one instance of it to use across an application.
|
|
150
154
|
const gr4vy = new Gr4vyCore({
|
|
151
155
|
merchantAccountId: "<id>",
|
|
152
|
-
|
|
156
|
+
server: "sandbox",
|
|
157
|
+
id: "example",
|
|
158
|
+
bearerAuth: withToken({
|
|
159
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
160
|
+
}),
|
|
153
161
|
});
|
|
154
162
|
|
|
155
163
|
async function run() {
|
|
@@ -204,16 +212,15 @@ Fetch the details a digital wallet.
|
|
|
204
212
|
|
|
205
213
|
<!-- UsageSnippet language="typescript" operationID="get_digital_wallet" method="get" path="/digital-wallets/{digital_wallet_id}" -->
|
|
206
214
|
```typescript
|
|
207
|
-
import { Gr4vy
|
|
208
|
-
import fs from "fs";
|
|
215
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
209
216
|
|
|
210
217
|
const gr4vy = new Gr4vy({
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
218
|
+
merchantAccountId: "<id>",
|
|
219
|
+
server: "sandbox",
|
|
220
|
+
id: "example",
|
|
221
|
+
bearerAuth: withToken({
|
|
222
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
223
|
+
}),
|
|
217
224
|
});
|
|
218
225
|
|
|
219
226
|
async function run() {
|
|
@@ -231,13 +238,18 @@ The standalone function version of this method:
|
|
|
231
238
|
|
|
232
239
|
```typescript
|
|
233
240
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
241
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
234
242
|
import { digitalWalletsGet } from "@gr4vy/sdk/funcs/digitalWalletsGet.js";
|
|
235
243
|
|
|
236
244
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
237
245
|
// You can create one instance of it to use across an application.
|
|
238
246
|
const gr4vy = new Gr4vyCore({
|
|
239
247
|
merchantAccountId: "<id>",
|
|
240
|
-
|
|
248
|
+
server: "sandbox",
|
|
249
|
+
id: "example",
|
|
250
|
+
bearerAuth: withToken({
|
|
251
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
252
|
+
}),
|
|
241
253
|
});
|
|
242
254
|
|
|
243
255
|
async function run() {
|
|
@@ -293,16 +305,15 @@ Delete a configured digital wallet.
|
|
|
293
305
|
|
|
294
306
|
<!-- UsageSnippet language="typescript" operationID="delete_digital_wallet" method="delete" path="/digital-wallets/{digital_wallet_id}" -->
|
|
295
307
|
```typescript
|
|
296
|
-
import { Gr4vy
|
|
297
|
-
import fs from "fs";
|
|
308
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
298
309
|
|
|
299
310
|
const gr4vy = new Gr4vy({
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
311
|
+
merchantAccountId: "<id>",
|
|
312
|
+
server: "sandbox",
|
|
313
|
+
id: "example",
|
|
314
|
+
bearerAuth: withToken({
|
|
315
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
316
|
+
}),
|
|
306
317
|
});
|
|
307
318
|
|
|
308
319
|
async function run() {
|
|
@@ -320,13 +331,18 @@ The standalone function version of this method:
|
|
|
320
331
|
|
|
321
332
|
```typescript
|
|
322
333
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
334
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
323
335
|
import { digitalWalletsDelete } from "@gr4vy/sdk/funcs/digitalWalletsDelete.js";
|
|
324
336
|
|
|
325
337
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
326
338
|
// You can create one instance of it to use across an application.
|
|
327
339
|
const gr4vy = new Gr4vyCore({
|
|
328
340
|
merchantAccountId: "<id>",
|
|
329
|
-
|
|
341
|
+
server: "sandbox",
|
|
342
|
+
id: "example",
|
|
343
|
+
bearerAuth: withToken({
|
|
344
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
345
|
+
}),
|
|
330
346
|
});
|
|
331
347
|
|
|
332
348
|
async function run() {
|
|
@@ -382,16 +398,15 @@ Update a digital wallet.
|
|
|
382
398
|
|
|
383
399
|
<!-- UsageSnippet language="typescript" operationID="update_digital_wallet" method="put" path="/digital-wallets/{digital_wallet_id}" -->
|
|
384
400
|
```typescript
|
|
385
|
-
import { Gr4vy
|
|
386
|
-
import fs from "fs";
|
|
401
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
387
402
|
|
|
388
403
|
const gr4vy = new Gr4vy({
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
404
|
+
merchantAccountId: "<id>",
|
|
405
|
+
server: "sandbox",
|
|
406
|
+
id: "example",
|
|
407
|
+
bearerAuth: withToken({
|
|
408
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
409
|
+
}),
|
|
395
410
|
});
|
|
396
411
|
|
|
397
412
|
async function run() {
|
|
@@ -409,13 +424,18 @@ The standalone function version of this method:
|
|
|
409
424
|
|
|
410
425
|
```typescript
|
|
411
426
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
427
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
412
428
|
import { digitalWalletsUpdate } from "@gr4vy/sdk/funcs/digitalWalletsUpdate.js";
|
|
413
429
|
|
|
414
430
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
415
431
|
// You can create one instance of it to use across an application.
|
|
416
432
|
const gr4vy = new Gr4vyCore({
|
|
417
433
|
merchantAccountId: "<id>",
|
|
418
|
-
|
|
434
|
+
server: "sandbox",
|
|
435
|
+
id: "example",
|
|
436
|
+
bearerAuth: withToken({
|
|
437
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
438
|
+
}),
|
|
419
439
|
});
|
|
420
440
|
|
|
421
441
|
async function run() {
|
|
@@ -16,16 +16,15 @@ 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
|
|
20
|
-
import fs from "fs";
|
|
19
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
21
20
|
|
|
22
21
|
const gr4vy = new Gr4vy({
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
merchantAccountId: "<id>",
|
|
23
|
+
server: "sandbox",
|
|
24
|
+
id: "example",
|
|
25
|
+
bearerAuth: withToken({
|
|
26
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
27
|
+
}),
|
|
29
28
|
});
|
|
30
29
|
|
|
31
30
|
async function run() {
|
|
@@ -45,13 +44,18 @@ The standalone function version of this method:
|
|
|
45
44
|
|
|
46
45
|
```typescript
|
|
47
46
|
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
|
-
|
|
54
|
+
server: "sandbox",
|
|
55
|
+
id: "example",
|
|
56
|
+
bearerAuth: withToken({
|
|
57
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
58
|
+
}),
|
|
55
59
|
});
|
|
56
60
|
|
|
57
61
|
async function run() {
|
|
@@ -110,16 +114,15 @@ Remove a digital wallet domain (Apple Pay only).
|
|
|
110
114
|
|
|
111
115
|
<!-- UsageSnippet language="typescript" operationID="unregister_digital_wallet_domain" method="delete" path="/digital-wallets/{digital_wallet_id}/domains" -->
|
|
112
116
|
```typescript
|
|
113
|
-
import { Gr4vy
|
|
114
|
-
import fs from "fs";
|
|
117
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
115
118
|
|
|
116
119
|
const gr4vy = new Gr4vy({
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
merchantAccountId: "<id>",
|
|
121
|
+
server: "sandbox",
|
|
122
|
+
id: "example",
|
|
123
|
+
bearerAuth: withToken({
|
|
124
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
125
|
+
}),
|
|
123
126
|
});
|
|
124
127
|
|
|
125
128
|
async function run() {
|
|
@@ -139,13 +142,18 @@ The standalone function version of this method:
|
|
|
139
142
|
|
|
140
143
|
```typescript
|
|
141
144
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
145
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
142
146
|
import { digitalWalletsDomainsDelete } from "@gr4vy/sdk/funcs/digitalWalletsDomainsDelete.js";
|
|
143
147
|
|
|
144
148
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
145
149
|
// You can create one instance of it to use across an application.
|
|
146
150
|
const gr4vy = new Gr4vyCore({
|
|
147
151
|
merchantAccountId: "<id>",
|
|
148
|
-
|
|
152
|
+
server: "sandbox",
|
|
153
|
+
id: "example",
|
|
154
|
+
bearerAuth: withToken({
|
|
155
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
156
|
+
}),
|
|
149
157
|
});
|
|
150
158
|
|
|
151
159
|
async function run() {
|
|
@@ -15,16 +15,15 @@ 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
|
|
19
|
-
import fs from "fs";
|
|
18
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
20
19
|
|
|
21
20
|
const gr4vy = new Gr4vy({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
merchantAccountId: "<id>",
|
|
22
|
+
server: "sandbox",
|
|
23
|
+
id: "example",
|
|
24
|
+
bearerAuth: withToken({
|
|
25
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
26
|
+
}),
|
|
28
27
|
});
|
|
29
28
|
|
|
30
29
|
async function run() {
|
|
@@ -42,13 +41,18 @@ The standalone function version of this method:
|
|
|
42
41
|
|
|
43
42
|
```typescript
|
|
44
43
|
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
|
-
|
|
51
|
+
server: "sandbox",
|
|
52
|
+
id: "example",
|
|
53
|
+
bearerAuth: withToken({
|
|
54
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
55
|
+
}),
|
|
52
56
|
});
|
|
53
57
|
|
|
54
58
|
async function run() {
|