@emilgroup/payment-sdk 1.4.1-beta.5 → 1.4.1-beta.7

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 (138) hide show
  1. package/.openapi-generator/FILES +35 -0
  2. package/README.md +2 -2
  3. package/api/bank-accounts-api.ts +20 -16
  4. package/api/bank-transaction-api.ts +204 -2
  5. package/api/payment-methods-api.ts +41 -37
  6. package/api/payment-reminders-api.ts +12 -8
  7. package/api/payment-setup-api.ts +36 -28
  8. package/api/payments-api.ts +27 -25
  9. package/api/refunds-api.ts +474 -0
  10. package/api.ts +2 -0
  11. package/dist/api/bank-accounts-api.d.ts +14 -12
  12. package/dist/api/bank-accounts-api.js +12 -12
  13. package/dist/api/bank-transaction-api.d.ts +113 -3
  14. package/dist/api/bank-transaction-api.js +184 -0
  15. package/dist/api/payment-methods-api.d.ts +31 -27
  16. package/dist/api/payment-methods-api.js +24 -28
  17. package/dist/api/payment-reminders-api.d.ts +14 -12
  18. package/dist/api/payment-setup-api.d.ts +22 -18
  19. package/dist/api/payment-setup-api.js +24 -24
  20. package/dist/api/payments-api.d.ts +24 -21
  21. package/dist/api/payments-api.js +12 -16
  22. package/dist/api/refunds-api.d.ts +269 -0
  23. package/dist/api/refunds-api.js +447 -0
  24. package/dist/api.d.ts +1 -0
  25. package/dist/api.js +1 -0
  26. package/dist/models/bank-account-class.d.ts +54 -0
  27. package/dist/models/bank-account-class.js +15 -0
  28. package/dist/models/billing-profile-dto.d.ts +38 -0
  29. package/dist/models/billing-profile-dto.js +15 -0
  30. package/dist/models/billing-profile-limited-response-dto.d.ts +54 -0
  31. package/dist/models/billing-profile-limited-response-dto.js +15 -0
  32. package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +48 -0
  33. package/dist/models/complete-braintree-payment-setup-request-dto.js +15 -0
  34. package/dist/models/complete-payment-setup-request-dto.d.ts +32 -0
  35. package/dist/models/complete-payment-setup-request-dto.js +15 -0
  36. package/dist/models/complete-payment-setup-response-class.d.ts +25 -0
  37. package/dist/models/complete-payment-setup-response-class.js +15 -0
  38. package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +60 -0
  39. package/dist/models/complete-stripe-payment-setup-request-dto.js +15 -0
  40. package/dist/models/create-bank-account-request-dto.d.ts +30 -0
  41. package/dist/models/create-bank-account-request-dto.js +15 -0
  42. package/dist/models/create-payment-method-response-class.d.ts +25 -0
  43. package/dist/models/create-payment-method-response-class.js +15 -0
  44. package/dist/models/create-payment-request-dto.d.ts +3 -3
  45. package/dist/models/create-payment-response-class.d.ts +25 -0
  46. package/dist/models/create-payment-response-class.js +15 -0
  47. package/dist/models/create-psp-payment-method-request-dto.d.ts +61 -0
  48. package/dist/models/create-psp-payment-method-request-dto.js +32 -0
  49. package/dist/models/create-refund-request-dto.d.ts +24 -0
  50. package/dist/models/create-refund-request-dto.js +15 -0
  51. package/dist/models/create-refund-response-class.d.ts +25 -0
  52. package/dist/models/create-refund-response-class.js +15 -0
  53. package/dist/models/deactivate-payment-reminder-response-class.d.ts +25 -0
  54. package/dist/models/deactivate-payment-reminder-response-class.js +15 -0
  55. package/dist/models/get-payment-method-response-class.d.ts +25 -0
  56. package/dist/models/get-payment-method-response-class.js +15 -0
  57. package/dist/models/get-payment-response-class.d.ts +25 -0
  58. package/dist/models/get-payment-response-class.js +15 -0
  59. package/dist/models/get-refund-response-class.d.ts +25 -0
  60. package/dist/models/get-refund-response-class.js +15 -0
  61. package/dist/models/get-request-dto.d.ts +1 -1
  62. package/dist/models/index.d.ts +34 -0
  63. package/dist/models/index.js +34 -0
  64. package/dist/models/initiate-braintree-payment-setup-request-dto.d.ts +30 -0
  65. package/dist/models/initiate-braintree-payment-setup-request-dto.js +15 -0
  66. package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +24 -0
  67. package/dist/models/initiate-braintree-payment-setup-response-class.js +15 -0
  68. package/dist/models/initiate-payment-setup-request-dto.d.ts +44 -0
  69. package/dist/models/initiate-payment-setup-request-dto.js +15 -0
  70. package/dist/models/initiate-payment-setup-response-class.d.ts +32 -0
  71. package/dist/models/initiate-payment-setup-response-class.js +15 -0
  72. package/dist/models/initiate-stripe-payment-setup-request-dto.d.ts +30 -0
  73. package/dist/models/initiate-stripe-payment-setup-request-dto.js +15 -0
  74. package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +30 -0
  75. package/dist/models/initiate-stripe-payment-setup-response-class.js +15 -0
  76. package/dist/models/list-bank-accounts-response-class.d.ts +31 -0
  77. package/dist/models/list-bank-accounts-response-class.js +15 -0
  78. package/dist/models/list-payment-methods-response-class.d.ts +31 -0
  79. package/dist/models/list-payment-methods-response-class.js +15 -0
  80. package/dist/models/list-payment-reminders-response-class.d.ts +31 -0
  81. package/dist/models/list-payment-reminders-response-class.js +15 -0
  82. package/dist/models/list-payments-response-class.d.ts +31 -0
  83. package/dist/models/list-payments-response-class.js +15 -0
  84. package/dist/models/list-refunds-response-class.d.ts +31 -0
  85. package/dist/models/list-refunds-response-class.js +15 -0
  86. package/dist/models/payment-class.d.ts +103 -0
  87. package/dist/models/payment-class.js +15 -0
  88. package/dist/models/payment-method-class.d.ts +66 -0
  89. package/dist/models/payment-method-class.js +15 -0
  90. package/dist/models/payment-reminder-class.d.ts +112 -0
  91. package/dist/models/payment-reminder-class.js +36 -0
  92. package/dist/models/refund-class.d.ts +104 -0
  93. package/dist/models/refund-class.js +28 -0
  94. package/dist/models/sepa-direct-dto.d.ts +24 -0
  95. package/dist/models/sepa-direct-dto.js +15 -0
  96. package/dist/models/symphony-profile-limited-response-dto.d.ts +42 -0
  97. package/dist/models/symphony-profile-limited-response-dto.js +15 -0
  98. package/dist/models/validate-pspconfig-request-dto.d.ts +8 -1
  99. package/dist/models/validate-pspconfig-request-dto.js +7 -0
  100. package/models/bank-account-class.ts +60 -0
  101. package/models/billing-profile-dto.ts +44 -0
  102. package/models/billing-profile-limited-response-dto.ts +60 -0
  103. package/models/complete-braintree-payment-setup-request-dto.ts +54 -0
  104. package/models/complete-payment-setup-request-dto.ts +38 -0
  105. package/models/complete-payment-setup-response-class.ts +31 -0
  106. package/models/complete-stripe-payment-setup-request-dto.ts +66 -0
  107. package/models/create-bank-account-request-dto.ts +36 -0
  108. package/models/create-payment-method-response-class.ts +31 -0
  109. package/models/create-payment-request-dto.ts +3 -3
  110. package/models/create-payment-response-class.ts +31 -0
  111. package/models/create-psp-payment-method-request-dto.ts +70 -0
  112. package/models/create-refund-request-dto.ts +30 -0
  113. package/models/create-refund-response-class.ts +31 -0
  114. package/models/deactivate-payment-reminder-response-class.ts +31 -0
  115. package/models/get-payment-method-response-class.ts +31 -0
  116. package/models/get-payment-response-class.ts +31 -0
  117. package/models/get-refund-response-class.ts +31 -0
  118. package/models/get-request-dto.ts +1 -1
  119. package/models/index.ts +34 -0
  120. package/models/initiate-braintree-payment-setup-request-dto.ts +36 -0
  121. package/models/initiate-braintree-payment-setup-response-class.ts +30 -0
  122. package/models/initiate-payment-setup-request-dto.ts +50 -0
  123. package/models/initiate-payment-setup-response-class.ts +38 -0
  124. package/models/initiate-stripe-payment-setup-request-dto.ts +36 -0
  125. package/models/initiate-stripe-payment-setup-response-class.ts +36 -0
  126. package/models/list-bank-accounts-response-class.ts +37 -0
  127. package/models/list-payment-methods-response-class.ts +37 -0
  128. package/models/list-payment-reminders-response-class.ts +37 -0
  129. package/models/list-payments-response-class.ts +37 -0
  130. package/models/list-refunds-response-class.ts +37 -0
  131. package/models/payment-class.ts +109 -0
  132. package/models/payment-method-class.ts +72 -0
  133. package/models/payment-reminder-class.ts +122 -0
  134. package/models/refund-class.ts +114 -0
  135. package/models/sepa-direct-dto.ts +30 -0
  136. package/models/symphony-profile-limited-response-dto.ts +48 -0
  137. package/models/validate-pspconfig-request-dto.ts +11 -1
  138. package/package.json +1 -1
