@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
@@ -66,8 +66,13 @@ export const PayoutMethodsApiAxiosParamCreator = function (configuration?: Confi
66
66
  // http bearer authentication required
67
67
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
68
68
 
69
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
70
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
69
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
70
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
71
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
72
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
73
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
74
+ if (authorizationValue || authorizationKeepEmpty) {
75
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
71
76
  }
72
77
 
73
78
 
@@ -110,8 +115,13 @@ export const PayoutMethodsApiAxiosParamCreator = function (configuration?: Confi
110
115
  // http bearer authentication required
111
116
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
112
117
 
113
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
114
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
118
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
119
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
120
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
121
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
122
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
123
+ if (authorizationValue || authorizationKeepEmpty) {
124
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
115
125
  }
116
126
 
117
127
 
@@ -161,8 +171,13 @@ export const PayoutMethodsApiAxiosParamCreator = function (configuration?: Confi
161
171
  // http bearer authentication required
162
172
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
163
173
 
164
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
165
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
174
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
175
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
176
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
177
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
178
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
179
+ if (authorizationValue || authorizationKeepEmpty) {
180
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
166
181
  }
167
182
 
168
183
 
@@ -209,8 +224,13 @@ export const PayoutMethodsApiAxiosParamCreator = function (configuration?: Confi
209
224
  // http bearer authentication required
210
225
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
211
226
 
212
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
213
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
227
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
228
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
229
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
230
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
231
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
232
+ if (authorizationValue || authorizationKeepEmpty) {
233
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
214
234
  }
215
235
 
216
236
 
@@ -259,8 +279,13 @@ export const PayoutMethodsApiAxiosParamCreator = function (configuration?: Confi
259
279
  localVarQueryParameter['expand'] = expand;
260
280
  }
261
281
 
262
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
263
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
282
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
283
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
284
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
285
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
286
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
287
+ if (authorizationValue || authorizationKeepEmpty) {
288
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
264
289
  }
265
290
 
266
291
 
@@ -335,8 +360,13 @@ export const PayoutMethodsApiAxiosParamCreator = function (configuration?: Confi
335
360
  localVarQueryParameter['filters'] = filters;
336
361
  }
337
362
 
338
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
339
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
363
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
364
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
365
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
366
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
367
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
368
+ if (authorizationValue || authorizationKeepEmpty) {
369
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
340
370
  }
341
371
 
342
372
 
@@ -725,7 +755,7 @@ export class PayoutMethodsApi extends BaseAPI {
725
755
  * @memberof PayoutMethodsApi
726
756
  */
727
757
  public activatePayoutMethod(requestParameters: PayoutMethodsApiActivatePayoutMethodRequest, options?: AxiosRequestConfig) {
728
- return PayoutMethodsApiFp(this.configuration).activatePayoutMethod(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
758
+ return PayoutMethodsApiFp(this.configuration).activatePayoutMethod(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
729
759
  }
730
760
 
731
761
  /**
@@ -737,7 +767,7 @@ export class PayoutMethodsApi extends BaseAPI {
737
767
  * @memberof PayoutMethodsApi
738
768
  */
739
769
  public createPayoutMethod(requestParameters: PayoutMethodsApiCreatePayoutMethodRequest, options?: AxiosRequestConfig) {
740
- return PayoutMethodsApiFp(this.configuration).createPayoutMethod(requestParameters.createPayoutMethodRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
770
+ return PayoutMethodsApiFp(this.configuration).createPayoutMethod(requestParameters.createPayoutMethodRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
741
771
  }
742
772
 
743
773
  /**
@@ -749,7 +779,7 @@ export class PayoutMethodsApi extends BaseAPI {
749
779
  * @memberof PayoutMethodsApi
750
780
  */
751
781
  public createPayoutMethodByBankAccount(requestParameters: PayoutMethodsApiCreatePayoutMethodByBankAccountRequest, options?: AxiosRequestConfig) {
752
- return PayoutMethodsApiFp(this.configuration).createPayoutMethodByBankAccount(requestParameters.code, requestParameters.createPayoutMethodByBankAccountRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
782
+ return PayoutMethodsApiFp(this.configuration).createPayoutMethodByBankAccount(requestParameters.code, requestParameters.createPayoutMethodByBankAccountRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
753
783
  }
754
784
 
755
785
  /**
@@ -761,7 +791,7 @@ export class PayoutMethodsApi extends BaseAPI {
761
791
  * @memberof PayoutMethodsApi
762
792
  */
763
793
  public deletePayoutMethod(requestParameters: PayoutMethodsApiDeletePayoutMethodRequest, options?: AxiosRequestConfig) {
764
- return PayoutMethodsApiFp(this.configuration).deletePayoutMethod(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
794
+ return PayoutMethodsApiFp(this.configuration).deletePayoutMethod(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
765
795
  }
766
796
 
767
797
  /**
@@ -773,7 +803,7 @@ export class PayoutMethodsApi extends BaseAPI {
773
803
  * @memberof PayoutMethodsApi
774
804
  */
775
805
  public getPayoutMethod(requestParameters: PayoutMethodsApiGetPayoutMethodRequest, options?: AxiosRequestConfig) {
776
- return PayoutMethodsApiFp(this.configuration).getPayoutMethod(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
806
+ return PayoutMethodsApiFp(this.configuration).getPayoutMethod(requestParameters.code, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
777
807
  }
778
808
 
779
809
  /**
@@ -785,6 +815,6 @@ export class PayoutMethodsApi extends BaseAPI {
785
815
  * @memberof PayoutMethodsApi
786
816
  */
787
817
  public listPayoutMethods(requestParameters: PayoutMethodsApiListPayoutMethodsRequest = {}, options?: AxiosRequestConfig) {
788
- return PayoutMethodsApiFp(this.configuration).listPayoutMethods(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
818
+ return PayoutMethodsApiFp(this.configuration).listPayoutMethods(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
789
819
  }
790
820
  }
@@ -67,8 +67,13 @@ export const PolicyPaymentMethodsApiAxiosParamCreator = function (configuration?
67
67
  // http bearer authentication required
68
68
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
69
69
 
70
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
71
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
70
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
71
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
72
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
73
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
74
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
75
+ if (authorizationValue || authorizationKeepEmpty) {
76
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
72
77
  }
73
78
 
74
79
 
@@ -114,8 +119,13 @@ export const PolicyPaymentMethodsApiAxiosParamCreator = function (configuration?
114
119
  // http bearer authentication required
115
120
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
116
121
 
117
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
118
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
122
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
123
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
124
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
125
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
126
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
127
+ if (authorizationValue || authorizationKeepEmpty) {
128
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
119
129
  }
120
130
 
121
131
 
@@ -193,8 +203,13 @@ export const PolicyPaymentMethodsApiAxiosParamCreator = function (configuration?
193
203
  localVarQueryParameter['filters'] = filters;
194
204
  }
195
205
 
196
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
197
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
206
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
207
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
208
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
209
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
210
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
211
+ if (authorizationValue || authorizationKeepEmpty) {
212
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
198
213
  }
199
214
 
200
215
 
@@ -442,7 +457,7 @@ export class PolicyPaymentMethodsApi extends BaseAPI {
442
457
  * @memberof PolicyPaymentMethodsApi
443
458
  */
444
459
  public activatePolicyPaymentMethod(requestParameters: PolicyPaymentMethodsApiActivatePolicyPaymentMethodRequest, options?: AxiosRequestConfig) {
445
- return PolicyPaymentMethodsApiFp(this.configuration).activatePolicyPaymentMethod(requestParameters.code, requestParameters.activatePolicyPaymentMethodRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
460
+ return PolicyPaymentMethodsApiFp(this.configuration).activatePolicyPaymentMethod(requestParameters.code, requestParameters.activatePolicyPaymentMethodRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
446
461
  }
447
462
 
448
463
  /**
@@ -454,7 +469,7 @@ export class PolicyPaymentMethodsApi extends BaseAPI {
454
469
  * @memberof PolicyPaymentMethodsApi
455
470
  */
456
471
  public createPolicyPaymentMethod(requestParameters: PolicyPaymentMethodsApiCreatePolicyPaymentMethodRequest, options?: AxiosRequestConfig) {
457
- return PolicyPaymentMethodsApiFp(this.configuration).createPolicyPaymentMethod(requestParameters.createPolicyPaymentMethodRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
472
+ return PolicyPaymentMethodsApiFp(this.configuration).createPolicyPaymentMethod(requestParameters.createPolicyPaymentMethodRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
458
473
  }
459
474
 
460
475
  /**
@@ -466,6 +481,6 @@ export class PolicyPaymentMethodsApi extends BaseAPI {
466
481
  * @memberof PolicyPaymentMethodsApi
467
482
  */
468
483
  public listPolicyPaymentMethods(requestParameters: PolicyPaymentMethodsApiListPolicyPaymentMethodsRequest = {}, options?: AxiosRequestConfig) {
469
- return PolicyPaymentMethodsApiFp(this.configuration).listPolicyPaymentMethods(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
484
+ return PolicyPaymentMethodsApiFp(this.configuration).listPolicyPaymentMethods(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
470
485
  }
471
486
  }
@@ -63,8 +63,13 @@ export const RefundsApiAxiosParamCreator = function (configuration?: Configurati
63
63
  // http bearer authentication required
64
64
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
65
65
 
66
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
67
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
66
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
67
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
68
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
69
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
70
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
71
+ if (authorizationValue || authorizationKeepEmpty) {
72
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
68
73
  }
69
74
 
70
75
 
@@ -116,8 +121,13 @@ export const RefundsApiAxiosParamCreator = function (configuration?: Configurati
116
121
  localVarQueryParameter['expand'] = expand;
117
122
  }
118
123
 
119
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
120
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
124
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
125
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
126
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
127
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
128
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
129
+ if (authorizationValue || authorizationKeepEmpty) {
130
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
121
131
  }
122
132
 
123
133
 
@@ -192,8 +202,13 @@ export const RefundsApiAxiosParamCreator = function (configuration?: Configurati
192
202
  localVarQueryParameter['filters'] = filters;
193
203
  }
194
204
 
195
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
196
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
205
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
206
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
207
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
208
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
209
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
210
+ if (authorizationValue || authorizationKeepEmpty) {
211
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
197
212
  }
198
213
 
199
214
 
@@ -441,7 +456,7 @@ export class RefundsApi extends BaseAPI {
441
456
  * @memberof RefundsApi
442
457
  */
443
458
  public createRefund(requestParameters: RefundsApiCreateRefundRequest, options?: AxiosRequestConfig) {
444
- return RefundsApiFp(this.configuration).createRefund(requestParameters.createRefundRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
459
+ return RefundsApiFp(this.configuration).createRefund(requestParameters.createRefundRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
445
460
  }
446
461
 
447
462
  /**
@@ -453,7 +468,7 @@ export class RefundsApi extends BaseAPI {
453
468
  * @memberof RefundsApi
454
469
  */
455
470
  public getRefund(requestParameters: RefundsApiGetRefundRequest, options?: AxiosRequestConfig) {
456
- return RefundsApiFp(this.configuration).getRefund(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
471
+ return RefundsApiFp(this.configuration).getRefund(requestParameters.code, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
457
472
  }
458
473
 
459
474
  /**
@@ -465,6 +480,6 @@ export class RefundsApi extends BaseAPI {
465
480
  * @memberof RefundsApi
466
481
  */
467
482
  public listRefunds(requestParameters: RefundsApiListRefundsRequest = {}, options?: AxiosRequestConfig) {
468
- return RefundsApiFp(this.configuration).listRefunds(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
483
+ return RefundsApiFp(this.configuration).listRefunds(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
469
484
  }
470
485
  }
@@ -67,8 +67,13 @@ export const TenantBankAccountApiAxiosParamCreator = function (configuration?: C
67
67
  // http bearer authentication required
68
68
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
69
69
 
70
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
71
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
70
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
71
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
72
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
73
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
74
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
75
+ if (authorizationValue || authorizationKeepEmpty) {
76
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
72
77
  }
73
78
 
74
79
 
@@ -115,8 +120,13 @@ export const TenantBankAccountApiAxiosParamCreator = function (configuration?: C
115
120
  // http bearer authentication required
116
121
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
117
122
 
118
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
119
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
123
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
124
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
125
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
126
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
127
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
128
+ if (authorizationValue || authorizationKeepEmpty) {
129
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
120
130
  }
121
131
 
122
132
 
@@ -165,8 +175,13 @@ export const TenantBankAccountApiAxiosParamCreator = function (configuration?: C
165
175
  localVarQueryParameter['expand'] = expand;
166
176
  }
167
177
 
168
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
169
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
178
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
179
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
180
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
181
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
182
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
183
+ if (authorizationValue || authorizationKeepEmpty) {
184
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
170
185
  }
171
186
 
172
187
 
@@ -241,8 +256,13 @@ export const TenantBankAccountApiAxiosParamCreator = function (configuration?: C
241
256
  localVarQueryParameter['filters'] = filters;
242
257
  }
243
258
 
244
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
245
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
259
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
260
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
261
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
262
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
263
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
264
+ if (authorizationValue || authorizationKeepEmpty) {
265
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
246
266
  }
247
267
 
248
268
 
@@ -289,8 +309,13 @@ export const TenantBankAccountApiAxiosParamCreator = function (configuration?: C
289
309
  // http bearer authentication required
290
310
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
291
311
 
292
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
293
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
312
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
313
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
314
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
315
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
316
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
317
+ if (authorizationValue || authorizationKeepEmpty) {
318
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
294
319
  }
295
320
 
296
321
 
@@ -638,7 +663,7 @@ export class TenantBankAccountApi extends BaseAPI {
638
663
  * @memberof TenantBankAccountApi
639
664
  */
640
665
  public createTenantBankAccount(requestParameters: TenantBankAccountApiCreateTenantBankAccountRequest, options?: AxiosRequestConfig) {
641
- return TenantBankAccountApiFp(this.configuration).createTenantBankAccount(requestParameters.createTenantBankAccountRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
666
+ return TenantBankAccountApiFp(this.configuration).createTenantBankAccount(requestParameters.createTenantBankAccountRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
642
667
  }
643
668
 
644
669
  /**
@@ -650,7 +675,7 @@ export class TenantBankAccountApi extends BaseAPI {
650
675
  * @memberof TenantBankAccountApi
651
676
  */
652
677
  public deleteTenantBankAccount(requestParameters: TenantBankAccountApiDeleteTenantBankAccountRequest, options?: AxiosRequestConfig) {
653
- return TenantBankAccountApiFp(this.configuration).deleteTenantBankAccount(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
678
+ return TenantBankAccountApiFp(this.configuration).deleteTenantBankAccount(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
654
679
  }
655
680
 
656
681
  /**
@@ -662,7 +687,7 @@ export class TenantBankAccountApi extends BaseAPI {
662
687
  * @memberof TenantBankAccountApi
663
688
  */
664
689
  public getTenantBankAccount(requestParameters: TenantBankAccountApiGetTenantBankAccountRequest, options?: AxiosRequestConfig) {
665
- return TenantBankAccountApiFp(this.configuration).getTenantBankAccount(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
690
+ return TenantBankAccountApiFp(this.configuration).getTenantBankAccount(requestParameters.code, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
666
691
  }
667
692
 
668
693
  /**
@@ -674,7 +699,7 @@ export class TenantBankAccountApi extends BaseAPI {
674
699
  * @memberof TenantBankAccountApi
675
700
  */
676
701
  public listTenantBankAccounts(requestParameters: TenantBankAccountApiListTenantBankAccountsRequest = {}, options?: AxiosRequestConfig) {
677
- return TenantBankAccountApiFp(this.configuration).listTenantBankAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
702
+ return TenantBankAccountApiFp(this.configuration).listTenantBankAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
678
703
  }
679
704
 
680
705
  /**
@@ -686,6 +711,6 @@ export class TenantBankAccountApi extends BaseAPI {
686
711
  * @memberof TenantBankAccountApi
687
712
  */
688
713
  public updateTenantBankAccount(requestParameters: TenantBankAccountApiUpdateTenantBankAccountRequest, options?: AxiosRequestConfig) {
689
- return TenantBankAccountApiFp(this.configuration).updateTenantBankAccount(requestParameters.code, requestParameters.updateTenantBankAccountRestRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
714
+ return TenantBankAccountApiFp(this.configuration).updateTenantBankAccount(requestParameters.code, requestParameters.updateTenantBankAccountRestRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
690
715
  }
691
716
  }
@@ -276,7 +276,7 @@ export class WebhooksApi extends BaseAPI {
276
276
  * @memberof WebhooksApi
277
277
  */
278
278
  public postWebhook(requestParameters: WebhooksApiPostWebhookRequest, options?: AxiosRequestConfig) {
279
- return WebhooksApiFp(this.configuration).postWebhook(requestParameters.pspType, requestParameters.tenantSlug, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
279
+ return WebhooksApiFp(this.configuration).postWebhook(requestParameters.pspType, requestParameters.tenantSlug, requestParameters.body, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
280
280
  }
281
281
 
282
282
  /**
@@ -288,6 +288,6 @@ export class WebhooksApi extends BaseAPI {
288
288
  * @memberof WebhooksApi
289
289
  */
290
290
  public postWebhookWithProductSlug(requestParameters: WebhooksApiPostWebhookWithProductSlugRequest, options?: AxiosRequestConfig) {
291
- return WebhooksApiFp(this.configuration).postWebhookWithProductSlug(requestParameters.pspType, requestParameters.tenantSlug, requestParameters.productSlug, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
291
+ return WebhooksApiFp(this.configuration).postWebhookWithProductSlug(requestParameters.pspType, requestParameters.tenantSlug, requestParameters.productSlug, requestParameters.body, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
292
292
  }
293
293
  }
package/api.ts CHANGED
@@ -21,6 +21,7 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
21
21
  // @ts-ignore
22
22
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
23
23
  import { BankAccountsApi } from './api';
24
+ import { BankOrderTextsApi } from './api';
24
25
  import { BankOrdersApi } from './api';
25
26
  import { BankTransactionApi } from './api';
26
27
  import { BillingAddressesApi } from './api';
@@ -42,6 +43,7 @@ import { WebhooksApi } from './api';
42
43
 
43
44
 
44
45
  export * from './api/bank-accounts-api';
46
+ export * from './api/bank-order-texts-api';
45
47
  export * from './api/bank-orders-api';
46
48
  export * from './api/bank-transaction-api';
47
49
  export * from './api/billing-addresses-api';