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

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 (147) hide show
  1. package/.openapi-generator/FILES +0 -8
  2. package/README.md +2 -2
  3. package/api/bank-accounts-api.ts +18 -48
  4. package/api/bank-orders-api.ts +15 -40
  5. package/api/bank-transaction-api.ts +26 -181
  6. package/api/billing-addresses-api.ts +15 -40
  7. package/api/credit-allocation-api.ts +9 -24
  8. package/api/exceeding-credits-api.ts +6 -240
  9. package/api/health-check-api.ts +1 -1
  10. package/api/ibanvalidator-api.ts +3 -8
  11. package/api/payment-methods-api.ts +9 -24
  12. package/api/payment-receipts-api.ts +15 -40
  13. package/api/payment-reminders-api.ts +12 -32
  14. package/api/payment-requests-api.ts +27 -52
  15. package/api/payment-setup-api.ts +6 -16
  16. package/api/payments-api.ts +16 -46
  17. package/api/payout-methods-api.ts +18 -48
  18. package/api/policy-payment-methods-api.ts +9 -24
  19. package/api/refunds-api.ts +9 -24
  20. package/api/tenant-bank-account-api.ts +15 -40
  21. package/api/webhooks-api.ts +2 -2
  22. package/base.ts +43 -239
  23. package/common.ts +2 -3
  24. package/configuration.ts +0 -20
  25. package/dist/api/bank-accounts-api.d.ts +6 -6
  26. package/dist/api/bank-accounts-api.js +46 -82
  27. package/dist/api/bank-orders-api.d.ts +5 -5
  28. package/dist/api/bank-orders-api.js +38 -67
  29. package/dist/api/bank-transaction-api.d.ts +14 -80
  30. package/dist/api/bank-transaction-api.js +52 -194
  31. package/dist/api/billing-addresses-api.d.ts +5 -5
  32. package/dist/api/billing-addresses-api.js +39 -71
  33. package/dist/api/credit-allocation-api.d.ts +3 -3
  34. package/dist/api/credit-allocation-api.js +23 -41
  35. package/dist/api/exceeding-credits-api.d.ts +2 -116
  36. package/dist/api/exceeding-credits-api.js +15 -226
  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 +8 -15
  41. package/dist/api/payment-methods-api.d.ts +3 -3
  42. package/dist/api/payment-methods-api.js +23 -41
  43. package/dist/api/payment-receipts-api.d.ts +5 -5
  44. package/dist/api/payment-receipts-api.js +38 -67
  45. package/dist/api/payment-reminders-api.d.ts +4 -4
  46. package/dist/api/payment-reminders-api.js +31 -56
  47. package/dist/api/payment-requests-api.d.ts +17 -17
  48. package/dist/api/payment-requests-api.js +47 -76
  49. package/dist/api/payment-setup-api.d.ts +2 -2
  50. package/dist/api/payment-setup-api.js +16 -30
  51. package/dist/api/payments-api.d.ts +4 -4
  52. package/dist/api/payments-api.js +34 -62
  53. package/dist/api/payout-methods-api.d.ts +6 -6
  54. package/dist/api/payout-methods-api.js +46 -82
  55. package/dist/api/policy-payment-methods-api.d.ts +3 -3
  56. package/dist/api/policy-payment-methods-api.js +23 -41
  57. package/dist/api/refunds-api.d.ts +3 -3
  58. package/dist/api/refunds-api.js +22 -37
  59. package/dist/api/tenant-bank-account-api.d.ts +5 -5
  60. package/dist/api/tenant-bank-account-api.js +38 -67
  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 +0 -26
  64. package/dist/base.js +60 -243
  65. package/dist/common.d.ts +1 -1
  66. package/dist/common.js +0 -1
  67. package/dist/configuration.d.ts +0 -17
  68. package/dist/configuration.js +0 -2
  69. package/dist/models/bank-transaction-class.d.ts +0 -7
  70. package/dist/models/bank-transaction-entity.d.ts +0 -7
  71. package/dist/models/bank-transaction-invoice-entity.d.ts +0 -24
  72. package/dist/models/create-payment-order-dto.d.ts +1 -1
  73. package/dist/models/create-payment-receipt-request-dto.d.ts +3 -3
  74. package/dist/models/create-payment-request-dto.d.ts +1 -1
  75. package/dist/models/create-payment-request-request-dto.d.ts +0 -6
  76. package/dist/models/credit-allocation-class.d.ts +0 -6
  77. package/dist/models/credit-allocation-entity.d.ts +0 -6
  78. package/dist/models/exceeding-credit-class.d.ts +2 -25
  79. package/dist/models/exceeding-credit-class.js +1 -5
  80. package/dist/models/exceeding-credit-entity.d.ts +2 -31
  81. package/dist/models/exceeding-credit-entity.js +1 -5
  82. package/dist/models/index.d.ts +0 -8
  83. package/dist/models/index.js +0 -8
  84. package/dist/models/list-billing-addresses-response-class.d.ts +9 -9
  85. package/dist/models/list-exceeding-credits-response-class.d.ts +18 -6
  86. package/dist/models/list-payment-receipts-response-class.d.ts +9 -9
  87. package/dist/models/list-payment-requests-response-class.d.ts +18 -6
  88. package/dist/models/list-payout-methods-response-class.d.ts +9 -9
  89. package/dist/models/list-refunds-response-class.d.ts +18 -6
  90. package/dist/models/payment-class-without-expand-properties.d.ts +2 -2
  91. package/dist/models/payment-class.d.ts +2 -2
  92. package/dist/models/payment-entity.d.ts +1 -1
  93. package/dist/models/payment-receipt-class.d.ts +1 -13
  94. package/dist/models/payment-request-class.d.ts +6 -13
  95. package/dist/models/payment-request-class.js +0 -1
  96. package/dist/models/shared-transaction-class.d.ts +0 -6
  97. package/dist/models/transaction-entity.d.ts +0 -6
  98. package/models/bank-transaction-class.ts +0 -7
  99. package/models/bank-transaction-entity.ts +0 -7
  100. package/models/bank-transaction-invoice-entity.ts +0 -24
  101. package/models/create-payment-order-dto.ts +1 -1
  102. package/models/create-payment-receipt-request-dto.ts +3 -3
  103. package/models/create-payment-request-dto.ts +1 -1
  104. package/models/create-payment-request-request-dto.ts +0 -6
  105. package/models/credit-allocation-class.ts +0 -6
  106. package/models/credit-allocation-entity.ts +0 -6
  107. package/models/exceeding-credit-class.ts +2 -26
  108. package/models/exceeding-credit-entity.ts +2 -32
  109. package/models/index.ts +0 -8
  110. package/models/list-billing-addresses-response-class.ts +9 -9
  111. package/models/list-exceeding-credits-response-class.ts +18 -6
  112. package/models/list-payment-receipts-response-class.ts +9 -9
  113. package/models/list-payment-requests-response-class.ts +18 -6
  114. package/models/list-payout-methods-response-class.ts +9 -9
  115. package/models/list-refunds-response-class.ts +18 -6
  116. package/models/payment-class-without-expand-properties.ts +2 -2
  117. package/models/payment-class.ts +2 -2
  118. package/models/payment-entity.ts +1 -1
  119. package/models/payment-receipt-class.ts +1 -13
  120. package/models/payment-request-class.ts +6 -13
  121. package/models/shared-transaction-class.ts +0 -6
  122. package/models/transaction-entity.ts +0 -6
  123. package/package.json +2 -2
  124. package/dist/models/create-exceeding-credit-request-dto.d.ts +0 -48
  125. package/dist/models/create-exceeding-credit-request-dto.js +0 -15
  126. package/dist/models/create-exceeding-credit-response-class.d.ts +0 -25
  127. package/dist/models/create-exceeding-credit-response-class.js +0 -15
  128. package/dist/models/create-return-premium-credits-request-dto.d.ts +0 -24
  129. package/dist/models/create-return-premium-credits-request-dto.js +0 -15
  130. package/dist/models/create-return-premium-credits-response-class.d.ts +0 -25
  131. package/dist/models/create-return-premium-credits-response-class.js +0 -15
  132. package/dist/models/link-bank-transaction-payment-requests-request-dto-rest.d.ts +0 -30
  133. package/dist/models/link-bank-transaction-payment-requests-request-dto-rest.js +0 -15
  134. package/dist/models/link-bank-transaction-payment-requests-response-class.d.ts +0 -25
  135. package/dist/models/link-bank-transaction-payment-requests-response-class.js +0 -15
  136. package/dist/models/payment-receipt-entity.d.ts +0 -139
  137. package/dist/models/payment-receipt-entity.js +0 -20
  138. package/dist/models/payment-request-entity.d.ts +0 -223
  139. package/dist/models/payment-request-entity.js +0 -39
  140. package/models/create-exceeding-credit-request-dto.ts +0 -54
  141. package/models/create-exceeding-credit-response-class.ts +0 -31
  142. package/models/create-return-premium-credits-request-dto.ts +0 -30
  143. package/models/create-return-premium-credits-response-class.ts +0 -31
  144. package/models/link-bank-transaction-payment-requests-request-dto-rest.ts +0 -36
  145. package/models/link-bank-transaction-payment-requests-response-class.ts +0 -31
  146. package/models/payment-receipt-entity.ts +0 -148
  147. package/models/payment-request-entity.ts +0 -233
