@emilgroup/billing-sdk 1.9.0 → 1.15.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 (99) hide show
  1. package/.openapi-generator/FILES +3 -16
  2. package/README.md +2 -2
  3. package/api/correction-invoices-api.ts +2 -4
  4. package/api/draft-invoice-api.ts +342 -0
  5. package/api/estimated-invoices-api.ts +112 -11
  6. package/api/initial-invoices-api.ts +2 -4
  7. package/api/invoices-api.ts +110 -88
  8. package/api/recurring-invoices-api.ts +2 -4
  9. package/api.ts +2 -0
  10. package/base.ts +1 -0
  11. package/dist/api/correction-invoices-api.d.ts +3 -4
  12. package/dist/api/draft-invoice-api.d.ts +185 -0
  13. package/dist/api/draft-invoice-api.js +392 -0
  14. package/dist/api/estimated-invoices-api.d.ts +66 -12
  15. package/dist/api/estimated-invoices-api.js +97 -4
  16. package/dist/api/initial-invoices-api.d.ts +3 -4
  17. package/dist/api/invoices-api.d.ts +97 -82
  18. package/dist/api/invoices-api.js +70 -58
  19. package/dist/api/recurring-invoices-api.d.ts +3 -4
  20. package/dist/api.d.ts +1 -0
  21. package/dist/api.js +1 -0
  22. package/dist/base.js +1 -0
  23. package/dist/models/create-draft-invoice-request-dto.d.ts +89 -0
  24. package/dist/models/{invoice-class.js → create-draft-invoice-request-dto.js} +2 -7
  25. package/dist/models/create-estimated-invoice-for-interval-request-dto.d.ts +49 -0
  26. package/dist/models/create-invoice-payment-request-dto.d.ts +2 -8
  27. package/dist/models/create-invoice-request-dto.d.ts +5 -5
  28. package/dist/models/index.d.ts +2 -16
  29. package/dist/models/index.js +2 -16
  30. package/dist/models/inline-response200.d.ts +6 -6
  31. package/dist/models/inline-response503.d.ts +6 -6
  32. package/dist/models/policy-dto.d.ts +5 -18
  33. package/dist/models/policy-dto.js +0 -7
  34. package/dist/models/policy-object-dto.d.ts +20 -2
  35. package/dist/models/policy-premium-dto.d.ts +2 -2
  36. package/dist/models/policy-premium-item-dto.d.ts +2 -2
  37. package/dist/models/policy-version-dto.d.ts +6 -0
  38. package/dist/models/premium-formula-dto.d.ts +2 -2
  39. package/models/create-draft-invoice-request-dto.ts +98 -0
  40. package/models/create-estimated-invoice-for-interval-request-dto.ts +55 -0
  41. package/models/create-invoice-payment-request-dto.ts +2 -8
  42. package/models/create-invoice-request-dto.ts +5 -5
  43. package/models/index.ts +2 -16
  44. package/models/inline-response200.ts +6 -6
  45. package/models/inline-response503.ts +6 -6
  46. package/models/policy-dto.ts +5 -21
  47. package/models/policy-object-dto.ts +20 -2
  48. package/models/policy-premium-dto.ts +2 -2
  49. package/models/policy-premium-item-dto.ts +2 -2
  50. package/models/policy-version-dto.ts +6 -0
  51. package/models/premium-formula-dto.ts +2 -2
  52. package/package.json +1 -2
  53. package/dist/models/create-correction-invoices-response-class.d.ts +0 -25
  54. package/dist/models/create-custom-estimated-invoice-response-class.d.ts +0 -24
  55. package/dist/models/create-custom-estimated-invoice-response-class.js +0 -15
  56. package/dist/models/create-estimated-invoice-response-class.d.ts +0 -31
  57. package/dist/models/create-estimated-invoice-response-class.js +0 -15
  58. package/dist/models/create-invoice-response-class.d.ts +0 -25
  59. package/dist/models/create-invoice-response-class.js +0 -15
  60. package/dist/models/create-invoice-status-request-dto.d.ts +0 -36
  61. package/dist/models/create-invoice-status-request-dto.js +0 -21
  62. package/dist/models/create-termination-invoice-request-dto.d.ts +0 -54
  63. package/dist/models/create-termination-invoice-request-dto.js +0 -15
  64. package/dist/models/get-invoice-response-class.d.ts +0 -25
  65. package/dist/models/get-invoice-response-class.js +0 -15
  66. package/dist/models/invoice-class.d.ts +0 -170
  67. package/dist/models/invoice-item-class.d.ts +0 -129
  68. package/dist/models/invoice-item-class.js +0 -24
  69. package/dist/models/invoice-payment-class.d.ts +0 -96
  70. package/dist/models/invoice-payment-class.js +0 -15
  71. package/dist/models/invoice-payments-class.d.ts +0 -25
  72. package/dist/models/invoice-payments-class.js +0 -15
  73. package/dist/models/invoice-status-class.d.ts +0 -48
  74. package/dist/models/invoice-status-class.js +0 -21
  75. package/dist/models/list-invoices-response-class.d.ts +0 -31
  76. package/dist/models/list-invoices-response-class.js +0 -15
  77. package/dist/models/list-policies-billing-dates-response-class.d.ts +0 -31
  78. package/dist/models/list-policies-billing-dates-response-class.js +0 -15
  79. package/dist/models/omit-type-class.d.ts +0 -163
  80. package/dist/models/omit-type-class.js +0 -31
  81. package/dist/models/policy-billing-date-class.d.ts +0 -42
  82. package/dist/models/policy-billing-date-class.js +0 -15
  83. package/models/create-correction-invoices-response-class.ts +0 -31
  84. package/models/create-custom-estimated-invoice-response-class.ts +0 -30
  85. package/models/create-estimated-invoice-response-class.ts +0 -37
  86. package/models/create-invoice-response-class.ts +0 -31
  87. package/models/create-invoice-status-request-dto.ts +0 -45
  88. package/models/create-termination-invoice-request-dto.ts +0 -60
  89. package/models/get-invoice-response-class.ts +0 -31
  90. package/models/invoice-class.ts +0 -180
  91. package/models/invoice-item-class.ts +0 -138
  92. package/models/invoice-payment-class.ts +0 -102
  93. package/models/invoice-payments-class.ts +0 -31
  94. package/models/invoice-status-class.ts +0 -57
  95. package/models/list-invoices-response-class.ts +0 -37
  96. package/models/list-policies-billing-dates-response-class.ts +0 -37
  97. package/models/omit-type-class.ts +0 -173
  98. package/models/policy-billing-date-class.ts +0 -48
  99. /package/dist/models/{create-correction-invoices-response-class.js → create-estimated-invoice-for-interval-request-dto.js} +0 -0
