@emilgroup/accounting-sdk 1.34.1-beta.2 → 1.34.1-beta.20
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/.openapi-generator/FILES +16 -0
- package/README.md +2 -2
- package/api/accounting-configs-api.ts +97 -7
- package/api/financial-accounts-api.ts +120 -0
- package/api/product-account-mappings-api.ts +1470 -0
- package/api.ts +2 -0
- package/dist/api/accounting-configs-api.d.ts +47 -0
- package/dist/api/accounting-configs-api.js +94 -7
- package/dist/api/financial-accounts-api.d.ts +66 -0
- package/dist/api/financial-accounts-api.js +99 -0
- package/dist/api/product-account-mappings-api.d.ts +851 -0
- package/dist/api/product-account-mappings-api.js +1224 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/models/accounting-config-class.d.ts +11 -0
- package/dist/models/accounting-config-class.js +5 -0
- package/dist/models/create-financial-account-request-dto.d.ts +6 -0
- package/dist/models/financial-account-class.d.ts +18 -1
- package/dist/models/financial-account-class.js +5 -1
- package/dist/models/get-activation-snapshot-response-class.d.ts +25 -0
- package/dist/models/get-activation-snapshot-response-class.js +15 -0
- package/dist/models/index.d.ts +15 -0
- package/dist/models/index.js +15 -0
- package/dist/models/list-product-account-mappings-response-class.d.ts +43 -0
- package/dist/models/list-product-account-mappings-response-class.js +15 -0
- package/dist/models/list-products-with-account-mappings-response-class.d.ts +43 -0
- package/dist/models/list-products-with-account-mappings-response-class.js +15 -0
- package/dist/models/premium-item-account-mapping-class.d.ts +37 -0
- package/dist/models/premium-item-account-mapping-class.js +15 -0
- package/dist/models/product-account-mapping-class.d.ts +61 -0
- package/dist/models/product-account-mapping-class.js +15 -0
- package/dist/models/product-account-mapping-detail-class.d.ts +50 -0
- package/dist/models/product-account-mapping-detail-class.js +15 -0
- package/dist/models/product-version-account-mapping-detail-class.d.ts +50 -0
- package/dist/models/product-version-account-mapping-detail-class.js +15 -0
- package/dist/models/product-version-with-account-mappings-class.d.ts +42 -0
- package/dist/models/product-version-with-account-mappings-class.js +15 -0
- package/dist/models/product-with-account-mappings-class.d.ts +49 -0
- package/dist/models/product-with-account-mappings-class.js +15 -0
- package/dist/models/put-premium-item-account-body-dto.d.ts +24 -0
- package/dist/models/put-premium-item-account-body-dto.js +15 -0
- package/dist/models/put-product-category-account-body-dto.d.ts +24 -0
- package/dist/models/put-product-category-account-body-dto.js +15 -0
- package/dist/models/put-product-version-category-account-body-dto.d.ts +24 -0
- package/dist/models/put-product-version-category-account-body-dto.js +15 -0
- package/dist/models/resolved-account-mapping-class.d.ts +31 -0
- package/dist/models/resolved-account-mapping-class.js +15 -0
- package/dist/models/update-financial-account-body-dto.d.ts +42 -0
- package/dist/models/update-financial-account-body-dto.js +15 -0
- package/dist/models/update-financial-account-response-class.d.ts +25 -0
- package/dist/models/update-financial-account-response-class.js +15 -0
- package/models/accounting-config-class.ts +14 -0
- package/models/create-financial-account-request-dto.ts +6 -0
- package/models/financial-account-class.ts +19 -1
- package/models/get-activation-snapshot-response-class.ts +31 -0
- package/models/index.ts +15 -0
- package/models/list-product-account-mappings-response-class.ts +49 -0
- package/models/list-products-with-account-mappings-response-class.ts +49 -0
- package/models/premium-item-account-mapping-class.ts +43 -0
- package/models/product-account-mapping-class.ts +67 -0
- package/models/product-account-mapping-detail-class.ts +56 -0
- package/models/product-version-account-mapping-detail-class.ts +56 -0
- package/models/product-version-with-account-mappings-class.ts +48 -0
- package/models/product-with-account-mappings-class.ts +55 -0
- package/models/put-premium-item-account-body-dto.ts +30 -0
- package/models/put-product-category-account-body-dto.ts +30 -0
- package/models/put-product-version-category-account-body-dto.ts +30 -0
- package/models/resolved-account-mapping-class.ts +37 -0
- package/models/update-financial-account-body-dto.ts +48 -0
- package/models/update-financial-account-response-class.ts +31 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -10,6 +10,7 @@ api/financial-transactions-api.ts
|
|
|
10
10
|
api/health-api.ts
|
|
11
11
|
api/number-ranges-api.ts
|
|
12
12
|
api/personal-accounts-api.ts
|
|
13
|
+
api/product-account-mappings-api.ts
|
|
13
14
|
base.ts
|
|
14
15
|
common.ts
|
|
15
16
|
configuration.ts
|
|
@@ -39,6 +40,7 @@ models/financial-account-class.ts
|
|
|
39
40
|
models/financial-transaction-class.ts
|
|
40
41
|
models/financial-transaction-data-dto.ts
|
|
41
42
|
models/get-accounting-categories-response-class.ts
|
|
43
|
+
models/get-activation-snapshot-response-class.ts
|
|
42
44
|
models/get-booking-entry-response-class.ts
|
|
43
45
|
models/get-financial-account-response-class.ts
|
|
44
46
|
models/get-financial-transaction-response-class.ts
|
|
@@ -52,8 +54,22 @@ models/list-financial-accounts-response-class.ts
|
|
|
52
54
|
models/list-financial-transactions-response-class.ts
|
|
53
55
|
models/list-number-range-response-class.ts
|
|
54
56
|
models/list-personal-accounts-response-class.ts
|
|
57
|
+
models/list-product-account-mappings-response-class.ts
|
|
58
|
+
models/list-products-with-account-mappings-response-class.ts
|
|
55
59
|
models/number-range-class.ts
|
|
56
60
|
models/personal-account-class.ts
|
|
61
|
+
models/premium-item-account-mapping-class.ts
|
|
62
|
+
models/product-account-mapping-class.ts
|
|
63
|
+
models/product-account-mapping-detail-class.ts
|
|
64
|
+
models/product-version-account-mapping-detail-class.ts
|
|
65
|
+
models/product-version-with-account-mappings-class.ts
|
|
66
|
+
models/product-with-account-mappings-class.ts
|
|
67
|
+
models/put-premium-item-account-body-dto.ts
|
|
68
|
+
models/put-product-category-account-body-dto.ts
|
|
69
|
+
models/put-product-version-category-account-body-dto.ts
|
|
70
|
+
models/resolved-account-mapping-class.ts
|
|
71
|
+
models/update-financial-account-body-dto.ts
|
|
72
|
+
models/update-financial-account-response-class.ts
|
|
57
73
|
models/validate-accounting-config-request-dto.ts
|
|
58
74
|
models/validate-accounting-config-response-class.ts
|
|
59
75
|
package.json
|
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
|
|
|
17
17
|
Navigate to the folder of your consuming project and run one of the following commands:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
npm install @emilgroup/accounting-sdk@1.34.1-beta.
|
|
20
|
+
npm install @emilgroup/accounting-sdk@1.34.1-beta.20 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/accounting-sdk@1.34.1-beta.
|
|
24
|
+
yarn add @emilgroup/accounting-sdk@1.34.1-beta.20
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `FinancialAccountsApi`.
|
|
@@ -29,6 +29,8 @@ import { ExportAccountingConfigResponseClass } from '../models';
|
|
|
29
29
|
// @ts-ignore
|
|
30
30
|
import { GetAccountingCategoriesResponseClass } from '../models';
|
|
31
31
|
// @ts-ignore
|
|
32
|
+
import { GetActivationSnapshotResponseClass } from '../models';
|
|
33
|
+
// @ts-ignore
|
|
32
34
|
import { ValidateAccountingConfigRequestDto } from '../models';
|
|
33
35
|
// @ts-ignore
|
|
34
36
|
import { ValidateAccountingConfigResponseClass } from '../models';
|
|
@@ -49,7 +51,7 @@ export const AccountingConfigsApiAxiosParamCreator = function (configuration?: C
|
|
|
49
51
|
createAndEnableSubledger: async (createAndEnableSubledgerRequestDto: CreateAndEnableSubledgerRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
50
52
|
// verify required parameter 'createAndEnableSubledgerRequestDto' is not null or undefined
|
|
51
53
|
assertParamExists('createAndEnableSubledger', 'createAndEnableSubledgerRequestDto', createAndEnableSubledgerRequestDto)
|
|
52
|
-
const localVarPath = `/accountingservice/v1/
|
|
54
|
+
const localVarPath = `/accountingservice/v1/subledger`;
|
|
53
55
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
54
56
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
55
57
|
let baseOptions;
|
|
@@ -96,7 +98,7 @@ export const AccountingConfigsApiAxiosParamCreator = function (configuration?: C
|
|
|
96
98
|
createAndEnableSubledgerFromFile: async (file: any, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
97
99
|
// verify required parameter 'file' is not null or undefined
|
|
98
100
|
assertParamExists('createAndEnableSubledgerFromFile', 'file', file)
|
|
99
|
-
const localVarPath = `/accountingservice/v1/
|
|
101
|
+
const localVarPath = `/accountingservice/v1/subledger/upload`;
|
|
100
102
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
101
103
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
102
104
|
let baseOptions;
|
|
@@ -145,7 +147,7 @@ export const AccountingConfigsApiAxiosParamCreator = function (configuration?: C
|
|
|
145
147
|
* @throws {RequiredError}
|
|
146
148
|
*/
|
|
147
149
|
exportAccountingConfig: async (authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
148
|
-
const localVarPath = `/accountingservice/v1/
|
|
150
|
+
const localVarPath = `/accountingservice/v1/subledger/config/export`;
|
|
149
151
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
150
152
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
151
153
|
let baseOptions;
|
|
@@ -186,7 +188,48 @@ export const AccountingConfigsApiAxiosParamCreator = function (configuration?: C
|
|
|
186
188
|
* @throws {RequiredError}
|
|
187
189
|
*/
|
|
188
190
|
getAccountingCategories: async (authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
189
|
-
const localVarPath = `/accountingservice/v1/
|
|
191
|
+
const localVarPath = `/accountingservice/v1/subledger/categories`;
|
|
192
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
193
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
194
|
+
let baseOptions;
|
|
195
|
+
let baseAccessToken;
|
|
196
|
+
if (configuration) {
|
|
197
|
+
baseOptions = configuration.baseOptions;
|
|
198
|
+
baseAccessToken = configuration.accessToken;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
202
|
+
const localVarHeaderParameter = {} as any;
|
|
203
|
+
const localVarQueryParameter = {} as any;
|
|
204
|
+
|
|
205
|
+
// authentication bearer required
|
|
206
|
+
// http bearer authentication required
|
|
207
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
208
|
+
|
|
209
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
210
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
216
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
217
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
218
|
+
|
|
219
|
+
return {
|
|
220
|
+
url: toPathString(localVarUrlObj),
|
|
221
|
+
options: localVarRequestOptions,
|
|
222
|
+
};
|
|
223
|
+
},
|
|
224
|
+
/**
|
|
225
|
+
* Returns the subledger configuration as it was when the subledger was enabled, along with who created it, when, and its enablement status. **Required Permissions** \"accounting-management.financial-accounts.view\"
|
|
226
|
+
* @summary Retrieve the get activation snapshot
|
|
227
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
228
|
+
* @param {*} [options] Override http request option.
|
|
229
|
+
* @throws {RequiredError}
|
|
230
|
+
*/
|
|
231
|
+
getActivationSnapshot: async (authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
232
|
+
const localVarPath = `/accountingservice/v1/subledger/activation-snapshot`;
|
|
190
233
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
191
234
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
192
235
|
let baseOptions;
|
|
@@ -227,7 +270,7 @@ export const AccountingConfigsApiAxiosParamCreator = function (configuration?: C
|
|
|
227
270
|
* @throws {RequiredError}
|
|
228
271
|
*/
|
|
229
272
|
resetSubledger: async (authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
230
|
-
const localVarPath = `/accountingservice/v1/
|
|
273
|
+
const localVarPath = `/accountingservice/v1/subledger/reset`;
|
|
231
274
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
232
275
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
233
276
|
let baseOptions;
|
|
@@ -271,7 +314,7 @@ export const AccountingConfigsApiAxiosParamCreator = function (configuration?: C
|
|
|
271
314
|
validateAccountingConfig: async (validateAccountingConfigRequestDto: ValidateAccountingConfigRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
272
315
|
// verify required parameter 'validateAccountingConfigRequestDto' is not null or undefined
|
|
273
316
|
assertParamExists('validateAccountingConfig', 'validateAccountingConfigRequestDto', validateAccountingConfigRequestDto)
|
|
274
|
-
const localVarPath = `/accountingservice/v1/
|
|
317
|
+
const localVarPath = `/accountingservice/v1/subledger/config/validate`;
|
|
275
318
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
276
319
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
277
320
|
let baseOptions;
|
|
@@ -318,7 +361,7 @@ export const AccountingConfigsApiAxiosParamCreator = function (configuration?: C
|
|
|
318
361
|
validateAccountingConfigFromFile: async (file: any, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
319
362
|
// verify required parameter 'file' is not null or undefined
|
|
320
363
|
assertParamExists('validateAccountingConfigFromFile', 'file', file)
|
|
321
|
-
const localVarPath = `/accountingservice/v1/
|
|
364
|
+
const localVarPath = `/accountingservice/v1/subledger/config/validate/upload`;
|
|
322
365
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
323
366
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
324
367
|
let baseOptions;
|
|
@@ -415,6 +458,17 @@ export const AccountingConfigsApiFp = function(configuration?: Configuration) {
|
|
|
415
458
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getAccountingCategories(authorization, options);
|
|
416
459
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
417
460
|
},
|
|
461
|
+
/**
|
|
462
|
+
* Returns the subledger configuration as it was when the subledger was enabled, along with who created it, when, and its enablement status. **Required Permissions** \"accounting-management.financial-accounts.view\"
|
|
463
|
+
* @summary Retrieve the get activation snapshot
|
|
464
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
465
|
+
* @param {*} [options] Override http request option.
|
|
466
|
+
* @throws {RequiredError}
|
|
467
|
+
*/
|
|
468
|
+
async getActivationSnapshot(authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetActivationSnapshotResponseClass>> {
|
|
469
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getActivationSnapshot(authorization, options);
|
|
470
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
471
|
+
},
|
|
418
472
|
/**
|
|
419
473
|
* This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
|
|
420
474
|
* @summary Delete the reset subledger
|
|
@@ -502,6 +556,16 @@ export const AccountingConfigsApiFactory = function (configuration?: Configurati
|
|
|
502
556
|
getAccountingCategories(authorization?: string, options?: any): AxiosPromise<GetAccountingCategoriesResponseClass> {
|
|
503
557
|
return localVarFp.getAccountingCategories(authorization, options).then((request) => request(axios, basePath));
|
|
504
558
|
},
|
|
559
|
+
/**
|
|
560
|
+
* Returns the subledger configuration as it was when the subledger was enabled, along with who created it, when, and its enablement status. **Required Permissions** \"accounting-management.financial-accounts.view\"
|
|
561
|
+
* @summary Retrieve the get activation snapshot
|
|
562
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
563
|
+
* @param {*} [options] Override http request option.
|
|
564
|
+
* @throws {RequiredError}
|
|
565
|
+
*/
|
|
566
|
+
getActivationSnapshot(authorization?: string, options?: any): AxiosPromise<GetActivationSnapshotResponseClass> {
|
|
567
|
+
return localVarFp.getActivationSnapshot(authorization, options).then((request) => request(axios, basePath));
|
|
568
|
+
},
|
|
505
569
|
/**
|
|
506
570
|
* This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
|
|
507
571
|
* @summary Delete the reset subledger
|
|
@@ -607,6 +671,20 @@ export interface AccountingConfigsApiGetAccountingCategoriesRequest {
|
|
|
607
671
|
readonly authorization?: string
|
|
608
672
|
}
|
|
609
673
|
|
|
674
|
+
/**
|
|
675
|
+
* Request parameters for getActivationSnapshot operation in AccountingConfigsApi.
|
|
676
|
+
* @export
|
|
677
|
+
* @interface AccountingConfigsApiGetActivationSnapshotRequest
|
|
678
|
+
*/
|
|
679
|
+
export interface AccountingConfigsApiGetActivationSnapshotRequest {
|
|
680
|
+
/**
|
|
681
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
682
|
+
* @type {string}
|
|
683
|
+
* @memberof AccountingConfigsApiGetActivationSnapshot
|
|
684
|
+
*/
|
|
685
|
+
readonly authorization?: string
|
|
686
|
+
}
|
|
687
|
+
|
|
610
688
|
/**
|
|
611
689
|
* Request parameters for resetSubledger operation in AccountingConfigsApi.
|
|
612
690
|
* @export
|
|
@@ -718,6 +796,18 @@ export class AccountingConfigsApi extends BaseAPI {
|
|
|
718
796
|
return AccountingConfigsApiFp(this.configuration).getAccountingCategories(requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
719
797
|
}
|
|
720
798
|
|
|
799
|
+
/**
|
|
800
|
+
* Returns the subledger configuration as it was when the subledger was enabled, along with who created it, when, and its enablement status. **Required Permissions** \"accounting-management.financial-accounts.view\"
|
|
801
|
+
* @summary Retrieve the get activation snapshot
|
|
802
|
+
* @param {AccountingConfigsApiGetActivationSnapshotRequest} requestParameters Request parameters.
|
|
803
|
+
* @param {*} [options] Override http request option.
|
|
804
|
+
* @throws {RequiredError}
|
|
805
|
+
* @memberof AccountingConfigsApi
|
|
806
|
+
*/
|
|
807
|
+
public getActivationSnapshot(requestParameters: AccountingConfigsApiGetActivationSnapshotRequest = {}, options?: AxiosRequestConfig) {
|
|
808
|
+
return AccountingConfigsApiFp(this.configuration).getActivationSnapshot(requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
809
|
+
}
|
|
810
|
+
|
|
721
811
|
/**
|
|
722
812
|
* This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
|
|
723
813
|
* @summary Delete the reset subledger
|
|
@@ -28,6 +28,10 @@ import { CreateFinancialAccountResponseClass } from '../models';
|
|
|
28
28
|
import { GetFinancialAccountResponseClass } from '../models';
|
|
29
29
|
// @ts-ignore
|
|
30
30
|
import { ListFinancialAccountsResponseClass } from '../models';
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
import { UpdateFinancialAccountBodyDto } from '../models';
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
import { UpdateFinancialAccountResponseClass } from '../models';
|
|
31
35
|
/**
|
|
32
36
|
* FinancialAccountsApi - axios parameter creator
|
|
33
37
|
* @export
|
|
@@ -249,6 +253,57 @@ export const FinancialAccountsApiAxiosParamCreator = function (configuration?: C
|
|
|
249
253
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
250
254
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
251
255
|
|
|
256
|
+
return {
|
|
257
|
+
url: toPathString(localVarUrlObj),
|
|
258
|
+
options: localVarRequestOptions,
|
|
259
|
+
};
|
|
260
|
+
},
|
|
261
|
+
/**
|
|
262
|
+
* Updates name and description (always editable), financialAccountNumber (only while the account is not locked), and isDefault (pool-category accounts only; cannot be unset). **Required Permissions** \"accounting-management.financial-accounts.update\"
|
|
263
|
+
* @summary Update the Financial Account
|
|
264
|
+
* @param {string} code Unique identifier for the object.
|
|
265
|
+
* @param {UpdateFinancialAccountBodyDto} updateFinancialAccountBodyDto
|
|
266
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
267
|
+
* @param {*} [options] Override http request option.
|
|
268
|
+
* @throws {RequiredError}
|
|
269
|
+
*/
|
|
270
|
+
updateFinancialAccount: async (code: string, updateFinancialAccountBodyDto: UpdateFinancialAccountBodyDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
271
|
+
// verify required parameter 'code' is not null or undefined
|
|
272
|
+
assertParamExists('updateFinancialAccount', 'code', code)
|
|
273
|
+
// verify required parameter 'updateFinancialAccountBodyDto' is not null or undefined
|
|
274
|
+
assertParamExists('updateFinancialAccount', 'updateFinancialAccountBodyDto', updateFinancialAccountBodyDto)
|
|
275
|
+
const localVarPath = `/accountingservice/v1/financial-accounts/{code}`
|
|
276
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
277
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
278
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
279
|
+
let baseOptions;
|
|
280
|
+
let baseAccessToken;
|
|
281
|
+
if (configuration) {
|
|
282
|
+
baseOptions = configuration.baseOptions;
|
|
283
|
+
baseAccessToken = configuration.accessToken;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
287
|
+
const localVarHeaderParameter = {} as any;
|
|
288
|
+
const localVarQueryParameter = {} as any;
|
|
289
|
+
|
|
290
|
+
// authentication bearer required
|
|
291
|
+
// http bearer authentication required
|
|
292
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
293
|
+
|
|
294
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
295
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
301
|
+
|
|
302
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
303
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
304
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
305
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateFinancialAccountBodyDto, localVarRequestOptions, configuration)
|
|
306
|
+
|
|
252
307
|
return {
|
|
253
308
|
url: toPathString(localVarUrlObj),
|
|
254
309
|
options: localVarRequestOptions,
|
|
@@ -319,6 +374,19 @@ export const FinancialAccountsApiFp = function(configuration?: Configuration) {
|
|
|
319
374
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
320
375
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
321
376
|
},
|
|
377
|
+
/**
|
|
378
|
+
* Updates name and description (always editable), financialAccountNumber (only while the account is not locked), and isDefault (pool-category accounts only; cannot be unset). **Required Permissions** \"accounting-management.financial-accounts.update\"
|
|
379
|
+
* @summary Update the Financial Account
|
|
380
|
+
* @param {string} code Unique identifier for the object.
|
|
381
|
+
* @param {UpdateFinancialAccountBodyDto} updateFinancialAccountBodyDto
|
|
382
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
383
|
+
* @param {*} [options] Override http request option.
|
|
384
|
+
* @throws {RequiredError}
|
|
385
|
+
*/
|
|
386
|
+
async updateFinancialAccount(code: string, updateFinancialAccountBodyDto: UpdateFinancialAccountBodyDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateFinancialAccountResponseClass>> {
|
|
387
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateFinancialAccount(code, updateFinancialAccountBodyDto, authorization, options);
|
|
388
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
389
|
+
},
|
|
322
390
|
}
|
|
323
391
|
};
|
|
324
392
|
|
|
@@ -380,6 +448,18 @@ export const FinancialAccountsApiFactory = function (configuration?: Configurati
|
|
|
380
448
|
listFinancialAccounts(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListFinancialAccountsResponseClass> {
|
|
381
449
|
return localVarFp.listFinancialAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
382
450
|
},
|
|
451
|
+
/**
|
|
452
|
+
* Updates name and description (always editable), financialAccountNumber (only while the account is not locked), and isDefault (pool-category accounts only; cannot be unset). **Required Permissions** \"accounting-management.financial-accounts.update\"
|
|
453
|
+
* @summary Update the Financial Account
|
|
454
|
+
* @param {string} code Unique identifier for the object.
|
|
455
|
+
* @param {UpdateFinancialAccountBodyDto} updateFinancialAccountBodyDto
|
|
456
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
457
|
+
* @param {*} [options] Override http request option.
|
|
458
|
+
* @throws {RequiredError}
|
|
459
|
+
*/
|
|
460
|
+
updateFinancialAccount(code: string, updateFinancialAccountBodyDto: UpdateFinancialAccountBodyDto, authorization?: string, options?: any): AxiosPromise<UpdateFinancialAccountResponseClass> {
|
|
461
|
+
return localVarFp.updateFinancialAccount(code, updateFinancialAccountBodyDto, authorization, options).then((request) => request(axios, basePath));
|
|
462
|
+
},
|
|
383
463
|
};
|
|
384
464
|
};
|
|
385
465
|
|
|
@@ -516,6 +596,34 @@ export interface FinancialAccountsApiListFinancialAccountsRequest {
|
|
|
516
596
|
readonly filters?: string
|
|
517
597
|
}
|
|
518
598
|
|
|
599
|
+
/**
|
|
600
|
+
* Request parameters for updateFinancialAccount operation in FinancialAccountsApi.
|
|
601
|
+
* @export
|
|
602
|
+
* @interface FinancialAccountsApiUpdateFinancialAccountRequest
|
|
603
|
+
*/
|
|
604
|
+
export interface FinancialAccountsApiUpdateFinancialAccountRequest {
|
|
605
|
+
/**
|
|
606
|
+
* Unique identifier for the object.
|
|
607
|
+
* @type {string}
|
|
608
|
+
* @memberof FinancialAccountsApiUpdateFinancialAccount
|
|
609
|
+
*/
|
|
610
|
+
readonly code: string
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
*
|
|
614
|
+
* @type {UpdateFinancialAccountBodyDto}
|
|
615
|
+
* @memberof FinancialAccountsApiUpdateFinancialAccount
|
|
616
|
+
*/
|
|
617
|
+
readonly updateFinancialAccountBodyDto: UpdateFinancialAccountBodyDto
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
621
|
+
* @type {string}
|
|
622
|
+
* @memberof FinancialAccountsApiUpdateFinancialAccount
|
|
623
|
+
*/
|
|
624
|
+
readonly authorization?: string
|
|
625
|
+
}
|
|
626
|
+
|
|
519
627
|
/**
|
|
520
628
|
* FinancialAccountsApi - object-oriented interface
|
|
521
629
|
* @export
|
|
@@ -570,4 +678,16 @@ export class FinancialAccountsApi extends BaseAPI {
|
|
|
570
678
|
public listFinancialAccounts(requestParameters: FinancialAccountsApiListFinancialAccountsRequest = {}, options?: AxiosRequestConfig) {
|
|
571
679
|
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));
|
|
572
680
|
}
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Updates name and description (always editable), financialAccountNumber (only while the account is not locked), and isDefault (pool-category accounts only; cannot be unset). **Required Permissions** \"accounting-management.financial-accounts.update\"
|
|
684
|
+
* @summary Update the Financial Account
|
|
685
|
+
* @param {FinancialAccountsApiUpdateFinancialAccountRequest} requestParameters Request parameters.
|
|
686
|
+
* @param {*} [options] Override http request option.
|
|
687
|
+
* @throws {RequiredError}
|
|
688
|
+
* @memberof FinancialAccountsApi
|
|
689
|
+
*/
|
|
690
|
+
public updateFinancialAccount(requestParameters: FinancialAccountsApiUpdateFinancialAccountRequest, options?: AxiosRequestConfig) {
|
|
691
|
+
return FinancialAccountsApiFp(this.configuration).updateFinancialAccount(requestParameters.code, requestParameters.updateFinancialAccountBodyDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
692
|
+
}
|
|
573
693
|
}
|