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

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.
@@ -0,0 +1,543 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Emil Payment Service
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ var __importDefault = (this && this.__importDefault) || function (mod) {
78
+ return (mod && mod.__esModule) ? mod : { "default": mod };
79
+ };
80
+ Object.defineProperty(exports, "__esModule", { value: true });
81
+ exports.BillingAddressesApi = exports.BillingAddressesApiFactory = exports.BillingAddressesApiFp = exports.BillingAddressesApiAxiosParamCreator = void 0;
82
+ var axios_1 = __importDefault(require("axios"));
83
+ // Some imports not used depending on template conditions
84
+ // @ts-ignore
85
+ var common_1 = require("../common");
86
+ // @ts-ignore
87
+ var base_1 = require("../base");
88
+ /**
89
+ * BillingAddressesApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var BillingAddressesApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * This will create a new billing address for a specified account or partner **Required Permissions** \"payment-management.payments.create\"
97
+ * @summary Create the Billing Address
98
+ * @param {CreateBillingAddressRequestDto} createBillingAddressRequestDto
99
+ * @param {string} [authorization] Bearer Token
100
+ * @param {*} [options] Override http request option.
101
+ * @throws {RequiredError}
102
+ */
103
+ createBillingAddress: function (createBillingAddressRequestDto, authorization, options) {
104
+ if (options === void 0) { options = {}; }
105
+ return __awaiter(_this, void 0, void 0, function () {
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
107
+ return __generator(this, function (_a) {
108
+ switch (_a.label) {
109
+ case 0:
110
+ // verify required parameter 'createBillingAddressRequestDto' is not null or undefined
111
+ (0, common_1.assertParamExists)('createBillingAddress', 'createBillingAddressRequestDto', createBillingAddressRequestDto);
112
+ localVarPath = "/paymentservice/v1/billing-addresses";
113
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
114
+ if (configuration) {
115
+ baseOptions = configuration.baseOptions;
116
+ baseAccessToken = configuration.accessToken;
117
+ }
118
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
119
+ localVarHeaderParameter = {};
120
+ localVarQueryParameter = {};
121
+ // authentication bearer required
122
+ // http bearer authentication required
123
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
124
+ case 1:
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ _a.sent();
128
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
130
+ }
131
+ localVarHeaderParameter['Content-Type'] = 'application/json';
132
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
133
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
134
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
135
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createBillingAddressRequestDto, localVarRequestOptions, configuration);
136
+ return [2 /*return*/, {
137
+ url: (0, common_1.toPathString)(localVarUrlObj),
138
+ options: localVarRequestOptions,
139
+ }];
140
+ }
141
+ });
142
+ });
143
+ },
144
+ /**
145
+ * Deletes a billing address by code **Required Permissions** \"payment-management.payments.delete\"
146
+ * @summary Delete the Billing Address
147
+ * @param {string} code Unique identifier for the object.
148
+ * @param {string} [authorization] Bearer Token
149
+ * @param {*} [options] Override http request option.
150
+ * @throws {RequiredError}
151
+ */
152
+ deleteBillingAddress: function (code, authorization, options) {
153
+ if (options === void 0) { options = {}; }
154
+ return __awaiter(_this, void 0, void 0, function () {
155
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
156
+ return __generator(this, function (_a) {
157
+ switch (_a.label) {
158
+ case 0:
159
+ // verify required parameter 'code' is not null or undefined
160
+ (0, common_1.assertParamExists)('deleteBillingAddress', 'code', code);
161
+ localVarPath = "/paymentservice/v1/billing-addresses/{code}"
162
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
163
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
164
+ if (configuration) {
165
+ baseOptions = configuration.baseOptions;
166
+ baseAccessToken = configuration.accessToken;
167
+ }
168
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
169
+ localVarHeaderParameter = {};
170
+ localVarQueryParameter = {};
171
+ // authentication bearer required
172
+ // http bearer authentication required
173
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
174
+ case 1:
175
+ // authentication bearer required
176
+ // http bearer authentication required
177
+ _a.sent();
178
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
179
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
180
+ }
181
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
182
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
183
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
184
+ return [2 /*return*/, {
185
+ url: (0, common_1.toPathString)(localVarUrlObj),
186
+ options: localVarRequestOptions,
187
+ }];
188
+ }
189
+ });
190
+ });
191
+ },
192
+ /**
193
+ * 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\"
194
+ * @summary Retrieve the Billing Address
195
+ * @param {string} code
196
+ * @param {string} [authorization] Bearer Token
197
+ * @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;
198
+ * @param {*} [options] Override http request option.
199
+ * @throws {RequiredError}
200
+ */
201
+ getBillingAddress: function (code, authorization, expand, options) {
202
+ if (options === void 0) { options = {}; }
203
+ return __awaiter(_this, void 0, void 0, function () {
204
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
205
+ return __generator(this, function (_a) {
206
+ switch (_a.label) {
207
+ case 0:
208
+ // verify required parameter 'code' is not null or undefined
209
+ (0, common_1.assertParamExists)('getBillingAddress', 'code', code);
210
+ localVarPath = "/paymentservice/v1/billing-addresses/{code}"
211
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
212
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
213
+ if (configuration) {
214
+ baseOptions = configuration.baseOptions;
215
+ baseAccessToken = configuration.accessToken;
216
+ }
217
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
218
+ localVarHeaderParameter = {};
219
+ localVarQueryParameter = {};
220
+ // authentication bearer required
221
+ // http bearer authentication required
222
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
223
+ case 1:
224
+ // authentication bearer required
225
+ // http bearer authentication required
226
+ _a.sent();
227
+ if (expand !== undefined) {
228
+ localVarQueryParameter['expand'] = expand;
229
+ }
230
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
231
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
232
+ }
233
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
234
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
235
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
236
+ return [2 /*return*/, {
237
+ url: (0, common_1.toPathString)(localVarUrlObj),
238
+ options: localVarRequestOptions,
239
+ }];
240
+ }
241
+ });
242
+ });
243
+ },
244
+ /**
245
+ * 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\"
246
+ * @summary List Billing Addresses
247
+ * @param {string} [authorization] Bearer Token
248
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
249
+ * @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.
250
+ * @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;
251
+ * @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;
252
+ * @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;
253
+ * @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;
254
+ * @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;
255
+ * @param {*} [options] Override http request option.
256
+ * @throws {RequiredError}
257
+ */
258
+ listBillingAddresses: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
259
+ if (options === void 0) { options = {}; }
260
+ return __awaiter(_this, void 0, void 0, function () {
261
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
262
+ return __generator(this, function (_a) {
263
+ switch (_a.label) {
264
+ case 0:
265
+ localVarPath = "/paymentservice/v1/billing-addresses";
266
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
267
+ if (configuration) {
268
+ baseOptions = configuration.baseOptions;
269
+ baseAccessToken = configuration.accessToken;
270
+ }
271
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
272
+ localVarHeaderParameter = {};
273
+ localVarQueryParameter = {};
274
+ // authentication bearer required
275
+ // http bearer authentication required
276
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
277
+ case 1:
278
+ // authentication bearer required
279
+ // http bearer authentication required
280
+ _a.sent();
281
+ if (pageSize !== undefined) {
282
+ localVarQueryParameter['pageSize'] = pageSize;
283
+ }
284
+ if (pageToken !== undefined) {
285
+ localVarQueryParameter['pageToken'] = pageToken;
286
+ }
287
+ if (filter !== undefined) {
288
+ localVarQueryParameter['filter'] = filter;
289
+ }
290
+ if (search !== undefined) {
291
+ localVarQueryParameter['search'] = search;
292
+ }
293
+ if (order !== undefined) {
294
+ localVarQueryParameter['order'] = order;
295
+ }
296
+ if (expand !== undefined) {
297
+ localVarQueryParameter['expand'] = expand;
298
+ }
299
+ if (filters !== undefined) {
300
+ localVarQueryParameter['filters'] = filters;
301
+ }
302
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
303
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
304
+ }
305
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
306
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
307
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
308
+ return [2 /*return*/, {
309
+ url: (0, common_1.toPathString)(localVarUrlObj),
310
+ options: localVarRequestOptions,
311
+ }];
312
+ }
313
+ });
314
+ });
315
+ },
316
+ };
317
+ };
318
+ exports.BillingAddressesApiAxiosParamCreator = BillingAddressesApiAxiosParamCreator;
319
+ /**
320
+ * BillingAddressesApi - functional programming interface
321
+ * @export
322
+ */
323
+ var BillingAddressesApiFp = function (configuration) {
324
+ var localVarAxiosParamCreator = (0, exports.BillingAddressesApiAxiosParamCreator)(configuration);
325
+ return {
326
+ /**
327
+ * This will create a new billing address for a specified account or partner **Required Permissions** \"payment-management.payments.create\"
328
+ * @summary Create the Billing Address
329
+ * @param {CreateBillingAddressRequestDto} createBillingAddressRequestDto
330
+ * @param {string} [authorization] Bearer Token
331
+ * @param {*} [options] Override http request option.
332
+ * @throws {RequiredError}
333
+ */
334
+ createBillingAddress: function (createBillingAddressRequestDto, authorization, options) {
335
+ return __awaiter(this, void 0, void 0, function () {
336
+ var localVarAxiosArgs;
337
+ return __generator(this, function (_a) {
338
+ switch (_a.label) {
339
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createBillingAddress(createBillingAddressRequestDto, authorization, options)];
340
+ case 1:
341
+ localVarAxiosArgs = _a.sent();
342
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
343
+ }
344
+ });
345
+ });
346
+ },
347
+ /**
348
+ * Deletes a billing address by code **Required Permissions** \"payment-management.payments.delete\"
349
+ * @summary Delete the Billing Address
350
+ * @param {string} code Unique identifier for the object.
351
+ * @param {string} [authorization] Bearer Token
352
+ * @param {*} [options] Override http request option.
353
+ * @throws {RequiredError}
354
+ */
355
+ deleteBillingAddress: function (code, authorization, options) {
356
+ return __awaiter(this, void 0, void 0, function () {
357
+ var localVarAxiosArgs;
358
+ return __generator(this, function (_a) {
359
+ switch (_a.label) {
360
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteBillingAddress(code, authorization, options)];
361
+ case 1:
362
+ localVarAxiosArgs = _a.sent();
363
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
364
+ }
365
+ });
366
+ });
367
+ },
368
+ /**
369
+ * 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\"
370
+ * @summary Retrieve the Billing Address
371
+ * @param {string} code
372
+ * @param {string} [authorization] Bearer Token
373
+ * @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;
374
+ * @param {*} [options] Override http request option.
375
+ * @throws {RequiredError}
376
+ */
377
+ getBillingAddress: function (code, authorization, expand, options) {
378
+ return __awaiter(this, void 0, void 0, function () {
379
+ var localVarAxiosArgs;
380
+ return __generator(this, function (_a) {
381
+ switch (_a.label) {
382
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getBillingAddress(code, authorization, expand, options)];
383
+ case 1:
384
+ localVarAxiosArgs = _a.sent();
385
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
386
+ }
387
+ });
388
+ });
389
+ },
390
+ /**
391
+ * 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\"
392
+ * @summary List Billing Addresses
393
+ * @param {string} [authorization] Bearer Token
394
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
395
+ * @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.
396
+ * @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;
397
+ * @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;
398
+ * @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;
399
+ * @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;
400
+ * @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;
401
+ * @param {*} [options] Override http request option.
402
+ * @throws {RequiredError}
403
+ */
404
+ listBillingAddresses: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
405
+ return __awaiter(this, void 0, void 0, function () {
406
+ var localVarAxiosArgs;
407
+ return __generator(this, function (_a) {
408
+ switch (_a.label) {
409
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listBillingAddresses(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
410
+ case 1:
411
+ localVarAxiosArgs = _a.sent();
412
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
413
+ }
414
+ });
415
+ });
416
+ },
417
+ };
418
+ };
419
+ exports.BillingAddressesApiFp = BillingAddressesApiFp;
420
+ /**
421
+ * BillingAddressesApi - factory interface
422
+ * @export
423
+ */
424
+ var BillingAddressesApiFactory = function (configuration, basePath, axios) {
425
+ var localVarFp = (0, exports.BillingAddressesApiFp)(configuration);
426
+ return {
427
+ /**
428
+ * This will create a new billing address for a specified account or partner **Required Permissions** \"payment-management.payments.create\"
429
+ * @summary Create the Billing Address
430
+ * @param {CreateBillingAddressRequestDto} createBillingAddressRequestDto
431
+ * @param {string} [authorization] Bearer Token
432
+ * @param {*} [options] Override http request option.
433
+ * @throws {RequiredError}
434
+ */
435
+ createBillingAddress: function (createBillingAddressRequestDto, authorization, options) {
436
+ return localVarFp.createBillingAddress(createBillingAddressRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
437
+ },
438
+ /**
439
+ * Deletes a billing address by code **Required Permissions** \"payment-management.payments.delete\"
440
+ * @summary Delete the Billing Address
441
+ * @param {string} code Unique identifier for the object.
442
+ * @param {string} [authorization] Bearer Token
443
+ * @param {*} [options] Override http request option.
444
+ * @throws {RequiredError}
445
+ */
446
+ deleteBillingAddress: function (code, authorization, options) {
447
+ return localVarFp.deleteBillingAddress(code, authorization, options).then(function (request) { return request(axios, basePath); });
448
+ },
449
+ /**
450
+ * 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\"
451
+ * @summary Retrieve the Billing Address
452
+ * @param {string} code
453
+ * @param {string} [authorization] Bearer Token
454
+ * @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;
455
+ * @param {*} [options] Override http request option.
456
+ * @throws {RequiredError}
457
+ */
458
+ getBillingAddress: function (code, authorization, expand, options) {
459
+ return localVarFp.getBillingAddress(code, authorization, expand, options).then(function (request) { return request(axios, basePath); });
460
+ },
461
+ /**
462
+ * 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\"
463
+ * @summary List Billing Addresses
464
+ * @param {string} [authorization] Bearer Token
465
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
466
+ * @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.
467
+ * @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;
468
+ * @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;
469
+ * @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;
470
+ * @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;
471
+ * @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;
472
+ * @param {*} [options] Override http request option.
473
+ * @throws {RequiredError}
474
+ */
475
+ listBillingAddresses: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
476
+ return localVarFp.listBillingAddresses(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
477
+ },
478
+ };
479
+ };
480
+ exports.BillingAddressesApiFactory = BillingAddressesApiFactory;
481
+ /**
482
+ * BillingAddressesApi - object-oriented interface
483
+ * @export
484
+ * @class BillingAddressesApi
485
+ * @extends {BaseAPI}
486
+ */
487
+ var BillingAddressesApi = /** @class */ (function (_super) {
488
+ __extends(BillingAddressesApi, _super);
489
+ function BillingAddressesApi() {
490
+ return _super !== null && _super.apply(this, arguments) || this;
491
+ }
492
+ /**
493
+ * This will create a new billing address for a specified account or partner **Required Permissions** \"payment-management.payments.create\"
494
+ * @summary Create the Billing Address
495
+ * @param {BillingAddressesApiCreateBillingAddressRequest} requestParameters Request parameters.
496
+ * @param {*} [options] Override http request option.
497
+ * @throws {RequiredError}
498
+ * @memberof BillingAddressesApi
499
+ */
500
+ BillingAddressesApi.prototype.createBillingAddress = function (requestParameters, options) {
501
+ var _this = this;
502
+ return (0, exports.BillingAddressesApiFp)(this.configuration).createBillingAddress(requestParameters.createBillingAddressRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
503
+ };
504
+ /**
505
+ * Deletes a billing address by code **Required Permissions** \"payment-management.payments.delete\"
506
+ * @summary Delete the Billing Address
507
+ * @param {BillingAddressesApiDeleteBillingAddressRequest} requestParameters Request parameters.
508
+ * @param {*} [options] Override http request option.
509
+ * @throws {RequiredError}
510
+ * @memberof BillingAddressesApi
511
+ */
512
+ BillingAddressesApi.prototype.deleteBillingAddress = function (requestParameters, options) {
513
+ var _this = this;
514
+ return (0, exports.BillingAddressesApiFp)(this.configuration).deleteBillingAddress(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
515
+ };
516
+ /**
517
+ * 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\"
518
+ * @summary Retrieve the Billing Address
519
+ * @param {BillingAddressesApiGetBillingAddressRequest} requestParameters Request parameters.
520
+ * @param {*} [options] Override http request option.
521
+ * @throws {RequiredError}
522
+ * @memberof BillingAddressesApi
523
+ */
524
+ BillingAddressesApi.prototype.getBillingAddress = function (requestParameters, options) {
525
+ var _this = this;
526
+ return (0, exports.BillingAddressesApiFp)(this.configuration).getBillingAddress(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
527
+ };
528
+ /**
529
+ * 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\"
530
+ * @summary List Billing Addresses
531
+ * @param {BillingAddressesApiListBillingAddressesRequest} requestParameters Request parameters.
532
+ * @param {*} [options] Override http request option.
533
+ * @throws {RequiredError}
534
+ * @memberof BillingAddressesApi
535
+ */
536
+ BillingAddressesApi.prototype.listBillingAddresses = function (requestParameters, options) {
537
+ var _this = this;
538
+ if (requestParameters === void 0) { requestParameters = {}; }
539
+ return (0, exports.BillingAddressesApiFp)(this.configuration).listBillingAddresses(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
540
+ };
541
+ return BillingAddressesApi;
542
+ }(base_1.BaseAPI));
543
+ exports.BillingAddressesApi = BillingAddressesApi;
package/dist/api.d.ts CHANGED
@@ -12,6 +12,7 @@
12
12
  export * from './api/bank-accounts-api';
13
13
  export * from './api/bank-orders-api';
14
14
  export * from './api/bank-transaction-api';
15
+ export * from './api/billing-addresses-api';
15
16
  export * from './api/credit-allocation-api';
16
17
  export * from './api/exceeding-credits-api';
17
18
  export * from './api/health-check-api';
package/dist/api.js CHANGED
@@ -30,6 +30,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
30
30
  __exportStar(require("./api/bank-accounts-api"), exports);
31
31
  __exportStar(require("./api/bank-orders-api"), exports);
32
32
  __exportStar(require("./api/bank-transaction-api"), exports);
33
+ __exportStar(require("./api/billing-addresses-api"), exports);
33
34
  __exportStar(require("./api/credit-allocation-api"), exports);
34
35
  __exportStar(require("./api/exceeding-credits-api"), exports);
35
36
  __exportStar(require("./api/health-check-api"), exports);