@apideck/unify 0.29.8 → 0.29.9
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/README.md +14 -1
- package/docs/sdks/bankaccounts/README.md +564 -0
- package/examples/accountingTaxRatesList.example.ts +1 -1
- package/examples/package-lock.json +1 -1
- package/funcs/accountingBankAccountsCreate.d.ts +18 -0
- package/funcs/accountingBankAccountsCreate.d.ts.map +1 -0
- package/funcs/accountingBankAccountsCreate.js +139 -0
- package/funcs/accountingBankAccountsCreate.js.map +1 -0
- package/funcs/accountingBankAccountsDelete.d.ts +18 -0
- package/funcs/accountingBankAccountsDelete.d.ts.map +1 -0
- package/funcs/accountingBankAccountsDelete.js +142 -0
- package/funcs/accountingBankAccountsDelete.js.map +1 -0
- package/funcs/accountingBankAccountsGet.d.ts +18 -0
- package/funcs/accountingBankAccountsGet.d.ts.map +1 -0
- package/funcs/accountingBankAccountsGet.js +143 -0
- package/funcs/accountingBankAccountsGet.js.map +1 -0
- package/funcs/accountingBankAccountsList.d.ts +21 -0
- package/funcs/accountingBankAccountsList.d.ts.map +1 -0
- package/funcs/accountingBankAccountsList.js +168 -0
- package/funcs/accountingBankAccountsList.js.map +1 -0
- package/funcs/accountingBankAccountsUpdate.d.ts +18 -0
- package/funcs/accountingBankAccountsUpdate.d.ts.map +1 -0
- package/funcs/accountingBankAccountsUpdate.js +145 -0
- package/funcs/accountingBankAccountsUpdate.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/models/components/accountingbankaccount.d.ts +348 -0
- package/models/components/accountingbankaccount.d.ts.map +1 -0
- package/models/components/accountingbankaccount.js +298 -0
- package/models/components/accountingbankaccount.js.map +1 -0
- package/models/components/bankaccountsfilter.d.ts +72 -0
- package/models/components/bankaccountsfilter.d.ts.map +1 -0
- package/models/components/bankaccountsfilter.js +94 -0
- package/models/components/bankaccountsfilter.js.map +1 -0
- package/models/components/bankaccountssort.d.ts +70 -0
- package/models/components/bankaccountssort.d.ts.map +1 -0
- package/models/components/bankaccountssort.js +95 -0
- package/models/components/bankaccountssort.js.map +1 -0
- package/models/components/createbankaccountresponse.d.ts +61 -0
- package/models/components/createbankaccountresponse.d.ts.map +1 -0
- package/models/components/createbankaccountresponse.js +89 -0
- package/models/components/createbankaccountresponse.js.map +1 -0
- package/models/components/deletebankaccountresponse.d.ts +61 -0
- package/models/components/deletebankaccountresponse.d.ts.map +1 -0
- package/models/components/deletebankaccountresponse.js +89 -0
- package/models/components/deletebankaccountresponse.js.map +1 -0
- package/models/components/getbankaccountresponse.d.ts +58 -0
- package/models/components/getbankaccountresponse.d.ts.map +1 -0
- package/models/components/getbankaccountresponse.js +89 -0
- package/models/components/getbankaccountresponse.js.map +1 -0
- package/models/components/getbankaccountsresponse.d.ts +70 -0
- package/models/components/getbankaccountsresponse.d.ts.map +1 -0
- package/models/components/getbankaccountsresponse.js +95 -0
- package/models/components/getbankaccountsresponse.js.map +1 -0
- package/models/components/index.d.ts +8 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +8 -0
- package/models/components/index.js.map +1 -1
- package/models/components/logsfilter.d.ts +8 -0
- package/models/components/logsfilter.d.ts.map +1 -1
- package/models/components/logsfilter.js +4 -0
- package/models/components/logsfilter.js.map +1 -1
- package/models/components/updatebankaccountresponse.d.ts +61 -0
- package/models/components/updatebankaccountresponse.d.ts.map +1 -0
- package/models/components/updatebankaccountresponse.js +89 -0
- package/models/components/updatebankaccountresponse.js.map +1 -0
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/operations/accountingbankaccountsadd.d.ts +118 -0
- package/models/operations/accountingbankaccountsadd.d.ts.map +1 -0
- package/models/operations/accountingbankaccountsadd.js +163 -0
- package/models/operations/accountingbankaccountsadd.js.map +1 -0
- package/models/operations/accountingbankaccountsall.d.ts +150 -0
- package/models/operations/accountingbankaccountsall.d.ts.map +1 -0
- package/models/operations/accountingbankaccountsall.js +173 -0
- package/models/operations/accountingbankaccountsall.js.map +1 -0
- package/models/operations/accountingbankaccountsdelete.d.ts +121 -0
- package/models/operations/accountingbankaccountsdelete.d.ts.map +1 -0
- package/models/operations/accountingbankaccountsdelete.js +155 -0
- package/models/operations/accountingbankaccountsdelete.js.map +1 -0
- package/models/operations/accountingbankaccountsone.d.ts +126 -0
- package/models/operations/accountingbankaccountsone.d.ts.map +1 -0
- package/models/operations/accountingbankaccountsone.js +157 -0
- package/models/operations/accountingbankaccountsone.js.map +1 -0
- package/models/operations/accountingbankaccountsupdate.d.ts +123 -0
- package/models/operations/accountingbankaccountsupdate.d.ts.map +1 -0
- package/models/operations/accountingbankaccountsupdate.js +165 -0
- package/models/operations/accountingbankaccountsupdate.js.map +1 -0
- package/models/operations/index.d.ts +5 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +5 -0
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/accounting.d.ts +3 -0
- package/sdk/accounting.d.ts.map +1 -1
- package/sdk/accounting.js +4 -0
- package/sdk/accounting.js.map +1 -1
- package/sdk/bankaccounts.d.ts +43 -0
- package/sdk/bankaccounts.d.ts.map +1 -0
- package/sdk/bankaccounts.js +63 -0
- package/sdk/bankaccounts.js.map +1 -0
- package/src/__tests__/bankaccounts.test.ts +293 -0
- package/src/funcs/accountingBankAccountsCreate.ts +225 -0
- package/src/funcs/accountingBankAccountsDelete.ts +231 -0
- package/src/funcs/accountingBankAccountsGet.ts +230 -0
- package/src/funcs/accountingBankAccountsList.ts +303 -0
- package/src/funcs/accountingBankAccountsUpdate.ts +234 -0
- package/src/lib/config.ts +4 -4
- package/src/models/components/accountingbankaccount.ts +576 -0
- package/src/models/components/bankaccountsfilter.ts +113 -0
- package/src/models/components/bankaccountssort.ts +113 -0
- package/src/models/components/createbankaccountresponse.ts +122 -0
- package/src/models/components/deletebankaccountresponse.ts +122 -0
- package/src/models/components/getbankaccountresponse.ts +119 -0
- package/src/models/components/getbankaccountsresponse.ts +145 -0
- package/src/models/components/index.ts +8 -0
- package/src/models/components/logsfilter.ts +12 -0
- package/src/models/components/updatebankaccountresponse.ts +122 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/operations/accountingbankaccountsadd.ts +271 -0
- package/src/models/operations/accountingbankaccountsall.ts +309 -0
- package/src/models/operations/accountingbankaccountsdelete.ts +274 -0
- package/src/models/operations/accountingbankaccountsone.ts +273 -0
- package/src/models/operations/accountingbankaccountsupdate.ts +286 -0
- package/src/models/operations/index.ts +5 -0
- package/src/sdk/accounting.ts +6 -0
- package/src/sdk/bankaccounts.ts +105 -0
package/README.md
CHANGED
|
@@ -149,6 +149,14 @@ run();
|
|
|
149
149
|
|
|
150
150
|
* [get](docs/sdks/balancesheet/README.md#get) - Get BalanceSheet
|
|
151
151
|
|
|
152
|
+
#### [accounting.bankAccounts](docs/sdks/bankaccounts/README.md)
|
|
153
|
+
|
|
154
|
+
* [list](docs/sdks/bankaccounts/README.md#list) - List Bank Accounts
|
|
155
|
+
* [create](docs/sdks/bankaccounts/README.md#create) - Create Bank Account
|
|
156
|
+
* [get](docs/sdks/bankaccounts/README.md#get) - Get Bank Account
|
|
157
|
+
* [update](docs/sdks/bankaccounts/README.md#update) - Update Bank Account
|
|
158
|
+
* [delete](docs/sdks/bankaccounts/README.md#delete) - Delete Bank Account
|
|
159
|
+
|
|
152
160
|
#### [accounting.bankFeedAccounts](docs/sdks/bankfeedaccounts/README.md)
|
|
153
161
|
|
|
154
162
|
* [list](docs/sdks/bankfeedaccounts/README.md#list) - List Bank Feed Accounts
|
|
@@ -733,6 +741,11 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
733
741
|
- [`accountingAttachmentsList`](docs/sdks/attachments/README.md#list) - List Attachments
|
|
734
742
|
- [`accountingAttachmentsUpload`](docs/sdks/attachments/README.md#upload) - Upload attachment
|
|
735
743
|
- [`accountingBalanceSheetGet`](docs/sdks/balancesheet/README.md#get) - Get BalanceSheet
|
|
744
|
+
- [`accountingBankAccountsCreate`](docs/sdks/bankaccounts/README.md#create) - Create Bank Account
|
|
745
|
+
- [`accountingBankAccountsDelete`](docs/sdks/bankaccounts/README.md#delete) - Delete Bank Account
|
|
746
|
+
- [`accountingBankAccountsGet`](docs/sdks/bankaccounts/README.md#get) - Get Bank Account
|
|
747
|
+
- [`accountingBankAccountsList`](docs/sdks/bankaccounts/README.md#list) - List Bank Accounts
|
|
748
|
+
- [`accountingBankAccountsUpdate`](docs/sdks/bankaccounts/README.md#update) - Update Bank Account
|
|
736
749
|
- [`accountingBankFeedAccountsCreate`](docs/sdks/bankfeedaccounts/README.md#create) - Create Bank Feed Account
|
|
737
750
|
- [`accountingBankFeedAccountsDelete`](docs/sdks/bankfeedaccounts/README.md#delete) - Delete Bank Feed Account
|
|
738
751
|
- [`accountingBankFeedAccountsGet`](docs/sdks/bankfeedaccounts/README.md#get) - Get Bank Feed Account
|
|
@@ -1425,7 +1438,7 @@ httpClient.addHook("requestError", (error, request) => {
|
|
|
1425
1438
|
console.groupEnd();
|
|
1426
1439
|
});
|
|
1427
1440
|
|
|
1428
|
-
const sdk = new Apideck({ httpClient });
|
|
1441
|
+
const sdk = new Apideck({ httpClient: httpClient });
|
|
1429
1442
|
```
|
|
1430
1443
|
<!-- End Custom HTTP Client [http-client] -->
|
|
1431
1444
|
|
|
@@ -0,0 +1,564 @@
|
|
|
1
|
+
# BankAccounts
|
|
2
|
+
(*accounting.bankAccounts*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [list](#list) - List Bank Accounts
|
|
9
|
+
* [create](#create) - Create Bank Account
|
|
10
|
+
* [get](#get) - Get Bank Account
|
|
11
|
+
* [update](#update) - Update Bank Account
|
|
12
|
+
* [delete](#delete) - Delete Bank Account
|
|
13
|
+
|
|
14
|
+
## list
|
|
15
|
+
|
|
16
|
+
List Bank Accounts
|
|
17
|
+
|
|
18
|
+
### Example Usage
|
|
19
|
+
|
|
20
|
+
<!-- UsageSnippet language="typescript" operationID="accounting.bankAccountsAll" method="get" path="/accounting/bank-accounts" -->
|
|
21
|
+
```typescript
|
|
22
|
+
import { Apideck } from "@apideck/unify";
|
|
23
|
+
|
|
24
|
+
const apideck = new Apideck({
|
|
25
|
+
consumerId: "test-consumer",
|
|
26
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
27
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
async function run() {
|
|
31
|
+
const result = await apideck.accounting.bankAccounts.list({
|
|
32
|
+
serviceId: "salesforce",
|
|
33
|
+
filter: {
|
|
34
|
+
name: "Main Operating",
|
|
35
|
+
status: "active",
|
|
36
|
+
},
|
|
37
|
+
sort: {},
|
|
38
|
+
passThrough: {
|
|
39
|
+
"search": "San Francisco",
|
|
40
|
+
},
|
|
41
|
+
fields: "id,updated_at",
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
for await (const page of result) {
|
|
45
|
+
console.log(page);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
run();
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Standalone function
|
|
53
|
+
|
|
54
|
+
The standalone function version of this method:
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
import { ApideckCore } from "@apideck/unify/core.js";
|
|
58
|
+
import { accountingBankAccountsList } from "@apideck/unify/funcs/accountingBankAccountsList.js";
|
|
59
|
+
|
|
60
|
+
// Use `ApideckCore` for best tree-shaking performance.
|
|
61
|
+
// You can create one instance of it to use across an application.
|
|
62
|
+
const apideck = new ApideckCore({
|
|
63
|
+
consumerId: "test-consumer",
|
|
64
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
65
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
async function run() {
|
|
69
|
+
const res = await accountingBankAccountsList(apideck, {
|
|
70
|
+
serviceId: "salesforce",
|
|
71
|
+
filter: {
|
|
72
|
+
name: "Main Operating",
|
|
73
|
+
status: "active",
|
|
74
|
+
},
|
|
75
|
+
sort: {},
|
|
76
|
+
passThrough: {
|
|
77
|
+
"search": "San Francisco",
|
|
78
|
+
},
|
|
79
|
+
fields: "id,updated_at",
|
|
80
|
+
});
|
|
81
|
+
if (res.ok) {
|
|
82
|
+
const { value: result } = res;
|
|
83
|
+
for await (const page of result) {
|
|
84
|
+
console.log(page);
|
|
85
|
+
}
|
|
86
|
+
} else {
|
|
87
|
+
console.log("accountingBankAccountsList failed:", res.error);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
run();
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Parameters
|
|
95
|
+
|
|
96
|
+
| Parameter | Type | Required | Description |
|
|
97
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
98
|
+
| `request` | [operations.AccountingBankAccountsAllRequest](../../models/operations/accountingbankaccountsallrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
99
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
100
|
+
| `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. |
|
|
101
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
102
|
+
|
|
103
|
+
### Response
|
|
104
|
+
|
|
105
|
+
**Promise\<[operations.AccountingBankAccountsAllResponse](../../models/operations/accountingbankaccountsallresponse.md)\>**
|
|
106
|
+
|
|
107
|
+
### Errors
|
|
108
|
+
|
|
109
|
+
| Error Type | Status Code | Content Type |
|
|
110
|
+
| ------------------------------ | ------------------------------ | ------------------------------ |
|
|
111
|
+
| errors.BadRequestResponse | 400 | application/json |
|
|
112
|
+
| errors.UnauthorizedResponse | 401 | application/json |
|
|
113
|
+
| errors.PaymentRequiredResponse | 402 | application/json |
|
|
114
|
+
| errors.NotFoundResponse | 404 | application/json |
|
|
115
|
+
| errors.UnprocessableResponse | 422 | application/json |
|
|
116
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
117
|
+
|
|
118
|
+
## create
|
|
119
|
+
|
|
120
|
+
Create Bank Account
|
|
121
|
+
|
|
122
|
+
### Example Usage
|
|
123
|
+
|
|
124
|
+
<!-- UsageSnippet language="typescript" operationID="accounting.bankAccountsAdd" method="post" path="/accounting/bank-accounts" -->
|
|
125
|
+
```typescript
|
|
126
|
+
import { Apideck } from "@apideck/unify";
|
|
127
|
+
|
|
128
|
+
const apideck = new Apideck({
|
|
129
|
+
consumerId: "test-consumer",
|
|
130
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
131
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
async function run() {
|
|
135
|
+
const result = await apideck.accounting.bankAccounts.create({
|
|
136
|
+
serviceId: "salesforce",
|
|
137
|
+
accountingBankAccount: {
|
|
138
|
+
displayId: "BA-001",
|
|
139
|
+
name: "Main Operating Account",
|
|
140
|
+
accountNumber: "1234567890",
|
|
141
|
+
accountType: "checking",
|
|
142
|
+
bankName: "Chase Bank",
|
|
143
|
+
currency: "USD",
|
|
144
|
+
balance: 25000,
|
|
145
|
+
availableBalance: 24500,
|
|
146
|
+
overdraftLimit: 5000,
|
|
147
|
+
routingNumber: "021000021",
|
|
148
|
+
iban: "GB33BUKB20201555555555",
|
|
149
|
+
bic: "CHASUS33",
|
|
150
|
+
bsbNumber: "062-001",
|
|
151
|
+
branchIdentifier: "001",
|
|
152
|
+
bankCode: "BNH",
|
|
153
|
+
country: "US",
|
|
154
|
+
status: "active",
|
|
155
|
+
description: "Primary operating account for daily transactions",
|
|
156
|
+
customFields: [
|
|
157
|
+
{
|
|
158
|
+
id: "2389328923893298",
|
|
159
|
+
name: "employee_level",
|
|
160
|
+
description: "Employee Level",
|
|
161
|
+
value: "Uses Salesforce and Marketo",
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
},
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
console.log(result);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
run();
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Standalone function
|
|
174
|
+
|
|
175
|
+
The standalone function version of this method:
|
|
176
|
+
|
|
177
|
+
```typescript
|
|
178
|
+
import { ApideckCore } from "@apideck/unify/core.js";
|
|
179
|
+
import { accountingBankAccountsCreate } from "@apideck/unify/funcs/accountingBankAccountsCreate.js";
|
|
180
|
+
|
|
181
|
+
// Use `ApideckCore` for best tree-shaking performance.
|
|
182
|
+
// You can create one instance of it to use across an application.
|
|
183
|
+
const apideck = new ApideckCore({
|
|
184
|
+
consumerId: "test-consumer",
|
|
185
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
186
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
async function run() {
|
|
190
|
+
const res = await accountingBankAccountsCreate(apideck, {
|
|
191
|
+
serviceId: "salesforce",
|
|
192
|
+
accountingBankAccount: {
|
|
193
|
+
displayId: "BA-001",
|
|
194
|
+
name: "Main Operating Account",
|
|
195
|
+
accountNumber: "1234567890",
|
|
196
|
+
accountType: "checking",
|
|
197
|
+
bankName: "Chase Bank",
|
|
198
|
+
currency: "USD",
|
|
199
|
+
balance: 25000,
|
|
200
|
+
availableBalance: 24500,
|
|
201
|
+
overdraftLimit: 5000,
|
|
202
|
+
routingNumber: "021000021",
|
|
203
|
+
iban: "GB33BUKB20201555555555",
|
|
204
|
+
bic: "CHASUS33",
|
|
205
|
+
bsbNumber: "062-001",
|
|
206
|
+
branchIdentifier: "001",
|
|
207
|
+
bankCode: "BNH",
|
|
208
|
+
country: "US",
|
|
209
|
+
status: "active",
|
|
210
|
+
description: "Primary operating account for daily transactions",
|
|
211
|
+
customFields: [
|
|
212
|
+
{
|
|
213
|
+
id: "2389328923893298",
|
|
214
|
+
name: "employee_level",
|
|
215
|
+
description: "Employee Level",
|
|
216
|
+
value: "Uses Salesforce and Marketo",
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
},
|
|
220
|
+
});
|
|
221
|
+
if (res.ok) {
|
|
222
|
+
const { value: result } = res;
|
|
223
|
+
console.log(result);
|
|
224
|
+
} else {
|
|
225
|
+
console.log("accountingBankAccountsCreate failed:", res.error);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
run();
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Parameters
|
|
233
|
+
|
|
234
|
+
| Parameter | Type | Required | Description |
|
|
235
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
236
|
+
| `request` | [operations.AccountingBankAccountsAddRequest](../../models/operations/accountingbankaccountsaddrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
237
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
238
|
+
| `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. |
|
|
239
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
240
|
+
|
|
241
|
+
### Response
|
|
242
|
+
|
|
243
|
+
**Promise\<[operations.AccountingBankAccountsAddResponse](../../models/operations/accountingbankaccountsaddresponse.md)\>**
|
|
244
|
+
|
|
245
|
+
### Errors
|
|
246
|
+
|
|
247
|
+
| Error Type | Status Code | Content Type |
|
|
248
|
+
| ------------------------------ | ------------------------------ | ------------------------------ |
|
|
249
|
+
| errors.BadRequestResponse | 400 | application/json |
|
|
250
|
+
| errors.UnauthorizedResponse | 401 | application/json |
|
|
251
|
+
| errors.PaymentRequiredResponse | 402 | application/json |
|
|
252
|
+
| errors.NotFoundResponse | 404 | application/json |
|
|
253
|
+
| errors.UnprocessableResponse | 422 | application/json |
|
|
254
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
255
|
+
|
|
256
|
+
## get
|
|
257
|
+
|
|
258
|
+
Get Bank Account
|
|
259
|
+
|
|
260
|
+
### Example Usage
|
|
261
|
+
|
|
262
|
+
<!-- UsageSnippet language="typescript" operationID="accounting.bankAccountsOne" method="get" path="/accounting/bank-accounts/{id}" -->
|
|
263
|
+
```typescript
|
|
264
|
+
import { Apideck } from "@apideck/unify";
|
|
265
|
+
|
|
266
|
+
const apideck = new Apideck({
|
|
267
|
+
consumerId: "test-consumer",
|
|
268
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
269
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
async function run() {
|
|
273
|
+
const result = await apideck.accounting.bankAccounts.get({
|
|
274
|
+
id: "<id>",
|
|
275
|
+
serviceId: "salesforce",
|
|
276
|
+
fields: "id,updated_at",
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
console.log(result);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
run();
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Standalone function
|
|
286
|
+
|
|
287
|
+
The standalone function version of this method:
|
|
288
|
+
|
|
289
|
+
```typescript
|
|
290
|
+
import { ApideckCore } from "@apideck/unify/core.js";
|
|
291
|
+
import { accountingBankAccountsGet } from "@apideck/unify/funcs/accountingBankAccountsGet.js";
|
|
292
|
+
|
|
293
|
+
// Use `ApideckCore` for best tree-shaking performance.
|
|
294
|
+
// You can create one instance of it to use across an application.
|
|
295
|
+
const apideck = new ApideckCore({
|
|
296
|
+
consumerId: "test-consumer",
|
|
297
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
298
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
async function run() {
|
|
302
|
+
const res = await accountingBankAccountsGet(apideck, {
|
|
303
|
+
id: "<id>",
|
|
304
|
+
serviceId: "salesforce",
|
|
305
|
+
fields: "id,updated_at",
|
|
306
|
+
});
|
|
307
|
+
if (res.ok) {
|
|
308
|
+
const { value: result } = res;
|
|
309
|
+
console.log(result);
|
|
310
|
+
} else {
|
|
311
|
+
console.log("accountingBankAccountsGet failed:", res.error);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
run();
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
### Parameters
|
|
319
|
+
|
|
320
|
+
| Parameter | Type | Required | Description |
|
|
321
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
322
|
+
| `request` | [operations.AccountingBankAccountsOneRequest](../../models/operations/accountingbankaccountsonerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
323
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
324
|
+
| `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. |
|
|
325
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
326
|
+
|
|
327
|
+
### Response
|
|
328
|
+
|
|
329
|
+
**Promise\<[operations.AccountingBankAccountsOneResponse](../../models/operations/accountingbankaccountsoneresponse.md)\>**
|
|
330
|
+
|
|
331
|
+
### Errors
|
|
332
|
+
|
|
333
|
+
| Error Type | Status Code | Content Type |
|
|
334
|
+
| ------------------------------ | ------------------------------ | ------------------------------ |
|
|
335
|
+
| errors.BadRequestResponse | 400 | application/json |
|
|
336
|
+
| errors.UnauthorizedResponse | 401 | application/json |
|
|
337
|
+
| errors.PaymentRequiredResponse | 402 | application/json |
|
|
338
|
+
| errors.NotFoundResponse | 404 | application/json |
|
|
339
|
+
| errors.UnprocessableResponse | 422 | application/json |
|
|
340
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
341
|
+
|
|
342
|
+
## update
|
|
343
|
+
|
|
344
|
+
Update Bank Account
|
|
345
|
+
|
|
346
|
+
### Example Usage
|
|
347
|
+
|
|
348
|
+
<!-- UsageSnippet language="typescript" operationID="accounting.bankAccountsUpdate" method="patch" path="/accounting/bank-accounts/{id}" -->
|
|
349
|
+
```typescript
|
|
350
|
+
import { Apideck } from "@apideck/unify";
|
|
351
|
+
|
|
352
|
+
const apideck = new Apideck({
|
|
353
|
+
consumerId: "test-consumer",
|
|
354
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
355
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
356
|
+
});
|
|
357
|
+
|
|
358
|
+
async function run() {
|
|
359
|
+
const result = await apideck.accounting.bankAccounts.update({
|
|
360
|
+
id: "<id>",
|
|
361
|
+
serviceId: "salesforce",
|
|
362
|
+
accountingBankAccount: {
|
|
363
|
+
displayId: "BA-001",
|
|
364
|
+
name: "Main Operating Account",
|
|
365
|
+
accountNumber: "1234567890",
|
|
366
|
+
accountType: "checking",
|
|
367
|
+
bankName: "Chase Bank",
|
|
368
|
+
currency: "USD",
|
|
369
|
+
balance: 25000,
|
|
370
|
+
availableBalance: 24500,
|
|
371
|
+
overdraftLimit: 5000,
|
|
372
|
+
routingNumber: "021000021",
|
|
373
|
+
iban: "GB33BUKB20201555555555",
|
|
374
|
+
bic: "CHASUS33",
|
|
375
|
+
bsbNumber: "062-001",
|
|
376
|
+
branchIdentifier: "001",
|
|
377
|
+
bankCode: "BNH",
|
|
378
|
+
country: "US",
|
|
379
|
+
status: "active",
|
|
380
|
+
description: "Primary operating account for daily transactions",
|
|
381
|
+
customFields: [
|
|
382
|
+
{
|
|
383
|
+
id: "2389328923893298",
|
|
384
|
+
name: "employee_level",
|
|
385
|
+
description: "Employee Level",
|
|
386
|
+
value: "Uses Salesforce and Marketo",
|
|
387
|
+
},
|
|
388
|
+
],
|
|
389
|
+
},
|
|
390
|
+
});
|
|
391
|
+
|
|
392
|
+
console.log(result);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
run();
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### Standalone function
|
|
399
|
+
|
|
400
|
+
The standalone function version of this method:
|
|
401
|
+
|
|
402
|
+
```typescript
|
|
403
|
+
import { ApideckCore } from "@apideck/unify/core.js";
|
|
404
|
+
import { accountingBankAccountsUpdate } from "@apideck/unify/funcs/accountingBankAccountsUpdate.js";
|
|
405
|
+
|
|
406
|
+
// Use `ApideckCore` for best tree-shaking performance.
|
|
407
|
+
// You can create one instance of it to use across an application.
|
|
408
|
+
const apideck = new ApideckCore({
|
|
409
|
+
consumerId: "test-consumer",
|
|
410
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
411
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
async function run() {
|
|
415
|
+
const res = await accountingBankAccountsUpdate(apideck, {
|
|
416
|
+
id: "<id>",
|
|
417
|
+
serviceId: "salesforce",
|
|
418
|
+
accountingBankAccount: {
|
|
419
|
+
displayId: "BA-001",
|
|
420
|
+
name: "Main Operating Account",
|
|
421
|
+
accountNumber: "1234567890",
|
|
422
|
+
accountType: "checking",
|
|
423
|
+
bankName: "Chase Bank",
|
|
424
|
+
currency: "USD",
|
|
425
|
+
balance: 25000,
|
|
426
|
+
availableBalance: 24500,
|
|
427
|
+
overdraftLimit: 5000,
|
|
428
|
+
routingNumber: "021000021",
|
|
429
|
+
iban: "GB33BUKB20201555555555",
|
|
430
|
+
bic: "CHASUS33",
|
|
431
|
+
bsbNumber: "062-001",
|
|
432
|
+
branchIdentifier: "001",
|
|
433
|
+
bankCode: "BNH",
|
|
434
|
+
country: "US",
|
|
435
|
+
status: "active",
|
|
436
|
+
description: "Primary operating account for daily transactions",
|
|
437
|
+
customFields: [
|
|
438
|
+
{
|
|
439
|
+
id: "2389328923893298",
|
|
440
|
+
name: "employee_level",
|
|
441
|
+
description: "Employee Level",
|
|
442
|
+
value: "Uses Salesforce and Marketo",
|
|
443
|
+
},
|
|
444
|
+
],
|
|
445
|
+
},
|
|
446
|
+
});
|
|
447
|
+
if (res.ok) {
|
|
448
|
+
const { value: result } = res;
|
|
449
|
+
console.log(result);
|
|
450
|
+
} else {
|
|
451
|
+
console.log("accountingBankAccountsUpdate failed:", res.error);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
run();
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
### Parameters
|
|
459
|
+
|
|
460
|
+
| Parameter | Type | Required | Description |
|
|
461
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
462
|
+
| `request` | [operations.AccountingBankAccountsUpdateRequest](../../models/operations/accountingbankaccountsupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
463
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
464
|
+
| `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. |
|
|
465
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
466
|
+
|
|
467
|
+
### Response
|
|
468
|
+
|
|
469
|
+
**Promise\<[operations.AccountingBankAccountsUpdateResponse](../../models/operations/accountingbankaccountsupdateresponse.md)\>**
|
|
470
|
+
|
|
471
|
+
### Errors
|
|
472
|
+
|
|
473
|
+
| Error Type | Status Code | Content Type |
|
|
474
|
+
| ------------------------------ | ------------------------------ | ------------------------------ |
|
|
475
|
+
| errors.BadRequestResponse | 400 | application/json |
|
|
476
|
+
| errors.UnauthorizedResponse | 401 | application/json |
|
|
477
|
+
| errors.PaymentRequiredResponse | 402 | application/json |
|
|
478
|
+
| errors.NotFoundResponse | 404 | application/json |
|
|
479
|
+
| errors.UnprocessableResponse | 422 | application/json |
|
|
480
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
481
|
+
|
|
482
|
+
## delete
|
|
483
|
+
|
|
484
|
+
Delete Bank Account
|
|
485
|
+
|
|
486
|
+
### Example Usage
|
|
487
|
+
|
|
488
|
+
<!-- UsageSnippet language="typescript" operationID="accounting.bankAccountsDelete" method="delete" path="/accounting/bank-accounts/{id}" -->
|
|
489
|
+
```typescript
|
|
490
|
+
import { Apideck } from "@apideck/unify";
|
|
491
|
+
|
|
492
|
+
const apideck = new Apideck({
|
|
493
|
+
consumerId: "test-consumer",
|
|
494
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
495
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
496
|
+
});
|
|
497
|
+
|
|
498
|
+
async function run() {
|
|
499
|
+
const result = await apideck.accounting.bankAccounts.delete({
|
|
500
|
+
id: "<id>",
|
|
501
|
+
serviceId: "salesforce",
|
|
502
|
+
});
|
|
503
|
+
|
|
504
|
+
console.log(result);
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
run();
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
### Standalone function
|
|
511
|
+
|
|
512
|
+
The standalone function version of this method:
|
|
513
|
+
|
|
514
|
+
```typescript
|
|
515
|
+
import { ApideckCore } from "@apideck/unify/core.js";
|
|
516
|
+
import { accountingBankAccountsDelete } from "@apideck/unify/funcs/accountingBankAccountsDelete.js";
|
|
517
|
+
|
|
518
|
+
// Use `ApideckCore` for best tree-shaking performance.
|
|
519
|
+
// You can create one instance of it to use across an application.
|
|
520
|
+
const apideck = new ApideckCore({
|
|
521
|
+
consumerId: "test-consumer",
|
|
522
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
523
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
524
|
+
});
|
|
525
|
+
|
|
526
|
+
async function run() {
|
|
527
|
+
const res = await accountingBankAccountsDelete(apideck, {
|
|
528
|
+
id: "<id>",
|
|
529
|
+
serviceId: "salesforce",
|
|
530
|
+
});
|
|
531
|
+
if (res.ok) {
|
|
532
|
+
const { value: result } = res;
|
|
533
|
+
console.log(result);
|
|
534
|
+
} else {
|
|
535
|
+
console.log("accountingBankAccountsDelete failed:", res.error);
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
run();
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
### Parameters
|
|
543
|
+
|
|
544
|
+
| Parameter | Type | Required | Description |
|
|
545
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
546
|
+
| `request` | [operations.AccountingBankAccountsDeleteRequest](../../models/operations/accountingbankaccountsdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
547
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
548
|
+
| `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. |
|
|
549
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
550
|
+
|
|
551
|
+
### Response
|
|
552
|
+
|
|
553
|
+
**Promise\<[operations.AccountingBankAccountsDeleteResponse](../../models/operations/accountingbankaccountsdeleteresponse.md)\>**
|
|
554
|
+
|
|
555
|
+
### Errors
|
|
556
|
+
|
|
557
|
+
| Error Type | Status Code | Content Type |
|
|
558
|
+
| ------------------------------ | ------------------------------ | ------------------------------ |
|
|
559
|
+
| errors.BadRequestResponse | 400 | application/json |
|
|
560
|
+
| errors.UnauthorizedResponse | 401 | application/json |
|
|
561
|
+
| errors.PaymentRequiredResponse | 402 | application/json |
|
|
562
|
+
| errors.NotFoundResponse | 404 | application/json |
|
|
563
|
+
| errors.UnprocessableResponse | 422 | application/json |
|
|
564
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ApideckCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ApideckError } from "../models/errors/apideckerror.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import * as errors from "../models/errors/index.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { APIPromise } from "../types/async.js";
|
|
10
|
+
import { Result } from "../types/fp.js";
|
|
11
|
+
/**
|
|
12
|
+
* Create Bank Account
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Create Bank Account
|
|
16
|
+
*/
|
|
17
|
+
export declare function accountingBankAccountsCreate(client: ApideckCore, request: operations.AccountingBankAccountsAddRequest, options?: RequestOptions): APIPromise<Result<operations.AccountingBankAccountsAddResponse, errors.BadRequestResponse | errors.UnauthorizedResponse | errors.PaymentRequiredResponse | errors.NotFoundResponse | errors.UnprocessableResponse | ApideckError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
+
//# sourceMappingURL=accountingBankAccountsCreate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountingBankAccountsCreate.d.ts","sourceRoot":"","sources":["../src/funcs/accountingBankAccountsCreate.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAKzC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,UAAU,CAAC,gCAAgC,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,iCAAiC,EAC1C,MAAM,CAAC,kBAAkB,GACzB,MAAM,CAAC,oBAAoB,GAC3B,MAAM,CAAC,uBAAuB,GAC9B,MAAM,CAAC,gBAAgB,GACvB,MAAM,CAAC,qBAAqB,GAC5B,YAAY,GACZ,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|