@emilgroup/payment-sdk 1.14.1-beta.50 → 1.14.1-beta.52

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 (32) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +2 -2
  3. package/api/credit-allocation-api.ts +456 -0
  4. package/api.ts +2 -0
  5. package/dist/api/credit-allocation-api.d.ts +263 -0
  6. package/dist/api/credit-allocation-api.js +445 -0
  7. package/dist/api.d.ts +1 -0
  8. package/dist/api.js +1 -0
  9. package/dist/models/billing-address-dto.d.ts +2 -16
  10. package/dist/models/billing-address-dto.js +0 -14
  11. package/dist/models/create-credit-allocation-request-dto.d.ts +54 -0
  12. package/dist/models/create-credit-allocation-request-dto.js +21 -0
  13. package/dist/models/create-credit-allocation-response-class.d.ts +25 -0
  14. package/dist/models/create-credit-allocation-response-class.js +15 -0
  15. package/dist/models/credit-allocation-class.d.ts +115 -0
  16. package/dist/models/credit-allocation-class.js +21 -0
  17. package/dist/models/exceeding-credit-class.d.ts +6 -0
  18. package/dist/models/get-credit-allocation-response-class.d.ts +25 -0
  19. package/dist/models/get-credit-allocation-response-class.js +15 -0
  20. package/dist/models/index.d.ts +5 -0
  21. package/dist/models/index.js +5 -0
  22. package/dist/models/list-credit-allocations-response-class.d.ts +43 -0
  23. package/dist/models/list-credit-allocations-response-class.js +15 -0
  24. package/models/billing-address-dto.ts +2 -19
  25. package/models/create-credit-allocation-request-dto.ts +63 -0
  26. package/models/create-credit-allocation-response-class.ts +31 -0
  27. package/models/credit-allocation-class.ts +124 -0
  28. package/models/exceeding-credit-class.ts +6 -0
  29. package/models/get-credit-allocation-response-class.ts +31 -0
  30. package/models/index.ts +5 -0
  31. package/models/list-credit-allocations-response-class.ts +49 -0
  32. package/package.json +1 -1
@@ -6,6 +6,7 @@ api.ts
6
6
  api/bank-accounts-api.ts
7
7
  api/bank-orders-api.ts
8
8
  api/bank-transaction-api.ts
9
+ api/credit-allocation-api.ts
9
10
  api/exceeding-credits-api.ts
10
11
  api/health-check-api.ts
11
12
  api/payment-methods-api.ts
@@ -44,6 +45,8 @@ models/create-bank-account-request-dto.ts
44
45
  models/create-bank-account-response-class.ts
45
46
  models/create-bank-order-request-dto.ts
46
47
  models/create-bank-order-response-class.ts
48
+ models/create-credit-allocation-request-dto.ts
49
+ models/create-credit-allocation-response-class.ts
47
50
  models/create-payment-method-response-class.ts
48
51
  models/create-payment-order-dto.ts
49
52
  models/create-payment-order-request-dto.ts
@@ -58,6 +61,7 @@ models/create-refund-request-dto.ts
58
61
  models/create-refund-response-class.ts
59
62
  models/create-tenant-bank-account-request-dto.ts
60
63
  models/create-tenant-bank-account-response-class.ts
64
+ models/credit-allocation-class.ts
61
65
  models/deactivate-payment-reminder-request-dto.ts
62
66
  models/deactivate-payment-reminder-response-class.ts
63
67
  models/deactivated-payment-reminder-class.ts
@@ -68,6 +72,7 @@ models/generate-invoice-match-suggestions-response-class.ts
68
72
  models/get-bank-account-response-class.ts
69
73
  models/get-bank-order-response-class.ts
70
74
  models/get-bank-transactions-response-class.ts
75
+ models/get-credit-allocation-response-class.ts
71
76
  models/get-exceeding-credit-response-class.ts
72
77
  models/get-payment-method-response-class.ts
73
78
  models/get-payment-reminder-response-class.ts
@@ -94,6 +99,7 @@ models/link-bank-transactions-response-class.ts
94
99
  models/list-bank-accounts-response-class.ts
95
100
  models/list-bank-orders-response-class.ts
96
101
  models/list-bank-transactions-response-class.ts
102
+ models/list-credit-allocations-response-class.ts
97
103
  models/list-exceeding-credits-response-class.ts
98
104
  models/list-payment-methods-response-class.ts
99
105
  models/list-payment-reminders-response-class.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.14.1-beta.50 --save
