@emilgroup/payment-sdk 1.22.1-beta.8 → 1.22.1-beta.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +4 -0
- package/README.md +2 -2
- package/api/bank-accounts-api.ts +48 -18
- package/api/bank-orders-api.ts +48 -23
- package/api/bank-transaction-api.ts +181 -26
- package/api/billing-addresses-api.ts +40 -15
- package/api/credit-allocation-api.ts +24 -9
- package/api/exceeding-credits-api.ts +24 -9
- package/api/health-check-api.ts +1 -1
- package/api/ibanvalidator-api.ts +8 -3
- package/api/payment-methods-api.ts +24 -9
- package/api/payment-receipts-api.ts +40 -15
- package/api/payment-reminders-api.ts +32 -12
- package/api/payment-requests-api.ts +52 -27
- package/api/payment-setup-api.ts +16 -6
- package/api/payments-api.ts +46 -16
- package/api/payout-methods-api.ts +48 -18
- package/api/policy-payment-methods-api.ts +24 -9
- package/api/refunds-api.ts +24 -9
- package/api/tenant-bank-account-api.ts +40 -15
- package/api/webhooks-api.ts +2 -2
- package/base.ts +239 -43
- package/common.ts +3 -2
- package/configuration.ts +20 -0
- package/dist/api/bank-accounts-api.d.ts +6 -6
- package/dist/api/bank-accounts-api.js +82 -46
- package/dist/api/bank-orders-api.d.ts +13 -13
- package/dist/api/bank-orders-api.js +73 -44
- package/dist/api/bank-transaction-api.d.ts +80 -14
- package/dist/api/bank-transaction-api.js +194 -52
- package/dist/api/billing-addresses-api.d.ts +5 -5
- package/dist/api/billing-addresses-api.js +71 -39
- package/dist/api/credit-allocation-api.d.ts +3 -3
- package/dist/api/credit-allocation-api.js +41 -23
- package/dist/api/exceeding-credits-api.d.ts +3 -3
- package/dist/api/exceeding-credits-api.js +41 -23
- package/dist/api/health-check-api.d.ts +1 -1
- package/dist/api/health-check-api.js +1 -1
- package/dist/api/ibanvalidator-api.d.ts +1 -1
- package/dist/api/ibanvalidator-api.js +15 -8
- package/dist/api/payment-methods-api.d.ts +3 -3
- package/dist/api/payment-methods-api.js +41 -23
- package/dist/api/payment-receipts-api.d.ts +5 -5
- package/dist/api/payment-receipts-api.js +67 -38
- package/dist/api/payment-reminders-api.d.ts +4 -4
- package/dist/api/payment-reminders-api.js +56 -31
- package/dist/api/payment-requests-api.d.ts +17 -17
- package/dist/api/payment-requests-api.js +76 -47
- package/dist/api/payment-setup-api.d.ts +2 -2
- package/dist/api/payment-setup-api.js +30 -16
- package/dist/api/payments-api.d.ts +4 -4
- package/dist/api/payments-api.js +62 -34
- package/dist/api/payout-methods-api.d.ts +6 -6
- package/dist/api/payout-methods-api.js +82 -46
- package/dist/api/policy-payment-methods-api.d.ts +3 -3
- package/dist/api/policy-payment-methods-api.js +41 -23
- package/dist/api/refunds-api.d.ts +3 -3
- package/dist/api/refunds-api.js +37 -22
- package/dist/api/tenant-bank-account-api.d.ts +5 -5
- package/dist/api/tenant-bank-account-api.js +67 -38
- package/dist/api/webhooks-api.d.ts +2 -2
- package/dist/api/webhooks-api.js +2 -2
- package/dist/base.d.ts +26 -0
- package/dist/base.js +243 -60
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -0
- package/dist/configuration.d.ts +17 -0
- package/dist/configuration.js +2 -0
- package/dist/models/bank-order-entity.d.ts +1 -0
- package/dist/models/bank-order-entity.js +1 -0
- package/dist/models/bank-transaction-class.d.ts +7 -0
- package/dist/models/bank-transaction-entity.d.ts +7 -0
- package/dist/models/bank-transaction-invoice-entity.d.ts +24 -0
- package/dist/models/create-bank-order-request-dto.d.ts +3 -2
- package/dist/models/create-bank-order-request-dto.js +1 -0
- package/dist/models/create-payment-order-dto.d.ts +1 -1
- package/dist/models/create-payment-receipt-request-dto.d.ts +3 -3
- package/dist/models/create-payment-request-dto.d.ts +1 -1
- package/dist/models/exceeding-credit-entity.d.ts +6 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/dist/models/link-bank-transaction-payment-requests-request-dto-rest.d.ts +30 -0
- package/dist/models/link-bank-transaction-payment-requests-request-dto-rest.js +15 -0
- package/dist/models/link-bank-transaction-payment-requests-response-class.d.ts +25 -0
- package/dist/models/link-bank-transaction-payment-requests-response-class.js +15 -0
- package/dist/models/payment-class-without-expand-properties.d.ts +1 -1
- package/dist/models/payment-class.d.ts +1 -1
- package/dist/models/payment-receipt-class.d.ts +13 -1
- package/dist/models/payment-receipt-entity.d.ts +139 -0
- package/dist/models/payment-receipt-entity.js +20 -0
- package/dist/models/payment-request-class.d.ts +19 -0
- package/dist/models/payment-request-class.js +1 -0
- package/dist/models/payment-request-entity.d.ts +223 -0
- package/dist/models/payment-request-entity.js +39 -0
- package/dist/models/shared-transaction-class.d.ts +6 -0
- package/dist/models/transaction-entity.d.ts +6 -0
- package/dist/models/update-bank-order-request-dto.d.ts +2 -2
- package/models/bank-order-entity.ts +1 -0
- package/models/bank-transaction-class.ts +7 -0
- package/models/bank-transaction-entity.ts +7 -0
- package/models/bank-transaction-invoice-entity.ts +24 -0
- package/models/create-bank-order-request-dto.ts +3 -2
- package/models/create-payment-order-dto.ts +1 -1
- package/models/create-payment-receipt-request-dto.ts +3 -3
- package/models/create-payment-request-dto.ts +1 -1
- package/models/exceeding-credit-entity.ts +6 -0
- package/models/index.ts +4 -0
- package/models/link-bank-transaction-payment-requests-request-dto-rest.ts +36 -0
- package/models/link-bank-transaction-payment-requests-response-class.ts +31 -0
- package/models/payment-class-without-expand-properties.ts +1 -1
- package/models/payment-class.ts +1 -1
- package/models/payment-receipt-class.ts +13 -1
- package/models/payment-receipt-entity.ts +148 -0
- package/models/payment-request-class.ts +19 -0
- package/models/payment-request-entity.ts +233 -0
- package/models/shared-transaction-class.ts +6 -0
- package/models/transaction-entity.ts +6 -0
- package/models/update-bank-order-request-dto.ts +2 -2
- package/package.json +2 -2
|
@@ -103,9 +103,10 @@ var BankTransactionApiAxiosParamCreator = function (configuration) {
|
|
|
103
103
|
generateInvoiceMatchSuggestion: function (code, authorization, options) {
|
|
104
104
|
if (options === void 0) { options = {}; }
|
|
105
105
|
return __awaiter(_this, void 0, void 0, function () {
|
|
106
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
107
|
+
var _a;
|
|
108
|
+
return __generator(this, function (_b) {
|
|
109
|
+
switch (_b.label) {
|
|
109
110
|
case 0:
|
|
110
111
|
// verify required parameter 'code' is not null or undefined
|
|
111
112
|
(0, common_1.assertParamExists)('generateInvoiceMatchSuggestion', 'code', code);
|
|
@@ -121,13 +122,19 @@ var BankTransactionApiAxiosParamCreator = function (configuration) {
|
|
|
121
122
|
localVarQueryParameter = {};
|
|
122
123
|
// authentication bearer required
|
|
123
124
|
// http bearer authentication required
|
|
124
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
125
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
126
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
127
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
128
|
+
];
|
|
125
129
|
case 1:
|
|
126
130
|
// authentication bearer required
|
|
127
131
|
// http bearer authentication required
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
132
|
+
_b.sent();
|
|
133
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
134
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
135
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
136
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
137
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
131
138
|
}
|
|
132
139
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
133
140
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -145,16 +152,17 @@ var BankTransactionApiAxiosParamCreator = function (configuration) {
|
|
|
145
152
|
* @summary Retrieve the bank transaction
|
|
146
153
|
* @param {string} code
|
|
147
154
|
* @param {string} [authorization] Bearer Token
|
|
148
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices<i>
|
|
155
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices, paymentReceipts<i>
|
|
149
156
|
* @param {*} [options] Override http request option.
|
|
150
157
|
* @throws {RequiredError}
|
|
151
158
|
*/
|
|
152
159
|
getBankTransaction: function (code, authorization, expand, options) {
|
|
153
160
|
if (options === void 0) { options = {}; }
|
|
154
161
|
return __awaiter(_this, void 0, void 0, function () {
|
|
155
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
156
|
-
|
|
157
|
-
|
|
162
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
163
|
+
var _a;
|
|
164
|
+
return __generator(this, function (_b) {
|
|
165
|
+
switch (_b.label) {
|
|
158
166
|
case 0:
|
|
159
167
|
// verify required parameter 'code' is not null or undefined
|
|
160
168
|
(0, common_1.assertParamExists)('getBankTransaction', 'code', code);
|
|
@@ -174,12 +182,15 @@ var BankTransactionApiAxiosParamCreator = function (configuration) {
|
|
|
174
182
|
case 1:
|
|
175
183
|
// authentication bearer required
|
|
176
184
|
// http bearer authentication required
|
|
177
|
-
|
|
185
|
+
_b.sent();
|
|
178
186
|
if (expand !== undefined) {
|
|
179
187
|
localVarQueryParameter['expand'] = expand;
|
|
180
188
|
}
|
|
181
|
-
|
|
182
|
-
|
|
189
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
190
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
191
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
192
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
193
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
183
194
|
}
|
|
184
195
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
185
196
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -203,9 +214,10 @@ var BankTransactionApiAxiosParamCreator = function (configuration) {
|
|
|
203
214
|
importBankTransactions: function (file, authorization, options) {
|
|
204
215
|
if (options === void 0) { options = {}; }
|
|
205
216
|
return __awaiter(_this, void 0, void 0, function () {
|
|
206
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, headersFromBaseOptions;
|
|
207
|
-
|
|
208
|
-
|
|
217
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
218
|
+
var _a;
|
|
219
|
+
return __generator(this, function (_b) {
|
|
220
|
+
switch (_b.label) {
|
|
209
221
|
case 0:
|
|
210
222
|
// verify required parameter 'file' is not null or undefined
|
|
211
223
|
(0, common_1.assertParamExists)('importBankTransactions', 'file', file);
|
|
@@ -221,13 +233,19 @@ var BankTransactionApiAxiosParamCreator = function (configuration) {
|
|
|
221
233
|
localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
|
222
234
|
// authentication bearer required
|
|
223
235
|
// http bearer authentication required
|
|
224
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
236
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
237
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
238
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
239
|
+
];
|
|
225
240
|
case 1:
|
|
226
241
|
// authentication bearer required
|
|
227
242
|
// http bearer authentication required
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
243
|
+
_b.sent();
|
|
244
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
245
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
246
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
247
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
248
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
231
249
|
}
|
|
232
250
|
if (file !== undefined) {
|
|
233
251
|
localVarFormParams.append('file', file);
|
|
@@ -256,9 +274,10 @@ var BankTransactionApiAxiosParamCreator = function (configuration) {
|
|
|
256
274
|
linkBankTransaction: function (code, linkBankTransactionRequestDtoRest, authorization, options) {
|
|
257
275
|
if (options === void 0) { options = {}; }
|
|
258
276
|
return __awaiter(_this, void 0, void 0, function () {
|
|
259
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
260
|
-
|
|
261
|
-
|
|
277
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
278
|
+
var _a;
|
|
279
|
+
return __generator(this, function (_b) {
|
|
280
|
+
switch (_b.label) {
|
|
262
281
|
case 0:
|
|
263
282
|
// verify required parameter 'code' is not null or undefined
|
|
264
283
|
(0, common_1.assertParamExists)('linkBankTransaction', 'code', code);
|
|
@@ -276,13 +295,19 @@ var BankTransactionApiAxiosParamCreator = function (configuration) {
|
|
|
276
295
|
localVarQueryParameter = {};
|
|
277
296
|
// authentication bearer required
|
|
278
297
|
// http bearer authentication required
|
|
279
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
298
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
299
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
300
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
301
|
+
];
|
|
280
302
|
case 1:
|
|
281
303
|
// authentication bearer required
|
|
282
304
|
// http bearer authentication required
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
305
|
+
_b.sent();
|
|
306
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
307
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
308
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
309
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
310
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
286
311
|
}
|
|
287
312
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
288
313
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -297,6 +322,66 @@ var BankTransactionApiAxiosParamCreator = function (configuration) {
|
|
|
297
322
|
});
|
|
298
323
|
});
|
|
299
324
|
},
|
|
325
|
+
/**
|
|
326
|
+
* Links an outgoing bank transaction to the payout payment requests it paid. In one database transaction it creates one payment receipt per request for the full request amount, which marks each request paid, closes every bank order of the requests that has no open request left, and marks the transaction linked. The requests must be open payouts (claim regulations, refund allocations or commission settlements) in the transaction currency that hold no received money (no receipts, or receipts that net to zero because the money came back in a collect receipt), and their amounts must add up to the transaction amount. A request in a bank order must be in a payout order past draft that pays from the tenant bank account of the transaction. A bank order given by its code is linked with every open payment request it holds in the transaction currency at the time of the link; it must be such an order, not closed, with at least one. **Required Permissions** \"payment-management.bank-accounts.create\", \"payment-management.payments.create\", \"payment-management.bank-orders.update\"
|
|
327
|
+
* @summary Link bank transaction to payment requests
|
|
328
|
+
* @param {string} code Code of the outgoing bank transaction to link
|
|
329
|
+
* @param {LinkBankTransactionPaymentRequestsRequestDtoRest} linkBankTransactionPaymentRequestsRequestDtoRest
|
|
330
|
+
* @param {string} [authorization] Bearer Token
|
|
331
|
+
* @param {*} [options] Override http request option.
|
|
332
|
+
* @throws {RequiredError}
|
|
333
|
+
*/
|
|
334
|
+
linkBankTransactionPaymentRequests: function (code, linkBankTransactionPaymentRequestsRequestDtoRest, authorization, options) {
|
|
335
|
+
if (options === void 0) { options = {}; }
|
|
336
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
337
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
338
|
+
var _a;
|
|
339
|
+
return __generator(this, function (_b) {
|
|
340
|
+
switch (_b.label) {
|
|
341
|
+
case 0:
|
|
342
|
+
// verify required parameter 'code' is not null or undefined
|
|
343
|
+
(0, common_1.assertParamExists)('linkBankTransactionPaymentRequests', 'code', code);
|
|
344
|
+
// verify required parameter 'linkBankTransactionPaymentRequestsRequestDtoRest' is not null or undefined
|
|
345
|
+
(0, common_1.assertParamExists)('linkBankTransactionPaymentRequests', 'linkBankTransactionPaymentRequestsRequestDtoRest', linkBankTransactionPaymentRequestsRequestDtoRest);
|
|
346
|
+
localVarPath = "/paymentservice/v1/tenant/bank-transactions/{code}/link-payment-requests"
|
|
347
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
348
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
349
|
+
if (configuration) {
|
|
350
|
+
baseOptions = configuration.baseOptions;
|
|
351
|
+
baseAccessToken = configuration.accessToken;
|
|
352
|
+
}
|
|
353
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
354
|
+
localVarHeaderParameter = {};
|
|
355
|
+
localVarQueryParameter = {};
|
|
356
|
+
// authentication bearer required
|
|
357
|
+
// http bearer authentication required
|
|
358
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
359
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
360
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
361
|
+
];
|
|
362
|
+
case 1:
|
|
363
|
+
// authentication bearer required
|
|
364
|
+
// http bearer authentication required
|
|
365
|
+
_b.sent();
|
|
366
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
367
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
368
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
369
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
370
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
371
|
+
}
|
|
372
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
373
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
374
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
375
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
376
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(linkBankTransactionPaymentRequestsRequestDtoRest, localVarRequestOptions, configuration);
|
|
377
|
+
return [2 /*return*/, {
|
|
378
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
379
|
+
options: localVarRequestOptions,
|
|
380
|
+
}];
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
});
|
|
384
|
+
},
|
|
300
385
|
/**
|
|
301
386
|
* Returns a list of bank transactions you have previously created. The bank transactions are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"payment-management.bank-accounts.view\"
|
|
302
387
|
* @summary List bank transactions
|
|
@@ -306,7 +391,7 @@ var BankTransactionApiAxiosParamCreator = function (configuration) {
|
|
|
306
391
|
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, bankAccountId, bankAccountNumber, messageReference, amount, currency, transactionReference, transactionDate, entryDate, isLinked</i>
|
|
307
392
|
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: id, createdAt, amount</i>
|
|
308
393
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, transactionDate, entryDate</i>
|
|
309
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices<i>
|
|
394
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices, paymentReceipts<i>
|
|
310
395
|
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, bankAccountId, bankAccountNumber, messageReference, amount, currency, transactionReference, transactionDate, entryDate, isLinked</i>
|
|
311
396
|
* @param {*} [options] Override http request option.
|
|
312
397
|
* @throws {RequiredError}
|
|
@@ -314,9 +399,10 @@ var BankTransactionApiAxiosParamCreator = function (configuration) {
|
|
|
314
399
|
listBankTransactions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
315
400
|
if (options === void 0) { options = {}; }
|
|
316
401
|
return __awaiter(_this, void 0, void 0, function () {
|
|
317
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
318
|
-
|
|
319
|
-
|
|
402
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
403
|
+
var _a;
|
|
404
|
+
return __generator(this, function (_b) {
|
|
405
|
+
switch (_b.label) {
|
|
320
406
|
case 0:
|
|
321
407
|
localVarPath = "/paymentservice/v1/tenant/bank-transactions";
|
|
322
408
|
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -333,7 +419,7 @@ var BankTransactionApiAxiosParamCreator = function (configuration) {
|
|
|
333
419
|
case 1:
|
|
334
420
|
// authentication bearer required
|
|
335
421
|
// http bearer authentication required
|
|
336
|
-
|
|
422
|
+
_b.sent();
|
|
337
423
|
if (pageSize !== undefined) {
|
|
338
424
|
localVarQueryParameter['pageSize'] = pageSize;
|
|
339
425
|
}
|
|
@@ -355,8 +441,11 @@ var BankTransactionApiAxiosParamCreator = function (configuration) {
|
|
|
355
441
|
if (filters !== undefined) {
|
|
356
442
|
localVarQueryParameter['filters'] = filters;
|
|
357
443
|
}
|
|
358
|
-
|
|
359
|
-
|
|
444
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
445
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
446
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
447
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
448
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
360
449
|
}
|
|
361
450
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
362
451
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -380,9 +469,10 @@ var BankTransactionApiAxiosParamCreator = function (configuration) {
|
|
|
380
469
|
unlinkBankTransaction: function (code, authorization, options) {
|
|
381
470
|
if (options === void 0) { options = {}; }
|
|
382
471
|
return __awaiter(_this, void 0, void 0, function () {
|
|
383
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
384
|
-
|
|
385
|
-
|
|
472
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
473
|
+
var _a;
|
|
474
|
+
return __generator(this, function (_b) {
|
|
475
|
+
switch (_b.label) {
|
|
386
476
|
case 0:
|
|
387
477
|
// verify required parameter 'code' is not null or undefined
|
|
388
478
|
(0, common_1.assertParamExists)('unlinkBankTransaction', 'code', code);
|
|
@@ -398,13 +488,19 @@ var BankTransactionApiAxiosParamCreator = function (configuration) {
|
|
|
398
488
|
localVarQueryParameter = {};
|
|
399
489
|
// authentication bearer required
|
|
400
490
|
// http bearer authentication required
|
|
401
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
491
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
492
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
493
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
494
|
+
];
|
|
402
495
|
case 1:
|
|
403
496
|
// authentication bearer required
|
|
404
497
|
// http bearer authentication required
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
498
|
+
_b.sent();
|
|
499
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
500
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
501
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
502
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
503
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
408
504
|
}
|
|
409
505
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
410
506
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -453,7 +549,7 @@ var BankTransactionApiFp = function (configuration) {
|
|
|
453
549
|
* @summary Retrieve the bank transaction
|
|
454
550
|
* @param {string} code
|
|
455
551
|
* @param {string} [authorization] Bearer Token
|
|
456
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices<i>
|
|
552
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices, paymentReceipts<i>
|
|
457
553
|
* @param {*} [options] Override http request option.
|
|
458
554
|
* @throws {RequiredError}
|
|
459
555
|
*/
|
|
@@ -513,6 +609,28 @@ var BankTransactionApiFp = function (configuration) {
|
|
|
513
609
|
});
|
|
514
610
|
});
|
|
515
611
|
},
|
|
612
|
+
/**
|
|
613
|
+
* Links an outgoing bank transaction to the payout payment requests it paid. In one database transaction it creates one payment receipt per request for the full request amount, which marks each request paid, closes every bank order of the requests that has no open request left, and marks the transaction linked. The requests must be open payouts (claim regulations, refund allocations or commission settlements) in the transaction currency that hold no received money (no receipts, or receipts that net to zero because the money came back in a collect receipt), and their amounts must add up to the transaction amount. A request in a bank order must be in a payout order past draft that pays from the tenant bank account of the transaction. A bank order given by its code is linked with every open payment request it holds in the transaction currency at the time of the link; it must be such an order, not closed, with at least one. **Required Permissions** \"payment-management.bank-accounts.create\", \"payment-management.payments.create\", \"payment-management.bank-orders.update\"
|
|
614
|
+
* @summary Link bank transaction to payment requests
|
|
615
|
+
* @param {string} code Code of the outgoing bank transaction to link
|
|
616
|
+
* @param {LinkBankTransactionPaymentRequestsRequestDtoRest} linkBankTransactionPaymentRequestsRequestDtoRest
|
|
617
|
+
* @param {string} [authorization] Bearer Token
|
|
618
|
+
* @param {*} [options] Override http request option.
|
|
619
|
+
* @throws {RequiredError}
|
|
620
|
+
*/
|
|
621
|
+
linkBankTransactionPaymentRequests: function (code, linkBankTransactionPaymentRequestsRequestDtoRest, authorization, options) {
|
|
622
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
623
|
+
var localVarAxiosArgs;
|
|
624
|
+
return __generator(this, function (_a) {
|
|
625
|
+
switch (_a.label) {
|
|
626
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.linkBankTransactionPaymentRequests(code, linkBankTransactionPaymentRequestsRequestDtoRest, authorization, options)];
|
|
627
|
+
case 1:
|
|
628
|
+
localVarAxiosArgs = _a.sent();
|
|
629
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
630
|
+
}
|
|
631
|
+
});
|
|
632
|
+
});
|
|
633
|
+
},
|
|
516
634
|
/**
|
|
517
635
|
* Returns a list of bank transactions you have previously created. The bank transactions are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"payment-management.bank-accounts.view\"
|
|
518
636
|
* @summary List bank transactions
|
|
@@ -522,7 +640,7 @@ var BankTransactionApiFp = function (configuration) {
|
|
|
522
640
|
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, bankAccountId, bankAccountNumber, messageReference, amount, currency, transactionReference, transactionDate, entryDate, isLinked</i>
|
|
523
641
|
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: id, createdAt, amount</i>
|
|
524
642
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, transactionDate, entryDate</i>
|
|
525
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices<i>
|
|
643
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices, paymentReceipts<i>
|
|
526
644
|
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, bankAccountId, bankAccountNumber, messageReference, amount, currency, transactionReference, transactionDate, entryDate, isLinked</i>
|
|
527
645
|
* @param {*} [options] Override http request option.
|
|
528
646
|
* @throws {RequiredError}
|
|
@@ -587,7 +705,7 @@ var BankTransactionApiFactory = function (configuration, basePath, axios) {
|
|
|
587
705
|
* @summary Retrieve the bank transaction
|
|
588
706
|
* @param {string} code
|
|
589
707
|
* @param {string} [authorization] Bearer Token
|
|
590
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices<i>
|
|
708
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices, paymentReceipts<i>
|
|
591
709
|
* @param {*} [options] Override http request option.
|
|
592
710
|
* @throws {RequiredError}
|
|
593
711
|
*/
|
|
@@ -617,6 +735,18 @@ var BankTransactionApiFactory = function (configuration, basePath, axios) {
|
|
|
617
735
|
linkBankTransaction: function (code, linkBankTransactionRequestDtoRest, authorization, options) {
|
|
618
736
|
return localVarFp.linkBankTransaction(code, linkBankTransactionRequestDtoRest, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
619
737
|
},
|
|
738
|
+
/**
|
|
739
|
+
* Links an outgoing bank transaction to the payout payment requests it paid. In one database transaction it creates one payment receipt per request for the full request amount, which marks each request paid, closes every bank order of the requests that has no open request left, and marks the transaction linked. The requests must be open payouts (claim regulations, refund allocations or commission settlements) in the transaction currency that hold no received money (no receipts, or receipts that net to zero because the money came back in a collect receipt), and their amounts must add up to the transaction amount. A request in a bank order must be in a payout order past draft that pays from the tenant bank account of the transaction. A bank order given by its code is linked with every open payment request it holds in the transaction currency at the time of the link; it must be such an order, not closed, with at least one. **Required Permissions** \"payment-management.bank-accounts.create\", \"payment-management.payments.create\", \"payment-management.bank-orders.update\"
|
|
740
|
+
* @summary Link bank transaction to payment requests
|
|
741
|
+
* @param {string} code Code of the outgoing bank transaction to link
|
|
742
|
+
* @param {LinkBankTransactionPaymentRequestsRequestDtoRest} linkBankTransactionPaymentRequestsRequestDtoRest
|
|
743
|
+
* @param {string} [authorization] Bearer Token
|
|
744
|
+
* @param {*} [options] Override http request option.
|
|
745
|
+
* @throws {RequiredError}
|
|
746
|
+
*/
|
|
747
|
+
linkBankTransactionPaymentRequests: function (code, linkBankTransactionPaymentRequestsRequestDtoRest, authorization, options) {
|
|
748
|
+
return localVarFp.linkBankTransactionPaymentRequests(code, linkBankTransactionPaymentRequestsRequestDtoRest, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
749
|
+
},
|
|
620
750
|
/**
|
|
621
751
|
* Returns a list of bank transactions you have previously created. The bank transactions are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"payment-management.bank-accounts.view\"
|
|
622
752
|
* @summary List bank transactions
|
|
@@ -626,7 +756,7 @@ var BankTransactionApiFactory = function (configuration, basePath, axios) {
|
|
|
626
756
|
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, bankAccountId, bankAccountNumber, messageReference, amount, currency, transactionReference, transactionDate, entryDate, isLinked</i>
|
|
627
757
|
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: id, createdAt, amount</i>
|
|
628
758
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, transactionDate, entryDate</i>
|
|
629
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices<i>
|
|
759
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices, paymentReceipts<i>
|
|
630
760
|
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, bankAccountId, bankAccountNumber, messageReference, amount, currency, transactionReference, transactionDate, entryDate, isLinked</i>
|
|
631
761
|
* @param {*} [options] Override http request option.
|
|
632
762
|
* @throws {RequiredError}
|
|
@@ -669,7 +799,7 @@ var BankTransactionApi = /** @class */ (function (_super) {
|
|
|
669
799
|
*/
|
|
670
800
|
BankTransactionApi.prototype.generateInvoiceMatchSuggestion = function (requestParameters, options) {
|
|
671
801
|
var _this = this;
|
|
672
|
-
return (0, exports.BankTransactionApiFp)(this.configuration).generateInvoiceMatchSuggestion(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
802
|
+
return (0, exports.BankTransactionApiFp)(this.configuration).generateInvoiceMatchSuggestion(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
673
803
|
};
|
|
674
804
|
/**
|
|
675
805
|
* Retrieves the details of the bank transaction that was previously created. Supply the unique bank transaction code that was returned when you created it and Emil Api will return the corresponding bank transaction information. **Required Permissions** \"payment-management.bank-accounts.view\"
|
|
@@ -681,7 +811,7 @@ var BankTransactionApi = /** @class */ (function (_super) {
|
|
|
681
811
|
*/
|
|
682
812
|
BankTransactionApi.prototype.getBankTransaction = function (requestParameters, options) {
|
|
683
813
|
var _this = this;
|
|
684
|
-
return (0, exports.BankTransactionApiFp)(this.configuration).getBankTransaction(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
814
|
+
return (0, exports.BankTransactionApiFp)(this.configuration).getBankTransaction(requestParameters.code, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
685
815
|
};
|
|
686
816
|
/**
|
|
687
817
|
* This will import bank transactions from a MT940/CAMT.053 file **Required Permissions** \"payment-management.bank-accounts.view\"
|
|
@@ -693,7 +823,7 @@ var BankTransactionApi = /** @class */ (function (_super) {
|
|
|
693
823
|
*/
|
|
694
824
|
BankTransactionApi.prototype.importBankTransactions = function (requestParameters, options) {
|
|
695
825
|
var _this = this;
|
|
696
|
-
return (0, exports.BankTransactionApiFp)(this.configuration).importBankTransactions(requestParameters.file, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
826
|
+
return (0, exports.BankTransactionApiFp)(this.configuration).importBankTransactions(requestParameters.file, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
697
827
|
};
|
|
698
828
|
/**
|
|
699
829
|
* Links a bank transaction with an invoice **Required Permissions** \"payment-management.bank-accounts.create\"
|
|
@@ -705,7 +835,19 @@ var BankTransactionApi = /** @class */ (function (_super) {
|
|
|
705
835
|
*/
|
|
706
836
|
BankTransactionApi.prototype.linkBankTransaction = function (requestParameters, options) {
|
|
707
837
|
var _this = this;
|
|
708
|
-
return (0, exports.BankTransactionApiFp)(this.configuration).linkBankTransaction(requestParameters.code, requestParameters.linkBankTransactionRequestDtoRest, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
838
|
+
return (0, exports.BankTransactionApiFp)(this.configuration).linkBankTransaction(requestParameters.code, requestParameters.linkBankTransactionRequestDtoRest, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
839
|
+
};
|
|
840
|
+
/**
|
|
841
|
+
* Links an outgoing bank transaction to the payout payment requests it paid. In one database transaction it creates one payment receipt per request for the full request amount, which marks each request paid, closes every bank order of the requests that has no open request left, and marks the transaction linked. The requests must be open payouts (claim regulations, refund allocations or commission settlements) in the transaction currency that hold no received money (no receipts, or receipts that net to zero because the money came back in a collect receipt), and their amounts must add up to the transaction amount. A request in a bank order must be in a payout order past draft that pays from the tenant bank account of the transaction. A bank order given by its code is linked with every open payment request it holds in the transaction currency at the time of the link; it must be such an order, not closed, with at least one. **Required Permissions** \"payment-management.bank-accounts.create\", \"payment-management.payments.create\", \"payment-management.bank-orders.update\"
|
|
842
|
+
* @summary Link bank transaction to payment requests
|
|
843
|
+
* @param {BankTransactionApiLinkBankTransactionPaymentRequestsRequest} requestParameters Request parameters.
|
|
844
|
+
* @param {*} [options] Override http request option.
|
|
845
|
+
* @throws {RequiredError}
|
|
846
|
+
* @memberof BankTransactionApi
|
|
847
|
+
*/
|
|
848
|
+
BankTransactionApi.prototype.linkBankTransactionPaymentRequests = function (requestParameters, options) {
|
|
849
|
+
var _this = this;
|
|
850
|
+
return (0, exports.BankTransactionApiFp)(this.configuration).linkBankTransactionPaymentRequests(requestParameters.code, requestParameters.linkBankTransactionPaymentRequestsRequestDtoRest, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
709
851
|
};
|
|
710
852
|
/**
|
|
711
853
|
* Returns a list of bank transactions you have previously created. The bank transactions are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"payment-management.bank-accounts.view\"
|
|
@@ -718,7 +860,7 @@ var BankTransactionApi = /** @class */ (function (_super) {
|
|
|
718
860
|
BankTransactionApi.prototype.listBankTransactions = function (requestParameters, options) {
|
|
719
861
|
var _this = this;
|
|
720
862
|
if (requestParameters === void 0) { requestParameters = {}; }
|
|
721
|
-
return (0, exports.BankTransactionApiFp)(this.configuration).listBankTransactions(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); });
|
|
863
|
+
return (0, exports.BankTransactionApiFp)(this.configuration).listBankTransactions(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
722
864
|
};
|
|
723
865
|
/**
|
|
724
866
|
* Unlinks an already linked bank transaction **Required Permissions** \"payment-management.bank-accounts.update\"
|
|
@@ -730,7 +872,7 @@ var BankTransactionApi = /** @class */ (function (_super) {
|
|
|
730
872
|
*/
|
|
731
873
|
BankTransactionApi.prototype.unlinkBankTransaction = function (requestParameters, options) {
|
|
732
874
|
var _this = this;
|
|
733
|
-
return (0, exports.BankTransactionApiFp)(this.configuration).unlinkBankTransaction(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
875
|
+
return (0, exports.BankTransactionApiFp)(this.configuration).unlinkBankTransaction(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
734
876
|
};
|
|
735
877
|
return BankTransactionApi;
|
|
736
878
|
}(base_1.BaseAPI));
|
|
@@ -344,7 +344,7 @@ export declare class BillingAddressesApi extends BaseAPI {
|
|
|
344
344
|
* @throws {RequiredError}
|
|
345
345
|
* @memberof BillingAddressesApi
|
|
346
346
|
*/
|
|
347
|
-
createBillingAddress(requestParameters: BillingAddressesApiCreateBillingAddressRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateBillingAddressResponseClass, any, {}>>;
|
|
347
|
+
createBillingAddress(requestParameters: BillingAddressesApiCreateBillingAddressRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateBillingAddressResponseClass, any, {}, any>>;
|
|
348
348
|
/**
|
|
349
349
|
* Deletes a billing address by code **Required Permissions** \"payment-management.payments.delete\"
|
|
350
350
|
* @summary Delete the Billing Address
|
|
@@ -353,7 +353,7 @@ export declare class BillingAddressesApi extends BaseAPI {
|
|
|
353
353
|
* @throws {RequiredError}
|
|
354
354
|
* @memberof BillingAddressesApi
|
|
355
355
|
*/
|
|
356
|
-
deleteBillingAddress(requestParameters: BillingAddressesApiDeleteBillingAddressRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any, {}>>;
|
|
356
|
+
deleteBillingAddress(requestParameters: BillingAddressesApiDeleteBillingAddressRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any, {}, any>>;
|
|
357
357
|
/**
|
|
358
358
|
* Retrieves the details of the Billing Address that was previously created. Supply the unique Billing Address code that was returned when you created it and Emil Api will return the corresponding Billing Address information. **Required Permissions** \"payment-management.payments.view\"
|
|
359
359
|
* @summary Retrieve the Billing Address
|
|
@@ -362,7 +362,7 @@ export declare class BillingAddressesApi extends BaseAPI {
|
|
|
362
362
|
* @throws {RequiredError}
|
|
363
363
|
* @memberof BillingAddressesApi
|
|
364
364
|
*/
|
|
365
|
-
getBillingAddress(requestParameters: BillingAddressesApiGetBillingAddressRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetBillingAddressResponseClass, any, {}>>;
|
|
365
|
+
getBillingAddress(requestParameters: BillingAddressesApiGetBillingAddressRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetBillingAddressResponseClass, any, {}, any>>;
|
|
366
366
|
/**
|
|
367
367
|
* Returns a list of Billing Addresses you have previously created. The Billing Addresses are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"payment-management.payments.view\"
|
|
368
368
|
* @summary List Billing Addresses
|
|
@@ -371,7 +371,7 @@ export declare class BillingAddressesApi extends BaseAPI {
|
|
|
371
371
|
* @throws {RequiredError}
|
|
372
372
|
* @memberof BillingAddressesApi
|
|
373
373
|
*/
|
|
374
|
-
listBillingAddresses(requestParameters?: BillingAddressesApiListBillingAddressesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListBillingAddressesResponseClass, any, {}>>;
|
|
374
|
+
listBillingAddresses(requestParameters?: BillingAddressesApiListBillingAddressesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListBillingAddressesResponseClass, any, {}, any>>;
|
|
375
375
|
/**
|
|
376
376
|
* Updates a billing address by code **Required Permissions** \"payment-management.payments.update\"
|
|
377
377
|
* @summary Update the Billing Address
|
|
@@ -380,5 +380,5 @@ export declare class BillingAddressesApi extends BaseAPI {
|
|
|
380
380
|
* @throws {RequiredError}
|
|
381
381
|
* @memberof BillingAddressesApi
|
|
382
382
|
*/
|
|
383
|
-
updateBillingAddress(requestParameters: BillingAddressesApiUpdateBillingAddressRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateBillingAddressResponseClass, any, {}>>;
|
|
383
|
+
updateBillingAddress(requestParameters: BillingAddressesApiUpdateBillingAddressRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateBillingAddressResponseClass, any, {}, any>>;
|
|
384
384
|
}
|