@emilgroup/discount-sdk-node 1.1.1-beta.1 → 1.2.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.
@@ -48,8 +48,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
48
48
  });
49
49
  };
50
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 = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
52
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
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
53
  function verb(n) { return function (v) { return step([n, v]); }; }
54
54
  function step(op) {
55
55
  if (f) throw new TypeError("Generator is already executing.");
@@ -74,15 +74,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
74
74
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
75
  }
76
76
  };
77
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
78
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
79
- if (ar || !(i in from)) {
80
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
81
- ar[i] = from[i];
82
- }
83
- }
84
- return to.concat(ar || Array.prototype.slice.call(from));
85
- };
86
77
  var __importDefault = (this && this.__importDefault) || function (mod) {
87
78
  return (mod && mod.__esModule) ? mod : { "default": mod };
88
79
  };
@@ -111,14 +102,10 @@ var DefaultApiAxiosParamCreator = function (configuration) {
111
102
  * @param {*} [options] Override http request option.
112
103
  * @throws {RequiredError}
113
104
  */
114
- check: function () {
115
- var args_1 = [];
116
- for (var _i = 0; _i < arguments.length; _i++) {
117
- args_1[_i] = arguments[_i];
118
- }
119
- return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (options) {
105
+ check: function (options) {
106
+ if (options === void 0) { options = {}; }
107
+ return __awaiter(_this, void 0, void 0, function () {
120
108
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
121
- if (options === void 0) { options = {}; }
122
109
  return __generator(this, function (_a) {
123
110
  localVarPath = "/discountservice/health";
124
111
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -32,13 +32,12 @@ export declare const PolicyVouchersApiAxiosParamCreator: (configuration?: Config
32
32
  /**
33
33
  * This will charge the policy voucher.
34
34
  * @summary Charges the policy voucher.
35
- * @param {any} code Unique identifier for the object.
36
35
  * @param {ChargePolicyVoucherRequestDto} chargePolicyVoucherRequestDto
37
36
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
38
37
  * @param {*} [options] Override http request option.
39
38
  * @throws {RequiredError}
40
39
  */
41
- chargePolicyVoucher: (code: any, chargePolicyVoucherRequestDto: ChargePolicyVoucherRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
40
+ chargePolicyVoucher: (chargePolicyVoucherRequestDto: ChargePolicyVoucherRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
42
41
  /**
43
42
  * This will check if the account is eligible for a specific voucher.
44
43
  * @summary Checks the account eligibility.
@@ -75,7 +74,7 @@ export declare const PolicyVouchersApiAxiosParamCreator: (configuration?: Config
75
74
  * @param {*} [options] Override http request option.
76
75
  * @throws {RequiredError}
77
76
  */
78
- getPolicyVoucher: (code: string, authorization?: string, expand?: "transactions" | "campaign" | "voucher", options?: AxiosRequestConfig) => Promise<RequestArgs>;
77
+ getPolicyVoucher: (code: string, authorization?: string, expand?: 'transactions' | 'campaign' | 'voucher', options?: AxiosRequestConfig) => Promise<RequestArgs>;
79
78
  /**
80
79
  * 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.
81
80
  * @summary List policy vouchers
@@ -94,23 +93,21 @@ export declare const PolicyVouchersApiAxiosParamCreator: (configuration?: Config
94
93
  /**
95
94
  * This will redeem the policy voucher.
96
95
  * @summary Redeems the policy voucher.
97
- * @param {any} code Unique identifier for the object.
98
96
  * @param {RedeemPolicyVoucherRequestDto} redeemPolicyVoucherRequestDto
99
97
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
100
98
  * @param {*} [options] Override http request option.
101
99
  * @throws {RequiredError}
102
100
  */
103
- redeemPolicyVoucher: (code: any, redeemPolicyVoucherRequestDto: RedeemPolicyVoucherRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
101
+ redeemPolicyVoucher: (redeemPolicyVoucherRequestDto: RedeemPolicyVoucherRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
104
102
  /**
105
103
  * This will withdraw the policy voucher.
106
104
  * @summary Withdraws the policy voucher.
107
- * @param {any} code Unique identifier for the object.
108
105
  * @param {WithdrawPolicyVoucherRequestDto} withdrawPolicyVoucherRequestDto
109
106
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
110
107
  * @param {*} [options] Override http request option.
111
108
  * @throws {RequiredError}
112
109
  */
113
- withdrawPolicyVoucher: (code: any, withdrawPolicyVoucherRequestDto: WithdrawPolicyVoucherRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
110
+ withdrawPolicyVoucher: (withdrawPolicyVoucherRequestDto: WithdrawPolicyVoucherRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
114
111
  };
115
112
  /**
116
113
  * PolicyVouchersApi - functional programming interface
@@ -120,13 +117,12 @@ export declare const PolicyVouchersApiFp: (configuration?: Configuration) => {
120
117
  /**
121
118
  * This will charge the policy voucher.
122
119
  * @summary Charges the policy voucher.
123
- * @param {any} code Unique identifier for the object.
124
120
  * @param {ChargePolicyVoucherRequestDto} chargePolicyVoucherRequestDto
125
121
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
126
122
  * @param {*} [options] Override http request option.
127
123
  * @throws {RequiredError}
128
124
  */
129
- chargePolicyVoucher(code: any, chargePolicyVoucherRequestDto: ChargePolicyVoucherRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ChargePolicyVoucherResponseClass>>;
125
+ chargePolicyVoucher(chargePolicyVoucherRequestDto: ChargePolicyVoucherRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ChargePolicyVoucherResponseClass>>;
130
126
  /**
131
127
  * This will check if the account is eligible for a specific voucher.
132
128
  * @summary Checks the account eligibility.
@@ -163,7 +159,7 @@ export declare const PolicyVouchersApiFp: (configuration?: Configuration) => {
163
159
  * @param {*} [options] Override http request option.
164
160
  * @throws {RequiredError}
165
161
  */
166
- getPolicyVoucher(code: string, authorization?: string, expand?: "transactions" | "campaign" | "voucher", options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPolicyVoucherResponseClass>>;
162
+ getPolicyVoucher(code: string, authorization?: string, expand?: 'transactions' | 'campaign' | 'voucher', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPolicyVoucherResponseClass>>;
167
163
  /**
168
164
  * 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.
169
165
  * @summary List policy vouchers
@@ -182,23 +178,21 @@ export declare const PolicyVouchersApiFp: (configuration?: Configuration) => {
182
178
  /**
183
179
  * This will redeem the policy voucher.
184
180
  * @summary Redeems the policy voucher.
185
- * @param {any} code Unique identifier for the object.
186
181
  * @param {RedeemPolicyVoucherRequestDto} redeemPolicyVoucherRequestDto
187
182
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
188
183
  * @param {*} [options] Override http request option.
189
184
  * @throws {RequiredError}
190
185
  */
191
- redeemPolicyVoucher(code: any, redeemPolicyVoucherRequestDto: RedeemPolicyVoucherRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RedeemPolicyVoucherResponseClass>>;
186
+ redeemPolicyVoucher(redeemPolicyVoucherRequestDto: RedeemPolicyVoucherRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RedeemPolicyVoucherResponseClass>>;
192
187
  /**
193
188
  * This will withdraw the policy voucher.
194
189
  * @summary Withdraws the policy voucher.
195
- * @param {any} code Unique identifier for the object.
196
190
  * @param {WithdrawPolicyVoucherRequestDto} withdrawPolicyVoucherRequestDto
197
191
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
198
192
  * @param {*} [options] Override http request option.
199
193
  * @throws {RequiredError}
200
194
  */
201
- withdrawPolicyVoucher(code: any, withdrawPolicyVoucherRequestDto: WithdrawPolicyVoucherRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WithdrawPolicyVoucherResponseClass>>;
195
+ withdrawPolicyVoucher(withdrawPolicyVoucherRequestDto: WithdrawPolicyVoucherRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WithdrawPolicyVoucherResponseClass>>;
202
196
  };
203
197
  /**
204
198
  * PolicyVouchersApi - factory interface
@@ -208,13 +202,12 @@ export declare const PolicyVouchersApiFactory: (configuration?: Configuration, b
208
202
  /**
209
203
  * This will charge the policy voucher.
210
204
  * @summary Charges the policy voucher.
211
- * @param {any} code Unique identifier for the object.
212
205
  * @param {ChargePolicyVoucherRequestDto} chargePolicyVoucherRequestDto
213
206
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
214
207
  * @param {*} [options] Override http request option.
215
208
  * @throws {RequiredError}
216
209
  */
217
- chargePolicyVoucher(code: any, chargePolicyVoucherRequestDto: ChargePolicyVoucherRequestDto, authorization?: string, options?: any): AxiosPromise<ChargePolicyVoucherResponseClass>;
210
+ chargePolicyVoucher(chargePolicyVoucherRequestDto: ChargePolicyVoucherRequestDto, authorization?: string, options?: any): AxiosPromise<ChargePolicyVoucherResponseClass>;
218
211
  /**
219
212
  * This will check if the account is eligible for a specific voucher.
220
213
  * @summary Checks the account eligibility.
@@ -251,7 +244,7 @@ export declare const PolicyVouchersApiFactory: (configuration?: Configuration, b
251
244
  * @param {*} [options] Override http request option.
252
245
  * @throws {RequiredError}
253
246
  */
254
- getPolicyVoucher(code: string, authorization?: string, expand?: "transactions" | "campaign" | "voucher", options?: any): AxiosPromise<GetPolicyVoucherResponseClass>;
247
+ getPolicyVoucher(code: string, authorization?: string, expand?: 'transactions' | 'campaign' | 'voucher', options?: any): AxiosPromise<GetPolicyVoucherResponseClass>;
255
248
  /**
256
249
  * 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.
257
250
  * @summary List policy vouchers
@@ -270,23 +263,21 @@ export declare const PolicyVouchersApiFactory: (configuration?: Configuration, b
270
263
  /**
271
264
  * This will redeem the policy voucher.
272
265
  * @summary Redeems the policy voucher.
273
- * @param {any} code Unique identifier for the object.
274
266
  * @param {RedeemPolicyVoucherRequestDto} redeemPolicyVoucherRequestDto
275
267
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
276
268
  * @param {*} [options] Override http request option.
277
269
  * @throws {RequiredError}
278
270
  */
279
- redeemPolicyVoucher(code: any, redeemPolicyVoucherRequestDto: RedeemPolicyVoucherRequestDto, authorization?: string, options?: any): AxiosPromise<RedeemPolicyVoucherResponseClass>;
271
+ redeemPolicyVoucher(redeemPolicyVoucherRequestDto: RedeemPolicyVoucherRequestDto, authorization?: string, options?: any): AxiosPromise<RedeemPolicyVoucherResponseClass>;
280
272
  /**
281
273
  * This will withdraw the policy voucher.
282
274
  * @summary Withdraws the policy voucher.
283
- * @param {any} code Unique identifier for the object.
284
275
  * @param {WithdrawPolicyVoucherRequestDto} withdrawPolicyVoucherRequestDto
285
276
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
286
277
  * @param {*} [options] Override http request option.
287
278
  * @throws {RequiredError}
288
279
  */
289
- withdrawPolicyVoucher(code: any, withdrawPolicyVoucherRequestDto: WithdrawPolicyVoucherRequestDto, authorization?: string, options?: any): AxiosPromise<WithdrawPolicyVoucherResponseClass>;
280
+ withdrawPolicyVoucher(withdrawPolicyVoucherRequestDto: WithdrawPolicyVoucherRequestDto, authorization?: string, options?: any): AxiosPromise<WithdrawPolicyVoucherResponseClass>;
290
281
  };
291
282
  /**
292
283
  * Request parameters for chargePolicyVoucher operation in PolicyVouchersApi.
@@ -294,12 +285,6 @@ export declare const PolicyVouchersApiFactory: (configuration?: Configuration, b
294
285
  * @interface PolicyVouchersApiChargePolicyVoucherRequest
295
286
  */
296
287
  export interface PolicyVouchersApiChargePolicyVoucherRequest {
297
- /**
298
- * Unique identifier for the object.
299
- * @type {any}
300
- * @memberof PolicyVouchersApiChargePolicyVoucher
301
- */
302
- readonly code: any;
303
288
  /**
304
289
  *
305
290
  * @type {ChargePolicyVoucherRequestDto}
@@ -456,12 +441,6 @@ export interface PolicyVouchersApiListPolicyVouchersRequest {
456
441
  * @interface PolicyVouchersApiRedeemPolicyVoucherRequest
457
442
  */
458
443
  export interface PolicyVouchersApiRedeemPolicyVoucherRequest {
459
- /**
460
- * Unique identifier for the object.
461
- * @type {any}
462
- * @memberof PolicyVouchersApiRedeemPolicyVoucher
463
- */
464
- readonly code: any;
465
444
  /**
466
445
  *
467
446
  * @type {RedeemPolicyVoucherRequestDto}
@@ -481,12 +460,6 @@ export interface PolicyVouchersApiRedeemPolicyVoucherRequest {
481
460
  * @interface PolicyVouchersApiWithdrawPolicyVoucherRequest
482
461
  */
483
462
  export interface PolicyVouchersApiWithdrawPolicyVoucherRequest {
484
- /**
485
- * Unique identifier for the object.
486
- * @type {any}
487
- * @memberof PolicyVouchersApiWithdrawPolicyVoucher
488
- */
489
- readonly code: any;
490
463
  /**
491
464
  *
492
465
  * @type {WithdrawPolicyVoucherRequestDto}
@@ -48,8 +48,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
48
48
  });
49
49
  };
50
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 = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
52
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
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
53
  function verb(n) { return function (v) { return step([n, v]); }; }
54
54
  function step(op) {
55
55
  if (f) throw new TypeError("Generator is already executing.");
@@ -74,15 +74,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
74
74
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
75
  }
76
76
  };
77
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
78
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
79
- if (ar || !(i in from)) {
80
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
81
- ar[i] = from[i];
82
- }
83
- }
84
- return to.concat(ar || Array.prototype.slice.call(from));
85
- };
86
77
  var __importDefault = (this && this.__importDefault) || function (mod) {
87
78
  return (mod && mod.__esModule) ? mod : { "default": mod };
88
79
  };
@@ -108,29 +99,21 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
108
99
  /**
109
100
  * This will charge the policy voucher.
110
101
  * @summary Charges the policy voucher.
111
- * @param {any} code Unique identifier for the object.
112
102
  * @param {ChargePolicyVoucherRequestDto} chargePolicyVoucherRequestDto
113
103
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
114
104
  * @param {*} [options] Override http request option.
115
105
  * @throws {RequiredError}
116
106
  */
117
- chargePolicyVoucher: function (code_1, chargePolicyVoucherRequestDto_1, authorization_1) {
118
- var args_1 = [];
119
- for (var _i = 3; _i < arguments.length; _i++) {
120
- args_1[_i - 3] = arguments[_i];
121
- }
122
- return __awaiter(_this, __spreadArray([code_1, chargePolicyVoucherRequestDto_1, authorization_1], args_1, true), void 0, function (code, chargePolicyVoucherRequestDto, authorization, options) {
107
+ chargePolicyVoucher: function (chargePolicyVoucherRequestDto, authorization, options) {
108
+ if (options === void 0) { options = {}; }
109
+ return __awaiter(_this, void 0, void 0, function () {
123
110
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
124
- if (options === void 0) { options = {}; }
125
111
  return __generator(this, function (_a) {
126
112
  switch (_a.label) {
127
113
  case 0:
128
- // verify required parameter 'code' is not null or undefined
129
- (0, common_1.assertParamExists)('chargePolicyVoucher', 'code', code);
130
114
  // verify required parameter 'chargePolicyVoucherRequestDto' is not null or undefined
131
115
  (0, common_1.assertParamExists)('chargePolicyVoucher', 'chargePolicyVoucherRequestDto', chargePolicyVoucherRequestDto);
132
- localVarPath = "/discountservice/v1/policy-vouchers/charge"
133
- .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
116
+ localVarPath = "/discountservice/v1/policy-vouchers/charge";
134
117
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
135
118
  if (configuration) {
136
119
  baseOptions = configuration.baseOptions;
@@ -170,14 +153,10 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
170
153
  * @param {*} [options] Override http request option.
171
154
  * @throws {RequiredError}
172
155
  */
173
- checkAccountEligibility: function (checkAccountEligibilityRequestDto_1, authorization_1) {
174
- var args_1 = [];
175
- for (var _i = 2; _i < arguments.length; _i++) {
176
- args_1[_i - 2] = arguments[_i];
177
- }
178
- return __awaiter(_this, __spreadArray([checkAccountEligibilityRequestDto_1, authorization_1], args_1, true), void 0, function (checkAccountEligibilityRequestDto, authorization, options) {
156
+ checkAccountEligibility: function (checkAccountEligibilityRequestDto, authorization, options) {
157
+ if (options === void 0) { options = {}; }
158
+ return __awaiter(_this, void 0, void 0, function () {
179
159
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
180
- if (options === void 0) { options = {}; }
181
160
  return __generator(this, function (_a) {
182
161
  switch (_a.label) {
183
162
  case 0:
@@ -223,14 +202,10 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
223
202
  * @param {*} [options] Override http request option.
224
203
  * @throws {RequiredError}
225
204
  */
226
- createPolicyVoucher: function (createPolicyVoucherRequestDto_1, authorization_1) {
227
- var args_1 = [];
228
- for (var _i = 2; _i < arguments.length; _i++) {
229
- args_1[_i - 2] = arguments[_i];
230
- }
231
- return __awaiter(_this, __spreadArray([createPolicyVoucherRequestDto_1, authorization_1], args_1, true), void 0, function (createPolicyVoucherRequestDto, authorization, options) {
205
+ createPolicyVoucher: function (createPolicyVoucherRequestDto, authorization, options) {
206
+ if (options === void 0) { options = {}; }
207
+ return __awaiter(_this, void 0, void 0, function () {
232
208
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
233
- if (options === void 0) { options = {}; }
234
209
  return __generator(this, function (_a) {
235
210
  switch (_a.label) {
236
211
  case 0:
@@ -276,14 +251,10 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
276
251
  * @param {*} [options] Override http request option.
277
252
  * @throws {RequiredError}
278
253
  */
279
- deletePolicyVoucher: function (code_1, authorization_1) {
280
- var args_1 = [];
281
- for (var _i = 2; _i < arguments.length; _i++) {
282
- args_1[_i - 2] = arguments[_i];
283
- }
284
- return __awaiter(_this, __spreadArray([code_1, authorization_1], args_1, true), void 0, function (code, authorization, options) {
254
+ deletePolicyVoucher: function (code, authorization, options) {
255
+ if (options === void 0) { options = {}; }
256
+ return __awaiter(_this, void 0, void 0, function () {
285
257
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
286
- if (options === void 0) { options = {}; }
287
258
  return __generator(this, function (_a) {
288
259
  switch (_a.label) {
289
260
  case 0:
@@ -329,14 +300,10 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
329
300
  * @param {*} [options] Override http request option.
330
301
  * @throws {RequiredError}
331
302
  */
332
- getPolicyVoucher: function (code_1, authorization_1, expand_1) {
333
- var args_1 = [];
334
- for (var _i = 3; _i < arguments.length; _i++) {
335
- args_1[_i - 3] = arguments[_i];
336
- }
337
- return __awaiter(_this, __spreadArray([code_1, authorization_1, expand_1], args_1, true), void 0, function (code, authorization, expand, options) {
303
+ getPolicyVoucher: function (code, authorization, expand, options) {
304
+ if (options === void 0) { options = {}; }
305
+ return __awaiter(_this, void 0, void 0, function () {
338
306
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
339
- if (options === void 0) { options = {}; }
340
307
  return __generator(this, function (_a) {
341
308
  switch (_a.label) {
342
309
  case 0:
@@ -390,14 +357,10 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
390
357
  * @param {*} [options] Override http request option.
391
358
  * @throws {RequiredError}
392
359
  */
393
- listPolicyVouchers: function (authorization_1, pageSize_1, pageToken_1, filter_1, search_1, order_1, expand_1, filters_1) {
394
- var args_1 = [];
395
- for (var _i = 8; _i < arguments.length; _i++) {
396
- args_1[_i - 8] = arguments[_i];
397
- }
398
- return __awaiter(_this, __spreadArray([authorization_1, pageSize_1, pageToken_1, filter_1, search_1, order_1, expand_1, filters_1], args_1, true), void 0, function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
360
+ listPolicyVouchers: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
361
+ if (options === void 0) { options = {}; }
362
+ return __awaiter(_this, void 0, void 0, function () {
399
363
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
400
- if (options === void 0) { options = {}; }
401
364
  return __generator(this, function (_a) {
402
365
  switch (_a.label) {
403
366
  case 0:
@@ -455,29 +418,21 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
455
418
  /**
456
419
  * This will redeem the policy voucher.
457
420
  * @summary Redeems the policy voucher.
458
- * @param {any} code Unique identifier for the object.
459
421
  * @param {RedeemPolicyVoucherRequestDto} redeemPolicyVoucherRequestDto
460
422
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
461
423
  * @param {*} [options] Override http request option.
462
424
  * @throws {RequiredError}
463
425
  */
464
- redeemPolicyVoucher: function (code_1, redeemPolicyVoucherRequestDto_1, authorization_1) {
465
- var args_1 = [];
466
- for (var _i = 3; _i < arguments.length; _i++) {
467
- args_1[_i - 3] = arguments[_i];
468
- }
469
- return __awaiter(_this, __spreadArray([code_1, redeemPolicyVoucherRequestDto_1, authorization_1], args_1, true), void 0, function (code, redeemPolicyVoucherRequestDto, authorization, options) {
426
+ redeemPolicyVoucher: function (redeemPolicyVoucherRequestDto, authorization, options) {
427
+ if (options === void 0) { options = {}; }
428
+ return __awaiter(_this, void 0, void 0, function () {
470
429
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
471
- if (options === void 0) { options = {}; }
472
430
  return __generator(this, function (_a) {
473
431
  switch (_a.label) {
474
432
  case 0:
475
- // verify required parameter 'code' is not null or undefined
476
- (0, common_1.assertParamExists)('redeemPolicyVoucher', 'code', code);
477
433
  // verify required parameter 'redeemPolicyVoucherRequestDto' is not null or undefined
478
434
  (0, common_1.assertParamExists)('redeemPolicyVoucher', 'redeemPolicyVoucherRequestDto', redeemPolicyVoucherRequestDto);
479
- localVarPath = "/discountservice/v1/policy-vouchers/redeem"
480
- .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
435
+ localVarPath = "/discountservice/v1/policy-vouchers/redeem";
481
436
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
482
437
  if (configuration) {
483
438
  baseOptions = configuration.baseOptions;
@@ -512,29 +467,21 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
512
467
  /**
513
468
  * This will withdraw the policy voucher.
514
469
  * @summary Withdraws the policy voucher.
515
- * @param {any} code Unique identifier for the object.
516
470
  * @param {WithdrawPolicyVoucherRequestDto} withdrawPolicyVoucherRequestDto
517
471
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
518
472
  * @param {*} [options] Override http request option.
519
473
  * @throws {RequiredError}
520
474
  */
521
- withdrawPolicyVoucher: function (code_1, withdrawPolicyVoucherRequestDto_1, authorization_1) {
522
- var args_1 = [];
523
- for (var _i = 3; _i < arguments.length; _i++) {
524
- args_1[_i - 3] = arguments[_i];
525
- }
526
- return __awaiter(_this, __spreadArray([code_1, withdrawPolicyVoucherRequestDto_1, authorization_1], args_1, true), void 0, function (code, withdrawPolicyVoucherRequestDto, authorization, options) {
475
+ withdrawPolicyVoucher: function (withdrawPolicyVoucherRequestDto, authorization, options) {
476
+ if (options === void 0) { options = {}; }
477
+ return __awaiter(_this, void 0, void 0, function () {
527
478
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
528
- if (options === void 0) { options = {}; }
529
479
  return __generator(this, function (_a) {
530
480
  switch (_a.label) {
531
481
  case 0:
532
- // verify required parameter 'code' is not null or undefined
533
- (0, common_1.assertParamExists)('withdrawPolicyVoucher', 'code', code);
534
482
  // verify required parameter 'withdrawPolicyVoucherRequestDto' is not null or undefined
535
483
  (0, common_1.assertParamExists)('withdrawPolicyVoucher', 'withdrawPolicyVoucherRequestDto', withdrawPolicyVoucherRequestDto);
536
- localVarPath = "/discountservice/v1/policy-vouchers/withdraw"
537
- .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
484
+ localVarPath = "/discountservice/v1/policy-vouchers/withdraw";
538
485
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
539
486
  if (configuration) {
540
487
  baseOptions = configuration.baseOptions;
@@ -579,18 +526,17 @@ var PolicyVouchersApiFp = function (configuration) {
579
526
  /**
580
527
  * This will charge the policy voucher.
581
528
  * @summary Charges the policy voucher.
582
- * @param {any} code Unique identifier for the object.
583
529
  * @param {ChargePolicyVoucherRequestDto} chargePolicyVoucherRequestDto
584
530
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
585
531
  * @param {*} [options] Override http request option.
586
532
  * @throws {RequiredError}
587
533
  */
588
- chargePolicyVoucher: function (code, chargePolicyVoucherRequestDto, authorization, options) {
534
+ chargePolicyVoucher: function (chargePolicyVoucherRequestDto, authorization, options) {
589
535
  return __awaiter(this, void 0, void 0, function () {
590
536
  var localVarAxiosArgs;
591
537
  return __generator(this, function (_a) {
592
538
  switch (_a.label) {
593
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.chargePolicyVoucher(code, chargePolicyVoucherRequestDto, authorization, options)];
539
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.chargePolicyVoucher(chargePolicyVoucherRequestDto, authorization, options)];
594
540
  case 1:
595
541
  localVarAxiosArgs = _a.sent();
596
542
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -713,18 +659,17 @@ var PolicyVouchersApiFp = function (configuration) {
713
659
  /**
714
660
  * This will redeem the policy voucher.
715
661
  * @summary Redeems the policy voucher.
716
- * @param {any} code Unique identifier for the object.
717
662
  * @param {RedeemPolicyVoucherRequestDto} redeemPolicyVoucherRequestDto
718
663
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
719
664
  * @param {*} [options] Override http request option.
720
665
  * @throws {RequiredError}
721
666
  */
722
- redeemPolicyVoucher: function (code, redeemPolicyVoucherRequestDto, authorization, options) {
667
+ redeemPolicyVoucher: function (redeemPolicyVoucherRequestDto, authorization, options) {
723
668
  return __awaiter(this, void 0, void 0, function () {
724
669
  var localVarAxiosArgs;
725
670
  return __generator(this, function (_a) {
726
671
  switch (_a.label) {
727
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.redeemPolicyVoucher(code, redeemPolicyVoucherRequestDto, authorization, options)];
672
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.redeemPolicyVoucher(redeemPolicyVoucherRequestDto, authorization, options)];
728
673
  case 1:
729
674
  localVarAxiosArgs = _a.sent();
730
675
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -735,18 +680,17 @@ var PolicyVouchersApiFp = function (configuration) {
735
680
  /**
736
681
  * This will withdraw the policy voucher.
737
682
  * @summary Withdraws the policy voucher.
738
- * @param {any} code Unique identifier for the object.
739
683
  * @param {WithdrawPolicyVoucherRequestDto} withdrawPolicyVoucherRequestDto
740
684
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
741
685
  * @param {*} [options] Override http request option.
742
686
  * @throws {RequiredError}
743
687
  */
744
- withdrawPolicyVoucher: function (code, withdrawPolicyVoucherRequestDto, authorization, options) {
688
+ withdrawPolicyVoucher: function (withdrawPolicyVoucherRequestDto, authorization, options) {
745
689
  return __awaiter(this, void 0, void 0, function () {
746
690
  var localVarAxiosArgs;
747
691
  return __generator(this, function (_a) {
748
692
  switch (_a.label) {
749
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.withdrawPolicyVoucher(code, withdrawPolicyVoucherRequestDto, authorization, options)];
693
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.withdrawPolicyVoucher(withdrawPolicyVoucherRequestDto, authorization, options)];
750
694
  case 1:
751
695
  localVarAxiosArgs = _a.sent();
752
696
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -767,14 +711,13 @@ var PolicyVouchersApiFactory = function (configuration, basePath, axios) {
767
711
  /**
768
712
  * This will charge the policy voucher.
769
713
  * @summary Charges the policy voucher.
770
- * @param {any} code Unique identifier for the object.
771
714
  * @param {ChargePolicyVoucherRequestDto} chargePolicyVoucherRequestDto
772
715
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
773
716
  * @param {*} [options] Override http request option.
774
717
  * @throws {RequiredError}
775
718
  */
776
- chargePolicyVoucher: function (code, chargePolicyVoucherRequestDto, authorization, options) {
777
- return localVarFp.chargePolicyVoucher(code, chargePolicyVoucherRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
719
+ chargePolicyVoucher: function (chargePolicyVoucherRequestDto, authorization, options) {
720
+ return localVarFp.chargePolicyVoucher(chargePolicyVoucherRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
778
721
  },
779
722
  /**
780
723
  * This will check if the account is eligible for a specific voucher.
@@ -841,26 +784,24 @@ var PolicyVouchersApiFactory = function (configuration, basePath, axios) {
841
784
  /**
842
785
  * This will redeem the policy voucher.
843
786
  * @summary Redeems the policy voucher.
844
- * @param {any} code Unique identifier for the object.
845
787
  * @param {RedeemPolicyVoucherRequestDto} redeemPolicyVoucherRequestDto
846
788
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
847
789
  * @param {*} [options] Override http request option.
848
790
  * @throws {RequiredError}
849
791
  */
850
- redeemPolicyVoucher: function (code, redeemPolicyVoucherRequestDto, authorization, options) {
851
- return localVarFp.redeemPolicyVoucher(code, redeemPolicyVoucherRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
792
+ redeemPolicyVoucher: function (redeemPolicyVoucherRequestDto, authorization, options) {
793
+ return localVarFp.redeemPolicyVoucher(redeemPolicyVoucherRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
852
794
  },
853
795
  /**
854
796
  * This will withdraw the policy voucher.
855
797
  * @summary Withdraws the policy voucher.
856
- * @param {any} code Unique identifier for the object.
857
798
  * @param {WithdrawPolicyVoucherRequestDto} withdrawPolicyVoucherRequestDto
858
799
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
859
800
  * @param {*} [options] Override http request option.
860
801
  * @throws {RequiredError}
861
802
  */
862
- withdrawPolicyVoucher: function (code, withdrawPolicyVoucherRequestDto, authorization, options) {
863
- return localVarFp.withdrawPolicyVoucher(code, withdrawPolicyVoucherRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
803
+ withdrawPolicyVoucher: function (withdrawPolicyVoucherRequestDto, authorization, options) {
804
+ return localVarFp.withdrawPolicyVoucher(withdrawPolicyVoucherRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
864
805
  },
865
806
  };
866
807
  };
@@ -886,7 +827,7 @@ var PolicyVouchersApi = /** @class */ (function (_super) {
886
827
  */
887
828
  PolicyVouchersApi.prototype.chargePolicyVoucher = function (requestParameters, options) {
888
829
  var _this = this;
889
- return (0, exports.PolicyVouchersApiFp)(this.configuration).chargePolicyVoucher(requestParameters.code, requestParameters.chargePolicyVoucherRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
830
+ return (0, exports.PolicyVouchersApiFp)(this.configuration).chargePolicyVoucher(requestParameters.chargePolicyVoucherRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
890
831
  };
891
832
  /**
892
833
  * This will check if the account is eligible for a specific voucher.
@@ -959,7 +900,7 @@ var PolicyVouchersApi = /** @class */ (function (_super) {
959
900
  */
960
901
  PolicyVouchersApi.prototype.redeemPolicyVoucher = function (requestParameters, options) {
961
902
  var _this = this;
962
- return (0, exports.PolicyVouchersApiFp)(this.configuration).redeemPolicyVoucher(requestParameters.code, requestParameters.redeemPolicyVoucherRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
903
+ return (0, exports.PolicyVouchersApiFp)(this.configuration).redeemPolicyVoucher(requestParameters.redeemPolicyVoucherRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
963
904
  };
964
905
  /**
965
906
  * This will withdraw the policy voucher.
@@ -971,7 +912,7 @@ var PolicyVouchersApi = /** @class */ (function (_super) {
971
912
  */
972
913
  PolicyVouchersApi.prototype.withdrawPolicyVoucher = function (requestParameters, options) {
973
914
  var _this = this;
974
- return (0, exports.PolicyVouchersApiFp)(this.configuration).withdrawPolicyVoucher(requestParameters.code, requestParameters.withdrawPolicyVoucherRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
915
+ return (0, exports.PolicyVouchersApiFp)(this.configuration).withdrawPolicyVoucher(requestParameters.withdrawPolicyVoucherRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
975
916
  };
976
917
  return PolicyVouchersApi;
977
918
  }(base_1.BaseAPI));
@@ -50,7 +50,7 @@ export declare const VouchersApiAxiosParamCreator: (configuration?: Configuratio
50
50
  * @param {*} [options] Override http request option.
51
51
  * @throws {RequiredError}
52
52
  */
53
- getVoucher: (code: string, authorization?: string, expand?: "campaign" | "productDiscounts", options?: AxiosRequestConfig) => Promise<RequestArgs>;
53
+ getVoucher: (code: string, authorization?: string, expand?: 'campaign' | 'productDiscounts', options?: AxiosRequestConfig) => Promise<RequestArgs>;
54
54
  /**
55
55
  * Returns a list of Vouchers you have previously created. The Vouchers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
56
56
  * @summary List Vouchers
@@ -109,7 +109,7 @@ export declare const VouchersApiFp: (configuration?: Configuration) => {
109
109
  * @param {*} [options] Override http request option.
110
110
  * @throws {RequiredError}
111
111
  */
112
- getVoucher(code: string, authorization?: string, expand?: "campaign" | "productDiscounts", options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetVoucherResponseClass>>;
112
+ getVoucher(code: string, authorization?: string, expand?: 'campaign' | 'productDiscounts', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetVoucherResponseClass>>;
113
113
  /**
114
114
  * Returns a list of Vouchers you have previously created. The Vouchers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
115
115
  * @summary List Vouchers
@@ -168,7 +168,7 @@ export declare const VouchersApiFactory: (configuration?: Configuration, basePat
168
168
  * @param {*} [options] Override http request option.
169
169
  * @throws {RequiredError}
170
170
  */
171
- getVoucher(code: string, authorization?: string, expand?: "campaign" | "productDiscounts", options?: any): AxiosPromise<GetVoucherResponseClass>;
171
+ getVoucher(code: string, authorization?: string, expand?: 'campaign' | 'productDiscounts', options?: any): AxiosPromise<GetVoucherResponseClass>;
172
172
  /**
173
173
  * Returns a list of Vouchers you have previously created. The Vouchers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
174
174
  * @summary List Vouchers