@emilgroup/billing-sdk 1.0.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 (97) hide show
  1. package/.openapi-generator/FILES +37 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +51 -0
  5. package/api/correction-invoices-api.ts +161 -0
  6. package/api/estimated-invoices-api.ts +264 -0
  7. package/api/initial-invoices-api.ts +161 -0
  8. package/api/invoices-api.ts +398 -0
  9. package/api/recurring-invoices-api.ts +161 -0
  10. package/api.ts +40 -0
  11. package/base.ts +247 -0
  12. package/common.ts +198 -0
  13. package/configuration.ts +101 -0
  14. package/dist/api/correction-invoices-api.d.ts +93 -0
  15. package/dist/api/correction-invoices-api.js +220 -0
  16. package/dist/api/estimated-invoices-api.d.ts +146 -0
  17. package/dist/api/estimated-invoices-api.js +309 -0
  18. package/dist/api/initial-invoices-api.d.ts +93 -0
  19. package/dist/api/initial-invoices-api.js +220 -0
  20. package/dist/api/invoices-api.d.ts +234 -0
  21. package/dist/api/invoices-api.js +369 -0
  22. package/dist/api/recurring-invoices-api.d.ts +93 -0
  23. package/dist/api/recurring-invoices-api.js +220 -0
  24. package/dist/api.d.ts +20 -0
  25. package/dist/api.js +40 -0
  26. package/dist/base.d.ts +72 -0
  27. package/dist/base.js +293 -0
  28. package/dist/common.d.ts +91 -0
  29. package/dist/common.js +276 -0
  30. package/dist/configuration.d.ts +83 -0
  31. package/dist/configuration.js +44 -0
  32. package/dist/index.d.ts +15 -0
  33. package/dist/index.js +35 -0
  34. package/dist/models/create-correction-invoices-response-class.d.ts +25 -0
  35. package/dist/models/create-correction-invoices-response-class.js +15 -0
  36. package/dist/models/create-custom-estimated-invoice-request-dto.d.ts +35 -0
  37. package/dist/models/create-custom-estimated-invoice-request-dto.js +20 -0
  38. package/dist/models/create-custom-estimated-invoice-response-class.d.ts +24 -0
  39. package/dist/models/create-custom-estimated-invoice-response-class.js +15 -0
  40. package/dist/models/create-estimated-invoice-request-dto.d.ts +31 -0
  41. package/dist/models/create-estimated-invoice-request-dto.js +15 -0
  42. package/dist/models/create-estimated-invoice-response-class.d.ts +31 -0
  43. package/dist/models/create-estimated-invoice-response-class.js +15 -0
  44. package/dist/models/create-invoice-request-dto.d.ts +75 -0
  45. package/dist/models/create-invoice-request-dto.js +24 -0
  46. package/dist/models/create-invoice-response-class.d.ts +25 -0
  47. package/dist/models/create-invoice-response-class.js +15 -0
  48. package/dist/models/index.d.ts +19 -0
  49. package/dist/models/index.js +35 -0
  50. package/dist/models/invoice-class.d.ts +121 -0
  51. package/dist/models/invoice-class.js +15 -0
  52. package/dist/models/invoice-item-class.d.ts +108 -0
  53. package/dist/models/invoice-item-class.js +15 -0
  54. package/dist/models/list-invoices-response-class.d.ts +31 -0
  55. package/dist/models/list-invoices-response-class.js +15 -0
  56. package/dist/models/list-policies-billing-dates-response-class.d.ts +30 -0
  57. package/dist/models/list-policies-billing-dates-response-class.js +15 -0
  58. package/dist/models/list-request-dto.d.ts +54 -0
  59. package/dist/models/list-request-dto.js +15 -0
  60. package/dist/models/policy-dto.d.ts +85 -0
  61. package/dist/models/policy-dto.js +15 -0
  62. package/dist/models/policy-object-dto.d.ts +42 -0
  63. package/dist/models/policy-object-dto.js +15 -0
  64. package/dist/models/policy-premium-dto.d.ts +43 -0
  65. package/dist/models/policy-premium-dto.js +15 -0
  66. package/dist/models/policy-premium-item-dto.d.ts +49 -0
  67. package/dist/models/policy-premium-item-dto.js +15 -0
  68. package/dist/models/policy-version-dto.d.ts +55 -0
  69. package/dist/models/policy-version-dto.js +15 -0
  70. package/dist/models/premium-formula-dto.d.ts +72 -0
  71. package/dist/models/premium-formula-dto.js +15 -0
  72. package/dist/models/timeslice-dto.d.ts +62 -0
  73. package/dist/models/timeslice-dto.js +15 -0
  74. package/git_push.sh +57 -0
  75. package/index.ts +19 -0
  76. package/models/create-correction-invoices-response-class.ts +31 -0
  77. package/models/create-custom-estimated-invoice-request-dto.ts +44 -0
  78. package/models/create-custom-estimated-invoice-response-class.ts +30 -0
  79. package/models/create-estimated-invoice-request-dto.ts +37 -0
  80. package/models/create-estimated-invoice-response-class.ts +37 -0
  81. package/models/create-invoice-request-dto.ts +84 -0
  82. package/models/create-invoice-response-class.ts +31 -0
  83. package/models/index.ts +19 -0
  84. package/models/invoice-class.ts +127 -0
  85. package/models/invoice-item-class.ts +114 -0
  86. package/models/list-invoices-response-class.ts +37 -0
  87. package/models/list-policies-billing-dates-response-class.ts +36 -0
  88. package/models/list-request-dto.ts +60 -0
  89. package/models/policy-dto.ts +91 -0
  90. package/models/policy-object-dto.ts +48 -0
  91. package/models/policy-premium-dto.ts +49 -0
  92. package/models/policy-premium-item-dto.ts +55 -0
  93. package/models/policy-version-dto.ts +61 -0
  94. package/models/premium-formula-dto.ts +78 -0
  95. package/models/timeslice-dto.ts +68 -0
  96. package/package.json +27 -0
  97. package/tsconfig.json +22 -0
