@emilgroup/payment-sdk 1.14.1-beta.55 → 1.14.1-beta.57

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 (33) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +2 -2
  3. package/api/billing-addresses-api.ts +691 -0
  4. package/api.ts +2 -0
  5. package/dist/api/billing-addresses-api.d.ts +393 -0
  6. package/dist/api/billing-addresses-api.js +642 -0
  7. package/dist/api.d.ts +1 -0
  8. package/dist/api.js +1 -0
  9. package/dist/models/billing-address-class.d.ts +108 -0
  10. package/dist/models/billing-address-class.js +15 -0
  11. package/dist/models/create-billing-address-request-dto.d.ts +72 -0
  12. package/dist/models/create-billing-address-request-dto.js +15 -0
  13. package/dist/models/create-billing-address-response-class.d.ts +25 -0
  14. package/dist/models/create-billing-address-response-class.js +15 -0
  15. package/dist/models/get-billing-address-response-class.d.ts +25 -0
  16. package/dist/models/get-billing-address-response-class.js +15 -0
  17. package/dist/models/index.d.ts +7 -0
  18. package/dist/models/index.js +7 -0
  19. package/dist/models/list-billing-addresses-response-class.d.ts +43 -0
  20. package/dist/models/list-billing-addresses-response-class.js +15 -0
  21. package/dist/models/update-billing-address-request-dto.d.ts +72 -0
  22. package/dist/models/update-billing-address-request-dto.js +15 -0
  23. package/dist/models/update-billing-address-response-class.d.ts +25 -0
  24. package/dist/models/update-billing-address-response-class.js +15 -0
  25. package/models/billing-address-class.ts +114 -0
  26. package/models/create-billing-address-request-dto.ts +78 -0
  27. package/models/create-billing-address-response-class.ts +31 -0
  28. package/models/get-billing-address-response-class.ts +31 -0
  29. package/models/index.ts +7 -0
  30. package/models/list-billing-addresses-response-class.ts +49 -0
  31. package/models/update-billing-address-request-dto.ts +78 -0
  32. package/models/update-billing-address-response-class.ts +31 -0
  33. package/package.json +1 -1