@@ -27,10 +27,6 @@ import { GetBankTransactionsResponseClass } from '../models';
27
27
  // @ts-ignore
28
28
  import { ImportBankTransactionsResponseClass } from '../models';
29
29
  // @ts-ignore
30
- import { LinkBankTransactionPaymentRequestsRequestDtoRest } from '../models';
31
- // @ts-ignore
32
- import { LinkBankTransactionPaymentRequestsResponseClass } from '../models';
33
- // @ts-ignore
34
30
  import { LinkBankTransactionRequestDtoRest } from '../models';
35
31
  // @ts-ignore
36
32
  import { LinkBankTransactionsResponseClass } from '../models';
@@ -74,13 +70,8 @@ export const BankTransactionApiAxiosParamCreator = function (configuration?: Con
74
70
  // http bearer authentication required
75
71
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
76
72
 
77
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
78
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
79
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
80
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
81
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
82
- if (authorizationValue || authorizationKeepEmpty) {
83
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
73
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
74
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
84
75
  }
85
76
 
86
77
 
@@ -99,7 +90,7 @@ export const BankTransactionApiAxiosParamCreator = function (configuration?: Con
99
90
  * @summary Retrieve the bank transaction
100
91
  * @param {string} code
101
92
  * @param {string} [authorization] Bearer Token
102
- * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices, paymentReceipts<i>
93
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices<i>
103
94
  * @param {*} [options] Override http request option.
104
95
  * @throws {RequiredError}
105
96
  */
@@ -129,13 +120,8 @@ export const BankTransactionApiAxiosParamCreator = function (configuration?: Con
129
120
  localVarQueryParameter['expand'] = expand;
130
121
  }
131
122
 
132
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
133
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
134
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
135
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
136
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
137
- if (authorizationValue || authorizationKeepEmpty) {
138
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
123
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
124
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
139
125
  }
140
126
 
141
127
 
@@ -179,13 +165,8 @@ export const BankTransactionApiAxiosParamCreator = function (configuration?: Con
179
165
  // http bearer authentication required
180
166
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
181
167
 
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
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
185
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
186
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
187
- if (authorizationValue || authorizationKeepEmpty) {
188
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
168
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
169
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
189
170
  }
190
171
 
191
172
 
@@ -239,13 +220,8 @@ export const BankTransactionApiAxiosParamCreator = function (configuration?: Con
239
220
  // http bearer authentication required
240
221
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
241
222
 
242
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
243
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
244
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
245
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
246
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
247
- if (authorizationValue || authorizationKeepEmpty) {
248
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
223
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
224
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
249
225
  }
250
226
 
251
227
 
@@ -262,62 +238,6 @@ export const BankTransactionApiAxiosParamCreator = function (configuration?: Con
262
238
  options: localVarRequestOptions,
263
239
  };
264
240
  },
265
- /**
266
- * Links an outgoing bank transaction to the payout payment requests it paid. In one database transaction it creates one payment receipt per request for the full request amount, which marks each request paid, closes every bank order of the requests that has no open request left, and marks the transaction linked. The requests must be open payouts (claim regulations, refund allocations or commission settlements) in the transaction currency that hold no received money (no receipts, or receipts that net to zero because the money came back in a collect receipt), and their amounts must add up to the transaction amount. A request in a bank order must be in a payout order past draft that pays from the tenant bank account of the transaction. A bank order given by its code is linked with every open payment request it holds in the transaction currency at the time of the link; it must be such an order, not closed, with at least one. **Required Permissions** \"payment-management.bank-accounts.create\", \"payment-management.payments.create\", \"payment-management.bank-orders.update\"
267
- * @summary Link bank transaction to payment requests
268
- * @param {string} code Code of the outgoing bank transaction to link
269
- * @param {LinkBankTransactionPaymentRequestsRequestDtoRest} linkBankTransactionPaymentRequestsRequestDtoRest
270
- * @param {string} [authorization] Bearer Token
271
- * @param {*} [options] Override http request option.
272
- * @throws {RequiredError}
273
- */
274
- linkBankTransactionPaymentRequests: async (code: string, linkBankTransactionPaymentRequestsRequestDtoRest: LinkBankTransactionPaymentRequestsRequestDtoRest, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
275
- // verify required parameter 'code' is not null or undefined
276
- assertParamExists('linkBankTransactionPaymentRequests', 'code', code)
277
- // verify required parameter 'linkBankTransactionPaymentRequestsRequestDtoRest' is not null or undefined
278
- assertParamExists('linkBankTransactionPaymentRequests', 'linkBankTransactionPaymentRequestsRequestDtoRest', linkBankTransactionPaymentRequestsRequestDtoRest)
279
- const localVarPath = `/paymentservice/v1/tenant/bank-transactions/{code}/link-payment-requests`
280
- .replace(`{${"code"}}`, encodeURIComponent(String(code)));
281
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
282
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
283
- let baseOptions;
284
- let baseAccessToken;
285
- if (configuration) {
286
- baseOptions = configuration.baseOptions;
287
- baseAccessToken = configuration.accessToken;
288
- }
289
-
290
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
291
- const localVarHeaderParameter = {} as any;
292
- const localVarQueryParameter = {} as any;
293
-
294
- // authentication bearer required
295
- // http bearer authentication required
296
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
297
-
298
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
299
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
300
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
301
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
302
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
303
- if (authorizationValue || authorizationKeepEmpty) {
304
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
305
- }
306
-
307
-
308
-
309
- localVarHeaderParameter['Content-Type'] = 'application/json';
310
-
311
- setSearchParams(localVarUrlObj, localVarQueryParameter);
312
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
313
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
314
- localVarRequestOptions.data = serializeDataIfNeeded(linkBankTransactionPaymentRequestsRequestDtoRest, localVarRequestOptions, configuration)
315
-
316
- return {
317
- url: toPathString(localVarUrlObj),
318
- options: localVarRequestOptions,
319
- };
320
- },
321
241
  /**
322
242
  * Returns a list of bank transactions you have previously created. The bank transactions are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"payment-management.bank-accounts.view\"
323
243
  * @summary List bank transactions
@@ -327,7 +247,7 @@ export const BankTransactionApiAxiosParamCreator = function (configuration?: Con
327
247
  * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, bankAccountId, bankAccountNumber, messageReference, amount, currency, transactionReference, transactionDate, entryDate, isLinked&lt;/i&gt;
328
248
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: id, createdAt, amount&lt;/i&gt;
329
249
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt, transactionDate, entryDate&lt;/i&gt;
330
- * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices, paymentReceipts&lt;i&gt;
250
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices&lt;i&gt;
331
251
  * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, bankAccountId, bankAccountNumber, messageReference, amount, currency, transactionReference, transactionDate, entryDate, isLinked&lt;/i&gt;
332
252
  * @param {*} [options] Override http request option.
333
253
  * @throws {RequiredError}
@@ -379,13 +299,8 @@ export const BankTransactionApiAxiosParamCreator = function (configuration?: Con
379
299
  localVarQueryParameter['filters'] = filters;
380
300
  }
381
301
 
382
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
383
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
384
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
385
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
386
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
387
- if (authorizationValue || authorizationKeepEmpty) {
388
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
302
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
303
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
389
304
  }
390
305
 
391
306
 
@@ -429,13 +344,8 @@ export const BankTransactionApiAxiosParamCreator = function (configuration?: Con
429
344
  // http bearer authentication required
430
345
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
431
346
 
432
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
433
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
434
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
435
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
436
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
437
- if (authorizationValue || authorizationKeepEmpty) {
438
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
347
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
348
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
439
349
  }
440
350
 
441
351
 
@@ -476,7 +386,7 @@ export const BankTransactionApiFp = function(configuration?: Configuration) {
476
386
  * @summary Retrieve the bank transaction
477
387
  * @param {string} code
478
388
  * @param {string} [authorization] Bearer Token
479
- * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices, paymentReceipts&lt;i&gt;
389
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices&lt;i&gt;
480
390
  * @param {*} [options] Override http request option.
481
391
  * @throws {RequiredError}
482
392
  */
@@ -509,19 +419,6 @@ export const BankTransactionApiFp = function(configuration?: Configuration) {
509
419
  const localVarAxiosArgs = await localVarAxiosParamCreator.linkBankTransaction(code, linkBankTransactionRequestDtoRest, authorization, options);
510
420
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
511
421
  },
512
- /**
513
- * Links an outgoing bank transaction to the payout payment requests it paid. In one database transaction it creates one payment receipt per request for the full request amount, which marks each request paid, closes every bank order of the requests that has no open request left, and marks the transaction linked. The requests must be open payouts (claim regulations, refund allocations or commission settlements) in the transaction currency that hold no received money (no receipts, or receipts that net to zero because the money came back in a collect receipt), and their amounts must add up to the transaction amount. A request in a bank order must be in a payout order past draft that pays from the tenant bank account of the transaction. A bank order given by its code is linked with every open payment request it holds in the transaction currency at the time of the link; it must be such an order, not closed, with at least one. **Required Permissions** \"payment-management.bank-accounts.create\", \"payment-management.payments.create\", \"payment-management.bank-orders.update\"
514
- * @summary Link bank transaction to payment requests
515
- * @param {string} code Code of the outgoing bank transaction to link
516
- * @param {LinkBankTransactionPaymentRequestsRequestDtoRest} linkBankTransactionPaymentRequestsRequestDtoRest
517
- * @param {string} [authorization] Bearer Token
518
- * @param {*} [options] Override http request option.
519
- * @throws {RequiredError}
520
- */
521
- async linkBankTransactionPaymentRequests(code: string, linkBankTransactionPaymentRequestsRequestDtoRest: LinkBankTransactionPaymentRequestsRequestDtoRest, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LinkBankTransactionPaymentRequestsResponseClass>> {
522
- const localVarAxiosArgs = await localVarAxiosParamCreator.linkBankTransactionPaymentRequests(code, linkBankTransactionPaymentRequestsRequestDtoRest, authorization, options);
523
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
524
- },
525
422
  /**
526
423
  * Returns a list of bank transactions you have previously created. The bank transactions are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"payment-management.bank-accounts.view\"
527
424
  * @summary List bank transactions
@@ -531,7 +428,7 @@ export const BankTransactionApiFp = function(configuration?: Configuration) {
531
428
  * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, bankAccountId, bankAccountNumber, messageReference, amount, currency, transactionReference, transactionDate, entryDate, isLinked&lt;/i&gt;
532
429
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: id, createdAt, amount&lt;/i&gt;
533
430
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt, transactionDate, entryDate&lt;/i&gt;
534
- * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices, paymentReceipts&lt;i&gt;
431
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices&lt;i&gt;
535
432
  * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, bankAccountId, bankAccountNumber, messageReference, amount, currency, transactionReference, transactionDate, entryDate, isLinked&lt;/i&gt;
536
433
  * @param {*} [options] Override http request option.
537
434
  * @throws {RequiredError}
@@ -578,7 +475,7 @@ export const BankTransactionApiFactory = function (configuration?: Configuration
578
475
  * @summary Retrieve the bank transaction
579
476
  * @param {string} code
580
477
  * @param {string} [authorization] Bearer Token
581
- * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices, paymentReceipts&lt;i&gt;
478
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices&lt;i&gt;
582
479
  * @param {*} [options] Override http request option.
583
480
  * @throws {RequiredError}
584
481
  */
@@ -608,18 +505,6 @@ export const BankTransactionApiFactory = function (configuration?: Configuration
608
505
  linkBankTransaction(code: string, linkBankTransactionRequestDtoRest: LinkBankTransactionRequestDtoRest, authorization?: string, options?: any): AxiosPromise<LinkBankTransactionsResponseClass> {
609
506
  return localVarFp.linkBankTransaction(code, linkBankTransactionRequestDtoRest, authorization, options).then((request) => request(axios, basePath));
610
507
  },
611
- /**
612
- * Links an outgoing bank transaction to the payout payment requests it paid. In one database transaction it creates one payment receipt per request for the full request amount, which marks each request paid, closes every bank order of the requests that has no open request left, and marks the transaction linked. The requests must be open payouts (claim regulations, refund allocations or commission settlements) in the transaction currency that hold no received money (no receipts, or receipts that net to zero because the money came back in a collect receipt), and their amounts must add up to the transaction amount. A request in a bank order must be in a payout order past draft that pays from the tenant bank account of the transaction. A bank order given by its code is linked with every open payment request it holds in the transaction currency at the time of the link; it must be such an order, not closed, with at least one. **Required Permissions** \"payment-management.bank-accounts.create\", \"payment-management.payments.create\", \"payment-management.bank-orders.update\"
613
- * @summary Link bank transaction to payment requests
614
- * @param {string} code Code of the outgoing bank transaction to link
615
- * @param {LinkBankTransactionPaymentRequestsRequestDtoRest} linkBankTransactionPaymentRequestsRequestDtoRest
616
- * @param {string} [authorization] Bearer Token
617
- * @param {*} [options] Override http request option.
618
- * @throws {RequiredError}
619
- */
620
- linkBankTransactionPaymentRequests(code: string, linkBankTransactionPaymentRequestsRequestDtoRest: LinkBankTransactionPaymentRequestsRequestDtoRest, authorization?: string, options?: any): AxiosPromise<LinkBankTransactionPaymentRequestsResponseClass> {
621
- return localVarFp.linkBankTransactionPaymentRequests(code, linkBankTransactionPaymentRequestsRequestDtoRest, authorization, options).then((request) => request(axios, basePath));
622
- },
623
508
  /**
624
509
  * Returns a list of bank transactions you have previously created. The bank transactions are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"payment-management.bank-accounts.view\"
625
510
  * @summary List bank transactions
@@ -629,7 +514,7 @@ export const BankTransactionApiFactory = function (configuration?: Configuration
629
514
  * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, bankAccountId, bankAccountNumber, messageReference, amount, currency, transactionReference, transactionDate, entryDate, isLinked&lt;/i&gt;
630
515
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: id, createdAt, amount&lt;/i&gt;
631
516
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt, transactionDate, entryDate&lt;/i&gt;
632
- * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices, paymentReceipts&lt;i&gt;
517
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices&lt;i&gt;
633
518
  * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, bankAccountId, bankAccountNumber, messageReference, amount, currency, transactionReference, transactionDate, entryDate, isLinked&lt;/i&gt;
634
519
  * @param {*} [options] Override http request option.
635
520
  * @throws {RequiredError}
@@ -693,7 +578,7 @@ export interface BankTransactionApiGetBankTransactionRequest {
693
578
  readonly authorization?: string
694
579
 
695
580
  /**
696
- * Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices, paymentReceipts&lt;i&gt;
581
+ * Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices&lt;i&gt;
697
582
  * @type {string}
698
583
  * @memberof BankTransactionApiGetBankTransaction
699
584
  */
@@ -749,34 +634,6 @@ export interface BankTransactionApiLinkBankTransactionRequest {
749
634
  readonly authorization?: string
750
635
  }
751
636
 
752
- /**
753
- * Request parameters for linkBankTransactionPaymentRequests operation in BankTransactionApi.
754
- * @export
755
- * @interface BankTransactionApiLinkBankTransactionPaymentRequestsRequest
756
- */
757
- export interface BankTransactionApiLinkBankTransactionPaymentRequestsRequest {
758
- /**
759
- * Code of the outgoing bank transaction to link
760
- * @type {string}
761
- * @memberof BankTransactionApiLinkBankTransactionPaymentRequests
762
- */
763
- readonly code: string
764
-
765
- /**
766
- *
767
- * @type {LinkBankTransactionPaymentRequestsRequestDtoRest}
768
- * @memberof BankTransactionApiLinkBankTransactionPaymentRequests
769
- */
770
- readonly linkBankTransactionPaymentRequestsRequestDtoRest: LinkBankTransactionPaymentRequestsRequestDtoRest
771
-
772
- /**
773
- * Bearer Token
774
- * @type {string}
775
- * @memberof BankTransactionApiLinkBankTransactionPaymentRequests
776
- */
777
- readonly authorization?: string
778
- }
779
-
780
637
  /**
781
638
  * Request parameters for listBankTransactions operation in BankTransactionApi.
782
639
  * @export
@@ -826,7 +683,7 @@ export interface BankTransactionApiListBankTransactionsRequest {
826
683
  readonly order?: string
827
684
 
828
685
  /**
829
- * Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices, paymentReceipts&lt;i&gt;
686
+ * Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: bankAccount, invoiceMatchSuggestions, suggestionGenerationProgress, linkedBankOrder, bankTransactionInvoices&lt;i&gt;
830
687
  * @type {string}
831
688
  * @memberof BankTransactionApiListBankTransactions
832
689
  */
@@ -877,7 +734,7 @@ export class BankTransactionApi extends BaseAPI {
877
734
  * @memberof BankTransactionApi
878
735
  */
879
736
  public generateInvoiceMatchSuggestion(requestParameters: BankTransactionApiGenerateInvoiceMatchSuggestionRequest, options?: AxiosRequestConfig) {
880
- return BankTransactionApiFp(this.configuration).generateInvoiceMatchSuggestion(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
737
+ return BankTransactionApiFp(this.configuration).generateInvoiceMatchSuggestion(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
881
738
  }
882
739
 
883
740
  /**
@@ -889,7 +746,7 @@ export class BankTransactionApi extends BaseAPI {
889
746
  * @memberof BankTransactionApi
890
747
  */
891
748
  public getBankTransaction(requestParameters: BankTransactionApiGetBankTransactionRequest, options?: AxiosRequestConfig) {
892
- return BankTransactionApiFp(this.configuration).getBankTransaction(requestParameters.code, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
749
+ return BankTransactionApiFp(this.configuration).getBankTransaction(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
893
750
  }
894
751
 
895
752
  /**
@@ -901,7 +758,7 @@ export class BankTransactionApi extends BaseAPI {
901
758
  * @memberof BankTransactionApi
902
759
  */
903
760
  public importBankTransactions(requestParameters: BankTransactionApiImportBankTransactionsRequest, options?: AxiosRequestConfig) {
904
- return BankTransactionApiFp(this.configuration).importBankTransactions(requestParameters.file, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
761
+ return BankTransactionApiFp(this.configuration).importBankTransactions(requestParameters.file, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
905
762
  }
906
763
 
907
764
  /**
@@ -913,19 +770,7 @@ export class BankTransactionApi extends BaseAPI {
913
770
  * @memberof BankTransactionApi
914
771
  */
915
772
  public linkBankTransaction(requestParameters: BankTransactionApiLinkBankTransactionRequest, options?: AxiosRequestConfig) {
916
- return BankTransactionApiFp(this.configuration).linkBankTransaction(requestParameters.code, requestParameters.linkBankTransactionRequestDtoRest, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
917
- }
918
-
919
- /**
920
- * Links an outgoing bank transaction to the payout payment requests it paid. In one database transaction it creates one payment receipt per request for the full request amount, which marks each request paid, closes every bank order of the requests that has no open request left, and marks the transaction linked. The requests must be open payouts (claim regulations, refund allocations or commission settlements) in the transaction currency that hold no received money (no receipts, or receipts that net to zero because the money came back in a collect receipt), and their amounts must add up to the transaction amount. A request in a bank order must be in a payout order past draft that pays from the tenant bank account of the transaction. A bank order given by its code is linked with every open payment request it holds in the transaction currency at the time of the link; it must be such an order, not closed, with at least one. **Required Permissions** \"payment-management.bank-accounts.create\", \"payment-management.payments.create\", \"payment-management.bank-orders.update\"
921
- * @summary Link bank transaction to payment requests
922
- * @param {BankTransactionApiLinkBankTransactionPaymentRequestsRequest} requestParameters Request parameters.
923
- * @param {*} [options] Override http request option.
924
- * @throws {RequiredError}
925
- * @memberof BankTransactionApi
926
- */
927
- public linkBankTransactionPaymentRequests(requestParameters: BankTransactionApiLinkBankTransactionPaymentRequestsRequest, options?: AxiosRequestConfig) {
928
- return BankTransactionApiFp(this.configuration).linkBankTransactionPaymentRequests(requestParameters.code, requestParameters.linkBankTransactionPaymentRequestsRequestDtoRest, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
773
+ return BankTransactionApiFp(this.configuration).linkBankTransaction(requestParameters.code, requestParameters.linkBankTransactionRequestDtoRest, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
929
774
  }
930
775
 
931
776
  /**
@@ -937,7 +782,7 @@ export class BankTransactionApi extends BaseAPI {
937
782
  * @memberof BankTransactionApi
938
783
  */
939
784
  public listBankTransactions(requestParameters: BankTransactionApiListBankTransactionsRequest = {}, options?: AxiosRequestConfig) {
940
- return BankTransactionApiFp(this.configuration).listBankTransactions(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));
785
+ return BankTransactionApiFp(this.configuration).listBankTransactions(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
941
786
  }
942
787
 
943
788
  /**
@@ -949,6 +794,6 @@ export class BankTransactionApi extends BaseAPI {
949
794
  * @memberof BankTransactionApi
950
795
  */
951
796
  public unlinkBankTransaction(requestParameters: BankTransactionApiUnlinkBankTransactionRequest, options?: AxiosRequestConfig) {
952
- return BankTransactionApiFp(this.configuration).unlinkBankTransaction(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
797
+ return BankTransactionApiFp(this.configuration).unlinkBankTransaction(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
953
798
  }
954
799
  }
@@ -67,13 +67,8 @@ export const BillingAddressesApiAxiosParamCreator = function (configuration?: Co
67
67
  // http bearer authentication required
68
68
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
69
69
 
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);
70
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
71
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
77
72
  }
78
73
 
79
74
 
@@ -120,13 +115,8 @@ export const BillingAddressesApiAxiosParamCreator = function (configuration?: Co
120
115
  // http bearer authentication required
121
116
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
122
117
 
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);
118
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
119
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
130
120
  }
131
121
 
132
122
 
@@ -170,13 +160,8 @@ export const BillingAddressesApiAxiosParamCreator = function (configuration?: Co
170
160
  // http bearer authentication required
171
161
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
172
162
 
173
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
174
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
175
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
176
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
177
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
178
- if (authorizationValue || authorizationKeepEmpty) {
179
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
163
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
164
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
180
165
  }
181
166
 
182
167
 
@@ -251,13 +236,8 @@ export const BillingAddressesApiAxiosParamCreator = function (configuration?: Co
251
236
  localVarQueryParameter['filters'] = filters;
252
237
  }
253
238
 
254
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
255
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
256
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
257
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
258
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
259
- if (authorizationValue || authorizationKeepEmpty) {
260
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
239
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
240
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
261
241
  }
262
242
 
263
243
 
@@ -304,13 +284,8 @@ export const BillingAddressesApiAxiosParamCreator = function (configuration?: Co
304
284
  // http bearer authentication required
305
285
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
306
286
 
307
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
308
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
309
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
310
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
311
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
312
- if (authorizationValue || authorizationKeepEmpty) {
313
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
287
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
288
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
314
289
  }
315
290
 
316
291
 
@@ -649,7 +624,7 @@ export class BillingAddressesApi extends BaseAPI {
649
624
  * @memberof BillingAddressesApi
650
625
  */
651
626
  public createBillingAddress(requestParameters: BillingAddressesApiCreateBillingAddressRequest, options?: AxiosRequestConfig) {
652
- return BillingAddressesApiFp(this.configuration).createBillingAddress(requestParameters.createBillingAddressRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
627
+ return BillingAddressesApiFp(this.configuration).createBillingAddress(requestParameters.createBillingAddressRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
653
628
  }
654
629
 
655
630
  /**
@@ -661,7 +636,7 @@ export class BillingAddressesApi extends BaseAPI {
661
636
  * @memberof BillingAddressesApi
662
637
  */
663
638
  public deleteBillingAddress(requestParameters: BillingAddressesApiDeleteBillingAddressRequest, options?: AxiosRequestConfig) {
664
- return BillingAddressesApiFp(this.configuration).deleteBillingAddress(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
639
+ return BillingAddressesApiFp(this.configuration).deleteBillingAddress(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
665
640
  }
666
641
 
667
642
  /**
@@ -673,7 +648,7 @@ export class BillingAddressesApi extends BaseAPI {
673
648
  * @memberof BillingAddressesApi
674
649
  */
675
650
  public getBillingAddress(requestParameters: BillingAddressesApiGetBillingAddressRequest, options?: AxiosRequestConfig) {
676
- return BillingAddressesApiFp(this.configuration).getBillingAddress(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
651
+ return BillingAddressesApiFp(this.configuration).getBillingAddress(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
677
652
  }
678
653
 
679
654
  /**
@@ -685,7 +660,7 @@ export class BillingAddressesApi extends BaseAPI {
685
660
  * @memberof BillingAddressesApi
686
661
  */
687
662
  public listBillingAddresses(requestParameters: BillingAddressesApiListBillingAddressesRequest = {}, options?: AxiosRequestConfig) {
688
- return BillingAddressesApiFp(this.configuration).listBillingAddresses(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
+ return BillingAddressesApiFp(this.configuration).listBillingAddresses(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
689
664
  }
690
665
 
691
666
  /**
@@ -697,6 +672,6 @@ export class BillingAddressesApi extends BaseAPI {
697
672
  * @memberof BillingAddressesApi
698
673
  */
699
674
  public updateBillingAddress(requestParameters: BillingAddressesApiUpdateBillingAddressRequest, options?: AxiosRequestConfig) {
700
- return BillingAddressesApiFp(this.configuration).updateBillingAddress(requestParameters.code, requestParameters.updateBillingAddressRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
675
+ return BillingAddressesApiFp(this.configuration).updateBillingAddress(requestParameters.code, requestParameters.updateBillingAddressRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
701
676
  }
702
677
  }
@@ -63,13 +63,8 @@ export const CreditAllocationApiAxiosParamCreator = function (configuration?: Co
63
63
  // http bearer authentication required
64
64
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
65
65
 
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);
66
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
67
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
73
68
  }
74
69
 
75
70
 
@@ -116,13 +111,8 @@ export const CreditAllocationApiAxiosParamCreator = function (configuration?: Co
116
111
  // http bearer authentication required
117
112
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
118
113
 
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);
114
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
115
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
126
116
  }
127
117
 
128
118
 
@@ -197,13 +187,8 @@ export const CreditAllocationApiAxiosParamCreator = function (configuration?: Co
197
187
  localVarQueryParameter['filters'] = filters;
198
188
  }
199
189
 
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);
190
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
191
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
207
192
  }
208
193
 
209
194
 
@@ -442,7 +427,7 @@ export class CreditAllocationApi extends BaseAPI {
442
427
  * @memberof CreditAllocationApi
443
428
  */
444
429
  public createAllocateCredit(requestParameters: CreditAllocationApiCreateAllocateCreditRequest, options?: AxiosRequestConfig) {
445
- return CreditAllocationApiFp(this.configuration).createAllocateCredit(requestParameters.createCreditAllocationRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
430
+ return CreditAllocationApiFp(this.configuration).createAllocateCredit(requestParameters.createCreditAllocationRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
446
431
  }
447
432
 
448
433
  /**
@@ -454,7 +439,7 @@ export class CreditAllocationApi extends BaseAPI {
454
439
  * @memberof CreditAllocationApi
455
440
  */
456
441
  public getCreditAllocation(requestParameters: CreditAllocationApiGetCreditAllocationRequest, options?: AxiosRequestConfig) {
457
- return CreditAllocationApiFp(this.configuration).getCreditAllocation(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
442
+ return CreditAllocationApiFp(this.configuration).getCreditAllocation(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
458
443
  }
459
444
 
460
445
  /**
@@ -466,6 +451,6 @@ export class CreditAllocationApi extends BaseAPI {
466
451
  * @memberof CreditAllocationApi
467
452
  */
468
453
  public listCreditAllocations(requestParameters: CreditAllocationApiListCreditAllocationsRequest = {}, options?: AxiosRequestConfig) {
469
- return CreditAllocationApiFp(this.configuration).listCreditAllocations(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));
454
+ return CreditAllocationApiFp(this.configuration).listCreditAllocations(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
470
455
  }
471
456
  }