@@ -10,6 +10,7 @@ api/payment-methods-api.ts
10
10
  api/payment-reminders-api.ts
11
11
  api/payment-setup-api.ts
12
12
  api/payments-api.ts
13
+ api/refunds-api.ts
13
14
  api/tenant-bank-account-api.ts
14
15
  api/webhooks-api.ts
15
16
  base.ts
@@ -17,18 +18,52 @@ common.ts
17
18
  configuration.ts
18
19
  git_push.sh
19
20
  index.ts
21
+ models/bank-account-class.ts
20
22
  models/bank-transaction-response-class.ts
23
+ models/billing-profile-dto.ts
24
+ models/billing-profile-limited-response-dto.ts
25
+ models/complete-braintree-payment-setup-request-dto.ts
26
+ models/complete-payment-setup-request-dto.ts
27
+ models/complete-payment-setup-response-class.ts
28
+ models/complete-stripe-payment-setup-request-dto.ts
29
+ models/create-bank-account-request-dto.ts
30
+ models/create-payment-method-response-class.ts
21
31
  models/create-payment-reminder-request-dto.ts
22
32
  models/create-payment-request-dto.ts
33
+ models/create-payment-response-class.ts
34
+ models/create-psp-payment-method-request-dto.ts
35
+ models/create-refund-request-dto.ts
36
+ models/create-refund-response-class.ts
23
37
  models/create-tenant-bank-account-request-dto.ts
