@moovio/sdk 0.21.1 → 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 +2 -2
- package/lib/config.js +2 -2
- 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 +2 -2
- 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,603 +0,0 @@
|
|
|
1
|
-
# Representatives
|
|
2
|
-
(*representatives*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [create](#create) - Moov accounts associated with businesses require information regarding individuals who represent the business.
|
|
9
|
-
You can provide this information by creating a representative. Each account is allowed a maximum of 7 representatives.
|
|
10
|
-
Read our [business representatives guide](https://docs.moov.io/guides/accounts/requirements/business-representatives/) to learn more.
|
|
11
|
-
|
|
12
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
13
|
-
you'll need to specify the `/accounts/{accountID}/representatives.write` scope.
|
|
14
|
-
* [list](#list) - A Moov account may have multiple representatives depending on the associated business's ownership and management structure.
|
|
15
|
-
You can use this method to list all the representatives for a given Moov account.
|
|
16
|
-
Note that Moov accounts associated with an individual do not have representatives.
|
|
17
|
-
Read our [business representatives guide](https://docs.moov.io/guides/accounts/requirements/business-representatives/) to learn more.
|
|
18
|
-
|
|
19
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
20
|
-
you'll need to specify the `/accounts/{accountID}/representatives.read` scope.
|
|
21
|
-
* [delete](#delete) - Deletes a business representative associated with a Moov account. Read our [business representatives guide](https://docs.moov.io/guides/accounts/requirements/business-representatives/) to learn more.
|
|
22
|
-
|
|
23
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
24
|
-
you'll need to specify the `/accounts/{accountID}/representatives.write` scope.
|
|
25
|
-
* [get](#get) - Retrieve a specific representative associated with a given Moov account. Read our [business representatives guide](https://docs.moov.io/guides/accounts/requirements/business-representatives/) to learn more.
|
|
26
|
-
|
|
27
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
28
|
-
you'll need to specify the `/accounts/{accountID}/representatives.read` scope.
|
|
29
|
-
* [update](#update) - If a representative's information has changed you can patch the information associated with a specific representative ID.
|
|
30
|
-
Read our [business representatives guide](https://docs.moov.io/guides/accounts/requirements/business-representatives/) to learn more.
|
|
31
|
-
|
|
32
|
-
When **can** profile data be updated:
|
|
33
|
-
|
|
34
|
-
- For unverified representatives, all profile data can be edited.
|
|
35
|
-
- During the verification process, missing or incomplete profile data can be edited.
|
|
36
|
-
- Verified representatives can only add missing profile data.
|
|
37
|
-
|
|
38
|
-
When **can't** profile data be updated:
|
|
39
|
-
|
|
40
|
-
- Verified representatives cannot change any existing profile data.
|
|
41
|
-
|
|
42
|
-
If you need to update information in a locked state, please contact Moov support.
|
|
43
|
-
|
|
44
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
45
|
-
you'll need to specify the `/accounts/{accountID}/representatives.write` scope.
|
|
46
|
-
|
|
47
|
-
## create
|
|
48
|
-
|
|
49
|
-
Moov accounts associated with businesses require information regarding individuals who represent the business.
|
|
50
|
-
You can provide this information by creating a representative. Each account is allowed a maximum of 7 representatives.
|
|
51
|
-
Read our [business representatives guide](https://docs.moov.io/guides/accounts/requirements/business-representatives/) to learn more.
|
|
52
|
-
|
|
53
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
54
|
-
you'll need to specify the `/accounts/{accountID}/representatives.write` scope.
|
|
55
|
-
|
|
56
|
-
### Example Usage
|
|
57
|
-
|
|
58
|
-
<!-- UsageSnippet language="typescript" operationID="createRepresentative" method="post" path="/accounts/{accountID}/representatives" -->
|
|
59
|
-
```typescript
|
|
60
|
-
import { Moov } from "@moovio/sdk";
|
|
61
|
-
|
|
62
|
-
const moov = new Moov({
|
|
63
|
-
xMoovVersion: "v2024.01.00",
|
|
64
|
-
security: {
|
|
65
|
-
username: "",
|
|
66
|
-
password: "",
|
|
67
|
-
},
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
async function run() {
|
|
71
|
-
const result = await moov.representatives.create({
|
|
72
|
-
accountID: "5abfe3a5-7cd3-4f92-a8bd-19b64e3ccc10",
|
|
73
|
-
createRepresentative: {
|
|
74
|
-
name: {
|
|
75
|
-
firstName: "Jordan",
|
|
76
|
-
middleName: "Reese",
|
|
77
|
-
lastName: "Lee",
|
|
78
|
-
suffix: "Jr",
|
|
79
|
-
},
|
|
80
|
-
phone: {
|
|
81
|
-
number: "8185551212",
|
|
82
|
-
countryCode: "1",
|
|
83
|
-
},
|
|
84
|
-
email: "jordan.lee@classbooker.dev",
|
|
85
|
-
address: {
|
|
86
|
-
addressLine1: "123 Main Street",
|
|
87
|
-
addressLine2: "Apt 302",
|
|
88
|
-
city: "Boulder",
|
|
89
|
-
stateOrProvince: "CO",
|
|
90
|
-
postalCode: "80301",
|
|
91
|
-
country: "US",
|
|
92
|
-
},
|
|
93
|
-
birthDate: {
|
|
94
|
-
day: 9,
|
|
95
|
-
month: 11,
|
|
96
|
-
year: 1989,
|
|
97
|
-
},
|
|
98
|
-
responsibilities: {
|
|
99
|
-
ownershipPercentage: 38,
|
|
100
|
-
jobTitle: "CEO",
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
console.log(result);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
run();
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### Standalone function
|
|
112
|
-
|
|
113
|
-
The standalone function version of this method:
|
|
114
|
-
|
|
115
|
-
```typescript
|
|
116
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
117
|
-
import { representativesCreate } from "@moovio/sdk/funcs/representativesCreate.js";
|
|
118
|
-
|
|
119
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
120
|
-
// You can create one instance of it to use across an application.
|
|
121
|
-
const moov = new MoovCore({
|
|
122
|
-
xMoovVersion: "v2024.01.00",
|
|
123
|
-
security: {
|
|
124
|
-
username: "",
|
|
125
|
-
password: "",
|
|
126
|
-
},
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
async function run() {
|
|
130
|
-
const res = await representativesCreate(moov, {
|
|
131
|
-
accountID: "5abfe3a5-7cd3-4f92-a8bd-19b64e3ccc10",
|
|
132
|
-
createRepresentative: {
|
|
133
|
-
name: {
|
|
134
|
-
firstName: "Jordan",
|
|
135
|
-
middleName: "Reese",
|
|
136
|
-
lastName: "Lee",
|
|
137
|
-
suffix: "Jr",
|
|
138
|
-
},
|
|
139
|
-
phone: {
|
|
140
|
-
number: "8185551212",
|
|
141
|
-
countryCode: "1",
|
|
142
|
-
},
|
|
143
|
-
email: "jordan.lee@classbooker.dev",
|
|
144
|
-
address: {
|
|
145
|
-
addressLine1: "123 Main Street",
|
|
146
|
-
addressLine2: "Apt 302",
|
|
147
|
-
city: "Boulder",
|
|
148
|
-
stateOrProvince: "CO",
|
|
149
|
-
postalCode: "80301",
|
|
150
|
-
country: "US",
|
|
151
|
-
},
|
|
152
|
-
birthDate: {
|
|
153
|
-
day: 9,
|
|
154
|
-
month: 11,
|
|
155
|
-
year: 1989,
|
|
156
|
-
},
|
|
157
|
-
responsibilities: {
|
|
158
|
-
ownershipPercentage: 38,
|
|
159
|
-
jobTitle: "CEO",
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
|
-
});
|
|
163
|
-
if (res.ok) {
|
|
164
|
-
const { value: result } = res;
|
|
165
|
-
console.log(result);
|
|
166
|
-
} else {
|
|
167
|
-
console.log("representativesCreate failed:", res.error);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
run();
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
### Parameters
|
|
175
|
-
|
|
176
|
-
| Parameter | Type | Required | Description |
|
|
177
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
178
|
-
| `request` | [operations.CreateRepresentativeRequest](../../models/operations/createrepresentativerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
179
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
180
|
-
| `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. |
|
|
181
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
182
|
-
|
|
183
|
-
### Response
|
|
184
|
-
|
|
185
|
-
**Promise\<[operations.CreateRepresentativeResponse](../../models/operations/createrepresentativeresponse.md)\>**
|
|
186
|
-
|
|
187
|
-
### Errors
|
|
188
|
-
|
|
189
|
-
| Error Type | Status Code | Content Type |
|
|
190
|
-
| ------------------------------------ | ------------------------------------ | ------------------------------------ |
|
|
191
|
-
| errors.GenericError | 400, 409 | application/json |
|
|
192
|
-
| errors.RepresentativeValidationError | 422 | application/json |
|
|
193
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
194
|
-
|
|
195
|
-
## list
|
|
196
|
-
|
|
197
|
-
A Moov account may have multiple representatives depending on the associated business's ownership and management structure.
|
|
198
|
-
You can use this method to list all the representatives for a given Moov account.
|
|
199
|
-
Note that Moov accounts associated with an individual do not have representatives.
|
|
200
|
-
Read our [business representatives guide](https://docs.moov.io/guides/accounts/requirements/business-representatives/) to learn more.
|
|
201
|
-
|
|
202
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
203
|
-
you'll need to specify the `/accounts/{accountID}/representatives.read` scope.
|
|
204
|
-
|
|
205
|
-
### Example Usage
|
|
206
|
-
|
|
207
|
-
<!-- UsageSnippet language="typescript" operationID="listRepresentatives" method="get" path="/accounts/{accountID}/representatives" -->
|
|
208
|
-
```typescript
|
|
209
|
-
import { Moov } from "@moovio/sdk";
|
|
210
|
-
|
|
211
|
-
const moov = new Moov({
|
|
212
|
-
xMoovVersion: "v2024.01.00",
|
|
213
|
-
security: {
|
|
214
|
-
username: "",
|
|
215
|
-
password: "",
|
|
216
|
-
},
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
async function run() {
|
|
220
|
-
const result = await moov.representatives.list({
|
|
221
|
-
accountID: "aa071158-7ed6-4c18-af34-4fa37b755e53",
|
|
222
|
-
});
|
|
223
|
-
|
|
224
|
-
console.log(result);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
run();
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
### Standalone function
|
|
231
|
-
|
|
232
|
-
The standalone function version of this method:
|
|
233
|
-
|
|
234
|
-
```typescript
|
|
235
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
236
|
-
import { representativesList } from "@moovio/sdk/funcs/representativesList.js";
|
|
237
|
-
|
|
238
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
239
|
-
// You can create one instance of it to use across an application.
|
|
240
|
-
const moov = new MoovCore({
|
|
241
|
-
xMoovVersion: "v2024.01.00",
|
|
242
|
-
security: {
|
|
243
|
-
username: "",
|
|
244
|
-
password: "",
|
|
245
|
-
},
|
|
246
|
-
});
|
|
247
|
-
|
|
248
|
-
async function run() {
|
|
249
|
-
const res = await representativesList(moov, {
|
|
250
|
-
accountID: "aa071158-7ed6-4c18-af34-4fa37b755e53",
|
|
251
|
-
});
|
|
252
|
-
if (res.ok) {
|
|
253
|
-
const { value: result } = res;
|
|
254
|
-
console.log(result);
|
|
255
|
-
} else {
|
|
256
|
-
console.log("representativesList failed:", res.error);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
run();
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
### Parameters
|
|
264
|
-
|
|
265
|
-
| Parameter | Type | Required | Description |
|
|
266
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
267
|
-
| `request` | [operations.ListRepresentativesRequest](../../models/operations/listrepresentativesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
268
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
269
|
-
| `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. |
|
|
270
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
271
|
-
|
|
272
|
-
### Response
|
|
273
|
-
|
|
274
|
-
**Promise\<[operations.ListRepresentativesResponse](../../models/operations/listrepresentativesresponse.md)\>**
|
|
275
|
-
|
|
276
|
-
### Errors
|
|
277
|
-
|
|
278
|
-
| Error Type | Status Code | Content Type |
|
|
279
|
-
| --------------- | --------------- | --------------- |
|
|
280
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
281
|
-
|
|
282
|
-
## delete
|
|
283
|
-
|
|
284
|
-
Deletes a business representative associated with a Moov account. Read our [business representatives guide](https://docs.moov.io/guides/accounts/requirements/business-representatives/) to learn more.
|
|
285
|
-
|
|
286
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
287
|
-
you'll need to specify the `/accounts/{accountID}/representatives.write` scope.
|
|
288
|
-
|
|
289
|
-
### Example Usage
|
|
290
|
-
|
|
291
|
-
<!-- UsageSnippet language="typescript" operationID="deleteRepresentative" method="delete" path="/accounts/{accountID}/representatives/{representativeID}" -->
|
|
292
|
-
```typescript
|
|
293
|
-
import { Moov } from "@moovio/sdk";
|
|
294
|
-
|
|
295
|
-
const moov = new Moov({
|
|
296
|
-
xMoovVersion: "v2024.01.00",
|
|
297
|
-
security: {
|
|
298
|
-
username: "",
|
|
299
|
-
password: "",
|
|
300
|
-
},
|
|
301
|
-
});
|
|
302
|
-
|
|
303
|
-
async function run() {
|
|
304
|
-
const result = await moov.representatives.delete({
|
|
305
|
-
accountID: "23b950c7-3ccf-4edc-9566-07f765d57c73",
|
|
306
|
-
representativeID: "74d0f56b-b81b-467a-bc86-47a55fe5e503",
|
|
307
|
-
});
|
|
308
|
-
|
|
309
|
-
console.log(result);
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
run();
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
### Standalone function
|
|
316
|
-
|
|
317
|
-
The standalone function version of this method:
|
|
318
|
-
|
|
319
|
-
```typescript
|
|
320
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
321
|
-
import { representativesDelete } from "@moovio/sdk/funcs/representativesDelete.js";
|
|
322
|
-
|
|
323
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
324
|
-
// You can create one instance of it to use across an application.
|
|
325
|
-
const moov = new MoovCore({
|
|
326
|
-
xMoovVersion: "v2024.01.00",
|
|
327
|
-
security: {
|
|
328
|
-
username: "",
|
|
329
|
-
password: "",
|
|
330
|
-
},
|
|
331
|
-
});
|
|
332
|
-
|
|
333
|
-
async function run() {
|
|
334
|
-
const res = await representativesDelete(moov, {
|
|
335
|
-
accountID: "23b950c7-3ccf-4edc-9566-07f765d57c73",
|
|
336
|
-
representativeID: "74d0f56b-b81b-467a-bc86-47a55fe5e503",
|
|
337
|
-
});
|
|
338
|
-
if (res.ok) {
|
|
339
|
-
const { value: result } = res;
|
|
340
|
-
console.log(result);
|
|
341
|
-
} else {
|
|
342
|
-
console.log("representativesDelete failed:", res.error);
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
run();
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
### Parameters
|
|
350
|
-
|
|
351
|
-
| Parameter | Type | Required | Description |
|
|
352
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
353
|
-
| `request` | [operations.DeleteRepresentativeRequest](../../models/operations/deleterepresentativerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
354
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
355
|
-
| `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. |
|
|
356
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
357
|
-
|
|
358
|
-
### Response
|
|
359
|
-
|
|
360
|
-
**Promise\<[operations.DeleteRepresentativeResponse](../../models/operations/deleterepresentativeresponse.md)\>**
|
|
361
|
-
|
|
362
|
-
### Errors
|
|
363
|
-
|
|
364
|
-
| Error Type | Status Code | Content Type |
|
|
365
|
-
| ------------------- | ------------------- | ------------------- |
|
|
366
|
-
| errors.GenericError | 400, 409 | application/json |
|
|
367
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
368
|
-
|
|
369
|
-
## get
|
|
370
|
-
|
|
371
|
-
Retrieve a specific representative associated with a given Moov account. Read our [business representatives guide](https://docs.moov.io/guides/accounts/requirements/business-representatives/) to learn more.
|
|
372
|
-
|
|
373
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
374
|
-
you'll need to specify the `/accounts/{accountID}/representatives.read` scope.
|
|
375
|
-
|
|
376
|
-
### Example Usage
|
|
377
|
-
|
|
378
|
-
<!-- UsageSnippet language="typescript" operationID="getRepresentative" method="get" path="/accounts/{accountID}/representatives/{representativeID}" -->
|
|
379
|
-
```typescript
|
|
380
|
-
import { Moov } from "@moovio/sdk";
|
|
381
|
-
|
|
382
|
-
const moov = new Moov({
|
|
383
|
-
xMoovVersion: "v2024.01.00",
|
|
384
|
-
security: {
|
|
385
|
-
username: "",
|
|
386
|
-
password: "",
|
|
387
|
-
},
|
|
388
|
-
});
|
|
389
|
-
|
|
390
|
-
async function run() {
|
|
391
|
-
const result = await moov.representatives.get({
|
|
392
|
-
accountID: "071b8a57-e691-4e4b-9143-75f1a828ce9b",
|
|
393
|
-
representativeID: "00d87070-b167-48e6-be2f-198b5e1556c4",
|
|
394
|
-
});
|
|
395
|
-
|
|
396
|
-
console.log(result);
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
run();
|
|
400
|
-
```
|
|
401
|
-
|
|
402
|
-
### Standalone function
|
|
403
|
-
|
|
404
|
-
The standalone function version of this method:
|
|
405
|
-
|
|
406
|
-
```typescript
|
|
407
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
408
|
-
import { representativesGet } from "@moovio/sdk/funcs/representativesGet.js";
|
|
409
|
-
|
|
410
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
411
|
-
// You can create one instance of it to use across an application.
|
|
412
|
-
const moov = new MoovCore({
|
|
413
|
-
xMoovVersion: "v2024.01.00",
|
|
414
|
-
security: {
|
|
415
|
-
username: "",
|
|
416
|
-
password: "",
|
|
417
|
-
},
|
|
418
|
-
});
|
|
419
|
-
|
|
420
|
-
async function run() {
|
|
421
|
-
const res = await representativesGet(moov, {
|
|
422
|
-
accountID: "071b8a57-e691-4e4b-9143-75f1a828ce9b",
|
|
423
|
-
representativeID: "00d87070-b167-48e6-be2f-198b5e1556c4",
|
|
424
|
-
});
|
|
425
|
-
if (res.ok) {
|
|
426
|
-
const { value: result } = res;
|
|
427
|
-
console.log(result);
|
|
428
|
-
} else {
|
|
429
|
-
console.log("representativesGet failed:", res.error);
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
run();
|
|
434
|
-
```
|
|
435
|
-
|
|
436
|
-
### Parameters
|
|
437
|
-
|
|
438
|
-
| Parameter | Type | Required | Description |
|
|
439
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
440
|
-
| `request` | [operations.GetRepresentativeRequest](../../models/operations/getrepresentativerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
441
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
442
|
-
| `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. |
|
|
443
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
444
|
-
|
|
445
|
-
### Response
|
|
446
|
-
|
|
447
|
-
**Promise\<[operations.GetRepresentativeResponse](../../models/operations/getrepresentativeresponse.md)\>**
|
|
448
|
-
|
|
449
|
-
### Errors
|
|
450
|
-
|
|
451
|
-
| Error Type | Status Code | Content Type |
|
|
452
|
-
| --------------- | --------------- | --------------- |
|
|
453
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
454
|
-
|
|
455
|
-
## update
|
|
456
|
-
|
|
457
|
-
If a representative's information has changed you can patch the information associated with a specific representative ID.
|
|
458
|
-
Read our [business representatives guide](https://docs.moov.io/guides/accounts/requirements/business-representatives/) to learn more.
|
|
459
|
-
|
|
460
|
-
When **can** profile data be updated:
|
|
461
|
-
|
|
462
|
-
- For unverified representatives, all profile data can be edited.
|
|
463
|
-
- During the verification process, missing or incomplete profile data can be edited.
|
|
464
|
-
- Verified representatives can only add missing profile data.
|
|
465
|
-
|
|
466
|
-
When **can't** profile data be updated:
|
|
467
|
-
|
|
468
|
-
- Verified representatives cannot change any existing profile data.
|
|
469
|
-
|
|
470
|
-
If you need to update information in a locked state, please contact Moov support.
|
|
471
|
-
|
|
472
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
473
|
-
you'll need to specify the `/accounts/{accountID}/representatives.write` scope.
|
|
474
|
-
|
|
475
|
-
### Example Usage
|
|
476
|
-
|
|
477
|
-
<!-- UsageSnippet language="typescript" operationID="updateRepresentative" method="patch" path="/accounts/{accountID}/representatives/{representativeID}" -->
|
|
478
|
-
```typescript
|
|
479
|
-
import { Moov } from "@moovio/sdk";
|
|
480
|
-
|
|
481
|
-
const moov = new Moov({
|
|
482
|
-
xMoovVersion: "v2024.01.00",
|
|
483
|
-
security: {
|
|
484
|
-
username: "",
|
|
485
|
-
password: "",
|
|
486
|
-
},
|
|
487
|
-
});
|
|
488
|
-
|
|
489
|
-
async function run() {
|
|
490
|
-
const result = await moov.representatives.update({
|
|
491
|
-
accountID: "76647e2b-97ea-4551-8275-7153219f3317",
|
|
492
|
-
representativeID: "e89d3d0d-fbe3-4df6-8b18-d7cbcb761161",
|
|
493
|
-
updateRepresentative: {
|
|
494
|
-
name: {
|
|
495
|
-
firstName: "Jordan",
|
|
496
|
-
middleName: "Reese",
|
|
497
|
-
lastName: "Lee",
|
|
498
|
-
suffix: "Jr",
|
|
499
|
-
},
|
|
500
|
-
phone: {
|
|
501
|
-
number: "8185551212",
|
|
502
|
-
countryCode: "1",
|
|
503
|
-
},
|
|
504
|
-
address: {
|
|
505
|
-
addressLine1: "123 Main Street",
|
|
506
|
-
addressLine2: "Apt 302",
|
|
507
|
-
city: "Boulder",
|
|
508
|
-
stateOrProvince: "CO",
|
|
509
|
-
postalCode: "80301",
|
|
510
|
-
country: "US",
|
|
511
|
-
},
|
|
512
|
-
birthDate: null,
|
|
513
|
-
responsibilities: {
|
|
514
|
-
ownershipPercentage: 38,
|
|
515
|
-
jobTitle: "CEO",
|
|
516
|
-
},
|
|
517
|
-
},
|
|
518
|
-
});
|
|
519
|
-
|
|
520
|
-
console.log(result);
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
run();
|
|
524
|
-
```
|
|
525
|
-
|
|
526
|
-
### Standalone function
|
|
527
|
-
|
|
528
|
-
The standalone function version of this method:
|
|
529
|
-
|
|
530
|
-
```typescript
|
|
531
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
532
|
-
import { representativesUpdate } from "@moovio/sdk/funcs/representativesUpdate.js";
|
|
533
|
-
|
|
534
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
535
|
-
// You can create one instance of it to use across an application.
|
|
536
|
-
const moov = new MoovCore({
|
|
537
|
-
xMoovVersion: "v2024.01.00",
|
|
538
|
-
security: {
|
|
539
|
-
username: "",
|
|
540
|
-
password: "",
|
|
541
|
-
},
|
|
542
|
-
});
|
|
543
|
-
|
|
544
|
-
async function run() {
|
|
545
|
-
const res = await representativesUpdate(moov, {
|
|
546
|
-
accountID: "76647e2b-97ea-4551-8275-7153219f3317",
|
|
547
|
-
representativeID: "e89d3d0d-fbe3-4df6-8b18-d7cbcb761161",
|
|
548
|
-
updateRepresentative: {
|
|
549
|
-
name: {
|
|
550
|
-
firstName: "Jordan",
|
|
551
|
-
middleName: "Reese",
|
|
552
|
-
lastName: "Lee",
|
|
553
|
-
suffix: "Jr",
|
|
554
|
-
},
|
|
555
|
-
phone: {
|
|
556
|
-
number: "8185551212",
|
|
557
|
-
countryCode: "1",
|
|
558
|
-
},
|
|
559
|
-
address: {
|
|
560
|
-
addressLine1: "123 Main Street",
|
|
561
|
-
addressLine2: "Apt 302",
|
|
562
|
-
city: "Boulder",
|
|
563
|
-
stateOrProvince: "CO",
|
|
564
|
-
postalCode: "80301",
|
|
565
|
-
country: "US",
|
|
566
|
-
},
|
|
567
|
-
birthDate: null,
|
|
568
|
-
responsibilities: {
|
|
569
|
-
ownershipPercentage: 38,
|
|
570
|
-
jobTitle: "CEO",
|
|
571
|
-
},
|
|
572
|
-
},
|
|
573
|
-
});
|
|
574
|
-
if (res.ok) {
|
|
575
|
-
const { value: result } = res;
|
|
576
|
-
console.log(result);
|
|
577
|
-
} else {
|
|
578
|
-
console.log("representativesUpdate failed:", res.error);
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
run();
|
|
583
|
-
```
|
|
584
|
-
|
|
585
|
-
### Parameters
|
|
586
|
-
|
|
587
|
-
| Parameter | Type | Required | Description |
|
|
588
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
589
|
-
| `request` | [operations.UpdateRepresentativeRequest](../../models/operations/updaterepresentativerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
590
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
591
|
-
| `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. |
|
|
592
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
593
|
-
|
|
594
|
-
### Response
|
|
595
|
-
|
|
596
|
-
**Promise\<[operations.UpdateRepresentativeResponse](../../models/operations/updaterepresentativeresponse.md)\>**
|
|
597
|
-
|
|
598
|
-
### Errors
|
|
599
|
-
|
|
600
|
-
| Error Type | Status Code | Content Type |
|
|
601
|
-
| ------------------- | ------------------- | ------------------- |
|
|
602
|
-
| errors.GenericError | 400, 409 | application/json |
|
|
603
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|