@emilgroup/payment-sdk 1.22.1-beta.83 → 1.22.1-beta.85

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 (165) hide show
  1. package/.openapi-generator/FILES +13 -0
  2. package/README.md +2 -2
  3. package/api/bank-accounts-api.ts +48 -18
  4. package/api/bank-order-texts-api.ts +265 -0
  5. package/api/bank-orders-api.ts +40 -15
  6. package/api/bank-transaction-api.ts +181 -26
  7. package/api/billing-addresses-api.ts +40 -15
  8. package/api/credit-allocation-api.ts +24 -9
  9. package/api/exceeding-credits-api.ts +240 -6
  10. package/api/health-check-api.ts +1 -1
  11. package/api/ibanvalidator-api.ts +8 -3
  12. package/api/payment-methods-api.ts +24 -9
  13. package/api/payment-receipts-api.ts +40 -15
  14. package/api/payment-reminders-api.ts +32 -12
  15. package/api/payment-requests-api.ts +52 -27
  16. package/api/payment-setup-api.ts +16 -6
  17. package/api/payments-api.ts +46 -16
  18. package/api/payout-methods-api.ts +48 -18
  19. package/api/policy-payment-methods-api.ts +24 -9
  20. package/api/refunds-api.ts +24 -9
  21. package/api/tenant-bank-account-api.ts +40 -15
  22. package/api/webhooks-api.ts +2 -2
  23. package/api.ts +2 -0
  24. package/base.ts +239 -43
  25. package/common.ts +3 -2
  26. package/configuration.ts +20 -0
  27. package/dist/api/bank-accounts-api.d.ts +6 -6
  28. package/dist/api/bank-accounts-api.js +82 -46
  29. package/dist/api/bank-order-texts-api.d.ts +144 -0
  30. package/dist/api/bank-order-texts-api.js +325 -0
  31. package/dist/api/bank-orders-api.d.ts +5 -5
  32. package/dist/api/bank-orders-api.js +67 -38
  33. package/dist/api/bank-transaction-api.d.ts +80 -14
  34. package/dist/api/bank-transaction-api.js +194 -52
  35. package/dist/api/billing-addresses-api.d.ts +5 -5
  36. package/dist/api/billing-addresses-api.js +71 -39
  37. package/dist/api/credit-allocation-api.d.ts +3 -3
  38. package/dist/api/credit-allocation-api.js +41 -23
  39. package/dist/api/exceeding-credits-api.d.ts +116 -2
  40. package/dist/api/exceeding-credits-api.js +226 -15
  41. package/dist/api/health-check-api.d.ts +1 -1
  42. package/dist/api/health-check-api.js +1 -1
  43. package/dist/api/ibanvalidator-api.d.ts +1 -1
  44. package/dist/api/ibanvalidator-api.js +15 -8
  45. package/dist/api/payment-methods-api.d.ts +3 -3
  46. package/dist/api/payment-methods-api.js +41 -23
  47. package/dist/api/payment-receipts-api.d.ts +5 -5
  48. package/dist/api/payment-receipts-api.js +67 -38
  49. package/dist/api/payment-reminders-api.d.ts +4 -4
  50. package/dist/api/payment-reminders-api.js +56 -31
  51. package/dist/api/payment-requests-api.d.ts +17 -17
  52. package/dist/api/payment-requests-api.js +76 -47
  53. package/dist/api/payment-setup-api.d.ts +2 -2
  54. package/dist/api/payment-setup-api.js +30 -16
  55. package/dist/api/payments-api.d.ts +4 -4
  56. package/dist/api/payments-api.js +62 -34
  57. package/dist/api/payout-methods-api.d.ts +6 -6
  58. package/dist/api/payout-methods-api.js +82 -46
  59. package/dist/api/policy-payment-methods-api.d.ts +3 -3
  60. package/dist/api/policy-payment-methods-api.js +41 -23
  61. package/dist/api/refunds-api.d.ts +3 -3
  62. package/dist/api/refunds-api.js +37 -22
  63. package/dist/api/tenant-bank-account-api.d.ts +5 -5
  64. package/dist/api/tenant-bank-account-api.js +67 -38
  65. package/dist/api/webhooks-api.d.ts +2 -2
  66. package/dist/api/webhooks-api.js +2 -2
  67. package/dist/api.d.ts +1 -0
  68. package/dist/api.js +1 -0
  69. package/dist/base.d.ts +26 -0
  70. package/dist/base.js +243 -60
  71. package/dist/common.d.ts +1 -1
  72. package/dist/common.js +1 -0
  73. package/dist/configuration.d.ts +17 -0
  74. package/dist/configuration.js +2 -0
  75. package/dist/models/bank-order-texts-class.d.ts +42 -0
  76. package/dist/models/bank-order-texts-class.js +15 -0
  77. package/dist/models/bank-transaction-class.d.ts +7 -0
  78. package/dist/models/bank-transaction-entity.d.ts +7 -0
  79. package/dist/models/bank-transaction-invoice-entity.d.ts +24 -0
  80. package/dist/models/create-exceeding-credit-request-dto.d.ts +48 -0
  81. package/dist/models/create-exceeding-credit-request-dto.js +15 -0
  82. package/dist/models/create-exceeding-credit-response-class.d.ts +25 -0
  83. package/dist/models/create-exceeding-credit-response-class.js +15 -0
  84. package/dist/models/create-payment-order-dto.d.ts +1 -1
  85. package/dist/models/create-payment-receipt-request-dto.d.ts +3 -3
  86. package/dist/models/create-payment-request-dto.d.ts +1 -1
  87. package/dist/models/create-payment-request-request-dto.d.ts +6 -0
  88. package/dist/models/create-return-premium-credits-request-dto.d.ts +24 -0
  89. package/dist/models/create-return-premium-credits-request-dto.js +15 -0
  90. package/dist/models/create-return-premium-credits-response-class.d.ts +25 -0
  91. package/dist/models/create-return-premium-credits-response-class.js +15 -0
  92. package/dist/models/credit-allocation-class.d.ts +6 -0
  93. package/dist/models/credit-allocation-entity.d.ts +6 -0
  94. package/dist/models/exceeding-credit-class.d.ts +25 -2
  95. package/dist/models/exceeding-credit-class.js +5 -1
  96. package/dist/models/exceeding-credit-entity.d.ts +31 -2
  97. package/dist/models/exceeding-credit-entity.js +5 -1
  98. package/dist/models/get-bank-order-texts-response-class.d.ts +25 -0
  99. package/dist/models/get-bank-order-texts-response-class.js +15 -0
  100. package/dist/models/index.d.ts +12 -0
  101. package/dist/models/index.js +12 -0
  102. package/dist/models/link-bank-transaction-payment-requests-request-dto-rest.d.ts +30 -0
  103. package/dist/models/link-bank-transaction-payment-requests-request-dto-rest.js +15 -0
  104. package/dist/models/link-bank-transaction-payment-requests-response-class.d.ts +25 -0
  105. package/dist/models/link-bank-transaction-payment-requests-response-class.js +15 -0
  106. package/dist/models/list-billing-addresses-response-class.d.ts +9 -9
  107. package/dist/models/list-exceeding-credits-response-class.d.ts +6 -18
  108. package/dist/models/list-payment-receipts-response-class.d.ts +9 -9
  109. package/dist/models/list-payment-requests-response-class.d.ts +6 -18
  110. package/dist/models/list-payout-methods-response-class.d.ts +9 -9
  111. package/dist/models/list-refunds-response-class.d.ts +6 -18
  112. package/dist/models/payment-class-without-expand-properties.d.ts +2 -2
  113. package/dist/models/payment-class.d.ts +2 -2
  114. package/dist/models/payment-entity.d.ts +1 -1
  115. package/dist/models/payment-receipt-class.d.ts +13 -1
  116. package/dist/models/payment-receipt-entity.d.ts +139 -0
  117. package/dist/models/payment-receipt-entity.js +20 -0
  118. package/dist/models/payment-request-class.d.ts +13 -6
  119. package/dist/models/payment-request-class.js +1 -0
  120. package/dist/models/payment-request-entity.d.ts +223 -0
  121. package/dist/models/payment-request-entity.js +39 -0
  122. package/dist/models/shared-transaction-class.d.ts +6 -0
  123. package/dist/models/transaction-entity.d.ts +6 -0
  124. package/dist/models/update-bank-order-texts-request-dto.d.ts +32 -0
  125. package/dist/models/update-bank-order-texts-request-dto.js +15 -0
  126. package/dist/models/update-bank-order-texts-response-class.d.ts +25 -0
  127. package/dist/models/update-bank-order-texts-response-class.js +15 -0
  128. package/models/bank-order-texts-class.ts +48 -0
  129. package/models/bank-transaction-class.ts +7 -0
  130. package/models/bank-transaction-entity.ts +7 -0
  131. package/models/bank-transaction-invoice-entity.ts +24 -0
  132. package/models/create-exceeding-credit-request-dto.ts +54 -0
  133. package/models/create-exceeding-credit-response-class.ts +31 -0
  134. package/models/create-payment-order-dto.ts +1 -1
  135. package/models/create-payment-receipt-request-dto.ts +3 -3
  136. package/models/create-payment-request-dto.ts +1 -1
  137. package/models/create-payment-request-request-dto.ts +6 -0
  138. package/models/create-return-premium-credits-request-dto.ts +30 -0
  139. package/models/create-return-premium-credits-response-class.ts +31 -0
  140. package/models/credit-allocation-class.ts +6 -0
  141. package/models/credit-allocation-entity.ts +6 -0
  142. package/models/exceeding-credit-class.ts +26 -2
  143. package/models/exceeding-credit-entity.ts +32 -2
  144. package/models/get-bank-order-texts-response-class.ts +31 -0
  145. package/models/index.ts +12 -0
  146. package/models/link-bank-transaction-payment-requests-request-dto-rest.ts +36 -0
  147. package/models/link-bank-transaction-payment-requests-response-class.ts +31 -0
  148. package/models/list-billing-addresses-response-class.ts +9 -9
  149. package/models/list-exceeding-credits-response-class.ts +6 -18
  150. package/models/list-payment-receipts-response-class.ts +9 -9
  151. package/models/list-payment-requests-response-class.ts +6 -18
  152. package/models/list-payout-methods-response-class.ts +9 -9
  153. package/models/list-refunds-response-class.ts +6 -18
  154. package/models/payment-class-without-expand-properties.ts +2 -2
  155. package/models/payment-class.ts +2 -2
  156. package/models/payment-entity.ts +1 -1
  157. package/models/payment-receipt-class.ts +13 -1
  158. package/models/payment-receipt-entity.ts +148 -0
  159. package/models/payment-request-class.ts +13 -6
  160. package/models/payment-request-entity.ts +233 -0
  161. package/models/shared-transaction-class.ts +6 -0
  162. package/models/transaction-entity.ts +6 -0
  163. package/models/update-bank-order-texts-request-dto.ts +36 -0
  164. package/models/update-bank-order-texts-response-class.ts +31 -0
  165. package/package.json +2 -2