@@ -0,0 +1,37 @@
1
+ .gitignore
2
+ .npmignore
3
+ .openapi-generator-ignore
4
+ README.md
5
+ api.ts
6
+ api/correction-invoices-api.ts
7
+ api/estimated-invoices-api.ts
8
+ api/initial-invoices-api.ts
9
+ api/invoices-api.ts
10
+ api/recurring-invoices-api.ts
11
+ base.ts
12
+ common.ts
13
+ configuration.ts
14
+ git_push.sh
15
+ index.ts
16
+ models/create-correction-invoices-response-class.ts
17
+ models/create-custom-estimated-invoice-request-dto.ts
18
+ models/create-custom-estimated-invoice-response-class.ts
19
+ models/create-estimated-invoice-request-dto.ts
20
+ models/create-estimated-invoice-response-class.ts
21
+ models/create-invoice-request-dto.ts
22
+ models/create-invoice-response-class.ts
23
+ models/index.ts
24
+ models/invoice-class.ts
25
+ models/invoice-item-class.ts
26
+ models/list-invoices-response-class.ts
27
+ models/list-policies-billing-dates-response-class.ts
28
+ models/list-request-dto.ts
29
+ models/policy-dto.ts
30
+ models/policy-object-dto.ts
31
+ models/policy-premium-dto.ts
32
+ models/policy-premium-item-dto.ts
33
+ models/policy-version-dto.ts
34
+ models/premium-formula-dto.ts
35
+ models/timeslice-dto.ts
36
+ package.json
37
+ tsconfig.json
@@ -0,0 +1 @@
1
+ 5.4.0
@@ -0,0 +1,23 @@
1
+ # OpenAPI Generator Ignore
2
+ # Generated by openapi-generator https://github.com/openapitools/openapi-generator
3
+
4
+ # Use this file to prevent files from being overwritten by the generator.
5
+ # The patterns follow closely to .gitignore or .dockerignore.
6
+
7
+ # As an example, the C# client generator defines ApiClient.cs.
8
+ # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9
+ #ApiClient.cs
10
+
11
+ # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12
+ #foo/*/qux
13
+ # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14
+
15
+ # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16
+ #foo/**/qux
17
+ # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18
+
19
+ # You can also negate patterns with an exclamation (!).
20
+ # For example, you can ignore all files in a docs folder with the file extension .md:
21
+ #docs/*.md
22
+ # Then explicitly reverse the ignore rule for a single file:
23
+ #!docs/README.md
package/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # Emil Billing SDK
2
+
3
+ This TypeScript/JavaScript client utilizes [axios](https://github.com/axios/axios). The generated module can be used with client-based applications (i.e. React).
4
+
5
+ Language level
6
+ * ES5 - you must have a Promises/A+ library installed
7
+ * ES6
8
+
9
+ Module system
10
+ * CommonJS
11
+ * ES6 module system
12
+
13
+ Although this package can be used in both TypeScript and JavaScript, it is intended to be used with TypeScript. The definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html)). For more information, you can go to [Emil Api documentation](https://emil.stoplight.io/docs/emil-api/).
14
+
15
+ ## Consuming
16
+
17
+ Navigate to the folder of your consuming project and run one of the following commands:
18
+
19
+ ```
20
+ npm install @emilgroup/billing-sdk@1.0.0 --save
21
+ ```
22
+ or
23
+ ```
24
+ yarn add @emilgroup/billing-sdk@1.0.0
25
+ ```
26
+
27
+ And then you can import `InvoicesApi`.
28
+
29
+ ```ts
30
+ import { InvoicesApi } from '@emilgroup/billing-sdk'
31
+
32
+ const invoicesApi = new InvoicesApi();
33
+ ```
34
+
35
+ To use authentication protected endpoints, you have to first authorize. To do so, use the `authorize` function in `InvoicesApi`:
36
+
37
+ ```ts
38
+ async function listInvoices(): Promise<Void> {
39
+ try {
40
+ const invoicesApi = new InvoicesApi();
41
+
42
+ await invoicesApi.authorize('username', 'password');
43
+
44
+ const { data: { items } } = await invoicesApi.listInvoices();
45
+
46
+ console.log(items);
47
+ } catch(error) {
48
+ // process error
49
+ }
50
+ }
51
+ ```
@@ -0,0 +1,161 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL BillingService
5
+ * The EMIL BillingService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
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 { CreateCorrectionInvoicesResponseClass } from '../models';
25
+ // @ts-ignore
26
+ import { CreateInvoiceRequestDto } from '../models';
27
+ /**
28
+ * CorrectionInvoicesApi - axios parameter creator
29
+ * @export
30
+ */
31
+ export const CorrectionInvoicesApiAxiosParamCreator = function (configuration?: Configuration) {
32
+ return {
33
+ /**
34
+ *
35
+ * @param {CreateInvoiceRequestDto} createInvoiceRequestDto
36
+ * @param {string} [authorization] Bearer Token
37
+ * @param {*} [options] Override http request option.
38
+ * @throws {RequiredError}
39
+ */
40
+ createCorrectionInvoice: async (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
41
+ // verify required parameter 'createInvoiceRequestDto' is not null or undefined
42
+ assertParamExists('createCorrectionInvoice', 'createInvoiceRequestDto', createInvoiceRequestDto)
43
+ const localVarPath = `/billingservice/v1/correction-invoices`;
44
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
45
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
46
+ let baseOptions;
47
+ let baseAccessToken;
48
+ if (configuration) {
49
+ baseOptions = configuration.baseOptions;
50
+ baseAccessToken = configuration.accessToken;
51
+ }
52
+
53
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
54
+ const localVarHeaderParameter = {} as any;
55
+ const localVarQueryParameter = {} as any;
56
+
57
+ // authentication bearer required
58
+ // http bearer authentication required
59
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
60
+
61
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
62
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
63
+ }
64
+
65
+
66
+
67
+ localVarHeaderParameter['Content-Type'] = 'application/json';
68
+
69
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
70
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
71
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
72
+ localVarRequestOptions.data = serializeDataIfNeeded(createInvoiceRequestDto, localVarRequestOptions, configuration)
73
+
74
+ return {
75
+ url: toPathString(localVarUrlObj),
76
+ options: localVarRequestOptions,
77
+ };
78
+ },
79
+ }
80
+ };
81
+
82
+ /**
83
+ * CorrectionInvoicesApi - functional programming interface
84
+ * @export
85
+ */
86
+ export const CorrectionInvoicesApiFp = function(configuration?: Configuration) {
87
+ const localVarAxiosParamCreator = CorrectionInvoicesApiAxiosParamCreator(configuration)
88
+ return {
89
+ /**
90
+ *
91
+ * @param {CreateInvoiceRequestDto} createInvoiceRequestDto
92
+ * @param {string} [authorization] Bearer Token
93
+ * @param {*} [options] Override http request option.
94
+ * @throws {RequiredError}
95
+ */
96
+ async createCorrectionInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCorrectionInvoicesResponseClass>> {
97
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createCorrectionInvoice(createInvoiceRequestDto, authorization, options);
98
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
99
+ },
100
+ }
101
+ };
102
+
103
+ /**
104
+ * CorrectionInvoicesApi - factory interface
105
+ * @export
106
+ */
107
+ export const CorrectionInvoicesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
108
+ const localVarFp = CorrectionInvoicesApiFp(configuration)
109
+ return {
110
+ /**
111
+ *
112
+ * @param {CreateInvoiceRequestDto} createInvoiceRequestDto
113
+ * @param {string} [authorization] Bearer Token
114
+ * @param {*} [options] Override http request option.
115
+ * @throws {RequiredError}
116
+ */
117
+ createCorrectionInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, options?: any): AxiosPromise<CreateCorrectionInvoicesResponseClass> {
118
+ return localVarFp.createCorrectionInvoice(createInvoiceRequestDto, authorization, options).then((request) => request(axios, basePath));
119
+ },
120
+ };
121
+ };
122
+
123
+ /**
124
+ * Request parameters for createCorrectionInvoice operation in CorrectionInvoicesApi.
125
+ * @export
126
+ * @interface CorrectionInvoicesApiCreateCorrectionInvoiceRequest
127
+ */
128
+ export interface CorrectionInvoicesApiCreateCorrectionInvoiceRequest {
129
+ /**
130
+ *
131
+ * @type {CreateInvoiceRequestDto}
132
+ * @memberof CorrectionInvoicesApiCreateCorrectionInvoice
133
+ */
134
+ readonly createInvoiceRequestDto: CreateInvoiceRequestDto
135
+
136
+ /**
137
+ * Bearer Token
138
+ * @type {string}
139
+ * @memberof CorrectionInvoicesApiCreateCorrectionInvoice
140
+ */
141
+ readonly authorization?: string
142
+ }
143
+
144
+ /**
145
+ * CorrectionInvoicesApi - object-oriented interface
146
+ * @export
147
+ * @class CorrectionInvoicesApi
148
+ * @extends {BaseAPI}
149
+ */
150
+ export class CorrectionInvoicesApi extends BaseAPI {
151
+ /**
152
+ *
153
+ * @param {CorrectionInvoicesApiCreateCorrectionInvoiceRequest} requestParameters Request parameters.
154
+ * @param {*} [options] Override http request option.
155
+ * @throws {RequiredError}
156
+ * @memberof CorrectionInvoicesApi
157
+ */
158
+ public createCorrectionInvoice(requestParameters: CorrectionInvoicesApiCreateCorrectionInvoiceRequest, options?: AxiosRequestConfig) {
159
+ return CorrectionInvoicesApiFp(this.configuration).createCorrectionInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
160
+ }
161
+ }
@@ -0,0 +1,264 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL BillingService
5
+ * The EMIL BillingService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
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 { CreateCustomEstimatedInvoiceRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreateCustomEstimatedInvoiceResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { CreateEstimatedInvoiceRequestDto } from '../models';
29
+ // @ts-ignore
30
+ import { CreateEstimatedInvoiceResponseClass } from '../models';
31
+ /**
32
+ * EstimatedInvoicesApi - axios parameter creator
33
+ * @export
34
+ */
35
+ export const EstimatedInvoicesApiAxiosParamCreator = function (configuration?: Configuration) {
36
+ return {
37
+ /**
38
+ *
39
+ * @param {CreateCustomEstimatedInvoiceRequestDto} createCustomEstimatedInvoiceRequestDto
40
+ * @param {string} [authorization] Bearer Token
41
+ * @param {*} [options] Override http request option.
42
+ * @throws {RequiredError}
43
+ */
44
+ createCustomEstimatedInvoice: async (createCustomEstimatedInvoiceRequestDto: CreateCustomEstimatedInvoiceRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
45
+ // verify required parameter 'createCustomEstimatedInvoiceRequestDto' is not null or undefined
46
+ assertParamExists('createCustomEstimatedInvoice', 'createCustomEstimatedInvoiceRequestDto', createCustomEstimatedInvoiceRequestDto)
47
+ const localVarPath = `/billingservice/v1/estimated-invoices/custom`;
48
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
49
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
50
+ let baseOptions;
51
+ let baseAccessToken;
52
+ if (configuration) {
53
+ baseOptions = configuration.baseOptions;
54
+ baseAccessToken = configuration.accessToken;
55
+ }
56
+
57
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
58
+ const localVarHeaderParameter = {} as any;
59
+ const localVarQueryParameter = {} as any;
60
+
61
+ // authentication bearer required
62
+ // http bearer authentication required
63
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
64
+
65
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
66
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
67
+ }
68
+
69
+
70
+
71
+ localVarHeaderParameter['Content-Type'] = 'application/json';
72
+
73
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
74
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
75
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
76
+ localVarRequestOptions.data = serializeDataIfNeeded(createCustomEstimatedInvoiceRequestDto, localVarRequestOptions, configuration)
77
+
78
+ return {
79
+ url: toPathString(localVarUrlObj),
80
+ options: localVarRequestOptions,
81
+ };
82
+ },
83
+ /**
84
+ *
85
+ * @param {CreateEstimatedInvoiceRequestDto} createEstimatedInvoiceRequestDto
86
+ * @param {string} [authorization] Bearer Token
87
+ * @param {*} [options] Override http request option.
88
+ * @throws {RequiredError}
89
+ */
90
+ createEstimatedInvoice: async (createEstimatedInvoiceRequestDto: CreateEstimatedInvoiceRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
91
+ // verify required parameter 'createEstimatedInvoiceRequestDto' is not null or undefined
92
+ assertParamExists('createEstimatedInvoice', 'createEstimatedInvoiceRequestDto', createEstimatedInvoiceRequestDto)
93
+ const localVarPath = `/billingservice/v1/estimated-invoices`;
94
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
95
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
96
+ let baseOptions;
97
+ let baseAccessToken;
98
+ if (configuration) {
99
+ baseOptions = configuration.baseOptions;
100
+ baseAccessToken = configuration.accessToken;
101
+ }
102
+
103
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
104
+ const localVarHeaderParameter = {} as any;
105
+ const localVarQueryParameter = {} as any;
106
+
107
+ // authentication bearer required
108
+ // http bearer authentication required
109
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
110
+
111
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
112
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
113
+ }
114
+
115
+
116
+
117
+ localVarHeaderParameter['Content-Type'] = 'application/json';
118
+
119
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
120
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
121
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
122
+ localVarRequestOptions.data = serializeDataIfNeeded(createEstimatedInvoiceRequestDto, localVarRequestOptions, configuration)
123
+
124
+ return {
125
+ url: toPathString(localVarUrlObj),
126
+ options: localVarRequestOptions,
127
+ };
128
+ },
129
+ }
130
+ };
131
+
132
+ /**
133
+ * EstimatedInvoicesApi - functional programming interface
134
+ * @export
135
+ */
136
+ export const EstimatedInvoicesApiFp = function(configuration?: Configuration) {
137
+ const localVarAxiosParamCreator = EstimatedInvoicesApiAxiosParamCreator(configuration)
138
+ return {
139
+ /**
140
+ *
141
+ * @param {CreateCustomEstimatedInvoiceRequestDto} createCustomEstimatedInvoiceRequestDto
142
+ * @param {string} [authorization] Bearer Token
143
+ * @param {*} [options] Override http request option.
144
+ * @throws {RequiredError}
145
+ */
146
+ async createCustomEstimatedInvoice(createCustomEstimatedInvoiceRequestDto: CreateCustomEstimatedInvoiceRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCustomEstimatedInvoiceResponseClass>> {
147
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createCustomEstimatedInvoice(createCustomEstimatedInvoiceRequestDto, authorization, options);
148
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
149
+ },
150
+ /**
151
+ *
152
+ * @param {CreateEstimatedInvoiceRequestDto} createEstimatedInvoiceRequestDto
153
+ * @param {string} [authorization] Bearer Token
154
+ * @param {*} [options] Override http request option.
155
+ * @throws {RequiredError}
156
+ */
157
+ async createEstimatedInvoice(createEstimatedInvoiceRequestDto: CreateEstimatedInvoiceRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateEstimatedInvoiceResponseClass>> {
158
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createEstimatedInvoice(createEstimatedInvoiceRequestDto, authorization, options);
159
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
160
+ },
161
+ }
162
+ };
163
+
164
+ /**
165
+ * EstimatedInvoicesApi - factory interface
166
+ * @export
167
+ */
168
+ export const EstimatedInvoicesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
169
+ const localVarFp = EstimatedInvoicesApiFp(configuration)
170
+ return {
171
+ /**
172
+ *
173
+ * @param {CreateCustomEstimatedInvoiceRequestDto} createCustomEstimatedInvoiceRequestDto
174
+ * @param {string} [authorization] Bearer Token
175
+ * @param {*} [options] Override http request option.
176
+ * @throws {RequiredError}
177
+ */
178
+ createCustomEstimatedInvoice(createCustomEstimatedInvoiceRequestDto: CreateCustomEstimatedInvoiceRequestDto, authorization?: string, options?: any): AxiosPromise<CreateCustomEstimatedInvoiceResponseClass> {
179
+ return localVarFp.createCustomEstimatedInvoice(createCustomEstimatedInvoiceRequestDto, authorization, options).then((request) => request(axios, basePath));
180
+ },
181
+ /**
182
+ *
183
+ * @param {CreateEstimatedInvoiceRequestDto} createEstimatedInvoiceRequestDto
184
+ * @param {string} [authorization] Bearer Token
185
+ * @param {*} [options] Override http request option.
186
+ * @throws {RequiredError}
187
+ */
188
+ createEstimatedInvoice(createEstimatedInvoiceRequestDto: CreateEstimatedInvoiceRequestDto, authorization?: string, options?: any): AxiosPromise<CreateEstimatedInvoiceResponseClass> {
189
+ return localVarFp.createEstimatedInvoice(createEstimatedInvoiceRequestDto, authorization, options).then((request) => request(axios, basePath));
190
+ },
191
+ };
192
+ };
193
+
194
+ /**
195
+ * Request parameters for createCustomEstimatedInvoice operation in EstimatedInvoicesApi.
196
+ * @export
197
+ * @interface EstimatedInvoicesApiCreateCustomEstimatedInvoiceRequest
198
+ */
199
+ export interface EstimatedInvoicesApiCreateCustomEstimatedInvoiceRequest {
200
+ /**
201
+ *
202
+ * @type {CreateCustomEstimatedInvoiceRequestDto}
203
+ * @memberof EstimatedInvoicesApiCreateCustomEstimatedInvoice
204
+ */
205
+ readonly createCustomEstimatedInvoiceRequestDto: CreateCustomEstimatedInvoiceRequestDto
206
+
207
+ /**
208
+ * Bearer Token
209
+ * @type {string}
210
+ * @memberof EstimatedInvoicesApiCreateCustomEstimatedInvoice
211
+ */
212
+ readonly authorization?: string
213
+ }
214
+
215
+ /**
216
+ * Request parameters for createEstimatedInvoice operation in EstimatedInvoicesApi.
217
+ * @export
218
+ * @interface EstimatedInvoicesApiCreateEstimatedInvoiceRequest
219
+ */
220
+ export interface EstimatedInvoicesApiCreateEstimatedInvoiceRequest {
221
+ /**
222
+ *
223
+ * @type {CreateEstimatedInvoiceRequestDto}
224
+ * @memberof EstimatedInvoicesApiCreateEstimatedInvoice
225
+ */
226
+ readonly createEstimatedInvoiceRequestDto: CreateEstimatedInvoiceRequestDto
227
+
228
+ /**
229
+ * Bearer Token
230
+ * @type {string}
231
+ * @memberof EstimatedInvoicesApiCreateEstimatedInvoice
232
+ */
233
+ readonly authorization?: string
234
+ }
235
+
236
+ /**
237
+ * EstimatedInvoicesApi - object-oriented interface
238
+ * @export
239
+ * @class EstimatedInvoicesApi
240
+ * @extends {BaseAPI}
241
+ */
242
+ export class EstimatedInvoicesApi extends BaseAPI {
243
+ /**
244
+ *
245
+ * @param {EstimatedInvoicesApiCreateCustomEstimatedInvoiceRequest} requestParameters Request parameters.
246
+ * @param {*} [options] Override http request option.
247
+ * @throws {RequiredError}
248
+ * @memberof EstimatedInvoicesApi
249
+ */
250
+ public createCustomEstimatedInvoice(requestParameters: EstimatedInvoicesApiCreateCustomEstimatedInvoiceRequest, options?: AxiosRequestConfig) {
251
+ return EstimatedInvoicesApiFp(this.configuration).createCustomEstimatedInvoice(requestParameters.createCustomEstimatedInvoiceRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
252
+ }
253
+
254
+ /**
255
+ *
256
+ * @param {EstimatedInvoicesApiCreateEstimatedInvoiceRequest} requestParameters Request parameters.
257
+ * @param {*} [options] Override http request option.
258
+ * @throws {RequiredError}
259
+ * @memberof EstimatedInvoicesApi
260
+ */
261
+ public createEstimatedInvoice(requestParameters: EstimatedInvoicesApiCreateEstimatedInvoiceRequest, options?: AxiosRequestConfig) {
262
+ return EstimatedInvoicesApiFp(this.configuration).createEstimatedInvoice(requestParameters.createEstimatedInvoiceRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
263
+ }
264
+ }