@emilgroup/settlement-sdk 0.3.1-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/.openapi-generator/FILES +26 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +51 -0
  5. package/api/health-api.ts +120 -0
  6. package/api/settlements-api.ts +693 -0
  7. package/api.ts +29 -0
  8. package/base.ts +282 -0
  9. package/common.ts +198 -0
  10. package/configuration.ts +110 -0
  11. package/dist/api/health-api.d.ts +66 -0
  12. package/dist/api/health-api.js +196 -0
  13. package/dist/api/settlements-api.d.ts +393 -0
  14. package/dist/api/settlements-api.js +644 -0
  15. package/dist/api.d.ts +13 -0
  16. package/dist/api.js +31 -0
  17. package/dist/base.d.ts +77 -0
  18. package/dist/base.js +324 -0
  19. package/dist/common.d.ts +91 -0
  20. package/dist/common.js +276 -0
  21. package/dist/configuration.d.ts +89 -0
  22. package/dist/configuration.js +52 -0
  23. package/dist/index.d.ts +15 -0
  24. package/dist/index.js +36 -0
  25. package/dist/models/add-settlement-entry-request-body-dto.d.ts +25 -0
  26. package/dist/models/add-settlement-entry-request-body-dto.js +15 -0
  27. package/dist/models/add-settlement-entry-response-class.d.ts +25 -0
  28. package/dist/models/add-settlement-entry-response-class.js +15 -0
  29. package/dist/models/create-settlement-request-dto.d.ts +42 -0
  30. package/dist/models/create-settlement-request-dto.js +20 -0
  31. package/dist/models/create-settlement-response-class.d.ts +25 -0
  32. package/dist/models/create-settlement-response-class.js +15 -0
  33. package/dist/models/get-settlement-response-class.d.ts +25 -0
  34. package/dist/models/get-settlement-response-class.js +15 -0
  35. package/dist/models/index.d.ts +11 -0
  36. package/dist/models/index.js +27 -0
  37. package/dist/models/inline-response200.d.ts +54 -0
  38. package/dist/models/inline-response200.js +15 -0
  39. package/dist/models/inline-response503.d.ts +54 -0
  40. package/dist/models/inline-response503.js +15 -0
  41. package/dist/models/list-settlements-response-class.d.ts +43 -0
  42. package/dist/models/list-settlements-response-class.js +15 -0
  43. package/dist/models/settlement-class.d.ts +134 -0
  44. package/dist/models/settlement-class.js +38 -0
  45. package/dist/models/settlement-entry-class.d.ts +148 -0
  46. package/dist/models/settlement-entry-class.js +46 -0
  47. package/dist/models/settlement-entry-input-dto.d.ts +106 -0
  48. package/dist/models/settlement-entry-input-dto.js +46 -0
  49. package/git_push.sh +57 -0
  50. package/index.ts +19 -0
  51. package/models/add-settlement-entry-request-body-dto.ts +31 -0
  52. package/models/add-settlement-entry-response-class.ts +31 -0
  53. package/models/create-settlement-request-dto.ts +51 -0
  54. package/models/create-settlement-response-class.ts +31 -0
  55. package/models/get-settlement-response-class.ts +31 -0
  56. package/models/index.ts +11 -0
  57. package/models/inline-response200.ts +48 -0
  58. package/models/inline-response503.ts +48 -0
  59. package/models/list-settlements-response-class.ts +49 -0
  60. package/models/settlement-class.ts +145 -0
  61. package/models/settlement-entry-class.ts +160 -0
  62. package/models/settlement-entry-input-dto.ts +118 -0
  63. package/package.json +27 -0
  64. package/tsconfig.json +23 -0