@@ -0,0 +1,691 @@
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 { CreateBillingAddressRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreateBillingAddressResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { GetBillingAddressResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { ListBillingAddressesResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { UpdateBillingAddressRequestDto } from '../models';
33
+ // @ts-ignore
34
+ import { UpdateBillingAddressResponseClass } from '../models';
35
+ /**
36
+ * BillingAddressesApi - axios parameter creator
37
+ * @export
38
+ */
39
+ export const BillingAddressesApiAxiosParamCreator = function (configuration?: Configuration) {
40
+ return {
41
+ /**
42
+ * This will create a new billing address for a specified account or partner **Required Permissions** \"payment-management.payments.create\"
43
+ * @summary Create the Billing Address
44
+ * @param {CreateBillingAddressRequestDto} createBillingAddressRequestDto
45
+ * @param {string} [authorization] Bearer Token
46
+ * @param {*} [options] Override http request option.
47
+ * @throws {RequiredError}
48
+ */
49
+ createBillingAddress: async (createBillingAddressRequestDto: CreateBillingAddressRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
50
+ // verify required parameter 'createBillingAddressRequestDto' is not null or undefined
51
+ assertParamExists('createBillingAddress', 'createBillingAddressRequestDto', createBillingAddressRequestDto)
52
+ const localVarPath = `/paymentservice/v1/billing-addresses`;
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(createBillingAddressRequestDto, localVarRequestOptions, configuration)
82
+
83
+ return {
84
+ url: toPathString(localVarUrlObj),
85
+ options: localVarRequestOptions,
86
+ };
87
+ },
88
+ /**
89
+ * Deletes a billing address by code **Required Permissions** \"payment-management.payments.delete\"
90
+ * @summary Delete the Billing Address
91
+ * @param {string} code Unique identifier for the object.
92
+ * @param {string} [authorization] Bearer Token
93
+ * @param {*} [options] Override http request option.
94
+ * @throws {RequiredError}
95
+ */
96
+ deleteBillingAddress: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
97
+ // verify required parameter 'code' is not null or undefined
98
+ assertParamExists('deleteBillingAddress', 'code', code)
99
+ const localVarPath = `/paymentservice/v1/billing-addresses/{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: 'DELETE', ...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
+ * Retrieves the details of the Billing Address that was previously created. Supply the unique Billing Address code that was returned when you created it and Emil Api will return the corresponding Billing Address information. **Required Permissions** \"payment-management.payments.view\"
135
+ * @summary Retrieve the Billing Address
136
+ * @param {string} code
137
+ * @param {string} [authorization] Bearer Token
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: &lt;i&gt;
139
+ * @param {*} [options] Override http request option.
140
+ * @throws {RequiredError}
141
+ */
142
+ getBillingAddress: async (code: string, authorization?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
143
+ // verify required parameter 'code' is not null or undefined
144
+ assertParamExists('getBillingAddress', 'code', code)
145
+ const localVarPath = `/paymentservice/v1/billing-addresses/{code}`
146
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
147
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
148
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
149
+ let baseOptions;
150
+ let baseAccessToken;
151
+ if (configuration) {
152
+ baseOptions = configuration.baseOptions;
153
+ baseAccessToken = configuration.accessToken;
154
+ }
155
+
156
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
157
+ const localVarHeaderParameter = {} as any;
158
+ const localVarQueryParameter = {} as any;
159
+
160
+ // authentication bearer required
161
+ // http bearer authentication required
162
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
163
+
164
+ if (expand !== undefined) {
165
+ localVarQueryParameter['expand'] = expand;
166
+ }
167
+
168
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
169
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
170
+ }
171
+
172
+
173
+
174
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
175
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
176
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
177
+
178
+ return {
179
+ url: toPathString(localVarUrlObj),
180
+ options: localVarRequestOptions,
181
+ };
182
+ },
183
+ /**
184
+ * Returns a list of Billing Addresses you have previously created. The Billing Addresses 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\"
185
+ * @summary List Billing Addresses
186
+ * @param {string} [authorization] Bearer Token
187
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
188
+ * @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.
189
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, city, zipCode, countryCode, accountCode, partnerCode, createdAt, updatedAt&lt;/i&gt;
190
+ * @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: firstName, lastName, accountCode, partnerCode&lt;/i&gt;
191
+ * @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, code, createdAt, updatedAt&lt;/i&gt;
192
+ * @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: &lt;i&gt;
193
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, city, zipCode, countryCode, accountCode, partnerCode, createdAt, updatedAt&lt;/i&gt;
194
+ * @param {*} [options] Override http request option.
195
+ * @throws {RequiredError}
196
+ */
197
+ listBillingAddresses: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
198
+ const localVarPath = `/paymentservice/v1/billing-addresses`;
199
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
200
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
201
+ let baseOptions;
202
+ let baseAccessToken;
203
+ if (configuration) {
204
+ baseOptions = configuration.baseOptions;
205
+ baseAccessToken = configuration.accessToken;
206
+ }
207
+
208
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
209
+ const localVarHeaderParameter = {} as any;
210
+ const localVarQueryParameter = {} as any;
211
+
212
+ // authentication bearer required
213
+ // http bearer authentication required
214
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
215
+
216
+ if (pageSize !== undefined) {
217
+ localVarQueryParameter['pageSize'] = pageSize;
218
+ }
219
+
220
+ if (pageToken !== undefined) {
221
+ localVarQueryParameter['pageToken'] = pageToken;
222
+ }
223
+
224
+ if (filter !== undefined) {
225
+ localVarQueryParameter['filter'] = filter;
226
+ }
227
+
228
+ if (search !== undefined) {
229
+ localVarQueryParameter['search'] = search;
230
+ }
231
+
232
+ if (order !== undefined) {
233
+ localVarQueryParameter['order'] = order;
234
+ }
235
+
236
+ if (expand !== undefined) {
237
+ localVarQueryParameter['expand'] = expand;
238
+ }
239
+
240
+ if (filters !== undefined) {
241
+ localVarQueryParameter['filters'] = filters;
242
+ }
243
+
244
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
245
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
246
+ }
247
+
248
+
249
+
250
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
251
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
252
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
253
+
254
+ return {
255
+ url: toPathString(localVarUrlObj),
256
+ options: localVarRequestOptions,
257
+ };
258
+ },
259
+ /**
260
+ * Updates a billing address by code **Required Permissions** \"payment-management.payments.update\"
261
+ * @summary Update the Billing Address
262
+ * @param {string} code
263
+ * @param {UpdateBillingAddressRequestDto} updateBillingAddressRequestDto
264
+ * @param {string} [authorization] Bearer Token
265
+ * @param {*} [options] Override http request option.
266
+ * @throws {RequiredError}
267
+ */
268
+ updateBillingAddress: async (code: string, updateBillingAddressRequestDto: UpdateBillingAddressRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
269
+ // verify required parameter 'code' is not null or undefined
270
+ assertParamExists('updateBillingAddress', 'code', code)
271
+ // verify required parameter 'updateBillingAddressRequestDto' is not null or undefined
272
+ assertParamExists('updateBillingAddress', 'updateBillingAddressRequestDto', updateBillingAddressRequestDto)
273
+ const localVarPath = `/paymentservice/v1/billing-addresses/{code}`
274
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
275
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
276
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
277
+ let baseOptions;
278
+ let baseAccessToken;
279
+ if (configuration) {
280
+ baseOptions = configuration.baseOptions;
281
+ baseAccessToken = configuration.accessToken;
282
+ }
283
+
284
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
285
+ const localVarHeaderParameter = {} as any;
286
+ const localVarQueryParameter = {} as any;
287
+
288
+ // authentication bearer required
289
+ // http bearer authentication required
290
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
291
+
292
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
293
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
294
+ }
295
+
296
+
297
+
298
+ localVarHeaderParameter['Content-Type'] = 'application/json';
299
+
300
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
301
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
302
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
303
+ localVarRequestOptions.data = serializeDataIfNeeded(updateBillingAddressRequestDto, localVarRequestOptions, configuration)
304
+
305
+ return {
306
+ url: toPathString(localVarUrlObj),
307
+ options: localVarRequestOptions,
308
+ };
309
+ },
310
+ }
311
+ };
312
+
313
+ /**
314
+ * BillingAddressesApi - functional programming interface
315
+ * @export
316
+ */
317
+ export const BillingAddressesApiFp = function(configuration?: Configuration) {
318
+ const localVarAxiosParamCreator = BillingAddressesApiAxiosParamCreator(configuration)
319
+ return {
320
+ /**
321
+ * This will create a new billing address for a specified account or partner **Required Permissions** \"payment-management.payments.create\"
322
+ * @summary Create the Billing Address
323
+ * @param {CreateBillingAddressRequestDto} createBillingAddressRequestDto
324
+ * @param {string} [authorization] Bearer Token
325
+ * @param {*} [options] Override http request option.
326
+ * @throws {RequiredError}
327
+ */
328
+ async createBillingAddress(createBillingAddressRequestDto: CreateBillingAddressRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateBillingAddressResponseClass>> {
329
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createBillingAddress(createBillingAddressRequestDto, authorization, options);
330
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
331
+ },
332
+ /**
333
+ * Deletes a billing address by code **Required Permissions** \"payment-management.payments.delete\"
334
+ * @summary Delete the Billing Address
335
+ * @param {string} code Unique identifier for the object.
336
+ * @param {string} [authorization] Bearer Token
337
+ * @param {*} [options] Override http request option.
338
+ * @throws {RequiredError}
339
+ */
340
+ async deleteBillingAddress(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
341
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBillingAddress(code, authorization, options);
342
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
343
+ },
344
+ /**
345
+ * Retrieves the details of the Billing Address that was previously created. Supply the unique Billing Address code that was returned when you created it and Emil Api will return the corresponding Billing Address information. **Required Permissions** \"payment-management.payments.view\"
346
+ * @summary Retrieve the Billing Address
347
+ * @param {string} code
348
+ * @param {string} [authorization] Bearer Token
349
+ * @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: &lt;i&gt;
350
+ * @param {*} [options] Override http request option.
351
+ * @throws {RequiredError}
352
+ */
353
+ async getBillingAddress(code: string, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetBillingAddressResponseClass>> {
354
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getBillingAddress(code, authorization, expand, options);
355
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
356
+ },
357
+ /**
358
+ * Returns a list of Billing Addresses you have previously created. The Billing Addresses 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\"
359
+ * @summary List Billing Addresses
360
+ * @param {string} [authorization] Bearer Token
361
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
362
+ * @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.
363
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, city, zipCode, countryCode, accountCode, partnerCode, createdAt, updatedAt&lt;/i&gt;
364
+ * @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: firstName, lastName, accountCode, partnerCode&lt;/i&gt;
365
+ * @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, code, createdAt, updatedAt&lt;/i&gt;
366
+ * @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: &lt;i&gt;
367
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, city, zipCode, countryCode, accountCode, partnerCode, createdAt, updatedAt&lt;/i&gt;
368
+ * @param {*} [options] Override http request option.
369
+ * @throws {RequiredError}
370
+ */
371
+ async listBillingAddresses(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListBillingAddressesResponseClass>> {
372
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listBillingAddresses(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
373
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
374
+ },
375
+ /**
376
+ * Updates a billing address by code **Required Permissions** \"payment-management.payments.update\"
377
+ * @summary Update the Billing Address
378
+ * @param {string} code
379
+ * @param {UpdateBillingAddressRequestDto} updateBillingAddressRequestDto
380
+ * @param {string} [authorization] Bearer Token
381
+ * @param {*} [options] Override http request option.
382
+ * @throws {RequiredError}
383
+ */
384
+ async updateBillingAddress(code: string, updateBillingAddressRequestDto: UpdateBillingAddressRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateBillingAddressResponseClass>> {
385
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateBillingAddress(code, updateBillingAddressRequestDto, authorization, options);
386
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
387
+ },
388
+ }
389
+ };
390
+
391
+ /**
392
+ * BillingAddressesApi - factory interface
393
+ * @export
394
+ */
395
+ export const BillingAddressesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
396
+ const localVarFp = BillingAddressesApiFp(configuration)
397
+ return {
398
+ /**
399
+ * This will create a new billing address for a specified account or partner **Required Permissions** \"payment-management.payments.create\"
400
+ * @summary Create the Billing Address
401
+ * @param {CreateBillingAddressRequestDto} createBillingAddressRequestDto
402
+ * @param {string} [authorization] Bearer Token
403
+ * @param {*} [options] Override http request option.
404
+ * @throws {RequiredError}
405
+ */
406
+ createBillingAddress(createBillingAddressRequestDto: CreateBillingAddressRequestDto, authorization?: string, options?: any): AxiosPromise<CreateBillingAddressResponseClass> {
407
+ return localVarFp.createBillingAddress(createBillingAddressRequestDto, authorization, options).then((request) => request(axios, basePath));
408
+ },
409
+ /**
410
+ * Deletes a billing address by code **Required Permissions** \"payment-management.payments.delete\"
411
+ * @summary Delete the Billing Address
412
+ * @param {string} code Unique identifier for the object.
413
+ * @param {string} [authorization] Bearer Token
414
+ * @param {*} [options] Override http request option.
415
+ * @throws {RequiredError}
416
+ */
417
+ deleteBillingAddress(code: string, authorization?: string, options?: any): AxiosPromise<object> {
418
+ return localVarFp.deleteBillingAddress(code, authorization, options).then((request) => request(axios, basePath));
419
+ },
420
+ /**
421
+ * Retrieves the details of the Billing Address that was previously created. Supply the unique Billing Address code that was returned when you created it and Emil Api will return the corresponding Billing Address information. **Required Permissions** \"payment-management.payments.view\"
422
+ * @summary Retrieve the Billing Address
423
+ * @param {string} code
424
+ * @param {string} [authorization] Bearer Token
425
+ * @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: &lt;i&gt;
426
+ * @param {*} [options] Override http request option.
427
+ * @throws {RequiredError}
428
+ */
429
+ getBillingAddress(code: string, authorization?: string, expand?: string, options?: any): AxiosPromise<GetBillingAddressResponseClass> {
430
+ return localVarFp.getBillingAddress(code, authorization, expand, options).then((request) => request(axios, basePath));
431
+ },
432
+ /**
433
+ * Returns a list of Billing Addresses you have previously created. The Billing Addresses 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\"
434
+ * @summary List Billing Addresses
435
+ * @param {string} [authorization] Bearer Token
436
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
437
+ * @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.
438
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, city, zipCode, countryCode, accountCode, partnerCode, createdAt, updatedAt&lt;/i&gt;
439
+ * @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: firstName, lastName, accountCode, partnerCode&lt;/i&gt;
440
+ * @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, code, createdAt, updatedAt&lt;/i&gt;
441
+ * @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: &lt;i&gt;
442
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, city, zipCode, countryCode, accountCode, partnerCode, createdAt, updatedAt&lt;/i&gt;
443
+ * @param {*} [options] Override http request option.
444
+ * @throws {RequiredError}
445
+ */
446
+ listBillingAddresses(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListBillingAddressesResponseClass> {
447
+ return localVarFp.listBillingAddresses(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
448
+ },
449
+ /**
450
+ * Updates a billing address by code **Required Permissions** \"payment-management.payments.update\"
451
+ * @summary Update the Billing Address
452
+ * @param {string} code
453
+ * @param {UpdateBillingAddressRequestDto} updateBillingAddressRequestDto
454
+ * @param {string} [authorization] Bearer Token
455
+ * @param {*} [options] Override http request option.
456
+ * @throws {RequiredError}
457
+ */
458
+ updateBillingAddress(code: string, updateBillingAddressRequestDto: UpdateBillingAddressRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateBillingAddressResponseClass> {
459
+ return localVarFp.updateBillingAddress(code, updateBillingAddressRequestDto, authorization, options).then((request) => request(axios, basePath));
460
+ },
461
+ };
462
+ };
463
+
464
+ /**
465
+ * Request parameters for createBillingAddress operation in BillingAddressesApi.
466
+ * @export
467
+ * @interface BillingAddressesApiCreateBillingAddressRequest
468
+ */
469
+ export interface BillingAddressesApiCreateBillingAddressRequest {
470
+ /**
471
+ *
472
+ * @type {CreateBillingAddressRequestDto}
473
+ * @memberof BillingAddressesApiCreateBillingAddress
474
+ */
475
+ readonly createBillingAddressRequestDto: CreateBillingAddressRequestDto
476
+
477
+ /**
478
+ * Bearer Token
479
+ * @type {string}
480
+ * @memberof BillingAddressesApiCreateBillingAddress
481
+ */
482
+ readonly authorization?: string
483
+ }
484
+
485
+ /**
486
+ * Request parameters for deleteBillingAddress operation in BillingAddressesApi.
487
+ * @export
488
+ * @interface BillingAddressesApiDeleteBillingAddressRequest
489
+ */
490
+ export interface BillingAddressesApiDeleteBillingAddressRequest {
491
+ /**
492
+ * Unique identifier for the object.
493
+ * @type {string}
494
+ * @memberof BillingAddressesApiDeleteBillingAddress
495
+ */
496
+ readonly code: string
497
+
498
+ /**
499
+ * Bearer Token
500
+ * @type {string}
501
+ * @memberof BillingAddressesApiDeleteBillingAddress
502
+ */
503
+ readonly authorization?: string
504
+ }
505
+
506
+ /**
507
+ * Request parameters for getBillingAddress operation in BillingAddressesApi.
508
+ * @export
509
+ * @interface BillingAddressesApiGetBillingAddressRequest
510
+ */
511
+ export interface BillingAddressesApiGetBillingAddressRequest {
512
+ /**
513
+ *
514
+ * @type {string}
515
+ * @memberof BillingAddressesApiGetBillingAddress
516
+ */
517
+ readonly code: string
518
+
519
+ /**
520
+ * Bearer Token
521
+ * @type {string}
522
+ * @memberof BillingAddressesApiGetBillingAddress
523
+ */
524
+ readonly authorization?: string
525
+
526
+ /**
527
+ * 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: &lt;i&gt;
528
+ * @type {string}
529
+ * @memberof BillingAddressesApiGetBillingAddress
530
+ */
531
+ readonly expand?: string
532
+ }
533
+
534
+ /**
535
+ * Request parameters for listBillingAddresses operation in BillingAddressesApi.
536
+ * @export
537
+ * @interface BillingAddressesApiListBillingAddressesRequest
538
+ */
539
+ export interface BillingAddressesApiListBillingAddressesRequest {
540
+ /**
541
+ * Bearer Token
542
+ * @type {string}
543
+ * @memberof BillingAddressesApiListBillingAddresses
544
+ */
545
+ readonly authorization?: string
546
+
547
+ /**
548
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
549
+ * @type {number}
550
+ * @memberof BillingAddressesApiListBillingAddresses
551
+ */
552
+ readonly pageSize?: number
553
+
554
+ /**
555
+ * 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.
556
+ * @type {string}
557
+ * @memberof BillingAddressesApiListBillingAddresses
558
+ */
559
+ readonly pageToken?: string
560
+
561
+ /**
562
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, city, zipCode, countryCode, accountCode, partnerCode, createdAt, updatedAt&lt;/i&gt;
563
+ * @type {string}
564
+ * @memberof BillingAddressesApiListBillingAddresses
565
+ */
566
+ readonly filter?: string
567
+
568
+ /**
569
+ * 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: firstName, lastName, accountCode, partnerCode&lt;/i&gt;
570
+ * @type {string}
571
+ * @memberof BillingAddressesApiListBillingAddresses
572
+ */
573
+ readonly search?: string
574
+
575
+ /**
576
+ * 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, code, createdAt, updatedAt&lt;/i&gt;
577
+ * @type {string}
578
+ * @memberof BillingAddressesApiListBillingAddresses
579
+ */
580
+ readonly order?: string
581
+
582
+ /**
583
+ * 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: &lt;i&gt;
584
+ * @type {string}
585
+ * @memberof BillingAddressesApiListBillingAddresses
586
+ */
587
+ readonly expand?: string
588
+
589
+ /**
590
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, city, zipCode, countryCode, accountCode, partnerCode, createdAt, updatedAt&lt;/i&gt;
591
+ * @type {string}
592
+ * @memberof BillingAddressesApiListBillingAddresses
593
+ */
594
+ readonly filters?: string
595
+ }
596
+
597
+ /**
598
+ * Request parameters for updateBillingAddress operation in BillingAddressesApi.
599
+ * @export
600
+ * @interface BillingAddressesApiUpdateBillingAddressRequest
601
+ */
602
+ export interface BillingAddressesApiUpdateBillingAddressRequest {
603
+ /**
604
+ *
605
+ * @type {string}
606
+ * @memberof BillingAddressesApiUpdateBillingAddress
607
+ */
608
+ readonly code: string
609
+
610
+ /**
611
+ *
612
+ * @type {UpdateBillingAddressRequestDto}
613
+ * @memberof BillingAddressesApiUpdateBillingAddress
614
+ */
615
+ readonly updateBillingAddressRequestDto: UpdateBillingAddressRequestDto
616
+
617
+ /**
618
+ * Bearer Token
619
+ * @type {string}
620
+ * @memberof BillingAddressesApiUpdateBillingAddress
621
+ */
622
+ readonly authorization?: string
623
+ }
624
+
625
+ /**
626
+ * BillingAddressesApi - object-oriented interface
627
+ * @export
628
+ * @class BillingAddressesApi
629
+ * @extends {BaseAPI}
630
+ */
631
+ export class BillingAddressesApi extends BaseAPI {
632
+ /**
633
+ * This will create a new billing address for a specified account or partner **Required Permissions** \"payment-management.payments.create\"
634
+ * @summary Create the Billing Address
635
+ * @param {BillingAddressesApiCreateBillingAddressRequest} requestParameters Request parameters.
636
+ * @param {*} [options] Override http request option.
637
+ * @throws {RequiredError}
638
+ * @memberof BillingAddressesApi
639
+ */
640
+ public createBillingAddress(requestParameters: BillingAddressesApiCreateBillingAddressRequest, options?: AxiosRequestConfig) {
641
+ return BillingAddressesApiFp(this.configuration).createBillingAddress(requestParameters.createBillingAddressRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
642
+ }
643
+
644
+ /**
645
+ * Deletes a billing address by code **Required Permissions** \"payment-management.payments.delete\"
646
+ * @summary Delete the Billing Address
647
+ * @param {BillingAddressesApiDeleteBillingAddressRequest} requestParameters Request parameters.
648
+ * @param {*} [options] Override http request option.
649
+ * @throws {RequiredError}
650
+ * @memberof BillingAddressesApi
651
+ */
652
+ public deleteBillingAddress(requestParameters: BillingAddressesApiDeleteBillingAddressRequest, options?: AxiosRequestConfig) {
653
+ return BillingAddressesApiFp(this.configuration).deleteBillingAddress(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
654
+ }
655
+
656
+ /**
657
+ * Retrieves the details of the Billing Address that was previously created. Supply the unique Billing Address code that was returned when you created it and Emil Api will return the corresponding Billing Address information. **Required Permissions** \"payment-management.payments.view\"
658
+ * @summary Retrieve the Billing Address
659
+ * @param {BillingAddressesApiGetBillingAddressRequest} requestParameters Request parameters.
660
+ * @param {*} [options] Override http request option.
661
+ * @throws {RequiredError}
662
+ * @memberof BillingAddressesApi
663
+ */
664
+ public getBillingAddress(requestParameters: BillingAddressesApiGetBillingAddressRequest, options?: AxiosRequestConfig) {
665
+ return BillingAddressesApiFp(this.configuration).getBillingAddress(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
666
+ }
667
+
668
+ /**
669
+ * Returns a list of Billing Addresses you have previously created. The Billing Addresses 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\"
670
+ * @summary List Billing Addresses
671
+ * @param {BillingAddressesApiListBillingAddressesRequest} requestParameters Request parameters.
672
+ * @param {*} [options] Override http request option.
673
+ * @throws {RequiredError}
674
+ * @memberof BillingAddressesApi
675
+ */
676
+ public listBillingAddresses(requestParameters: BillingAddressesApiListBillingAddressesRequest = {}, options?: AxiosRequestConfig) {
677
+ return BillingAddressesApiFp(this.configuration).listBillingAddresses(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
678
+ }
679
+
680
+ /**
681
+ * Updates a billing address by code **Required Permissions** \"payment-management.payments.update\"
682
+ * @summary Update the Billing Address
683
+ * @param {BillingAddressesApiUpdateBillingAddressRequest} requestParameters Request parameters.
684
+ * @param {*} [options] Override http request option.
685
+ * @throws {RequiredError}
686
+ * @memberof BillingAddressesApi
687
+ */
688
+ public updateBillingAddress(requestParameters: BillingAddressesApiUpdateBillingAddressRequest, options?: AxiosRequestConfig) {
689
+ return BillingAddressesApiFp(this.configuration).updateBillingAddress(requestParameters.code, requestParameters.updateBillingAddressRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
690
+ }
691
+ }