@emilgroup/billing-sdk 1.63.1-beta.36 → 1.63.1-beta.38

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 (54) hide show
  1. package/.openapi-generator/FILES +0 -3
  2. package/README.md +2 -2
  3. package/api/correction-invoices-api.ts +6 -12
  4. package/api/draft-invoice-api.ts +6 -12
  5. package/api/estimated-invoices-api.ts +8 -16
  6. package/api/initial-invoices-api.ts +4 -8
  7. package/api/invoices-api.ts +10 -20
  8. package/api/policy-billing-api.ts +6 -12
  9. package/api/recurring-invoices-api.ts +4 -8
  10. package/api/termination-invoices-api.ts +4 -8
  11. package/api.ts +0 -2
  12. package/base.ts +41 -174
  13. package/common.ts +2 -3
  14. package/configuration.ts +0 -20
  15. package/dist/api/correction-invoices-api.d.ts +2 -2
  16. package/dist/api/correction-invoices-api.js +10 -17
  17. package/dist/api/draft-invoice-api.d.ts +3 -3
  18. package/dist/api/draft-invoice-api.js +12 -21
  19. package/dist/api/estimated-invoices-api.d.ts +4 -4
  20. package/dist/api/estimated-invoices-api.js +16 -28
  21. package/dist/api/health-api.d.ts +1 -1
  22. package/dist/api/initial-invoices-api.d.ts +1 -1
  23. package/dist/api/initial-invoices-api.js +6 -10
  24. package/dist/api/invoices-api.d.ts +4 -4
  25. package/dist/api/invoices-api.js +15 -22
  26. package/dist/api/policy-billing-api.d.ts +3 -3
  27. package/dist/api/policy-billing-api.js +11 -18
  28. package/dist/api/recurring-invoices-api.d.ts +1 -1
  29. package/dist/api/recurring-invoices-api.js +6 -10
  30. package/dist/api/termination-invoices-api.d.ts +1 -1
  31. package/dist/api/termination-invoices-api.js +6 -10
  32. package/dist/api.d.ts +0 -1
  33. package/dist/api.js +0 -1
  34. package/dist/base.d.ts +0 -24
  35. package/dist/base.js +59 -178
  36. package/dist/common.d.ts +1 -1
  37. package/dist/common.js +0 -1
  38. package/dist/configuration.d.ts +0 -17
  39. package/dist/configuration.js +0 -2
  40. package/dist/models/index.d.ts +0 -2
  41. package/dist/models/index.js +0 -2
  42. package/dist/models/invoice-item-class.d.ts +0 -12
  43. package/models/index.ts +0 -2
  44. package/models/invoice-item-class.ts +0 -12
  45. package/package.json +2 -2
  46. package/api/withdraw-invoices-api.ts +0 -183
  47. package/dist/api/withdraw-invoices-api.d.ts +0 -106
  48. package/dist/api/withdraw-invoices-api.js +0 -234
  49. package/dist/models/create-withdraw-invoice-request-dto-rest.d.ts +0 -50
  50. package/dist/models/create-withdraw-invoice-request-dto-rest.js +0 -15
  51. package/dist/models/create-withdraw-invoice-request-dto.d.ts +0 -50
  52. package/dist/models/create-withdraw-invoice-request-dto.js +0 -15
  53. package/models/create-withdraw-invoice-request-dto-rest.ts +0 -54
  54. package/models/create-withdraw-invoice-request-dto.ts +0 -54