@@ -0,0 +1,644 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL SettlementService
6
+ * The EMIL SettlementService 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.SettlementsApi = exports.SettlementsApiFactory = exports.SettlementsApiFp = exports.SettlementsApiAxiosParamCreator = 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
+ * SettlementsApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var SettlementsApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * This will add settlement entry. **Required Permissions** \"payment-management.settlements.create\"
97
+ * @summary Create the settlement entry
98
+ * @param {string} settlementCode
99
+ * @param {AddSettlementEntryRequestBodyDto} addSettlementEntryRequestBodyDto
100
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
101
+ * @param {*} [options] Override http request option.
102
+ * @throws {RequiredError}
103
+ */
104
+ addSettlementEntry: function (settlementCode, addSettlementEntryRequestBodyDto, authorization, options) {
105
+ if (options === void 0) { options = {}; }
106
+ return __awaiter(_this, void 0, void 0, function () {
107
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
108
+ return __generator(this, function (_a) {
109
+ switch (_a.label) {
110
+ case 0:
111
+ // verify required parameter 'settlementCode' is not null or undefined
112
+ (0, common_1.assertParamExists)('addSettlementEntry', 'settlementCode', settlementCode);
113
+ // verify required parameter 'addSettlementEntryRequestBodyDto' is not null or undefined
114
+ (0, common_1.assertParamExists)('addSettlementEntry', 'addSettlementEntryRequestBodyDto', addSettlementEntryRequestBodyDto);
115
+ localVarPath = "/settlementservice/v1/settlements/{settlementCode}/entries"
116
+ .replace("{".concat("settlementCode", "}"), encodeURIComponent(String(settlementCode)));
117
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
118
+ if (configuration) {
119
+ baseOptions = configuration.baseOptions;
120
+ baseAccessToken = configuration.accessToken;
121
+ }
122
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
123
+ localVarHeaderParameter = {};
124
+ localVarQueryParameter = {};
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ case 1:
129
+ // authentication bearer required
130
+ // http bearer authentication required
131
+ _a.sent();
132
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
134
+ }
135
+ localVarHeaderParameter['Content-Type'] = 'application/json';
136
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
137
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
139
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(addSettlementEntryRequestBodyDto, localVarRequestOptions, configuration);
140
+ return [2 /*return*/, {
141
+ url: (0, common_1.toPathString)(localVarUrlObj),
142
+ options: localVarRequestOptions,
143
+ }];
144
+ }
145
+ });
146
+ });
147
+ },
148
+ /**
149
+ * This will create settlement. **Required Permissions** \"payment-management.settlements.create\"
150
+ * @summary Create the settlement
151
+ * @param {CreateSettlementRequestDto} createSettlementRequestDto
152
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
153
+ * @param {*} [options] Override http request option.
154
+ * @throws {RequiredError}
155
+ */
156
+ createSettlement: function (createSettlementRequestDto, authorization, options) {
157
+ if (options === void 0) { options = {}; }
158
+ return __awaiter(_this, void 0, void 0, function () {
159
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
160
+ return __generator(this, function (_a) {
161
+ switch (_a.label) {
162
+ case 0:
163
+ // verify required parameter 'createSettlementRequestDto' is not null or undefined
164
+ (0, common_1.assertParamExists)('createSettlement', 'createSettlementRequestDto', createSettlementRequestDto);
165
+ localVarPath = "/settlementservice/v1/settlements";
166
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
167
+ if (configuration) {
168
+ baseOptions = configuration.baseOptions;
169
+ baseAccessToken = configuration.accessToken;
170
+ }
171
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
172
+ localVarHeaderParameter = {};
173
+ localVarQueryParameter = {};
174
+ // authentication bearer required
175
+ // http bearer authentication required
176
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
177
+ case 1:
178
+ // authentication bearer required
179
+ // http bearer authentication required
180
+ _a.sent();
181
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
182
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
183
+ }
184
+ localVarHeaderParameter['Content-Type'] = 'application/json';
185
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
187
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
188
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createSettlementRequestDto, localVarRequestOptions, configuration);
189
+ return [2 /*return*/, {
190
+ url: (0, common_1.toPathString)(localVarUrlObj),
191
+ options: localVarRequestOptions,
192
+ }];
193
+ }
194
+ });
195
+ });
196
+ },
197
+ /**
198
+ * This will delete settlement. **Required Permissions** \"payment-management.settlements.delete\"
199
+ * @summary Delete the settlement
200
+ * @param {string} code Unique identifier for the object.
201
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
202
+ * @param {*} [options] Override http request option.
203
+ * @throws {RequiredError}
204
+ */
205
+ deleteSettlement: function (code, authorization, options) {
206
+ if (options === void 0) { options = {}; }
207
+ return __awaiter(_this, void 0, void 0, function () {
208
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
209
+ return __generator(this, function (_a) {
210
+ switch (_a.label) {
211
+ case 0:
212
+ // verify required parameter 'code' is not null or undefined
213
+ (0, common_1.assertParamExists)('deleteSettlement', 'code', code);
214
+ localVarPath = "/settlementservice/v1/settlements/{code}"
215
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
216
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
217
+ if (configuration) {
218
+ baseOptions = configuration.baseOptions;
219
+ baseAccessToken = configuration.accessToken;
220
+ }
221
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
222
+ localVarHeaderParameter = {};
223
+ localVarQueryParameter = {};
224
+ // authentication bearer required
225
+ // http bearer authentication required
226
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
227
+ case 1:
228
+ // authentication bearer required
229
+ // http bearer authentication required
230
+ _a.sent();
231
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
232
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
233
+ }
234
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
235
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
236
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
237
+ return [2 /*return*/, {
238
+ url: (0, common_1.toPathString)(localVarUrlObj),
239
+ options: localVarRequestOptions,
240
+ }];
241
+ }
242
+ });
243
+ });
244
+ },
245
+ /**
246
+ * This will get settlement. **Required Permissions** \"payment-management.settlements.view\"
247
+ * @summary Retrieve the settlement
248
+ * @param {string} code
249
+ * @param {string} expand
250
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
251
+ * @param {*} [options] Override http request option.
252
+ * @throws {RequiredError}
253
+ */
254
+ getSettlement: function (code, expand, authorization, options) {
255
+ if (options === void 0) { options = {}; }
256
+ return __awaiter(_this, void 0, void 0, function () {
257
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
258
+ return __generator(this, function (_a) {
259
+ switch (_a.label) {
260
+ case 0:
261
+ // verify required parameter 'code' is not null or undefined
262
+ (0, common_1.assertParamExists)('getSettlement', 'code', code);
263
+ // verify required parameter 'expand' is not null or undefined
264
+ (0, common_1.assertParamExists)('getSettlement', 'expand', expand);
265
+ localVarPath = "/settlementservice/v1/settlements/{code}"
266
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
267
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
268
+ if (configuration) {
269
+ baseOptions = configuration.baseOptions;
270
+ baseAccessToken = configuration.accessToken;
271
+ }
272
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
273
+ localVarHeaderParameter = {};
274
+ localVarQueryParameter = {};
275
+ // authentication bearer required
276
+ // http bearer authentication required
277
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
278
+ case 1:
279
+ // authentication bearer required
280
+ // http bearer authentication required
281
+ _a.sent();
282
+ if (expand !== undefined) {
283
+ localVarQueryParameter['expand'] = expand;
284
+ }
285
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
286
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
287
+ }
288
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
289
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
290
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
291
+ return [2 /*return*/, {
292
+ url: (0, common_1.toPathString)(localVarUrlObj),
293
+ options: localVarRequestOptions,
294
+ }];
295
+ }
296
+ });
297
+ });
298
+ },
299
+ /**
300
+ * Retrieves a list of settlements. **Required Permissions** \"payment-management.settlements.view\"
301
+ * @summary List settlements
302
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
303
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
304
+ * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
305
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, settlementNumber, domainEntityCode, domainEntityType, domainEntityNumber, partnerCode, status, currency, createdAt&lt;/i&gt;
306
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, settlementNumber, domainEntityCode, domainEntityNumber, partnerCode&lt;/i&gt;
307
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: status, balance, createdAt&lt;/i&gt;
308
+ * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: settlementEntries&lt;i&gt;
309
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, settlementNumber, domainEntityCode, domainEntityType, domainEntityNumber, partnerCode, status, currency, createdAt&lt;/i&gt;
310
+ * @param {*} [options] Override http request option.
311
+ * @throws {RequiredError}
312
+ */
313
+ listSettlements: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
314
+ if (options === void 0) { options = {}; }
315
+ return __awaiter(_this, void 0, void 0, function () {
316
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
317
+ return __generator(this, function (_a) {
318
+ switch (_a.label) {
319
+ case 0:
320
+ localVarPath = "/settlementservice/v1/settlements";
321
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
322
+ if (configuration) {
323
+ baseOptions = configuration.baseOptions;
324
+ baseAccessToken = configuration.accessToken;
325
+ }
326
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
327
+ localVarHeaderParameter = {};
328
+ localVarQueryParameter = {};
329
+ // authentication bearer required
330
+ // http bearer authentication required
331
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
332
+ case 1:
333
+ // authentication bearer required
334
+ // http bearer authentication required
335
+ _a.sent();
336
+ if (pageSize !== undefined) {
337
+ localVarQueryParameter['pageSize'] = pageSize;
338
+ }
339
+ if (pageToken !== undefined) {
340
+ localVarQueryParameter['pageToken'] = pageToken;
341
+ }
342
+ if (filter !== undefined) {
343
+ localVarQueryParameter['filter'] = filter;
344
+ }
345
+ if (search !== undefined) {
346
+ localVarQueryParameter['search'] = search;
347
+ }
348
+ if (order !== undefined) {
349
+ localVarQueryParameter['order'] = order;
350
+ }
351
+ if (expand !== undefined) {
352
+ localVarQueryParameter['expand'] = expand;
353
+ }
354
+ if (filters !== undefined) {
355
+ localVarQueryParameter['filters'] = filters;
356
+ }
357
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
358
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
359
+ }
360
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
361
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
362
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
363
+ return [2 /*return*/, {
364
+ url: (0, common_1.toPathString)(localVarUrlObj),
365
+ options: localVarRequestOptions,
366
+ }];
367
+ }
368
+ });
369
+ });
370
+ },
371
+ };
372
+ };
373
+ exports.SettlementsApiAxiosParamCreator = SettlementsApiAxiosParamCreator;
374
+ /**
375
+ * SettlementsApi - functional programming interface
376
+ * @export
377
+ */
378
+ var SettlementsApiFp = function (configuration) {
379
+ var localVarAxiosParamCreator = (0, exports.SettlementsApiAxiosParamCreator)(configuration);
380
+ return {
381
+ /**
382
+ * This will add settlement entry. **Required Permissions** \"payment-management.settlements.create\"
383
+ * @summary Create the settlement entry
384
+ * @param {string} settlementCode
385
+ * @param {AddSettlementEntryRequestBodyDto} addSettlementEntryRequestBodyDto
386
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
387
+ * @param {*} [options] Override http request option.
388
+ * @throws {RequiredError}
389
+ */
390
+ addSettlementEntry: function (settlementCode, addSettlementEntryRequestBodyDto, authorization, options) {
391
+ return __awaiter(this, void 0, void 0, function () {
392
+ var localVarAxiosArgs;
393
+ return __generator(this, function (_a) {
394
+ switch (_a.label) {
395
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.addSettlementEntry(settlementCode, addSettlementEntryRequestBodyDto, authorization, options)];
396
+ case 1:
397
+ localVarAxiosArgs = _a.sent();
398
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
399
+ }
400
+ });
401
+ });
402
+ },
403
+ /**
404
+ * This will create settlement. **Required Permissions** \"payment-management.settlements.create\"
405
+ * @summary Create the settlement
406
+ * @param {CreateSettlementRequestDto} createSettlementRequestDto
407
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
408
+ * @param {*} [options] Override http request option.
409
+ * @throws {RequiredError}
410
+ */
411
+ createSettlement: function (createSettlementRequestDto, authorization, options) {
412
+ return __awaiter(this, void 0, void 0, function () {
413
+ var localVarAxiosArgs;
414
+ return __generator(this, function (_a) {
415
+ switch (_a.label) {
416
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createSettlement(createSettlementRequestDto, authorization, options)];
417
+ case 1:
418
+ localVarAxiosArgs = _a.sent();
419
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
420
+ }
421
+ });
422
+ });
423
+ },
424
+ /**
425
+ * This will delete settlement. **Required Permissions** \"payment-management.settlements.delete\"
426
+ * @summary Delete the settlement
427
+ * @param {string} code Unique identifier for the object.
428
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
429
+ * @param {*} [options] Override http request option.
430
+ * @throws {RequiredError}
431
+ */
432
+ deleteSettlement: function (code, authorization, options) {
433
+ return __awaiter(this, void 0, void 0, function () {
434
+ var localVarAxiosArgs;
435
+ return __generator(this, function (_a) {
436
+ switch (_a.label) {
437
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteSettlement(code, authorization, options)];
438
+ case 1:
439
+ localVarAxiosArgs = _a.sent();
440
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
441
+ }
442
+ });
443
+ });
444
+ },
445
+ /**
446
+ * This will get settlement. **Required Permissions** \"payment-management.settlements.view\"
447
+ * @summary Retrieve the settlement
448
+ * @param {string} code
449
+ * @param {string} expand
450
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
451
+ * @param {*} [options] Override http request option.
452
+ * @throws {RequiredError}
453
+ */
454
+ getSettlement: function (code, expand, authorization, options) {
455
+ return __awaiter(this, void 0, void 0, function () {
456
+ var localVarAxiosArgs;
457
+ return __generator(this, function (_a) {
458
+ switch (_a.label) {
459
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getSettlement(code, expand, authorization, options)];
460
+ case 1:
461
+ localVarAxiosArgs = _a.sent();
462
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
463
+ }
464
+ });
465
+ });
466
+ },
467
+ /**
468
+ * Retrieves a list of settlements. **Required Permissions** \"payment-management.settlements.view\"
469
+ * @summary List settlements
470
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
471
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
472
+ * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
473
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, settlementNumber, domainEntityCode, domainEntityType, domainEntityNumber, partnerCode, status, currency, createdAt&lt;/i&gt;
474
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, settlementNumber, domainEntityCode, domainEntityNumber, partnerCode&lt;/i&gt;
475
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: status, balance, createdAt&lt;/i&gt;
476
+ * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: settlementEntries&lt;i&gt;
477
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, settlementNumber, domainEntityCode, domainEntityType, domainEntityNumber, partnerCode, status, currency, createdAt&lt;/i&gt;
478
+ * @param {*} [options] Override http request option.
479
+ * @throws {RequiredError}
480
+ */
481
+ listSettlements: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
482
+ return __awaiter(this, void 0, void 0, function () {
483
+ var localVarAxiosArgs;
484
+ return __generator(this, function (_a) {
485
+ switch (_a.label) {
486
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listSettlements(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
487
+ case 1:
488
+ localVarAxiosArgs = _a.sent();
489
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
490
+ }
491
+ });
492
+ });
493
+ },
494
+ };
495
+ };
496
+ exports.SettlementsApiFp = SettlementsApiFp;
497
+ /**
498
+ * SettlementsApi - factory interface
499
+ * @export
500
+ */
501
+ var SettlementsApiFactory = function (configuration, basePath, axios) {
502
+ var localVarFp = (0, exports.SettlementsApiFp)(configuration);
503
+ return {
504
+ /**
505
+ * This will add settlement entry. **Required Permissions** \"payment-management.settlements.create\"
506
+ * @summary Create the settlement entry
507
+ * @param {string} settlementCode
508
+ * @param {AddSettlementEntryRequestBodyDto} addSettlementEntryRequestBodyDto
509
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
510
+ * @param {*} [options] Override http request option.
511
+ * @throws {RequiredError}
512
+ */
513
+ addSettlementEntry: function (settlementCode, addSettlementEntryRequestBodyDto, authorization, options) {
514
+ return localVarFp.addSettlementEntry(settlementCode, addSettlementEntryRequestBodyDto, authorization, options).then(function (request) { return request(axios, basePath); });
515
+ },
516
+ /**
517
+ * This will create settlement. **Required Permissions** \"payment-management.settlements.create\"
518
+ * @summary Create the settlement
519
+ * @param {CreateSettlementRequestDto} createSettlementRequestDto
520
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
521
+ * @param {*} [options] Override http request option.
522
+ * @throws {RequiredError}
523
+ */
524
+ createSettlement: function (createSettlementRequestDto, authorization, options) {
525
+ return localVarFp.createSettlement(createSettlementRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
526
+ },
527
+ /**
528
+ * This will delete settlement. **Required Permissions** \"payment-management.settlements.delete\"
529
+ * @summary Delete the settlement
530
+ * @param {string} code Unique identifier for the object.
531
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
532
+ * @param {*} [options] Override http request option.
533
+ * @throws {RequiredError}
534
+ */
535
+ deleteSettlement: function (code, authorization, options) {
536
+ return localVarFp.deleteSettlement(code, authorization, options).then(function (request) { return request(axios, basePath); });
537
+ },
538
+ /**
539
+ * This will get settlement. **Required Permissions** \"payment-management.settlements.view\"
540
+ * @summary Retrieve the settlement
541
+ * @param {string} code
542
+ * @param {string} expand
543
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
544
+ * @param {*} [options] Override http request option.
545
+ * @throws {RequiredError}
546
+ */
547
+ getSettlement: function (code, expand, authorization, options) {
548
+ return localVarFp.getSettlement(code, expand, authorization, options).then(function (request) { return request(axios, basePath); });
549
+ },
550
+ /**
551
+ * Retrieves a list of settlements. **Required Permissions** \"payment-management.settlements.view\"
552
+ * @summary List settlements
553
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
554
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
555
+ * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
556
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, settlementNumber, domainEntityCode, domainEntityType, domainEntityNumber, partnerCode, status, currency, createdAt&lt;/i&gt;
557
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, settlementNumber, domainEntityCode, domainEntityNumber, partnerCode&lt;/i&gt;
558
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: status, balance, createdAt&lt;/i&gt;
559
+ * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: settlementEntries&lt;i&gt;
560
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, settlementNumber, domainEntityCode, domainEntityType, domainEntityNumber, partnerCode, status, currency, createdAt&lt;/i&gt;
561
+ * @param {*} [options] Override http request option.
562
+ * @throws {RequiredError}
563
+ */
564
+ listSettlements: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
565
+ return localVarFp.listSettlements(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
566
+ },
567
+ };
568
+ };
569
+ exports.SettlementsApiFactory = SettlementsApiFactory;
570
+ /**
571
+ * SettlementsApi - object-oriented interface
572
+ * @export
573
+ * @class SettlementsApi
574
+ * @extends {BaseAPI}
575
+ */
576
+ var SettlementsApi = /** @class */ (function (_super) {
577
+ __extends(SettlementsApi, _super);
578
+ function SettlementsApi() {
579
+ return _super !== null && _super.apply(this, arguments) || this;
580
+ }
581
+ /**
582
+ * This will add settlement entry. **Required Permissions** \"payment-management.settlements.create\"
583
+ * @summary Create the settlement entry
584
+ * @param {SettlementsApiAddSettlementEntryRequest} requestParameters Request parameters.
585
+ * @param {*} [options] Override http request option.
586
+ * @throws {RequiredError}
587
+ * @memberof SettlementsApi
588
+ */
589
+ SettlementsApi.prototype.addSettlementEntry = function (requestParameters, options) {
590
+ var _this = this;
591
+ return (0, exports.SettlementsApiFp)(this.configuration).addSettlementEntry(requestParameters.settlementCode, requestParameters.addSettlementEntryRequestBodyDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
592
+ };
593
+ /**
594
+ * This will create settlement. **Required Permissions** \"payment-management.settlements.create\"
595
+ * @summary Create the settlement
596
+ * @param {SettlementsApiCreateSettlementRequest} requestParameters Request parameters.
597
+ * @param {*} [options] Override http request option.
598
+ * @throws {RequiredError}
599
+ * @memberof SettlementsApi
600
+ */
601
+ SettlementsApi.prototype.createSettlement = function (requestParameters, options) {
602
+ var _this = this;
603
+ return (0, exports.SettlementsApiFp)(this.configuration).createSettlement(requestParameters.createSettlementRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
604
+ };
605
+ /**
606
+ * This will delete settlement. **Required Permissions** \"payment-management.settlements.delete\"
607
+ * @summary Delete the settlement
608
+ * @param {SettlementsApiDeleteSettlementRequest} requestParameters Request parameters.
609
+ * @param {*} [options] Override http request option.
610
+ * @throws {RequiredError}
611
+ * @memberof SettlementsApi
612
+ */
613
+ SettlementsApi.prototype.deleteSettlement = function (requestParameters, options) {
614
+ var _this = this;
615
+ return (0, exports.SettlementsApiFp)(this.configuration).deleteSettlement(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
616
+ };
617
+ /**
618
+ * This will get settlement. **Required Permissions** \"payment-management.settlements.view\"
619
+ * @summary Retrieve the settlement
620
+ * @param {SettlementsApiGetSettlementRequest} requestParameters Request parameters.
621
+ * @param {*} [options] Override http request option.
622
+ * @throws {RequiredError}
623
+ * @memberof SettlementsApi
624
+ */
625
+ SettlementsApi.prototype.getSettlement = function (requestParameters, options) {
626
+ var _this = this;
627
+ return (0, exports.SettlementsApiFp)(this.configuration).getSettlement(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
628
+ };
629
+ /**
630
+ * Retrieves a list of settlements. **Required Permissions** \"payment-management.settlements.view\"
631
+ * @summary List settlements
632
+ * @param {SettlementsApiListSettlementsRequest} requestParameters Request parameters.
633
+ * @param {*} [options] Override http request option.
634
+ * @throws {RequiredError}
635
+ * @memberof SettlementsApi
636
+ */
637
+ SettlementsApi.prototype.listSettlements = function (requestParameters, options) {
638
+ var _this = this;
639
+ if (requestParameters === void 0) { requestParameters = {}; }
640
+ return (0, exports.SettlementsApiFp)(this.configuration).listSettlements(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); });
641
+ };
642
+ return SettlementsApi;
643
+ }(base_1.BaseAPI));
644
+ exports.SettlementsApi = SettlementsApi;