@@ -104,9 +104,10 @@ var PolicyPaymentMethodsApiAxiosParamCreator = function (configuration) {
104
104
  activatePolicyPaymentMethod: function (code, activatePolicyPaymentMethodRequestDto, authorization, options) {
105
105
  if (options === void 0) { options = {}; }
106
106
  return __awaiter(_this, void 0, void 0, function () {
107
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
108
- return __generator(this, function (_a) {
109
- switch (_a.label) {
107
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
108
+ var _a;
109
+ return __generator(this, function (_b) {
110
+ switch (_b.label) {
110
111
  case 0:
111
112
  // verify required parameter 'code' is not null or undefined
112
113
  (0, common_1.assertParamExists)('activatePolicyPaymentMethod', 'code', code);
@@ -124,13 +125,19 @@ var PolicyPaymentMethodsApiAxiosParamCreator = function (configuration) {
124
125
  localVarQueryParameter = {};
125
126
  // authentication bearer required
126
127
  // http bearer authentication required
127
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
129
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
130
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
131
+ ];
128
132
  case 1:
129
133
  // authentication bearer required
130
134
  // http bearer authentication required
131
- _a.sent();
132
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
135
+ _b.sent();
136
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
137
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
138
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
139
+ if (authorizationValue || authorizationKeepEmpty) {
140
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
134
141
  }
135
142
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
143
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -156,9 +163,10 @@ var PolicyPaymentMethodsApiAxiosParamCreator = function (configuration) {
156
163
  createPolicyPaymentMethod: function (createPolicyPaymentMethodRequestDto, authorization, options) {
157
164
  if (options === void 0) { options = {}; }
158
165
  return __awaiter(_this, void 0, void 0, function () {
159
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
160
- return __generator(this, function (_a) {
161
- switch (_a.label) {
166
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
167
+ var _a;
168
+ return __generator(this, function (_b) {
169
+ switch (_b.label) {
162
170
  case 0:
163
171
  // verify required parameter 'createPolicyPaymentMethodRequestDto' is not null or undefined
164
172
  (0, common_1.assertParamExists)('createPolicyPaymentMethod', 'createPolicyPaymentMethodRequestDto', createPolicyPaymentMethodRequestDto);
@@ -173,13 +181,19 @@ var PolicyPaymentMethodsApiAxiosParamCreator = function (configuration) {
173
181
  localVarQueryParameter = {};
174
182
  // authentication bearer required
175
183
  // http bearer authentication required
176
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
184
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
185
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
186
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
187
+ ];
177
188
  case 1:
178
189
  // authentication bearer required
179
190
  // http bearer authentication required
180
- _a.sent();
181
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
182
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
191
+ _b.sent();
192
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
193
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
194
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
195
+ if (authorizationValue || authorizationKeepEmpty) {
196
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
183
197
  }
184
198
  localVarHeaderParameter['Content-Type'] = 'application/json';
185
199
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -211,9 +225,10 @@ var PolicyPaymentMethodsApiAxiosParamCreator = function (configuration) {
211
225
  listPolicyPaymentMethods: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
212
226
  if (options === void 0) { options = {}; }
213
227
  return __awaiter(_this, void 0, void 0, function () {
214
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
215
- return __generator(this, function (_a) {
216
- switch (_a.label) {
228
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
229
+ var _a;
230
+ return __generator(this, function (_b) {
231
+ switch (_b.label) {
217
232
  case 0:
218
233
  localVarPath = "/paymentservice/v1/policy-payment-methods";
219
234
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -230,7 +245,7 @@ var PolicyPaymentMethodsApiAxiosParamCreator = function (configuration) {
230
245
  case 1:
231
246
  // authentication bearer required
232
247
  // http bearer authentication required
233
- _a.sent();
248
+ _b.sent();
234
249
  if (pageSize !== undefined) {
235
250
  localVarQueryParameter['pageSize'] = pageSize;
236
251
  }
@@ -252,8 +267,11 @@ var PolicyPaymentMethodsApiAxiosParamCreator = function (configuration) {
252
267
  if (filters !== undefined) {
253
268
  localVarQueryParameter['filters'] = filters;
254
269
  }
255
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
256
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
270
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
271
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
272
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
273
+ if (authorizationValue || authorizationKeepEmpty) {
274
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
257
275
  }
258
276
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
259
277
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -420,7 +438,7 @@ var PolicyPaymentMethodsApi = /** @class */ (function (_super) {
420
438
  */
421
439
  PolicyPaymentMethodsApi.prototype.activatePolicyPaymentMethod = function (requestParameters, options) {
422
440
  var _this = this;
423
- return (0, exports.PolicyPaymentMethodsApiFp)(this.configuration).activatePolicyPaymentMethod(requestParameters.code, requestParameters.activatePolicyPaymentMethodRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
441
+ return (0, exports.PolicyPaymentMethodsApiFp)(this.configuration).activatePolicyPaymentMethod(requestParameters.code, requestParameters.activatePolicyPaymentMethodRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
424
442
  };
425
443
  /**
426
444
  * Attaches a payment method to a policy by creating a policy payment method and setting it as active. Any previous payment method attachment will be deactivated. **Required Permissions** \"payment-management.payments.create\"
@@ -432,7 +450,7 @@ var PolicyPaymentMethodsApi = /** @class */ (function (_super) {
432
450
  */
433
451
  PolicyPaymentMethodsApi.prototype.createPolicyPaymentMethod = function (requestParameters, options) {
434
452
  var _this = this;
435
- return (0, exports.PolicyPaymentMethodsApiFp)(this.configuration).createPolicyPaymentMethod(requestParameters.createPolicyPaymentMethodRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
453
+ return (0, exports.PolicyPaymentMethodsApiFp)(this.configuration).createPolicyPaymentMethod(requestParameters.createPolicyPaymentMethodRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
436
454
  };
437
455
  /**
438
456
  * List policy payment methods **Required Permissions** \"payment-management.payments.view\"
@@ -445,7 +463,7 @@ var PolicyPaymentMethodsApi = /** @class */ (function (_super) {
445
463
  PolicyPaymentMethodsApi.prototype.listPolicyPaymentMethods = function (requestParameters, options) {
446
464
  var _this = this;
447
465
  if (requestParameters === void 0) { requestParameters = {}; }
448
- return (0, exports.PolicyPaymentMethodsApiFp)(this.configuration).listPolicyPaymentMethods(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); });
466
+ return (0, exports.PolicyPaymentMethodsApiFp)(this.configuration).listPolicyPaymentMethods(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); });
449
467
  };
450
468
  return PolicyPaymentMethodsApi;
451
469
  }(base_1.BaseAPI));
@@ -250,7 +250,7 @@ export declare class RefundsApi extends BaseAPI {
250
250
  * @throws {RequiredError}
251
251
  * @memberof RefundsApi
252
252
  */
253
- createRefund(requestParameters: RefundsApiCreateRefundRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateRefundResponseClass, any, {}>>;
253
+ createRefund(requestParameters: RefundsApiCreateRefundRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateRefundResponseClass, any, {}, any>>;
254
254
  /**
255
255
  * Retrieves the details of the refund that was previously created. Supply the unique refund code that was returned when you created it and Emil Api will return the corresponding refund information. **Required Permissions** \"payment-management.payments.view\"
256
256
  * @summary Retrieve the refund
@@ -259,7 +259,7 @@ export declare class RefundsApi extends BaseAPI {
259
259
  * @throws {RequiredError}
260
260
  * @memberof RefundsApi
261
261
  */
262
- getRefund(requestParameters: RefundsApiGetRefundRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetRefundResponseClass, any, {}>>;
262
+ getRefund(requestParameters: RefundsApiGetRefundRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetRefundResponseClass, any, {}, any>>;
263
263
  /**
264
264
  * Returns a list of refunds you have previously created. The refunds 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\"
265
265
  * @summary List refunds
@@ -268,5 +268,5 @@ export declare class RefundsApi extends BaseAPI {
268
268
  * @throws {RequiredError}
269
269
  * @memberof RefundsApi
270
270
  */
271
- listRefunds(requestParameters?: RefundsApiListRefundsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListRefundsResponseClass, any, {}>>;
271
+ listRefunds(requestParameters?: RefundsApiListRefundsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListRefundsResponseClass, any, {}, any>>;
272
272
  }
@@ -103,9 +103,10 @@ var RefundsApiAxiosParamCreator = function (configuration) {
103
103
  createRefund: function (createRefundRequestDto, 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
- return __generator(this, function (_a) {
108
- switch (_a.label) {
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 'createRefundRequestDto' is not null or undefined
111
112
  (0, common_1.assertParamExists)('createRefund', 'createRefundRequestDto', createRefundRequestDto);
@@ -120,13 +121,19 @@ var RefundsApiAxiosParamCreator = function (configuration) {
120
121
  localVarQueryParameter = {};
121
122
  // authentication bearer required
122
123
  // http bearer authentication required
123
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
124
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
125
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
126
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
127
+ ];
124
128
  case 1:
125
129
  // authentication bearer required
126
130
  // http bearer authentication required
127
- _a.sent();
128
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
+ _b.sent();
132
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
133
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
134
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
135
+ if (authorizationValue || authorizationKeepEmpty) {
136
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
130
137
  }
131
138
  localVarHeaderParameter['Content-Type'] = 'application/json';
132
139
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -153,9 +160,10 @@ var RefundsApiAxiosParamCreator = function (configuration) {
153
160
  getRefund: function (code, authorization, expand, options) {
154
161
  if (options === void 0) { options = {}; }
155
162
  return __awaiter(_this, void 0, void 0, function () {
156
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
157
- return __generator(this, function (_a) {
158
- switch (_a.label) {
163
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
164
+ var _a;
165
+ return __generator(this, function (_b) {
166
+ switch (_b.label) {
159
167
  case 0:
160
168
  // verify required parameter 'code' is not null or undefined
161
169
  (0, common_1.assertParamExists)('getRefund', 'code', code);
@@ -175,12 +183,15 @@ var RefundsApiAxiosParamCreator = function (configuration) {
175
183
  case 1:
176
184
  // authentication bearer required
177
185
  // http bearer authentication required
178
- _a.sent();
186
+ _b.sent();
179
187
  if (expand !== undefined) {
180
188
  localVarQueryParameter['expand'] = expand;
181
189
  }
182
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
183
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
190
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
191
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
192
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
193
+ if (authorizationValue || authorizationKeepEmpty) {
194
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
184
195
  }
185
196
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
197
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -210,9 +221,10 @@ var RefundsApiAxiosParamCreator = function (configuration) {
210
221
  listRefunds: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
211
222
  if (options === void 0) { options = {}; }
212
223
  return __awaiter(_this, void 0, void 0, function () {
213
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
214
- return __generator(this, function (_a) {
215
- switch (_a.label) {
224
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
225
+ var _a;
226
+ return __generator(this, function (_b) {
227
+ switch (_b.label) {
216
228
  case 0:
217
229
  localVarPath = "/paymentservice/v1/refunds";
218
230
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -229,7 +241,7 @@ var RefundsApiAxiosParamCreator = function (configuration) {
229
241
  case 1:
230
242
  // authentication bearer required
231
243
  // http bearer authentication required
232
- _a.sent();
244
+ _b.sent();
233
245
  if (pageSize !== undefined) {
234
246
  localVarQueryParameter['pageSize'] = pageSize;
235
247
  }
@@ -251,8 +263,11 @@ var RefundsApiAxiosParamCreator = function (configuration) {
251
263
  if (filters !== undefined) {
252
264
  localVarQueryParameter['filters'] = filters;
253
265
  }
254
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
255
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
266
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
267
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
268
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
269
+ if (authorizationValue || authorizationKeepEmpty) {
270
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
256
271
  }
257
272
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
258
273
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -419,7 +434,7 @@ var RefundsApi = /** @class */ (function (_super) {
419
434
  */
420
435
  RefundsApi.prototype.createRefund = function (requestParameters, options) {
421
436
  var _this = this;
422
- return (0, exports.RefundsApiFp)(this.configuration).createRefund(requestParameters.createRefundRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
437
+ return (0, exports.RefundsApiFp)(this.configuration).createRefund(requestParameters.createRefundRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
423
438
  };
424
439
  /**
425
440
  * Retrieves the details of the refund that was previously created. Supply the unique refund code that was returned when you created it and Emil Api will return the corresponding refund information. **Required Permissions** \"payment-management.payments.view\"
@@ -431,7 +446,7 @@ var RefundsApi = /** @class */ (function (_super) {
431
446
  */
432
447
  RefundsApi.prototype.getRefund = function (requestParameters, options) {
433
448
  var _this = this;
434
- return (0, exports.RefundsApiFp)(this.configuration).getRefund(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
449
+ return (0, exports.RefundsApiFp)(this.configuration).getRefund(requestParameters.code, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
435
450
  };
436
451
  /**
437
452
  * Returns a list of refunds you have previously created. The refunds 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\"
@@ -444,7 +459,7 @@ var RefundsApi = /** @class */ (function (_super) {
444
459
  RefundsApi.prototype.listRefunds = function (requestParameters, options) {
445
460
  var _this = this;
446
461
  if (requestParameters === void 0) { requestParameters = {}; }
447
- return (0, exports.RefundsApiFp)(this.configuration).listRefunds(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); });
462
+ return (0, exports.RefundsApiFp)(this.configuration).listRefunds(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); });
448
463
  };
449
464
  return RefundsApi;
450
465
  }(base_1.BaseAPI));
@@ -353,7 +353,7 @@ export declare class TenantBankAccountApi extends BaseAPI {
353
353
  * @throws {RequiredError}
354
354
  * @memberof TenantBankAccountApi
355
355
  */
356
- createTenantBankAccount(requestParameters: TenantBankAccountApiCreateTenantBankAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateTenantBankAccountResponseClass, any, {}>>;
356
+ createTenantBankAccount(requestParameters: TenantBankAccountApiCreateTenantBankAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateTenantBankAccountResponseClass, any, {}, any>>;
357
357
  /**
358
358
  * Deletes a tenant bank account by code
359
359
  * @summary Delete the tenant bank account
@@ -362,7 +362,7 @@ export declare class TenantBankAccountApi extends BaseAPI {
362
362
  * @throws {RequiredError}
363
363
  * @memberof TenantBankAccountApi
364
364
  */
365
- deleteTenantBankAccount(requestParameters: TenantBankAccountApiDeleteTenantBankAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any, {}>>;
365
+ deleteTenantBankAccount(requestParameters: TenantBankAccountApiDeleteTenantBankAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any, {}, any>>;
366
366
  /**
367
367
  * Retrieves the details of the tenant bank account that was previously created. Supply the unique tenant bank account code that was returned when you created it and Emil Api will return the corresponding tenant bank account information.
368
368
  * @summary Retrieve the tenant bank account
@@ -371,7 +371,7 @@ export declare class TenantBankAccountApi extends BaseAPI {
371
371
  * @throws {RequiredError}
372
372
  * @memberof TenantBankAccountApi
373
373
  */
374
- getTenantBankAccount(requestParameters: TenantBankAccountApiGetTenantBankAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetTenantBankAccountResponseClass, any, {}>>;
374
+ getTenantBankAccount(requestParameters: TenantBankAccountApiGetTenantBankAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetTenantBankAccountResponseClass, any, {}, any>>;
375
375
  /**
376
376
  * Returns a list of tenant bank accounts you have previously created. The tenant bank accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
377
377
  * @summary List tenant bank accounts
@@ -380,7 +380,7 @@ export declare class TenantBankAccountApi extends BaseAPI {
380
380
  * @throws {RequiredError}
381
381
  * @memberof TenantBankAccountApi
382
382
  */
383
- listTenantBankAccounts(requestParameters?: TenantBankAccountApiListTenantBankAccountsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListTenantBankAccountResponseClass, any, {}>>;
383
+ listTenantBankAccounts(requestParameters?: TenantBankAccountApiListTenantBankAccountsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListTenantBankAccountResponseClass, any, {}, any>>;
384
384
  /**
385
385
  * Update a tenant bank account by code
386
386
  * @summary Update the tenant bank account
@@ -389,5 +389,5 @@ export declare class TenantBankAccountApi extends BaseAPI {
389
389
  * @throws {RequiredError}
390
390
  * @memberof TenantBankAccountApi
391
391
  */
392
- updateTenantBankAccount(requestParameters: TenantBankAccountApiUpdateTenantBankAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateTenantBankAccountResponseClass, any, {}>>;
392
+ updateTenantBankAccount(requestParameters: TenantBankAccountApiUpdateTenantBankAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateTenantBankAccountResponseClass, any, {}, any>>;
393
393
  }
@@ -103,9 +103,10 @@ var TenantBankAccountApiAxiosParamCreator = function (configuration) {
103
103
  createTenantBankAccount: function (createTenantBankAccountRequestDto, 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
- return __generator(this, function (_a) {
108
- switch (_a.label) {
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 'createTenantBankAccountRequestDto' is not null or undefined
111
112
  (0, common_1.assertParamExists)('createTenantBankAccount', 'createTenantBankAccountRequestDto', createTenantBankAccountRequestDto);
@@ -120,13 +121,19 @@ var TenantBankAccountApiAxiosParamCreator = function (configuration) {
120
121
  localVarQueryParameter = {};
121
122
  // authentication bearer required
122
123
  // http bearer authentication required
123
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
124
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
125
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
126
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
127
+ ];
124
128
  case 1:
125
129
  // authentication bearer required
126
130
  // http bearer authentication required
127
- _a.sent();
128
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
+ _b.sent();
132
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
133
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
134
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
135
+ if (authorizationValue || authorizationKeepEmpty) {
136
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
130
137
  }
131
138
  localVarHeaderParameter['Content-Type'] = 'application/json';
132
139
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -152,9 +159,10 @@ var TenantBankAccountApiAxiosParamCreator = function (configuration) {
152
159
  deleteTenantBankAccount: function (code, authorization, 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
- return __generator(this, function (_a) {
157
- switch (_a.label) {
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)('deleteTenantBankAccount', 'code', code);
@@ -170,13 +178,19 @@ var TenantBankAccountApiAxiosParamCreator = function (configuration) {
170
178
  localVarQueryParameter = {};
171
179
  // authentication bearer required
172
180
  // http bearer authentication required
173
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
181
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
182
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
183
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
184
+ ];
174
185
  case 1:
175
186
  // authentication bearer required
176
187
  // http bearer authentication required
177
- _a.sent();
178
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
179
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
188
+ _b.sent();
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);
180
194
  }
181
195
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
182
196
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -201,9 +215,10 @@ var TenantBankAccountApiAxiosParamCreator = function (configuration) {
201
215
  getTenantBankAccount: function (code, authorization, expand, options) {
202
216
  if (options === void 0) { options = {}; }
203
217
  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) {
218
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
219
+ var _a;
220
+ return __generator(this, function (_b) {
221
+ switch (_b.label) {
207
222
  case 0:
208
223
  // verify required parameter 'code' is not null or undefined
209
224
  (0, common_1.assertParamExists)('getTenantBankAccount', 'code', code);
@@ -223,12 +238,15 @@ var TenantBankAccountApiAxiosParamCreator = function (configuration) {
223
238
  case 1:
224
239
  // authentication bearer required
225
240
  // http bearer authentication required
226
- _a.sent();
241
+ _b.sent();
227
242
  if (expand !== undefined) {
228
243
  localVarQueryParameter['expand'] = expand;
229
244
  }
230
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
231
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
245
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
246
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
247
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
248
+ if (authorizationValue || authorizationKeepEmpty) {
249
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
232
250
  }
233
251
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
234
252
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -258,9 +276,10 @@ var TenantBankAccountApiAxiosParamCreator = function (configuration) {
258
276
  listTenantBankAccounts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
259
277
  if (options === void 0) { options = {}; }
260
278
  return __awaiter(_this, void 0, void 0, function () {
261
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
262
- return __generator(this, function (_a) {
263
- switch (_a.label) {
279
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
280
+ var _a;
281
+ return __generator(this, function (_b) {
282
+ switch (_b.label) {
264
283
  case 0:
265
284
  localVarPath = "/paymentservice/v1/tenant/bank-accounts";
266
285
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -277,7 +296,7 @@ var TenantBankAccountApiAxiosParamCreator = function (configuration) {
277
296
  case 1:
278
297
  // authentication bearer required
279
298
  // http bearer authentication required
280
- _a.sent();
299
+ _b.sent();
281
300
  if (pageSize !== undefined) {
282
301
  localVarQueryParameter['pageSize'] = pageSize;
283
302
  }
@@ -299,8 +318,11 @@ var TenantBankAccountApiAxiosParamCreator = function (configuration) {
299
318
  if (filters !== undefined) {
300
319
  localVarQueryParameter['filters'] = filters;
301
320
  }
302
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
303
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
321
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
322
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
323
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
324
+ if (authorizationValue || authorizationKeepEmpty) {
325
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
304
326
  }
305
327
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
306
328
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -325,9 +347,10 @@ var TenantBankAccountApiAxiosParamCreator = function (configuration) {
325
347
  updateTenantBankAccount: function (code, updateTenantBankAccountRestRequestDto, authorization, options) {
326
348
  if (options === void 0) { options = {}; }
327
349
  return __awaiter(_this, void 0, void 0, function () {
328
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
329
- return __generator(this, function (_a) {
330
- switch (_a.label) {
350
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
351
+ var _a;
352
+ return __generator(this, function (_b) {
353
+ switch (_b.label) {
331
354
  case 0:
332
355
  // verify required parameter 'code' is not null or undefined
333
356
  (0, common_1.assertParamExists)('updateTenantBankAccount', 'code', code);
@@ -345,13 +368,19 @@ var TenantBankAccountApiAxiosParamCreator = function (configuration) {
345
368
  localVarQueryParameter = {};
346
369
  // authentication bearer required
347
370
  // http bearer authentication required
348
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
371
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
372
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
373
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
374
+ ];
349
375
  case 1:
350
376
  // authentication bearer required
351
377
  // http bearer authentication required
352
- _a.sent();
353
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
354
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
378
+ _b.sent();
379
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
380
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
381
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
382
+ if (authorizationValue || authorizationKeepEmpty) {
383
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
355
384
  }
356
385
  localVarHeaderParameter['Content-Type'] = 'application/json';
357
386
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -586,7 +615,7 @@ var TenantBankAccountApi = /** @class */ (function (_super) {
586
615
  */
587
616
  TenantBankAccountApi.prototype.createTenantBankAccount = function (requestParameters, options) {
588
617
  var _this = this;
589
- return (0, exports.TenantBankAccountApiFp)(this.configuration).createTenantBankAccount(requestParameters.createTenantBankAccountRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
618
+ return (0, exports.TenantBankAccountApiFp)(this.configuration).createTenantBankAccount(requestParameters.createTenantBankAccountRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
590
619
  };
591
620
  /**
592
621
  * Deletes a tenant bank account by code
@@ -598,7 +627,7 @@ var TenantBankAccountApi = /** @class */ (function (_super) {
598
627
  */
599
628
  TenantBankAccountApi.prototype.deleteTenantBankAccount = function (requestParameters, options) {
600
629
  var _this = this;
601
- return (0, exports.TenantBankAccountApiFp)(this.configuration).deleteTenantBankAccount(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
630
+ return (0, exports.TenantBankAccountApiFp)(this.configuration).deleteTenantBankAccount(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
602
631
  };
603
632
  /**
604
633
  * Retrieves the details of the tenant bank account that was previously created. Supply the unique tenant bank account code that was returned when you created it and Emil Api will return the corresponding tenant bank account information.
@@ -610,7 +639,7 @@ var TenantBankAccountApi = /** @class */ (function (_super) {
610
639
  */
611
640
  TenantBankAccountApi.prototype.getTenantBankAccount = function (requestParameters, options) {
612
641
  var _this = this;
613
- return (0, exports.TenantBankAccountApiFp)(this.configuration).getTenantBankAccount(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
642
+ return (0, exports.TenantBankAccountApiFp)(this.configuration).getTenantBankAccount(requestParameters.code, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
614
643
  };
615
644
  /**
616
645
  * Returns a list of tenant bank accounts you have previously created. The tenant bank accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
@@ -623,7 +652,7 @@ var TenantBankAccountApi = /** @class */ (function (_super) {
623
652
  TenantBankAccountApi.prototype.listTenantBankAccounts = function (requestParameters, options) {
624
653
  var _this = this;
625
654
  if (requestParameters === void 0) { requestParameters = {}; }
626
- return (0, exports.TenantBankAccountApiFp)(this.configuration).listTenantBankAccounts(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); });
655
+ return (0, exports.TenantBankAccountApiFp)(this.configuration).listTenantBankAccounts(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); });
627
656
  };
628
657
  /**
629
658
  * Update a tenant bank account by code
@@ -635,7 +664,7 @@ var TenantBankAccountApi = /** @class */ (function (_super) {
635
664
  */
636
665
  TenantBankAccountApi.prototype.updateTenantBankAccount = function (requestParameters, options) {
637
666
  var _this = this;
638
- return (0, exports.TenantBankAccountApiFp)(this.configuration).updateTenantBankAccount(requestParameters.code, requestParameters.updateTenantBankAccountRestRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
667
+ return (0, exports.TenantBankAccountApiFp)(this.configuration).updateTenantBankAccount(requestParameters.code, requestParameters.updateTenantBankAccountRestRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
639
668
  };
640
669
  return TenantBankAccountApi;
641
670
  }(base_1.BaseAPI));
@@ -164,7 +164,7 @@ export declare class WebhooksApi extends BaseAPI {
164
164
  * @throws {RequiredError}
165
165
  * @memberof WebhooksApi
166
166
  */
167
- postWebhook(requestParameters: WebhooksApiPostWebhookRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
167
+ postWebhook(requestParameters: WebhooksApiPostWebhookRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}, any>>;
168
168
  /**
169
169
  * This will processes the webhook from external payment service provider. **Required Permissions** none
170
170
  * @summary Handle the webhook from PSP
@@ -173,5 +173,5 @@ export declare class WebhooksApi extends BaseAPI {
173
173
  * @throws {RequiredError}
174
174
  * @memberof WebhooksApi
175
175
  */
176
- postWebhookWithProductSlug(requestParameters: WebhooksApiPostWebhookWithProductSlugRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
176
+ postWebhookWithProductSlug(requestParameters: WebhooksApiPostWebhookWithProductSlugRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}, any>>;
177
177
  }