@emilgroup/payment-sdk-node 1.22.1-beta.6 → 1.22.1-beta.61

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