@gr4vy/sdk 1.1.40 → 1.1.42
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/funcs/auditLogsList.js +3 -0
- package/funcs/auditLogsList.js.map +1 -1
- package/funcs/buyersList.js +3 -0
- package/funcs/buyersList.js.map +1 -1
- package/funcs/giftCardsList.js +3 -0
- package/funcs/giftCardsList.js.map +1 -1
- package/funcs/merchantAccountsList.js +3 -0
- package/funcs/merchantAccountsList.js.map +1 -1
- package/funcs/paymentLinksList.js +3 -0
- package/funcs/paymentLinksList.js.map +1 -1
- package/funcs/paymentMethodsList.js +3 -0
- package/funcs/paymentMethodsList.js.map +1 -1
- package/funcs/paymentServiceDefinitionsList.js +3 -0
- package/funcs/paymentServiceDefinitionsList.js.map +1 -1
- package/funcs/paymentServicesList.js +3 -0
- package/funcs/paymentServicesList.js.map +1 -1
- package/funcs/payoutsList.js +3 -0
- package/funcs/payoutsList.js.map +1 -1
- package/funcs/reportExecutionsList.js +3 -0
- package/funcs/reportExecutionsList.js.map +1 -1
- package/funcs/reportsExecutionsList.js +3 -0
- package/funcs/reportsExecutionsList.js.map +1 -1
- package/funcs/reportsList.js +3 -0
- package/funcs/reportsList.js.map +1 -1
- package/funcs/transactionsList.js +3 -0
- package/funcs/transactionsList.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/auditlogaction.d.ts +1 -0
- package/models/components/auditlogaction.d.ts.map +1 -1
- package/models/components/auditlogaction.js +1 -0
- package/models/components/auditlogaction.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/auditLogsList.ts +3 -0
- package/src/funcs/buyersList.ts +3 -0
- package/src/funcs/giftCardsList.ts +3 -0
- package/src/funcs/merchantAccountsList.ts +3 -0
- package/src/funcs/paymentLinksList.ts +3 -0
- package/src/funcs/paymentMethodsList.ts +3 -0
- package/src/funcs/paymentServiceDefinitionsList.ts +3 -0
- package/src/funcs/paymentServicesList.ts +3 -0
- package/src/funcs/payoutsList.ts +3 -0
- package/src/funcs/reportExecutionsList.ts +3 -0
- package/src/funcs/reportsExecutionsList.ts +3 -0
- package/src/funcs/reportsList.ts +3 -0
- package/src/funcs/transactionsList.ts +3 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/auditlogaction.ts +1 -0
- package/tests/utils/setup.ts +37 -0
|
@@ -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() {
|
|
@@ -15,15 +15,16 @@ 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 } 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 { 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
|
-
|
|
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() {
|
|
@@ -15,15 +15,16 @@ 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 } 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 { 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
|
-
|
|
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 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 } 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() {
|
|
@@ -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 { 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
|
-
|
|
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() {
|
|
@@ -110,15 +106,16 @@ Create a refund for a transaction.
|
|
|
110
106
|
|
|
111
107
|
<!-- UsageSnippet language="typescript" operationID="create_transaction_refund" method="post" path="/transactions/{transaction_id}/refunds" -->
|
|
112
108
|
```typescript
|
|
113
|
-
import { Gr4vy } from "@gr4vy/sdk";
|
|
109
|
+
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
110
|
+
import fs from "fs";
|
|
114
111
|
|
|
115
112
|
const gr4vy = new Gr4vy({
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
113
|
+
id: "example",
|
|
114
|
+
server: "sandbox",
|
|
115
|
+
merchantAccountId: "default",
|
|
116
|
+
bearerAuth: withToken({
|
|
117
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
118
|
+
}),
|
|
122
119
|
});
|
|
123
120
|
|
|
124
121
|
async function run() {
|
|
@@ -136,18 +133,13 @@ The standalone function version of this method:
|
|
|
136
133
|
|
|
137
134
|
```typescript
|
|
138
135
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
139
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
140
136
|
import { transactionsRefundsCreate } from "@gr4vy/sdk/funcs/transactionsRefundsCreate.js";
|
|
141
137
|
|
|
142
138
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
143
139
|
// You can create one instance of it to use across an application.
|
|
144
140
|
const gr4vy = new Gr4vyCore({
|
|
145
141
|
merchantAccountId: "<id>",
|
|
146
|
-
|
|
147
|
-
id: "example",
|
|
148
|
-
bearerAuth: withToken({
|
|
149
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
150
|
-
}),
|
|
142
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
151
143
|
});
|
|
152
144
|
|
|
153
145
|
async function run() {
|
|
@@ -204,15 +196,16 @@ Fetch refund for a transaction.
|
|
|
204
196
|
|
|
205
197
|
<!-- UsageSnippet language="typescript" operationID="get_transaction_refund" method="get" path="/transactions/{transaction_id}/refunds/{refund_id}" -->
|
|
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() {
|
|
@@ -230,18 +223,13 @@ The standalone function version of this method:
|
|
|
230
223
|
|
|
231
224
|
```typescript
|
|
232
225
|
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
233
|
-
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
234
226
|
import { transactionsRefundsGet } from "@gr4vy/sdk/funcs/transactionsRefundsGet.js";
|
|
235
227
|
|
|
236
228
|
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
237
229
|
// You can create one instance of it to use across an application.
|
|
238
230
|
const gr4vy = new Gr4vyCore({
|
|
239
231
|
merchantAccountId: "<id>",
|
|
240
|
-
|
|
241
|
-
id: "example",
|
|
242
|
-
bearerAuth: withToken({
|
|
243
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
244
|
-
}),
|
|
232
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
245
233
|
});
|
|
246
234
|
|
|
247
235
|
async function run() {
|
package/docs/sdks/jobs/README.md
CHANGED
|
@@ -15,15 +15,16 @@ 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 } 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() {
|
|
@@ -46,18 +47,13 @@ The standalone function version of this method:
|
|
|
46
47
|
|
|
47
48
|
```typescript
|
|
48
49
|
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
|
-
|
|
57
|
-
id: "example",
|
|
58
|
-
bearerAuth: withToken({
|
|
59
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
60
|
-
}),
|
|
56
|
+
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
61
57
|
});
|
|
62
58
|
|
|
63
59
|
async function run() {
|