24
38
  models/deactivate-payment-reminder-request-dto.ts
39
+ models/deactivate-payment-reminder-response-class.ts
25
40
  models/get-bank-transactions-response-class.ts
41
+ models/get-payment-method-response-class.ts
42
+ models/get-payment-response-class.ts
43
+ models/get-refund-response-class.ts
26
44
  models/get-request-dto.ts
27
45
  models/get-tenant-bank-account-response-class.ts
28
46
  models/index.ts
47
+ models/initiate-braintree-payment-setup-request-dto.ts
48
+ models/initiate-braintree-payment-setup-response-class.ts
49
+ models/initiate-payment-setup-request-dto.ts
50
+ models/initiate-payment-setup-response-class.ts
51
+ models/initiate-stripe-payment-setup-request-dto.ts
52
+ models/initiate-stripe-payment-setup-response-class.ts
29
53
  models/inline-response200.ts
30
54
  models/inline-response503.ts
55
+ models/list-bank-accounts-response-class.ts
31
56
  models/list-bank-transactions-response-class.ts
57
+ models/list-payment-methods-response-class.ts
58
+ models/list-payment-reminders-response-class.ts
59
+ models/list-payments-response-class.ts
60
+ models/list-refunds-response-class.ts
61
+ models/payment-class.ts
62
+ models/payment-method-class.ts
63
+ models/payment-reminder-class.ts
64
+ models/refund-class.ts
65
+ models/sepa-direct-dto.ts
66
+ models/symphony-profile-limited-response-dto.ts
32
67
  models/tenant-bank-account-response-class.ts
33
68
  models/transaction-class.ts
