@emilgroup/payment-sdk 1.22.1-beta.8 → 1.22.1-beta.80

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 (119) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/README.md +2 -2
  3. package/api/bank-accounts-api.ts +48 -18
  4. package/api/bank-orders-api.ts +48 -23
  5. package/api/bank-transaction-api.ts +181 -26
  6. package/api/billing-addresses-api.ts +40 -15
  7. package/api/credit-allocation-api.ts +24 -9
  8. package/api/exceeding-credits-api.ts +24 -9
  9. package/api/health-check-api.ts +1 -1
  10. package/api/ibanvalidator-api.ts +8 -3
  11. package/api/payment-methods-api.ts +24 -9
  12. package/api/payment-receipts-api.ts +40 -15
  13. package/api/payment-reminders-api.ts +32 -12
  14. package/api/payment-requests-api.ts +52 -27
  15. package/api/payment-setup-api.ts +16 -6
  16. package/api/payments-api.ts +46 -16
  17. package/api/payout-methods-api.ts +48 -18
  18. package/api/policy-payment-methods-api.ts +24 -9
  19. package/api/refunds-api.ts +24 -9
  20. package/api/tenant-bank-account-api.ts +40 -15
  21. package/api/webhooks-api.ts +2 -2
  22. package/base.ts +239 -43
  23. package/common.ts +3 -2
  24. package/configuration.ts +20 -0
  25. package/dist/api/bank-accounts-api.d.ts +6 -6
  26. package/dist/api/bank-accounts-api.js +82 -46
  27. package/dist/api/bank-orders-api.d.ts +13 -13
  28. package/dist/api/bank-orders-api.js +73 -44
  29. package/dist/api/bank-transaction-api.d.ts +80 -14
  30. package/dist/api/bank-transaction-api.js +194 -52
  31. package/dist/api/billing-addresses-api.d.ts +5 -5
  32. package/dist/api/billing-addresses-api.js +71 -39
  33. package/dist/api/credit-allocation-api.d.ts +3 -3
  34. package/dist/api/credit-allocation-api.js +41 -23
  35. package/dist/api/exceeding-credits-api.d.ts +3 -3
  36. package/dist/api/exceeding-credits-api.js +41 -23
  37. package/dist/api/health-check-api.d.ts +1 -1
  38. package/dist/api/health-check-api.js +1 -1
  39. package/dist/api/ibanvalidator-api.d.ts +1 -1
  40. package/dist/api/ibanvalidator-api.js +15 -8
  41. package/dist/api/payment-methods-api.d.ts +3 -3
  42. package/dist/api/payment-methods-api.js +41 -23
  43. package/dist/api/payment-receipts-api.d.ts +5 -5
  44. package/dist/api/payment-receipts-api.js +67 -38
  45. package/dist/api/payment-reminders-api.d.ts +4 -4
  46. package/dist/api/payment-reminders-api.js +56 -31
  47. package/dist/api/payment-requests-api.d.ts +17 -17
  48. package/dist/api/payment-requests-api.js +76 -47
  49. package/dist/api/payment-setup-api.d.ts +2 -2
  50. package/dist/api/payment-setup-api.js +30 -16
  51. package/dist/api/payments-api.d.ts +4 -4
  52. package/dist/api/payments-api.js +62 -34
  53. package/dist/api/payout-methods-api.d.ts +6 -6
  54. package/dist/api/payout-methods-api.js +82 -46
  55. package/dist/api/policy-payment-methods-api.d.ts +3 -3
  56. package/dist/api/policy-payment-methods-api.js +41 -23
  57. package/dist/api/refunds-api.d.ts +3 -3
  58. package/dist/api/refunds-api.js +37 -22
  59. package/dist/api/tenant-bank-account-api.d.ts +5 -5
  60. package/dist/api/tenant-bank-account-api.js +67 -38
  61. package/dist/api/webhooks-api.d.ts +2 -2
  62. package/dist/api/webhooks-api.js +2 -2
  63. package/dist/base.d.ts +26 -0
  64. package/dist/base.js +243 -60
  65. package/dist/common.d.ts +1 -1
  66. package/dist/common.js +1 -0
  67. package/dist/configuration.d.ts +17 -0
  68. package/dist/configuration.js +2 -0
  69. package/dist/models/bank-order-entity.d.ts +1 -0
  70. package/dist/models/bank-order-entity.js +1 -0
  71. package/dist/models/bank-transaction-class.d.ts +7 -0
  72. package/dist/models/bank-transaction-entity.d.ts +7 -0
  73. package/dist/models/bank-transaction-invoice-entity.d.ts +24 -0
  74. package/dist/models/create-bank-order-request-dto.d.ts +3 -2
  75. package/dist/models/create-bank-order-request-dto.js +1 -0
  76. package/dist/models/create-payment-order-dto.d.ts +1 -1
  77. package/dist/models/create-payment-receipt-request-dto.d.ts +1 -1
  78. package/dist/models/create-payment-request-dto.d.ts +1 -1
  79. package/dist/models/exceeding-credit-entity.d.ts +6 -0
  80. package/dist/models/index.d.ts +4 -0
  81. package/dist/models/index.js +4 -0
  82. package/dist/models/link-bank-transaction-payment-requests-request-dto-rest.d.ts +30 -0
  83. package/dist/models/link-bank-transaction-payment-requests-request-dto-rest.js +15 -0
  84. package/dist/models/link-bank-transaction-payment-requests-response-class.d.ts +25 -0
  85. package/dist/models/link-bank-transaction-payment-requests-response-class.js +15 -0
  86. package/dist/models/payment-class-without-expand-properties.d.ts +1 -1
  87. package/dist/models/payment-class.d.ts +1 -1
  88. package/dist/models/payment-receipt-class.d.ts +13 -1
  89. package/dist/models/payment-receipt-entity.d.ts +139 -0
  90. package/dist/models/payment-receipt-entity.js +20 -0
  91. package/dist/models/payment-request-class.d.ts +19 -0
  92. package/dist/models/payment-request-class.js +1 -0
  93. package/dist/models/payment-request-entity.d.ts +223 -0
  94. package/dist/models/payment-request-entity.js +39 -0
  95. package/dist/models/shared-transaction-class.d.ts +6 -0
  96. package/dist/models/transaction-entity.d.ts +6 -0
  97. package/dist/models/update-bank-order-request-dto.d.ts +2 -2
  98. package/models/bank-order-entity.ts +1 -0
  99. package/models/bank-transaction-class.ts +7 -0
  100. package/models/bank-transaction-entity.ts +7 -0
  101. package/models/bank-transaction-invoice-entity.ts +24 -0
  102. package/models/create-bank-order-request-dto.ts +3 -2
  103. package/models/create-payment-order-dto.ts +1 -1
  104. package/models/create-payment-receipt-request-dto.ts +1 -1
  105. package/models/create-payment-request-dto.ts +1 -1
  106. package/models/exceeding-credit-entity.ts +6 -0
  107. package/models/index.ts +4 -0
  108. package/models/link-bank-transaction-payment-requests-request-dto-rest.ts +36 -0
  109. package/models/link-bank-transaction-payment-requests-response-class.ts +31 -0
  110. package/models/payment-class-without-expand-properties.ts +1 -1
  111. package/models/payment-class.ts +1 -1
  112. package/models/payment-receipt-class.ts +13 -1
  113. package/models/payment-receipt-entity.ts +148 -0
  114. package/models/payment-request-class.ts +19 -0
  115. package/models/payment-request-entity.ts +233 -0
  116. package/models/shared-transaction-class.ts +6 -0
  117. package/models/transaction-entity.ts +6 -0
  118. package/models/update-bank-order-request-dto.ts +2 -2
  119. package/package.json +2 -2
