@emilgroup/accounting-sdk-node 1.0.1-beta.0

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.
Files changed (49) hide show
  1. package/.openapi-generator/FILES +21 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +68 -0
  5. package/api/default-api.ts +128 -0
  6. package/api/financial-accounts-api.ts +571 -0
  7. package/api/transactions-api.ts +167 -0
  8. package/api.ts +35 -0
  9. package/base.ts +285 -0
  10. package/common.ts +199 -0
  11. package/configuration.ts +109 -0
  12. package/dist/api/default-api.d.ts +70 -0
  13. package/dist/api/default-api.js +204 -0
  14. package/dist/api/financial-accounts-api.d.ts +324 -0
  15. package/dist/api/financial-accounts-api.js +549 -0
  16. package/dist/api/transactions-api.d.ts +96 -0
  17. package/dist/api/transactions-api.js +228 -0
  18. package/dist/api.d.ts +14 -0
  19. package/dist/api.js +32 -0
  20. package/dist/base.d.ts +78 -0
  21. package/dist/base.js +394 -0
  22. package/dist/common.d.ts +92 -0
  23. package/dist/common.js +277 -0
  24. package/dist/configuration.d.ts +90 -0
  25. package/dist/configuration.js +44 -0
  26. package/dist/index.d.ts +15 -0
  27. package/dist/index.js +36 -0
  28. package/dist/models/create-financial-account-request-dto.d.ts +56 -0
  29. package/dist/models/create-financial-account-request-dto.js +23 -0
  30. package/dist/models/create-transaction-request-dto.d.ts +55 -0
  31. package/dist/models/create-transaction-request-dto.js +15 -0
  32. package/dist/models/entry-data-dto.d.ts +36 -0
  33. package/dist/models/entry-data-dto.js +15 -0
  34. package/dist/models/index.d.ts +5 -0
  35. package/dist/models/index.js +21 -0
  36. package/dist/models/inline-response200.d.ts +54 -0
  37. package/dist/models/inline-response200.js +15 -0
  38. package/dist/models/inline-response503.d.ts +54 -0
  39. package/dist/models/inline-response503.js +15 -0
  40. package/git_push.sh +57 -0
  41. package/index.ts +19 -0
  42. package/models/create-financial-account-request-dto.ts +65 -0
  43. package/models/create-transaction-request-dto.ts +61 -0
  44. package/models/entry-data-dto.ts +42 -0
  45. package/models/index.ts +5 -0
  46. package/models/inline-response200.ts +48 -0
  47. package/models/inline-response503.ts +48 -0
  48. package/package.json +29 -0
  49. package/tsconfig.json +22 -0
