@emilgroup/billing-v2-sdk 0.0.0-stage → 1.0.1-beta.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.
- package/.openapi-generator/FILES +93 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +50 -2
- package/api/bill-runs-api.ts +468 -0
- package/api/bills-api.ts +145 -0
- package/api/invoices-api.ts +1530 -0
- package/api/jobs-api.ts +756 -0
- package/api/policy-billings-api.ts +591 -0
- package/api.ts +35 -0
- package/base.ts +588 -0
- package/common.ts +199 -0
- package/configuration.ts +130 -0
- package/dist/api/bill-runs-api.d.ts +266 -0
- package/dist/api/bill-runs-api.js +466 -0
- package/dist/api/bills-api.d.ts +87 -0
- package/dist/api/bills-api.js +207 -0
- package/dist/api/invoices-api.d.ts +847 -0
- package/dist/api/invoices-api.js +1353 -0
- package/dist/api/jobs-api.d.ts +426 -0
- package/dist/api/jobs-api.js +708 -0
- package/dist/api/policy-billings-api.d.ts +332 -0
- package/dist/api/policy-billings-api.js +561 -0
- package/dist/api.d.ts +16 -0
- package/dist/api.js +34 -0
- package/dist/base.d.ts +120 -0
- package/dist/base.js +604 -0
- package/dist/common.d.ts +91 -0
- package/dist/common.js +277 -0
- package/dist/configuration.d.ts +106 -0
- package/dist/configuration.js +54 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +36 -0
- package/dist/models/any.d.ts +25 -0
- package/dist/models/any.js +15 -0
- package/dist/models/bill-item.d.ts +132 -0
- package/dist/models/bill-item.js +15 -0
- package/dist/models/bill-run.d.ts +145 -0
- package/dist/models/bill-run.js +15 -0
- package/dist/models/bill.d.ts +194 -0
- package/dist/models/bill.js +15 -0
- package/dist/models/cancel-job-response.d.ts +25 -0
- package/dist/models/cancel-job-response.js +15 -0
- package/dist/models/create-correction-invoices-request.d.ts +72 -0
- package/dist/models/create-correction-invoices-request.js +15 -0
- package/dist/models/create-correction-invoices-response.d.ts +31 -0
- package/dist/models/create-correction-invoices-response.js +15 -0
- package/dist/models/create-detail-export-job-request.d.ts +56 -0
- package/dist/models/create-detail-export-job-request.js +15 -0
- package/dist/models/create-detail-export-job-response.d.ts +25 -0
- package/dist/models/create-detail-export-job-response.js +15 -0
- package/dist/models/create-estimated-invoice-for-interval-request.d.ts +42 -0
- package/dist/models/create-estimated-invoice-for-interval-request.js +15 -0
- package/dist/models/create-estimated-invoice-for-interval-response.d.ts +25 -0
- package/dist/models/create-estimated-invoice-for-interval-response.js +15 -0
- package/dist/models/create-estimated-invoice-request.d.ts +36 -0
- package/dist/models/create-estimated-invoice-request.js +15 -0
- package/dist/models/create-estimated-invoice-response.d.ts +25 -0
- package/dist/models/create-estimated-invoice-response.js +15 -0
- package/dist/models/create-export-job-request.d.ts +68 -0
- package/dist/models/create-export-job-request.js +15 -0
- package/dist/models/create-export-job-response.d.ts +25 -0
- package/dist/models/create-export-job-response.js +15 -0
- package/dist/models/create-initial-invoice-request.d.ts +72 -0
- package/dist/models/create-initial-invoice-request.js +15 -0
- package/dist/models/create-initial-invoice-response.d.ts +25 -0
- package/dist/models/create-initial-invoice-response.js +15 -0
- package/dist/models/create-invoice-request.d.ts +67 -0
- package/dist/models/create-invoice-request.js +15 -0
- package/dist/models/create-invoice-response.d.ts +25 -0
- package/dist/models/create-invoice-response.js +15 -0
- package/dist/models/create-invoice-status-body.d.ts +24 -0
- package/dist/models/create-invoice-status-body.js +15 -0
- package/dist/models/create-invoice-status-response.d.ts +25 -0
- package/dist/models/create-invoice-status-response.js +15 -0
- package/dist/models/create-item-request.d.ts +36 -0
- package/dist/models/create-item-request.js +15 -0
- package/dist/models/create-policy-billing-request.d.ts +42 -0
- package/dist/models/create-policy-billing-request.js +15 -0
- package/dist/models/create-policy-billing-response.d.ts +25 -0
- package/dist/models/create-policy-billing-response.js +15 -0
- package/dist/models/create-recurring-invoice-request.d.ts +72 -0
- package/dist/models/create-recurring-invoice-request.js +15 -0
- package/dist/models/create-recurring-invoice-response.d.ts +31 -0
- package/dist/models/create-recurring-invoice-response.js +15 -0
- package/dist/models/create-termination-invoice-request.d.ts +60 -0
- package/dist/models/create-termination-invoice-request.js +15 -0
- package/dist/models/create-termination-invoice-response.d.ts +25 -0
- package/dist/models/create-termination-invoice-response.js +15 -0
- package/dist/models/create-withdraw-invoice-request.d.ts +48 -0
- package/dist/models/create-withdraw-invoice-request.js +15 -0
- package/dist/models/create-withdraw-invoice-response.d.ts +25 -0
- package/dist/models/create-withdraw-invoice-response.js +15 -0
- package/dist/models/estimate-history-entry.d.ts +36 -0
- package/dist/models/estimate-history-entry.js +15 -0
- package/dist/models/export-column.d.ts +36 -0
- package/dist/models/export-column.js +15 -0
- package/dist/models/filter-field.d.ts +110 -0
- package/dist/models/filter-field.js +15 -0
- package/dist/models/filter-value.d.ts +37 -0
- package/dist/models/filter-value.js +15 -0
- package/dist/models/get-bill-response.d.ts +25 -0
- package/dist/models/get-bill-response.js +15 -0
- package/dist/models/get-bill-run-filter-catalog-response.d.ts +31 -0
- package/dist/models/get-bill-run-filter-catalog-response.js +15 -0
- package/dist/models/get-bill-run-response.d.ts +25 -0
- package/dist/models/get-bill-run-response.js +15 -0
- package/dist/models/get-invoice-filter-catalog-response.d.ts +31 -0
- package/dist/models/get-invoice-filter-catalog-response.js +15 -0
- package/dist/models/get-invoice-response.d.ts +25 -0
- package/dist/models/get-invoice-response.js +15 -0
- package/dist/models/get-job-download-response.d.ts +25 -0
- package/dist/models/get-job-download-response.js +15 -0
- package/dist/models/get-job-filter-catalog-response.d.ts +31 -0
- package/dist/models/get-job-filter-catalog-response.js +15 -0
- package/dist/models/get-job-response.d.ts +25 -0
- package/dist/models/get-job-response.js +15 -0
- package/dist/models/get-policies-billing-date-filter-catalog-response.d.ts +31 -0
- package/dist/models/get-policies-billing-date-filter-catalog-response.js +15 -0
- package/dist/models/get-policies-billing-filter-catalog-response.d.ts +31 -0
- package/dist/models/get-policies-billing-filter-catalog-response.js +15 -0
- package/dist/models/get-policy-billing-response.d.ts +25 -0
- package/dist/models/get-policy-billing-response.js +15 -0
- package/dist/models/highlight.d.ts +30 -0
- package/dist/models/highlight.js +15 -0
- package/dist/models/index.d.ts +75 -0
- package/dist/models/index.js +91 -0
- package/dist/models/invoice-item.d.ts +204 -0
- package/dist/models/invoice-item.js +15 -0
- package/dist/models/invoice-payment.d.ts +108 -0
- package/dist/models/invoice-payment.js +15 -0
- package/dist/models/invoice-payments.d.ts +25 -0
- package/dist/models/invoice-payments.js +15 -0
- package/dist/models/invoice-status.d.ts +54 -0
- package/dist/models/invoice-status.js +15 -0
- package/dist/models/invoice.d.ts +275 -0
- package/dist/models/invoice.js +15 -0
- package/dist/models/job-download.d.ts +36 -0
- package/dist/models/job-download.js +15 -0
- package/dist/models/job-error.d.ts +30 -0
- package/dist/models/job-error.js +15 -0
- package/dist/models/job-progress.d.ts +36 -0
- package/dist/models/job-progress.js +15 -0
- package/dist/models/job.d.ts +134 -0
- package/dist/models/job.js +15 -0
- package/dist/models/list-bill-runs-response.d.ts +37 -0
- package/dist/models/list-bill-runs-response.js +15 -0
- package/dist/models/list-invoices-response.d.ts +37 -0
- package/dist/models/list-invoices-response.js +15 -0
- package/dist/models/list-jobs-response.d.ts +37 -0
- package/dist/models/list-jobs-response.js +15 -0
- package/dist/models/list-policies-billing-dates-response.d.ts +37 -0
- package/dist/models/list-policies-billing-dates-response.js +15 -0
- package/dist/models/list-policies-billings-response.d.ts +37 -0
- package/dist/models/list-policies-billings-response.js +15 -0
- package/dist/models/list-request.d.ts +60 -0
- package/dist/models/list-request.js +15 -0
- package/dist/models/localized-text.d.ts +30 -0
- package/dist/models/localized-text.js +15 -0
- package/dist/models/match.d.ts +69 -0
- package/dist/models/match.js +15 -0
- package/dist/models/payment-term.d.ts +42 -0
- package/dist/models/payment-term.js +15 -0
- package/dist/models/policy-billing.d.ts +139 -0
- package/dist/models/policy-billing.js +15 -0
- package/dist/models/request-bill-run-request.d.ts +30 -0
- package/dist/models/request-bill-run-request.js +15 -0
- package/dist/models/request-bill-run-response.d.ts +25 -0
- package/dist/models/request-bill-run-response.js +15 -0
- package/dist/models/resolved-billing-config.d.ts +130 -0
- package/dist/models/resolved-billing-config.js +15 -0
- package/dist/models/revert-invoice-request.d.ts +24 -0
- package/dist/models/revert-invoice-request.js +15 -0
- package/dist/models/revert-invoice-response.d.ts +25 -0
- package/dist/models/revert-invoice-response.js +15 -0
- package/dist/models/slice.d.ts +30 -0
- package/dist/models/slice.js +15 -0
- package/dist/models/status.d.ts +37 -0
- package/dist/models/status.js +15 -0
- package/dist/models/tax.d.ts +30 -0
- package/dist/models/tax.js +15 -0
- package/dist/models/update-policy-billing-body.d.ts +24 -0
- package/dist/models/update-policy-billing-body.js +15 -0
- package/dist/models/update-policy-billing-response.d.ts +25 -0
- package/dist/models/update-policy-billing-response.js +15 -0
- package/git_push.sh +57 -0
- package/index.ts +19 -0
- package/models/any.ts +32 -0
- package/models/bill-item.ts +138 -0
- package/models/bill-run.ts +151 -0
- package/models/bill.ts +200 -0
- package/models/cancel-job-response.ts +31 -0
- package/models/create-correction-invoices-request.ts +78 -0
- package/models/create-correction-invoices-response.ts +37 -0
- package/models/create-detail-export-job-request.ts +60 -0
- package/models/create-detail-export-job-response.ts +31 -0
- package/models/create-estimated-invoice-for-interval-request.ts +48 -0
- package/models/create-estimated-invoice-for-interval-response.ts +31 -0
- package/models/create-estimated-invoice-request.ts +42 -0
- package/models/create-estimated-invoice-response.ts +31 -0
- package/models/create-export-job-request.ts +74 -0
- package/models/create-export-job-response.ts +31 -0
- package/models/create-initial-invoice-request.ts +78 -0
- package/models/create-initial-invoice-response.ts +31 -0
- package/models/create-invoice-request.ts +73 -0
- package/models/create-invoice-response.ts +31 -0
- package/models/create-invoice-status-body.ts +30 -0
- package/models/create-invoice-status-response.ts +31 -0
- package/models/create-item-request.ts +42 -0
- package/models/create-policy-billing-request.ts +48 -0
- package/models/create-policy-billing-response.ts +31 -0
- package/models/create-recurring-invoice-request.ts +78 -0
- package/models/create-recurring-invoice-response.ts +37 -0
- package/models/create-termination-invoice-request.ts +66 -0
- package/models/create-termination-invoice-response.ts +31 -0
- package/models/create-withdraw-invoice-request.ts +54 -0
- package/models/create-withdraw-invoice-response.ts +31 -0
- package/models/estimate-history-entry.ts +42 -0
- package/models/export-column.ts +42 -0
- package/models/filter-field.ts +116 -0
- package/models/filter-value.ts +43 -0
- package/models/get-bill-response.ts +31 -0
- package/models/get-bill-run-filter-catalog-response.ts +37 -0
- package/models/get-bill-run-response.ts +31 -0
- package/models/get-invoice-filter-catalog-response.ts +37 -0
- package/models/get-invoice-response.ts +31 -0
- package/models/get-job-download-response.ts +31 -0
- package/models/get-job-filter-catalog-response.ts +37 -0
- package/models/get-job-response.ts +31 -0
- package/models/get-policies-billing-date-filter-catalog-response.ts +37 -0
- package/models/get-policies-billing-filter-catalog-response.ts +37 -0
- package/models/get-policy-billing-response.ts +31 -0
- package/models/highlight.ts +36 -0
- package/models/index.ts +75 -0
- package/models/invoice-item.ts +210 -0
- package/models/invoice-payment.ts +114 -0
- package/models/invoice-payments.ts +31 -0
- package/models/invoice-status.ts +60 -0
- package/models/invoice.ts +281 -0
- package/models/job-download.ts +42 -0
- package/models/job-error.ts +36 -0
- package/models/job-progress.ts +42 -0
- package/models/job.ts +140 -0
- package/models/list-bill-runs-response.ts +43 -0
- package/models/list-invoices-response.ts +43 -0
- package/models/list-jobs-response.ts +43 -0
- package/models/list-policies-billing-dates-response.ts +43 -0
- package/models/list-policies-billings-response.ts +43 -0
- package/models/list-request.ts +66 -0
- package/models/localized-text.ts +36 -0
- package/models/match.ts +75 -0
- package/models/payment-term.ts +48 -0
- package/models/policy-billing.ts +145 -0
- package/models/request-bill-run-request.ts +36 -0
- package/models/request-bill-run-response.ts +31 -0
- package/models/resolved-billing-config.ts +134 -0
- package/models/revert-invoice-request.ts +30 -0
- package/models/revert-invoice-response.ts +31 -0
- package/models/slice.ts +36 -0
- package/models/status.ts +43 -0
- package/models/tax.ts +36 -0
- package/models/update-policy-billing-body.ts +30 -0
- package/models/update-policy-billing-response.ts +31 -0
- package/package.json +25 -4
- package/tsconfig.json +23 -0
|
@@ -0,0 +1,1353 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* EMIL Billing Service
|
|
6
|
+
* The billing service: bills, bill runs, invoices and policy billings.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2.0
|
|
9
|
+
*
|
|
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.InvoicesApi = exports.InvoicesApiFactory = exports.InvoicesApiFp = exports.InvoicesApiAxiosParamCreator = 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
|
+
* InvoicesApi - axios parameter creator
|
|
90
|
+
* @export
|
|
91
|
+
*/
|
|
92
|
+
var InvoicesApiAxiosParamCreator = function (configuration) {
|
|
93
|
+
var _this = this;
|
|
94
|
+
return {
|
|
95
|
+
/**
|
|
96
|
+
* Every invoiced period that overlaps the request\'s interval is priced again from the policy\'s current state and compared with its last invoiced bill; without an interval, every invoiced period is. One `correction` invoice is created for each period with a difference. No invoice is created, and the response has `noChange` true, when the total difference is zero (the new bill is recorded). No invoice is created either when the difference is below the `minCorrectionAmount` of the billing configuration, or when its `midTermChange` is `NEXT_PERIOD`: then the difference goes into the next recurring invoice. For a member billed through its group policy, the correction invoice belongs to the group policy. Each correction carries `metadata.correctedInvoiceErn`, the invoice it corrects. A `refunded` invoice is not corrected.
|
|
97
|
+
* @summary Creates correction invoices for a policy.
|
|
98
|
+
* @param {CreateCorrectionInvoicesRequest} body The request of `CreateCorrectionInvoices`. Only `policyCode`, the billing interval and `metadata` are read. Without an interval, every invoiced period is corrected; with it, the invoiced bills of that period.
|
|
99
|
+
* @param {*} [options] Override http request option.
|
|
100
|
+
* @throws {RequiredError}
|
|
101
|
+
*/
|
|
102
|
+
billingServiceCreateCorrectionInvoices: function (body, 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
|
+
// verify required parameter 'body' is not null or undefined
|
|
108
|
+
(0, common_1.assertParamExists)('billingServiceCreateCorrectionInvoices', 'body', body);
|
|
109
|
+
localVarPath = "/billingservice/v2/correction-invoices";
|
|
110
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
111
|
+
if (configuration) {
|
|
112
|
+
baseOptions = configuration.baseOptions;
|
|
113
|
+
baseAccessToken = configuration.accessToken;
|
|
114
|
+
}
|
|
115
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
116
|
+
localVarHeaderParameter = {};
|
|
117
|
+
localVarQueryParameter = {};
|
|
118
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
119
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
120
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
121
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
122
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
123
|
+
return [2 /*return*/, {
|
|
124
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
125
|
+
options: localVarRequestOptions,
|
|
126
|
+
}];
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
},
|
|
130
|
+
/**
|
|
131
|
+
* The estimate is priced on request and stored, and it replaces an earlier estimate of the same period. For a period that is already invoiced nothing is stored. For a policy the response has no `code` and `metadata.invoiced` is `\"true\"`; for a group policy it is the period\'s issued invoice. The policy is read by its code, so no policy data is sent. The request\'s `metadata` is not stored. For a member billed through its group policy, the group policy\'s estimate is returned; the member\'s line is on it.
|
|
132
|
+
* @summary Creates an estimate for the running period of a policy.
|
|
133
|
+
* @param {CreateEstimatedInvoiceRequest} body The request of `CreateEstimatedInvoice`. No policy data is sent: the policy is read by its code, and partial periods are prorated by the day count basis of its billing configuration.
|
|
134
|
+
* @param {*} [options] Override http request option.
|
|
135
|
+
* @throws {RequiredError}
|
|
136
|
+
*/
|
|
137
|
+
billingServiceCreateEstimatedInvoice: function (body, options) {
|
|
138
|
+
if (options === void 0) { options = {}; }
|
|
139
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
140
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
141
|
+
return __generator(this, function (_a) {
|
|
142
|
+
// verify required parameter 'body' is not null or undefined
|
|
143
|
+
(0, common_1.assertParamExists)('billingServiceCreateEstimatedInvoice', 'body', body);
|
|
144
|
+
localVarPath = "/billingservice/v2/estimated-invoices";
|
|
145
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
146
|
+
if (configuration) {
|
|
147
|
+
baseOptions = configuration.baseOptions;
|
|
148
|
+
baseAccessToken = configuration.accessToken;
|
|
149
|
+
}
|
|
150
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
151
|
+
localVarHeaderParameter = {};
|
|
152
|
+
localVarQueryParameter = {};
|
|
153
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
154
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
155
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
156
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
157
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
158
|
+
return [2 /*return*/, {
|
|
159
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
160
|
+
options: localVarRequestOptions,
|
|
161
|
+
}];
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
},
|
|
165
|
+
/**
|
|
166
|
+
* `billingIntervalFrom` and `billingIntervalTo` are required, and the end must be after the start. The estimate is stored and replaced as in `CreateEstimatedInvoice`, and everything else is as there.
|
|
167
|
+
* @summary Creates an estimate for an explicit period of a policy.
|
|
168
|
+
* @param {CreateEstimatedInvoiceForIntervalRequest} body The request of `CreateEstimatedInvoiceForInterval`.
|
|
169
|
+
* @param {*} [options] Override http request option.
|
|
170
|
+
* @throws {RequiredError}
|
|
171
|
+
*/
|
|
172
|
+
billingServiceCreateEstimatedInvoiceForInterval: function (body, options) {
|
|
173
|
+
if (options === void 0) { options = {}; }
|
|
174
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
175
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
176
|
+
return __generator(this, function (_a) {
|
|
177
|
+
// verify required parameter 'body' is not null or undefined
|
|
178
|
+
(0, common_1.assertParamExists)('billingServiceCreateEstimatedInvoiceForInterval', 'body', body);
|
|
179
|
+
localVarPath = "/billingservice/v2/estimated-invoices/interval";
|
|
180
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
181
|
+
if (configuration) {
|
|
182
|
+
baseOptions = configuration.baseOptions;
|
|
183
|
+
baseAccessToken = configuration.accessToken;
|
|
184
|
+
}
|
|
185
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
186
|
+
localVarHeaderParameter = {};
|
|
187
|
+
localVarQueryParameter = {};
|
|
188
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
189
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
190
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
191
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
192
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
193
|
+
return [2 /*return*/, {
|
|
194
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
195
|
+
options: localVarRequestOptions,
|
|
196
|
+
}];
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
},
|
|
200
|
+
/**
|
|
201
|
+
* Premium items that are billed once appear on this invoice only. It takes the same request and follows the same rules as `CreateRecurringInvoice`. On a policy that was invoiced before, it creates a `recurring` invoice for the next period. For a group policy whose period no member covers, the response holds an empty invoice.
|
|
202
|
+
* @summary Creates the first invoice of a policy.
|
|
203
|
+
* @param {CreateInitialInvoiceRequest} body The request of `CreateInitialInvoice`. The billing interval is optional: without it the invoice bills the next period of the policy\'s schedule, with it that period. The request has the same fields as `CreateRecurringInvoiceRequest`.
|
|
204
|
+
* @param {*} [options] Override http request option.
|
|
205
|
+
* @throws {RequiredError}
|
|
206
|
+
*/
|
|
207
|
+
billingServiceCreateInitialInvoice: function (body, options) {
|
|
208
|
+
if (options === void 0) { options = {}; }
|
|
209
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
210
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
211
|
+
return __generator(this, function (_a) {
|
|
212
|
+
// verify required parameter 'body' is not null or undefined
|
|
213
|
+
(0, common_1.assertParamExists)('billingServiceCreateInitialInvoice', 'body', body);
|
|
214
|
+
localVarPath = "/billingservice/v2/initial-invoices";
|
|
215
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
216
|
+
if (configuration) {
|
|
217
|
+
baseOptions = configuration.baseOptions;
|
|
218
|
+
baseAccessToken = configuration.accessToken;
|
|
219
|
+
}
|
|
220
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
221
|
+
localVarHeaderParameter = {};
|
|
222
|
+
localVarQueryParameter = {};
|
|
223
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
224
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
225
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
226
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
227
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
228
|
+
return [2 /*return*/, {
|
|
229
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
230
|
+
options: localVarRequestOptions,
|
|
231
|
+
}];
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
},
|
|
235
|
+
/**
|
|
236
|
+
* `type` defaults to `other`. The types `estimated` and `penalty` are refused. `items` must hold at least one item, and the billing interval is required. Each line is `quantity` times `pricePerUnit`, rounded in the currency of the billing configuration; no tax is added.
|
|
237
|
+
* @summary Creates a manual invoice with free items.
|
|
238
|
+
* @param {CreateInvoiceRequest} body The request of `CreateInvoice`: a manual invoice with free items.
|
|
239
|
+
* @param {*} [options] Override http request option.
|
|
240
|
+
* @throws {RequiredError}
|
|
241
|
+
*/
|
|
242
|
+
billingServiceCreateInvoice: function (body, options) {
|
|
243
|
+
if (options === void 0) { options = {}; }
|
|
244
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
245
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
246
|
+
return __generator(this, function (_a) {
|
|
247
|
+
// verify required parameter 'body' is not null or undefined
|
|
248
|
+
(0, common_1.assertParamExists)('billingServiceCreateInvoice', 'body', body);
|
|
249
|
+
localVarPath = "/billingservice/v2/invoices";
|
|
250
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
251
|
+
if (configuration) {
|
|
252
|
+
baseOptions = configuration.baseOptions;
|
|
253
|
+
baseAccessToken = configuration.accessToken;
|
|
254
|
+
}
|
|
255
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
256
|
+
localVarHeaderParameter = {};
|
|
257
|
+
localVarQueryParameter = {};
|
|
258
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
259
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
260
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
261
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
262
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
263
|
+
return [2 /*return*/, {
|
|
264
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
265
|
+
options: localVarRequestOptions,
|
|
266
|
+
}];
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
},
|
|
270
|
+
/**
|
|
271
|
+
* The invoice\'s `status` becomes that status. The status is one of `open`, `paid`, `partially-paid` and `refunded`. An estimate has no status rows. The response is the new row.
|
|
272
|
+
* @summary Adds a status row to an invoice.
|
|
273
|
+
* @param {string} invoiceCode The code of the invoice.
|
|
274
|
+
* @param {CreateInvoiceStatusBody} body
|
|
275
|
+
* @param {*} [options] Override http request option.
|
|
276
|
+
* @throws {RequiredError}
|
|
277
|
+
*/
|
|
278
|
+
billingServiceCreateInvoiceStatus: function (invoiceCode, body, options) {
|
|
279
|
+
if (options === void 0) { options = {}; }
|
|
280
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
281
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
282
|
+
return __generator(this, function (_a) {
|
|
283
|
+
// verify required parameter 'invoiceCode' is not null or undefined
|
|
284
|
+
(0, common_1.assertParamExists)('billingServiceCreateInvoiceStatus', 'invoiceCode', invoiceCode);
|
|
285
|
+
// verify required parameter 'body' is not null or undefined
|
|
286
|
+
(0, common_1.assertParamExists)('billingServiceCreateInvoiceStatus', 'body', body);
|
|
287
|
+
localVarPath = "/billingservice/v2/invoices/{invoiceCode}/statuses"
|
|
288
|
+
.replace("{".concat("invoiceCode", "}"), encodeURIComponent(String(invoiceCode)));
|
|
289
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
290
|
+
if (configuration) {
|
|
291
|
+
baseOptions = configuration.baseOptions;
|
|
292
|
+
baseAccessToken = configuration.accessToken;
|
|
293
|
+
}
|
|
294
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
295
|
+
localVarHeaderParameter = {};
|
|
296
|
+
localVarQueryParameter = {};
|
|
297
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
298
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
299
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
300
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
301
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
302
|
+
return [2 /*return*/, {
|
|
303
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
304
|
+
options: localVarRequestOptions,
|
|
305
|
+
}];
|
|
306
|
+
});
|
|
307
|
+
});
|
|
308
|
+
},
|
|
309
|
+
/**
|
|
310
|
+
* Without `billingIntervalFrom` and `billingIntervalTo` the invoice bills the next period of the policy\'s schedule, and the schedule always moves on to the period after it. With them the invoice bills that period, and the schedule moves on only when `shouldSetNextBillingDate` is true. A repeated call without an interval returns the invoice that already exists for the period and moves nothing. A period that is already invoiced cannot be invoiced again with an interval. A policy without a billing schedule row gets one first, as `CreatePolicyBilling` opens it. The first invoice of a policy has the type `initial`, whichever creation RPC makes it. For a group policy whose next period no member covers, nothing is created, `noChange` is true and the schedule moves on. With an interval nothing is created.
|
|
311
|
+
* @summary Creates the recurring invoice for the next period of a policy.
|
|
312
|
+
* @param {CreateRecurringInvoiceRequest} body The request of `CreateRecurringInvoice`. The billing interval is optional: without it the invoice bills the next period of the policy\'s schedule, with it that period. The request has the same fields as `CreateInitialInvoiceRequest`.
|
|
313
|
+
* @param {*} [options] Override http request option.
|
|
314
|
+
* @throws {RequiredError}
|
|
315
|
+
*/
|
|
316
|
+
billingServiceCreateRecurringInvoice: function (body, options) {
|
|
317
|
+
if (options === void 0) { options = {}; }
|
|
318
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
319
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
320
|
+
return __generator(this, function (_a) {
|
|
321
|
+
// verify required parameter 'body' is not null or undefined
|
|
322
|
+
(0, common_1.assertParamExists)('billingServiceCreateRecurringInvoice', 'body', body);
|
|
323
|
+
localVarPath = "/billingservice/v2/recurring-invoices";
|
|
324
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
325
|
+
if (configuration) {
|
|
326
|
+
baseOptions = configuration.baseOptions;
|
|
327
|
+
baseAccessToken = configuration.accessToken;
|
|
328
|
+
}
|
|
329
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
330
|
+
localVarHeaderParameter = {};
|
|
331
|
+
localVarQueryParameter = {};
|
|
332
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
333
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
334
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
335
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
336
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
337
|
+
return [2 /*return*/, {
|
|
338
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
339
|
+
options: localVarRequestOptions,
|
|
340
|
+
}];
|
|
341
|
+
});
|
|
342
|
+
});
|
|
343
|
+
},
|
|
344
|
+
/**
|
|
345
|
+
* The invoiced periods after the termination date are compared with bills shortened to the covered days. This applies when the `terminationRefund` of the billing configuration is `PRO_RATA`; a negative total is the refund. One `final` invoice is created for each affected period, and the response carries the newest. No invoice is created when `terminationRefund` is `NONE`, and none either when neither the request nor the policy gives an end date. The status of the policy\'s schedule row, if it has one, becomes `terminated`. Each final invoice carries `metadata.terminatedFrom` and `metadata.correctedInvoiceErn`.
|
|
346
|
+
* @summary Creates the final invoice of a terminated policy.
|
|
347
|
+
* @param {CreateTerminationInvoiceRequest} body The request of `CreateTerminationInvoice`. `billingIntervalFrom`, `accountNumber`, `policyNumber` and `invoiceNumber` are ignored.
|
|
348
|
+
* @param {*} [options] Override http request option.
|
|
349
|
+
* @throws {RequiredError}
|
|
350
|
+
*/
|
|
351
|
+
billingServiceCreateTerminationInvoice: function (body, options) {
|
|
352
|
+
if (options === void 0) { options = {}; }
|
|
353
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
354
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
355
|
+
return __generator(this, function (_a) {
|
|
356
|
+
// verify required parameter 'body' is not null or undefined
|
|
357
|
+
(0, common_1.assertParamExists)('billingServiceCreateTerminationInvoice', 'body', body);
|
|
358
|
+
localVarPath = "/billingservice/v2/termination-invoices";
|
|
359
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
360
|
+
if (configuration) {
|
|
361
|
+
baseOptions = configuration.baseOptions;
|
|
362
|
+
baseAccessToken = configuration.accessToken;
|
|
363
|
+
}
|
|
364
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
365
|
+
localVarHeaderParameter = {};
|
|
366
|
+
localVarQueryParameter = {};
|
|
367
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
368
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
369
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
370
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
371
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
372
|
+
return [2 /*return*/, {
|
|
373
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
374
|
+
options: localVarRequestOptions,
|
|
375
|
+
}];
|
|
376
|
+
});
|
|
377
|
+
});
|
|
378
|
+
},
|
|
379
|
+
/**
|
|
380
|
+
* Every invoice of the policy that is not yet reversed is reversed in one `withdraw` invoice, and each of them becomes `refunded`. The status of the policy\'s schedule row, if it has one, becomes `withdrawn`. When no invoice is left to reverse, nothing is created. Only `policyCode` and `metadata` are read.
|
|
381
|
+
* @summary Creates a withdraw invoice for a policy that never came into force.
|
|
382
|
+
* @param {CreateWithdrawInvoiceRequest} body The request of `CreateWithdrawInvoice`. Only `policyCode` and `metadata` are read.
|
|
383
|
+
* @param {*} [options] Override http request option.
|
|
384
|
+
* @throws {RequiredError}
|
|
385
|
+
*/
|
|
386
|
+
billingServiceCreateWithdrawInvoice: function (body, options) {
|
|
387
|
+
if (options === void 0) { options = {}; }
|
|
388
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
389
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
390
|
+
return __generator(this, function (_a) {
|
|
391
|
+
// verify required parameter 'body' is not null or undefined
|
|
392
|
+
(0, common_1.assertParamExists)('billingServiceCreateWithdrawInvoice', 'body', body);
|
|
393
|
+
localVarPath = "/billingservice/v2/withdraw-invoices";
|
|
394
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
395
|
+
if (configuration) {
|
|
396
|
+
baseOptions = configuration.baseOptions;
|
|
397
|
+
baseAccessToken = configuration.accessToken;
|
|
398
|
+
}
|
|
399
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
400
|
+
localVarHeaderParameter = {};
|
|
401
|
+
localVarQueryParameter = {};
|
|
402
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
403
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
404
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
405
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
406
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
407
|
+
return [2 /*return*/, {
|
|
408
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
409
|
+
options: localVarRequestOptions,
|
|
410
|
+
}];
|
|
411
|
+
});
|
|
412
|
+
});
|
|
413
|
+
},
|
|
414
|
+
/**
|
|
415
|
+
* The response holds the invoice with its lines and status rows. `expand=estimateHistory` adds the earlier estimates of the period when the invoice is an estimate.
|
|
416
|
+
* @summary Returns one invoice.
|
|
417
|
+
* @param {string} code The invoice\'s code.
|
|
418
|
+
* @param {string} [expand] The parts to add: `estimateHistory` adds the earlier estimates of the period to an estimate.
|
|
419
|
+
* @param {*} [options] Override http request option.
|
|
420
|
+
* @throws {RequiredError}
|
|
421
|
+
*/
|
|
422
|
+
billingServiceGetInvoice: function (code, expand, options) {
|
|
423
|
+
if (options === void 0) { options = {}; }
|
|
424
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
425
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
426
|
+
return __generator(this, function (_a) {
|
|
427
|
+
// verify required parameter 'code' is not null or undefined
|
|
428
|
+
(0, common_1.assertParamExists)('billingServiceGetInvoice', 'code', code);
|
|
429
|
+
localVarPath = "/billingservice/v2/invoices/{code}"
|
|
430
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
431
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
432
|
+
if (configuration) {
|
|
433
|
+
baseOptions = configuration.baseOptions;
|
|
434
|
+
baseAccessToken = configuration.accessToken;
|
|
435
|
+
}
|
|
436
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
437
|
+
localVarHeaderParameter = {};
|
|
438
|
+
localVarQueryParameter = {};
|
|
439
|
+
if (expand !== undefined) {
|
|
440
|
+
localVarQueryParameter['expand'] = expand;
|
|
441
|
+
}
|
|
442
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
443
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
444
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
445
|
+
return [2 /*return*/, {
|
|
446
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
447
|
+
options: localVarRequestOptions,
|
|
448
|
+
}];
|
|
449
|
+
});
|
|
450
|
+
});
|
|
451
|
+
},
|
|
452
|
+
/**
|
|
453
|
+
*
|
|
454
|
+
* @summary Returns the filter catalog of the invoice list: the fields a client can filter it by.
|
|
455
|
+
* @param {*} [options] Override http request option.
|
|
456
|
+
* @throws {RequiredError}
|
|
457
|
+
*/
|
|
458
|
+
billingServiceGetInvoiceFilterCatalog: function (options) {
|
|
459
|
+
if (options === void 0) { options = {}; }
|
|
460
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
461
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
462
|
+
return __generator(this, function (_a) {
|
|
463
|
+
localVarPath = "/billingservice/v2/invoices:filterCatalog";
|
|
464
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
465
|
+
if (configuration) {
|
|
466
|
+
baseOptions = configuration.baseOptions;
|
|
467
|
+
baseAccessToken = configuration.accessToken;
|
|
468
|
+
}
|
|
469
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
470
|
+
localVarHeaderParameter = {};
|
|
471
|
+
localVarQueryParameter = {};
|
|
472
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
473
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
474
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
475
|
+
return [2 /*return*/, {
|
|
476
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
477
|
+
options: localVarRequestOptions,
|
|
478
|
+
}];
|
|
479
|
+
});
|
|
480
|
+
});
|
|
481
|
+
},
|
|
482
|
+
/**
|
|
483
|
+
*
|
|
484
|
+
* @summary Returns the filter catalog of the policies-billing-dates list.
|
|
485
|
+
* @param {*} [options] Override http request option.
|
|
486
|
+
* @throws {RequiredError}
|
|
487
|
+
*/
|
|
488
|
+
billingServiceGetPoliciesBillingDateFilterCatalog: function (options) {
|
|
489
|
+
if (options === void 0) { options = {}; }
|
|
490
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
491
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
492
|
+
return __generator(this, function (_a) {
|
|
493
|
+
localVarPath = "/billingservice/v2/invoices/policies-billing-dates:filterCatalog";
|
|
494
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
495
|
+
if (configuration) {
|
|
496
|
+
baseOptions = configuration.baseOptions;
|
|
497
|
+
baseAccessToken = configuration.accessToken;
|
|
498
|
+
}
|
|
499
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
500
|
+
localVarHeaderParameter = {};
|
|
501
|
+
localVarQueryParameter = {};
|
|
502
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
503
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
504
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
505
|
+
return [2 /*return*/, {
|
|
506
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
507
|
+
options: localVarRequestOptions,
|
|
508
|
+
}];
|
|
509
|
+
});
|
|
510
|
+
});
|
|
511
|
+
},
|
|
512
|
+
/**
|
|
513
|
+
* For each period only the newest estimate is listed. - Filter: `itemPolicyCode` finds the collective invoices that have a line for the given member policy. - Search: the invoice code, the invoice number, the policy code and the account number. - Expand: `items`, `statuses`, `payments`, `estimateHistory`. A listed invoice has its lines, its status rows and, for an estimate, the earlier estimates of its period only with `expand=items`, `expand=statuses` and `expand=estimateHistory`. `payments` is always empty.
|
|
514
|
+
* @summary Lists invoices.
|
|
515
|
+
* @param {number} [pageSize]
|
|
516
|
+
* @param {string} [pageToken]
|
|
517
|
+
* @param {string} [filter]
|
|
518
|
+
* @param {string} [search]
|
|
519
|
+
* @param {string} [order]
|
|
520
|
+
* @param {string} [expand]
|
|
521
|
+
* @param {string} [filters]
|
|
522
|
+
* @param {*} [options] Override http request option.
|
|
523
|
+
* @throws {RequiredError}
|
|
524
|
+
*/
|
|
525
|
+
billingServiceListInvoices: function (pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
526
|
+
if (options === void 0) { options = {}; }
|
|
527
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
528
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
529
|
+
return __generator(this, function (_a) {
|
|
530
|
+
localVarPath = "/billingservice/v2/invoices";
|
|
531
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
532
|
+
if (configuration) {
|
|
533
|
+
baseOptions = configuration.baseOptions;
|
|
534
|
+
baseAccessToken = configuration.accessToken;
|
|
535
|
+
}
|
|
536
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
537
|
+
localVarHeaderParameter = {};
|
|
538
|
+
localVarQueryParameter = {};
|
|
539
|
+
if (pageSize !== undefined) {
|
|
540
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
541
|
+
}
|
|
542
|
+
if (pageToken !== undefined) {
|
|
543
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
544
|
+
}
|
|
545
|
+
if (filter !== undefined) {
|
|
546
|
+
localVarQueryParameter['filter'] = filter;
|
|
547
|
+
}
|
|
548
|
+
if (search !== undefined) {
|
|
549
|
+
localVarQueryParameter['search'] = search;
|
|
550
|
+
}
|
|
551
|
+
if (order !== undefined) {
|
|
552
|
+
localVarQueryParameter['order'] = order;
|
|
553
|
+
}
|
|
554
|
+
if (expand !== undefined) {
|
|
555
|
+
localVarQueryParameter['expand'] = expand;
|
|
556
|
+
}
|
|
557
|
+
if (filters !== undefined) {
|
|
558
|
+
localVarQueryParameter['filters'] = filters;
|
|
559
|
+
}
|
|
560
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
561
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
562
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
563
|
+
return [2 /*return*/, {
|
|
564
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
565
|
+
options: localVarRequestOptions,
|
|
566
|
+
}];
|
|
567
|
+
});
|
|
568
|
+
});
|
|
569
|
+
},
|
|
570
|
+
/**
|
|
571
|
+
* It returns the same rows as `ListPoliciesBillings`, with the same filter, search and sort rules. - Search: as `ListPoliciesBillings`.
|
|
572
|
+
* @summary Lists the billing schedule rows.
|
|
573
|
+
* @param {number} [pageSize]
|
|
574
|
+
* @param {string} [pageToken]
|
|
575
|
+
* @param {string} [filter]
|
|
576
|
+
* @param {string} [search]
|
|
577
|
+
* @param {string} [order]
|
|
578
|
+
* @param {string} [expand]
|
|
579
|
+
* @param {string} [filters]
|
|
580
|
+
* @param {*} [options] Override http request option.
|
|
581
|
+
* @throws {RequiredError}
|
|
582
|
+
*/
|
|
583
|
+
billingServiceListPoliciesBillingDates: function (pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
584
|
+
if (options === void 0) { options = {}; }
|
|
585
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
586
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
587
|
+
return __generator(this, function (_a) {
|
|
588
|
+
localVarPath = "/billingservice/v2/invoices/policies-billing-dates";
|
|
589
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
590
|
+
if (configuration) {
|
|
591
|
+
baseOptions = configuration.baseOptions;
|
|
592
|
+
baseAccessToken = configuration.accessToken;
|
|
593
|
+
}
|
|
594
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
595
|
+
localVarHeaderParameter = {};
|
|
596
|
+
localVarQueryParameter = {};
|
|
597
|
+
if (pageSize !== undefined) {
|
|
598
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
599
|
+
}
|
|
600
|
+
if (pageToken !== undefined) {
|
|
601
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
602
|
+
}
|
|
603
|
+
if (filter !== undefined) {
|
|
604
|
+
localVarQueryParameter['filter'] = filter;
|
|
605
|
+
}
|
|
606
|
+
if (search !== undefined) {
|
|
607
|
+
localVarQueryParameter['search'] = search;
|
|
608
|
+
}
|
|
609
|
+
if (order !== undefined) {
|
|
610
|
+
localVarQueryParameter['order'] = order;
|
|
611
|
+
}
|
|
612
|
+
if (expand !== undefined) {
|
|
613
|
+
localVarQueryParameter['expand'] = expand;
|
|
614
|
+
}
|
|
615
|
+
if (filters !== undefined) {
|
|
616
|
+
localVarQueryParameter['filters'] = filters;
|
|
617
|
+
}
|
|
618
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
619
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
620
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
621
|
+
return [2 /*return*/, {
|
|
622
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
623
|
+
options: localVarRequestOptions,
|
|
624
|
+
}];
|
|
625
|
+
});
|
|
626
|
+
});
|
|
627
|
+
},
|
|
628
|
+
/**
|
|
629
|
+
* The reversal is a `correction` invoice with every line negated and `revertsInvoiceErn` set to the reverted invoice. The status of the reverted invoice becomes `refunded`. The reversal carries `metadata.revertedInvoiceErn`. An estimate, an invoice that is already `refunded` and a reversal cannot be reverted.
|
|
630
|
+
* @summary Reverses one invoice in full.
|
|
631
|
+
* @param {RevertInvoiceRequest} body The request of `RevertInvoice`.
|
|
632
|
+
* @param {*} [options] Override http request option.
|
|
633
|
+
* @throws {RequiredError}
|
|
634
|
+
*/
|
|
635
|
+
billingServiceRevertInvoice: function (body, options) {
|
|
636
|
+
if (options === void 0) { options = {}; }
|
|
637
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
638
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
639
|
+
return __generator(this, function (_a) {
|
|
640
|
+
// verify required parameter 'body' is not null or undefined
|
|
641
|
+
(0, common_1.assertParamExists)('billingServiceRevertInvoice', 'body', body);
|
|
642
|
+
localVarPath = "/billingservice/v2/correction-invoices/revert";
|
|
643
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
644
|
+
if (configuration) {
|
|
645
|
+
baseOptions = configuration.baseOptions;
|
|
646
|
+
baseAccessToken = configuration.accessToken;
|
|
647
|
+
}
|
|
648
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
649
|
+
localVarHeaderParameter = {};
|
|
650
|
+
localVarQueryParameter = {};
|
|
651
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
652
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
653
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
654
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
655
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
656
|
+
return [2 /*return*/, {
|
|
657
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
658
|
+
options: localVarRequestOptions,
|
|
659
|
+
}];
|
|
660
|
+
});
|
|
661
|
+
});
|
|
662
|
+
},
|
|
663
|
+
};
|
|
664
|
+
};
|
|
665
|
+
exports.InvoicesApiAxiosParamCreator = InvoicesApiAxiosParamCreator;
|
|
666
|
+
/**
|
|
667
|
+
* InvoicesApi - functional programming interface
|
|
668
|
+
* @export
|
|
669
|
+
*/
|
|
670
|
+
var InvoicesApiFp = function (configuration) {
|
|
671
|
+
var localVarAxiosParamCreator = (0, exports.InvoicesApiAxiosParamCreator)(configuration);
|
|
672
|
+
return {
|
|
673
|
+
/**
|
|
674
|
+
* Every invoiced period that overlaps the request\'s interval is priced again from the policy\'s current state and compared with its last invoiced bill; without an interval, every invoiced period is. One `correction` invoice is created for each period with a difference. No invoice is created, and the response has `noChange` true, when the total difference is zero (the new bill is recorded). No invoice is created either when the difference is below the `minCorrectionAmount` of the billing configuration, or when its `midTermChange` is `NEXT_PERIOD`: then the difference goes into the next recurring invoice. For a member billed through its group policy, the correction invoice belongs to the group policy. Each correction carries `metadata.correctedInvoiceErn`, the invoice it corrects. A `refunded` invoice is not corrected.
|
|
675
|
+
* @summary Creates correction invoices for a policy.
|
|
676
|
+
* @param {CreateCorrectionInvoicesRequest} body The request of `CreateCorrectionInvoices`. Only `policyCode`, the billing interval and `metadata` are read. Without an interval, every invoiced period is corrected; with it, the invoiced bills of that period.
|
|
677
|
+
* @param {*} [options] Override http request option.
|
|
678
|
+
* @throws {RequiredError}
|
|
679
|
+
*/
|
|
680
|
+
billingServiceCreateCorrectionInvoices: function (body, options) {
|
|
681
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
682
|
+
var localVarAxiosArgs;
|
|
683
|
+
return __generator(this, function (_a) {
|
|
684
|
+
switch (_a.label) {
|
|
685
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.billingServiceCreateCorrectionInvoices(body, options)];
|
|
686
|
+
case 1:
|
|
687
|
+
localVarAxiosArgs = _a.sent();
|
|
688
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
689
|
+
}
|
|
690
|
+
});
|
|
691
|
+
});
|
|
692
|
+
},
|
|
693
|
+
/**
|
|
694
|
+
* The estimate is priced on request and stored, and it replaces an earlier estimate of the same period. For a period that is already invoiced nothing is stored. For a policy the response has no `code` and `metadata.invoiced` is `\"true\"`; for a group policy it is the period\'s issued invoice. The policy is read by its code, so no policy data is sent. The request\'s `metadata` is not stored. For a member billed through its group policy, the group policy\'s estimate is returned; the member\'s line is on it.
|
|
695
|
+
* @summary Creates an estimate for the running period of a policy.
|
|
696
|
+
* @param {CreateEstimatedInvoiceRequest} body The request of `CreateEstimatedInvoice`. No policy data is sent: the policy is read by its code, and partial periods are prorated by the day count basis of its billing configuration.
|
|
697
|
+
* @param {*} [options] Override http request option.
|
|
698
|
+
* @throws {RequiredError}
|
|
699
|
+
*/
|
|
700
|
+
billingServiceCreateEstimatedInvoice: function (body, options) {
|
|
701
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
702
|
+
var localVarAxiosArgs;
|
|
703
|
+
return __generator(this, function (_a) {
|
|
704
|
+
switch (_a.label) {
|
|
705
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.billingServiceCreateEstimatedInvoice(body, options)];
|
|
706
|
+
case 1:
|
|
707
|
+
localVarAxiosArgs = _a.sent();
|
|
708
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
709
|
+
}
|
|
710
|
+
});
|
|
711
|
+
});
|
|
712
|
+
},
|
|
713
|
+
/**
|
|
714
|
+
* `billingIntervalFrom` and `billingIntervalTo` are required, and the end must be after the start. The estimate is stored and replaced as in `CreateEstimatedInvoice`, and everything else is as there.
|
|
715
|
+
* @summary Creates an estimate for an explicit period of a policy.
|
|
716
|
+
* @param {CreateEstimatedInvoiceForIntervalRequest} body The request of `CreateEstimatedInvoiceForInterval`.
|
|
717
|
+
* @param {*} [options] Override http request option.
|
|
718
|
+
* @throws {RequiredError}
|
|
719
|
+
*/
|
|
720
|
+
billingServiceCreateEstimatedInvoiceForInterval: function (body, options) {
|
|
721
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
722
|
+
var localVarAxiosArgs;
|
|
723
|
+
return __generator(this, function (_a) {
|
|
724
|
+
switch (_a.label) {
|
|
725
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.billingServiceCreateEstimatedInvoiceForInterval(body, options)];
|
|
726
|
+
case 1:
|
|
727
|
+
localVarAxiosArgs = _a.sent();
|
|
728
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
729
|
+
}
|
|
730
|
+
});
|
|
731
|
+
});
|
|
732
|
+
},
|
|
733
|
+
/**
|
|
734
|
+
* Premium items that are billed once appear on this invoice only. It takes the same request and follows the same rules as `CreateRecurringInvoice`. On a policy that was invoiced before, it creates a `recurring` invoice for the next period. For a group policy whose period no member covers, the response holds an empty invoice.
|
|
735
|
+
* @summary Creates the first invoice of a policy.
|
|
736
|
+
* @param {CreateInitialInvoiceRequest} body The request of `CreateInitialInvoice`. The billing interval is optional: without it the invoice bills the next period of the policy\'s schedule, with it that period. The request has the same fields as `CreateRecurringInvoiceRequest`.
|
|
737
|
+
* @param {*} [options] Override http request option.
|
|
738
|
+
* @throws {RequiredError}
|
|
739
|
+
*/
|
|
740
|
+
billingServiceCreateInitialInvoice: function (body, options) {
|
|
741
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
742
|
+
var localVarAxiosArgs;
|
|
743
|
+
return __generator(this, function (_a) {
|
|
744
|
+
switch (_a.label) {
|
|
745
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.billingServiceCreateInitialInvoice(body, options)];
|
|
746
|
+
case 1:
|
|
747
|
+
localVarAxiosArgs = _a.sent();
|
|
748
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
749
|
+
}
|
|
750
|
+
});
|
|
751
|
+
});
|
|
752
|
+
},
|
|
753
|
+
/**
|
|
754
|
+
* `type` defaults to `other`. The types `estimated` and `penalty` are refused. `items` must hold at least one item, and the billing interval is required. Each line is `quantity` times `pricePerUnit`, rounded in the currency of the billing configuration; no tax is added.
|
|
755
|
+
* @summary Creates a manual invoice with free items.
|
|
756
|
+
* @param {CreateInvoiceRequest} body The request of `CreateInvoice`: a manual invoice with free items.
|
|
757
|
+
* @param {*} [options] Override http request option.
|
|
758
|
+
* @throws {RequiredError}
|
|
759
|
+
*/
|
|
760
|
+
billingServiceCreateInvoice: function (body, options) {
|
|
761
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
762
|
+
var localVarAxiosArgs;
|
|
763
|
+
return __generator(this, function (_a) {
|
|
764
|
+
switch (_a.label) {
|
|
765
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.billingServiceCreateInvoice(body, options)];
|
|
766
|
+
case 1:
|
|
767
|
+
localVarAxiosArgs = _a.sent();
|
|
768
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
769
|
+
}
|
|
770
|
+
});
|
|
771
|
+
});
|
|
772
|
+
},
|
|
773
|
+
/**
|
|
774
|
+
* The invoice\'s `status` becomes that status. The status is one of `open`, `paid`, `partially-paid` and `refunded`. An estimate has no status rows. The response is the new row.
|
|
775
|
+
* @summary Adds a status row to an invoice.
|
|
776
|
+
* @param {string} invoiceCode The code of the invoice.
|
|
777
|
+
* @param {CreateInvoiceStatusBody} body
|
|
778
|
+
* @param {*} [options] Override http request option.
|
|
779
|
+
* @throws {RequiredError}
|
|
780
|
+
*/
|
|
781
|
+
billingServiceCreateInvoiceStatus: function (invoiceCode, body, options) {
|
|
782
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
783
|
+
var localVarAxiosArgs;
|
|
784
|
+
return __generator(this, function (_a) {
|
|
785
|
+
switch (_a.label) {
|
|
786
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.billingServiceCreateInvoiceStatus(invoiceCode, body, options)];
|
|
787
|
+
case 1:
|
|
788
|
+
localVarAxiosArgs = _a.sent();
|
|
789
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
790
|
+
}
|
|
791
|
+
});
|
|
792
|
+
});
|
|
793
|
+
},
|
|
794
|
+
/**
|
|
795
|
+
* Without `billingIntervalFrom` and `billingIntervalTo` the invoice bills the next period of the policy\'s schedule, and the schedule always moves on to the period after it. With them the invoice bills that period, and the schedule moves on only when `shouldSetNextBillingDate` is true. A repeated call without an interval returns the invoice that already exists for the period and moves nothing. A period that is already invoiced cannot be invoiced again with an interval. A policy without a billing schedule row gets one first, as `CreatePolicyBilling` opens it. The first invoice of a policy has the type `initial`, whichever creation RPC makes it. For a group policy whose next period no member covers, nothing is created, `noChange` is true and the schedule moves on. With an interval nothing is created.
|
|
796
|
+
* @summary Creates the recurring invoice for the next period of a policy.
|
|
797
|
+
* @param {CreateRecurringInvoiceRequest} body The request of `CreateRecurringInvoice`. The billing interval is optional: without it the invoice bills the next period of the policy\'s schedule, with it that period. The request has the same fields as `CreateInitialInvoiceRequest`.
|
|
798
|
+
* @param {*} [options] Override http request option.
|
|
799
|
+
* @throws {RequiredError}
|
|
800
|
+
*/
|
|
801
|
+
billingServiceCreateRecurringInvoice: function (body, options) {
|
|
802
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
803
|
+
var localVarAxiosArgs;
|
|
804
|
+
return __generator(this, function (_a) {
|
|
805
|
+
switch (_a.label) {
|
|
806
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.billingServiceCreateRecurringInvoice(body, options)];
|
|
807
|
+
case 1:
|
|
808
|
+
localVarAxiosArgs = _a.sent();
|
|
809
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
810
|
+
}
|
|
811
|
+
});
|
|
812
|
+
});
|
|
813
|
+
},
|
|
814
|
+
/**
|
|
815
|
+
* The invoiced periods after the termination date are compared with bills shortened to the covered days. This applies when the `terminationRefund` of the billing configuration is `PRO_RATA`; a negative total is the refund. One `final` invoice is created for each affected period, and the response carries the newest. No invoice is created when `terminationRefund` is `NONE`, and none either when neither the request nor the policy gives an end date. The status of the policy\'s schedule row, if it has one, becomes `terminated`. Each final invoice carries `metadata.terminatedFrom` and `metadata.correctedInvoiceErn`.
|
|
816
|
+
* @summary Creates the final invoice of a terminated policy.
|
|
817
|
+
* @param {CreateTerminationInvoiceRequest} body The request of `CreateTerminationInvoice`. `billingIntervalFrom`, `accountNumber`, `policyNumber` and `invoiceNumber` are ignored.
|
|
818
|
+
* @param {*} [options] Override http request option.
|
|
819
|
+
* @throws {RequiredError}
|
|
820
|
+
*/
|
|
821
|
+
billingServiceCreateTerminationInvoice: function (body, options) {
|
|
822
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
823
|
+
var localVarAxiosArgs;
|
|
824
|
+
return __generator(this, function (_a) {
|
|
825
|
+
switch (_a.label) {
|
|
826
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.billingServiceCreateTerminationInvoice(body, options)];
|
|
827
|
+
case 1:
|
|
828
|
+
localVarAxiosArgs = _a.sent();
|
|
829
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
830
|
+
}
|
|
831
|
+
});
|
|
832
|
+
});
|
|
833
|
+
},
|
|
834
|
+
/**
|
|
835
|
+
* Every invoice of the policy that is not yet reversed is reversed in one `withdraw` invoice, and each of them becomes `refunded`. The status of the policy\'s schedule row, if it has one, becomes `withdrawn`. When no invoice is left to reverse, nothing is created. Only `policyCode` and `metadata` are read.
|
|
836
|
+
* @summary Creates a withdraw invoice for a policy that never came into force.
|
|
837
|
+
* @param {CreateWithdrawInvoiceRequest} body The request of `CreateWithdrawInvoice`. Only `policyCode` and `metadata` are read.
|
|
838
|
+
* @param {*} [options] Override http request option.
|
|
839
|
+
* @throws {RequiredError}
|
|
840
|
+
*/
|
|
841
|
+
billingServiceCreateWithdrawInvoice: function (body, options) {
|
|
842
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
843
|
+
var localVarAxiosArgs;
|
|
844
|
+
return __generator(this, function (_a) {
|
|
845
|
+
switch (_a.label) {
|
|
846
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.billingServiceCreateWithdrawInvoice(body, options)];
|
|
847
|
+
case 1:
|
|
848
|
+
localVarAxiosArgs = _a.sent();
|
|
849
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
850
|
+
}
|
|
851
|
+
});
|
|
852
|
+
});
|
|
853
|
+
},
|
|
854
|
+
/**
|
|
855
|
+
* The response holds the invoice with its lines and status rows. `expand=estimateHistory` adds the earlier estimates of the period when the invoice is an estimate.
|
|
856
|
+
* @summary Returns one invoice.
|
|
857
|
+
* @param {string} code The invoice\'s code.
|
|
858
|
+
* @param {string} [expand] The parts to add: `estimateHistory` adds the earlier estimates of the period to an estimate.
|
|
859
|
+
* @param {*} [options] Override http request option.
|
|
860
|
+
* @throws {RequiredError}
|
|
861
|
+
*/
|
|
862
|
+
billingServiceGetInvoice: function (code, expand, options) {
|
|
863
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
864
|
+
var localVarAxiosArgs;
|
|
865
|
+
return __generator(this, function (_a) {
|
|
866
|
+
switch (_a.label) {
|
|
867
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.billingServiceGetInvoice(code, expand, options)];
|
|
868
|
+
case 1:
|
|
869
|
+
localVarAxiosArgs = _a.sent();
|
|
870
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
871
|
+
}
|
|
872
|
+
});
|
|
873
|
+
});
|
|
874
|
+
},
|
|
875
|
+
/**
|
|
876
|
+
*
|
|
877
|
+
* @summary Returns the filter catalog of the invoice list: the fields a client can filter it by.
|
|
878
|
+
* @param {*} [options] Override http request option.
|
|
879
|
+
* @throws {RequiredError}
|
|
880
|
+
*/
|
|
881
|
+
billingServiceGetInvoiceFilterCatalog: function (options) {
|
|
882
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
883
|
+
var localVarAxiosArgs;
|
|
884
|
+
return __generator(this, function (_a) {
|
|
885
|
+
switch (_a.label) {
|
|
886
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.billingServiceGetInvoiceFilterCatalog(options)];
|
|
887
|
+
case 1:
|
|
888
|
+
localVarAxiosArgs = _a.sent();
|
|
889
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
890
|
+
}
|
|
891
|
+
});
|
|
892
|
+
});
|
|
893
|
+
},
|
|
894
|
+
/**
|
|
895
|
+
*
|
|
896
|
+
* @summary Returns the filter catalog of the policies-billing-dates list.
|
|
897
|
+
* @param {*} [options] Override http request option.
|
|
898
|
+
* @throws {RequiredError}
|
|
899
|
+
*/
|
|
900
|
+
billingServiceGetPoliciesBillingDateFilterCatalog: function (options) {
|
|
901
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
902
|
+
var localVarAxiosArgs;
|
|
903
|
+
return __generator(this, function (_a) {
|
|
904
|
+
switch (_a.label) {
|
|
905
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.billingServiceGetPoliciesBillingDateFilterCatalog(options)];
|
|
906
|
+
case 1:
|
|
907
|
+
localVarAxiosArgs = _a.sent();
|
|
908
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
909
|
+
}
|
|
910
|
+
});
|
|
911
|
+
});
|
|
912
|
+
},
|
|
913
|
+
/**
|
|
914
|
+
* For each period only the newest estimate is listed. - Filter: `itemPolicyCode` finds the collective invoices that have a line for the given member policy. - Search: the invoice code, the invoice number, the policy code and the account number. - Expand: `items`, `statuses`, `payments`, `estimateHistory`. A listed invoice has its lines, its status rows and, for an estimate, the earlier estimates of its period only with `expand=items`, `expand=statuses` and `expand=estimateHistory`. `payments` is always empty.
|
|
915
|
+
* @summary Lists invoices.
|
|
916
|
+
* @param {number} [pageSize]
|
|
917
|
+
* @param {string} [pageToken]
|
|
918
|
+
* @param {string} [filter]
|
|
919
|
+
* @param {string} [search]
|
|
920
|
+
* @param {string} [order]
|
|
921
|
+
* @param {string} [expand]
|
|
922
|
+
* @param {string} [filters]
|
|
923
|
+
* @param {*} [options] Override http request option.
|
|
924
|
+
* @throws {RequiredError}
|
|
925
|
+
*/
|
|
926
|
+
billingServiceListInvoices: function (pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
927
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
928
|
+
var localVarAxiosArgs;
|
|
929
|
+
return __generator(this, function (_a) {
|
|
930
|
+
switch (_a.label) {
|
|
931
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.billingServiceListInvoices(pageSize, pageToken, filter, search, order, expand, filters, options)];
|
|
932
|
+
case 1:
|
|
933
|
+
localVarAxiosArgs = _a.sent();
|
|
934
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
935
|
+
}
|
|
936
|
+
});
|
|
937
|
+
});
|
|
938
|
+
},
|
|
939
|
+
/**
|
|
940
|
+
* It returns the same rows as `ListPoliciesBillings`, with the same filter, search and sort rules. - Search: as `ListPoliciesBillings`.
|
|
941
|
+
* @summary Lists the billing schedule rows.
|
|
942
|
+
* @param {number} [pageSize]
|
|
943
|
+
* @param {string} [pageToken]
|
|
944
|
+
* @param {string} [filter]
|
|
945
|
+
* @param {string} [search]
|
|
946
|
+
* @param {string} [order]
|
|
947
|
+
* @param {string} [expand]
|
|
948
|
+
* @param {string} [filters]
|
|
949
|
+
* @param {*} [options] Override http request option.
|
|
950
|
+
* @throws {RequiredError}
|
|
951
|
+
*/
|
|
952
|
+
billingServiceListPoliciesBillingDates: function (pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
953
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
954
|
+
var localVarAxiosArgs;
|
|
955
|
+
return __generator(this, function (_a) {
|
|
956
|
+
switch (_a.label) {
|
|
957
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.billingServiceListPoliciesBillingDates(pageSize, pageToken, filter, search, order, expand, filters, options)];
|
|
958
|
+
case 1:
|
|
959
|
+
localVarAxiosArgs = _a.sent();
|
|
960
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
961
|
+
}
|
|
962
|
+
});
|
|
963
|
+
});
|
|
964
|
+
},
|
|
965
|
+
/**
|
|
966
|
+
* The reversal is a `correction` invoice with every line negated and `revertsInvoiceErn` set to the reverted invoice. The status of the reverted invoice becomes `refunded`. The reversal carries `metadata.revertedInvoiceErn`. An estimate, an invoice that is already `refunded` and a reversal cannot be reverted.
|
|
967
|
+
* @summary Reverses one invoice in full.
|
|
968
|
+
* @param {RevertInvoiceRequest} body The request of `RevertInvoice`.
|
|
969
|
+
* @param {*} [options] Override http request option.
|
|
970
|
+
* @throws {RequiredError}
|
|
971
|
+
*/
|
|
972
|
+
billingServiceRevertInvoice: function (body, options) {
|
|
973
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
974
|
+
var localVarAxiosArgs;
|
|
975
|
+
return __generator(this, function (_a) {
|
|
976
|
+
switch (_a.label) {
|
|
977
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.billingServiceRevertInvoice(body, options)];
|
|
978
|
+
case 1:
|
|
979
|
+
localVarAxiosArgs = _a.sent();
|
|
980
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
981
|
+
}
|
|
982
|
+
});
|
|
983
|
+
});
|
|
984
|
+
},
|
|
985
|
+
};
|
|
986
|
+
};
|
|
987
|
+
exports.InvoicesApiFp = InvoicesApiFp;
|
|
988
|
+
/**
|
|
989
|
+
* InvoicesApi - factory interface
|
|
990
|
+
* @export
|
|
991
|
+
*/
|
|
992
|
+
var InvoicesApiFactory = function (configuration, basePath, axios) {
|
|
993
|
+
var localVarFp = (0, exports.InvoicesApiFp)(configuration);
|
|
994
|
+
return {
|
|
995
|
+
/**
|
|
996
|
+
* Every invoiced period that overlaps the request\'s interval is priced again from the policy\'s current state and compared with its last invoiced bill; without an interval, every invoiced period is. One `correction` invoice is created for each period with a difference. No invoice is created, and the response has `noChange` true, when the total difference is zero (the new bill is recorded). No invoice is created either when the difference is below the `minCorrectionAmount` of the billing configuration, or when its `midTermChange` is `NEXT_PERIOD`: then the difference goes into the next recurring invoice. For a member billed through its group policy, the correction invoice belongs to the group policy. Each correction carries `metadata.correctedInvoiceErn`, the invoice it corrects. A `refunded` invoice is not corrected.
|
|
997
|
+
* @summary Creates correction invoices for a policy.
|
|
998
|
+
* @param {CreateCorrectionInvoicesRequest} body The request of `CreateCorrectionInvoices`. Only `policyCode`, the billing interval and `metadata` are read. Without an interval, every invoiced period is corrected; with it, the invoiced bills of that period.
|
|
999
|
+
* @param {*} [options] Override http request option.
|
|
1000
|
+
* @throws {RequiredError}
|
|
1001
|
+
*/
|
|
1002
|
+
billingServiceCreateCorrectionInvoices: function (body, options) {
|
|
1003
|
+
return localVarFp.billingServiceCreateCorrectionInvoices(body, options).then(function (request) { return request(axios, basePath); });
|
|
1004
|
+
},
|
|
1005
|
+
/**
|
|
1006
|
+
* The estimate is priced on request and stored, and it replaces an earlier estimate of the same period. For a period that is already invoiced nothing is stored. For a policy the response has no `code` and `metadata.invoiced` is `\"true\"`; for a group policy it is the period\'s issued invoice. The policy is read by its code, so no policy data is sent. The request\'s `metadata` is not stored. For a member billed through its group policy, the group policy\'s estimate is returned; the member\'s line is on it.
|
|
1007
|
+
* @summary Creates an estimate for the running period of a policy.
|
|
1008
|
+
* @param {CreateEstimatedInvoiceRequest} body The request of `CreateEstimatedInvoice`. No policy data is sent: the policy is read by its code, and partial periods are prorated by the day count basis of its billing configuration.
|
|
1009
|
+
* @param {*} [options] Override http request option.
|
|
1010
|
+
* @throws {RequiredError}
|
|
1011
|
+
*/
|
|
1012
|
+
billingServiceCreateEstimatedInvoice: function (body, options) {
|
|
1013
|
+
return localVarFp.billingServiceCreateEstimatedInvoice(body, options).then(function (request) { return request(axios, basePath); });
|
|
1014
|
+
},
|
|
1015
|
+
/**
|
|
1016
|
+
* `billingIntervalFrom` and `billingIntervalTo` are required, and the end must be after the start. The estimate is stored and replaced as in `CreateEstimatedInvoice`, and everything else is as there.
|
|
1017
|
+
* @summary Creates an estimate for an explicit period of a policy.
|
|
1018
|
+
* @param {CreateEstimatedInvoiceForIntervalRequest} body The request of `CreateEstimatedInvoiceForInterval`.
|
|
1019
|
+
* @param {*} [options] Override http request option.
|
|
1020
|
+
* @throws {RequiredError}
|
|
1021
|
+
*/
|
|
1022
|
+
billingServiceCreateEstimatedInvoiceForInterval: function (body, options) {
|
|
1023
|
+
return localVarFp.billingServiceCreateEstimatedInvoiceForInterval(body, options).then(function (request) { return request(axios, basePath); });
|
|
1024
|
+
},
|
|
1025
|
+
/**
|
|
1026
|
+
* Premium items that are billed once appear on this invoice only. It takes the same request and follows the same rules as `CreateRecurringInvoice`. On a policy that was invoiced before, it creates a `recurring` invoice for the next period. For a group policy whose period no member covers, the response holds an empty invoice.
|
|
1027
|
+
* @summary Creates the first invoice of a policy.
|
|
1028
|
+
* @param {CreateInitialInvoiceRequest} body The request of `CreateInitialInvoice`. The billing interval is optional: without it the invoice bills the next period of the policy\'s schedule, with it that period. The request has the same fields as `CreateRecurringInvoiceRequest`.
|
|
1029
|
+
* @param {*} [options] Override http request option.
|
|
1030
|
+
* @throws {RequiredError}
|
|
1031
|
+
*/
|
|
1032
|
+
billingServiceCreateInitialInvoice: function (body, options) {
|
|
1033
|
+
return localVarFp.billingServiceCreateInitialInvoice(body, options).then(function (request) { return request(axios, basePath); });
|
|
1034
|
+
},
|
|
1035
|
+
/**
|
|
1036
|
+
* `type` defaults to `other`. The types `estimated` and `penalty` are refused. `items` must hold at least one item, and the billing interval is required. Each line is `quantity` times `pricePerUnit`, rounded in the currency of the billing configuration; no tax is added.
|
|
1037
|
+
* @summary Creates a manual invoice with free items.
|
|
1038
|
+
* @param {CreateInvoiceRequest} body The request of `CreateInvoice`: a manual invoice with free items.
|
|
1039
|
+
* @param {*} [options] Override http request option.
|
|
1040
|
+
* @throws {RequiredError}
|
|
1041
|
+
*/
|
|
1042
|
+
billingServiceCreateInvoice: function (body, options) {
|
|
1043
|
+
return localVarFp.billingServiceCreateInvoice(body, options).then(function (request) { return request(axios, basePath); });
|
|
1044
|
+
},
|
|
1045
|
+
/**
|
|
1046
|
+
* The invoice\'s `status` becomes that status. The status is one of `open`, `paid`, `partially-paid` and `refunded`. An estimate has no status rows. The response is the new row.
|
|
1047
|
+
* @summary Adds a status row to an invoice.
|
|
1048
|
+
* @param {string} invoiceCode The code of the invoice.
|
|
1049
|
+
* @param {CreateInvoiceStatusBody} body
|
|
1050
|
+
* @param {*} [options] Override http request option.
|
|
1051
|
+
* @throws {RequiredError}
|
|
1052
|
+
*/
|
|
1053
|
+
billingServiceCreateInvoiceStatus: function (invoiceCode, body, options) {
|
|
1054
|
+
return localVarFp.billingServiceCreateInvoiceStatus(invoiceCode, body, options).then(function (request) { return request(axios, basePath); });
|
|
1055
|
+
},
|
|
1056
|
+
/**
|
|
1057
|
+
* Without `billingIntervalFrom` and `billingIntervalTo` the invoice bills the next period of the policy\'s schedule, and the schedule always moves on to the period after it. With them the invoice bills that period, and the schedule moves on only when `shouldSetNextBillingDate` is true. A repeated call without an interval returns the invoice that already exists for the period and moves nothing. A period that is already invoiced cannot be invoiced again with an interval. A policy without a billing schedule row gets one first, as `CreatePolicyBilling` opens it. The first invoice of a policy has the type `initial`, whichever creation RPC makes it. For a group policy whose next period no member covers, nothing is created, `noChange` is true and the schedule moves on. With an interval nothing is created.
|
|
1058
|
+
* @summary Creates the recurring invoice for the next period of a policy.
|
|
1059
|
+
* @param {CreateRecurringInvoiceRequest} body The request of `CreateRecurringInvoice`. The billing interval is optional: without it the invoice bills the next period of the policy\'s schedule, with it that period. The request has the same fields as `CreateInitialInvoiceRequest`.
|
|
1060
|
+
* @param {*} [options] Override http request option.
|
|
1061
|
+
* @throws {RequiredError}
|
|
1062
|
+
*/
|
|
1063
|
+
billingServiceCreateRecurringInvoice: function (body, options) {
|
|
1064
|
+
return localVarFp.billingServiceCreateRecurringInvoice(body, options).then(function (request) { return request(axios, basePath); });
|
|
1065
|
+
},
|
|
1066
|
+
/**
|
|
1067
|
+
* The invoiced periods after the termination date are compared with bills shortened to the covered days. This applies when the `terminationRefund` of the billing configuration is `PRO_RATA`; a negative total is the refund. One `final` invoice is created for each affected period, and the response carries the newest. No invoice is created when `terminationRefund` is `NONE`, and none either when neither the request nor the policy gives an end date. The status of the policy\'s schedule row, if it has one, becomes `terminated`. Each final invoice carries `metadata.terminatedFrom` and `metadata.correctedInvoiceErn`.
|
|
1068
|
+
* @summary Creates the final invoice of a terminated policy.
|
|
1069
|
+
* @param {CreateTerminationInvoiceRequest} body The request of `CreateTerminationInvoice`. `billingIntervalFrom`, `accountNumber`, `policyNumber` and `invoiceNumber` are ignored.
|
|
1070
|
+
* @param {*} [options] Override http request option.
|
|
1071
|
+
* @throws {RequiredError}
|
|
1072
|
+
*/
|
|
1073
|
+
billingServiceCreateTerminationInvoice: function (body, options) {
|
|
1074
|
+
return localVarFp.billingServiceCreateTerminationInvoice(body, options).then(function (request) { return request(axios, basePath); });
|
|
1075
|
+
},
|
|
1076
|
+
/**
|
|
1077
|
+
* Every invoice of the policy that is not yet reversed is reversed in one `withdraw` invoice, and each of them becomes `refunded`. The status of the policy\'s schedule row, if it has one, becomes `withdrawn`. When no invoice is left to reverse, nothing is created. Only `policyCode` and `metadata` are read.
|
|
1078
|
+
* @summary Creates a withdraw invoice for a policy that never came into force.
|
|
1079
|
+
* @param {CreateWithdrawInvoiceRequest} body The request of `CreateWithdrawInvoice`. Only `policyCode` and `metadata` are read.
|
|
1080
|
+
* @param {*} [options] Override http request option.
|
|
1081
|
+
* @throws {RequiredError}
|
|
1082
|
+
*/
|
|
1083
|
+
billingServiceCreateWithdrawInvoice: function (body, options) {
|
|
1084
|
+
return localVarFp.billingServiceCreateWithdrawInvoice(body, options).then(function (request) { return request(axios, basePath); });
|
|
1085
|
+
},
|
|
1086
|
+
/**
|
|
1087
|
+
* The response holds the invoice with its lines and status rows. `expand=estimateHistory` adds the earlier estimates of the period when the invoice is an estimate.
|
|
1088
|
+
* @summary Returns one invoice.
|
|
1089
|
+
* @param {string} code The invoice\'s code.
|
|
1090
|
+
* @param {string} [expand] The parts to add: `estimateHistory` adds the earlier estimates of the period to an estimate.
|
|
1091
|
+
* @param {*} [options] Override http request option.
|
|
1092
|
+
* @throws {RequiredError}
|
|
1093
|
+
*/
|
|
1094
|
+
billingServiceGetInvoice: function (code, expand, options) {
|
|
1095
|
+
return localVarFp.billingServiceGetInvoice(code, expand, options).then(function (request) { return request(axios, basePath); });
|
|
1096
|
+
},
|
|
1097
|
+
/**
|
|
1098
|
+
*
|
|
1099
|
+
* @summary Returns the filter catalog of the invoice list: the fields a client can filter it by.
|
|
1100
|
+
* @param {*} [options] Override http request option.
|
|
1101
|
+
* @throws {RequiredError}
|
|
1102
|
+
*/
|
|
1103
|
+
billingServiceGetInvoiceFilterCatalog: function (options) {
|
|
1104
|
+
return localVarFp.billingServiceGetInvoiceFilterCatalog(options).then(function (request) { return request(axios, basePath); });
|
|
1105
|
+
},
|
|
1106
|
+
/**
|
|
1107
|
+
*
|
|
1108
|
+
* @summary Returns the filter catalog of the policies-billing-dates list.
|
|
1109
|
+
* @param {*} [options] Override http request option.
|
|
1110
|
+
* @throws {RequiredError}
|
|
1111
|
+
*/
|
|
1112
|
+
billingServiceGetPoliciesBillingDateFilterCatalog: function (options) {
|
|
1113
|
+
return localVarFp.billingServiceGetPoliciesBillingDateFilterCatalog(options).then(function (request) { return request(axios, basePath); });
|
|
1114
|
+
},
|
|
1115
|
+
/**
|
|
1116
|
+
* For each period only the newest estimate is listed. - Filter: `itemPolicyCode` finds the collective invoices that have a line for the given member policy. - Search: the invoice code, the invoice number, the policy code and the account number. - Expand: `items`, `statuses`, `payments`, `estimateHistory`. A listed invoice has its lines, its status rows and, for an estimate, the earlier estimates of its period only with `expand=items`, `expand=statuses` and `expand=estimateHistory`. `payments` is always empty.
|
|
1117
|
+
* @summary Lists invoices.
|
|
1118
|
+
* @param {number} [pageSize]
|
|
1119
|
+
* @param {string} [pageToken]
|
|
1120
|
+
* @param {string} [filter]
|
|
1121
|
+
* @param {string} [search]
|
|
1122
|
+
* @param {string} [order]
|
|
1123
|
+
* @param {string} [expand]
|
|
1124
|
+
* @param {string} [filters]
|
|
1125
|
+
* @param {*} [options] Override http request option.
|
|
1126
|
+
* @throws {RequiredError}
|
|
1127
|
+
*/
|
|
1128
|
+
billingServiceListInvoices: function (pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
1129
|
+
return localVarFp.billingServiceListInvoices(pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
|
|
1130
|
+
},
|
|
1131
|
+
/**
|
|
1132
|
+
* It returns the same rows as `ListPoliciesBillings`, with the same filter, search and sort rules. - Search: as `ListPoliciesBillings`.
|
|
1133
|
+
* @summary Lists the billing schedule rows.
|
|
1134
|
+
* @param {number} [pageSize]
|
|
1135
|
+
* @param {string} [pageToken]
|
|
1136
|
+
* @param {string} [filter]
|
|
1137
|
+
* @param {string} [search]
|
|
1138
|
+
* @param {string} [order]
|
|
1139
|
+
* @param {string} [expand]
|
|
1140
|
+
* @param {string} [filters]
|
|
1141
|
+
* @param {*} [options] Override http request option.
|
|
1142
|
+
* @throws {RequiredError}
|
|
1143
|
+
*/
|
|
1144
|
+
billingServiceListPoliciesBillingDates: function (pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
1145
|
+
return localVarFp.billingServiceListPoliciesBillingDates(pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
|
|
1146
|
+
},
|
|
1147
|
+
/**
|
|
1148
|
+
* The reversal is a `correction` invoice with every line negated and `revertsInvoiceErn` set to the reverted invoice. The status of the reverted invoice becomes `refunded`. The reversal carries `metadata.revertedInvoiceErn`. An estimate, an invoice that is already `refunded` and a reversal cannot be reverted.
|
|
1149
|
+
* @summary Reverses one invoice in full.
|
|
1150
|
+
* @param {RevertInvoiceRequest} body The request of `RevertInvoice`.
|
|
1151
|
+
* @param {*} [options] Override http request option.
|
|
1152
|
+
* @throws {RequiredError}
|
|
1153
|
+
*/
|
|
1154
|
+
billingServiceRevertInvoice: function (body, options) {
|
|
1155
|
+
return localVarFp.billingServiceRevertInvoice(body, options).then(function (request) { return request(axios, basePath); });
|
|
1156
|
+
},
|
|
1157
|
+
};
|
|
1158
|
+
};
|
|
1159
|
+
exports.InvoicesApiFactory = InvoicesApiFactory;
|
|
1160
|
+
/**
|
|
1161
|
+
* InvoicesApi - object-oriented interface
|
|
1162
|
+
* @export
|
|
1163
|
+
* @class InvoicesApi
|
|
1164
|
+
* @extends {BaseAPI}
|
|
1165
|
+
*/
|
|
1166
|
+
var InvoicesApi = /** @class */ (function (_super) {
|
|
1167
|
+
__extends(InvoicesApi, _super);
|
|
1168
|
+
function InvoicesApi() {
|
|
1169
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1170
|
+
}
|
|
1171
|
+
/**
|
|
1172
|
+
* Every invoiced period that overlaps the request\'s interval is priced again from the policy\'s current state and compared with its last invoiced bill; without an interval, every invoiced period is. One `correction` invoice is created for each period with a difference. No invoice is created, and the response has `noChange` true, when the total difference is zero (the new bill is recorded). No invoice is created either when the difference is below the `minCorrectionAmount` of the billing configuration, or when its `midTermChange` is `NEXT_PERIOD`: then the difference goes into the next recurring invoice. For a member billed through its group policy, the correction invoice belongs to the group policy. Each correction carries `metadata.correctedInvoiceErn`, the invoice it corrects. A `refunded` invoice is not corrected.
|
|
1173
|
+
* @summary Creates correction invoices for a policy.
|
|
1174
|
+
* @param {InvoicesApiBillingServiceCreateCorrectionInvoicesRequest} requestParameters Request parameters.
|
|
1175
|
+
* @param {*} [options] Override http request option.
|
|
1176
|
+
* @throws {RequiredError}
|
|
1177
|
+
* @memberof InvoicesApi
|
|
1178
|
+
*/
|
|
1179
|
+
InvoicesApi.prototype.billingServiceCreateCorrectionInvoices = function (requestParameters, options) {
|
|
1180
|
+
var _this = this;
|
|
1181
|
+
return (0, exports.InvoicesApiFp)(this.configuration).billingServiceCreateCorrectionInvoices(requestParameters.body, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1182
|
+
};
|
|
1183
|
+
/**
|
|
1184
|
+
* The estimate is priced on request and stored, and it replaces an earlier estimate of the same period. For a period that is already invoiced nothing is stored. For a policy the response has no `code` and `metadata.invoiced` is `\"true\"`; for a group policy it is the period\'s issued invoice. The policy is read by its code, so no policy data is sent. The request\'s `metadata` is not stored. For a member billed through its group policy, the group policy\'s estimate is returned; the member\'s line is on it.
|
|
1185
|
+
* @summary Creates an estimate for the running period of a policy.
|
|
1186
|
+
* @param {InvoicesApiBillingServiceCreateEstimatedInvoiceRequest} requestParameters Request parameters.
|
|
1187
|
+
* @param {*} [options] Override http request option.
|
|
1188
|
+
* @throws {RequiredError}
|
|
1189
|
+
* @memberof InvoicesApi
|
|
1190
|
+
*/
|
|
1191
|
+
InvoicesApi.prototype.billingServiceCreateEstimatedInvoice = function (requestParameters, options) {
|
|
1192
|
+
var _this = this;
|
|
1193
|
+
return (0, exports.InvoicesApiFp)(this.configuration).billingServiceCreateEstimatedInvoice(requestParameters.body, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1194
|
+
};
|
|
1195
|
+
/**
|
|
1196
|
+
* `billingIntervalFrom` and `billingIntervalTo` are required, and the end must be after the start. The estimate is stored and replaced as in `CreateEstimatedInvoice`, and everything else is as there.
|
|
1197
|
+
* @summary Creates an estimate for an explicit period of a policy.
|
|
1198
|
+
* @param {InvoicesApiBillingServiceCreateEstimatedInvoiceForIntervalRequest} requestParameters Request parameters.
|
|
1199
|
+
* @param {*} [options] Override http request option.
|
|
1200
|
+
* @throws {RequiredError}
|
|
1201
|
+
* @memberof InvoicesApi
|
|
1202
|
+
*/
|
|
1203
|
+
InvoicesApi.prototype.billingServiceCreateEstimatedInvoiceForInterval = function (requestParameters, options) {
|
|
1204
|
+
var _this = this;
|
|
1205
|
+
return (0, exports.InvoicesApiFp)(this.configuration).billingServiceCreateEstimatedInvoiceForInterval(requestParameters.body, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1206
|
+
};
|
|
1207
|
+
/**
|
|
1208
|
+
* Premium items that are billed once appear on this invoice only. It takes the same request and follows the same rules as `CreateRecurringInvoice`. On a policy that was invoiced before, it creates a `recurring` invoice for the next period. For a group policy whose period no member covers, the response holds an empty invoice.
|
|
1209
|
+
* @summary Creates the first invoice of a policy.
|
|
1210
|
+
* @param {InvoicesApiBillingServiceCreateInitialInvoiceRequest} requestParameters Request parameters.
|
|
1211
|
+
* @param {*} [options] Override http request option.
|
|
1212
|
+
* @throws {RequiredError}
|
|
1213
|
+
* @memberof InvoicesApi
|
|
1214
|
+
*/
|
|
1215
|
+
InvoicesApi.prototype.billingServiceCreateInitialInvoice = function (requestParameters, options) {
|
|
1216
|
+
var _this = this;
|
|
1217
|
+
return (0, exports.InvoicesApiFp)(this.configuration).billingServiceCreateInitialInvoice(requestParameters.body, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1218
|
+
};
|
|
1219
|
+
/**
|
|
1220
|
+
* `type` defaults to `other`. The types `estimated` and `penalty` are refused. `items` must hold at least one item, and the billing interval is required. Each line is `quantity` times `pricePerUnit`, rounded in the currency of the billing configuration; no tax is added.
|
|
1221
|
+
* @summary Creates a manual invoice with free items.
|
|
1222
|
+
* @param {InvoicesApiBillingServiceCreateInvoiceRequest} requestParameters Request parameters.
|
|
1223
|
+
* @param {*} [options] Override http request option.
|
|
1224
|
+
* @throws {RequiredError}
|
|
1225
|
+
* @memberof InvoicesApi
|
|
1226
|
+
*/
|
|
1227
|
+
InvoicesApi.prototype.billingServiceCreateInvoice = function (requestParameters, options) {
|
|
1228
|
+
var _this = this;
|
|
1229
|
+
return (0, exports.InvoicesApiFp)(this.configuration).billingServiceCreateInvoice(requestParameters.body, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1230
|
+
};
|
|
1231
|
+
/**
|
|
1232
|
+
* The invoice\'s `status` becomes that status. The status is one of `open`, `paid`, `partially-paid` and `refunded`. An estimate has no status rows. The response is the new row.
|
|
1233
|
+
* @summary Adds a status row to an invoice.
|
|
1234
|
+
* @param {InvoicesApiBillingServiceCreateInvoiceStatusRequest} requestParameters Request parameters.
|
|
1235
|
+
* @param {*} [options] Override http request option.
|
|
1236
|
+
* @throws {RequiredError}
|
|
1237
|
+
* @memberof InvoicesApi
|
|
1238
|
+
*/
|
|
1239
|
+
InvoicesApi.prototype.billingServiceCreateInvoiceStatus = function (requestParameters, options) {
|
|
1240
|
+
var _this = this;
|
|
1241
|
+
return (0, exports.InvoicesApiFp)(this.configuration).billingServiceCreateInvoiceStatus(requestParameters.invoiceCode, requestParameters.body, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1242
|
+
};
|
|
1243
|
+
/**
|
|
1244
|
+
* Without `billingIntervalFrom` and `billingIntervalTo` the invoice bills the next period of the policy\'s schedule, and the schedule always moves on to the period after it. With them the invoice bills that period, and the schedule moves on only when `shouldSetNextBillingDate` is true. A repeated call without an interval returns the invoice that already exists for the period and moves nothing. A period that is already invoiced cannot be invoiced again with an interval. A policy without a billing schedule row gets one first, as `CreatePolicyBilling` opens it. The first invoice of a policy has the type `initial`, whichever creation RPC makes it. For a group policy whose next period no member covers, nothing is created, `noChange` is true and the schedule moves on. With an interval nothing is created.
|
|
1245
|
+
* @summary Creates the recurring invoice for the next period of a policy.
|
|
1246
|
+
* @param {InvoicesApiBillingServiceCreateRecurringInvoiceRequest} requestParameters Request parameters.
|
|
1247
|
+
* @param {*} [options] Override http request option.
|
|
1248
|
+
* @throws {RequiredError}
|
|
1249
|
+
* @memberof InvoicesApi
|
|
1250
|
+
*/
|
|
1251
|
+
InvoicesApi.prototype.billingServiceCreateRecurringInvoice = function (requestParameters, options) {
|
|
1252
|
+
var _this = this;
|
|
1253
|
+
return (0, exports.InvoicesApiFp)(this.configuration).billingServiceCreateRecurringInvoice(requestParameters.body, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1254
|
+
};
|
|
1255
|
+
/**
|
|
1256
|
+
* The invoiced periods after the termination date are compared with bills shortened to the covered days. This applies when the `terminationRefund` of the billing configuration is `PRO_RATA`; a negative total is the refund. One `final` invoice is created for each affected period, and the response carries the newest. No invoice is created when `terminationRefund` is `NONE`, and none either when neither the request nor the policy gives an end date. The status of the policy\'s schedule row, if it has one, becomes `terminated`. Each final invoice carries `metadata.terminatedFrom` and `metadata.correctedInvoiceErn`.
|
|
1257
|
+
* @summary Creates the final invoice of a terminated policy.
|
|
1258
|
+
* @param {InvoicesApiBillingServiceCreateTerminationInvoiceRequest} requestParameters Request parameters.
|
|
1259
|
+
* @param {*} [options] Override http request option.
|
|
1260
|
+
* @throws {RequiredError}
|
|
1261
|
+
* @memberof InvoicesApi
|
|
1262
|
+
*/
|
|
1263
|
+
InvoicesApi.prototype.billingServiceCreateTerminationInvoice = function (requestParameters, options) {
|
|
1264
|
+
var _this = this;
|
|
1265
|
+
return (0, exports.InvoicesApiFp)(this.configuration).billingServiceCreateTerminationInvoice(requestParameters.body, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1266
|
+
};
|
|
1267
|
+
/**
|
|
1268
|
+
* Every invoice of the policy that is not yet reversed is reversed in one `withdraw` invoice, and each of them becomes `refunded`. The status of the policy\'s schedule row, if it has one, becomes `withdrawn`. When no invoice is left to reverse, nothing is created. Only `policyCode` and `metadata` are read.
|
|
1269
|
+
* @summary Creates a withdraw invoice for a policy that never came into force.
|
|
1270
|
+
* @param {InvoicesApiBillingServiceCreateWithdrawInvoiceRequest} requestParameters Request parameters.
|
|
1271
|
+
* @param {*} [options] Override http request option.
|
|
1272
|
+
* @throws {RequiredError}
|
|
1273
|
+
* @memberof InvoicesApi
|
|
1274
|
+
*/
|
|
1275
|
+
InvoicesApi.prototype.billingServiceCreateWithdrawInvoice = function (requestParameters, options) {
|
|
1276
|
+
var _this = this;
|
|
1277
|
+
return (0, exports.InvoicesApiFp)(this.configuration).billingServiceCreateWithdrawInvoice(requestParameters.body, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1278
|
+
};
|
|
1279
|
+
/**
|
|
1280
|
+
* The response holds the invoice with its lines and status rows. `expand=estimateHistory` adds the earlier estimates of the period when the invoice is an estimate.
|
|
1281
|
+
* @summary Returns one invoice.
|
|
1282
|
+
* @param {InvoicesApiBillingServiceGetInvoiceRequest} requestParameters Request parameters.
|
|
1283
|
+
* @param {*} [options] Override http request option.
|
|
1284
|
+
* @throws {RequiredError}
|
|
1285
|
+
* @memberof InvoicesApi
|
|
1286
|
+
*/
|
|
1287
|
+
InvoicesApi.prototype.billingServiceGetInvoice = function (requestParameters, options) {
|
|
1288
|
+
var _this = this;
|
|
1289
|
+
return (0, exports.InvoicesApiFp)(this.configuration).billingServiceGetInvoice(requestParameters.code, requestParameters.expand, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1290
|
+
};
|
|
1291
|
+
/**
|
|
1292
|
+
*
|
|
1293
|
+
* @summary Returns the filter catalog of the invoice list: the fields a client can filter it by.
|
|
1294
|
+
* @param {*} [options] Override http request option.
|
|
1295
|
+
* @throws {RequiredError}
|
|
1296
|
+
* @memberof InvoicesApi
|
|
1297
|
+
*/
|
|
1298
|
+
InvoicesApi.prototype.billingServiceGetInvoiceFilterCatalog = function (options) {
|
|
1299
|
+
var _this = this;
|
|
1300
|
+
return (0, exports.InvoicesApiFp)(this.configuration).billingServiceGetInvoiceFilterCatalog(this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1301
|
+
};
|
|
1302
|
+
/**
|
|
1303
|
+
*
|
|
1304
|
+
* @summary Returns the filter catalog of the policies-billing-dates list.
|
|
1305
|
+
* @param {*} [options] Override http request option.
|
|
1306
|
+
* @throws {RequiredError}
|
|
1307
|
+
* @memberof InvoicesApi
|
|
1308
|
+
*/
|
|
1309
|
+
InvoicesApi.prototype.billingServiceGetPoliciesBillingDateFilterCatalog = function (options) {
|
|
1310
|
+
var _this = this;
|
|
1311
|
+
return (0, exports.InvoicesApiFp)(this.configuration).billingServiceGetPoliciesBillingDateFilterCatalog(this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1312
|
+
};
|
|
1313
|
+
/**
|
|
1314
|
+
* For each period only the newest estimate is listed. - Filter: `itemPolicyCode` finds the collective invoices that have a line for the given member policy. - Search: the invoice code, the invoice number, the policy code and the account number. - Expand: `items`, `statuses`, `payments`, `estimateHistory`. A listed invoice has its lines, its status rows and, for an estimate, the earlier estimates of its period only with `expand=items`, `expand=statuses` and `expand=estimateHistory`. `payments` is always empty.
|
|
1315
|
+
* @summary Lists invoices.
|
|
1316
|
+
* @param {InvoicesApiBillingServiceListInvoicesRequest} requestParameters Request parameters.
|
|
1317
|
+
* @param {*} [options] Override http request option.
|
|
1318
|
+
* @throws {RequiredError}
|
|
1319
|
+
* @memberof InvoicesApi
|
|
1320
|
+
*/
|
|
1321
|
+
InvoicesApi.prototype.billingServiceListInvoices = function (requestParameters, options) {
|
|
1322
|
+
var _this = this;
|
|
1323
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
1324
|
+
return (0, exports.InvoicesApiFp)(this.configuration).billingServiceListInvoices(requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1325
|
+
};
|
|
1326
|
+
/**
|
|
1327
|
+
* It returns the same rows as `ListPoliciesBillings`, with the same filter, search and sort rules. - Search: as `ListPoliciesBillings`.
|
|
1328
|
+
* @summary Lists the billing schedule rows.
|
|
1329
|
+
* @param {InvoicesApiBillingServiceListPoliciesBillingDatesRequest} requestParameters Request parameters.
|
|
1330
|
+
* @param {*} [options] Override http request option.
|
|
1331
|
+
* @throws {RequiredError}
|
|
1332
|
+
* @memberof InvoicesApi
|
|
1333
|
+
*/
|
|
1334
|
+
InvoicesApi.prototype.billingServiceListPoliciesBillingDates = function (requestParameters, options) {
|
|
1335
|
+
var _this = this;
|
|
1336
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
1337
|
+
return (0, exports.InvoicesApiFp)(this.configuration).billingServiceListPoliciesBillingDates(requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1338
|
+
};
|
|
1339
|
+
/**
|
|
1340
|
+
* The reversal is a `correction` invoice with every line negated and `revertsInvoiceErn` set to the reverted invoice. The status of the reverted invoice becomes `refunded`. The reversal carries `metadata.revertedInvoiceErn`. An estimate, an invoice that is already `refunded` and a reversal cannot be reverted.
|
|
1341
|
+
* @summary Reverses one invoice in full.
|
|
1342
|
+
* @param {InvoicesApiBillingServiceRevertInvoiceRequest} requestParameters Request parameters.
|
|
1343
|
+
* @param {*} [options] Override http request option.
|
|
1344
|
+
* @throws {RequiredError}
|
|
1345
|
+
* @memberof InvoicesApi
|
|
1346
|
+
*/
|
|
1347
|
+
InvoicesApi.prototype.billingServiceRevertInvoice = function (requestParameters, options) {
|
|
1348
|
+
var _this = this;
|
|
1349
|
+
return (0, exports.InvoicesApiFp)(this.configuration).billingServiceRevertInvoice(requestParameters.body, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1350
|
+
};
|
|
1351
|
+
return InvoicesApi;
|
|
1352
|
+
}(base_1.BaseAPI));
|
|
1353
|
+
exports.InvoicesApi = InvoicesApi;
|