@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
|
@@ -17,16 +17,15 @@ 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
|
|
21
|
-
import fs from "fs";
|
|
20
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
22
21
|
|
|
23
22
|
const gr4vy = new Gr4vy({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
merchantAccountId: "<id>",
|
|
24
|
+
server: "sandbox",
|
|
25
|
+
id: "example",
|
|
26
|
+
bearerAuth: withToken({
|
|
27
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
28
|
+
}),
|
|
30
29
|
});
|
|
31
30
|
|
|
32
31
|
async function run() {
|
|
@@ -46,13 +45,18 @@ The standalone function version of this method:
|
|
|
46
45
|
|
|
47
46
|
```typescript
|
|
48
47
|
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
|
-
|
|
55
|
+
server: "sandbox",
|
|
56
|
+
id: "example",
|
|
57
|
+
bearerAuth: withToken({
|
|
58
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
59
|
+
}),
|
|
56
60
|
});
|
|
57
61
|
|
|
58
62
|
async function run() {
|
|
@@ -112,16 +116,15 @@ Creates a download URL for a specific execution of a report.
|
|
|
112
116
|
|
|
113
117
|
<!-- UsageSnippet language="typescript" operationID="create_report_execution_url" method="post" path="/reports/{report_id}/executions/{report_execution_id}/url" -->
|
|
114
118
|
```typescript
|
|
115
|
-
import { Gr4vy
|
|
116
|
-
import fs from "fs";
|
|
119
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
117
120
|
|
|
118
121
|
const gr4vy = new Gr4vy({
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
merchantAccountId: "<id>",
|
|
123
|
+
server: "sandbox",
|
|
124
|
+
id: "example",
|
|
125
|
+
bearerAuth: withToken({
|
|
126
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
127
|
+
}),
|
|
125
128
|
});
|
|
126
129
|
|
|
127
130
|
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 { reportsExecutionsUrl } from "@gr4vy/sdk/funcs/reportsExecutionsUrl.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() {
|
|
@@ -202,16 +210,15 @@ Fetch a specific executed report.
|
|
|
202
210
|
|
|
203
211
|
<!-- UsageSnippet language="typescript" operationID="get_report_execution" method="get" path="/report-executions/{report_execution_id}" -->
|
|
204
212
|
```typescript
|
|
205
|
-
import { Gr4vy
|
|
206
|
-
import fs from "fs";
|
|
213
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
207
214
|
|
|
208
215
|
const gr4vy = new Gr4vy({
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
216
|
+
merchantAccountId: "<id>",
|
|
217
|
+
server: "sandbox",
|
|
218
|
+
id: "example",
|
|
219
|
+
bearerAuth: withToken({
|
|
220
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
221
|
+
}),
|
|
215
222
|
});
|
|
216
223
|
|
|
217
224
|
async function run() {
|
|
@@ -229,13 +236,18 @@ The standalone function version of this method:
|
|
|
229
236
|
|
|
230
237
|
```typescript
|
|
231
238
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
239
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
232
240
|
import { reportsExecutionsGet } from "@gr4vy/sdk/funcs/reportsExecutionsGet.js";
|
|
233
241
|
|
|
234
242
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
235
243
|
// You can create one instance of it to use across an application.
|
|
236
244
|
const gr4vy = new Gr4vyCore({
|
|
237
245
|
merchantAccountId: "<id>",
|
|
238
|
-
|
|
246
|
+
server: "sandbox",
|
|
247
|
+
id: "example",
|
|
248
|
+
bearerAuth: withToken({
|
|
249
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
250
|
+
}),
|
|
239
251
|
});
|
|
240
252
|
|
|
241
253
|
async function run() {
|
|
@@ -18,16 +18,15 @@ 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
|
|
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 { 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
|
-
|
|
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 @@ Removes a gift card from our system.
|
|
|
107
111
|
|
|
108
112
|
<!-- UsageSnippet language="typescript" operationID="delete_gift_card" method="delete" path="/gift-cards/{gift_card_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 { giftCardsDelete } from "@gr4vy/sdk/funcs/giftCardsDelete.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() {
|
|
@@ -196,16 +204,15 @@ Store a new gift card in the vault.
|
|
|
196
204
|
|
|
197
205
|
<!-- UsageSnippet language="typescript" operationID="create_gift_card" method="post" path="/gift-cards" -->
|
|
198
206
|
```typescript
|
|
199
|
-
import { Gr4vy
|
|
200
|
-
import fs from "fs";
|
|
207
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
201
208
|
|
|
202
209
|
const gr4vy = new Gr4vy({
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
210
|
+
merchantAccountId: "<id>",
|
|
211
|
+
server: "sandbox",
|
|
212
|
+
id: "example",
|
|
213
|
+
bearerAuth: withToken({
|
|
214
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
215
|
+
}),
|
|
209
216
|
});
|
|
210
217
|
|
|
211
218
|
async function run() {
|
|
@@ -226,13 +233,18 @@ The standalone function version of this method:
|
|
|
226
233
|
|
|
227
234
|
```typescript
|
|
228
235
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
236
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
229
237
|
import { giftCardsCreate } from "@gr4vy/sdk/funcs/giftCardsCreate.js";
|
|
230
238
|
|
|
231
239
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
232
240
|
// You can create one instance of it to use across an application.
|
|
233
241
|
const gr4vy = new Gr4vyCore({
|
|
234
242
|
merchantAccountId: "<id>",
|
|
235
|
-
|
|
243
|
+
server: "sandbox",
|
|
244
|
+
id: "example",
|
|
245
|
+
bearerAuth: withToken({
|
|
246
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
247
|
+
}),
|
|
236
248
|
});
|
|
237
249
|
|
|
238
250
|
async function run() {
|
|
@@ -291,16 +303,15 @@ Browser all gift cards.
|
|
|
291
303
|
|
|
292
304
|
<!-- UsageSnippet language="typescript" operationID="list_gift_cards" method="get" path="/gift-cards" -->
|
|
293
305
|
```typescript
|
|
294
|
-
import { Gr4vy
|
|
295
|
-
import fs from "fs";
|
|
306
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
296
307
|
|
|
297
308
|
const gr4vy = new Gr4vy({
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
309
|
+
merchantAccountId: "<id>",
|
|
310
|
+
server: "sandbox",
|
|
311
|
+
id: "example",
|
|
312
|
+
bearerAuth: withToken({
|
|
313
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
314
|
+
}),
|
|
304
315
|
});
|
|
305
316
|
|
|
306
317
|
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 { giftCardsList } from "@gr4vy/sdk/funcs/giftCardsList.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() {
|
|
@@ -15,16 +15,15 @@ List all the stored gift cards for a specific buyer.
|
|
|
15
15
|
|
|
16
16
|
<!-- UsageSnippet language="typescript" operationID="list_buyer_gift_cards" method="get" path="/buyers/gift-cards" -->
|
|
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 { buyersGiftCardsList } from "@gr4vy/sdk/funcs/buyersGiftCardsList.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() {
|
|
@@ -15,16 +15,15 @@ List all the stored payment methods for a specific buyer.
|
|
|
15
15
|
|
|
16
16
|
<!-- UsageSnippet language="typescript" operationID="list_buyer_payment_methods" method="get" path="/buyers/payment-methods" -->
|
|
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 { buyersPaymentMethodsList } from "@gr4vy/sdk/funcs/buyersPaymentMethodsList.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() {
|
|
@@ -17,16 +17,15 @@ List refunds for a transaction.
|
|
|
17
17
|
|
|
18
18
|
<!-- UsageSnippet language="typescript" operationID="list_transaction_refunds" method="get" path="/transactions/{transaction_id}/refunds" -->
|
|
19
19
|
```typescript
|
|
20
|
-
import { Gr4vy
|
|
21
|
-
import fs from "fs";
|
|
20
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
22
21
|
|
|
23
22
|
const gr4vy = new Gr4vy({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
merchantAccountId: "<id>",
|
|
24
|
+
server: "sandbox",
|
|
25
|
+
id: "example",
|
|
26
|
+
bearerAuth: withToken({
|
|
27
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
28
|
+
}),
|
|
30
29
|
});
|
|
31
30
|
|
|
32
31
|
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 { transactionsRefundsList } from "@gr4vy/sdk/funcs/transactionsRefundsList.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() {
|
|
@@ -106,16 +110,15 @@ Create a refund for a transaction.
|
|
|
106
110
|
|
|
107
111
|
<!-- UsageSnippet language="typescript" operationID="create_transaction_refund" method="post" path="/transactions/{transaction_id}/refunds" -->
|
|
108
112
|
```typescript
|
|
109
|
-
import { Gr4vy
|
|
110
|
-
import fs from "fs";
|
|
113
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
111
114
|
|
|
112
115
|
const gr4vy = new Gr4vy({
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
merchantAccountId: "<id>",
|
|
117
|
+
server: "sandbox",
|
|
118
|
+
id: "example",
|
|
119
|
+
bearerAuth: withToken({
|
|
120
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
121
|
+
}),
|
|
119
122
|
});
|
|
120
123
|
|
|
121
124
|
async function run() {
|
|
@@ -133,13 +136,18 @@ The standalone function version of this method:
|
|
|
133
136
|
|
|
134
137
|
```typescript
|
|
135
138
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
139
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
136
140
|
import { transactionsRefundsCreate } from "@gr4vy/sdk/funcs/transactionsRefundsCreate.js";
|
|
137
141
|
|
|
138
142
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
139
143
|
// You can create one instance of it to use across an application.
|
|
140
144
|
const gr4vy = new Gr4vyCore({
|
|
141
145
|
merchantAccountId: "<id>",
|
|
142
|
-
|
|
146
|
+
server: "sandbox",
|
|
147
|
+
id: "example",
|
|
148
|
+
bearerAuth: withToken({
|
|
149
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
150
|
+
}),
|
|
143
151
|
});
|
|
144
152
|
|
|
145
153
|
async function run() {
|
|
@@ -196,16 +204,15 @@ Fetch refund for a transaction.
|
|
|
196
204
|
|
|
197
205
|
<!-- UsageSnippet language="typescript" operationID="get_transaction_refund" method="get" path="/transactions/{transaction_id}/refunds/{refund_id}" -->
|
|
198
206
|
```typescript
|
|
199
|
-
import { Gr4vy
|
|
200
|
-
import fs from "fs";
|
|
207
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
201
208
|
|
|
202
209
|
const gr4vy = new Gr4vy({
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
210
|
+
merchantAccountId: "<id>",
|
|
211
|
+
server: "sandbox",
|
|
212
|
+
id: "example",
|
|
213
|
+
bearerAuth: withToken({
|
|
214
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
215
|
+
}),
|
|
209
216
|
});
|
|
210
217
|
|
|
211
218
|
async function run() {
|
|
@@ -223,13 +230,18 @@ The standalone function version of this method:
|
|
|
223
230
|
|
|
224
231
|
```typescript
|
|
225
232
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
233
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
226
234
|
import { transactionsRefundsGet } from "@gr4vy/sdk/funcs/transactionsRefundsGet.js";
|
|
227
235
|
|
|
228
236
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
229
237
|
// You can create one instance of it to use across an application.
|
|
230
238
|
const gr4vy = new Gr4vyCore({
|
|
231
239
|
merchantAccountId: "<id>",
|
|
232
|
-
|
|
240
|
+
server: "sandbox",
|
|
241
|
+
id: "example",
|
|
242
|
+
bearerAuth: withToken({
|
|
243
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
244
|
+
}),
|
|
233
245
|
});
|
|
234
246
|
|
|
235
247
|
async function run() {
|
package/docs/sdks/jobs/README.md
CHANGED
|
@@ -15,16 +15,15 @@ Schedule one or more stored cards for an account update.
|
|
|
15
15
|
|
|
16
16
|
<!-- UsageSnippet language="typescript" operationID="create_account_updater_job" method="post" path="/account-updater/jobs" -->
|
|
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() {
|
|
@@ -47,13 +46,18 @@ The standalone function version of this method:
|
|
|
47
46
|
|
|
48
47
|
```typescript
|
|
49
48
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
49
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
50
50
|
import { accountUpdaterJobsCreate } from "@gr4vy/sdk/funcs/accountUpdaterJobsCreate.js";
|
|
51
51
|
|
|
52
52
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
53
53
|
// You can create one instance of it to use across an application.
|
|
54
54
|
const gr4vy = new Gr4vyCore({
|
|
55
55
|
merchantAccountId: "<id>",
|
|
56
|
-
|
|
56
|
+
server: "sandbox",
|
|
57
|
+
id: "example",
|
|
58
|
+
bearerAuth: withToken({
|
|
59
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
60
|
+
}),
|
|
57
61
|
});
|
|
58
62
|
|
|
59
63
|
async function run() {
|