@@ -0,0 +1,571 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL AccountingService
5
+ * The EMIL AccountingService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { CreateFinancialAccountRequestDto } from '../models';
25
+ // URLSearchParams not necessarily used
26
+ // @ts-ignore
27
+ import { URL, URLSearchParams } from 'url';
28
+ const FormData = require('form-data');
29
+ /**
30
+ * FinancialAccountsApi - axios parameter creator
31
+ * @export
32
+ */
33
+ export const FinancialAccountsApiAxiosParamCreator = function (configuration?: Configuration) {
34
+ return {
35
+ /**
36
+ * This will create an account in the database. The account will be created with the provided name, type, and account number. Optionally, you can provide a parent account ID to create a sub-account.
37
+ * @summary Create the account
38
+ * @param {CreateFinancialAccountRequestDto} createFinancialAccountRequestDto
39
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
40
+ * @param {*} [options] Override http request option.
41
+ * @throws {RequiredError}
42
+ */
43
+ createFinancialAccount: async (createFinancialAccountRequestDto: CreateFinancialAccountRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
44
+ // verify required parameter 'createFinancialAccountRequestDto' is not null or undefined
45
+ assertParamExists('createFinancialAccount', 'createFinancialAccountRequestDto', createFinancialAccountRequestDto)
46
+ const localVarPath = `/accountingservice/v1/financial-accounts`;
47
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
48
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
49
+ let baseOptions;
50
+ let baseAccessToken;
51
+ if (configuration) {
52
+ baseOptions = configuration.baseOptions;
53
+ baseAccessToken = configuration.accessToken;
54
+ }
55
+
56
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
57
+ const localVarHeaderParameter = {} as any;
58
+ const localVarQueryParameter = {} as any;
59
+
60
+ // authentication bearer required
61
+ // http bearer authentication required
62
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
63
+
64
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
65
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
66
+ }
67
+
68
+
69
+
70
+ localVarHeaderParameter['Content-Type'] = 'application/json';
71
+
72
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
73
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
74
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
75
+ localVarRequestOptions.data = serializeDataIfNeeded(createFinancialAccountRequestDto, localVarRequestOptions, configuration)
76
+
77
+ return {
78
+ url: toPathString(localVarUrlObj),
79
+ options: localVarRequestOptions,
80
+ };
81
+ },
82
+ /**
83
+ * Permanently deletes the account. Supply the unique code that was returned when you created the account and this will delete it.
84
+ * @summary Delete the account
85
+ * @param {string} code Unique identifier for the object.
86
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
87
+ * @param {*} [options] Override http request option.
88
+ * @throws {RequiredError}
89
+ */
90
+ deleteFinancialAccount: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
91
+ // verify required parameter 'code' is not null or undefined
92
+ assertParamExists('deleteFinancialAccount', 'code', code)
93
+ const localVarPath = `/accountingservice/v1/financial-accounts/{code}`
94
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
95
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
96
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
97
+ let baseOptions;
98
+ let baseAccessToken;
99
+ if (configuration) {
100
+ baseOptions = configuration.baseOptions;
101
+ baseAccessToken = configuration.accessToken;
102
+ }
103
+
104
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
105
+ const localVarHeaderParameter = {} as any;
106
+ const localVarQueryParameter = {} as any;
107
+
108
+ // authentication bearer required
109
+ // http bearer authentication required
110
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
111
+
112
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
113
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
114
+ }
115
+
116
+
117
+
118
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
119
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
120
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
121
+
122
+ return {
123
+ url: toPathString(localVarUrlObj),
124
+ options: localVarRequestOptions,
125
+ };
126
+ },
127
+ /**
128
+ * Retrieves the details of the account that was previously created. Supply the unique account code that was returned when you created it and Emil Api will return the corresponding account information.
129
+ * @summary Retrieve the account
130
+ * @param {string} code Unique identifier for the object.
131
+ * @param {string} expand
132
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
133
+ * @param {*} [options] Override http request option.
134
+ * @throws {RequiredError}
135
+ */
136
+ getFinancialAccount: async (code: string, expand: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
137
+ // verify required parameter 'code' is not null or undefined
138
+ assertParamExists('getFinancialAccount', 'code', code)
139
+ // verify required parameter 'expand' is not null or undefined
140
+ assertParamExists('getFinancialAccount', 'expand', expand)
141
+ const localVarPath = `/accountingservice/v1/financial-accounts/{code}`
142
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
143
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
144
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
145
+ let baseOptions;
146
+ let baseAccessToken;
147
+ if (configuration) {
148
+ baseOptions = configuration.baseOptions;
149
+ baseAccessToken = configuration.accessToken;
150
+ }
151
+
152
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
153
+ const localVarHeaderParameter = {} as any;
154
+ const localVarQueryParameter = {} as any;
155
+
156
+ // authentication bearer required
157
+ // http bearer authentication required
158
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
159
+
160
+ if (expand !== undefined) {
161
+ localVarQueryParameter['expand'] = expand;
162
+ }
163
+
164
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
165
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
166
+ }
167
+
168
+
169
+
170
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
171
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
172
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
173
+
174
+ return {
175
+ url: toPathString(localVarUrlObj),
176
+ options: localVarRequestOptions,
177
+ };
178
+ },
179
+ /**
180
+ * Returns a list of Financial Accounts you have previously created. The Financial Accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
181
+ * @summary List Financial Accounts
182
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
183
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
184
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
185
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type&lt;/i&gt;
186
+ * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
187
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt, name, financialAccountNumber&lt;/i&gt;
188
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
189
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type&lt;/i&gt;
190
+ * @param {*} [options] Override http request option.
191
+ * @throws {RequiredError}
192
+ */
193
+ listFinancialAccounts: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: any, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
194
+ const localVarPath = `/accountingservice/v1/financial-accounts`;
195
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
196
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
197
+ let baseOptions;
198
+ let baseAccessToken;
199
+ if (configuration) {
200
+ baseOptions = configuration.baseOptions;
201
+ baseAccessToken = configuration.accessToken;
202
+ }
203
+
204
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
205
+ const localVarHeaderParameter = {} as any;
206
+ const localVarQueryParameter = {} as any;
207
+
208
+ // authentication bearer required
209
+ // http bearer authentication required
210
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
211
+
212
+ if (pageSize !== undefined) {
213
+ localVarQueryParameter['pageSize'] = pageSize;
214
+ }
215
+
216
+ if (pageToken !== undefined) {
217
+ localVarQueryParameter['pageToken'] = pageToken;
218
+ }
219
+
220
+ if (filter !== undefined) {
221
+ localVarQueryParameter['filter'] = filter;
222
+ }
223
+
224
+ if (search !== undefined) {
225
+ localVarQueryParameter['search'] = search;
226
+ }
227
+
228
+ if (order !== undefined) {
229
+ localVarQueryParameter['order'] = order;
230
+ }
231
+
232
+ if (expand !== undefined) {
233
+ localVarQueryParameter['expand'] = expand;
234
+ }
235
+
236
+ if (filters !== undefined) {
237
+ localVarQueryParameter['filters'] = filters;
238
+ }
239
+
240
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
241
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
242
+ }
243
+
244
+
245
+
246
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
247
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
248
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
249
+
250
+ return {
251
+ url: toPathString(localVarUrlObj),
252
+ options: localVarRequestOptions,
253
+ };
254
+ },
255
+ }
256
+ };
257
+
258
+ /**
259
+ * FinancialAccountsApi - functional programming interface
260
+ * @export
261
+ */
262
+ export const FinancialAccountsApiFp = function(configuration?: Configuration) {
263
+ const localVarAxiosParamCreator = FinancialAccountsApiAxiosParamCreator(configuration)
264
+ return {
265
+ /**
266
+ * This will create an account in the database. The account will be created with the provided name, type, and account number. Optionally, you can provide a parent account ID to create a sub-account.
267
+ * @summary Create the account
268
+ * @param {CreateFinancialAccountRequestDto} createFinancialAccountRequestDto
269
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
270
+ * @param {*} [options] Override http request option.
271
+ * @throws {RequiredError}
272
+ */
273
+ async createFinancialAccount(createFinancialAccountRequestDto: CreateFinancialAccountRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
274
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createFinancialAccount(createFinancialAccountRequestDto, authorization, options);
275
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
276
+ },
277
+ /**
278
+ * Permanently deletes the account. Supply the unique code that was returned when you created the account and this will delete it.
279
+ * @summary Delete the account
280
+ * @param {string} code Unique identifier for the object.
281
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
282
+ * @param {*} [options] Override http request option.
283
+ * @throws {RequiredError}
284
+ */
285
+ async deleteFinancialAccount(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
286
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteFinancialAccount(code, authorization, options);
287
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
288
+ },
289
+ /**
290
+ * Retrieves the details of the account that was previously created. Supply the unique account code that was returned when you created it and Emil Api will return the corresponding account information.
291
+ * @summary Retrieve the account
292
+ * @param {string} code Unique identifier for the object.
293
+ * @param {string} expand
294
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
295
+ * @param {*} [options] Override http request option.
296
+ * @throws {RequiredError}
297
+ */
298
+ async getFinancialAccount(code: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
299
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getFinancialAccount(code, expand, authorization, options);
300
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
301
+ },
302
+ /**
303
+ * Returns a list of Financial Accounts you have previously created. The Financial Accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
304
+ * @summary List Financial Accounts
305
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
306
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
307
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
308
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type&lt;/i&gt;
309
+ * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
310
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt, name, financialAccountNumber&lt;/i&gt;
311
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
312
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type&lt;/i&gt;
313
+ * @param {*} [options] Override http request option.
314
+ * @throws {RequiredError}
315
+ */
316
+ async listFinancialAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: any, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
317
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
318
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
319
+ },
320
+ }
321
+ };
322
+
323
+ /**
324
+ * FinancialAccountsApi - factory interface
325
+ * @export
326
+ */
327
+ export const FinancialAccountsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
328
+ const localVarFp = FinancialAccountsApiFp(configuration)
329
+ return {
330
+ /**
331
+ * This will create an account in the database. The account will be created with the provided name, type, and account number. Optionally, you can provide a parent account ID to create a sub-account.
332
+ * @summary Create the account
333
+ * @param {CreateFinancialAccountRequestDto} createFinancialAccountRequestDto
334
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
335
+ * @param {*} [options] Override http request option.
336
+ * @throws {RequiredError}
337
+ */
338
+ createFinancialAccount(createFinancialAccountRequestDto: CreateFinancialAccountRequestDto, authorization?: string, options?: any): AxiosPromise<void> {
339
+ return localVarFp.createFinancialAccount(createFinancialAccountRequestDto, authorization, options).then((request) => request(axios, basePath));
340
+ },
341
+ /**
342
+ * Permanently deletes the account. Supply the unique code that was returned when you created the account and this will delete it.
343
+ * @summary Delete the account
344
+ * @param {string} code Unique identifier for the object.
345
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
346
+ * @param {*} [options] Override http request option.
347
+ * @throws {RequiredError}
348
+ */
349
+ deleteFinancialAccount(code: string, authorization?: string, options?: any): AxiosPromise<void> {
350
+ return localVarFp.deleteFinancialAccount(code, authorization, options).then((request) => request(axios, basePath));
351
+ },
352
+ /**
353
+ * Retrieves the details of the account that was previously created. Supply the unique account code that was returned when you created it and Emil Api will return the corresponding account information.
354
+ * @summary Retrieve the account
355
+ * @param {string} code Unique identifier for the object.
356
+ * @param {string} expand
357
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
358
+ * @param {*} [options] Override http request option.
359
+ * @throws {RequiredError}
360
+ */
361
+ getFinancialAccount(code: string, expand: string, authorization?: string, options?: any): AxiosPromise<void> {
362
+ return localVarFp.getFinancialAccount(code, expand, authorization, options).then((request) => request(axios, basePath));
363
+ },
364
+ /**
365
+ * Returns a list of Financial Accounts you have previously created. The Financial Accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
366
+ * @summary List Financial Accounts
367
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
368
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
369
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
370
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type&lt;/i&gt;
371
+ * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
372
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt, name, financialAccountNumber&lt;/i&gt;
373
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
374
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type&lt;/i&gt;
375
+ * @param {*} [options] Override http request option.
376
+ * @throws {RequiredError}
377
+ */
378
+ listFinancialAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: any, filters?: string, options?: any): AxiosPromise<void> {
379
+ return localVarFp.listFinancialAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
380
+ },
381
+ };
382
+ };
383
+
384
+ /**
385
+ * Request parameters for createFinancialAccount operation in FinancialAccountsApi.
386
+ * @export
387
+ * @interface FinancialAccountsApiCreateFinancialAccountRequest
388
+ */
389
+ export interface FinancialAccountsApiCreateFinancialAccountRequest {
390
+ /**
391
+ *
392
+ * @type {CreateFinancialAccountRequestDto}
393
+ * @memberof FinancialAccountsApiCreateFinancialAccount
394
+ */
395
+ readonly createFinancialAccountRequestDto: CreateFinancialAccountRequestDto
396
+
397
+ /**
398
+ * Bearer Token: provided by the login endpoint under the name accessToken.
399
+ * @type {string}
400
+ * @memberof FinancialAccountsApiCreateFinancialAccount
401
+ */
402
+ readonly authorization?: string
403
+ }
404
+
405
+ /**
406
+ * Request parameters for deleteFinancialAccount operation in FinancialAccountsApi.
407
+ * @export
408
+ * @interface FinancialAccountsApiDeleteFinancialAccountRequest
409
+ */
410
+ export interface FinancialAccountsApiDeleteFinancialAccountRequest {
411
+ /**
412
+ * Unique identifier for the object.
413
+ * @type {string}
414
+ * @memberof FinancialAccountsApiDeleteFinancialAccount
415
+ */
416
+ readonly code: string
417
+
418
+ /**
419
+ * Bearer Token: provided by the login endpoint under the name accessToken.
420
+ * @type {string}
421
+ * @memberof FinancialAccountsApiDeleteFinancialAccount
422
+ */
423
+ readonly authorization?: string
424
+ }
425
+
426
+ /**
427
+ * Request parameters for getFinancialAccount operation in FinancialAccountsApi.
428
+ * @export
429
+ * @interface FinancialAccountsApiGetFinancialAccountRequest
430
+ */
431
+ export interface FinancialAccountsApiGetFinancialAccountRequest {
432
+ /**
433
+ * Unique identifier for the object.
434
+ * @type {string}
435
+ * @memberof FinancialAccountsApiGetFinancialAccount
436
+ */
437
+ readonly code: string
438
+
439
+ /**
440
+ *
441
+ * @type {string}
442
+ * @memberof FinancialAccountsApiGetFinancialAccount
443
+ */
444
+ readonly expand: string
445
+
446
+ /**
447
+ * Bearer Token: provided by the login endpoint under the name accessToken.
448
+ * @type {string}
449
+ * @memberof FinancialAccountsApiGetFinancialAccount
450
+ */
451
+ readonly authorization?: string
452
+ }
453
+
454
+ /**
455
+ * Request parameters for listFinancialAccounts operation in FinancialAccountsApi.
456
+ * @export
457
+ * @interface FinancialAccountsApiListFinancialAccountsRequest
458
+ */
459
+ export interface FinancialAccountsApiListFinancialAccountsRequest {
460
+ /**
461
+ * Bearer Token: provided by the login endpoint under the name accessToken.
462
+ * @type {string}
463
+ * @memberof FinancialAccountsApiListFinancialAccounts
464
+ */
465
+ readonly authorization?: string
466
+
467
+ /**
468
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
469
+ * @type {any}
470
+ * @memberof FinancialAccountsApiListFinancialAccounts
471
+ */
472
+ readonly pageSize?: any
473
+
474
+ /**
475
+ * A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
476
+ * @type {any}
477
+ * @memberof FinancialAccountsApiListFinancialAccounts
478
+ */
479
+ readonly pageToken?: any
480
+
481
+ /**
482
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type&lt;/i&gt;
483
+ * @type {string}
484
+ * @memberof FinancialAccountsApiListFinancialAccounts
485
+ */
486
+ readonly filter?: string
487
+
488
+ /**
489
+ * To search the list by any field, pass search&#x3D;xxx to fetch the result.
490
+ * @type {any}
491
+ * @memberof FinancialAccountsApiListFinancialAccounts
492
+ */
493
+ readonly search?: any
494
+
495
+ /**
496
+ * Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt, name, financialAccountNumber&lt;/i&gt;
497
+ * @type {string}
498
+ * @memberof FinancialAccountsApiListFinancialAccounts
499
+ */
500
+ readonly order?: string
501
+
502
+ /**
503
+ * Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
504
+ * @type {any}
505
+ * @memberof FinancialAccountsApiListFinancialAccounts
506
+ */
507
+ readonly expand?: any
508
+
509
+ /**
510
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, name, financialAccountNumber, createdAt, entityCode, type&lt;/i&gt;
511
+ * @type {string}
512
+ * @memberof FinancialAccountsApiListFinancialAccounts
513
+ */
514
+ readonly filters?: string
515
+ }
516
+
517
+ /**
518
+ * FinancialAccountsApi - object-oriented interface
519
+ * @export
520
+ * @class FinancialAccountsApi
521
+ * @extends {BaseAPI}
522
+ */
523
+ export class FinancialAccountsApi extends BaseAPI {
524
+ /**
525
+ * This will create an account in the database. The account will be created with the provided name, type, and account number. Optionally, you can provide a parent account ID to create a sub-account.
526
+ * @summary Create the account
527
+ * @param {FinancialAccountsApiCreateFinancialAccountRequest} requestParameters Request parameters.
528
+ * @param {*} [options] Override http request option.
529
+ * @throws {RequiredError}
530
+ * @memberof FinancialAccountsApi
531
+ */
532
+ public createFinancialAccount(requestParameters: FinancialAccountsApiCreateFinancialAccountRequest, options?: AxiosRequestConfig) {
533
+ return FinancialAccountsApiFp(this.configuration).createFinancialAccount(requestParameters.createFinancialAccountRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
534
+ }
535
+
536
+ /**
537
+ * Permanently deletes the account. Supply the unique code that was returned when you created the account and this will delete it.
538
+ * @summary Delete the account
539
+ * @param {FinancialAccountsApiDeleteFinancialAccountRequest} requestParameters Request parameters.
540
+ * @param {*} [options] Override http request option.
541
+ * @throws {RequiredError}
542
+ * @memberof FinancialAccountsApi
543
+ */
544
+ public deleteFinancialAccount(requestParameters: FinancialAccountsApiDeleteFinancialAccountRequest, options?: AxiosRequestConfig) {
545
+ return FinancialAccountsApiFp(this.configuration).deleteFinancialAccount(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
546
+ }
547
+
548
+ /**
549
+ * Retrieves the details of the account that was previously created. Supply the unique account code that was returned when you created it and Emil Api will return the corresponding account information.
550
+ * @summary Retrieve the account
551
+ * @param {FinancialAccountsApiGetFinancialAccountRequest} requestParameters Request parameters.
552
+ * @param {*} [options] Override http request option.
553
+ * @throws {RequiredError}
554
+ * @memberof FinancialAccountsApi
555
+ */
556
+ public getFinancialAccount(requestParameters: FinancialAccountsApiGetFinancialAccountRequest, options?: AxiosRequestConfig) {
557
+ return FinancialAccountsApiFp(this.configuration).getFinancialAccount(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
558
+ }
559
+
560
+ /**
561
+ * Returns a list of Financial Accounts you have previously created. The Financial Accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
562
+ * @summary List Financial Accounts
563
+ * @param {FinancialAccountsApiListFinancialAccountsRequest} requestParameters Request parameters.
564
+ * @param {*} [options] Override http request option.
565
+ * @throws {RequiredError}
566
+ * @memberof FinancialAccountsApi
567
+ */
568
+ public listFinancialAccounts(requestParameters: FinancialAccountsApiListFinancialAccountsRequest = {}, options?: AxiosRequestConfig) {
569
+ return FinancialAccountsApiFp(this.configuration).listFinancialAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
570
+ }
571
+ }