@emilgroup/payment-sdk-node 1.23.0 → 1.23.1-beta.10

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