34
69
  models/update-tenant-bank-account-rest-request-dto.ts
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/payment-sdk@1.4.1-beta.5 --save
20
+ npm install @emilgroup/payment-sdk@1.4.1-beta.7 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/payment-sdk@1.4.1-beta.5
24
+ yarn add @emilgroup/payment-sdk@1.4.1-beta.7
25
25
  ```
26
26
 
27
27
  And then you can import `PaymentsApi`.
@@ -20,6 +20,10 @@ import { Configuration } from '../configuration';
20
20
  import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
21
  // @ts-ignore
22
22
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { CreateBankAccountRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { ListBankAccountsResponseClass } from '../models';
23
27
  /**
24
28
  * BankAccountsApi - axios parameter creator
25
29
  * @export
@@ -29,14 +33,14 @@ export const BankAccountsApiAxiosParamCreator = function (configuration?: Config
29
33
  /**
30
34
  * Creates a bank account for a specified account.
31
35
  * @summary Create a bank account
32
- * @param {object} body
36
+ * @param {CreateBankAccountRequestDto} createBankAccountRequestDto
33
37
  * @param {string} [authorization] Bearer Token
34
38
  * @param {*} [options] Override http request option.
35
39
  * @throws {RequiredError}
36
40
  */
37
- createBankAccount: async (body: object, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
38
- // verify required parameter 'body' is not null or undefined
39
- assertParamExists('createBankAccount', 'body', body)
41
+ createBankAccount: async (createBankAccountRequestDto: CreateBankAccountRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
42
+ // verify required parameter 'createBankAccountRequestDto' is not null or undefined
43
+ assertParamExists('createBankAccount', 'createBankAccountRequestDto', createBankAccountRequestDto)
40
44
  const localVarPath = `/paymentservice/v1/bank-accounts`;
41
45
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
42
46
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -66,7 +70,7 @@ export const BankAccountsApiAxiosParamCreator = function (configuration?: Config
66
70
  setSearchParams(localVarUrlObj, localVarQueryParameter);
67
71
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
68
72
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
69
- localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
73
+ localVarRequestOptions.data = serializeDataIfNeeded(createBankAccountRequestDto, localVarRequestOptions, configuration)
70
74
 
71
75
  return {
72
76
  url: toPathString(localVarUrlObj),
@@ -162,13 +166,13 @@ export const BankAccountsApiFp = function(configuration?: Configuration) {
162
166
  /**
163
167
  * Creates a bank account for a specified account.
164
168
  * @summary Create a bank account
165
- * @param {object} body
169
+ * @param {CreateBankAccountRequestDto} createBankAccountRequestDto
166
170
  * @param {string} [authorization] Bearer Token
167
171
  * @param {*} [options] Override http request option.
168
172
  * @throws {RequiredError}
169
173
  */
170
- async createBankAccount(body: object, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
171
- const localVarAxiosArgs = await localVarAxiosParamCreator.createBankAccount(body, authorization, options);
174
+ async createBankAccount(createBankAccountRequestDto: CreateBankAccountRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
175
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createBankAccount(createBankAccountRequestDto, authorization, options);
172
176
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
173
177
  },
174
178
  /**
@@ -185,7 +189,7 @@ export const BankAccountsApiFp = function(configuration?: Configuration) {
185
189
  * @param {*} [options] Override http request option.
186
190
  * @throws {RequiredError}
187
191
  */
188
- async listBankAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
192
+ async listBankAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListBankAccountsResponseClass>> {
189
193
  const localVarAxiosArgs = await localVarAxiosParamCreator.listBankAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
190
194
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
191
195
  },
@@ -202,13 +206,13 @@ export const BankAccountsApiFactory = function (configuration?: Configuration, b
202
206
  /**
203
207
  * Creates a bank account for a specified account.
204
208
  * @summary Create a bank account
205
- * @param {object} body
209
+ * @param {CreateBankAccountRequestDto} createBankAccountRequestDto
206
210
  * @param {string} [authorization] Bearer Token
207
211
  * @param {*} [options] Override http request option.
208
212
  * @throws {RequiredError}
209
213
  */
210
- createBankAccount(body: object, authorization?: string, options?: any): AxiosPromise<void> {
211
- return localVarFp.createBankAccount(body, authorization, options).then((request) => request(axios, basePath));
214
+ createBankAccount(createBankAccountRequestDto: CreateBankAccountRequestDto, authorization?: string, options?: any): AxiosPromise<object> {
215
+ return localVarFp.createBankAccount(createBankAccountRequestDto, authorization, options).then((request) => request(axios, basePath));
212
216
  },
213
217
  /**
214
218
  * Returns a list of bank accounts you’ve previously created. The bank accounts are returned in sorted order, with the oldest payment appearing first. For more information about pagination, read the Pagination documentation.
@@ -224,7 +228,7 @@ export const BankAccountsApiFactory = function (configuration?: Configuration, b
224
228
  * @param {*} [options] Override http request option.
225
229
  * @throws {RequiredError}
226
230
  */
227
- listBankAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<void> {
231
+ listBankAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<ListBankAccountsResponseClass> {
228
232
  return localVarFp.listBankAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
229
233
  },
230
234
  };
@@ -238,10 +242,10 @@ export const BankAccountsApiFactory = function (configuration?: Configuration, b
238
242
  export interface BankAccountsApiCreateBankAccountRequest {
239
243
  /**
240
244
  *
241
- * @type {object}
245
+ * @type {CreateBankAccountRequestDto}
242
246
  * @memberof BankAccountsApiCreateBankAccount
243
247
  */
244
- readonly body: object
248
+ readonly createBankAccountRequestDto: CreateBankAccountRequestDto
245
249
 
246
250
  /**
247
251
  * Bearer Token
@@ -330,7 +334,7 @@ export class BankAccountsApi extends BaseAPI {
330
334
  * @memberof BankAccountsApi
331
335
  */
332
336
  public createBankAccount(requestParameters: BankAccountsApiCreateBankAccountRequest, options?: AxiosRequestConfig) {
333
- return BankAccountsApiFp(this.configuration).createBankAccount(requestParameters.body, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
337
+ return BankAccountsApiFp(this.configuration).createBankAccount(requestParameters.createBankAccountRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
334
338
  }
335
339
 
336
340
  /**
@@ -130,6 +130,51 @@ export const BankTransactionApiAxiosParamCreator = function (configuration?: Con
130
130
  options: localVarRequestOptions,
131
131
  };
132
132
  },
133
+ /**
134
+ * Links a bank transaction with an invoice
135
+ * @summary Link Bank Transaction
136
+ * @param {string} code Code of the bank transaction to link
137
+ * @param {string} [authorization] Bearer Token
138
+ * @param {*} [options] Override http request option.
139
+ * @throws {RequiredError}
140
+ */
141
+ linkBankTransaction: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
142
+ // verify required parameter 'code' is not null or undefined
143
+ assertParamExists('linkBankTransaction', 'code', code)
144
+ const localVarPath = `/paymentservice/v1/tenant/bank-transactions/{code}/link`
145
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
146
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
147
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
148
+ let baseOptions;
149
+ let baseAccessToken;
150
+ if (configuration) {
151
+ baseOptions = configuration.baseOptions;
152
+ baseAccessToken = configuration.accessToken;
153
+ }
154
+
155
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
156
+ const localVarHeaderParameter = {} as any;
157
+ const localVarQueryParameter = {} as any;
158
+
159
+ // authentication bearer required
160
+ // http bearer authentication required
161
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
162
+
163
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
164
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
165
+ }
166
+
167
+
168
+
169
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
170
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
171
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
172
+
173
+ return {
174
+ url: toPathString(localVarUrlObj),
175
+ options: localVarRequestOptions,
176
+ };
177
+ },
133
178
  /**
134
179
  * 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.
135
180
  * @summary List bank transactions
@@ -197,6 +242,51 @@ export const BankTransactionApiAxiosParamCreator = function (configuration?: Con
197
242
 
198
243
 
199
244
 
245
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
246
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
247
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
248
+
249
+ return {
250
+ url: toPathString(localVarUrlObj),
251
+ options: localVarRequestOptions,
252
+ };
253
+ },
254
+ /**
255
+ * Unlinks an already linked bank transaction
256
+ * @summary Unlink Bank Transaction
257
+ * @param {string} code Code of the bank transaction to unlink
258
+ * @param {string} [authorization] Bearer Token
259
+ * @param {*} [options] Override http request option.
260
+ * @throws {RequiredError}
261
+ */
262
+ unlinkBankTransaction: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
263
+ // verify required parameter 'code' is not null or undefined
264
+ assertParamExists('unlinkBankTransaction', 'code', code)
265
+ const localVarPath = `/paymentservice/v1/tenant/bank-transactions/{code}/unlink`
266
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
267
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
268
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
269
+ let baseOptions;
270
+ let baseAccessToken;
271
+ if (configuration) {
272
+ baseOptions = configuration.baseOptions;
273
+ baseAccessToken = configuration.accessToken;
274
+ }
275
+
276
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
277
+ const localVarHeaderParameter = {} as any;
278
+ const localVarQueryParameter = {} as any;
279
+
280
+ // authentication bearer required
281
+ // http bearer authentication required
282
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
283
+
284
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
285
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
286
+ }
287
+
288
+
289
+
200
290
  setSearchParams(localVarUrlObj, localVarQueryParameter);
201
291
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
202
292
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -241,6 +331,18 @@ export const BankTransactionApiFp = function(configuration?: Configuration) {
241
331
  const localVarAxiosArgs = await localVarAxiosParamCreator.importBankTransactions(authorization, file, options);
242
332
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
243
333
  },
334
+ /**
335
+ * Links a bank transaction with an invoice
336
+ * @summary Link Bank Transaction
337
+ * @param {string} code Code of the bank transaction to link
338
+ * @param {string} [authorization] Bearer Token
339
+ * @param {*} [options] Override http request option.
340
+ * @throws {RequiredError}
341
+ */
342
+ async linkBankTransaction(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetBankTransactionsResponseClass>> {
343
+ const localVarAxiosArgs = await localVarAxiosParamCreator.linkBankTransaction(code, authorization, options);
344
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
345
+ },
244
346
  /**
245
347
  * 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.
246
348
  * @summary List bank transactions
@@ -255,10 +357,22 @@ export const BankTransactionApiFp = function(configuration?: Configuration) {
255
357
  * @param {*} [options] Override http request option.
256
358
  * @throws {RequiredError}
257
359
  */
258
- async listBankTransactions(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: string, filters?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
360
+ async listBankTransactions(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: string, filters?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListBankTransactionsResponseClass>> {
259
361
  const localVarAxiosArgs = await localVarAxiosParamCreator.listBankTransactions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
260
362
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
261
363
  },
364
+ /**
365
+ * Unlinks an already linked bank transaction
366
+ * @summary Unlink Bank Transaction
367
+ * @param {string} code Code of the bank transaction to unlink
368
+ * @param {string} [authorization] Bearer Token
369
+ * @param {*} [options] Override http request option.
370
+ * @throws {RequiredError}
371
+ */
372
+ async unlinkBankTransaction(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetBankTransactionsResponseClass>> {
373
+ const localVarAxiosArgs = await localVarAxiosParamCreator.unlinkBankTransaction(code, authorization, options);
374
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
375
+ },
262
376
  }
263
377
  };
264
378
 
@@ -292,6 +406,17 @@ export const BankTransactionApiFactory = function (configuration?: Configuration
292
406
  importBankTransactions(authorization?: string, file?: any, options?: any): AxiosPromise<ListBankTransactionsResponseClass> {
293
407
  return localVarFp.importBankTransactions(authorization, file, options).then((request) => request(axios, basePath));
294
408
  },
409
+ /**
410
+ * Links a bank transaction with an invoice
411
+ * @summary Link Bank Transaction
412
+ * @param {string} code Code of the bank transaction to link
413
+ * @param {string} [authorization] Bearer Token
414
+ * @param {*} [options] Override http request option.
415
+ * @throws {RequiredError}
416
+ */
417
+ linkBankTransaction(code: string, authorization?: string, options?: any): AxiosPromise<GetBankTransactionsResponseClass> {
418
+ return localVarFp.linkBankTransaction(code, authorization, options).then((request) => request(axios, basePath));
419
+ },
295
420
  /**
296
421
  * 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.
297
422
  * @summary List bank transactions
@@ -306,9 +431,20 @@ export const BankTransactionApiFactory = function (configuration?: Configuration
306
431
  * @param {*} [options] Override http request option.
307
432
  * @throws {RequiredError}
308
433
  */
309
- listBankTransactions(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: string, filters?: any, options?: any): AxiosPromise<void> {
434
+ listBankTransactions(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: string, filters?: any, options?: any): AxiosPromise<ListBankTransactionsResponseClass> {
310
435
  return localVarFp.listBankTransactions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
311
436
  },
437
+ /**
438
+ * Unlinks an already linked bank transaction
439
+ * @summary Unlink Bank Transaction
440
+ * @param {string} code Code of the bank transaction to unlink
441
+ * @param {string} [authorization] Bearer Token
442
+ * @param {*} [options] Override http request option.
443
+ * @throws {RequiredError}
444
+ */
445
+ unlinkBankTransaction(code: string, authorization?: string, options?: any): AxiosPromise<GetBankTransactionsResponseClass> {
446
+ return localVarFp.unlinkBankTransaction(code, authorization, options).then((request) => request(axios, basePath));
447
+ },
312
448
  };
313
449
  };
314
450
 
@@ -361,6 +497,27 @@ export interface BankTransactionApiImportBankTransactionsRequest {
361
497
  readonly file?: any
362
498
  }
363
499
 
500
+ /**
501
+ * Request parameters for linkBankTransaction operation in BankTransactionApi.
502
+ * @export
503
+ * @interface BankTransactionApiLinkBankTransactionRequest
504
+ */
505
+ export interface BankTransactionApiLinkBankTransactionRequest {
506
+ /**
507
+ * Code of the bank transaction to link
508
+ * @type {string}
509
+ * @memberof BankTransactionApiLinkBankTransaction
510
+ */
511
+ readonly code: string
512
+
513
+ /**
514
+ * Bearer Token
515
+ * @type {string}
516
+ * @memberof BankTransactionApiLinkBankTransaction
517
+ */
518
+ readonly authorization?: string
519
+ }
520
+
364
521
  /**
365
522
  * Request parameters for listBankTransactions operation in BankTransactionApi.
366
523
  * @export
@@ -424,6 +581,27 @@ export interface BankTransactionApiListBankTransactionsRequest {
424
581
  readonly filters?: any
425
582
  }
426
583
 
584
+ /**
585
+ * Request parameters for unlinkBankTransaction operation in BankTransactionApi.
586
+ * @export
587
+ * @interface BankTransactionApiUnlinkBankTransactionRequest
588
+ */
589
+ export interface BankTransactionApiUnlinkBankTransactionRequest {
590
+ /**
591
+ * Code of the bank transaction to unlink
592
+ * @type {string}
593
+ * @memberof BankTransactionApiUnlinkBankTransaction
594
+ */
595
+ readonly code: string
596
+
597
+ /**
598
+ * Bearer Token
599
+ * @type {string}
600
+ * @memberof BankTransactionApiUnlinkBankTransaction
601
+ */
602
+ readonly authorization?: string
603
+ }
604
+
427
605
  /**
428
606
  * BankTransactionApi - object-oriented interface
429
607
  * @export
@@ -455,6 +633,18 @@ export class BankTransactionApi extends BaseAPI {
455
633
  return BankTransactionApiFp(this.configuration).importBankTransactions(requestParameters.authorization, requestParameters.file, options).then((request) => request(this.axios, this.basePath));
456
634
  }
457
635
 
636
+ /**
637
+ * Links a bank transaction with an invoice
638
+ * @summary Link Bank Transaction
639
+ * @param {BankTransactionApiLinkBankTransactionRequest} requestParameters Request parameters.
640
+ * @param {*} [options] Override http request option.
641
+ * @throws {RequiredError}
642
+ * @memberof BankTransactionApi
643
+ */
644
+ public linkBankTransaction(requestParameters: BankTransactionApiLinkBankTransactionRequest, options?: AxiosRequestConfig) {
645
+ return BankTransactionApiFp(this.configuration).linkBankTransaction(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
646
+ }
647
+
458
648
  /**
459
649
  * 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.
460
650
  * @summary List bank transactions
@@ -466,4 +656,16 @@ export class BankTransactionApi extends BaseAPI {
466
656
  public listBankTransactions(requestParameters: BankTransactionApiListBankTransactionsRequest = {}, options?: AxiosRequestConfig) {
467
657
  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));
468
658
  }
659
+
660
+ /**
661
+ * Unlinks an already linked bank transaction
662
+ * @summary Unlink Bank Transaction
663
+ * @param {BankTransactionApiUnlinkBankTransactionRequest} requestParameters Request parameters.
664
+ * @param {*} [options] Override http request option.
665
+ * @throws {RequiredError}
666
+ * @memberof BankTransactionApi
667
+ */
668
+ public unlinkBankTransaction(requestParameters: BankTransactionApiUnlinkBankTransactionRequest, options?: AxiosRequestConfig) {
669
+ return BankTransactionApiFp(this.configuration).unlinkBankTransaction(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
670
+ }
469
671
  }