@moovio/sdk 0.21.0 → 0.21.2
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/bin/mcp-server.js +79 -61
- package/bin/mcp-server.js.map +11 -10
- package/examples/package-lock.json +1 -1
- package/hooks/hooks.d.ts +3 -2
- package/hooks/hooks.d.ts.map +1 -1
- package/hooks/hooks.js.map +1 -1
- package/hooks/moov-version-hook.d.ts +6 -0
- package/hooks/moov-version-hook.d.ts.map +1 -0
- package/hooks/moov-version-hook.js +12 -0
- package/hooks/moov-version-hook.js.map +1 -0
- package/hooks/registration.d.ts.map +1 -1
- package/hooks/registration.js +3 -1
- package/hooks/registration.js.map +1 -1
- package/hooks/types.d.ts +2 -6
- package/hooks/types.d.ts.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +5 -6
- package/lib/sdks.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/package.json +1 -1
- package/src/hooks/hooks.ts +2 -2
- package/src/hooks/moov-version-hook.ts +9 -0
- package/src/hooks/registration.ts +4 -1
- package/src/hooks/types.ts +2 -7
- package/src/lib/config.ts +3 -3
- package/src/lib/sdks.ts +6 -7
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/docs/sdks/accounts/README.md +0 -1038
- package/docs/sdks/accountterminalapplications/README.md +0 -371
- package/docs/sdks/adjustments/README.md +0 -185
- package/docs/sdks/applepay/README.md +0 -572
- package/docs/sdks/authentication/README.md +0 -191
- package/docs/sdks/avatars/README.md +0 -95
- package/docs/sdks/bankaccounts/README.md +0 -951
- package/docs/sdks/branding/README.md +0 -407
- package/docs/sdks/capabilities/README.md +0 -380
- package/docs/sdks/cardissuing/README.md +0 -533
- package/docs/sdks/cards/README.md +0 -544
- package/docs/sdks/disputes/README.md +0 -1085
- package/docs/sdks/endtoendencryption/README.md +0 -174
- package/docs/sdks/enrichedaddress/README.md +0 -95
- package/docs/sdks/enrichedprofile/README.md +0 -95
- package/docs/sdks/feeplans/README.md +0 -921
- package/docs/sdks/files/README.md +0 -293
- package/docs/sdks/images/README.md +0 -616
- package/docs/sdks/industries/README.md +0 -91
- package/docs/sdks/institutions/README.md +0 -184
- package/docs/sdks/issuingtransactions/README.md +0 -465
- package/docs/sdks/onboarding/README.md +0 -389
- package/docs/sdks/paymentlinks/README.md +0 -615
- package/docs/sdks/paymentmethods/README.md +0 -187
- package/docs/sdks/ping/README.md +0 -91
- package/docs/sdks/products/README.md +0 -616
- package/docs/sdks/receipts/README.md +0 -180
- package/docs/sdks/representatives/README.md +0 -603
- package/docs/sdks/scheduling/README.md +0 -1018
- package/docs/sdks/statements/README.md +0 -194
- package/docs/sdks/support/README.md +0 -505
- package/docs/sdks/sweeps/README.md +0 -571
- package/docs/sdks/terminalapplications/README.md +0 -460
- package/docs/sdks/transfers/README.md +0 -1136
- package/docs/sdks/underwriting/README.md +0 -331
- package/docs/sdks/wallets/README.md +0 -416
- package/docs/sdks/wallettransactions/README.md +0 -202
- package/examples/README.md +0 -31
- package/test/README.md +0 -14
|
@@ -1,615 +0,0 @@
|
|
|
1
|
-
# PaymentLinks
|
|
2
|
-
(*paymentLinks*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [create](#create) - Create a payment link that allows an end user to make a payment on Moov's hosted payment link page.
|
|
9
|
-
|
|
10
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
11
|
-
you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
|
|
12
|
-
* [list](#list) - List all the payment links created under a Moov account.
|
|
13
|
-
|
|
14
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
15
|
-
you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
|
|
16
|
-
* [get](#get) - Retrieve a payment link by code.
|
|
17
|
-
|
|
18
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
19
|
-
you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
|
|
20
|
-
* [update](#update) - Update a payment link.
|
|
21
|
-
|
|
22
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
23
|
-
you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
|
|
24
|
-
* [disable](#disable) - Disable a payment link.
|
|
25
|
-
|
|
26
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
27
|
-
you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
|
|
28
|
-
* [getQRCode](#getqrcode) - Retrieve the payment link encoded in a QR code.
|
|
29
|
-
|
|
30
|
-
Use the `Accept` header to specify the format of the response. Supported formats are `application/json` and `image/png`.
|
|
31
|
-
|
|
32
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
33
|
-
you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
|
|
34
|
-
|
|
35
|
-
## create
|
|
36
|
-
|
|
37
|
-
Create a payment link that allows an end user to make a payment on Moov's hosted payment link page.
|
|
38
|
-
|
|
39
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
40
|
-
you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
|
|
41
|
-
|
|
42
|
-
### Example Usage
|
|
43
|
-
|
|
44
|
-
<!-- UsageSnippet language="typescript" operationID="createPaymentLink" method="post" path="/accounts/{accountID}/payment-links" -->
|
|
45
|
-
```typescript
|
|
46
|
-
import { Moov } from "@moovio/sdk";
|
|
47
|
-
|
|
48
|
-
const moov = new Moov({
|
|
49
|
-
xMoovVersion: "v2024.01.00",
|
|
50
|
-
security: {
|
|
51
|
-
username: "",
|
|
52
|
-
password: "",
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
async function run() {
|
|
57
|
-
const result = await moov.paymentLinks.create({
|
|
58
|
-
accountID: "cc1d04a8-03b1-4600-b675-e6180d574074",
|
|
59
|
-
createPaymentLink: {
|
|
60
|
-
partnerAccountID: "d290f1ee-6c54-4b01-90e6-d701748f0851",
|
|
61
|
-
merchantPaymentMethodID: "4c4e7f8e-81f4-4f3d-8f6f-6f6e7f8e4c4e",
|
|
62
|
-
amount: {
|
|
63
|
-
currency: "USD",
|
|
64
|
-
value: 10000,
|
|
65
|
-
},
|
|
66
|
-
display: {
|
|
67
|
-
title: "Example Payment Link",
|
|
68
|
-
description: "This is an example payment link.",
|
|
69
|
-
callToAction: "pay",
|
|
70
|
-
},
|
|
71
|
-
customer: {
|
|
72
|
-
requirePhone: true,
|
|
73
|
-
},
|
|
74
|
-
payment: {
|
|
75
|
-
allowedMethods: [
|
|
76
|
-
"card-payment",
|
|
77
|
-
"ach-debit-collect",
|
|
78
|
-
],
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
console.log(result);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
run();
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Standalone function
|
|
90
|
-
|
|
91
|
-
The standalone function version of this method:
|
|
92
|
-
|
|
93
|
-
```typescript
|
|
94
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
95
|
-
import { paymentLinksCreate } from "@moovio/sdk/funcs/paymentLinksCreate.js";
|
|
96
|
-
|
|
97
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
98
|
-
// You can create one instance of it to use across an application.
|
|
99
|
-
const moov = new MoovCore({
|
|
100
|
-
xMoovVersion: "v2024.01.00",
|
|
101
|
-
security: {
|
|
102
|
-
username: "",
|
|
103
|
-
password: "",
|
|
104
|
-
},
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
async function run() {
|
|
108
|
-
const res = await paymentLinksCreate(moov, {
|
|
109
|
-
accountID: "cc1d04a8-03b1-4600-b675-e6180d574074",
|
|
110
|
-
createPaymentLink: {
|
|
111
|
-
partnerAccountID: "d290f1ee-6c54-4b01-90e6-d701748f0851",
|
|
112
|
-
merchantPaymentMethodID: "4c4e7f8e-81f4-4f3d-8f6f-6f6e7f8e4c4e",
|
|
113
|
-
amount: {
|
|
114
|
-
currency: "USD",
|
|
115
|
-
value: 10000,
|
|
116
|
-
},
|
|
117
|
-
display: {
|
|
118
|
-
title: "Example Payment Link",
|
|
119
|
-
description: "This is an example payment link.",
|
|
120
|
-
callToAction: "pay",
|
|
121
|
-
},
|
|
122
|
-
customer: {
|
|
123
|
-
requirePhone: true,
|
|
124
|
-
},
|
|
125
|
-
payment: {
|
|
126
|
-
allowedMethods: [
|
|
127
|
-
"card-payment",
|
|
128
|
-
"ach-debit-collect",
|
|
129
|
-
],
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
});
|
|
133
|
-
if (res.ok) {
|
|
134
|
-
const { value: result } = res;
|
|
135
|
-
console.log(result);
|
|
136
|
-
} else {
|
|
137
|
-
console.log("paymentLinksCreate failed:", res.error);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
run();
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### Parameters
|
|
145
|
-
|
|
146
|
-
| Parameter | Type | Required | Description |
|
|
147
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
148
|
-
| `request` | [operations.CreatePaymentLinkRequest](../../models/operations/createpaymentlinkrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
149
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
150
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
151
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
152
|
-
|
|
153
|
-
### Response
|
|
154
|
-
|
|
155
|
-
**Promise\<[operations.CreatePaymentLinkResponse](../../models/operations/createpaymentlinkresponse.md)\>**
|
|
156
|
-
|
|
157
|
-
### Errors
|
|
158
|
-
|
|
159
|
-
| Error Type | Status Code | Content Type |
|
|
160
|
-
| ----------------------------- | ----------------------------- | ----------------------------- |
|
|
161
|
-
| errors.GenericError | 400, 409 | application/json |
|
|
162
|
-
| errors.CreatePaymentLinkError | 422 | application/json |
|
|
163
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
164
|
-
|
|
165
|
-
## list
|
|
166
|
-
|
|
167
|
-
List all the payment links created under a Moov account.
|
|
168
|
-
|
|
169
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
170
|
-
you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
|
|
171
|
-
|
|
172
|
-
### Example Usage
|
|
173
|
-
|
|
174
|
-
<!-- UsageSnippet language="typescript" operationID="listPaymentLinks" method="get" path="/accounts/{accountID}/payment-links" -->
|
|
175
|
-
```typescript
|
|
176
|
-
import { Moov } from "@moovio/sdk";
|
|
177
|
-
|
|
178
|
-
const moov = new Moov({
|
|
179
|
-
xMoovVersion: "v2024.01.00",
|
|
180
|
-
security: {
|
|
181
|
-
username: "",
|
|
182
|
-
password: "",
|
|
183
|
-
},
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
async function run() {
|
|
187
|
-
const result = await moov.paymentLinks.list({
|
|
188
|
-
accountID: "d1039e6d-21ee-4a29-8adf-1dd2a6625a0d",
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
console.log(result);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
run();
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
### Standalone function
|
|
198
|
-
|
|
199
|
-
The standalone function version of this method:
|
|
200
|
-
|
|
201
|
-
```typescript
|
|
202
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
203
|
-
import { paymentLinksList } from "@moovio/sdk/funcs/paymentLinksList.js";
|
|
204
|
-
|
|
205
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
206
|
-
// You can create one instance of it to use across an application.
|
|
207
|
-
const moov = new MoovCore({
|
|
208
|
-
xMoovVersion: "v2024.01.00",
|
|
209
|
-
security: {
|
|
210
|
-
username: "",
|
|
211
|
-
password: "",
|
|
212
|
-
},
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
async function run() {
|
|
216
|
-
const res = await paymentLinksList(moov, {
|
|
217
|
-
accountID: "d1039e6d-21ee-4a29-8adf-1dd2a6625a0d",
|
|
218
|
-
});
|
|
219
|
-
if (res.ok) {
|
|
220
|
-
const { value: result } = res;
|
|
221
|
-
console.log(result);
|
|
222
|
-
} else {
|
|
223
|
-
console.log("paymentLinksList failed:", res.error);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
run();
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
### Parameters
|
|
231
|
-
|
|
232
|
-
| Parameter | Type | Required | Description |
|
|
233
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
234
|
-
| `request` | [operations.ListPaymentLinksRequest](../../models/operations/listpaymentlinksrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
235
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
236
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
237
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
238
|
-
|
|
239
|
-
### Response
|
|
240
|
-
|
|
241
|
-
**Promise\<[operations.ListPaymentLinksResponse](../../models/operations/listpaymentlinksresponse.md)\>**
|
|
242
|
-
|
|
243
|
-
### Errors
|
|
244
|
-
|
|
245
|
-
| Error Type | Status Code | Content Type |
|
|
246
|
-
| --------------- | --------------- | --------------- |
|
|
247
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
248
|
-
|
|
249
|
-
## get
|
|
250
|
-
|
|
251
|
-
Retrieve a payment link by code.
|
|
252
|
-
|
|
253
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
254
|
-
you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
|
|
255
|
-
|
|
256
|
-
### Example Usage
|
|
257
|
-
|
|
258
|
-
<!-- UsageSnippet language="typescript" operationID="getPaymentLink" method="get" path="/accounts/{accountID}/payment-links/{paymentLinkCode}" -->
|
|
259
|
-
```typescript
|
|
260
|
-
import { Moov } from "@moovio/sdk";
|
|
261
|
-
|
|
262
|
-
const moov = new Moov({
|
|
263
|
-
xMoovVersion: "v2024.01.00",
|
|
264
|
-
security: {
|
|
265
|
-
username: "",
|
|
266
|
-
password: "",
|
|
267
|
-
},
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
async function run() {
|
|
271
|
-
const result = await moov.paymentLinks.get({
|
|
272
|
-
accountID: "323f95b1-3798-4203-8a73-5c8668a9226e",
|
|
273
|
-
paymentLinkCode: "uc7ZYKrMhi",
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
console.log(result);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
run();
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
### Standalone function
|
|
283
|
-
|
|
284
|
-
The standalone function version of this method:
|
|
285
|
-
|
|
286
|
-
```typescript
|
|
287
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
288
|
-
import { paymentLinksGet } from "@moovio/sdk/funcs/paymentLinksGet.js";
|
|
289
|
-
|
|
290
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
291
|
-
// You can create one instance of it to use across an application.
|
|
292
|
-
const moov = new MoovCore({
|
|
293
|
-
xMoovVersion: "v2024.01.00",
|
|
294
|
-
security: {
|
|
295
|
-
username: "",
|
|
296
|
-
password: "",
|
|
297
|
-
},
|
|
298
|
-
});
|
|
299
|
-
|
|
300
|
-
async function run() {
|
|
301
|
-
const res = await paymentLinksGet(moov, {
|
|
302
|
-
accountID: "323f95b1-3798-4203-8a73-5c8668a9226e",
|
|
303
|
-
paymentLinkCode: "uc7ZYKrMhi",
|
|
304
|
-
});
|
|
305
|
-
if (res.ok) {
|
|
306
|
-
const { value: result } = res;
|
|
307
|
-
console.log(result);
|
|
308
|
-
} else {
|
|
309
|
-
console.log("paymentLinksGet failed:", res.error);
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
run();
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
### Parameters
|
|
317
|
-
|
|
318
|
-
| Parameter | Type | Required | Description |
|
|
319
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
320
|
-
| `request` | [operations.GetPaymentLinkRequest](../../models/operations/getpaymentlinkrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
321
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
322
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
323
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
324
|
-
|
|
325
|
-
### Response
|
|
326
|
-
|
|
327
|
-
**Promise\<[operations.GetPaymentLinkResponse](../../models/operations/getpaymentlinkresponse.md)\>**
|
|
328
|
-
|
|
329
|
-
### Errors
|
|
330
|
-
|
|
331
|
-
| Error Type | Status Code | Content Type |
|
|
332
|
-
| --------------- | --------------- | --------------- |
|
|
333
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
334
|
-
|
|
335
|
-
## update
|
|
336
|
-
|
|
337
|
-
Update a payment link.
|
|
338
|
-
|
|
339
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
340
|
-
you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
|
|
341
|
-
|
|
342
|
-
### Example Usage
|
|
343
|
-
|
|
344
|
-
<!-- UsageSnippet language="typescript" operationID="updatePaymentLink" method="patch" path="/accounts/{accountID}/payment-links/{paymentLinkCode}" -->
|
|
345
|
-
```typescript
|
|
346
|
-
import { Moov } from "@moovio/sdk";
|
|
347
|
-
|
|
348
|
-
const moov = new Moov({
|
|
349
|
-
xMoovVersion: "v2024.01.00",
|
|
350
|
-
security: {
|
|
351
|
-
username: "",
|
|
352
|
-
password: "",
|
|
353
|
-
},
|
|
354
|
-
});
|
|
355
|
-
|
|
356
|
-
async function run() {
|
|
357
|
-
const result = await moov.paymentLinks.update({
|
|
358
|
-
accountID: "ddad6613-2350-446a-883b-f76abb2cd4ea",
|
|
359
|
-
paymentLinkCode: "uc7ZYKrMhi",
|
|
360
|
-
updatePaymentLink: {
|
|
361
|
-
amount: {
|
|
362
|
-
currency: "USD",
|
|
363
|
-
value: 12099,
|
|
364
|
-
},
|
|
365
|
-
customer: {
|
|
366
|
-
requireAddress: true,
|
|
367
|
-
requirePhone: true,
|
|
368
|
-
},
|
|
369
|
-
},
|
|
370
|
-
});
|
|
371
|
-
|
|
372
|
-
console.log(result);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
run();
|
|
376
|
-
```
|
|
377
|
-
|
|
378
|
-
### Standalone function
|
|
379
|
-
|
|
380
|
-
The standalone function version of this method:
|
|
381
|
-
|
|
382
|
-
```typescript
|
|
383
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
384
|
-
import { paymentLinksUpdate } from "@moovio/sdk/funcs/paymentLinksUpdate.js";
|
|
385
|
-
|
|
386
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
387
|
-
// You can create one instance of it to use across an application.
|
|
388
|
-
const moov = new MoovCore({
|
|
389
|
-
xMoovVersion: "v2024.01.00",
|
|
390
|
-
security: {
|
|
391
|
-
username: "",
|
|
392
|
-
password: "",
|
|
393
|
-
},
|
|
394
|
-
});
|
|
395
|
-
|
|
396
|
-
async function run() {
|
|
397
|
-
const res = await paymentLinksUpdate(moov, {
|
|
398
|
-
accountID: "ddad6613-2350-446a-883b-f76abb2cd4ea",
|
|
399
|
-
paymentLinkCode: "uc7ZYKrMhi",
|
|
400
|
-
updatePaymentLink: {
|
|
401
|
-
amount: {
|
|
402
|
-
currency: "USD",
|
|
403
|
-
value: 12099,
|
|
404
|
-
},
|
|
405
|
-
customer: {
|
|
406
|
-
requireAddress: true,
|
|
407
|
-
requirePhone: true,
|
|
408
|
-
},
|
|
409
|
-
},
|
|
410
|
-
});
|
|
411
|
-
if (res.ok) {
|
|
412
|
-
const { value: result } = res;
|
|
413
|
-
console.log(result);
|
|
414
|
-
} else {
|
|
415
|
-
console.log("paymentLinksUpdate failed:", res.error);
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
run();
|
|
420
|
-
```
|
|
421
|
-
|
|
422
|
-
### Parameters
|
|
423
|
-
|
|
424
|
-
| Parameter | Type | Required | Description |
|
|
425
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
426
|
-
| `request` | [operations.UpdatePaymentLinkRequest](../../models/operations/updatepaymentlinkrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
427
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
428
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
429
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
430
|
-
|
|
431
|
-
### Response
|
|
432
|
-
|
|
433
|
-
**Promise\<[operations.UpdatePaymentLinkResponse](../../models/operations/updatepaymentlinkresponse.md)\>**
|
|
434
|
-
|
|
435
|
-
### Errors
|
|
436
|
-
|
|
437
|
-
| Error Type | Status Code | Content Type |
|
|
438
|
-
| ----------------------------- | ----------------------------- | ----------------------------- |
|
|
439
|
-
| errors.GenericError | 400, 409 | application/json |
|
|
440
|
-
| errors.UpdatePaymentLinkError | 422 | application/json |
|
|
441
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
442
|
-
|
|
443
|
-
## disable
|
|
444
|
-
|
|
445
|
-
Disable a payment link.
|
|
446
|
-
|
|
447
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
448
|
-
you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
|
|
449
|
-
|
|
450
|
-
### Example Usage
|
|
451
|
-
|
|
452
|
-
<!-- UsageSnippet language="typescript" operationID="disablePaymentLink" method="delete" path="/accounts/{accountID}/payment-links/{paymentLinkCode}" -->
|
|
453
|
-
```typescript
|
|
454
|
-
import { Moov } from "@moovio/sdk";
|
|
455
|
-
|
|
456
|
-
const moov = new Moov({
|
|
457
|
-
xMoovVersion: "v2024.01.00",
|
|
458
|
-
security: {
|
|
459
|
-
username: "",
|
|
460
|
-
password: "",
|
|
461
|
-
},
|
|
462
|
-
});
|
|
463
|
-
|
|
464
|
-
async function run() {
|
|
465
|
-
const result = await moov.paymentLinks.disable({
|
|
466
|
-
accountID: "c1cf000d-0dd9-4dec-bd5e-a88e135adf82",
|
|
467
|
-
paymentLinkCode: "uc7ZYKrMhi",
|
|
468
|
-
});
|
|
469
|
-
|
|
470
|
-
console.log(result);
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
run();
|
|
474
|
-
```
|
|
475
|
-
|
|
476
|
-
### Standalone function
|
|
477
|
-
|
|
478
|
-
The standalone function version of this method:
|
|
479
|
-
|
|
480
|
-
```typescript
|
|
481
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
482
|
-
import { paymentLinksDisable } from "@moovio/sdk/funcs/paymentLinksDisable.js";
|
|
483
|
-
|
|
484
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
485
|
-
// You can create one instance of it to use across an application.
|
|
486
|
-
const moov = new MoovCore({
|
|
487
|
-
xMoovVersion: "v2024.01.00",
|
|
488
|
-
security: {
|
|
489
|
-
username: "",
|
|
490
|
-
password: "",
|
|
491
|
-
},
|
|
492
|
-
});
|
|
493
|
-
|
|
494
|
-
async function run() {
|
|
495
|
-
const res = await paymentLinksDisable(moov, {
|
|
496
|
-
accountID: "c1cf000d-0dd9-4dec-bd5e-a88e135adf82",
|
|
497
|
-
paymentLinkCode: "uc7ZYKrMhi",
|
|
498
|
-
});
|
|
499
|
-
if (res.ok) {
|
|
500
|
-
const { value: result } = res;
|
|
501
|
-
console.log(result);
|
|
502
|
-
} else {
|
|
503
|
-
console.log("paymentLinksDisable failed:", res.error);
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
run();
|
|
508
|
-
```
|
|
509
|
-
|
|
510
|
-
### Parameters
|
|
511
|
-
|
|
512
|
-
| Parameter | Type | Required | Description |
|
|
513
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
514
|
-
| `request` | [operations.DisablePaymentLinkRequest](../../models/operations/disablepaymentlinkrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
515
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
516
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
517
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
518
|
-
|
|
519
|
-
### Response
|
|
520
|
-
|
|
521
|
-
**Promise\<[operations.DisablePaymentLinkResponse](../../models/operations/disablepaymentlinkresponse.md)\>**
|
|
522
|
-
|
|
523
|
-
### Errors
|
|
524
|
-
|
|
525
|
-
| Error Type | Status Code | Content Type |
|
|
526
|
-
| --------------- | --------------- | --------------- |
|
|
527
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
528
|
-
|
|
529
|
-
## getQRCode
|
|
530
|
-
|
|
531
|
-
Retrieve the payment link encoded in a QR code.
|
|
532
|
-
|
|
533
|
-
Use the `Accept` header to specify the format of the response. Supported formats are `application/json` and `image/png`.
|
|
534
|
-
|
|
535
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
536
|
-
you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
|
|
537
|
-
|
|
538
|
-
### Example Usage
|
|
539
|
-
|
|
540
|
-
<!-- UsageSnippet language="typescript" operationID="getPaymentLinkQRCode" method="get" path="/accounts/{accountID}/payment-links/{paymentLinkCode}/qrcode" -->
|
|
541
|
-
```typescript
|
|
542
|
-
import { Moov } from "@moovio/sdk";
|
|
543
|
-
|
|
544
|
-
const moov = new Moov({
|
|
545
|
-
xMoovVersion: "v2024.01.00",
|
|
546
|
-
security: {
|
|
547
|
-
username: "",
|
|
548
|
-
password: "",
|
|
549
|
-
},
|
|
550
|
-
});
|
|
551
|
-
|
|
552
|
-
async function run() {
|
|
553
|
-
const result = await moov.paymentLinks.getQRCode({
|
|
554
|
-
accountID: "2f01a42a-aa5a-424f-9f47-6f8999ed05dc",
|
|
555
|
-
paymentLinkCode: "uc7ZYKrMhi",
|
|
556
|
-
});
|
|
557
|
-
|
|
558
|
-
console.log(result);
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
run();
|
|
562
|
-
```
|
|
563
|
-
|
|
564
|
-
### Standalone function
|
|
565
|
-
|
|
566
|
-
The standalone function version of this method:
|
|
567
|
-
|
|
568
|
-
```typescript
|
|
569
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
570
|
-
import { paymentLinksGetQRCode } from "@moovio/sdk/funcs/paymentLinksGetQRCode.js";
|
|
571
|
-
|
|
572
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
573
|
-
// You can create one instance of it to use across an application.
|
|
574
|
-
const moov = new MoovCore({
|
|
575
|
-
xMoovVersion: "v2024.01.00",
|
|
576
|
-
security: {
|
|
577
|
-
username: "",
|
|
578
|
-
password: "",
|
|
579
|
-
},
|
|
580
|
-
});
|
|
581
|
-
|
|
582
|
-
async function run() {
|
|
583
|
-
const res = await paymentLinksGetQRCode(moov, {
|
|
584
|
-
accountID: "2f01a42a-aa5a-424f-9f47-6f8999ed05dc",
|
|
585
|
-
paymentLinkCode: "uc7ZYKrMhi",
|
|
586
|
-
});
|
|
587
|
-
if (res.ok) {
|
|
588
|
-
const { value: result } = res;
|
|
589
|
-
console.log(result);
|
|
590
|
-
} else {
|
|
591
|
-
console.log("paymentLinksGetQRCode failed:", res.error);
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
run();
|
|
596
|
-
```
|
|
597
|
-
|
|
598
|
-
### Parameters
|
|
599
|
-
|
|
600
|
-
| Parameter | Type | Required | Description |
|
|
601
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
602
|
-
| `request` | [operations.GetPaymentLinkQRCodeRequest](../../models/operations/getpaymentlinkqrcoderequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
603
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
604
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
605
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
606
|
-
|
|
607
|
-
### Response
|
|
608
|
-
|
|
609
|
-
**Promise\<[operations.GetPaymentLinkQRCodeResponse](../../models/operations/getpaymentlinkqrcoderesponse.md)\>**
|
|
610
|
-
|
|
611
|
-
### Errors
|
|
612
|
-
|
|
613
|
-
| Error Type | Status Code | Content Type |
|
|
614
|
-
| --------------- | --------------- | --------------- |
|
|
615
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|