@@ -0,0 +1,185 @@
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 { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
+ import { Configuration } from '../configuration';
14
+ import { RequestArgs, BaseAPI } from '../base';
15
+ import { CreateDraftInvoiceRequestDto } from '../models';
16
+ /**
17
+ * DraftInvoiceApi - axios parameter creator
18
+ * @export
19
+ */
20
+ export declare const DraftInvoiceApiAxiosParamCreator: (configuration?: Configuration) => {
21
+ /**
22
+ *
23
+ * @param {CreateDraftInvoiceRequestDto} createDraftInvoiceRequestDto
24
+ * @param {string} [authorization] Bearer Token
25
+ * @param {*} [options] Override http request option.
26
+ * @throws {RequiredError}
27
+ */
28
+ createDraftInvoice: (createDraftInvoiceRequestDto: CreateDraftInvoiceRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
29
+ /**
30
+ *
31
+ * @param {string} [authorization] Bearer Token
32
+ * @param {*} [options] Override http request option.
33
+ * @throws {RequiredError}
34
+ */
35
+ deleteAllDraftInvoices: (authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
36
+ /**
37
+ *
38
+ * @param {object} body
39
+ * @param {string} [authorization] Bearer Token
40
+ * @param {*} [options] Override http request option.
41
+ * @throws {RequiredError}
42
+ */
43
+ deleteDraftInvoice: (body: object, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
44
+ };
45
+ /**
46
+ * DraftInvoiceApi - functional programming interface
47
+ * @export
48
+ */
49
+ export declare const DraftInvoiceApiFp: (configuration?: Configuration) => {
50
+ /**
51
+ *
52
+ * @param {CreateDraftInvoiceRequestDto} createDraftInvoiceRequestDto
53
+ * @param {string} [authorization] Bearer Token
54
+ * @param {*} [options] Override http request option.
55
+ * @throws {RequiredError}
56
+ */
57
+ createDraftInvoice(createDraftInvoiceRequestDto: CreateDraftInvoiceRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
58
+ /**
59
+ *
60
+ * @param {string} [authorization] Bearer Token
61
+ * @param {*} [options] Override http request option.
62
+ * @throws {RequiredError}
63
+ */
64
+ deleteAllDraftInvoices(authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
65
+ /**
66
+ *
67
+ * @param {object} body
68
+ * @param {string} [authorization] Bearer Token
69
+ * @param {*} [options] Override http request option.
70
+ * @throws {RequiredError}
71
+ */
72
+ deleteDraftInvoice(body: object, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
73
+ };
74
+ /**
75
+ * DraftInvoiceApi - factory interface
76
+ * @export
77
+ */
78
+ export declare const DraftInvoiceApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
79
+ /**
80
+ *
81
+ * @param {CreateDraftInvoiceRequestDto} createDraftInvoiceRequestDto
82
+ * @param {string} [authorization] Bearer Token
83
+ * @param {*} [options] Override http request option.
84
+ * @throws {RequiredError}
85
+ */
86
+ createDraftInvoice(createDraftInvoiceRequestDto: CreateDraftInvoiceRequestDto, authorization?: string, options?: any): AxiosPromise<void>;
87
+ /**
88
+ *
89
+ * @param {string} [authorization] Bearer Token
90
+ * @param {*} [options] Override http request option.
91
+ * @throws {RequiredError}
92
+ */
93
+ deleteAllDraftInvoices(authorization?: string, options?: any): AxiosPromise<void>;
94
+ /**
95
+ *
96
+ * @param {object} body
97
+ * @param {string} [authorization] Bearer Token
98
+ * @param {*} [options] Override http request option.
99
+ * @throws {RequiredError}
100
+ */
101
+ deleteDraftInvoice(body: object, authorization?: string, options?: any): AxiosPromise<void>;
102
+ };
103
+ /**
104
+ * Request parameters for createDraftInvoice operation in DraftInvoiceApi.
105
+ * @export
106
+ * @interface DraftInvoiceApiCreateDraftInvoiceRequest
107
+ */
108
+ export interface DraftInvoiceApiCreateDraftInvoiceRequest {
109
+ /**
110
+ *
111
+ * @type {CreateDraftInvoiceRequestDto}
112
+ * @memberof DraftInvoiceApiCreateDraftInvoice
113
+ */
114
+ readonly createDraftInvoiceRequestDto: CreateDraftInvoiceRequestDto;
115
+ /**
116
+ * Bearer Token
117
+ * @type {string}
118
+ * @memberof DraftInvoiceApiCreateDraftInvoice
119
+ */
120
+ readonly authorization?: string;
121
+ }
122
+ /**
123
+ * Request parameters for deleteAllDraftInvoices operation in DraftInvoiceApi.
124
+ * @export
125
+ * @interface DraftInvoiceApiDeleteAllDraftInvoicesRequest
126
+ */
127
+ export interface DraftInvoiceApiDeleteAllDraftInvoicesRequest {
128
+ /**
129
+ * Bearer Token
130
+ * @type {string}
131
+ * @memberof DraftInvoiceApiDeleteAllDraftInvoices
132
+ */
133
+ readonly authorization?: string;
134
+ }
135
+ /**
136
+ * Request parameters for deleteDraftInvoice operation in DraftInvoiceApi.
137
+ * @export
138
+ * @interface DraftInvoiceApiDeleteDraftInvoiceRequest
139
+ */
140
+ export interface DraftInvoiceApiDeleteDraftInvoiceRequest {
141
+ /**
142
+ *
143
+ * @type {object}
144
+ * @memberof DraftInvoiceApiDeleteDraftInvoice
145
+ */
146
+ readonly body: object;
147
+ /**
148
+ * Bearer Token
149
+ * @type {string}
150
+ * @memberof DraftInvoiceApiDeleteDraftInvoice
151
+ */
152
+ readonly authorization?: string;
153
+ }
154
+ /**
155
+ * DraftInvoiceApi - object-oriented interface
156
+ * @export
157
+ * @class DraftInvoiceApi
158
+ * @extends {BaseAPI}
159
+ */
160
+ export declare class DraftInvoiceApi extends BaseAPI {
161
+ /**
162
+ *
163
+ * @param {DraftInvoiceApiCreateDraftInvoiceRequest} requestParameters Request parameters.
164
+ * @param {*} [options] Override http request option.
165
+ * @throws {RequiredError}
166
+ * @memberof DraftInvoiceApi
167
+ */
168
+ createDraftInvoice(requestParameters: DraftInvoiceApiCreateDraftInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
169
+ /**
170
+ *
171
+ * @param {DraftInvoiceApiDeleteAllDraftInvoicesRequest} requestParameters Request parameters.
172
+ * @param {*} [options] Override http request option.
173
+ * @throws {RequiredError}
174
+ * @memberof DraftInvoiceApi
175
+ */
176
+ deleteAllDraftInvoices(requestParameters?: DraftInvoiceApiDeleteAllDraftInvoicesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
177
+ /**
178
+ *
179
+ * @param {DraftInvoiceApiDeleteDraftInvoiceRequest} requestParameters Request parameters.
180
+ * @param {*} [options] Override http request option.
181
+ * @throws {RequiredError}
182
+ * @memberof DraftInvoiceApi
183
+ */
184
+ deleteDraftInvoice(requestParameters: DraftInvoiceApiDeleteDraftInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
185
+ }
@@ -0,0 +1,392 @@
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
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ var __importDefault = (this && this.__importDefault) || function (mod) {
78
+ return (mod && mod.__esModule) ? mod : { "default": mod };
79
+ };
80
+ Object.defineProperty(exports, "__esModule", { value: true });
81
+ exports.DraftInvoiceApi = exports.DraftInvoiceApiFactory = exports.DraftInvoiceApiFp = exports.DraftInvoiceApiAxiosParamCreator = void 0;
82
+ var axios_1 = __importDefault(require("axios"));
83
+ // Some imports not used depending on template conditions
84
+ // @ts-ignore
85
+ var common_1 = require("../common");
86
+ // @ts-ignore
87
+ var base_1 = require("../base");
88
+ /**
89
+ * DraftInvoiceApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var DraftInvoiceApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ *
97
+ * @param {CreateDraftInvoiceRequestDto} createDraftInvoiceRequestDto
98
+ * @param {string} [authorization] Bearer Token
99
+ * @param {*} [options] Override http request option.
100
+ * @throws {RequiredError}
101
+ */
102
+ createDraftInvoice: function (createDraftInvoiceRequestDto, authorization, options) {
103
+ if (options === void 0) { options = {}; }
104
+ return __awaiter(_this, void 0, void 0, function () {
105
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
106
+ return __generator(this, function (_a) {
107
+ switch (_a.label) {
108
+ case 0:
109
+ // verify required parameter 'createDraftInvoiceRequestDto' is not null or undefined
110
+ (0, common_1.assertParamExists)('createDraftInvoice', 'createDraftInvoiceRequestDto', createDraftInvoiceRequestDto);
111
+ localVarPath = "/billingservice/v1/draft-invoices";
112
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
113
+ if (configuration) {
114
+ baseOptions = configuration.baseOptions;
115
+ baseAccessToken = configuration.accessToken;
116
+ }
117
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
118
+ localVarHeaderParameter = {};
119
+ localVarQueryParameter = {};
120
+ // authentication bearer required
121
+ // http bearer authentication required
122
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
123
+ case 1:
124
+ // authentication bearer required
125
+ // http bearer authentication required
126
+ _a.sent();
127
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
128
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
129
+ }
130
+ localVarHeaderParameter['Content-Type'] = 'application/json';
131
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
132
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
133
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
134
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createDraftInvoiceRequestDto, localVarRequestOptions, configuration);
135
+ return [2 /*return*/, {
136
+ url: (0, common_1.toPathString)(localVarUrlObj),
137
+ options: localVarRequestOptions,
138
+ }];
139
+ }
140
+ });
141
+ });
142
+ },
143
+ /**
144
+ *
145
+ * @param {string} [authorization] Bearer Token
146
+ * @param {*} [options] Override http request option.
147
+ * @throws {RequiredError}
148
+ */
149
+ deleteAllDraftInvoices: function (authorization, options) {
150
+ if (options === void 0) { options = {}; }
151
+ return __awaiter(_this, void 0, void 0, function () {
152
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
153
+ return __generator(this, function (_a) {
154
+ switch (_a.label) {
155
+ case 0:
156
+ localVarPath = "/billingservice/v1/draft-invoices";
157
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
158
+ if (configuration) {
159
+ baseOptions = configuration.baseOptions;
160
+ baseAccessToken = configuration.accessToken;
161
+ }
162
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
163
+ localVarHeaderParameter = {};
164
+ localVarQueryParameter = {};
165
+ // authentication bearer required
166
+ // http bearer authentication required
167
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
168
+ case 1:
169
+ // authentication bearer required
170
+ // http bearer authentication required
171
+ _a.sent();
172
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
173
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
174
+ }
175
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
176
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
177
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
178
+ return [2 /*return*/, {
179
+ url: (0, common_1.toPathString)(localVarUrlObj),
180
+ options: localVarRequestOptions,
181
+ }];
182
+ }
183
+ });
184
+ });
185
+ },
186
+ /**
187
+ *
188
+ * @param {object} body
189
+ * @param {string} [authorization] Bearer Token
190
+ * @param {*} [options] Override http request option.
191
+ * @throws {RequiredError}
192
+ */
193
+ deleteDraftInvoice: function (body, authorization, options) {
194
+ if (options === void 0) { options = {}; }
195
+ return __awaiter(_this, void 0, void 0, function () {
196
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
197
+ return __generator(this, function (_a) {
198
+ switch (_a.label) {
199
+ case 0:
200
+ // verify required parameter 'body' is not null or undefined
201
+ (0, common_1.assertParamExists)('deleteDraftInvoice', 'body', body);
202
+ localVarPath = "/billingservice/v1/draft-invoices/code";
203
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
204
+ if (configuration) {
205
+ baseOptions = configuration.baseOptions;
206
+ baseAccessToken = configuration.accessToken;
207
+ }
208
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
209
+ localVarHeaderParameter = {};
210
+ localVarQueryParameter = {};
211
+ // authentication bearer required
212
+ // http bearer authentication required
213
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
214
+ case 1:
215
+ // authentication bearer required
216
+ // http bearer authentication required
217
+ _a.sent();
218
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
219
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
220
+ }
221
+ localVarHeaderParameter['Content-Type'] = 'application/json';
222
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
223
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
224
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
225
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
226
+ return [2 /*return*/, {
227
+ url: (0, common_1.toPathString)(localVarUrlObj),
228
+ options: localVarRequestOptions,
229
+ }];
230
+ }
231
+ });
232
+ });
233
+ },
234
+ };
235
+ };
236
+ exports.DraftInvoiceApiAxiosParamCreator = DraftInvoiceApiAxiosParamCreator;
237
+ /**
238
+ * DraftInvoiceApi - functional programming interface
239
+ * @export
240
+ */
241
+ var DraftInvoiceApiFp = function (configuration) {
242
+ var localVarAxiosParamCreator = (0, exports.DraftInvoiceApiAxiosParamCreator)(configuration);
243
+ return {
244
+ /**
245
+ *
246
+ * @param {CreateDraftInvoiceRequestDto} createDraftInvoiceRequestDto
247
+ * @param {string} [authorization] Bearer Token
248
+ * @param {*} [options] Override http request option.
249
+ * @throws {RequiredError}
250
+ */
251
+ createDraftInvoice: function (createDraftInvoiceRequestDto, authorization, options) {
252
+ return __awaiter(this, void 0, void 0, function () {
253
+ var localVarAxiosArgs;
254
+ return __generator(this, function (_a) {
255
+ switch (_a.label) {
256
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createDraftInvoice(createDraftInvoiceRequestDto, authorization, options)];
257
+ case 1:
258
+ localVarAxiosArgs = _a.sent();
259
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
260
+ }
261
+ });
262
+ });
263
+ },
264
+ /**
265
+ *
266
+ * @param {string} [authorization] Bearer Token
267
+ * @param {*} [options] Override http request option.
268
+ * @throws {RequiredError}
269
+ */
270
+ deleteAllDraftInvoices: function (authorization, options) {
271
+ return __awaiter(this, void 0, void 0, function () {
272
+ var localVarAxiosArgs;
273
+ return __generator(this, function (_a) {
274
+ switch (_a.label) {
275
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteAllDraftInvoices(authorization, options)];
276
+ case 1:
277
+ localVarAxiosArgs = _a.sent();
278
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
279
+ }
280
+ });
281
+ });
282
+ },
283
+ /**
284
+ *
285
+ * @param {object} body
286
+ * @param {string} [authorization] Bearer Token
287
+ * @param {*} [options] Override http request option.
288
+ * @throws {RequiredError}
289
+ */
290
+ deleteDraftInvoice: function (body, authorization, options) {
291
+ return __awaiter(this, void 0, void 0, function () {
292
+ var localVarAxiosArgs;
293
+ return __generator(this, function (_a) {
294
+ switch (_a.label) {
295
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteDraftInvoice(body, authorization, options)];
296
+ case 1:
297
+ localVarAxiosArgs = _a.sent();
298
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
299
+ }
300
+ });
301
+ });
302
+ },
303
+ };
304
+ };
305
+ exports.DraftInvoiceApiFp = DraftInvoiceApiFp;
306
+ /**
307
+ * DraftInvoiceApi - factory interface
308
+ * @export
309
+ */
310
+ var DraftInvoiceApiFactory = function (configuration, basePath, axios) {
311
+ var localVarFp = (0, exports.DraftInvoiceApiFp)(configuration);
312
+ return {
313
+ /**
314
+ *
315
+ * @param {CreateDraftInvoiceRequestDto} createDraftInvoiceRequestDto
316
+ * @param {string} [authorization] Bearer Token
317
+ * @param {*} [options] Override http request option.
318
+ * @throws {RequiredError}
319
+ */
320
+ createDraftInvoice: function (createDraftInvoiceRequestDto, authorization, options) {
321
+ return localVarFp.createDraftInvoice(createDraftInvoiceRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
322
+ },
323
+ /**
324
+ *
325
+ * @param {string} [authorization] Bearer Token
326
+ * @param {*} [options] Override http request option.
327
+ * @throws {RequiredError}
328
+ */
329
+ deleteAllDraftInvoices: function (authorization, options) {
330
+ return localVarFp.deleteAllDraftInvoices(authorization, options).then(function (request) { return request(axios, basePath); });
331
+ },
332
+ /**
333
+ *
334
+ * @param {object} body
335
+ * @param {string} [authorization] Bearer Token
336
+ * @param {*} [options] Override http request option.
337
+ * @throws {RequiredError}
338
+ */
339
+ deleteDraftInvoice: function (body, authorization, options) {
340
+ return localVarFp.deleteDraftInvoice(body, authorization, options).then(function (request) { return request(axios, basePath); });
341
+ },
342
+ };
343
+ };
344
+ exports.DraftInvoiceApiFactory = DraftInvoiceApiFactory;
345
+ /**
346
+ * DraftInvoiceApi - object-oriented interface
347
+ * @export
348
+ * @class DraftInvoiceApi
349
+ * @extends {BaseAPI}
350
+ */
351
+ var DraftInvoiceApi = /** @class */ (function (_super) {
352
+ __extends(DraftInvoiceApi, _super);
353
+ function DraftInvoiceApi() {
354
+ return _super !== null && _super.apply(this, arguments) || this;
355
+ }
356
+ /**
357
+ *
358
+ * @param {DraftInvoiceApiCreateDraftInvoiceRequest} requestParameters Request parameters.
359
+ * @param {*} [options] Override http request option.
360
+ * @throws {RequiredError}
361
+ * @memberof DraftInvoiceApi
362
+ */
363
+ DraftInvoiceApi.prototype.createDraftInvoice = function (requestParameters, options) {
364
+ var _this = this;
365
+ return (0, exports.DraftInvoiceApiFp)(this.configuration).createDraftInvoice(requestParameters.createDraftInvoiceRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
366
+ };
367
+ /**
368
+ *
369
+ * @param {DraftInvoiceApiDeleteAllDraftInvoicesRequest} requestParameters Request parameters.
370
+ * @param {*} [options] Override http request option.
371
+ * @throws {RequiredError}
372
+ * @memberof DraftInvoiceApi
373
+ */
374
+ DraftInvoiceApi.prototype.deleteAllDraftInvoices = function (requestParameters, options) {
375
+ var _this = this;
376
+ if (requestParameters === void 0) { requestParameters = {}; }
377
+ return (0, exports.DraftInvoiceApiFp)(this.configuration).deleteAllDraftInvoices(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
378
+ };
379
+ /**
380
+ *
381
+ * @param {DraftInvoiceApiDeleteDraftInvoiceRequest} requestParameters Request parameters.
382
+ * @param {*} [options] Override http request option.
383
+ * @throws {RequiredError}
384
+ * @memberof DraftInvoiceApi
385
+ */
386
+ DraftInvoiceApi.prototype.deleteDraftInvoice = function (requestParameters, options) {
387
+ var _this = this;
388
+ return (0, exports.DraftInvoiceApiFp)(this.configuration).deleteDraftInvoice(requestParameters.body, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
389
+ };
390
+ return DraftInvoiceApi;
391
+ }(base_1.BaseAPI));
392
+ exports.DraftInvoiceApi = DraftInvoiceApi;