@emilgroup/payment-sdk 1.16.1-beta.7 → 1.16.1-beta.77

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 (117) hide show
  1. package/.openapi-generator/FILES +12 -0
  2. package/README.md +2 -2
  3. package/api/bank-accounts-api.ts +16 -16
  4. package/api/bank-orders-api.ts +16 -16
  5. package/api/bank-transaction-api.ts +12 -12
  6. package/api/billing-addresses-api.ts +12 -12
  7. package/api/credit-allocation-api.ts +12 -12
  8. package/api/exceeding-credits-api.ts +12 -12
  9. package/api/ibanvalidator-api.ts +165 -0
  10. package/api/payment-methods-api.ts +12 -12
  11. package/api/payment-receipts-api.ts +676 -0
  12. package/api/payment-reminders-api.ts +12 -12
  13. package/api/payment-requests-api.ts +20 -20
  14. package/api/payments-api.ts +12 -12
  15. package/api/payout-methods-api.ts +138 -20
  16. package/api/refunds-api.ts +12 -12
  17. package/api/tenant-bank-account-api.ts +12 -12
  18. package/api/webhooks-api.ts +125 -14
  19. package/api.ts +4 -0
  20. package/base.ts +1 -0
  21. package/dist/api/bank-accounts-api.d.ts +16 -16
  22. package/dist/api/bank-accounts-api.js +13 -13
  23. package/dist/api/bank-orders-api.d.ts +16 -16
  24. package/dist/api/bank-orders-api.js +14 -14
  25. package/dist/api/bank-transaction-api.d.ts +12 -12
  26. package/dist/api/bank-transaction-api.js +10 -10
  27. package/dist/api/billing-addresses-api.d.ts +12 -12
  28. package/dist/api/billing-addresses-api.js +10 -10
  29. package/dist/api/credit-allocation-api.d.ts +12 -12
  30. package/dist/api/credit-allocation-api.js +10 -10
  31. package/dist/api/exceeding-credits-api.d.ts +12 -12
  32. package/dist/api/exceeding-credits-api.js +10 -10
  33. package/dist/api/ibanvalidator-api.d.ts +97 -0
  34. package/dist/api/ibanvalidator-api.js +224 -0
  35. package/dist/api/payment-methods-api.d.ts +12 -12
  36. package/dist/api/payment-methods-api.js +10 -10
  37. package/dist/api/payment-receipts-api.d.ts +383 -0
  38. package/dist/api/payment-receipts-api.js +637 -0
  39. package/dist/api/payment-reminders-api.d.ts +12 -12
  40. package/dist/api/payment-reminders-api.js +10 -10
  41. package/dist/api/payment-requests-api.d.ts +20 -20
  42. package/dist/api/payment-requests-api.js +15 -15
  43. package/dist/api/payments-api.d.ts +12 -12
  44. package/dist/api/payments-api.js +10 -10
  45. package/dist/api/payout-methods-api.d.ts +85 -20
  46. package/dist/api/payout-methods-api.js +115 -16
  47. package/dist/api/refunds-api.d.ts +12 -12
  48. package/dist/api/refunds-api.js +10 -10
  49. package/dist/api/tenant-bank-account-api.d.ts +12 -12
  50. package/dist/api/tenant-bank-account-api.js +10 -10
  51. package/dist/api/webhooks-api.d.ts +73 -9
  52. package/dist/api/webhooks-api.js +100 -11
  53. package/dist/api.d.ts +2 -0
  54. package/dist/api.js +2 -0
  55. package/dist/base.d.ts +2 -1
  56. package/dist/base.js +1 -0
  57. package/dist/models/bank-account-class-without-expand-properties.d.ts +6 -0
  58. package/dist/models/bank-account-class.d.ts +6 -0
  59. package/dist/models/bank-data-class.d.ts +36 -0
  60. package/dist/models/bank-data-class.js +15 -0
  61. package/dist/models/create-payment-receipt-request-dto.d.ts +65 -0
  62. package/dist/models/create-payment-receipt-request-dto.js +20 -0
  63. package/dist/models/create-payment-receipt-response-class.d.ts +25 -0
  64. package/dist/models/create-payment-receipt-response-class.js +15 -0
  65. package/dist/models/create-payment-request-request-dto.d.ts +53 -10
  66. package/dist/models/create-payment-request-request-dto.js +8 -4
  67. package/dist/models/create-payout-method-by-bank-account-request-dto.d.ts +36 -0
  68. package/dist/models/create-payout-method-by-bank-account-request-dto.js +15 -0
  69. package/dist/models/create-payout-method-request-dto.d.ts +8 -2
  70. package/dist/models/credit-allocation-class.d.ts +6 -0
  71. package/dist/models/credit-allocation-entity.d.ts +6 -0
  72. package/dist/models/get-payment-receipt-response-class.d.ts +25 -0
  73. package/dist/models/get-payment-receipt-response-class.js +15 -0
  74. package/dist/models/index.d.ts +10 -0
  75. package/dist/models/index.js +10 -0
  76. package/dist/models/list-payment-receipts-response-class.d.ts +43 -0
  77. package/dist/models/list-payment-receipts-response-class.js +15 -0
  78. package/dist/models/payment-class-without-expand-properties.d.ts +1 -1
  79. package/dist/models/payment-class.d.ts +1 -1
  80. package/dist/models/payment-entity.d.ts +1 -1
  81. package/dist/models/payment-receipt-class.d.ts +101 -0
  82. package/dist/models/payment-receipt-class.js +20 -0
  83. package/dist/models/payment-request-class.d.ts +68 -12
  84. package/dist/models/payment-request-class.js +9 -5
  85. package/dist/models/payout-method-class.d.ts +6 -0
  86. package/dist/models/update-payment-receipt-response-class.d.ts +25 -0
  87. package/dist/models/update-payment-receipt-response-class.js +15 -0
  88. package/dist/models/update-payment-request-request-dto.d.ts +2 -2
  89. package/dist/models/update-payment-request-request-dto.js +1 -1
  90. package/dist/models/validate-iban-request-dto.d.ts +24 -0
  91. package/dist/models/validate-iban-request-dto.js +15 -0
  92. package/dist/models/validate-iban-response-class.d.ts +31 -0
  93. package/dist/models/validate-iban-response-class.js +15 -0
  94. package/models/bank-account-class-without-expand-properties.ts +6 -0
  95. package/models/bank-account-class.ts +6 -0
  96. package/models/bank-data-class.ts +42 -0
  97. package/models/create-payment-receipt-request-dto.ts +74 -0
  98. package/models/create-payment-receipt-response-class.ts +31 -0
  99. package/models/create-payment-request-request-dto.ts +52 -10
  100. package/models/create-payout-method-by-bank-account-request-dto.ts +42 -0
  101. package/models/create-payout-method-request-dto.ts +8 -2
  102. package/models/credit-allocation-class.ts +6 -0
  103. package/models/credit-allocation-entity.ts +6 -0
  104. package/models/get-payment-receipt-response-class.ts +31 -0
  105. package/models/index.ts +10 -0
  106. package/models/list-payment-receipts-response-class.ts +49 -0
  107. package/models/payment-class-without-expand-properties.ts +1 -1
  108. package/models/payment-class.ts +1 -1
  109. package/models/payment-entity.ts +1 -1
  110. package/models/payment-receipt-class.ts +110 -0
  111. package/models/payment-request-class.ts +67 -12
  112. package/models/payout-method-class.ts +6 -0
  113. package/models/update-payment-receipt-response-class.ts +31 -0
  114. package/models/update-payment-request-request-dto.ts +2 -2
  115. package/models/validate-iban-request-dto.ts +30 -0
  116. package/models/validate-iban-response-class.ts +37 -0
  117. package/package.json +2 -2
