@emilgroup/billing-sdk-node 1.11.0 → 1.17.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.
@@ -20,6 +20,7 @@ models/create-custom-estimated-invoice-response-class.ts
20
20
  models/create-estimated-invoice-request-dto.ts
21
21
  models/create-estimated-invoice-response-class.ts
22
22
  models/create-invoice-payment-request-dto.ts
23
+ models/create-invoice-payment-response-class.ts
23
24
  models/create-invoice-request-dto.ts
24
25
  models/create-invoice-response-class.ts
25
26
  models/create-invoice-status-request-dto.ts
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/billing-sdk-node@1.11.0 --save
20
+ npm install @emilgroup/billing-sdk-node@1.17.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/billing-sdk-node@1.11.0
24
+ yarn add @emilgroup/billing-sdk-node@1.17.0
25
25
  ```
26
26
 
27
27
  And then you can import `InvoicesApi`.
@@ -21,6 +21,10 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
21
21
  // @ts-ignore
22
22
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
23
  // @ts-ignore
24
+ import { CreateInvoicePaymentRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreateInvoicePaymentResponseClass } from '../models';
27
+ // @ts-ignore
24
28
  import { GetInvoiceResponseClass } from '../models';
25
29
  // @ts-ignore
26
30
  import { ListInvoicesResponseClass } from '../models';
@@ -36,6 +40,62 @@ const FormData = require('form-data');
36
40
  */
37
41
  export const InvoicesApiAxiosParamCreator = function (configuration?: Configuration) {
38
42
  return {
43
+ /**
44
+ * This will create an invoice payment.
45
+ * @summary Create the invoice payment
46
+ * @param {number} id
47
+ * @param {CreateInvoicePaymentRequestDto} createInvoicePaymentRequestDto
48
+ * @param {string} [authorization] Bearer Token
49
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
50
+ * @param {*} [options] Override http request option.
51
+ * @throws {RequiredError}
52
+ */
53
+ createInvoicePayment: async (id: number, createInvoicePaymentRequestDto: CreateInvoicePaymentRequestDto, authorization?: string, idempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
54
+ // verify required parameter 'id' is not null or undefined
55
+ assertParamExists('createInvoicePayment', 'id', id)
56
+ // verify required parameter 'createInvoicePaymentRequestDto' is not null or undefined
57
+ assertParamExists('createInvoicePayment', 'createInvoicePaymentRequestDto', createInvoicePaymentRequestDto)
58
+ const localVarPath = `/billingservice/v1/invoices/{id}/payments`
59
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
60
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
61
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
62
+ let baseOptions;
63
+ let baseAccessToken;
64
+ if (configuration) {
65
+ baseOptions = configuration.baseOptions;
66
+ baseAccessToken = configuration.accessToken;
67
+ }
68
+
69
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
70
+ const localVarHeaderParameter = {} as any;
71
+ const localVarQueryParameter = {} as any;
72
+
73
+ // authentication bearer required
74
+ // http bearer authentication required
75
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
76
+
77
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
78
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
79
+ }
80
+
81
+ if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
82
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
83
+ }
84
+
85
+
86
+
87
+ localVarHeaderParameter['Content-Type'] = 'application/json';
88
+
89
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
90
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
91
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
92
+ localVarRequestOptions.data = serializeDataIfNeeded(createInvoicePaymentRequestDto, localVarRequestOptions, configuration)
93
+
94
+ return {
95
+ url: toPathString(localVarUrlObj),
96
+ options: localVarRequestOptions,
97
+ };
98
+ },
39
99
  /**
40
100
  * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
41
101
  * @summary List invoices
@@ -240,6 +300,20 @@ export const InvoicesApiAxiosParamCreator = function (configuration?: Configurat
240
300
  export const InvoicesApiFp = function(configuration?: Configuration) {
241
301
  const localVarAxiosParamCreator = InvoicesApiAxiosParamCreator(configuration)
242
302
  return {
303
+ /**
304
+ * This will create an invoice payment.
305
+ * @summary Create the invoice payment
306
+ * @param {number} id
307
+ * @param {CreateInvoicePaymentRequestDto} createInvoicePaymentRequestDto
308
+ * @param {string} [authorization] Bearer Token
309
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
310
+ * @param {*} [options] Override http request option.
311
+ * @throws {RequiredError}
312
+ */
313
+ async createInvoicePayment(id: number, createInvoicePaymentRequestDto: CreateInvoicePaymentRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoicePaymentResponseClass>> {
314
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createInvoicePayment(id, createInvoicePaymentRequestDto, authorization, idempotencyKey, options);
315
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
316
+ },
243
317
  /**
244
318
  * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
245
319
  * @summary List invoices
@@ -297,6 +371,19 @@ export const InvoicesApiFp = function(configuration?: Configuration) {
297
371
  export const InvoicesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
298
372
  const localVarFp = InvoicesApiFp(configuration)
299
373
  return {
374
+ /**
375
+ * This will create an invoice payment.
376
+ * @summary Create the invoice payment
377
+ * @param {number} id
378
+ * @param {CreateInvoicePaymentRequestDto} createInvoicePaymentRequestDto
379
+ * @param {string} [authorization] Bearer Token
380
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
381
+ * @param {*} [options] Override http request option.
382
+ * @throws {RequiredError}
383
+ */
384
+ createInvoicePayment(id: number, createInvoicePaymentRequestDto: CreateInvoicePaymentRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateInvoicePaymentResponseClass> {
385
+ return localVarFp.createInvoicePayment(id, createInvoicePaymentRequestDto, authorization, idempotencyKey, options).then((request) => request(axios, basePath));
386
+ },
300
387
  /**
301
388
  * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
302
389
  * @summary List invoices
@@ -344,6 +431,41 @@ export const InvoicesApiFactory = function (configuration?: Configuration, baseP
344
431
  };
345
432
  };
346
433
 
434
+ /**
435
+ * Request parameters for createInvoicePayment operation in InvoicesApi.
436
+ * @export
437
+ * @interface InvoicesApiCreateInvoicePaymentRequest
438
+ */
439
+ export interface InvoicesApiCreateInvoicePaymentRequest {
440
+ /**
441
+ *
442
+ * @type {number}
443
+ * @memberof InvoicesApiCreateInvoicePayment
444
+ */
445
+ readonly id: number
446
+
447
+ /**
448
+ *
449
+ * @type {CreateInvoicePaymentRequestDto}
450
+ * @memberof InvoicesApiCreateInvoicePayment
451
+ */
452
+ readonly createInvoicePaymentRequestDto: CreateInvoicePaymentRequestDto
453
+
454
+ /**
455
+ * Bearer Token
456
+ * @type {string}
457
+ * @memberof InvoicesApiCreateInvoicePayment
458
+ */
459
+ readonly authorization?: string
460
+
461
+ /**
462
+ * Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
463
+ * @type {string}
464
+ * @memberof InvoicesApiCreateInvoicePayment
465
+ */
466
+ readonly idempotencyKey?: string
467
+ }
468
+
347
469
  /**
348
470
  * Request parameters for getInvoice operation in InvoicesApi.
349
471
  * @export
@@ -491,6 +613,18 @@ export interface InvoicesApiListPoliciesBillingDatesRequest {
491
613
  * @extends {BaseAPI}
492
614
  */
493
615
  export class InvoicesApi extends BaseAPI {
616
+ /**
617
+ * This will create an invoice payment.
618
+ * @summary Create the invoice payment
619
+ * @param {InvoicesApiCreateInvoicePaymentRequest} requestParameters Request parameters.
620
+ * @param {*} [options] Override http request option.
621
+ * @throws {RequiredError}
622
+ * @memberof InvoicesApi
623
+ */
624
+ public createInvoicePayment(requestParameters: InvoicesApiCreateInvoicePaymentRequest, options?: AxiosRequestConfig) {
625
+ return InvoicesApiFp(this.configuration).createInvoicePayment(requestParameters.id, requestParameters.createInvoicePaymentRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
626
+ }
627
+
494
628
  /**
495
629
  * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
496
630
  * @summary List invoices
@@ -12,6 +12,8 @@
12
12
  import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
13
  import { Configuration } from '../configuration';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
+ import { CreateInvoicePaymentRequestDto } from '../models';
16
+ import { CreateInvoicePaymentResponseClass } from '../models';
15
17
  import { GetInvoiceResponseClass } from '../models';
16
18
  import { ListInvoicesResponseClass } from '../models';
17
19
  import { ListPoliciesBillingDatesResponseClass } from '../models';
@@ -20,6 +22,17 @@ import { ListPoliciesBillingDatesResponseClass } from '../models';
20
22
  * @export
21
23
  */
22
24
  export declare const InvoicesApiAxiosParamCreator: (configuration?: Configuration) => {
25
+ /**
26
+ * This will create an invoice payment.
27
+ * @summary Create the invoice payment
28
+ * @param {number} id
29
+ * @param {CreateInvoicePaymentRequestDto} createInvoicePaymentRequestDto
30
+ * @param {string} [authorization] Bearer Token
31
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
32
+ * @param {*} [options] Override http request option.
33
+ * @throws {RequiredError}
34
+ */
35
+ createInvoicePayment: (id: number, createInvoicePaymentRequestDto: CreateInvoicePaymentRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
23
36
  /**
24
37
  * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
25
38
  * @summary List invoices
@@ -64,6 +77,17 @@ export declare const InvoicesApiAxiosParamCreator: (configuration?: Configuratio
64
77
  * @export
65
78
  */
66
79
  export declare const InvoicesApiFp: (configuration?: Configuration) => {
80
+ /**
81
+ * This will create an invoice payment.
82
+ * @summary Create the invoice payment
83
+ * @param {number} id
84
+ * @param {CreateInvoicePaymentRequestDto} createInvoicePaymentRequestDto
85
+ * @param {string} [authorization] Bearer Token
86
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
87
+ * @param {*} [options] Override http request option.
88
+ * @throws {RequiredError}
89
+ */
90
+ createInvoicePayment(id: number, createInvoicePaymentRequestDto: CreateInvoicePaymentRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoicePaymentResponseClass>>;
67
91
  /**
68
92
  * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
69
93
  * @summary List invoices
@@ -108,6 +132,17 @@ export declare const InvoicesApiFp: (configuration?: Configuration) => {
108
132
  * @export
109
133
  */
110
134
  export declare const InvoicesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
135
+ /**
136
+ * This will create an invoice payment.
137
+ * @summary Create the invoice payment
138
+ * @param {number} id
139
+ * @param {CreateInvoicePaymentRequestDto} createInvoicePaymentRequestDto
140
+ * @param {string} [authorization] Bearer Token
141
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
142
+ * @param {*} [options] Override http request option.
143
+ * @throws {RequiredError}
144
+ */
145
+ createInvoicePayment(id: number, createInvoicePaymentRequestDto: CreateInvoicePaymentRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateInvoicePaymentResponseClass>;
111
146
  /**
112
147
  * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
113
148
  * @summary List invoices
@@ -147,6 +182,37 @@ export declare const InvoicesApiFactory: (configuration?: Configuration, basePat
147
182
  */
148
183
  listPoliciesBillingDates(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: any): AxiosPromise<ListPoliciesBillingDatesResponseClass>;
149
184
  };
185
+ /**
186
+ * Request parameters for createInvoicePayment operation in InvoicesApi.
187
+ * @export
188
+ * @interface InvoicesApiCreateInvoicePaymentRequest
189
+ */
190
+ export interface InvoicesApiCreateInvoicePaymentRequest {
191
+ /**
192
+ *
193
+ * @type {number}
194
+ * @memberof InvoicesApiCreateInvoicePayment
195
+ */
196
+ readonly id: number;
197
+ /**
198
+ *
199
+ * @type {CreateInvoicePaymentRequestDto}
200
+ * @memberof InvoicesApiCreateInvoicePayment
201
+ */
202
+ readonly createInvoicePaymentRequestDto: CreateInvoicePaymentRequestDto;
203
+ /**
204
+ * Bearer Token
205
+ * @type {string}
206
+ * @memberof InvoicesApiCreateInvoicePayment
207
+ */
208
+ readonly authorization?: string;
209
+ /**
210
+ * Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
211
+ * @type {string}
212
+ * @memberof InvoicesApiCreateInvoicePayment
213
+ */
214
+ readonly idempotencyKey?: string;
215
+ }
150
216
  /**
151
217
  * Request parameters for getInvoice operation in InvoicesApi.
152
218
  * @export
@@ -277,6 +343,15 @@ export interface InvoicesApiListPoliciesBillingDatesRequest {
277
343
  * @extends {BaseAPI}
278
344
  */
279
345
  export declare class InvoicesApi extends BaseAPI {
346
+ /**
347
+ * This will create an invoice payment.
348
+ * @summary Create the invoice payment
349
+ * @param {InvoicesApiCreateInvoicePaymentRequest} requestParameters Request parameters.
350
+ * @param {*} [options] Override http request option.
351
+ * @throws {RequiredError}
352
+ * @memberof InvoicesApi
353
+ */
354
+ createInvoicePayment(requestParameters: InvoicesApiCreateInvoicePaymentRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoicePaymentResponseClass, any>>;
280
355
  /**
281
356
  * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
282
357
  * @summary List invoices
@@ -96,6 +96,63 @@ var FormData = require('form-data');
96
96
  var InvoicesApiAxiosParamCreator = function (configuration) {
97
97
  var _this = this;
98
98
  return {
99
+ /**
100
+ * This will create an invoice payment.
101
+ * @summary Create the invoice payment
102
+ * @param {number} id
103
+ * @param {CreateInvoicePaymentRequestDto} createInvoicePaymentRequestDto
104
+ * @param {string} [authorization] Bearer Token
105
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
106
+ * @param {*} [options] Override http request option.
107
+ * @throws {RequiredError}
108
+ */
109
+ createInvoicePayment: function (id, createInvoicePaymentRequestDto, authorization, idempotencyKey, options) {
110
+ if (options === void 0) { options = {}; }
111
+ return __awaiter(_this, void 0, void 0, function () {
112
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
113
+ return __generator(this, function (_a) {
114
+ switch (_a.label) {
115
+ case 0:
116
+ // verify required parameter 'id' is not null or undefined
117
+ (0, common_1.assertParamExists)('createInvoicePayment', 'id', id);
118
+ // verify required parameter 'createInvoicePaymentRequestDto' is not null or undefined
119
+ (0, common_1.assertParamExists)('createInvoicePayment', 'createInvoicePaymentRequestDto', createInvoicePaymentRequestDto);
120
+ localVarPath = "/billingservice/v1/invoices/{id}/payments"
121
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
122
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
123
+ if (configuration) {
124
+ baseOptions = configuration.baseOptions;
125
+ baseAccessToken = configuration.accessToken;
126
+ }
127
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
128
+ localVarHeaderParameter = {};
129
+ localVarQueryParameter = {};
130
+ // authentication bearer required
131
+ // http bearer authentication required
132
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
133
+ case 1:
134
+ // authentication bearer required
135
+ // http bearer authentication required
136
+ _a.sent();
137
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
138
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
139
+ }
140
+ if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
141
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
142
+ }
143
+ localVarHeaderParameter['Content-Type'] = 'application/json';
144
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
145
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
146
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
147
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createInvoicePaymentRequestDto, localVarRequestOptions, configuration);
148
+ return [2 /*return*/, {
149
+ url: (0, common_1.toPathString)(localVarUrlObj),
150
+ options: localVarRequestOptions,
151
+ }];
152
+ }
153
+ });
154
+ });
155
+ },
99
156
  /**
100
157
  * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
101
158
  * @summary List invoices
@@ -296,6 +353,29 @@ exports.InvoicesApiAxiosParamCreator = InvoicesApiAxiosParamCreator;
296
353
  var InvoicesApiFp = function (configuration) {
297
354
  var localVarAxiosParamCreator = (0, exports.InvoicesApiAxiosParamCreator)(configuration);
298
355
  return {
356
+ /**
357
+ * This will create an invoice payment.
358
+ * @summary Create the invoice payment
359
+ * @param {number} id
360
+ * @param {CreateInvoicePaymentRequestDto} createInvoicePaymentRequestDto
361
+ * @param {string} [authorization] Bearer Token
362
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
363
+ * @param {*} [options] Override http request option.
364
+ * @throws {RequiredError}
365
+ */
366
+ createInvoicePayment: function (id, createInvoicePaymentRequestDto, authorization, idempotencyKey, options) {
367
+ return __awaiter(this, void 0, void 0, function () {
368
+ var localVarAxiosArgs;
369
+ return __generator(this, function (_a) {
370
+ switch (_a.label) {
371
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createInvoicePayment(id, createInvoicePaymentRequestDto, authorization, idempotencyKey, options)];
372
+ case 1:
373
+ localVarAxiosArgs = _a.sent();
374
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
375
+ }
376
+ });
377
+ });
378
+ },
299
379
  /**
300
380
  * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
301
381
  * @summary List invoices
@@ -380,6 +460,19 @@ exports.InvoicesApiFp = InvoicesApiFp;
380
460
  var InvoicesApiFactory = function (configuration, basePath, axios) {
381
461
  var localVarFp = (0, exports.InvoicesApiFp)(configuration);
382
462
  return {
463
+ /**
464
+ * This will create an invoice payment.
465
+ * @summary Create the invoice payment
466
+ * @param {number} id
467
+ * @param {CreateInvoicePaymentRequestDto} createInvoicePaymentRequestDto
468
+ * @param {string} [authorization] Bearer Token
469
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
470
+ * @param {*} [options] Override http request option.
471
+ * @throws {RequiredError}
472
+ */
473
+ createInvoicePayment: function (id, createInvoicePaymentRequestDto, authorization, idempotencyKey, options) {
474
+ return localVarFp.createInvoicePayment(id, createInvoicePaymentRequestDto, authorization, idempotencyKey, options).then(function (request) { return request(axios, basePath); });
475
+ },
383
476
  /**
384
477
  * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
385
478
  * @summary List invoices
@@ -438,6 +531,18 @@ var InvoicesApi = /** @class */ (function (_super) {
438
531
  function InvoicesApi() {
439
532
  return _super !== null && _super.apply(this, arguments) || this;
440
533
  }
534
+ /**
535
+ * This will create an invoice payment.
536
+ * @summary Create the invoice payment
537
+ * @param {InvoicesApiCreateInvoicePaymentRequest} requestParameters Request parameters.
538
+ * @param {*} [options] Override http request option.
539
+ * @throws {RequiredError}
540
+ * @memberof InvoicesApi
541
+ */
542
+ InvoicesApi.prototype.createInvoicePayment = function (requestParameters, options) {
543
+ var _this = this;
544
+ return (0, exports.InvoicesApiFp)(this.configuration).createInvoicePayment(requestParameters.id, requestParameters.createInvoicePaymentRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
545
+ };
441
546
  /**
442
547
  * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
443
548
  * @summary List invoices
@@ -27,5 +27,11 @@ export interface CreateEstimatedInvoiceRequestDto {
27
27
  * @type {object}
28
28
  * @memberof CreateEstimatedInvoiceRequestDto
29
29
  */
30
- 'metadata': object;
30
+ 'metadata'?: object;
31
+ /**
32
+ *
33
+ * @type {boolean}
34
+ * @memberof CreateEstimatedInvoiceRequestDto
35
+ */
36
+ 'calculateProRata'?: boolean;
31
37
  }
@@ -45,10 +45,4 @@ export interface CreateInvoicePaymentRequestDto {
45
45
  * @memberof CreateInvoicePaymentRequestDto
46
46
  */
47
47
  'paymentId': number;
48
- /**
49
- *
50
- * @type {number}
51
- * @memberof CreateInvoicePaymentRequestDto
52
- */
53
- 'invoiceId': number;
54
48
  }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * EMIL BillingService
3
+ * The EMIL BillingService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { OmitTypeClass } from './omit-type-class';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface CreateInvoicePaymentResponseClass
17
+ */
18
+ export interface CreateInvoicePaymentResponseClass {
19
+ /**
20
+ * Invoice updated after payment.
21
+ * @type {OmitTypeClass}
22
+ * @memberof CreateInvoicePaymentResponseClass
23
+ */
24
+ 'invoice': OmitTypeClass;
25
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL BillingService
6
+ * The EMIL BillingService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,6 +4,7 @@ export * from './create-custom-estimated-invoice-response-class';
4
4
  export * from './create-estimated-invoice-request-dto';
5
5
  export * from './create-estimated-invoice-response-class';
6
6
  export * from './create-invoice-payment-request-dto';
7
+ export * from './create-invoice-payment-response-class';
7
8
  export * from './create-invoice-request-dto';
8
9
  export * from './create-invoice-response-class';
9
10
  export * from './create-invoice-status-request-dto';
@@ -20,6 +20,7 @@ __exportStar(require("./create-custom-estimated-invoice-response-class"), export
20
20
  __exportStar(require("./create-estimated-invoice-request-dto"), exports);
21
21
  __exportStar(require("./create-estimated-invoice-response-class"), exports);
22
22
  __exportStar(require("./create-invoice-payment-request-dto"), exports);
23
+ __exportStar(require("./create-invoice-payment-response-class"), exports);
23
24
  __exportStar(require("./create-invoice-request-dto"), exports);
24
25
  __exportStar(require("./create-invoice-response-class"), exports);
25
26
  __exportStar(require("./create-invoice-status-request-dto"), exports);
@@ -50,7 +50,7 @@ export interface InvoicePaymentClass {
50
50
  * @type {string}
51
51
  * @memberof InvoicePaymentClass
52
52
  */
53
- 'commment': string;
53
+ 'comment': string;
54
54
  /**
55
55
  * User who added payment.
56
56
  * @type {string}
@@ -93,4 +93,10 @@ export interface InvoicePaymentClass {
93
93
  * @memberof InvoicePaymentClass
94
94
  */
95
95
  'createdAt': string;
96
+ /**
97
+ * Invoice payment id.
98
+ * @type {number}
99
+ * @memberof InvoicePaymentClass
100
+ */
101
+ 'paymentId': number;
96
102
  }
@@ -10,7 +10,6 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { InvoiceItemClass } from './invoice-item-class';
13
- import { InvoicePaymentsClass } from './invoice-payments-class';
14
13
  /**
15
14
  *
16
15
  * @export
@@ -137,12 +136,6 @@ export interface OmitTypeClass {
137
136
  * @memberof OmitTypeClass
138
137
  */
139
138
  'currency': string;
140
- /**
141
- * Invoice payments.
142
- * @type {InvoicePaymentsClass}
143
- * @memberof OmitTypeClass
144
- */
145
- 'payments': InvoicePaymentsClass;
146
139
  }
147
140
  export declare const OmitTypeClassTypeEnum: {
148
141
  readonly Initial: "initial";
@@ -115,8 +115,9 @@ export interface PolicyDto {
115
115
  }
116
116
  export declare const PolicyDtoStatusEnum: {
117
117
  readonly Active: "ACTIVE";
118
- readonly Withdraw: "WITHDRAW";
118
+ readonly Withdrawn: "WITHDRAWN";
119
119
  readonly Terminated: "TERMINATED";
120
120
  readonly Suspended: "SUSPENDED";
121
+ readonly Pending: "PENDING";
121
122
  };
122
123
  export type PolicyDtoStatusEnum = typeof PolicyDtoStatusEnum[keyof typeof PolicyDtoStatusEnum];
@@ -16,7 +16,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.PolicyDtoStatusEnum = void 0;
17
17
  exports.PolicyDtoStatusEnum = {
18
18
  Active: 'ACTIVE',
19
- Withdraw: 'WITHDRAW',
19
+ Withdrawn: 'WITHDRAWN',
20
20
  Terminated: 'TERMINATED',
21
- Suspended: 'SUSPENDED'
21
+ Suspended: 'SUSPENDED',
22
+ Pending: 'PENDING'
22
23
  };
@@ -39,10 +39,34 @@ export interface PolicyObjectDto {
39
39
  * @memberof PolicyObjectDto
40
40
  */
41
41
  'data': object;
42
+ /**
43
+ * Time at which the object was created.
44
+ * @type {string}
45
+ * @memberof PolicyObjectDto
46
+ */
47
+ 'createdAt'?: string;
48
+ /**
49
+ * Time at which the object was updated.
50
+ * @type {string}
51
+ * @memberof PolicyObjectDto
52
+ */
53
+ 'updatedAt'?: string;
42
54
  /**
43
55
  *
44
56
  * @type {string}
45
57
  * @memberof PolicyObjectDto
46
58
  */
47
59
  'code': string;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof PolicyObjectDto
64
+ */
65
+ 'insuredObjectLabel': string;
66
+ /**
67
+ *
68
+ * @type {boolean}
69
+ * @memberof PolicyObjectDto
70
+ */
71
+ 'isMultiInsuredObject': boolean;
48
72
  }
@@ -33,19 +33,19 @@ export interface PolicyVersionDto {
33
33
  * @type {object}
34
34
  * @memberof PolicyVersionDto
35
35
  */
36
- 'metadata': object;
36
+ 'metadata'?: object;
37
37
  /**
38
38
  * Time at which the object was created.
39
39
  * @type {string}
40
40
  * @memberof PolicyVersionDto
41
41
  */
42
- 'createdAt': string;
42
+ 'createdAt'?: string;
43
43
  /**
44
44
  * Time at which the object was updated.
45
45
  * @type {string}
46
46
  * @memberof PolicyVersionDto
47
47
  */
48
- 'updatedAt': string;
48
+ 'updatedAt'?: string;
49
49
  /**
50
50
  * Policy timeline.
51
51
  * @type {Array<TimesliceDto>}
@@ -40,7 +40,7 @@ export interface TimesliceDto {
40
40
  * @type {string}
41
41
  * @memberof TimesliceDto
42
42
  */
43
- 'to': string;
43
+ 'to'?: string;
44
44
  /**
45
45
  * Time at which the object was created.
46
46
  * @type {string}
@@ -32,6 +32,12 @@ export interface CreateEstimatedInvoiceRequestDto {
32
32
  * @type {object}
33
33
  * @memberof CreateEstimatedInvoiceRequestDto
34
34
  */
35
- 'metadata': object;
35
+ 'metadata'?: object;
36
+ /**
37
+ *
38
+ * @type {boolean}
39
+ * @memberof CreateEstimatedInvoiceRequestDto
40
+ */
41
+ 'calculateProRata'?: boolean;
36
42
  }
37
43
 
@@ -50,11 +50,5 @@ export interface CreateInvoicePaymentRequestDto {
50
50
  * @memberof CreateInvoicePaymentRequestDto
51
51
  */
52
52
  'paymentId': number;
53
- /**
54
- *
55
- * @type {number}
56
- * @memberof CreateInvoicePaymentRequestDto
57
- */
58
- 'invoiceId': number;
59
53
  }
60
54
 
@@ -0,0 +1,31 @@
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
+ * 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 { OmitTypeClass } from './omit-type-class';
17
+
18
+ /**
19
+ *
20
+ * @export
21
+ * @interface CreateInvoicePaymentResponseClass
22
+ */
23
+ export interface CreateInvoicePaymentResponseClass {
24
+ /**
25
+ * Invoice updated after payment.
26
+ * @type {OmitTypeClass}
27
+ * @memberof CreateInvoicePaymentResponseClass
28
+ */
29
+ 'invoice': OmitTypeClass;
30
+ }
31
+
package/models/index.ts CHANGED
@@ -4,6 +4,7 @@ export * from './create-custom-estimated-invoice-response-class';
4
4
  export * from './create-estimated-invoice-request-dto';
5
5
  export * from './create-estimated-invoice-response-class';
6
6
  export * from './create-invoice-payment-request-dto';
7
+ export * from './create-invoice-payment-response-class';
7
8
  export * from './create-invoice-request-dto';
8
9
  export * from './create-invoice-response-class';
9
10
  export * from './create-invoice-status-request-dto';
@@ -55,7 +55,7 @@ export interface InvoicePaymentClass {
55
55
  * @type {string}
56
56
  * @memberof InvoicePaymentClass
57
57
  */
58
- 'commment': string;
58
+ 'comment': string;
59
59
  /**
60
60
  * User who added payment.
61
61
  * @type {string}
@@ -98,5 +98,11 @@ export interface InvoicePaymentClass {
98
98
  * @memberof InvoicePaymentClass
99
99
  */
100
100
  'createdAt': string;
101
+ /**
102
+ * Invoice payment id.
103
+ * @type {number}
104
+ * @memberof InvoicePaymentClass
105
+ */
106
+ 'paymentId': number;
101
107
  }
102
108
 
@@ -14,7 +14,6 @@
14
14
 
15
15
 
16
16
  import { InvoiceItemClass } from './invoice-item-class';
17
- import { InvoicePaymentsClass } from './invoice-payments-class';
18
17
 
19
18
  /**
20
19
  *
@@ -142,12 +141,6 @@ export interface OmitTypeClass {
142
141
  * @memberof OmitTypeClass
143
142
  */
144
143
  'currency': string;
145
- /**
146
- * Invoice payments.
147
- * @type {InvoicePaymentsClass}
148
- * @memberof OmitTypeClass
149
- */
150
- 'payments': InvoicePaymentsClass;
151
144
  }
152
145
 
153
146
  export const OmitTypeClassTypeEnum = {
@@ -121,9 +121,10 @@ export interface PolicyDto {
121
121
 
122
122
  export const PolicyDtoStatusEnum = {
123
123
  Active: 'ACTIVE',
124
- Withdraw: 'WITHDRAW',
124
+ Withdrawn: 'WITHDRAWN',
125
125
  Terminated: 'TERMINATED',
126
- Suspended: 'SUSPENDED'
126
+ Suspended: 'SUSPENDED',
127
+ Pending: 'PENDING'
127
128
  } as const;
128
129
 
129
130
  export type PolicyDtoStatusEnum = typeof PolicyDtoStatusEnum[keyof typeof PolicyDtoStatusEnum];
@@ -44,11 +44,35 @@ export interface PolicyObjectDto {
44
44
  * @memberof PolicyObjectDto
45
45
  */
46
46
  'data': object;
47
+ /**
48
+ * Time at which the object was created.
49
+ * @type {string}
50
+ * @memberof PolicyObjectDto
51
+ */
52
+ 'createdAt'?: string;
53
+ /**
54
+ * Time at which the object was updated.
55
+ * @type {string}
56
+ * @memberof PolicyObjectDto
57
+ */
58
+ 'updatedAt'?: string;
47
59
  /**
48
60
  *
49
61
  * @type {string}
50
62
  * @memberof PolicyObjectDto
51
63
  */
52
64
  'code': string;
65
+ /**
66
+ *
67
+ * @type {string}
68
+ * @memberof PolicyObjectDto
69
+ */
70
+ 'insuredObjectLabel': string;
71
+ /**
72
+ *
73
+ * @type {boolean}
74
+ * @memberof PolicyObjectDto
75
+ */
76
+ 'isMultiInsuredObject': boolean;
53
77
  }
54
78
 
@@ -38,19 +38,19 @@ export interface PolicyVersionDto {
38
38
  * @type {object}
39
39
  * @memberof PolicyVersionDto
40
40
  */
41
- 'metadata': object;
41
+ 'metadata'?: object;
42
42
  /**
43
43
  * Time at which the object was created.
44
44
  * @type {string}
45
45
  * @memberof PolicyVersionDto
46
46
  */
47
- 'createdAt': string;
47
+ 'createdAt'?: string;
48
48
  /**
49
49
  * Time at which the object was updated.
50
50
  * @type {string}
51
51
  * @memberof PolicyVersionDto
52
52
  */
53
- 'updatedAt': string;
53
+ 'updatedAt'?: string;
54
54
  /**
55
55
  * Policy timeline.
56
56
  * @type {Array<TimesliceDto>}
@@ -45,7 +45,7 @@ export interface TimesliceDto {
45
45
  * @type {string}
46
46
  * @memberof TimesliceDto
47
47
  */
48
- 'to': string;
48
+ 'to'?: string;
49
49
  /**
50
50
  * Time at which the object was created.
51
51
  * @type {string}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/billing-sdk-node",
3
- "version": "1.11.0",
3
+ "version": "1.17.0",
4
4
  "description": "OpenAPI client for @emilgroup/billing-sdk-node",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [
@@ -23,7 +23,7 @@
23
23
  "url": "^0.11.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@types/node": "^12.11.5",
26
+ "@types/node": "^12.11.5",
27
27
  "typescript": "^4.0"
28
28
  }
29
29
  }