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