@emilgroup/payment-sdk 1.4.1-beta.9 → 1.5.1-beta.0

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 (140) hide show
  1. package/.openapi-generator/FILES +11 -11
  2. package/README.md +2 -2
  3. package/api/bank-accounts-api.ts +500 -88
  4. package/api/bank-transaction-api.ts +93 -123
  5. package/api/{default-api.ts → health-check-api.ts} +22 -18
  6. package/api/payment-methods-api.ts +61 -242
  7. package/api/payment-reminders-api.ts +57 -99
  8. package/api/payment-setup-api.ts +17 -9
  9. package/api/payments-api.ts +72 -135
  10. package/api/refunds-api.ts +80 -120
  11. package/api/tenant-bank-account-api.ts +96 -118
  12. package/api/webhooks-api.ts +38 -21
  13. package/api.ts +3 -3
  14. package/base.ts +22 -10
  15. package/common.ts +2 -2
  16. package/configuration.ts +1 -1
  17. package/dist/api/bank-accounts-api.d.ts +292 -69
  18. package/dist/api/bank-accounts-api.js +432 -62
  19. package/dist/api/bank-transaction-api.d.ts +84 -104
  20. package/dist/api/bank-transaction-api.js +63 -74
  21. package/dist/api/health-check-api.d.ts +70 -0
  22. package/dist/api/{default-api.js → health-check-api.js} +31 -27
  23. package/dist/api/payment-methods-api.d.ts +51 -151
  24. package/dist/api/payment-methods-api.js +48 -178
  25. package/dist/api/payment-reminders-api.d.ts +52 -79
  26. package/dist/api/payment-reminders-api.js +44 -62
  27. package/dist/api/payment-setup-api.d.ts +17 -9
  28. package/dist/api/payment-setup-api.js +17 -9
  29. package/dist/api/payments-api.d.ts +62 -98
  30. package/dist/api/payments-api.js +55 -85
  31. package/dist/api/refunds-api.d.ts +73 -91
  32. package/dist/api/refunds-api.js +58 -68
  33. package/dist/api/tenant-bank-account-api.d.ts +90 -105
  34. package/dist/api/tenant-bank-account-api.js +63 -75
  35. package/dist/api/webhooks-api.d.ts +29 -16
  36. package/dist/api/webhooks-api.js +29 -19
  37. package/dist/api.d.ts +2 -2
  38. package/dist/api.js +2 -2
  39. package/dist/base.d.ts +6 -3
  40. package/dist/base.js +31 -22
  41. package/dist/common.d.ts +2 -2
  42. package/dist/common.js +1 -1
  43. package/dist/configuration.d.ts +1 -1
  44. package/dist/configuration.js +1 -1
  45. package/dist/index.d.ts +1 -1
  46. package/dist/index.js +1 -1
  47. package/dist/models/{bank-transaction-response-class.d.ts → bank-transaction-class-without-expand-properties.d.ts} +31 -33
  48. package/dist/models/{bank-transaction-response-class.js → bank-transaction-class-without-expand-properties.js} +1 -1
  49. package/dist/models/create-bank-account-request-dto.d.ts +42 -0
  50. package/dist/models/{get-refund-response-class.js → create-bank-account-request-dto.js} +1 -1
  51. package/dist/models/create-payment-reminder-request-dto.d.ts +1 -1
  52. package/dist/models/create-payment-reminder-request-dto.js +1 -1
  53. package/dist/models/create-payment-request-dto.d.ts +3 -3
  54. package/dist/models/create-payment-request-dto.js +1 -1
  55. package/dist/models/create-refund-request-dto.d.ts +1 -1
  56. package/dist/models/create-refund-request-dto.js +1 -1
  57. package/dist/models/create-tenant-bank-account-request-dto.d.ts +1 -1
  58. package/dist/models/create-tenant-bank-account-request-dto.js +1 -1
  59. package/dist/models/create-tenant-bank-account-response-class.d.ts +25 -0
  60. package/dist/models/{create-refund-response-class.js → create-tenant-bank-account-response-class.js} +1 -1
  61. package/dist/models/deactivate-payment-reminder-request-dto.d.ts +1 -1
  62. package/dist/models/deactivate-payment-reminder-request-dto.js +1 -1
  63. package/dist/models/get-tenant-bank-account-response-class.d.ts +5 -5
  64. package/dist/models/get-tenant-bank-account-response-class.js +1 -1
  65. package/dist/models/index.d.ts +10 -10
  66. package/dist/models/index.js +10 -10
  67. package/dist/models/inline-response200.d.ts +1 -1
  68. package/dist/models/inline-response200.js +1 -1
  69. package/dist/models/inline-response503.d.ts +1 -1
  70. package/dist/models/inline-response503.js +1 -1
  71. package/dist/models/link-bank-transaction-request-dto-rest.d.ts +1 -1
  72. package/dist/models/link-bank-transaction-request-dto-rest.js +1 -1
  73. package/dist/models/list-tenant-bank-account-response-class.d.ts +31 -0
  74. package/dist/models/{get-bank-transactions-response-class.js → list-tenant-bank-account-response-class.js} +1 -1
  75. package/dist/models/set-primary-bank-account-request-dto-rest.d.ts +24 -0
  76. package/dist/models/set-primary-bank-account-request-dto-rest.js +15 -0
  77. package/dist/models/{tenant-bank-account-response-class.d.ts → tenant-bank-account-class-without-expand-properties.d.ts} +23 -11
  78. package/dist/models/tenant-bank-account-class-without-expand-properties.js +15 -0
  79. package/dist/models/tenant-bank-account-class.d.ts +85 -0
  80. package/dist/models/tenant-bank-account-class.js +15 -0
  81. package/dist/models/unlink-bank-transaction-request-dto-rest.d.ts +2 -2
  82. package/dist/models/unlink-bank-transaction-request-dto-rest.js +1 -1
  83. package/dist/models/update-bank-account-request-dto-rest.d.ts +30 -0
  84. package/dist/models/update-bank-account-request-dto-rest.js +15 -0
  85. package/dist/models/update-bank-account-request-dto.d.ts +36 -0
  86. package/dist/models/update-bank-account-request-dto.js +15 -0
  87. package/dist/models/update-tenant-bank-account-response-class.d.ts +25 -0
  88. package/dist/models/update-tenant-bank-account-response-class.js +15 -0
  89. package/dist/models/update-tenant-bank-account-rest-request-dto.d.ts +1 -1
  90. package/dist/models/update-tenant-bank-account-rest-request-dto.js +1 -1
  91. package/dist/models/validate-pspconfig-request-dto.d.ts +1 -1
  92. package/dist/models/validate-pspconfig-request-dto.js +1 -1
  93. package/index.ts +1 -1
  94. package/models/{bank-transaction-response-class.ts → bank-transaction-class-without-expand-properties.ts} +31 -33
  95. package/models/create-bank-account-request-dto.ts +48 -0
  96. package/models/create-payment-reminder-request-dto.ts +1 -1
  97. package/models/create-payment-request-dto.ts +3 -3
  98. package/models/create-refund-request-dto.ts +1 -1
  99. package/models/create-tenant-bank-account-request-dto.ts +1 -1
  100. package/models/create-tenant-bank-account-response-class.ts +31 -0
  101. package/models/deactivate-payment-reminder-request-dto.ts +1 -1
  102. package/models/get-tenant-bank-account-response-class.ts +5 -5
  103. package/models/index.ts +10 -10
  104. package/models/inline-response200.ts +1 -1
  105. package/models/inline-response503.ts +1 -1
  106. package/models/link-bank-transaction-request-dto-rest.ts +1 -1
  107. package/models/list-tenant-bank-account-response-class.ts +37 -0
  108. package/models/set-primary-bank-account-request-dto-rest.ts +30 -0
  109. package/models/{tenant-bank-account-response-class.ts → tenant-bank-account-class-without-expand-properties.ts} +23 -11
  110. package/models/tenant-bank-account-class.ts +91 -0
  111. package/models/unlink-bank-transaction-request-dto-rest.ts +2 -2
  112. package/models/update-bank-account-request-dto-rest.ts +36 -0
  113. package/models/update-bank-account-request-dto.ts +42 -0
  114. package/models/update-tenant-bank-account-response-class.ts +31 -0
  115. package/models/update-tenant-bank-account-rest-request-dto.ts +1 -1
  116. package/models/validate-pspconfig-request-dto.ts +1 -1
  117. package/package.json +1 -1
  118. package/dist/api/default-api.d.ts +0 -66
  119. package/dist/models/create-refund-response-class.d.ts +0 -25
  120. package/dist/models/get-bank-transactions-response-class.d.ts +0 -25
  121. package/dist/models/get-refund-response-class.d.ts +0 -25
  122. package/dist/models/get-request-dto.d.ts +0 -30
  123. package/dist/models/get-request-dto.js +0 -15
  124. package/dist/models/list-bank-transactions-response-class.d.ts +0 -31
  125. package/dist/models/list-bank-transactions-response-class.js +0 -15
  126. package/dist/models/list-refunds-response-class.d.ts +0 -31
  127. package/dist/models/list-refunds-response-class.js +0 -15
  128. package/dist/models/refund-class.d.ts +0 -104
  129. package/dist/models/refund-class.js +0 -28
  130. package/dist/models/tenant-bank-account-response-class.js +0 -15
  131. package/dist/models/transaction-class.d.ts +0 -54
  132. package/dist/models/transaction-class.js +0 -15
  133. package/models/create-refund-response-class.ts +0 -31
  134. package/models/get-bank-transactions-response-class.ts +0 -31
  135. package/models/get-refund-response-class.ts +0 -31
  136. package/models/get-request-dto.ts +0 -36
  137. package/models/list-bank-transactions-response-class.ts +0 -37
  138. package/models/list-refunds-response-class.ts +0 -37
  139. package/models/refund-class.ts +0 -114
  140. package/models/transaction-class.ts +0 -60
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable */
3
3
  /**
4
4
  * Emil Payment Service
5
- * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
5
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
6
6
  *
7
7
  * The version of the OpenAPI document: 1.0
8
8
  * Contact: kontakt@emil.de
@@ -20,6 +20,12 @@ 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 { SetPrimaryBankAccountRequestDtoRest } from '../models';
27
+ // @ts-ignore
28
+ import { UpdateBankAccountRequestDtoRest } from '../models';
23
29
  /**
24
30
  * BankAccountsApi - axios parameter creator
25
31
  * @export
@@ -27,16 +33,16 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr
27
33
  export const BankAccountsApiAxiosParamCreator = function (configuration?: Configuration) {
28
34
  return {
29
35
  /**
30
- * Creates a bank account for a specified account.
31
- * @summary Create a bank account
32
- * @param {object} body
36
+ * This will create a bank account for a specified partner/account. If this is the first bank account for the specified partner/account, it will be marked as primary.
37
+ * @summary Create the bank account
38
+ * @param {CreateBankAccountRequestDto} createBankAccountRequestDto
33
39
  * @param {string} [authorization] Bearer Token
34
40
  * @param {*} [options] Override http request option.
35
41
  * @throws {RequiredError}
36
42
  */
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)
43
+ createBankAccount: async (createBankAccountRequestDto: CreateBankAccountRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
44
+ // verify required parameter 'createBankAccountRequestDto' is not null or undefined
45
+ assertParamExists('createBankAccount', 'createBankAccountRequestDto', createBankAccountRequestDto)
40
46
  const localVarPath = `/paymentservice/v1/bank-accounts`;
41
47
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
42
48
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -66,7 +72,7 @@ export const BankAccountsApiAxiosParamCreator = function (configuration?: Config
66
72
  setSearchParams(localVarUrlObj, localVarQueryParameter);
67
73
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
68
74
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
69
- localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
75
+ localVarRequestOptions.data = serializeDataIfNeeded(createBankAccountRequestDto, localVarRequestOptions, configuration)
70
76
 
71
77
  return {
72
78
  url: toPathString(localVarUrlObj),
@@ -74,21 +80,64 @@ export const BankAccountsApiAxiosParamCreator = function (configuration?: Config
74
80
  };
75
81
  },
76
82
  /**
77
- * 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.
78
- * @summary List bank accounts
83
+ * Deletes a bank account by code. If the bank account was primary, then the first available bank account for the specified partner/account will be marked as primary.
84
+ * @summary Delete the bank account
85
+ * @param {string} code Unique identifier for the object.
79
86
  * @param {string} [authorization] Bearer Token
80
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
81
- * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
82
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
83
- * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
84
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
85
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
86
- * @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
87
87
  * @param {*} [options] Override http request option.
88
88
  * @throws {RequiredError}
89
89
  */
90
- listBankAccounts: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
91
- const localVarPath = `/paymentservice/v1/bank-accounts`;
90
+ deleteBankAccount: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
91
+ // verify required parameter 'code' is not null or undefined
92
+ assertParamExists('deleteBankAccount', 'code', code)
93
+ const localVarPath = `/paymentservice/v1/bank-accounts/{code}`
94
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
95
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
96
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
97
+ let baseOptions;
98
+ let baseAccessToken;
99
+ if (configuration) {
100
+ baseOptions = configuration.baseOptions;
101
+ baseAccessToken = configuration.accessToken;
102
+ }
103
+
104
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
105
+ const localVarHeaderParameter = {} as any;
106
+ const localVarQueryParameter = {} as any;
107
+
108
+ // authentication bearer required
109
+ // http bearer authentication required
110
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
111
+
112
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
113
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
114
+ }
115
+
116
+
117
+
118
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
119
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
120
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
121
+
122
+ return {
123
+ url: toPathString(localVarUrlObj),
124
+ options: localVarRequestOptions,
125
+ };
126
+ },
127
+ /**
128
+ * Retrieves the details of the bank account that was previously created. Supply the unique bank account code that was returned when you created it and Emil Api will return the corresponding bank account information.
129
+ * @summary Retrieve the bank account
130
+ * @param {string} code
131
+ * @param {string} [authorization] Bearer Token
132
+ * @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: primaryBankAccount&lt;i&gt;
133
+ * @param {*} [options] Override http request option.
134
+ * @throws {RequiredError}
135
+ */
136
+ getBankAccount: async (code: string, authorization?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
137
+ // verify required parameter 'code' is not null or undefined
138
+ assertParamExists('getBankAccount', 'code', code)
139
+ const localVarPath = `/paymentservice/v1/bank-accounts/{code}`
140
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
92
141
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
93
142
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
94
143
  let baseOptions;
@@ -106,20 +155,61 @@ export const BankAccountsApiAxiosParamCreator = function (configuration?: Config
106
155
  // http bearer authentication required
107
156
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
108
157
 
109
- if (pageSize !== undefined) {
110
- localVarQueryParameter['pageSize'] = pageSize;
158
+ if (expand !== undefined) {
159
+ localVarQueryParameter['expand'] = expand;
160
+ }
161
+
162
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
163
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
111
164
  }
112
165
 
113
- if (pageToken !== undefined) {
114
- localVarQueryParameter['pageToken'] = pageToken;
166
+
167
+
168
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
169
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
170
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
171
+
172
+ return {
173
+ url: toPathString(localVarUrlObj),
174
+ options: localVarRequestOptions,
175
+ };
176
+ },
177
+ /**
178
+ * Returns a list of bank accounts you have previously created. The bank accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
179
+ * @summary List bank accounts
180
+ * @param {string} [authorization] Bearer Token
181
+ * @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: code, id, accountCode, partnerCode&lt;/i&gt;
182
+ * @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: code, id, accountCode, partnerCode&lt;/i&gt;
183
+ * @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&lt;/i&gt;
184
+ * @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: primaryBankAccount&lt;i&gt;
185
+ * @param {*} [options] Override http request option.
186
+ * @throws {RequiredError}
187
+ */
188
+ listBankAccounts: async (authorization?: string, filter?: string, filters?: string, order?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
189
+ const localVarPath = `/paymentservice/v1/bank-accounts`;
190
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
191
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
192
+ let baseOptions;
193
+ let baseAccessToken;
194
+ if (configuration) {
195
+ baseOptions = configuration.baseOptions;
196
+ baseAccessToken = configuration.accessToken;
115
197
  }
116
198
 
199
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
200
+ const localVarHeaderParameter = {} as any;
201
+ const localVarQueryParameter = {} as any;
202
+
203
+ // authentication bearer required
204
+ // http bearer authentication required
205
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
206
+
117
207
  if (filter !== undefined) {
118
208
  localVarQueryParameter['filter'] = filter;
119
209
  }
120
210
 
121
- if (search !== undefined) {
122
- localVarQueryParameter['search'] = search;
211
+ if (filters !== undefined) {
212
+ localVarQueryParameter['filters'] = filters;
123
213
  }
124
214
 
125
215
  if (order !== undefined) {
@@ -130,19 +220,117 @@ export const BankAccountsApiAxiosParamCreator = function (configuration?: Config
130
220
  localVarQueryParameter['expand'] = expand;
131
221
  }
132
222
 
133
- if (filters !== undefined) {
134
- localVarQueryParameter['filters'] = filters;
223
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
224
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
225
+ }
226
+
227
+
228
+
229
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
230
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
231
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
232
+
233
+ return {
234
+ url: toPathString(localVarUrlObj),
235
+ options: localVarRequestOptions,
236
+ };
237
+ },
238
+ /**
239
+ * Set the primary bank account for the specified partner/account
240
+ * @summary Set primary bank account
241
+ * @param {string} code Code of the bank account to set primary
242
+ * @param {SetPrimaryBankAccountRequestDtoRest} setPrimaryBankAccountRequestDtoRest
243
+ * @param {string} [authorization] Bearer Token
244
+ * @param {*} [options] Override http request option.
245
+ * @throws {RequiredError}
246
+ */
247
+ setPrimaryBankAccount: async (code: string, setPrimaryBankAccountRequestDtoRest: SetPrimaryBankAccountRequestDtoRest, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
248
+ // verify required parameter 'code' is not null or undefined
249
+ assertParamExists('setPrimaryBankAccount', 'code', code)
250
+ // verify required parameter 'setPrimaryBankAccountRequestDtoRest' is not null or undefined
251
+ assertParamExists('setPrimaryBankAccount', 'setPrimaryBankAccountRequestDtoRest', setPrimaryBankAccountRequestDtoRest)
252
+ const localVarPath = `/paymentservice/v1/bank-accounts/{code}/primary`
253
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
254
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
255
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
256
+ let baseOptions;
257
+ let baseAccessToken;
258
+ if (configuration) {
259
+ baseOptions = configuration.baseOptions;
260
+ baseAccessToken = configuration.accessToken;
261
+ }
262
+
263
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
264
+ const localVarHeaderParameter = {} as any;
265
+ const localVarQueryParameter = {} as any;
266
+
267
+ // authentication bearer required
268
+ // http bearer authentication required
269
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
270
+
271
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
272
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
273
+ }
274
+
275
+
276
+
277
+ localVarHeaderParameter['Content-Type'] = 'application/json';
278
+
279
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
280
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
281
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
282
+ localVarRequestOptions.data = serializeDataIfNeeded(setPrimaryBankAccountRequestDtoRest, localVarRequestOptions, configuration)
283
+
284
+ return {
285
+ url: toPathString(localVarUrlObj),
286
+ options: localVarRequestOptions,
287
+ };
288
+ },
289
+ /**
290
+ * Update a bank account by code
291
+ * @summary Update the bank account
292
+ * @param {string} code Unique identifier for the object.
293
+ * @param {UpdateBankAccountRequestDtoRest} updateBankAccountRequestDtoRest
294
+ * @param {string} [authorization] Bearer Token
295
+ * @param {*} [options] Override http request option.
296
+ * @throws {RequiredError}
297
+ */
298
+ updateBankAccount: async (code: string, updateBankAccountRequestDtoRest: UpdateBankAccountRequestDtoRest, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
299
+ // verify required parameter 'code' is not null or undefined
300
+ assertParamExists('updateBankAccount', 'code', code)
301
+ // verify required parameter 'updateBankAccountRequestDtoRest' is not null or undefined
302
+ assertParamExists('updateBankAccount', 'updateBankAccountRequestDtoRest', updateBankAccountRequestDtoRest)
303
+ const localVarPath = `/paymentservice/v1/bank-accounts/{code}`
304
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
305
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
306
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
307
+ let baseOptions;
308
+ let baseAccessToken;
309
+ if (configuration) {
310
+ baseOptions = configuration.baseOptions;
311
+ baseAccessToken = configuration.accessToken;
135
312
  }
136
313
 
314
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
315
+ const localVarHeaderParameter = {} as any;
316
+ const localVarQueryParameter = {} as any;
317
+
318
+ // authentication bearer required
319
+ // http bearer authentication required
320
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
321
+
137
322
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
138
323
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
139
324
  }
140
325
 
141
326
 
142
327
 
328
+ localVarHeaderParameter['Content-Type'] = 'application/json';
329
+
143
330
  setSearchParams(localVarUrlObj, localVarQueryParameter);
144
331
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
145
332
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
333
+ localVarRequestOptions.data = serializeDataIfNeeded(updateBankAccountRequestDtoRest, localVarRequestOptions, configuration)
146
334
 
147
335
  return {
148
336
  url: toPathString(localVarUrlObj),
@@ -160,33 +348,81 @@ export const BankAccountsApiFp = function(configuration?: Configuration) {
160
348
  const localVarAxiosParamCreator = BankAccountsApiAxiosParamCreator(configuration)
161
349
  return {
162
350
  /**
163
- * Creates a bank account for a specified account.
164
- * @summary Create a bank account
165
- * @param {object} body
351
+ * This will create a bank account for a specified partner/account. If this is the first bank account for the specified partner/account, it will be marked as primary.
352
+ * @summary Create the bank account
353
+ * @param {CreateBankAccountRequestDto} createBankAccountRequestDto
354
+ * @param {string} [authorization] Bearer Token
355
+ * @param {*} [options] Override http request option.
356
+ * @throws {RequiredError}
357
+ */
358
+ async createBankAccount(createBankAccountRequestDto: CreateBankAccountRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
359
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createBankAccount(createBankAccountRequestDto, authorization, options);
360
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
361
+ },
362
+ /**
363
+ * Deletes a bank account by code. If the bank account was primary, then the first available bank account for the specified partner/account will be marked as primary.
364
+ * @summary Delete the bank account
365
+ * @param {string} code Unique identifier for the object.
366
+ * @param {string} [authorization] Bearer Token
367
+ * @param {*} [options] Override http request option.
368
+ * @throws {RequiredError}
369
+ */
370
+ async deleteBankAccount(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
371
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBankAccount(code, authorization, options);
372
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
373
+ },
374
+ /**
375
+ * Retrieves the details of the bank account that was previously created. Supply the unique bank account code that was returned when you created it and Emil Api will return the corresponding bank account information.
376
+ * @summary Retrieve the bank account
377
+ * @param {string} code
166
378
  * @param {string} [authorization] Bearer Token
379
+ * @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: primaryBankAccount&lt;i&gt;
167
380
  * @param {*} [options] Override http request option.
168
381
  * @throws {RequiredError}
169
382
  */
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);
383
+ async getBankAccount(code: string, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
384
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getBankAccount(code, authorization, expand, options);
172
385
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
173
386
  },
174
387
  /**
175
- * 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.
388
+ * Returns a list of bank accounts you have previously created. The bank accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
176
389
  * @summary List bank accounts
177
390
  * @param {string} [authorization] Bearer Token
178
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
179
- * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
180
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
181
- * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
182
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
183
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
184
- * @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
391
+ * @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: code, id, accountCode, partnerCode&lt;/i&gt;
392
+ * @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: code, id, accountCode, partnerCode&lt;/i&gt;
393
+ * @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&lt;/i&gt;
394
+ * @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: primaryBankAccount&lt;i&gt;
185
395
  * @param {*} [options] Override http request option.
186
396
  * @throws {RequiredError}
187
397
  */
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>> {
189
- const localVarAxiosArgs = await localVarAxiosParamCreator.listBankAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
398
+ async listBankAccounts(authorization?: string, filter?: string, filters?: string, order?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
399
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listBankAccounts(authorization, filter, filters, order, expand, options);
400
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
401
+ },
402
+ /**
403
+ * Set the primary bank account for the specified partner/account
404
+ * @summary Set primary bank account
405
+ * @param {string} code Code of the bank account to set primary
406
+ * @param {SetPrimaryBankAccountRequestDtoRest} setPrimaryBankAccountRequestDtoRest
407
+ * @param {string} [authorization] Bearer Token
408
+ * @param {*} [options] Override http request option.
409
+ * @throws {RequiredError}
410
+ */
411
+ async setPrimaryBankAccount(code: string, setPrimaryBankAccountRequestDtoRest: SetPrimaryBankAccountRequestDtoRest, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
412
+ const localVarAxiosArgs = await localVarAxiosParamCreator.setPrimaryBankAccount(code, setPrimaryBankAccountRequestDtoRest, authorization, options);
413
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
414
+ },
415
+ /**
416
+ * Update a bank account by code
417
+ * @summary Update the bank account
418
+ * @param {string} code Unique identifier for the object.
419
+ * @param {UpdateBankAccountRequestDtoRest} updateBankAccountRequestDtoRest
420
+ * @param {string} [authorization] Bearer Token
421
+ * @param {*} [options] Override http request option.
422
+ * @throws {RequiredError}
423
+ */
424
+ async updateBankAccount(code: string, updateBankAccountRequestDtoRest: UpdateBankAccountRequestDtoRest, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
425
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateBankAccount(code, updateBankAccountRequestDtoRest, authorization, options);
190
426
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
191
427
  },
192
428
  }
@@ -200,32 +436,76 @@ export const BankAccountsApiFactory = function (configuration?: Configuration, b
200
436
  const localVarFp = BankAccountsApiFp(configuration)
201
437
  return {
202
438
  /**
203
- * Creates a bank account for a specified account.
204
- * @summary Create a bank account
205
- * @param {object} body
439
+ * This will create a bank account for a specified partner/account. If this is the first bank account for the specified partner/account, it will be marked as primary.
440
+ * @summary Create the bank account
441
+ * @param {CreateBankAccountRequestDto} createBankAccountRequestDto
206
442
  * @param {string} [authorization] Bearer Token
207
443
  * @param {*} [options] Override http request option.
208
444
  * @throws {RequiredError}
209
445
  */
210
- createBankAccount(body: object, authorization?: string, options?: any): AxiosPromise<void> {
211
- return localVarFp.createBankAccount(body, authorization, options).then((request) => request(axios, basePath));
446
+ createBankAccount(createBankAccountRequestDto: CreateBankAccountRequestDto, authorization?: string, options?: any): AxiosPromise<void> {
447
+ return localVarFp.createBankAccount(createBankAccountRequestDto, authorization, options).then((request) => request(axios, basePath));
212
448
  },
213
449
  /**
214
- * 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.
450
+ * Deletes a bank account by code. If the bank account was primary, then the first available bank account for the specified partner/account will be marked as primary.
451
+ * @summary Delete the bank account
452
+ * @param {string} code Unique identifier for the object.
453
+ * @param {string} [authorization] Bearer Token
454
+ * @param {*} [options] Override http request option.
455
+ * @throws {RequiredError}
456
+ */
457
+ deleteBankAccount(code: string, authorization?: string, options?: any): AxiosPromise<void> {
458
+ return localVarFp.deleteBankAccount(code, authorization, options).then((request) => request(axios, basePath));
459
+ },
460
+ /**
461
+ * Retrieves the details of the bank account that was previously created. Supply the unique bank account code that was returned when you created it and Emil Api will return the corresponding bank account information.
462
+ * @summary Retrieve the bank account
463
+ * @param {string} code
464
+ * @param {string} [authorization] Bearer Token
465
+ * @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: primaryBankAccount&lt;i&gt;
466
+ * @param {*} [options] Override http request option.
467
+ * @throws {RequiredError}
468
+ */
469
+ getBankAccount(code: string, authorization?: string, expand?: string, options?: any): AxiosPromise<void> {
470
+ return localVarFp.getBankAccount(code, authorization, expand, options).then((request) => request(axios, basePath));
471
+ },
472
+ /**
473
+ * Returns a list of bank accounts you have previously created. The bank accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
215
474
  * @summary List bank accounts
216
475
  * @param {string} [authorization] Bearer Token
217
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
218
- * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
219
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
220
- * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
221
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
222
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
223
- * @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
476
+ * @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: code, id, accountCode, partnerCode&lt;/i&gt;
477
+ * @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: code, id, accountCode, partnerCode&lt;/i&gt;
478
+ * @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&lt;/i&gt;
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: primaryBankAccount&lt;i&gt;
480
+ * @param {*} [options] Override http request option.
481
+ * @throws {RequiredError}
482
+ */
483
+ listBankAccounts(authorization?: string, filter?: string, filters?: string, order?: string, expand?: string, options?: any): AxiosPromise<void> {
484
+ return localVarFp.listBankAccounts(authorization, filter, filters, order, expand, options).then((request) => request(axios, basePath));
485
+ },
486
+ /**
487
+ * Set the primary bank account for the specified partner/account
488
+ * @summary Set primary bank account
489
+ * @param {string} code Code of the bank account to set primary
490
+ * @param {SetPrimaryBankAccountRequestDtoRest} setPrimaryBankAccountRequestDtoRest
491
+ * @param {string} [authorization] Bearer Token
492
+ * @param {*} [options] Override http request option.
493
+ * @throws {RequiredError}
494
+ */
495
+ setPrimaryBankAccount(code: string, setPrimaryBankAccountRequestDtoRest: SetPrimaryBankAccountRequestDtoRest, authorization?: string, options?: any): AxiosPromise<void> {
496
+ return localVarFp.setPrimaryBankAccount(code, setPrimaryBankAccountRequestDtoRest, authorization, options).then((request) => request(axios, basePath));
497
+ },
498
+ /**
499
+ * Update a bank account by code
500
+ * @summary Update the bank account
501
+ * @param {string} code Unique identifier for the object.
502
+ * @param {UpdateBankAccountRequestDtoRest} updateBankAccountRequestDtoRest
503
+ * @param {string} [authorization] Bearer Token
224
504
  * @param {*} [options] Override http request option.
225
505
  * @throws {RequiredError}
226
506
  */
227
- listBankAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<void> {
228
- return localVarFp.listBankAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
507
+ updateBankAccount(code: string, updateBankAccountRequestDtoRest: UpdateBankAccountRequestDtoRest, authorization?: string, options?: any): AxiosPromise<void> {
508
+ return localVarFp.updateBankAccount(code, updateBankAccountRequestDtoRest, authorization, options).then((request) => request(axios, basePath));
229
509
  },
230
510
  };
231
511
  };
@@ -238,10 +518,10 @@ export const BankAccountsApiFactory = function (configuration?: Configuration, b
238
518
  export interface BankAccountsApiCreateBankAccountRequest {
239
519
  /**
240
520
  *
241
- * @type {object}
521
+ * @type {CreateBankAccountRequestDto}
242
522
  * @memberof BankAccountsApiCreateBankAccount
243
523
  */
244
- readonly body: object
524
+ readonly createBankAccountRequestDto: CreateBankAccountRequestDto
245
525
 
246
526
  /**
247
527
  * Bearer Token
@@ -251,6 +531,55 @@ export interface BankAccountsApiCreateBankAccountRequest {
251
531
  readonly authorization?: string
252
532
  }
253
533
 
534
+ /**
535
+ * Request parameters for deleteBankAccount operation in BankAccountsApi.
536
+ * @export
537
+ * @interface BankAccountsApiDeleteBankAccountRequest
538
+ */
539
+ export interface BankAccountsApiDeleteBankAccountRequest {
540
+ /**
541
+ * Unique identifier for the object.
542
+ * @type {string}
543
+ * @memberof BankAccountsApiDeleteBankAccount
544
+ */
545
+ readonly code: string
546
+
547
+ /**
548
+ * Bearer Token
549
+ * @type {string}
550
+ * @memberof BankAccountsApiDeleteBankAccount
551
+ */
552
+ readonly authorization?: string
553
+ }
554
+
555
+ /**
556
+ * Request parameters for getBankAccount operation in BankAccountsApi.
557
+ * @export
558
+ * @interface BankAccountsApiGetBankAccountRequest
559
+ */
560
+ export interface BankAccountsApiGetBankAccountRequest {
561
+ /**
562
+ *
563
+ * @type {string}
564
+ * @memberof BankAccountsApiGetBankAccount
565
+ */
566
+ readonly code: string
567
+
568
+ /**
569
+ * Bearer Token
570
+ * @type {string}
571
+ * @memberof BankAccountsApiGetBankAccount
572
+ */
573
+ readonly authorization?: string
574
+
575
+ /**
576
+ * 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: primaryBankAccount&lt;i&gt;
577
+ * @type {string}
578
+ * @memberof BankAccountsApiGetBankAccount
579
+ */
580
+ readonly expand?: string
581
+ }
582
+
254
583
  /**
255
584
  * Request parameters for listBankAccounts operation in BankAccountsApi.
256
585
  * @export
@@ -265,53 +594,88 @@ export interface BankAccountsApiListBankAccountsRequest {
265
594
  readonly authorization?: string
266
595
 
267
596
  /**
268
- * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
269
- * @type {any}
597
+ * 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: code, id, accountCode, partnerCode&lt;/i&gt;
598
+ * @type {string}
270
599
  * @memberof BankAccountsApiListBankAccounts
271
600
  */
272
- readonly pageSize?: any
601
+ readonly filter?: string
273
602
 
274
603
  /**
275
- * A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
276
- * @type {any}
604
+ * 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: code, id, accountCode, partnerCode&lt;/i&gt;
605
+ * @type {string}
277
606
  * @memberof BankAccountsApiListBankAccounts
278
607
  */
279
- readonly pageToken?: any
608
+ readonly filters?: string
280
609
 
281
610
  /**
282
- * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
283
- * @type {any}
611
+ * 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&lt;/i&gt;
612
+ * @type {string}
284
613
  * @memberof BankAccountsApiListBankAccounts
285
614
  */
286
- readonly filter?: any
615
+ readonly order?: string
287
616
 
288
617
  /**
289
- * Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
290
- * @type {any}
618
+ * 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: primaryBankAccount&lt;i&gt;
619
+ * @type {string}
291
620
  * @memberof BankAccountsApiListBankAccounts
292
621
  */
293
- readonly search?: any
622
+ readonly expand?: string
623
+ }
624
+
625
+ /**
626
+ * Request parameters for setPrimaryBankAccount operation in BankAccountsApi.
627
+ * @export
628
+ * @interface BankAccountsApiSetPrimaryBankAccountRequest
629
+ */
630
+ export interface BankAccountsApiSetPrimaryBankAccountRequest {
631
+ /**
632
+ * Code of the bank account to set primary
633
+ * @type {string}
634
+ * @memberof BankAccountsApiSetPrimaryBankAccount
635
+ */
636
+ readonly code: string
294
637
 
295
638
  /**
296
- * The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
297
- * @type {any}
298
- * @memberof BankAccountsApiListBankAccounts
639
+ *
640
+ * @type {SetPrimaryBankAccountRequestDtoRest}
641
+ * @memberof BankAccountsApiSetPrimaryBankAccount
299
642
  */
300
- readonly order?: any
643
+ readonly setPrimaryBankAccountRequestDtoRest: SetPrimaryBankAccountRequestDtoRest
301
644
 
302
645
  /**
303
- * Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
304
- * @type {any}
305
- * @memberof BankAccountsApiListBankAccounts
646
+ * Bearer Token
647
+ * @type {string}
648
+ * @memberof BankAccountsApiSetPrimaryBankAccount
306
649
  */
307
- readonly expand?: any
650
+ readonly authorization?: string
651
+ }
308
652
 
653
+ /**
654
+ * Request parameters for updateBankAccount operation in BankAccountsApi.
655
+ * @export
656
+ * @interface BankAccountsApiUpdateBankAccountRequest
657
+ */
658
+ export interface BankAccountsApiUpdateBankAccountRequest {
309
659
  /**
310
- * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
311
- * @type {any}
312
- * @memberof BankAccountsApiListBankAccounts
660
+ * Unique identifier for the object.
661
+ * @type {string}
662
+ * @memberof BankAccountsApiUpdateBankAccount
313
663
  */
314
- readonly filters?: any
664
+ readonly code: string
665
+
666
+ /**
667
+ *
668
+ * @type {UpdateBankAccountRequestDtoRest}
669
+ * @memberof BankAccountsApiUpdateBankAccount
670
+ */
671
+ readonly updateBankAccountRequestDtoRest: UpdateBankAccountRequestDtoRest
672
+
673
+ /**
674
+ * Bearer Token
675
+ * @type {string}
676
+ * @memberof BankAccountsApiUpdateBankAccount
677
+ */
678
+ readonly authorization?: string
315
679
  }
316
680
 
317
681
  /**
@@ -322,19 +686,43 @@ export interface BankAccountsApiListBankAccountsRequest {
322
686
  */
323
687
  export class BankAccountsApi extends BaseAPI {
324
688
  /**
325
- * Creates a bank account for a specified account.
326
- * @summary Create a bank account
689
+ * This will create a bank account for a specified partner/account. If this is the first bank account for the specified partner/account, it will be marked as primary.
690
+ * @summary Create the bank account
327
691
  * @param {BankAccountsApiCreateBankAccountRequest} requestParameters Request parameters.
328
692
  * @param {*} [options] Override http request option.
329
693
  * @throws {RequiredError}
330
694
  * @memberof BankAccountsApi
331
695
  */
332
696
  public createBankAccount(requestParameters: BankAccountsApiCreateBankAccountRequest, options?: AxiosRequestConfig) {
333
- return BankAccountsApiFp(this.configuration).createBankAccount(requestParameters.body, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
697
+ return BankAccountsApiFp(this.configuration).createBankAccount(requestParameters.createBankAccountRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
698
+ }
699
+
700
+ /**
701
+ * Deletes a bank account by code. If the bank account was primary, then the first available bank account for the specified partner/account will be marked as primary.
702
+ * @summary Delete the bank account
703
+ * @param {BankAccountsApiDeleteBankAccountRequest} requestParameters Request parameters.
704
+ * @param {*} [options] Override http request option.
705
+ * @throws {RequiredError}
706
+ * @memberof BankAccountsApi
707
+ */
708
+ public deleteBankAccount(requestParameters: BankAccountsApiDeleteBankAccountRequest, options?: AxiosRequestConfig) {
709
+ return BankAccountsApiFp(this.configuration).deleteBankAccount(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
710
+ }
711
+
712
+ /**
713
+ * Retrieves the details of the bank account that was previously created. Supply the unique bank account code that was returned when you created it and Emil Api will return the corresponding bank account information.
714
+ * @summary Retrieve the bank account
715
+ * @param {BankAccountsApiGetBankAccountRequest} requestParameters Request parameters.
716
+ * @param {*} [options] Override http request option.
717
+ * @throws {RequiredError}
718
+ * @memberof BankAccountsApi
719
+ */
720
+ public getBankAccount(requestParameters: BankAccountsApiGetBankAccountRequest, options?: AxiosRequestConfig) {
721
+ return BankAccountsApiFp(this.configuration).getBankAccount(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
334
722
  }
335
723
 
336
724
  /**
337
- * 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.
725
+ * Returns a list of bank accounts you have previously created. The bank accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
338
726
  * @summary List bank accounts
339
727
  * @param {BankAccountsApiListBankAccountsRequest} requestParameters Request parameters.
340
728
  * @param {*} [options] Override http request option.
@@ -342,6 +730,30 @@ export class BankAccountsApi extends BaseAPI {
342
730
  * @memberof BankAccountsApi
343
731
  */
344
732
  public listBankAccounts(requestParameters: BankAccountsApiListBankAccountsRequest = {}, options?: AxiosRequestConfig) {
345
- return BankAccountsApiFp(this.configuration).listBankAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
733
+ return BankAccountsApiFp(this.configuration).listBankAccounts(requestParameters.authorization, requestParameters.filter, requestParameters.filters, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
734
+ }
735
+
736
+ /**
737
+ * Set the primary bank account for the specified partner/account
738
+ * @summary Set primary bank account
739
+ * @param {BankAccountsApiSetPrimaryBankAccountRequest} requestParameters Request parameters.
740
+ * @param {*} [options] Override http request option.
741
+ * @throws {RequiredError}
742
+ * @memberof BankAccountsApi
743
+ */
744
+ public setPrimaryBankAccount(requestParameters: BankAccountsApiSetPrimaryBankAccountRequest, options?: AxiosRequestConfig) {
745
+ return BankAccountsApiFp(this.configuration).setPrimaryBankAccount(requestParameters.code, requestParameters.setPrimaryBankAccountRequestDtoRest, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
746
+ }
747
+
748
+ /**
749
+ * Update a bank account by code
750
+ * @summary Update the bank account
751
+ * @param {BankAccountsApiUpdateBankAccountRequest} requestParameters Request parameters.
752
+ * @param {*} [options] Override http request option.
753
+ * @throws {RequiredError}
754
+ * @memberof BankAccountsApi
755
+ */
756
+ public updateBankAccount(requestParameters: BankAccountsApiUpdateBankAccountRequest, options?: AxiosRequestConfig) {
757
+ return BankAccountsApiFp(this.configuration).updateBankAccount(requestParameters.code, requestParameters.updateBankAccountRequestDtoRest, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
346
758
  }
347
759
  }