@@ -1,183 +0,0 @@
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 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 { CreateInvoiceResponseClass } from '../models';
25
- // @ts-ignore
26
- import { CreateWithdrawInvoiceRequestDtoRest } from '../models';
27
- /**
28
- * WithdrawInvoicesApi - axios parameter creator
29
- * @export
30
- */
31
- export const WithdrawInvoicesApiAxiosParamCreator = function (configuration?: Configuration) {
32
- return {
33
- /**
34
- * This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
35
- * @summary Create the Withdraw invoice
36
- * @param {CreateWithdrawInvoiceRequestDtoRest} createWithdrawInvoiceRequestDtoRest
37
- * @param {string} [authorization] Bearer Token
38
- * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
39
- * @param {*} [options] Override http request option.
40
- * @throws {RequiredError}
41
- */
42
- createWithdrawInvoice: async (createWithdrawInvoiceRequestDtoRest: CreateWithdrawInvoiceRequestDtoRest, authorization?: string, idempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
43
- // verify required parameter 'createWithdrawInvoiceRequestDtoRest' is not null or undefined
44
- assertParamExists('createWithdrawInvoice', 'createWithdrawInvoiceRequestDtoRest', createWithdrawInvoiceRequestDtoRest)
45
- const localVarPath = `/billingservice/v1/withdraw-invoices`;
46
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
47
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
48
- let baseOptions;
49
- let baseAccessToken;
50
- if (configuration) {
51
- baseOptions = configuration.baseOptions;
52
- baseAccessToken = configuration.accessToken;
53
- }
54
-
55
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
56
- const localVarHeaderParameter = {} as any;
57
- const localVarQueryParameter = {} as any;
58
-
59
- // authentication bearer required
60
- // http bearer authentication required
61
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
62
-
63
- // Only Authorization falls back to the configured token; an empty value is never sent.
64
- const authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
65
- if (authorizationValue) {
66
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
67
- }
68
-
69
- // Only Authorization falls back to the configured token; an empty value is never sent.
70
- const idempotencyKeyValue = 'Idempotency-Key'.toLowerCase() === 'authorization' ? (idempotencyKey || baseAccessToken) : idempotencyKey;
71
- if (idempotencyKeyValue) {
72
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
73
- }
74
-
75
-
76
-
77
- localVarHeaderParameter['Content-Type'] = 'application/json';
78
-
79
- setSearchParams(localVarUrlObj, localVarQueryParameter);
80
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
81
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
82
- localVarRequestOptions.data = serializeDataIfNeeded(createWithdrawInvoiceRequestDtoRest, localVarRequestOptions, configuration)
83
-
84
- return {
85
- url: toPathString(localVarUrlObj),
86
- options: localVarRequestOptions,
87
- };
88
- },
89
- }
90
- };
91
-
92
- /**
93
- * WithdrawInvoicesApi - functional programming interface
94
- * @export
95
- */
96
- export const WithdrawInvoicesApiFp = function(configuration?: Configuration) {
97
- const localVarAxiosParamCreator = WithdrawInvoicesApiAxiosParamCreator(configuration)
98
- return {
99
- /**
100
- * This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
101
- * @summary Create the Withdraw invoice
102
- * @param {CreateWithdrawInvoiceRequestDtoRest} createWithdrawInvoiceRequestDtoRest
103
- * @param {string} [authorization] Bearer Token
104
- * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
105
- * @param {*} [options] Override http request option.
106
- * @throws {RequiredError}
107
- */
108
- async createWithdrawInvoice(createWithdrawInvoiceRequestDtoRest: CreateWithdrawInvoiceRequestDtoRest, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceResponseClass>> {
109
- const localVarAxiosArgs = await localVarAxiosParamCreator.createWithdrawInvoice(createWithdrawInvoiceRequestDtoRest, authorization, idempotencyKey, options);
110
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
111
- },
112
- }
113
- };
114
-
115
- /**
116
- * WithdrawInvoicesApi - factory interface
117
- * @export
118
- */
119
- export const WithdrawInvoicesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
120
- const localVarFp = WithdrawInvoicesApiFp(configuration)
121
- return {
122
- /**
123
- * This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
124
- * @summary Create the Withdraw invoice
125
- * @param {CreateWithdrawInvoiceRequestDtoRest} createWithdrawInvoiceRequestDtoRest
126
- * @param {string} [authorization] Bearer Token
127
- * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
128
- * @param {*} [options] Override http request option.
129
- * @throws {RequiredError}
130
- */
131
- createWithdrawInvoice(createWithdrawInvoiceRequestDtoRest: CreateWithdrawInvoiceRequestDtoRest, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateInvoiceResponseClass> {
132
- return localVarFp.createWithdrawInvoice(createWithdrawInvoiceRequestDtoRest, authorization, idempotencyKey, options).then((request) => request(axios, basePath));
133
- },
134
- };
135
- };
136
-
137
- /**
138
- * Request parameters for createWithdrawInvoice operation in WithdrawInvoicesApi.
139
- * @export
140
- * @interface WithdrawInvoicesApiCreateWithdrawInvoiceRequest
141
- */
142
- export interface WithdrawInvoicesApiCreateWithdrawInvoiceRequest {
143
- /**
144
- *
145
- * @type {CreateWithdrawInvoiceRequestDtoRest}
146
- * @memberof WithdrawInvoicesApiCreateWithdrawInvoice
147
- */
148
- readonly createWithdrawInvoiceRequestDtoRest: CreateWithdrawInvoiceRequestDtoRest
149
-
150
- /**
151
- * Bearer Token
152
- * @type {string}
153
- * @memberof WithdrawInvoicesApiCreateWithdrawInvoice
154
- */
155
- readonly authorization?: string
156
-
157
- /**
158
- * Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
159
- * @type {string}
160
- * @memberof WithdrawInvoicesApiCreateWithdrawInvoice
161
- */
162
- readonly idempotencyKey?: string
163
- }
164
-
165
- /**
166
- * WithdrawInvoicesApi - object-oriented interface
167
- * @export
168
- * @class WithdrawInvoicesApi
169
- * @extends {BaseAPI}
170
- */
171
- export class WithdrawInvoicesApi extends BaseAPI {
172
- /**
173
- * This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
174
- * @summary Create the Withdraw invoice
175
- * @param {WithdrawInvoicesApiCreateWithdrawInvoiceRequest} requestParameters Request parameters.
176
- * @param {*} [options] Override http request option.
177
- * @throws {RequiredError}
178
- * @memberof WithdrawInvoicesApi
179
- */
180
- public createWithdrawInvoice(requestParameters: WithdrawInvoicesApiCreateWithdrawInvoiceRequest, options?: AxiosRequestConfig) {
181
- return WithdrawInvoicesApiFp(this.configuration).createWithdrawInvoice(requestParameters.createWithdrawInvoiceRequestDtoRest, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
182
- }
183
- }
@@ -1,106 +0,0 @@
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 { CreateInvoiceResponseClass } from '../models';
16
- import { CreateWithdrawInvoiceRequestDtoRest } from '../models';
17
- /**
18
- * WithdrawInvoicesApi - axios parameter creator
19
- * @export
20
- */
21
- export declare const WithdrawInvoicesApiAxiosParamCreator: (configuration?: Configuration) => {
22
- /**
23
- * This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
24
- * @summary Create the Withdraw invoice
25
- * @param {CreateWithdrawInvoiceRequestDtoRest} createWithdrawInvoiceRequestDtoRest
26
- * @param {string} [authorization] Bearer Token
27
- * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
28
- * @param {*} [options] Override http request option.
29
- * @throws {RequiredError}
30
- */
31
- createWithdrawInvoice: (createWithdrawInvoiceRequestDtoRest: CreateWithdrawInvoiceRequestDtoRest, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
32
- };
33
- /**
34
- * WithdrawInvoicesApi - functional programming interface
35
- * @export
36
- */
37
- export declare const WithdrawInvoicesApiFp: (configuration?: Configuration) => {
38
- /**
39
- * This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
40
- * @summary Create the Withdraw invoice
41
- * @param {CreateWithdrawInvoiceRequestDtoRest} createWithdrawInvoiceRequestDtoRest
42
- * @param {string} [authorization] Bearer Token
43
- * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
44
- * @param {*} [options] Override http request option.
45
- * @throws {RequiredError}
46
- */
47
- createWithdrawInvoice(createWithdrawInvoiceRequestDtoRest: CreateWithdrawInvoiceRequestDtoRest, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceResponseClass>>;
48
- };
49
- /**
50
- * WithdrawInvoicesApi - factory interface
51
- * @export
52
- */
53
- export declare const WithdrawInvoicesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
54
- /**
55
- * This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
56
- * @summary Create the Withdraw invoice
57
- * @param {CreateWithdrawInvoiceRequestDtoRest} createWithdrawInvoiceRequestDtoRest
58
- * @param {string} [authorization] Bearer Token
59
- * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
60
- * @param {*} [options] Override http request option.
61
- * @throws {RequiredError}
62
- */
63
- createWithdrawInvoice(createWithdrawInvoiceRequestDtoRest: CreateWithdrawInvoiceRequestDtoRest, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateInvoiceResponseClass>;
64
- };
65
- /**
66
- * Request parameters for createWithdrawInvoice operation in WithdrawInvoicesApi.
67
- * @export
68
- * @interface WithdrawInvoicesApiCreateWithdrawInvoiceRequest
69
- */
70
- export interface WithdrawInvoicesApiCreateWithdrawInvoiceRequest {
71
- /**
72
- *
73
- * @type {CreateWithdrawInvoiceRequestDtoRest}
74
- * @memberof WithdrawInvoicesApiCreateWithdrawInvoice
75
- */
76
- readonly createWithdrawInvoiceRequestDtoRest: CreateWithdrawInvoiceRequestDtoRest;
77
- /**
78
- * Bearer Token
79
- * @type {string}
80
- * @memberof WithdrawInvoicesApiCreateWithdrawInvoice
81
- */
82
- readonly authorization?: string;
83
- /**
84
- * Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
85
- * @type {string}
86
- * @memberof WithdrawInvoicesApiCreateWithdrawInvoice
87
- */
88
- readonly idempotencyKey?: string;
89
- }
90
- /**
91
- * WithdrawInvoicesApi - object-oriented interface
92
- * @export
93
- * @class WithdrawInvoicesApi
94
- * @extends {BaseAPI}
95
- */
96
- export declare class WithdrawInvoicesApi extends BaseAPI {
97
- /**
98
- * This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
99
- * @summary Create the Withdraw invoice
100
- * @param {WithdrawInvoicesApiCreateWithdrawInvoiceRequest} requestParameters Request parameters.
101
- * @param {*} [options] Override http request option.
102
- * @throws {RequiredError}
103
- * @memberof WithdrawInvoicesApi
104
- */
105
- createWithdrawInvoice(requestParameters: WithdrawInvoicesApiCreateWithdrawInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}, any>>;
106
- }
@@ -1,234 +0,0 @@
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.WithdrawInvoicesApi = exports.WithdrawInvoicesApiFactory = exports.WithdrawInvoicesApiFp = exports.WithdrawInvoicesApiAxiosParamCreator = 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
- * WithdrawInvoicesApi - axios parameter creator
90
- * @export
91
- */
92
- var WithdrawInvoicesApiAxiosParamCreator = function (configuration) {
93
- var _this = this;
94
- return {
95
- /**
96
- * This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
97
- * @summary Create the Withdraw invoice
98
- * @param {CreateWithdrawInvoiceRequestDtoRest} createWithdrawInvoiceRequestDtoRest
99
- * @param {string} [authorization] Bearer Token
100
- * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
101
- * @param {*} [options] Override http request option.
102
- * @throws {RequiredError}
103
- */
104
- createWithdrawInvoice: function (createWithdrawInvoiceRequestDtoRest, authorization, idempotencyKey, options) {
105
- if (options === void 0) { options = {}; }
106
- return __awaiter(_this, void 0, void 0, function () {
107
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, idempotencyKeyValue, headersFromBaseOptions;
108
- return __generator(this, function (_a) {
109
- switch (_a.label) {
110
- case 0:
111
- // verify required parameter 'createWithdrawInvoiceRequestDtoRest' is not null or undefined
112
- (0, common_1.assertParamExists)('createWithdrawInvoice', 'createWithdrawInvoiceRequestDtoRest', createWithdrawInvoiceRequestDtoRest);
113
- localVarPath = "/billingservice/v1/withdraw-invoices";
114
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
115
- if (configuration) {
116
- baseOptions = configuration.baseOptions;
117
- baseAccessToken = configuration.accessToken;
118
- }
119
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
120
- localVarHeaderParameter = {};
121
- localVarQueryParameter = {};
122
- // authentication bearer required
123
- // http bearer authentication required
124
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
125
- // Only Authorization falls back to the configured token; an empty value is never sent.
126
- ];
127
- case 1:
128
- // authentication bearer required
129
- // http bearer authentication required
130
- _a.sent();
131
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
132
- if (authorizationValue) {
133
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
134
- }
135
- idempotencyKeyValue = 'Idempotency-Key'.toLowerCase() === 'authorization' ? (idempotencyKey || baseAccessToken) : idempotencyKey;
136
- if (idempotencyKeyValue) {
137
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
138
- }
139
- localVarHeaderParameter['Content-Type'] = 'application/json';
140
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
141
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
142
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
143
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createWithdrawInvoiceRequestDtoRest, localVarRequestOptions, configuration);
144
- return [2 /*return*/, {
145
- url: (0, common_1.toPathString)(localVarUrlObj),
146
- options: localVarRequestOptions,
147
- }];
148
- }
149
- });
150
- });
151
- },
152
- };
153
- };
154
- exports.WithdrawInvoicesApiAxiosParamCreator = WithdrawInvoicesApiAxiosParamCreator;
155
- /**
156
- * WithdrawInvoicesApi - functional programming interface
157
- * @export
158
- */
159
- var WithdrawInvoicesApiFp = function (configuration) {
160
- var localVarAxiosParamCreator = (0, exports.WithdrawInvoicesApiAxiosParamCreator)(configuration);
161
- return {
162
- /**
163
- * This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
164
- * @summary Create the Withdraw invoice
165
- * @param {CreateWithdrawInvoiceRequestDtoRest} createWithdrawInvoiceRequestDtoRest
166
- * @param {string} [authorization] Bearer Token
167
- * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
168
- * @param {*} [options] Override http request option.
169
- * @throws {RequiredError}
170
- */
171
- createWithdrawInvoice: function (createWithdrawInvoiceRequestDtoRest, authorization, idempotencyKey, options) {
172
- return __awaiter(this, void 0, void 0, function () {
173
- var localVarAxiosArgs;
174
- return __generator(this, function (_a) {
175
- switch (_a.label) {
176
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.createWithdrawInvoice(createWithdrawInvoiceRequestDtoRest, authorization, idempotencyKey, options)];
177
- case 1:
178
- localVarAxiosArgs = _a.sent();
179
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
180
- }
181
- });
182
- });
183
- },
184
- };
185
- };
186
- exports.WithdrawInvoicesApiFp = WithdrawInvoicesApiFp;
187
- /**
188
- * WithdrawInvoicesApi - factory interface
189
- * @export
190
- */
191
- var WithdrawInvoicesApiFactory = function (configuration, basePath, axios) {
192
- var localVarFp = (0, exports.WithdrawInvoicesApiFp)(configuration);
193
- return {
194
- /**
195
- * This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
196
- * @summary Create the Withdraw invoice
197
- * @param {CreateWithdrawInvoiceRequestDtoRest} createWithdrawInvoiceRequestDtoRest
198
- * @param {string} [authorization] Bearer Token
199
- * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
200
- * @param {*} [options] Override http request option.
201
- * @throws {RequiredError}
202
- */
203
- createWithdrawInvoice: function (createWithdrawInvoiceRequestDtoRest, authorization, idempotencyKey, options) {
204
- return localVarFp.createWithdrawInvoice(createWithdrawInvoiceRequestDtoRest, authorization, idempotencyKey, options).then(function (request) { return request(axios, basePath); });
205
- },
206
- };
207
- };
208
- exports.WithdrawInvoicesApiFactory = WithdrawInvoicesApiFactory;
209
- /**
210
- * WithdrawInvoicesApi - object-oriented interface
211
- * @export
212
- * @class WithdrawInvoicesApi
213
- * @extends {BaseAPI}
214
- */
215
- var WithdrawInvoicesApi = /** @class */ (function (_super) {
216
- __extends(WithdrawInvoicesApi, _super);
217
- function WithdrawInvoicesApi() {
218
- return _super !== null && _super.apply(this, arguments) || this;
219
- }
220
- /**
221
- * This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
222
- * @summary Create the Withdraw invoice
223
- * @param {WithdrawInvoicesApiCreateWithdrawInvoiceRequest} requestParameters Request parameters.
224
- * @param {*} [options] Override http request option.
225
- * @throws {RequiredError}
226
- * @memberof WithdrawInvoicesApi
227
- */
228
- WithdrawInvoicesApi.prototype.createWithdrawInvoice = function (requestParameters, options) {
229
- var _this = this;
230
- return (0, exports.WithdrawInvoicesApiFp)(this.configuration).createWithdrawInvoice(requestParameters.createWithdrawInvoiceRequestDtoRest, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
231
- };
232
- return WithdrawInvoicesApi;
233
- }(base_1.BaseAPI));
234
- exports.WithdrawInvoicesApi = WithdrawInvoicesApi;
@@ -1,50 +0,0 @@
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
- /**
13
- *
14
- * @export
15
- * @interface CreateWithdrawInvoiceRequestDtoRest
16
- */
17
- export interface CreateWithdrawInvoiceRequestDtoRest {
18
- /**
19
- * Unique identifier of the policy that this object belongs to.
20
- * @type {string}
21
- * @memberof CreateWithdrawInvoiceRequestDtoRest
22
- */
23
- 'policyCode': string;
24
- /**
25
- * Account number.
26
- * @type {string}
27
- * @memberof CreateWithdrawInvoiceRequestDtoRest
28
- */
29
- 'accountNumber': string;
30
- /**
31
- * Policy number.
32
- * @type {string}
33
- * @memberof CreateWithdrawInvoiceRequestDtoRest
34
- */
35
- 'policyNumber': string;
36
- /**
37
- * This is the date from which the invoice interval starts.
38
- * @type {string}
39
- * @memberof CreateWithdrawInvoiceRequestDtoRest
40
- */
41
- 'billingIntervalFrom': string;
42
- /**
43
- * Metadata contains extra information that the object would need for specific cases.
44
- * @type {{ [key: string]: object; }}
45
- * @memberof CreateWithdrawInvoiceRequestDtoRest
46
- */
47
- 'metadata'?: {
48
- [key: string]: object;
49
- };
50
- }
@@ -1,15 +0,0 @@
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 });
@@ -1,50 +0,0 @@
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
- /**
13
- *
14
- * @export
15
- * @interface CreateWithdrawInvoiceRequestDto
16
- */
17
- export interface CreateWithdrawInvoiceRequestDto {
18
- /**
19
- *
20
- * @type {string}
21
- * @memberof CreateWithdrawInvoiceRequestDto
22
- */
23
- 'policyCode': string;
24
- /**
25
- *
26
- * @type {string}
27
- * @memberof CreateWithdrawInvoiceRequestDto
28
- */
29
- 'accountNumber': string;
30
- /**
31
- *
32
- * @type {{ [key: string]: object; }}
33
- * @memberof CreateWithdrawInvoiceRequestDto
34
- */
35
- 'metadata'?: {
36
- [key: string]: object;
37
- };
38
- /**
39
- *
40
- * @type {string}
41
- * @memberof CreateWithdrawInvoiceRequestDto
42
- */
43
- 'billingIntervalFrom': string;
44
- /**
45
- *
46
- * @type {string}
47
- * @memberof CreateWithdrawInvoiceRequestDto
48
- */
49
- 'policyNumber': string;
50
- }
@@ -1,15 +0,0 @@
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 });