20
+ npm install @emilgroup/payment-sdk@1.14.1-beta.52 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/payment-sdk@1.14.1-beta.50
24
+ yarn add @emilgroup/payment-sdk@1.14.1-beta.52
25
25
  ```
26
26
 
27
27
  And then you can import `PaymentsApi`.
@@ -0,0 +1,456 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
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.
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { CreateCreditAllocationRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreateCreditAllocationResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { GetCreditAllocationResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { ListCreditAllocationsResponseClass } from '../models';
31
+ /**
32
+ * CreditAllocationApi - axios parameter creator
33
+ * @export
34
+ */
35
+ export const CreditAllocationApiAxiosParamCreator = function (configuration?: Configuration) {
36
+ return {
37
+ /**
38
+ * Create a credit allocation for existing exceeding credits. **Required Permissions** \"payment-management.payments.create\", \"accounting-management.financial-accounts.view\"
39
+ * @summary Create the credit allocation
40
+ * @param {CreateCreditAllocationRequestDto} createCreditAllocationRequestDto
41
+ * @param {string} [authorization] Bearer Token
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ createAllocateCredit: async (createCreditAllocationRequestDto: CreateCreditAllocationRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
46
+ // verify required parameter 'createCreditAllocationRequestDto' is not null or undefined
47
+ assertParamExists('createAllocateCredit', 'createCreditAllocationRequestDto', createCreditAllocationRequestDto)
48
+ const localVarPath = `/paymentservice/v1/credit-allocations`;
49
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
50
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
51
+ let baseOptions;
52
+ let baseAccessToken;
53
+ if (configuration) {
54
+ baseOptions = configuration.baseOptions;
55
+ baseAccessToken = configuration.accessToken;
56
+ }
57
+
58
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
59
+ const localVarHeaderParameter = {} as any;
60
+ const localVarQueryParameter = {} as any;
61
+
62
+ // authentication bearer required
63
+ // http bearer authentication required
64
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
65
+
66
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
67
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
68
+ }
69
+
70
+
71
+
72
+ localVarHeaderParameter['Content-Type'] = 'application/json';
73
+
74
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
75
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
76
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
77
+ localVarRequestOptions.data = serializeDataIfNeeded(createCreditAllocationRequestDto, localVarRequestOptions, configuration)
78
+
79
+ return {
80
+ url: toPathString(localVarUrlObj),
81
+ options: localVarRequestOptions,
82
+ };
83
+ },
84
+ /**
85
+ * Get a credit allocation entry by code. **Required Permissions** \"payment-management.payments.view\"
86
+ * @summary Retrieve the credit allocation entry
87
+ * @param {string} code Code of the credit allocation to get
88
+ * @param {string} [authorization] Bearer Token
89
+ * @param {*} [options] Override http request option.
90
+ * @throws {RequiredError}
91
+ */
92
+ getCreditAllocation: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
93
+ // verify required parameter 'code' is not null or undefined
94
+ assertParamExists('getCreditAllocation', 'code', code)
95
+ const localVarPath = `/paymentservice/v1/credit-allocations/{code}`
96
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
97
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
98
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
99
+ let baseOptions;
100
+ let baseAccessToken;
101
+ if (configuration) {
102
+ baseOptions = configuration.baseOptions;
103
+ baseAccessToken = configuration.accessToken;
104
+ }
105
+
106
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
107
+ const localVarHeaderParameter = {} as any;
108
+ const localVarQueryParameter = {} as any;
109
+
110
+ // authentication bearer required
111
+ // http bearer authentication required
112
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
113
+
114
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
115
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
116
+ }
117
+
118
+
119
+
120
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
121
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
122
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
123
+
124
+ return {
125
+ url: toPathString(localVarUrlObj),
126
+ options: localVarRequestOptions,
127
+ };
128
+ },
129
+ /**
130
+ * Returns a list of credit allocations you have previously created. The credit allocations are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"payment-management.payments.view\"
131
+ * @summary List credit allocations
132
+ * @param {string} [authorization] Bearer Token
133
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
134
+ * @param {string} [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.
135
+ * @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, policyCode, createdAt, updatedAt&lt;/i&gt;
136
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, policyCode&lt;/i&gt;
137
+ * @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, updatedAt&lt;/i&gt;
138
+ * @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: exceedingCredits&lt;i&gt;
139
+ * @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, policyCode, createdAt, updatedAt&lt;/i&gt;
140
+ * @param {*} [options] Override http request option.
141
+ * @throws {RequiredError}
142
+ */
143
+ listCreditAllocations: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
144
+ const localVarPath = `/paymentservice/v1/credit-allocations`;
145
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
146
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
147
+ let baseOptions;
148
+ let baseAccessToken;
149
+ if (configuration) {
150
+ baseOptions = configuration.baseOptions;
151
+ baseAccessToken = configuration.accessToken;
152
+ }
153
+
154
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
155
+ const localVarHeaderParameter = {} as any;
156
+ const localVarQueryParameter = {} as any;
157
+
158
+ // authentication bearer required
159
+ // http bearer authentication required
160
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
161
+
162
+ if (pageSize !== undefined) {
163
+ localVarQueryParameter['pageSize'] = pageSize;
164
+ }
165
+
166
+ if (pageToken !== undefined) {
167
+ localVarQueryParameter['pageToken'] = pageToken;
168
+ }
169
+
170
+ if (filter !== undefined) {
171
+ localVarQueryParameter['filter'] = filter;
172
+ }
173
+
174
+ if (search !== undefined) {
175
+ localVarQueryParameter['search'] = search;
176
+ }
177
+
178
+ if (order !== undefined) {
179
+ localVarQueryParameter['order'] = order;
180
+ }
181
+
182
+ if (expand !== undefined) {
183
+ localVarQueryParameter['expand'] = expand;
184
+ }
185
+
186
+ if (filters !== undefined) {
187
+ localVarQueryParameter['filters'] = filters;
188
+ }
189
+
190
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
191
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
192
+ }
193
+
194
+
195
+
196
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
197
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
198
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
199
+
200
+ return {
201
+ url: toPathString(localVarUrlObj),
202
+ options: localVarRequestOptions,
203
+ };
204
+ },
205
+ }
206
+ };
207
+
208
+ /**
209
+ * CreditAllocationApi - functional programming interface
210
+ * @export
211
+ */
212
+ export const CreditAllocationApiFp = function(configuration?: Configuration) {
213
+ const localVarAxiosParamCreator = CreditAllocationApiAxiosParamCreator(configuration)
214
+ return {
215
+ /**
216
+ * Create a credit allocation for existing exceeding credits. **Required Permissions** \"payment-management.payments.create\", \"accounting-management.financial-accounts.view\"
217
+ * @summary Create the credit allocation
218
+ * @param {CreateCreditAllocationRequestDto} createCreditAllocationRequestDto
219
+ * @param {string} [authorization] Bearer Token
220
+ * @param {*} [options] Override http request option.
221
+ * @throws {RequiredError}
222
+ */
223
+ async createAllocateCredit(createCreditAllocationRequestDto: CreateCreditAllocationRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCreditAllocationResponseClass>> {
224
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createAllocateCredit(createCreditAllocationRequestDto, authorization, options);
225
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
226
+ },
227
+ /**
228
+ * Get a credit allocation entry by code. **Required Permissions** \"payment-management.payments.view\"
229
+ * @summary Retrieve the credit allocation entry
230
+ * @param {string} code Code of the credit allocation to get
231
+ * @param {string} [authorization] Bearer Token
232
+ * @param {*} [options] Override http request option.
233
+ * @throws {RequiredError}
234
+ */
235
+ async getCreditAllocation(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetCreditAllocationResponseClass>> {
236
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCreditAllocation(code, authorization, options);
237
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
238
+ },
239
+ /**
240
+ * Returns a list of credit allocations you have previously created. The credit allocations are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"payment-management.payments.view\"
241
+ * @summary List credit allocations
242
+ * @param {string} [authorization] Bearer Token
243
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
244
+ * @param {string} [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.
245
+ * @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, policyCode, createdAt, updatedAt&lt;/i&gt;
246
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, policyCode&lt;/i&gt;
247
+ * @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, updatedAt&lt;/i&gt;
248
+ * @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: exceedingCredits&lt;i&gt;
249
+ * @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, policyCode, createdAt, updatedAt&lt;/i&gt;
250
+ * @param {*} [options] Override http request option.
251
+ * @throws {RequiredError}
252
+ */
253
+ async listCreditAllocations(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListCreditAllocationsResponseClass>> {
254
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listCreditAllocations(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
255
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
256
+ },
257
+ }
258
+ };
259
+
260
+ /**
261
+ * CreditAllocationApi - factory interface
262
+ * @export
263
+ */
264
+ export const CreditAllocationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
265
+ const localVarFp = CreditAllocationApiFp(configuration)
266
+ return {
267
+ /**
268
+ * Create a credit allocation for existing exceeding credits. **Required Permissions** \"payment-management.payments.create\", \"accounting-management.financial-accounts.view\"
269
+ * @summary Create the credit allocation
270
+ * @param {CreateCreditAllocationRequestDto} createCreditAllocationRequestDto
271
+ * @param {string} [authorization] Bearer Token
272
+ * @param {*} [options] Override http request option.
273
+ * @throws {RequiredError}
274
+ */
275
+ createAllocateCredit(createCreditAllocationRequestDto: CreateCreditAllocationRequestDto, authorization?: string, options?: any): AxiosPromise<CreateCreditAllocationResponseClass> {
276
+ return localVarFp.createAllocateCredit(createCreditAllocationRequestDto, authorization, options).then((request) => request(axios, basePath));
277
+ },
278
+ /**
279
+ * Get a credit allocation entry by code. **Required Permissions** \"payment-management.payments.view\"
280
+ * @summary Retrieve the credit allocation entry
281
+ * @param {string} code Code of the credit allocation to get
282
+ * @param {string} [authorization] Bearer Token
283
+ * @param {*} [options] Override http request option.
284
+ * @throws {RequiredError}
285
+ */
286
+ getCreditAllocation(code: string, authorization?: string, options?: any): AxiosPromise<GetCreditAllocationResponseClass> {
287
+ return localVarFp.getCreditAllocation(code, authorization, options).then((request) => request(axios, basePath));
288
+ },
289
+ /**
290
+ * Returns a list of credit allocations you have previously created. The credit allocations are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"payment-management.payments.view\"
291
+ * @summary List credit allocations
292
+ * @param {string} [authorization] Bearer Token
293
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
294
+ * @param {string} [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.
295
+ * @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, policyCode, createdAt, updatedAt&lt;/i&gt;
296
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, policyCode&lt;/i&gt;
297
+ * @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, updatedAt&lt;/i&gt;
298
+ * @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: exceedingCredits&lt;i&gt;
299
+ * @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, policyCode, createdAt, updatedAt&lt;/i&gt;
300
+ * @param {*} [options] Override http request option.
301
+ * @throws {RequiredError}
302
+ */
303
+ listCreditAllocations(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListCreditAllocationsResponseClass> {
304
+ return localVarFp.listCreditAllocations(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
305
+ },
306
+ };
307
+ };
308
+
309
+ /**
310
+ * Request parameters for createAllocateCredit operation in CreditAllocationApi.
311
+ * @export
312
+ * @interface CreditAllocationApiCreateAllocateCreditRequest
313
+ */
314
+ export interface CreditAllocationApiCreateAllocateCreditRequest {
315
+ /**
316
+ *
317
+ * @type {CreateCreditAllocationRequestDto}
318
+ * @memberof CreditAllocationApiCreateAllocateCredit
319
+ */
320
+ readonly createCreditAllocationRequestDto: CreateCreditAllocationRequestDto
321
+
322
+ /**
323
+ * Bearer Token
324
+ * @type {string}
325
+ * @memberof CreditAllocationApiCreateAllocateCredit
326
+ */
327
+ readonly authorization?: string
328
+ }
329
+
330
+ /**
331
+ * Request parameters for getCreditAllocation operation in CreditAllocationApi.
332
+ * @export
333
+ * @interface CreditAllocationApiGetCreditAllocationRequest
334
+ */
335
+ export interface CreditAllocationApiGetCreditAllocationRequest {
336
+ /**
337
+ * Code of the credit allocation to get
338
+ * @type {string}
339
+ * @memberof CreditAllocationApiGetCreditAllocation
340
+ */
341
+ readonly code: string
342
+
343
+ /**
344
+ * Bearer Token
345
+ * @type {string}
346
+ * @memberof CreditAllocationApiGetCreditAllocation
347
+ */
348
+ readonly authorization?: string
349
+ }
350
+
351
+ /**
352
+ * Request parameters for listCreditAllocations operation in CreditAllocationApi.
353
+ * @export
354
+ * @interface CreditAllocationApiListCreditAllocationsRequest
355
+ */
356
+ export interface CreditAllocationApiListCreditAllocationsRequest {
357
+ /**
358
+ * Bearer Token
359
+ * @type {string}
360
+ * @memberof CreditAllocationApiListCreditAllocations
361
+ */
362
+ readonly authorization?: string
363
+
364
+ /**
365
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
366
+ * @type {number}
367
+ * @memberof CreditAllocationApiListCreditAllocations
368
+ */
369
+ readonly pageSize?: number
370
+
371
+ /**
372
+ * 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.
373
+ * @type {string}
374
+ * @memberof CreditAllocationApiListCreditAllocations
375
+ */
376
+ readonly pageToken?: string
377
+
378
+ /**
379
+ * 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, policyCode, createdAt, updatedAt&lt;/i&gt;
380
+ * @type {string}
381
+ * @memberof CreditAllocationApiListCreditAllocations
382
+ */
383
+ readonly filter?: string
384
+
385
+ /**
386
+ * Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, policyCode&lt;/i&gt;
387
+ * @type {string}
388
+ * @memberof CreditAllocationApiListCreditAllocations
389
+ */
390
+ readonly search?: string
391
+
392
+ /**
393
+ * 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, updatedAt&lt;/i&gt;
394
+ * @type {string}
395
+ * @memberof CreditAllocationApiListCreditAllocations
396
+ */
397
+ readonly order?: string
398
+
399
+ /**
400
+ * 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: exceedingCredits&lt;i&gt;
401
+ * @type {string}
402
+ * @memberof CreditAllocationApiListCreditAllocations
403
+ */
404
+ readonly expand?: string
405
+
406
+ /**
407
+ * 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, policyCode, createdAt, updatedAt&lt;/i&gt;
408
+ * @type {string}
409
+ * @memberof CreditAllocationApiListCreditAllocations
410
+ */
411
+ readonly filters?: string
412
+ }
413
+
414
+ /**
415
+ * CreditAllocationApi - object-oriented interface
416
+ * @export
417
+ * @class CreditAllocationApi
418
+ * @extends {BaseAPI}
419
+ */
420
+ export class CreditAllocationApi extends BaseAPI {
421
+ /**
422
+ * Create a credit allocation for existing exceeding credits. **Required Permissions** \"payment-management.payments.create\", \"accounting-management.financial-accounts.view\"
423
+ * @summary Create the credit allocation
424
+ * @param {CreditAllocationApiCreateAllocateCreditRequest} requestParameters Request parameters.
425
+ * @param {*} [options] Override http request option.
426
+ * @throws {RequiredError}
427
+ * @memberof CreditAllocationApi
428
+ */
429
+ public createAllocateCredit(requestParameters: CreditAllocationApiCreateAllocateCreditRequest, options?: AxiosRequestConfig) {
430
+ return CreditAllocationApiFp(this.configuration).createAllocateCredit(requestParameters.createCreditAllocationRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
431
+ }
432
+
433
+ /**
434
+ * Get a credit allocation entry by code. **Required Permissions** \"payment-management.payments.view\"
435
+ * @summary Retrieve the credit allocation entry
436
+ * @param {CreditAllocationApiGetCreditAllocationRequest} requestParameters Request parameters.
437
+ * @param {*} [options] Override http request option.
438
+ * @throws {RequiredError}
439
+ * @memberof CreditAllocationApi
440
+ */
441
+ public getCreditAllocation(requestParameters: CreditAllocationApiGetCreditAllocationRequest, options?: AxiosRequestConfig) {
442
+ return CreditAllocationApiFp(this.configuration).getCreditAllocation(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
443
+ }
444
+
445
+ /**
446
+ * Returns a list of credit allocations you have previously created. The credit allocations are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"payment-management.payments.view\"
447
+ * @summary List credit allocations
448
+ * @param {CreditAllocationApiListCreditAllocationsRequest} requestParameters Request parameters.
449
+ * @param {*} [options] Override http request option.
450
+ * @throws {RequiredError}
451
+ * @memberof CreditAllocationApi
452
+ */
453
+ public listCreditAllocations(requestParameters: CreditAllocationApiListCreditAllocationsRequest = {}, options?: AxiosRequestConfig) {
454
+ return CreditAllocationApiFp(this.configuration).listCreditAllocations(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
455
+ }
456
+ }
package/api.ts CHANGED
@@ -23,6 +23,7 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr
23
23
  import { BankAccountsApi } from './api';
24
24
  import { BankOrdersApi } from './api';
25
25
  import { BankTransactionApi } from './api';
26
+ import { CreditAllocationApi } from './api';
26
27
  import { ExceedingCreditsApi } from './api';
27
28
  import { HealthCheckApi } from './api';
28
29
  import { PaymentMethodsApi } from './api';
@@ -38,6 +39,7 @@ import { WebhooksApi } from './api';
38
39
  export * from './api/bank-accounts-api';
39
40
  export * from './api/bank-orders-api';
40
41
  export * from './api/bank-transaction-api';
42
+ export * from './api/credit-allocation-api';
41
43
  export * from './api/exceeding-credits-api';
42
44
  export * from './api/health-check-api';
43
45
  export * from './api/payment-methods-api';