@@ -0,0 +1,637 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Emil Payment Service
6
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
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.PaymentReceiptsApi = exports.PaymentReceiptsApiFactory = exports.PaymentReceiptsApiFp = exports.PaymentReceiptsApiAxiosParamCreator = 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
+ * PaymentReceiptsApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var PaymentReceiptsApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * This will create payment receipt. **Required Permissions** \"payment-management.payments.create\"
97
+ * @summary Create the payment receipt
98
+ * @param {CreatePaymentReceiptRequestDto} createPaymentReceiptRequestDto
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
+ createPaymentReceipt: function (createPaymentReceiptRequestDto, 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 'createPaymentReceiptRequestDto' is not null or undefined
111
+ (0, common_1.assertParamExists)('createPaymentReceipt', 'createPaymentReceiptRequestDto', createPaymentReceiptRequestDto);
112
+ localVarPath = "/paymentservice/v1/payment-receipts";
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)(createPaymentReceiptRequestDto, 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 delete payment receipt. **Required Permissions** \"payment-management.payments.delete\"
146
+ * @summary Delete the payment receipt
147
+ * @param {string} code Unique identifier for the object.
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
+ deletePaymentReceipt: function (code, 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 'code' is not null or undefined
160
+ (0, common_1.assertParamExists)('deletePaymentReceipt', 'code', code);
161
+ localVarPath = "/paymentservice/v1/payment-receipts/{code}"
162
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
163
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
164
+ if (configuration) {
165
+ baseOptions = configuration.baseOptions;
166
+ baseAccessToken = configuration.accessToken;
167
+ }
168
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
169
+ localVarHeaderParameter = {};
170
+ localVarQueryParameter = {};
171
+ // authentication bearer required
172
+ // http bearer authentication required
173
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
174
+ case 1:
175
+ // authentication bearer required
176
+ // http bearer authentication required
177
+ _a.sent();
178
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
179
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
180
+ }
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
+ return [2 /*return*/, {
185
+ url: (0, common_1.toPathString)(localVarUrlObj),
186
+ options: localVarRequestOptions,
187
+ }];
188
+ }
189
+ });
190
+ });
191
+ },
192
+ /**
193
+ * This will get payment receipt. **Required Permissions** \"payment-management.payments.view\"
194
+ * @summary Retrieve the payment receipt
195
+ * @param {string} code
196
+ * @param {string} expand
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
+ getPaymentReceipt: function (code, expand, 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 'code' is not null or undefined
209
+ (0, common_1.assertParamExists)('getPaymentReceipt', 'code', code);
210
+ // verify required parameter 'expand' is not null or undefined
211
+ (0, common_1.assertParamExists)('getPaymentReceipt', 'expand', expand);
212
+ localVarPath = "/paymentservice/v1/payment-receipts/{code}"
213
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
214
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
215
+ if (configuration) {
216
+ baseOptions = configuration.baseOptions;
217
+ baseAccessToken = configuration.accessToken;
218
+ }
219
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
220
+ localVarHeaderParameter = {};
221
+ localVarQueryParameter = {};
222
+ // authentication bearer required
223
+ // http bearer authentication required
224
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
225
+ case 1:
226
+ // authentication bearer required
227
+ // http bearer authentication required
228
+ _a.sent();
229
+ if (expand !== undefined) {
230
+ localVarQueryParameter['expand'] = expand;
231
+ }
232
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
233
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
234
+ }
235
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
236
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
237
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
238
+ return [2 /*return*/, {
239
+ url: (0, common_1.toPathString)(localVarUrlObj),
240
+ options: localVarRequestOptions,
241
+ }];
242
+ }
243
+ });
244
+ });
245
+ },
246
+ /**
247
+ * Retrieves a list of paymentreceipts. **Required Permissions** \"payment-management.payments.view\"
248
+ * @summary List payment receipts
249
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
250
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
251
+ * @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.
252
+ * @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: id, code, createdAt, psp, direction, paymentRequestCode, amount&lt;/i&gt;
253
+ * @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, amount, paymentRequestCode&lt;/i&gt;
254
+ * @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: id, createdAt, amount&lt;/i&gt;
255
+ * @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;
256
+ * @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: id, code, createdAt, psp, direction, paymentRequestCode, amount&lt;/i&gt;
257
+ * @param {*} [options] Override http request option.
258
+ * @throws {RequiredError}
259
+ */
260
+ listPaymentReceipts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
261
+ if (options === void 0) { options = {}; }
262
+ return __awaiter(_this, void 0, void 0, function () {
263
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
264
+ return __generator(this, function (_a) {
265
+ switch (_a.label) {
266
+ case 0:
267
+ localVarPath = "/paymentservice/v1/payment-receipts";
268
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
269
+ if (configuration) {
270
+ baseOptions = configuration.baseOptions;
271
+ baseAccessToken = configuration.accessToken;
272
+ }
273
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
274
+ localVarHeaderParameter = {};
275
+ localVarQueryParameter = {};
276
+ // authentication bearer required
277
+ // http bearer authentication required
278
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
279
+ case 1:
280
+ // authentication bearer required
281
+ // http bearer authentication required
282
+ _a.sent();
283
+ if (pageSize !== undefined) {
284
+ localVarQueryParameter['pageSize'] = pageSize;
285
+ }
286
+ if (pageToken !== undefined) {
287
+ localVarQueryParameter['pageToken'] = pageToken;
288
+ }
289
+ if (filter !== undefined) {
290
+ localVarQueryParameter['filter'] = filter;
291
+ }
292
+ if (search !== undefined) {
293
+ localVarQueryParameter['search'] = search;
294
+ }
295
+ if (order !== undefined) {
296
+ localVarQueryParameter['order'] = order;
297
+ }
298
+ if (expand !== undefined) {
299
+ localVarQueryParameter['expand'] = expand;
300
+ }
301
+ if (filters !== undefined) {
302
+ localVarQueryParameter['filters'] = filters;
303
+ }
304
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
305
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
306
+ }
307
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
308
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
309
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
310
+ return [2 /*return*/, {
311
+ url: (0, common_1.toPathString)(localVarUrlObj),
312
+ options: localVarRequestOptions,
313
+ }];
314
+ }
315
+ });
316
+ });
317
+ },
318
+ /**
319
+ * This will update payment receipt. **Required Permissions** \"payment-management.payments.update\"
320
+ * @summary Update the payment receipt
321
+ * @param {string} code
322
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
323
+ * @param {*} [options] Override http request option.
324
+ * @throws {RequiredError}
325
+ */
326
+ updatePaymentReceipt: function (code, authorization, options) {
327
+ if (options === void 0) { options = {}; }
328
+ return __awaiter(_this, void 0, void 0, function () {
329
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
330
+ return __generator(this, function (_a) {
331
+ switch (_a.label) {
332
+ case 0:
333
+ // verify required parameter 'code' is not null or undefined
334
+ (0, common_1.assertParamExists)('updatePaymentReceipt', 'code', code);
335
+ localVarPath = "/paymentservice/v1/payment-receipts/{code}"
336
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
337
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
338
+ if (configuration) {
339
+ baseOptions = configuration.baseOptions;
340
+ baseAccessToken = configuration.accessToken;
341
+ }
342
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
343
+ localVarHeaderParameter = {};
344
+ localVarQueryParameter = {};
345
+ // authentication bearer required
346
+ // http bearer authentication required
347
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
348
+ case 1:
349
+ // authentication bearer required
350
+ // http bearer authentication required
351
+ _a.sent();
352
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
353
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
354
+ }
355
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
356
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
357
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
358
+ return [2 /*return*/, {
359
+ url: (0, common_1.toPathString)(localVarUrlObj),
360
+ options: localVarRequestOptions,
361
+ }];
362
+ }
363
+ });
364
+ });
365
+ },
366
+ };
367
+ };
368
+ exports.PaymentReceiptsApiAxiosParamCreator = PaymentReceiptsApiAxiosParamCreator;
369
+ /**
370
+ * PaymentReceiptsApi - functional programming interface
371
+ * @export
372
+ */
373
+ var PaymentReceiptsApiFp = function (configuration) {
374
+ var localVarAxiosParamCreator = (0, exports.PaymentReceiptsApiAxiosParamCreator)(configuration);
375
+ return {
376
+ /**
377
+ * This will create payment receipt. **Required Permissions** \"payment-management.payments.create\"
378
+ * @summary Create the payment receipt
379
+ * @param {CreatePaymentReceiptRequestDto} createPaymentReceiptRequestDto
380
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
381
+ * @param {*} [options] Override http request option.
382
+ * @throws {RequiredError}
383
+ */
384
+ createPaymentReceipt: function (createPaymentReceiptRequestDto, authorization, options) {
385
+ return __awaiter(this, void 0, void 0, function () {
386
+ var localVarAxiosArgs;
387
+ return __generator(this, function (_a) {
388
+ switch (_a.label) {
389
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createPaymentReceipt(createPaymentReceiptRequestDto, authorization, options)];
390
+ case 1:
391
+ localVarAxiosArgs = _a.sent();
392
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
393
+ }
394
+ });
395
+ });
396
+ },
397
+ /**
398
+ * This will delete payment receipt. **Required Permissions** \"payment-management.payments.delete\"
399
+ * @summary Delete the payment receipt
400
+ * @param {string} code Unique identifier for the object.
401
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
402
+ * @param {*} [options] Override http request option.
403
+ * @throws {RequiredError}
404
+ */
405
+ deletePaymentReceipt: function (code, authorization, options) {
406
+ return __awaiter(this, void 0, void 0, function () {
407
+ var localVarAxiosArgs;
408
+ return __generator(this, function (_a) {
409
+ switch (_a.label) {
410
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deletePaymentReceipt(code, authorization, options)];
411
+ case 1:
412
+ localVarAxiosArgs = _a.sent();
413
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
414
+ }
415
+ });
416
+ });
417
+ },
418
+ /**
419
+ * This will get payment receipt. **Required Permissions** \"payment-management.payments.view\"
420
+ * @summary Retrieve the payment receipt
421
+ * @param {string} code
422
+ * @param {string} expand
423
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
424
+ * @param {*} [options] Override http request option.
425
+ * @throws {RequiredError}
426
+ */
427
+ getPaymentReceipt: function (code, expand, authorization, options) {
428
+ return __awaiter(this, void 0, void 0, function () {
429
+ var localVarAxiosArgs;
430
+ return __generator(this, function (_a) {
431
+ switch (_a.label) {
432
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPaymentReceipt(code, expand, authorization, options)];
433
+ case 1:
434
+ localVarAxiosArgs = _a.sent();
435
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
436
+ }
437
+ });
438
+ });
439
+ },
440
+ /**
441
+ * Retrieves a list of paymentreceipts. **Required Permissions** \"payment-management.payments.view\"
442
+ * @summary List payment receipts
443
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
444
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
445
+ * @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.
446
+ * @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: id, code, createdAt, psp, direction, paymentRequestCode, amount&lt;/i&gt;
447
+ * @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, amount, paymentRequestCode&lt;/i&gt;
448
+ * @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: id, createdAt, amount&lt;/i&gt;
449
+ * @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;
450
+ * @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: id, code, createdAt, psp, direction, paymentRequestCode, amount&lt;/i&gt;
451
+ * @param {*} [options] Override http request option.
452
+ * @throws {RequiredError}
453
+ */
454
+ listPaymentReceipts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, 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.listPaymentReceipts(authorization, pageSize, pageToken, filter, search, order, expand, filters, 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
+ * This will update payment receipt. **Required Permissions** \"payment-management.payments.update\"
469
+ * @summary Update the payment receipt
470
+ * @param {string} code
471
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
472
+ * @param {*} [options] Override http request option.
473
+ * @throws {RequiredError}
474
+ */
475
+ updatePaymentReceipt: function (code, authorization, options) {
476
+ return __awaiter(this, void 0, void 0, function () {
477
+ var localVarAxiosArgs;
478
+ return __generator(this, function (_a) {
479
+ switch (_a.label) {
480
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updatePaymentReceipt(code, authorization, options)];
481
+ case 1:
482
+ localVarAxiosArgs = _a.sent();
483
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
484
+ }
485
+ });
486
+ });
487
+ },
488
+ };
489
+ };
490
+ exports.PaymentReceiptsApiFp = PaymentReceiptsApiFp;
491
+ /**
492
+ * PaymentReceiptsApi - factory interface
493
+ * @export
494
+ */
495
+ var PaymentReceiptsApiFactory = function (configuration, basePath, axios) {
496
+ var localVarFp = (0, exports.PaymentReceiptsApiFp)(configuration);
497
+ return {
498
+ /**
499
+ * This will create payment receipt. **Required Permissions** \"payment-management.payments.create\"
500
+ * @summary Create the payment receipt
501
+ * @param {CreatePaymentReceiptRequestDto} createPaymentReceiptRequestDto
502
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
503
+ * @param {*} [options] Override http request option.
504
+ * @throws {RequiredError}
505
+ */
506
+ createPaymentReceipt: function (createPaymentReceiptRequestDto, authorization, options) {
507
+ return localVarFp.createPaymentReceipt(createPaymentReceiptRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
508
+ },
509
+ /**
510
+ * This will delete payment receipt. **Required Permissions** \"payment-management.payments.delete\"
511
+ * @summary Delete the payment receipt
512
+ * @param {string} code Unique identifier for the object.
513
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
514
+ * @param {*} [options] Override http request option.
515
+ * @throws {RequiredError}
516
+ */
517
+ deletePaymentReceipt: function (code, authorization, options) {
518
+ return localVarFp.deletePaymentReceipt(code, authorization, options).then(function (request) { return request(axios, basePath); });
519
+ },
520
+ /**
521
+ * This will get payment receipt. **Required Permissions** \"payment-management.payments.view\"
522
+ * @summary Retrieve the payment receipt
523
+ * @param {string} code
524
+ * @param {string} expand
525
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
526
+ * @param {*} [options] Override http request option.
527
+ * @throws {RequiredError}
528
+ */
529
+ getPaymentReceipt: function (code, expand, authorization, options) {
530
+ return localVarFp.getPaymentReceipt(code, expand, authorization, options).then(function (request) { return request(axios, basePath); });
531
+ },
532
+ /**
533
+ * Retrieves a list of paymentreceipts. **Required Permissions** \"payment-management.payments.view\"
534
+ * @summary List payment receipts
535
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
536
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
537
+ * @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.
538
+ * @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: id, code, createdAt, psp, direction, paymentRequestCode, amount&lt;/i&gt;
539
+ * @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, amount, paymentRequestCode&lt;/i&gt;
540
+ * @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: id, createdAt, amount&lt;/i&gt;
541
+ * @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;
542
+ * @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: id, code, createdAt, psp, direction, paymentRequestCode, amount&lt;/i&gt;
543
+ * @param {*} [options] Override http request option.
544
+ * @throws {RequiredError}
545
+ */
546
+ listPaymentReceipts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
547
+ return localVarFp.listPaymentReceipts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
548
+ },
549
+ /**
550
+ * This will update payment receipt. **Required Permissions** \"payment-management.payments.update\"
551
+ * @summary Update the payment receipt
552
+ * @param {string} code
553
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
554
+ * @param {*} [options] Override http request option.
555
+ * @throws {RequiredError}
556
+ */
557
+ updatePaymentReceipt: function (code, authorization, options) {
558
+ return localVarFp.updatePaymentReceipt(code, authorization, options).then(function (request) { return request(axios, basePath); });
559
+ },
560
+ };
561
+ };
562
+ exports.PaymentReceiptsApiFactory = PaymentReceiptsApiFactory;
563
+ /**
564
+ * PaymentReceiptsApi - object-oriented interface
565
+ * @export
566
+ * @class PaymentReceiptsApi
567
+ * @extends {BaseAPI}
568
+ */
569
+ var PaymentReceiptsApi = /** @class */ (function (_super) {
570
+ __extends(PaymentReceiptsApi, _super);
571
+ function PaymentReceiptsApi() {
572
+ return _super !== null && _super.apply(this, arguments) || this;
573
+ }
574
+ /**
575
+ * This will create payment receipt. **Required Permissions** \"payment-management.payments.create\"
576
+ * @summary Create the payment receipt
577
+ * @param {PaymentReceiptsApiCreatePaymentReceiptRequest} requestParameters Request parameters.
578
+ * @param {*} [options] Override http request option.
579
+ * @throws {RequiredError}
580
+ * @memberof PaymentReceiptsApi
581
+ */
582
+ PaymentReceiptsApi.prototype.createPaymentReceipt = function (requestParameters, options) {
583
+ var _this = this;
584
+ return (0, exports.PaymentReceiptsApiFp)(this.configuration).createPaymentReceipt(requestParameters.createPaymentReceiptRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
585
+ };
586
+ /**
587
+ * This will delete payment receipt. **Required Permissions** \"payment-management.payments.delete\"
588
+ * @summary Delete the payment receipt
589
+ * @param {PaymentReceiptsApiDeletePaymentReceiptRequest} requestParameters Request parameters.
590
+ * @param {*} [options] Override http request option.
591
+ * @throws {RequiredError}
592
+ * @memberof PaymentReceiptsApi
593
+ */
594
+ PaymentReceiptsApi.prototype.deletePaymentReceipt = function (requestParameters, options) {
595
+ var _this = this;
596
+ return (0, exports.PaymentReceiptsApiFp)(this.configuration).deletePaymentReceipt(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
597
+ };
598
+ /**
599
+ * This will get payment receipt. **Required Permissions** \"payment-management.payments.view\"
600
+ * @summary Retrieve the payment receipt
601
+ * @param {PaymentReceiptsApiGetPaymentReceiptRequest} requestParameters Request parameters.
602
+ * @param {*} [options] Override http request option.
603
+ * @throws {RequiredError}
604
+ * @memberof PaymentReceiptsApi
605
+ */
606
+ PaymentReceiptsApi.prototype.getPaymentReceipt = function (requestParameters, options) {
607
+ var _this = this;
608
+ return (0, exports.PaymentReceiptsApiFp)(this.configuration).getPaymentReceipt(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
609
+ };
610
+ /**
611
+ * Retrieves a list of paymentreceipts. **Required Permissions** \"payment-management.payments.view\"
612
+ * @summary List payment receipts
613
+ * @param {PaymentReceiptsApiListPaymentReceiptsRequest} requestParameters Request parameters.
614
+ * @param {*} [options] Override http request option.
615
+ * @throws {RequiredError}
616
+ * @memberof PaymentReceiptsApi
617
+ */
618
+ PaymentReceiptsApi.prototype.listPaymentReceipts = function (requestParameters, options) {
619
+ var _this = this;
620
+ if (requestParameters === void 0) { requestParameters = {}; }
621
+ return (0, exports.PaymentReceiptsApiFp)(this.configuration).listPaymentReceipts(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); });
622
+ };
623
+ /**
624
+ * This will update payment receipt. **Required Permissions** \"payment-management.payments.update\"
625
+ * @summary Update the payment receipt
626
+ * @param {PaymentReceiptsApiUpdatePaymentReceiptRequest} requestParameters Request parameters.
627
+ * @param {*} [options] Override http request option.
628
+ * @throws {RequiredError}
629
+ * @memberof PaymentReceiptsApi
630
+ */
631
+ PaymentReceiptsApi.prototype.updatePaymentReceipt = function (requestParameters, options) {
632
+ var _this = this;
633
+ return (0, exports.PaymentReceiptsApiFp)(this.configuration).updatePaymentReceipt(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
634
+ };
635
+ return PaymentReceiptsApi;
636
+ }(base_1.BaseAPI));
637
+ exports.PaymentReceiptsApi = PaymentReceiptsApi;