@@ -63,8 +63,13 @@ export const ExceedingCreditsApiAxiosParamCreator = function (configuration?: Co
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
 
@@ -111,8 +116,13 @@ export const ExceedingCreditsApiAxiosParamCreator = function (configuration?: Co
111
116
  // http bearer authentication required
112
117
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
113
118
 
114
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
115
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
119
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
120
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
121
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
122
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
123
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
124
+ if (authorizationValue || authorizationKeepEmpty) {
125
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
116
126
  }
117
127
 
118
128
 
@@ -187,8 +197,13 @@ export const ExceedingCreditsApiAxiosParamCreator = function (configuration?: Co
187
197
  localVarQueryParameter['filters'] = filters;
188
198
  }
189
199
 
190
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
191
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
200
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
201
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
202
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
203
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
204
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
205
+ if (authorizationValue || authorizationKeepEmpty) {
206
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
192
207
  }
193
208
 
194
209
 
@@ -427,7 +442,7 @@ export class ExceedingCreditsApi extends BaseAPI {
427
442
  * @memberof ExceedingCreditsApi
428
443
  */
429
444
  public createExceedingCredit(requestParameters: ExceedingCreditsApiCreateExceedingCreditRequest, options?: AxiosRequestConfig) {
430
- return ExceedingCreditsApiFp(this.configuration).createExceedingCredit(requestParameters.createExceedingCreditRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
445
+ return ExceedingCreditsApiFp(this.configuration).createExceedingCredit(requestParameters.createExceedingCreditRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
431
446
  }
432
447
 
433
448
  /**
@@ -439,7 +454,7 @@ export class ExceedingCreditsApi extends BaseAPI {
439
454
  * @memberof ExceedingCreditsApi
440
455
  */
441
456
  public getExceedingCredit(requestParameters: ExceedingCreditsApiGetExceedingCreditRequest, options?: AxiosRequestConfig) {
442
- return ExceedingCreditsApiFp(this.configuration).getExceedingCredit(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
457
+ return ExceedingCreditsApiFp(this.configuration).getExceedingCredit(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
443
458
  }
444
459
 
445
460
  /**
@@ -451,6 +466,6 @@ export class ExceedingCreditsApi extends BaseAPI {
451
466
  * @memberof ExceedingCreditsApi
452
467
  */
453
468
  public listExceedingCredits(requestParameters: ExceedingCreditsApiListExceedingCreditsRequest = {}, options?: AxiosRequestConfig) {
454
- return ExceedingCreditsApiFp(this.configuration).listExceedingCredits(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
469
+ return ExceedingCreditsApiFp(this.configuration).listExceedingCredits(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));
455
470
  }
456
471
  }
@@ -119,6 +119,6 @@ export class HealthCheckApi extends BaseAPI {
119
119
  * @memberof HealthCheckApi
120
120
  */
121
121
  public check(options?: AxiosRequestConfig) {
122
- return HealthCheckApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
122
+ return HealthCheckApiFp(this.configuration).check(this.withOwner(options)).then((request) => request(this.axios, this.basePath));
123
123
  }
124
124
  }
@@ -59,8 +59,13 @@ export const IBANValidatorApiAxiosParamCreator = function (configuration?: Confi
59
59
  // http bearer authentication required
60
60
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
61
61
 
62
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
63
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
62
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
63
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
64
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
65
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
66
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
67
+ if (authorizationValue || authorizationKeepEmpty) {
68
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
64
69
  }
65
70
 
66
71
 
@@ -160,6 +165,6 @@ export class IBANValidatorApi extends BaseAPI {
160
165
  * @memberof IBANValidatorApi
161
166
  */
162
167
  public validateIban(requestParameters: IBANValidatorApiValidateIbanRequest, options?: AxiosRequestConfig) {
163
- return IBANValidatorApiFp(this.configuration).validateIban(requestParameters.validateIbanRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
168
+ return IBANValidatorApiFp(this.configuration).validateIban(requestParameters.validateIbanRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
164
169
  }
165
170
  }
@@ -63,8 +63,13 @@ export const PaymentMethodsApiAxiosParamCreator = function (configuration?: Conf
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
 
@@ -111,8 +116,13 @@ export const PaymentMethodsApiAxiosParamCreator = function (configuration?: Conf
111
116
  // http bearer authentication required
112
117
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
113
118
 
114
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
115
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
119
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
120
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
121
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
122
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
123
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
124
+ if (authorizationValue || authorizationKeepEmpty) {
125
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
116
126
  }
117
127
 
118
128
 
@@ -187,8 +197,13 @@ export const PaymentMethodsApiAxiosParamCreator = function (configuration?: Conf
187
197
  localVarQueryParameter['filters'] = filters;
188
198
  }
189
199
 
190
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
191
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
200
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
201
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
202
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
203
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
204
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
205
+ if (authorizationValue || authorizationKeepEmpty) {
206
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
192
207
  }
193
208
 
194
209
 
@@ -427,7 +442,7 @@ export class PaymentMethodsApi extends BaseAPI {
427
442
  * @memberof PaymentMethodsApi
428
443
  */
429
444
  public createPaymentMethod(requestParameters: PaymentMethodsApiCreatePaymentMethodRequest, options?: AxiosRequestConfig) {
430
- return PaymentMethodsApiFp(this.configuration).createPaymentMethod(requestParameters.createPspPaymentMethodRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
445
+ return PaymentMethodsApiFp(this.configuration).createPaymentMethod(requestParameters.createPspPaymentMethodRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
431
446
  }
432
447
 
433
448
  /**
@@ -439,7 +454,7 @@ export class PaymentMethodsApi extends BaseAPI {
439
454
  * @memberof PaymentMethodsApi
440
455
  */
441
456
  public getPaymentMethod(requestParameters: PaymentMethodsApiGetPaymentMethodRequest, options?: AxiosRequestConfig) {
442
- return PaymentMethodsApiFp(this.configuration).getPaymentMethod(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
457
+ return PaymentMethodsApiFp(this.configuration).getPaymentMethod(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
443
458
  }
444
459
 
445
460
  /**
@@ -451,6 +466,6 @@ export class PaymentMethodsApi extends BaseAPI {
451
466
  * @memberof PaymentMethodsApi
452
467
  */
453
468
  public listPaymentMethods(requestParameters: PaymentMethodsApiListPaymentMethodsRequest = {}, options?: AxiosRequestConfig) {
454
- return PaymentMethodsApiFp(this.configuration).listPaymentMethods(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
469
+ return PaymentMethodsApiFp(this.configuration).listPaymentMethods(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));
455
470
  }
456
471
  }
@@ -65,8 +65,13 @@ export const PaymentReceiptsApiAxiosParamCreator = function (configuration?: Con
65
65
  // http bearer authentication required
66
66
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
67
67
 
68
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
69
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
68
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
69
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
70
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
71
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
72
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
73
+ if (authorizationValue || authorizationKeepEmpty) {
74
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
70
75
  }
71
76
 
72
77
 
@@ -113,8 +118,13 @@ export const PaymentReceiptsApiAxiosParamCreator = function (configuration?: Con
113
118
  // http bearer authentication required
114
119
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
115
120
 
116
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
117
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
121
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
122
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
123
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
124
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
125
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
126
+ if (authorizationValue || authorizationKeepEmpty) {
127
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
118
128
  }
119
129
 
120
130
 
@@ -165,8 +175,13 @@ export const PaymentReceiptsApiAxiosParamCreator = function (configuration?: Con
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 PaymentReceiptsApiAxiosParamCreator = function (configuration?: Con
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
 
@@ -286,8 +306,13 @@ export const PaymentReceiptsApiAxiosParamCreator = function (configuration?: Con
286
306
  // http bearer authentication required
287
307
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
288
308
 
289
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
290
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
309
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
310
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
311
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
312
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
313
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
314
+ if (authorizationValue || authorizationKeepEmpty) {
315
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
291
316
  }
292
317
 
293
318
 
@@ -623,7 +648,7 @@ export class PaymentReceiptsApi extends BaseAPI {
623
648
  * @memberof PaymentReceiptsApi
624
649
  */
625
650
  public createPaymentReceipt(requestParameters: PaymentReceiptsApiCreatePaymentReceiptRequest, options?: AxiosRequestConfig) {
626
- return PaymentReceiptsApiFp(this.configuration).createPaymentReceipt(requestParameters.createPaymentReceiptRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
651
+ return PaymentReceiptsApiFp(this.configuration).createPaymentReceipt(requestParameters.createPaymentReceiptRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
627
652
  }
628
653
 
629
654
  /**
@@ -635,7 +660,7 @@ export class PaymentReceiptsApi extends BaseAPI {
635
660
  * @memberof PaymentReceiptsApi
636
661
  */
637
662
  public deletePaymentReceipt(requestParameters: PaymentReceiptsApiDeletePaymentReceiptRequest, options?: AxiosRequestConfig) {
638
- return PaymentReceiptsApiFp(this.configuration).deletePaymentReceipt(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
663
+ return PaymentReceiptsApiFp(this.configuration).deletePaymentReceipt(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
639
664
  }
640
665
 
641
666
  /**
@@ -647,7 +672,7 @@ export class PaymentReceiptsApi extends BaseAPI {
647
672
  * @memberof PaymentReceiptsApi
648
673
  */
649
674
  public getPaymentReceipt(requestParameters: PaymentReceiptsApiGetPaymentReceiptRequest, options?: AxiosRequestConfig) {
650
- return PaymentReceiptsApiFp(this.configuration).getPaymentReceipt(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
675
+ return PaymentReceiptsApiFp(this.configuration).getPaymentReceipt(requestParameters.code, requestParameters.expand, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
651
676
  }
652
677
 
653
678
  /**
@@ -659,7 +684,7 @@ export class PaymentReceiptsApi extends BaseAPI {
659
684
  * @memberof PaymentReceiptsApi
660
685
  */
661
686
  public listPaymentReceipts(requestParameters: PaymentReceiptsApiListPaymentReceiptsRequest = {}, options?: AxiosRequestConfig) {
662
- return PaymentReceiptsApiFp(this.configuration).listPaymentReceipts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
687
+ return PaymentReceiptsApiFp(this.configuration).listPaymentReceipts(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));
663
688
  }
664
689
 
665
690
  /**
@@ -671,6 +696,6 @@ export class PaymentReceiptsApi extends BaseAPI {
671
696
  * @memberof PaymentReceiptsApi
672
697
  */
673
698
  public updatePaymentReceipt(requestParameters: PaymentReceiptsApiUpdatePaymentReceiptRequest, options?: AxiosRequestConfig) {
674
- return PaymentReceiptsApiFp(this.configuration).updatePaymentReceipt(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
699
+ return PaymentReceiptsApiFp(this.configuration).updatePaymentReceipt(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
675
700
  }
676
701
  }
@@ -67,8 +67,13 @@ export const PaymentRemindersApiAxiosParamCreator = function (configuration?: Co
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
 
@@ -118,8 +123,13 @@ export const PaymentRemindersApiAxiosParamCreator = function (configuration?: Co
118
123
  // http bearer authentication required
119
124
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
120
125
 
121
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
122
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
126
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
127
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
128
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
129
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
130
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
131
+ if (authorizationValue || authorizationKeepEmpty) {
132
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
123
133
  }
124
134
 
125
135
 
@@ -166,8 +176,13 @@ export const PaymentRemindersApiAxiosParamCreator = function (configuration?: Co
166
176
  // http bearer authentication required
167
177
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
168
178
 
169
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
170
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
179
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
180
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
181
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
182
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
183
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
184
+ if (authorizationValue || authorizationKeepEmpty) {
185
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
171
186
  }
172
187
 
173
188
 
@@ -242,8 +257,13 @@ export const PaymentRemindersApiAxiosParamCreator = function (configuration?: Co
242
257
  localVarQueryParameter['filters'] = filters;
243
258
  }
244
259
 
245
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
246
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
260
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
261
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
262
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
263
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
264
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
265
+ if (authorizationValue || authorizationKeepEmpty) {
266
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
247
267
  }
248
268
 
249
269
 
@@ -535,7 +555,7 @@ export class PaymentRemindersApi extends BaseAPI {
535
555
  * @memberof PaymentRemindersApi
536
556
  */
537
557
  public createPaymentReminder(requestParameters: PaymentRemindersApiCreatePaymentReminderRequest, options?: AxiosRequestConfig) {
538
- return PaymentRemindersApiFp(this.configuration).createPaymentReminder(requestParameters.createPaymentReminderRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
558
+ return PaymentRemindersApiFp(this.configuration).createPaymentReminder(requestParameters.createPaymentReminderRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
539
559
  }
540
560
 
541
561
  /**
@@ -547,7 +567,7 @@ export class PaymentRemindersApi extends BaseAPI {
547
567
  * @memberof PaymentRemindersApi
548
568
  */
549
569
  public deactivatePaymentReminder(requestParameters: PaymentRemindersApiDeactivatePaymentReminderRequest, options?: AxiosRequestConfig) {
550
- return PaymentRemindersApiFp(this.configuration).deactivatePaymentReminder(requestParameters.code, requestParameters.deactivatePaymentReminderRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
570
+ return PaymentRemindersApiFp(this.configuration).deactivatePaymentReminder(requestParameters.code, requestParameters.deactivatePaymentReminderRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
551
571
  }
552
572
 
553
573
  /**
@@ -559,7 +579,7 @@ export class PaymentRemindersApi extends BaseAPI {
559
579
  * @memberof PaymentRemindersApi
560
580
  */
561
581
  public getPaymentReminder(requestParameters: PaymentRemindersApiGetPaymentReminderRequest, options?: AxiosRequestConfig) {
562
- return PaymentRemindersApiFp(this.configuration).getPaymentReminder(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
582
+ return PaymentRemindersApiFp(this.configuration).getPaymentReminder(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
563
583
  }
564
584
 
565
585
  /**
@@ -571,6 +591,6 @@ export class PaymentRemindersApi extends BaseAPI {
571
591
  * @memberof PaymentRemindersApi
572
592
  */
573
593
  public listPaymentReminders(requestParameters: PaymentRemindersApiListPaymentRemindersRequest = {}, options?: AxiosRequestConfig) {
574
- return PaymentRemindersApiFp(this.configuration).listPaymentReminders(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
594
+ return PaymentRemindersApiFp(this.configuration).listPaymentReminders(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));
575
595
  }
576
596
  }