@emilgroup/discount-sdk 1.4.1-beta.0 → 1.5.1
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/README.md +2 -2
- package/index.js +99 -0
- package/package.json +8 -21
- package/scripts/deploy.js +225 -0
- package/.openapi-generator/FILES +0 -54
- package/.openapi-generator/VERSION +0 -1
- package/.openapi-generator-ignore +0 -23
- package/api/campaigns-api.ts +0 -1433
- package/api/default-api.ts +0 -124
- package/api/policy-vouchers-api.ts +0 -999
- package/api/vouchers-api.ts +0 -691
- package/api.ts +0 -33
- package/base.ts +0 -331
- package/common.ts +0 -198
- package/configuration.ts +0 -110
- package/dist/api/campaigns-api.d.ts +0 -808
- package/dist/api/campaigns-api.js +0 -1251
- package/dist/api/default-api.d.ts +0 -70
- package/dist/api/default-api.js +0 -200
- package/dist/api/policy-vouchers-api.d.ts +0 -555
- package/dist/api/policy-vouchers-api.js +0 -915
- package/dist/api/vouchers-api.d.ts +0 -393
- package/dist/api/vouchers-api.js +0 -642
- package/dist/api.d.ts +0 -15
- package/dist/api.js +0 -33
- package/dist/base.d.ts +0 -86
- package/dist/base.js +0 -367
- package/dist/common.d.ts +0 -91
- package/dist/common.js +0 -276
- package/dist/configuration.d.ts +0 -89
- package/dist/configuration.js +0 -52
- package/dist/index.d.ts +0 -15
- package/dist/index.js +0 -36
- package/dist/models/campaign-class.d.ts +0 -105
- package/dist/models/campaign-class.js +0 -24
- package/dist/models/charge-policy-voucher-request-dto.d.ts +0 -48
- package/dist/models/charge-policy-voucher-request-dto.js +0 -15
- package/dist/models/charge-policy-voucher-response-class.d.ts +0 -96
- package/dist/models/charge-policy-voucher-response-class.js +0 -21
- package/dist/models/check-account-eligibility-request-dto.d.ts +0 -48
- package/dist/models/check-account-eligibility-request-dto.js +0 -15
- package/dist/models/check-account-eligibility-response-class.d.ts +0 -57
- package/dist/models/check-account-eligibility-response-class.js +0 -24
- package/dist/models/create-campaign-request-dto.d.ts +0 -42
- package/dist/models/create-campaign-request-dto.js +0 -15
- package/dist/models/create-campaign-response-class.d.ts +0 -25
- package/dist/models/create-campaign-response-class.js +0 -15
- package/dist/models/create-eligible-account-request-dto.d.ts +0 -30
- package/dist/models/create-eligible-account-request-dto.js +0 -15
- package/dist/models/create-eligible-account-response-class.d.ts +0 -25
- package/dist/models/create-eligible-account-response-class.js +0 -15
- package/dist/models/create-policy-voucher-request-dto.d.ts +0 -48
- package/dist/models/create-policy-voucher-request-dto.js +0 -15
- package/dist/models/create-policy-voucher-response-class.d.ts +0 -25
- package/dist/models/create-policy-voucher-response-class.js +0 -15
- package/dist/models/create-product-discount-dto.d.ts +0 -48
- package/dist/models/create-product-discount-dto.js +0 -15
- package/dist/models/create-voucher-request-dto.d.ts +0 -66
- package/dist/models/create-voucher-request-dto.js +0 -20
- package/dist/models/create-voucher-response-class.d.ts +0 -25
- package/dist/models/create-voucher-response-class.js +0 -15
- package/dist/models/eligible-account-class.d.ts +0 -78
- package/dist/models/eligible-account-class.js +0 -15
- package/dist/models/get-campaign-response-class.d.ts +0 -25
- package/dist/models/get-campaign-response-class.js +0 -15
- package/dist/models/get-policy-voucher-response-class.d.ts +0 -25
- package/dist/models/get-policy-voucher-response-class.js +0 -15
- package/dist/models/get-voucher-response-class.d.ts +0 -25
- package/dist/models/get-voucher-response-class.js +0 -15
- package/dist/models/index.d.ts +0 -37
- package/dist/models/index.js +0 -53
- package/dist/models/inline-response200.d.ts +0 -54
- package/dist/models/inline-response200.js +0 -15
- package/dist/models/inline-response503.d.ts +0 -54
- package/dist/models/inline-response503.js +0 -15
- package/dist/models/list-campaigns-response-class.d.ts +0 -43
- package/dist/models/list-campaigns-response-class.js +0 -15
- package/dist/models/list-eligible-accounts-response-class.d.ts +0 -43
- package/dist/models/list-eligible-accounts-response-class.js +0 -15
- package/dist/models/list-policy-vouchers-response-class.d.ts +0 -43
- package/dist/models/list-policy-vouchers-response-class.js +0 -15
- package/dist/models/list-vouchers-response-class.d.ts +0 -43
- package/dist/models/list-vouchers-response-class.js +0 -15
- package/dist/models/policy-voucher-class.d.ts +0 -165
- package/dist/models/policy-voucher-class.js +0 -21
- package/dist/models/policy-voucher-transaction-class.d.ts +0 -126
- package/dist/models/policy-voucher-transaction-class.js +0 -26
- package/dist/models/product-discount-class.d.ts +0 -90
- package/dist/models/product-discount-class.js +0 -15
- package/dist/models/redeem-policy-voucher-request-dto.d.ts +0 -48
- package/dist/models/redeem-policy-voucher-request-dto.js +0 -15
- package/dist/models/redeem-policy-voucher-response-class.d.ts +0 -84
- package/dist/models/redeem-policy-voucher-response-class.js +0 -21
- package/dist/models/update-campaign-request-dto.d.ts +0 -42
- package/dist/models/update-campaign-request-dto.js +0 -15
- package/dist/models/update-campaign-response-class.d.ts +0 -25
- package/dist/models/update-campaign-response-class.js +0 -15
- package/dist/models/update-campaign-status-request-dto.d.ts +0 -33
- package/dist/models/update-campaign-status-request-dto.js +0 -24
- package/dist/models/update-voucher-request-dto.d.ts +0 -60
- package/dist/models/update-voucher-request-dto.js +0 -20
- package/dist/models/update-voucher-response-class.d.ts +0 -25
- package/dist/models/update-voucher-response-class.js +0 -15
- package/dist/models/voucher-class.d.ts +0 -127
- package/dist/models/voucher-class.js +0 -20
- package/dist/models/withdraw-policy-voucher-request-dto.d.ts +0 -36
- package/dist/models/withdraw-policy-voucher-request-dto.js +0 -15
- package/dist/models/withdraw-policy-voucher-response-class.d.ts +0 -78
- package/dist/models/withdraw-policy-voucher-response-class.js +0 -21
- package/git_push.sh +0 -57
- package/index.ts +0 -19
- package/models/campaign-class.ts +0 -114
- package/models/charge-policy-voucher-request-dto.ts +0 -54
- package/models/charge-policy-voucher-response-class.ts +0 -105
- package/models/check-account-eligibility-request-dto.ts +0 -54
- package/models/check-account-eligibility-response-class.ts +0 -66
- package/models/create-campaign-request-dto.ts +0 -48
- package/models/create-campaign-response-class.ts +0 -31
- package/models/create-eligible-account-request-dto.ts +0 -36
- package/models/create-eligible-account-response-class.ts +0 -31
- package/models/create-policy-voucher-request-dto.ts +0 -54
- package/models/create-policy-voucher-response-class.ts +0 -31
- package/models/create-product-discount-dto.ts +0 -54
- package/models/create-voucher-request-dto.ts +0 -75
- package/models/create-voucher-response-class.ts +0 -31
- package/models/eligible-account-class.ts +0 -84
- package/models/get-campaign-response-class.ts +0 -31
- package/models/get-policy-voucher-response-class.ts +0 -31
- package/models/get-voucher-response-class.ts +0 -31
- package/models/index.ts +0 -37
- package/models/inline-response200.ts +0 -48
- package/models/inline-response503.ts +0 -48
- package/models/list-campaigns-response-class.ts +0 -49
- package/models/list-eligible-accounts-response-class.ts +0 -49
- package/models/list-policy-vouchers-response-class.ts +0 -49
- package/models/list-vouchers-response-class.ts +0 -49
- package/models/policy-voucher-class.ts +0 -174
- package/models/policy-voucher-transaction-class.ts +0 -136
- package/models/product-discount-class.ts +0 -96
- package/models/redeem-policy-voucher-request-dto.ts +0 -54
- package/models/redeem-policy-voucher-response-class.ts +0 -93
- package/models/update-campaign-request-dto.ts +0 -48
- package/models/update-campaign-response-class.ts +0 -31
- package/models/update-campaign-status-request-dto.ts +0 -42
- package/models/update-voucher-request-dto.ts +0 -69
- package/models/update-voucher-response-class.ts +0 -31
- package/models/voucher-class.ts +0 -136
- package/models/withdraw-policy-voucher-request-dto.ts +0 -42
- package/models/withdraw-policy-voucher-response-class.ts +0 -87
- package/tsconfig.json +0 -23
|
@@ -1,915 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* EMIL DiscountService
|
|
6
|
-
* The EMIL DiscountService API description
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 1.0
|
|
9
|
-
* Contact: kontakt@emil.de
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
var __extends = (this && this.__extends) || (function () {
|
|
16
|
-
var extendStatics = function (d, b) {
|
|
17
|
-
extendStatics = Object.setPrototypeOf ||
|
|
18
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
-
return extendStatics(d, b);
|
|
21
|
-
};
|
|
22
|
-
return function (d, b) {
|
|
23
|
-
if (typeof b !== "function" && b !== null)
|
|
24
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
-
extendStatics(d, b);
|
|
26
|
-
function __() { this.constructor = d; }
|
|
27
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
-
};
|
|
29
|
-
})();
|
|
30
|
-
var __assign = (this && this.__assign) || function () {
|
|
31
|
-
__assign = Object.assign || function(t) {
|
|
32
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
-
s = arguments[i];
|
|
34
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
-
t[p] = s[p];
|
|
36
|
-
}
|
|
37
|
-
return t;
|
|
38
|
-
};
|
|
39
|
-
return __assign.apply(this, arguments);
|
|
40
|
-
};
|
|
41
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
52
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
-
function step(op) {
|
|
55
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
58
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
-
switch (op[0]) {
|
|
60
|
-
case 0: case 1: t = op; break;
|
|
61
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
-
default:
|
|
65
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
-
if (t[2]) _.ops.pop();
|
|
70
|
-
_.trys.pop(); continue;
|
|
71
|
-
}
|
|
72
|
-
op = body.call(thisArg, _);
|
|
73
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
78
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
79
|
-
};
|
|
80
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
81
|
-
exports.PolicyVouchersApi = exports.PolicyVouchersApiFactory = exports.PolicyVouchersApiFp = exports.PolicyVouchersApiAxiosParamCreator = 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
|
-
* PolicyVouchersApi - axios parameter creator
|
|
90
|
-
* @export
|
|
91
|
-
*/
|
|
92
|
-
var PolicyVouchersApiAxiosParamCreator = function (configuration) {
|
|
93
|
-
var _this = this;
|
|
94
|
-
return {
|
|
95
|
-
/**
|
|
96
|
-
* This will charge the policy voucher.
|
|
97
|
-
* @summary Charges the policy voucher.
|
|
98
|
-
* @param {ChargePolicyVoucherRequestDto} chargePolicyVoucherRequestDto
|
|
99
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
100
|
-
* @param {*} [options] Override http request option.
|
|
101
|
-
* @throws {RequiredError}
|
|
102
|
-
*/
|
|
103
|
-
chargePolicyVoucher: function (chargePolicyVoucherRequestDto, authorization, options) {
|
|
104
|
-
if (options === void 0) { options = {}; }
|
|
105
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
106
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
107
|
-
return __generator(this, function (_a) {
|
|
108
|
-
switch (_a.label) {
|
|
109
|
-
case 0:
|
|
110
|
-
// verify required parameter 'chargePolicyVoucherRequestDto' is not null or undefined
|
|
111
|
-
(0, common_1.assertParamExists)('chargePolicyVoucher', 'chargePolicyVoucherRequestDto', chargePolicyVoucherRequestDto);
|
|
112
|
-
localVarPath = "/discountservice/v1/policy-vouchers/charge";
|
|
113
|
-
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
114
|
-
if (configuration) {
|
|
115
|
-
baseOptions = configuration.baseOptions;
|
|
116
|
-
baseAccessToken = configuration.accessToken;
|
|
117
|
-
}
|
|
118
|
-
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
119
|
-
localVarHeaderParameter = {};
|
|
120
|
-
localVarQueryParameter = {};
|
|
121
|
-
// authentication bearer required
|
|
122
|
-
// http bearer authentication required
|
|
123
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
124
|
-
case 1:
|
|
125
|
-
// authentication bearer required
|
|
126
|
-
// http bearer authentication required
|
|
127
|
-
_a.sent();
|
|
128
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
129
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
130
|
-
}
|
|
131
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
132
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
133
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
134
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
135
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(chargePolicyVoucherRequestDto, localVarRequestOptions, configuration);
|
|
136
|
-
return [2 /*return*/, {
|
|
137
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
138
|
-
options: localVarRequestOptions,
|
|
139
|
-
}];
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
},
|
|
144
|
-
/**
|
|
145
|
-
* This will check if the account is eligible for a specific voucher.
|
|
146
|
-
* @summary Checks the account eligibility.
|
|
147
|
-
* @param {CheckAccountEligibilityRequestDto} checkAccountEligibilityRequestDto
|
|
148
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
149
|
-
* @param {*} [options] Override http request option.
|
|
150
|
-
* @throws {RequiredError}
|
|
151
|
-
*/
|
|
152
|
-
checkAccountEligibility: function (checkAccountEligibilityRequestDto, authorization, options) {
|
|
153
|
-
if (options === void 0) { options = {}; }
|
|
154
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
155
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
156
|
-
return __generator(this, function (_a) {
|
|
157
|
-
switch (_a.label) {
|
|
158
|
-
case 0:
|
|
159
|
-
// verify required parameter 'checkAccountEligibilityRequestDto' is not null or undefined
|
|
160
|
-
(0, common_1.assertParamExists)('checkAccountEligibility', 'checkAccountEligibilityRequestDto', checkAccountEligibilityRequestDto);
|
|
161
|
-
localVarPath = "/discountservice/v1/policy-vouchers/eligibility";
|
|
162
|
-
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
163
|
-
if (configuration) {
|
|
164
|
-
baseOptions = configuration.baseOptions;
|
|
165
|
-
baseAccessToken = configuration.accessToken;
|
|
166
|
-
}
|
|
167
|
-
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
168
|
-
localVarHeaderParameter = {};
|
|
169
|
-
localVarQueryParameter = {};
|
|
170
|
-
// authentication bearer required
|
|
171
|
-
// http bearer authentication required
|
|
172
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
173
|
-
case 1:
|
|
174
|
-
// authentication bearer required
|
|
175
|
-
// http bearer authentication required
|
|
176
|
-
_a.sent();
|
|
177
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
178
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
179
|
-
}
|
|
180
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
181
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
182
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
183
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
184
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(checkAccountEligibilityRequestDto, localVarRequestOptions, configuration);
|
|
185
|
-
return [2 /*return*/, {
|
|
186
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
187
|
-
options: localVarRequestOptions,
|
|
188
|
-
}];
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
});
|
|
192
|
-
},
|
|
193
|
-
/**
|
|
194
|
-
* This will create an policy voucher.
|
|
195
|
-
* @summary Create the policy voucher
|
|
196
|
-
* @param {CreatePolicyVoucherRequestDto} createPolicyVoucherRequestDto
|
|
197
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
198
|
-
* @param {*} [options] Override http request option.
|
|
199
|
-
* @throws {RequiredError}
|
|
200
|
-
*/
|
|
201
|
-
createPolicyVoucher: function (createPolicyVoucherRequestDto, authorization, options) {
|
|
202
|
-
if (options === void 0) { options = {}; }
|
|
203
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
204
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
205
|
-
return __generator(this, function (_a) {
|
|
206
|
-
switch (_a.label) {
|
|
207
|
-
case 0:
|
|
208
|
-
// verify required parameter 'createPolicyVoucherRequestDto' is not null or undefined
|
|
209
|
-
(0, common_1.assertParamExists)('createPolicyVoucher', 'createPolicyVoucherRequestDto', createPolicyVoucherRequestDto);
|
|
210
|
-
localVarPath = "/discountservice/v1/policy-vouchers";
|
|
211
|
-
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
212
|
-
if (configuration) {
|
|
213
|
-
baseOptions = configuration.baseOptions;
|
|
214
|
-
baseAccessToken = configuration.accessToken;
|
|
215
|
-
}
|
|
216
|
-
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
217
|
-
localVarHeaderParameter = {};
|
|
218
|
-
localVarQueryParameter = {};
|
|
219
|
-
// authentication bearer required
|
|
220
|
-
// http bearer authentication required
|
|
221
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
222
|
-
case 1:
|
|
223
|
-
// authentication bearer required
|
|
224
|
-
// http bearer authentication required
|
|
225
|
-
_a.sent();
|
|
226
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
227
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
228
|
-
}
|
|
229
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
230
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
231
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
232
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
233
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createPolicyVoucherRequestDto, localVarRequestOptions, configuration);
|
|
234
|
-
return [2 /*return*/, {
|
|
235
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
236
|
-
options: localVarRequestOptions,
|
|
237
|
-
}];
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
});
|
|
241
|
-
},
|
|
242
|
-
/**
|
|
243
|
-
* This will delete an policy voucher.
|
|
244
|
-
* @summary Delete the policy voucher
|
|
245
|
-
* @param {string} code Unique identifier for the object.
|
|
246
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
247
|
-
* @param {*} [options] Override http request option.
|
|
248
|
-
* @throws {RequiredError}
|
|
249
|
-
*/
|
|
250
|
-
deletePolicyVoucher: function (code, authorization, options) {
|
|
251
|
-
if (options === void 0) { options = {}; }
|
|
252
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
253
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
254
|
-
return __generator(this, function (_a) {
|
|
255
|
-
switch (_a.label) {
|
|
256
|
-
case 0:
|
|
257
|
-
// verify required parameter 'code' is not null or undefined
|
|
258
|
-
(0, common_1.assertParamExists)('deletePolicyVoucher', 'code', code);
|
|
259
|
-
localVarPath = "/discountservice/v1/policy-vouchers/{code}"
|
|
260
|
-
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
261
|
-
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
262
|
-
if (configuration) {
|
|
263
|
-
baseOptions = configuration.baseOptions;
|
|
264
|
-
baseAccessToken = configuration.accessToken;
|
|
265
|
-
}
|
|
266
|
-
localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
|
|
267
|
-
localVarHeaderParameter = {};
|
|
268
|
-
localVarQueryParameter = {};
|
|
269
|
-
// authentication bearer required
|
|
270
|
-
// http bearer authentication required
|
|
271
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
272
|
-
case 1:
|
|
273
|
-
// authentication bearer required
|
|
274
|
-
// http bearer authentication required
|
|
275
|
-
_a.sent();
|
|
276
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
277
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
278
|
-
}
|
|
279
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
280
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
281
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
282
|
-
return [2 /*return*/, {
|
|
283
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
284
|
-
options: localVarRequestOptions,
|
|
285
|
-
}];
|
|
286
|
-
}
|
|
287
|
-
});
|
|
288
|
-
});
|
|
289
|
-
},
|
|
290
|
-
/**
|
|
291
|
-
* This will get an policy voucher.
|
|
292
|
-
* @summary Retrieve the policy voucher
|
|
293
|
-
* @param {string} code Unique identifier for the object.
|
|
294
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
295
|
-
* @param {'transactions' | 'campaign' | 'voucher'} [expand] You can expand policy voucher in this endpoint. By default, campaign and voucher will be expanded fields.
|
|
296
|
-
* @param {*} [options] Override http request option.
|
|
297
|
-
* @throws {RequiredError}
|
|
298
|
-
*/
|
|
299
|
-
getPolicyVoucher: function (code, authorization, expand, options) {
|
|
300
|
-
if (options === void 0) { options = {}; }
|
|
301
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
302
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
303
|
-
return __generator(this, function (_a) {
|
|
304
|
-
switch (_a.label) {
|
|
305
|
-
case 0:
|
|
306
|
-
// verify required parameter 'code' is not null or undefined
|
|
307
|
-
(0, common_1.assertParamExists)('getPolicyVoucher', 'code', code);
|
|
308
|
-
localVarPath = "/discountservice/v1/policy-vouchers/{code}"
|
|
309
|
-
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
310
|
-
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
311
|
-
if (configuration) {
|
|
312
|
-
baseOptions = configuration.baseOptions;
|
|
313
|
-
baseAccessToken = configuration.accessToken;
|
|
314
|
-
}
|
|
315
|
-
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
316
|
-
localVarHeaderParameter = {};
|
|
317
|
-
localVarQueryParameter = {};
|
|
318
|
-
// authentication bearer required
|
|
319
|
-
// http bearer authentication required
|
|
320
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
321
|
-
case 1:
|
|
322
|
-
// authentication bearer required
|
|
323
|
-
// http bearer authentication required
|
|
324
|
-
_a.sent();
|
|
325
|
-
if (expand !== undefined) {
|
|
326
|
-
localVarQueryParameter['expand'] = expand;
|
|
327
|
-
}
|
|
328
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
329
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
330
|
-
}
|
|
331
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
332
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
333
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
334
|
-
return [2 /*return*/, {
|
|
335
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
336
|
-
options: localVarRequestOptions,
|
|
337
|
-
}];
|
|
338
|
-
}
|
|
339
|
-
});
|
|
340
|
-
});
|
|
341
|
-
},
|
|
342
|
-
/**
|
|
343
|
-
* Returns a list of policy vouchers you have previously created. The policy vouchers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
344
|
-
* @summary List policy vouchers
|
|
345
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
346
|
-
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
347
|
-
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
348
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, voucherCode, partnerNumber, campaignId, voucherId, productSlug, version, remainingMonths, remainingCredits, yearlyPremium, redeemedAt, createdAt, campaignSlug</i>
|
|
349
|
-
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: voucherCode, productSlug, partnerNumber</i>
|
|
350
|
-
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, voucherCode, productSlug, partnerNumber, remainingCredits, remainingMonths, yearlyPremium, redeemedAt, createdAt</i>
|
|
351
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: transactions, campaign, voucher<i>
|
|
352
|
-
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, voucherCode, partnerNumber, campaignId, voucherId, productSlug, version, remainingMonths, remainingCredits, yearlyPremium, redeemedAt, createdAt, campaignSlug</i>
|
|
353
|
-
* @param {*} [options] Override http request option.
|
|
354
|
-
* @throws {RequiredError}
|
|
355
|
-
*/
|
|
356
|
-
listPolicyVouchers: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
357
|
-
if (options === void 0) { options = {}; }
|
|
358
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
359
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
360
|
-
return __generator(this, function (_a) {
|
|
361
|
-
switch (_a.label) {
|
|
362
|
-
case 0:
|
|
363
|
-
localVarPath = "/discountservice/v1/policy-vouchers";
|
|
364
|
-
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
365
|
-
if (configuration) {
|
|
366
|
-
baseOptions = configuration.baseOptions;
|
|
367
|
-
baseAccessToken = configuration.accessToken;
|
|
368
|
-
}
|
|
369
|
-
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
370
|
-
localVarHeaderParameter = {};
|
|
371
|
-
localVarQueryParameter = {};
|
|
372
|
-
// authentication bearer required
|
|
373
|
-
// http bearer authentication required
|
|
374
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
375
|
-
case 1:
|
|
376
|
-
// authentication bearer required
|
|
377
|
-
// http bearer authentication required
|
|
378
|
-
_a.sent();
|
|
379
|
-
if (pageSize !== undefined) {
|
|
380
|
-
localVarQueryParameter['pageSize'] = pageSize;
|
|
381
|
-
}
|
|
382
|
-
if (pageToken !== undefined) {
|
|
383
|
-
localVarQueryParameter['pageToken'] = pageToken;
|
|
384
|
-
}
|
|
385
|
-
if (filter !== undefined) {
|
|
386
|
-
localVarQueryParameter['filter'] = filter;
|
|
387
|
-
}
|
|
388
|
-
if (search !== undefined) {
|
|
389
|
-
localVarQueryParameter['search'] = search;
|
|
390
|
-
}
|
|
391
|
-
if (order !== undefined) {
|
|
392
|
-
localVarQueryParameter['order'] = order;
|
|
393
|
-
}
|
|
394
|
-
if (expand !== undefined) {
|
|
395
|
-
localVarQueryParameter['expand'] = expand;
|
|
396
|
-
}
|
|
397
|
-
if (filters !== undefined) {
|
|
398
|
-
localVarQueryParameter['filters'] = filters;
|
|
399
|
-
}
|
|
400
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
401
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
402
|
-
}
|
|
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
|
-
return [2 /*return*/, {
|
|
407
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
408
|
-
options: localVarRequestOptions,
|
|
409
|
-
}];
|
|
410
|
-
}
|
|
411
|
-
});
|
|
412
|
-
});
|
|
413
|
-
},
|
|
414
|
-
/**
|
|
415
|
-
* This will redeem the policy voucher.
|
|
416
|
-
* @summary Redeems the policy voucher.
|
|
417
|
-
* @param {RedeemPolicyVoucherRequestDto} redeemPolicyVoucherRequestDto
|
|
418
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
419
|
-
* @param {*} [options] Override http request option.
|
|
420
|
-
* @throws {RequiredError}
|
|
421
|
-
*/
|
|
422
|
-
redeemPolicyVoucher: function (redeemPolicyVoucherRequestDto, authorization, 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
|
-
switch (_a.label) {
|
|
428
|
-
case 0:
|
|
429
|
-
// verify required parameter 'redeemPolicyVoucherRequestDto' is not null or undefined
|
|
430
|
-
(0, common_1.assertParamExists)('redeemPolicyVoucher', 'redeemPolicyVoucherRequestDto', redeemPolicyVoucherRequestDto);
|
|
431
|
-
localVarPath = "/discountservice/v1/policy-vouchers/redeem";
|
|
432
|
-
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
433
|
-
if (configuration) {
|
|
434
|
-
baseOptions = configuration.baseOptions;
|
|
435
|
-
baseAccessToken = configuration.accessToken;
|
|
436
|
-
}
|
|
437
|
-
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
438
|
-
localVarHeaderParameter = {};
|
|
439
|
-
localVarQueryParameter = {};
|
|
440
|
-
// authentication bearer required
|
|
441
|
-
// http bearer authentication required
|
|
442
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
443
|
-
case 1:
|
|
444
|
-
// authentication bearer required
|
|
445
|
-
// http bearer authentication required
|
|
446
|
-
_a.sent();
|
|
447
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
448
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
449
|
-
}
|
|
450
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
451
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
452
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
453
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
454
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(redeemPolicyVoucherRequestDto, localVarRequestOptions, configuration);
|
|
455
|
-
return [2 /*return*/, {
|
|
456
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
457
|
-
options: localVarRequestOptions,
|
|
458
|
-
}];
|
|
459
|
-
}
|
|
460
|
-
});
|
|
461
|
-
});
|
|
462
|
-
},
|
|
463
|
-
/**
|
|
464
|
-
* This will withdraw the policy voucher.
|
|
465
|
-
* @summary Withdraws the policy voucher.
|
|
466
|
-
* @param {WithdrawPolicyVoucherRequestDto} withdrawPolicyVoucherRequestDto
|
|
467
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
468
|
-
* @param {*} [options] Override http request option.
|
|
469
|
-
* @throws {RequiredError}
|
|
470
|
-
*/
|
|
471
|
-
withdrawPolicyVoucher: function (withdrawPolicyVoucherRequestDto, authorization, options) {
|
|
472
|
-
if (options === void 0) { options = {}; }
|
|
473
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
474
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
475
|
-
return __generator(this, function (_a) {
|
|
476
|
-
switch (_a.label) {
|
|
477
|
-
case 0:
|
|
478
|
-
// verify required parameter 'withdrawPolicyVoucherRequestDto' is not null or undefined
|
|
479
|
-
(0, common_1.assertParamExists)('withdrawPolicyVoucher', 'withdrawPolicyVoucherRequestDto', withdrawPolicyVoucherRequestDto);
|
|
480
|
-
localVarPath = "/discountservice/v1/policy-vouchers/withdraw";
|
|
481
|
-
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
482
|
-
if (configuration) {
|
|
483
|
-
baseOptions = configuration.baseOptions;
|
|
484
|
-
baseAccessToken = configuration.accessToken;
|
|
485
|
-
}
|
|
486
|
-
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
487
|
-
localVarHeaderParameter = {};
|
|
488
|
-
localVarQueryParameter = {};
|
|
489
|
-
// authentication bearer required
|
|
490
|
-
// http bearer authentication required
|
|
491
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
492
|
-
case 1:
|
|
493
|
-
// authentication bearer required
|
|
494
|
-
// http bearer authentication required
|
|
495
|
-
_a.sent();
|
|
496
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
497
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
498
|
-
}
|
|
499
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
500
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
501
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
502
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
503
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(withdrawPolicyVoucherRequestDto, localVarRequestOptions, configuration);
|
|
504
|
-
return [2 /*return*/, {
|
|
505
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
506
|
-
options: localVarRequestOptions,
|
|
507
|
-
}];
|
|
508
|
-
}
|
|
509
|
-
});
|
|
510
|
-
});
|
|
511
|
-
},
|
|
512
|
-
};
|
|
513
|
-
};
|
|
514
|
-
exports.PolicyVouchersApiAxiosParamCreator = PolicyVouchersApiAxiosParamCreator;
|
|
515
|
-
/**
|
|
516
|
-
* PolicyVouchersApi - functional programming interface
|
|
517
|
-
* @export
|
|
518
|
-
*/
|
|
519
|
-
var PolicyVouchersApiFp = function (configuration) {
|
|
520
|
-
var localVarAxiosParamCreator = (0, exports.PolicyVouchersApiAxiosParamCreator)(configuration);
|
|
521
|
-
return {
|
|
522
|
-
/**
|
|
523
|
-
* This will charge the policy voucher.
|
|
524
|
-
* @summary Charges the policy voucher.
|
|
525
|
-
* @param {ChargePolicyVoucherRequestDto} chargePolicyVoucherRequestDto
|
|
526
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
527
|
-
* @param {*} [options] Override http request option.
|
|
528
|
-
* @throws {RequiredError}
|
|
529
|
-
*/
|
|
530
|
-
chargePolicyVoucher: function (chargePolicyVoucherRequestDto, authorization, options) {
|
|
531
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
532
|
-
var localVarAxiosArgs;
|
|
533
|
-
return __generator(this, function (_a) {
|
|
534
|
-
switch (_a.label) {
|
|
535
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.chargePolicyVoucher(chargePolicyVoucherRequestDto, authorization, options)];
|
|
536
|
-
case 1:
|
|
537
|
-
localVarAxiosArgs = _a.sent();
|
|
538
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
539
|
-
}
|
|
540
|
-
});
|
|
541
|
-
});
|
|
542
|
-
},
|
|
543
|
-
/**
|
|
544
|
-
* This will check if the account is eligible for a specific voucher.
|
|
545
|
-
* @summary Checks the account eligibility.
|
|
546
|
-
* @param {CheckAccountEligibilityRequestDto} checkAccountEligibilityRequestDto
|
|
547
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
548
|
-
* @param {*} [options] Override http request option.
|
|
549
|
-
* @throws {RequiredError}
|
|
550
|
-
*/
|
|
551
|
-
checkAccountEligibility: function (checkAccountEligibilityRequestDto, authorization, options) {
|
|
552
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
553
|
-
var localVarAxiosArgs;
|
|
554
|
-
return __generator(this, function (_a) {
|
|
555
|
-
switch (_a.label) {
|
|
556
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.checkAccountEligibility(checkAccountEligibilityRequestDto, authorization, options)];
|
|
557
|
-
case 1:
|
|
558
|
-
localVarAxiosArgs = _a.sent();
|
|
559
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
560
|
-
}
|
|
561
|
-
});
|
|
562
|
-
});
|
|
563
|
-
},
|
|
564
|
-
/**
|
|
565
|
-
* This will create an policy voucher.
|
|
566
|
-
* @summary Create the policy voucher
|
|
567
|
-
* @param {CreatePolicyVoucherRequestDto} createPolicyVoucherRequestDto
|
|
568
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
569
|
-
* @param {*} [options] Override http request option.
|
|
570
|
-
* @throws {RequiredError}
|
|
571
|
-
*/
|
|
572
|
-
createPolicyVoucher: function (createPolicyVoucherRequestDto, authorization, options) {
|
|
573
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
574
|
-
var localVarAxiosArgs;
|
|
575
|
-
return __generator(this, function (_a) {
|
|
576
|
-
switch (_a.label) {
|
|
577
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createPolicyVoucher(createPolicyVoucherRequestDto, authorization, options)];
|
|
578
|
-
case 1:
|
|
579
|
-
localVarAxiosArgs = _a.sent();
|
|
580
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
581
|
-
}
|
|
582
|
-
});
|
|
583
|
-
});
|
|
584
|
-
},
|
|
585
|
-
/**
|
|
586
|
-
* This will delete an policy voucher.
|
|
587
|
-
* @summary Delete the policy voucher
|
|
588
|
-
* @param {string} code Unique identifier for the object.
|
|
589
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
590
|
-
* @param {*} [options] Override http request option.
|
|
591
|
-
* @throws {RequiredError}
|
|
592
|
-
*/
|
|
593
|
-
deletePolicyVoucher: function (code, authorization, options) {
|
|
594
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
595
|
-
var localVarAxiosArgs;
|
|
596
|
-
return __generator(this, function (_a) {
|
|
597
|
-
switch (_a.label) {
|
|
598
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.deletePolicyVoucher(code, authorization, options)];
|
|
599
|
-
case 1:
|
|
600
|
-
localVarAxiosArgs = _a.sent();
|
|
601
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
602
|
-
}
|
|
603
|
-
});
|
|
604
|
-
});
|
|
605
|
-
},
|
|
606
|
-
/**
|
|
607
|
-
* This will get an policy voucher.
|
|
608
|
-
* @summary Retrieve the policy voucher
|
|
609
|
-
* @param {string} code Unique identifier for the object.
|
|
610
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
611
|
-
* @param {'transactions' | 'campaign' | 'voucher'} [expand] You can expand policy voucher in this endpoint. By default, campaign and voucher will be expanded fields.
|
|
612
|
-
* @param {*} [options] Override http request option.
|
|
613
|
-
* @throws {RequiredError}
|
|
614
|
-
*/
|
|
615
|
-
getPolicyVoucher: function (code, authorization, expand, options) {
|
|
616
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
617
|
-
var localVarAxiosArgs;
|
|
618
|
-
return __generator(this, function (_a) {
|
|
619
|
-
switch (_a.label) {
|
|
620
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPolicyVoucher(code, authorization, expand, options)];
|
|
621
|
-
case 1:
|
|
622
|
-
localVarAxiosArgs = _a.sent();
|
|
623
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
624
|
-
}
|
|
625
|
-
});
|
|
626
|
-
});
|
|
627
|
-
},
|
|
628
|
-
/**
|
|
629
|
-
* Returns a list of policy vouchers you have previously created. The policy vouchers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
630
|
-
* @summary List policy vouchers
|
|
631
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
632
|
-
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
633
|
-
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
634
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, voucherCode, partnerNumber, campaignId, voucherId, productSlug, version, remainingMonths, remainingCredits, yearlyPremium, redeemedAt, createdAt, campaignSlug</i>
|
|
635
|
-
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: voucherCode, productSlug, partnerNumber</i>
|
|
636
|
-
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, voucherCode, productSlug, partnerNumber, remainingCredits, remainingMonths, yearlyPremium, redeemedAt, createdAt</i>
|
|
637
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: transactions, campaign, voucher<i>
|
|
638
|
-
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, voucherCode, partnerNumber, campaignId, voucherId, productSlug, version, remainingMonths, remainingCredits, yearlyPremium, redeemedAt, createdAt, campaignSlug</i>
|
|
639
|
-
* @param {*} [options] Override http request option.
|
|
640
|
-
* @throws {RequiredError}
|
|
641
|
-
*/
|
|
642
|
-
listPolicyVouchers: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
643
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
644
|
-
var localVarAxiosArgs;
|
|
645
|
-
return __generator(this, function (_a) {
|
|
646
|
-
switch (_a.label) {
|
|
647
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPolicyVouchers(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
|
|
648
|
-
case 1:
|
|
649
|
-
localVarAxiosArgs = _a.sent();
|
|
650
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
651
|
-
}
|
|
652
|
-
});
|
|
653
|
-
});
|
|
654
|
-
},
|
|
655
|
-
/**
|
|
656
|
-
* This will redeem the policy voucher.
|
|
657
|
-
* @summary Redeems the policy voucher.
|
|
658
|
-
* @param {RedeemPolicyVoucherRequestDto} redeemPolicyVoucherRequestDto
|
|
659
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
660
|
-
* @param {*} [options] Override http request option.
|
|
661
|
-
* @throws {RequiredError}
|
|
662
|
-
*/
|
|
663
|
-
redeemPolicyVoucher: function (redeemPolicyVoucherRequestDto, authorization, options) {
|
|
664
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
665
|
-
var localVarAxiosArgs;
|
|
666
|
-
return __generator(this, function (_a) {
|
|
667
|
-
switch (_a.label) {
|
|
668
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.redeemPolicyVoucher(redeemPolicyVoucherRequestDto, authorization, options)];
|
|
669
|
-
case 1:
|
|
670
|
-
localVarAxiosArgs = _a.sent();
|
|
671
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
672
|
-
}
|
|
673
|
-
});
|
|
674
|
-
});
|
|
675
|
-
},
|
|
676
|
-
/**
|
|
677
|
-
* This will withdraw the policy voucher.
|
|
678
|
-
* @summary Withdraws the policy voucher.
|
|
679
|
-
* @param {WithdrawPolicyVoucherRequestDto} withdrawPolicyVoucherRequestDto
|
|
680
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
681
|
-
* @param {*} [options] Override http request option.
|
|
682
|
-
* @throws {RequiredError}
|
|
683
|
-
*/
|
|
684
|
-
withdrawPolicyVoucher: function (withdrawPolicyVoucherRequestDto, authorization, options) {
|
|
685
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
686
|
-
var localVarAxiosArgs;
|
|
687
|
-
return __generator(this, function (_a) {
|
|
688
|
-
switch (_a.label) {
|
|
689
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.withdrawPolicyVoucher(withdrawPolicyVoucherRequestDto, authorization, options)];
|
|
690
|
-
case 1:
|
|
691
|
-
localVarAxiosArgs = _a.sent();
|
|
692
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
693
|
-
}
|
|
694
|
-
});
|
|
695
|
-
});
|
|
696
|
-
},
|
|
697
|
-
};
|
|
698
|
-
};
|
|
699
|
-
exports.PolicyVouchersApiFp = PolicyVouchersApiFp;
|
|
700
|
-
/**
|
|
701
|
-
* PolicyVouchersApi - factory interface
|
|
702
|
-
* @export
|
|
703
|
-
*/
|
|
704
|
-
var PolicyVouchersApiFactory = function (configuration, basePath, axios) {
|
|
705
|
-
var localVarFp = (0, exports.PolicyVouchersApiFp)(configuration);
|
|
706
|
-
return {
|
|
707
|
-
/**
|
|
708
|
-
* This will charge the policy voucher.
|
|
709
|
-
* @summary Charges the policy voucher.
|
|
710
|
-
* @param {ChargePolicyVoucherRequestDto} chargePolicyVoucherRequestDto
|
|
711
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
712
|
-
* @param {*} [options] Override http request option.
|
|
713
|
-
* @throws {RequiredError}
|
|
714
|
-
*/
|
|
715
|
-
chargePolicyVoucher: function (chargePolicyVoucherRequestDto, authorization, options) {
|
|
716
|
-
return localVarFp.chargePolicyVoucher(chargePolicyVoucherRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
717
|
-
},
|
|
718
|
-
/**
|
|
719
|
-
* This will check if the account is eligible for a specific voucher.
|
|
720
|
-
* @summary Checks the account eligibility.
|
|
721
|
-
* @param {CheckAccountEligibilityRequestDto} checkAccountEligibilityRequestDto
|
|
722
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
723
|
-
* @param {*} [options] Override http request option.
|
|
724
|
-
* @throws {RequiredError}
|
|
725
|
-
*/
|
|
726
|
-
checkAccountEligibility: function (checkAccountEligibilityRequestDto, authorization, options) {
|
|
727
|
-
return localVarFp.checkAccountEligibility(checkAccountEligibilityRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
728
|
-
},
|
|
729
|
-
/**
|
|
730
|
-
* This will create an policy voucher.
|
|
731
|
-
* @summary Create the policy voucher
|
|
732
|
-
* @param {CreatePolicyVoucherRequestDto} createPolicyVoucherRequestDto
|
|
733
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
734
|
-
* @param {*} [options] Override http request option.
|
|
735
|
-
* @throws {RequiredError}
|
|
736
|
-
*/
|
|
737
|
-
createPolicyVoucher: function (createPolicyVoucherRequestDto, authorization, options) {
|
|
738
|
-
return localVarFp.createPolicyVoucher(createPolicyVoucherRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
739
|
-
},
|
|
740
|
-
/**
|
|
741
|
-
* This will delete an policy voucher.
|
|
742
|
-
* @summary Delete the policy voucher
|
|
743
|
-
* @param {string} code Unique identifier for the object.
|
|
744
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
745
|
-
* @param {*} [options] Override http request option.
|
|
746
|
-
* @throws {RequiredError}
|
|
747
|
-
*/
|
|
748
|
-
deletePolicyVoucher: function (code, authorization, options) {
|
|
749
|
-
return localVarFp.deletePolicyVoucher(code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
750
|
-
},
|
|
751
|
-
/**
|
|
752
|
-
* This will get an policy voucher.
|
|
753
|
-
* @summary Retrieve the policy voucher
|
|
754
|
-
* @param {string} code Unique identifier for the object.
|
|
755
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
756
|
-
* @param {'transactions' | 'campaign' | 'voucher'} [expand] You can expand policy voucher in this endpoint. By default, campaign and voucher will be expanded fields.
|
|
757
|
-
* @param {*} [options] Override http request option.
|
|
758
|
-
* @throws {RequiredError}
|
|
759
|
-
*/
|
|
760
|
-
getPolicyVoucher: function (code, authorization, expand, options) {
|
|
761
|
-
return localVarFp.getPolicyVoucher(code, authorization, expand, options).then(function (request) { return request(axios, basePath); });
|
|
762
|
-
},
|
|
763
|
-
/**
|
|
764
|
-
* Returns a list of policy vouchers you have previously created. The policy vouchers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
765
|
-
* @summary List policy vouchers
|
|
766
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
767
|
-
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
768
|
-
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
769
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, voucherCode, partnerNumber, campaignId, voucherId, productSlug, version, remainingMonths, remainingCredits, yearlyPremium, redeemedAt, createdAt, campaignSlug</i>
|
|
770
|
-
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: voucherCode, productSlug, partnerNumber</i>
|
|
771
|
-
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, voucherCode, productSlug, partnerNumber, remainingCredits, remainingMonths, yearlyPremium, redeemedAt, createdAt</i>
|
|
772
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: transactions, campaign, voucher<i>
|
|
773
|
-
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, voucherCode, partnerNumber, campaignId, voucherId, productSlug, version, remainingMonths, remainingCredits, yearlyPremium, redeemedAt, createdAt, campaignSlug</i>
|
|
774
|
-
* @param {*} [options] Override http request option.
|
|
775
|
-
* @throws {RequiredError}
|
|
776
|
-
*/
|
|
777
|
-
listPolicyVouchers: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
778
|
-
return localVarFp.listPolicyVouchers(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
|
|
779
|
-
},
|
|
780
|
-
/**
|
|
781
|
-
* This will redeem the policy voucher.
|
|
782
|
-
* @summary Redeems the policy voucher.
|
|
783
|
-
* @param {RedeemPolicyVoucherRequestDto} redeemPolicyVoucherRequestDto
|
|
784
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
785
|
-
* @param {*} [options] Override http request option.
|
|
786
|
-
* @throws {RequiredError}
|
|
787
|
-
*/
|
|
788
|
-
redeemPolicyVoucher: function (redeemPolicyVoucherRequestDto, authorization, options) {
|
|
789
|
-
return localVarFp.redeemPolicyVoucher(redeemPolicyVoucherRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
790
|
-
},
|
|
791
|
-
/**
|
|
792
|
-
* This will withdraw the policy voucher.
|
|
793
|
-
* @summary Withdraws the policy voucher.
|
|
794
|
-
* @param {WithdrawPolicyVoucherRequestDto} withdrawPolicyVoucherRequestDto
|
|
795
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
796
|
-
* @param {*} [options] Override http request option.
|
|
797
|
-
* @throws {RequiredError}
|
|
798
|
-
*/
|
|
799
|
-
withdrawPolicyVoucher: function (withdrawPolicyVoucherRequestDto, authorization, options) {
|
|
800
|
-
return localVarFp.withdrawPolicyVoucher(withdrawPolicyVoucherRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
801
|
-
},
|
|
802
|
-
};
|
|
803
|
-
};
|
|
804
|
-
exports.PolicyVouchersApiFactory = PolicyVouchersApiFactory;
|
|
805
|
-
/**
|
|
806
|
-
* PolicyVouchersApi - object-oriented interface
|
|
807
|
-
* @export
|
|
808
|
-
* @class PolicyVouchersApi
|
|
809
|
-
* @extends {BaseAPI}
|
|
810
|
-
*/
|
|
811
|
-
var PolicyVouchersApi = /** @class */ (function (_super) {
|
|
812
|
-
__extends(PolicyVouchersApi, _super);
|
|
813
|
-
function PolicyVouchersApi() {
|
|
814
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
815
|
-
}
|
|
816
|
-
/**
|
|
817
|
-
* This will charge the policy voucher.
|
|
818
|
-
* @summary Charges the policy voucher.
|
|
819
|
-
* @param {PolicyVouchersApiChargePolicyVoucherRequest} requestParameters Request parameters.
|
|
820
|
-
* @param {*} [options] Override http request option.
|
|
821
|
-
* @throws {RequiredError}
|
|
822
|
-
* @memberof PolicyVouchersApi
|
|
823
|
-
*/
|
|
824
|
-
PolicyVouchersApi.prototype.chargePolicyVoucher = function (requestParameters, options) {
|
|
825
|
-
var _this = this;
|
|
826
|
-
return (0, exports.PolicyVouchersApiFp)(this.configuration).chargePolicyVoucher(requestParameters.chargePolicyVoucherRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
827
|
-
};
|
|
828
|
-
/**
|
|
829
|
-
* This will check if the account is eligible for a specific voucher.
|
|
830
|
-
* @summary Checks the account eligibility.
|
|
831
|
-
* @param {PolicyVouchersApiCheckAccountEligibilityRequest} requestParameters Request parameters.
|
|
832
|
-
* @param {*} [options] Override http request option.
|
|
833
|
-
* @throws {RequiredError}
|
|
834
|
-
* @memberof PolicyVouchersApi
|
|
835
|
-
*/
|
|
836
|
-
PolicyVouchersApi.prototype.checkAccountEligibility = function (requestParameters, options) {
|
|
837
|
-
var _this = this;
|
|
838
|
-
return (0, exports.PolicyVouchersApiFp)(this.configuration).checkAccountEligibility(requestParameters.checkAccountEligibilityRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
839
|
-
};
|
|
840
|
-
/**
|
|
841
|
-
* This will create an policy voucher.
|
|
842
|
-
* @summary Create the policy voucher
|
|
843
|
-
* @param {PolicyVouchersApiCreatePolicyVoucherRequest} requestParameters Request parameters.
|
|
844
|
-
* @param {*} [options] Override http request option.
|
|
845
|
-
* @throws {RequiredError}
|
|
846
|
-
* @memberof PolicyVouchersApi
|
|
847
|
-
*/
|
|
848
|
-
PolicyVouchersApi.prototype.createPolicyVoucher = function (requestParameters, options) {
|
|
849
|
-
var _this = this;
|
|
850
|
-
return (0, exports.PolicyVouchersApiFp)(this.configuration).createPolicyVoucher(requestParameters.createPolicyVoucherRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
851
|
-
};
|
|
852
|
-
/**
|
|
853
|
-
* This will delete an policy voucher.
|
|
854
|
-
* @summary Delete the policy voucher
|
|
855
|
-
* @param {PolicyVouchersApiDeletePolicyVoucherRequest} requestParameters Request parameters.
|
|
856
|
-
* @param {*} [options] Override http request option.
|
|
857
|
-
* @throws {RequiredError}
|
|
858
|
-
* @memberof PolicyVouchersApi
|
|
859
|
-
*/
|
|
860
|
-
PolicyVouchersApi.prototype.deletePolicyVoucher = function (requestParameters, options) {
|
|
861
|
-
var _this = this;
|
|
862
|
-
return (0, exports.PolicyVouchersApiFp)(this.configuration).deletePolicyVoucher(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
863
|
-
};
|
|
864
|
-
/**
|
|
865
|
-
* This will get an policy voucher.
|
|
866
|
-
* @summary Retrieve the policy voucher
|
|
867
|
-
* @param {PolicyVouchersApiGetPolicyVoucherRequest} requestParameters Request parameters.
|
|
868
|
-
* @param {*} [options] Override http request option.
|
|
869
|
-
* @throws {RequiredError}
|
|
870
|
-
* @memberof PolicyVouchersApi
|
|
871
|
-
*/
|
|
872
|
-
PolicyVouchersApi.prototype.getPolicyVoucher = function (requestParameters, options) {
|
|
873
|
-
var _this = this;
|
|
874
|
-
return (0, exports.PolicyVouchersApiFp)(this.configuration).getPolicyVoucher(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
875
|
-
};
|
|
876
|
-
/**
|
|
877
|
-
* Returns a list of policy vouchers you have previously created. The policy vouchers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
878
|
-
* @summary List policy vouchers
|
|
879
|
-
* @param {PolicyVouchersApiListPolicyVouchersRequest} requestParameters Request parameters.
|
|
880
|
-
* @param {*} [options] Override http request option.
|
|
881
|
-
* @throws {RequiredError}
|
|
882
|
-
* @memberof PolicyVouchersApi
|
|
883
|
-
*/
|
|
884
|
-
PolicyVouchersApi.prototype.listPolicyVouchers = function (requestParameters, options) {
|
|
885
|
-
var _this = this;
|
|
886
|
-
if (requestParameters === void 0) { requestParameters = {}; }
|
|
887
|
-
return (0, exports.PolicyVouchersApiFp)(this.configuration).listPolicyVouchers(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
888
|
-
};
|
|
889
|
-
/**
|
|
890
|
-
* This will redeem the policy voucher.
|
|
891
|
-
* @summary Redeems the policy voucher.
|
|
892
|
-
* @param {PolicyVouchersApiRedeemPolicyVoucherRequest} requestParameters Request parameters.
|
|
893
|
-
* @param {*} [options] Override http request option.
|
|
894
|
-
* @throws {RequiredError}
|
|
895
|
-
* @memberof PolicyVouchersApi
|
|
896
|
-
*/
|
|
897
|
-
PolicyVouchersApi.prototype.redeemPolicyVoucher = function (requestParameters, options) {
|
|
898
|
-
var _this = this;
|
|
899
|
-
return (0, exports.PolicyVouchersApiFp)(this.configuration).redeemPolicyVoucher(requestParameters.redeemPolicyVoucherRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
900
|
-
};
|
|
901
|
-
/**
|
|
902
|
-
* This will withdraw the policy voucher.
|
|
903
|
-
* @summary Withdraws the policy voucher.
|
|
904
|
-
* @param {PolicyVouchersApiWithdrawPolicyVoucherRequest} requestParameters Request parameters.
|
|
905
|
-
* @param {*} [options] Override http request option.
|
|
906
|
-
* @throws {RequiredError}
|
|
907
|
-
* @memberof PolicyVouchersApi
|
|
908
|
-
*/
|
|
909
|
-
PolicyVouchersApi.prototype.withdrawPolicyVoucher = function (requestParameters, options) {
|
|
910
|
-
var _this = this;
|
|
911
|
-
return (0, exports.PolicyVouchersApiFp)(this.configuration).withdrawPolicyVoucher(requestParameters.withdrawPolicyVoucherRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
912
|
-
};
|
|
913
|
-
return PolicyVouchersApi;
|
|
914
|
-
}(base_1.BaseAPI));
|
|
915
|
-
exports.PolicyVouchersApi = PolicyVouchersApi;
|