@revenexx/sdk 0.0.4 → 0.0.6

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 (99) hide show
  1. package/dist/cjs/sdk.js +13491 -6163
  2. package/dist/cjs/sdk.js.map +1 -1
  3. package/dist/esm/sdk.js +13464 -6162
  4. package/dist/esm/sdk.js.map +1 -1
  5. package/dist/iife/sdk.js +13491 -6163
  6. package/package.json +1 -1
  7. package/src/client.ts +1 -1
  8. package/src/enums/address-type.ts +4 -0
  9. package/src/enums/cart-export-format.ts +4 -0
  10. package/src/enums/cart-io-apply-mode.ts +5 -0
  11. package/src/enums/cart-io-direction.ts +4 -0
  12. package/src/enums/cart-io-entity.ts +4 -0
  13. package/src/enums/cart-io-format.ts +4 -0
  14. package/src/enums/cart-item-type.ts +5 -0
  15. package/src/enums/channel-status.ts +4 -0
  16. package/src/enums/channel-type.ts +7 -0
  17. package/src/enums/contact-role.ts +6 -0
  18. package/src/enums/contact-status.ts +5 -0
  19. package/src/enums/location-type.ts +6 -0
  20. package/src/enums/market-status.ts +4 -0
  21. package/src/enums/order-comment-visibility.ts +4 -0
  22. package/src/enums/order-item-type.ts +5 -0
  23. package/src/enums/order-list-kind.ts +4 -0
  24. package/src/enums/order-payment-status.ts +9 -0
  25. package/src/enums/organization-status.ts +4 -0
  26. package/src/enums/page-status.ts +5 -0
  27. package/src/enums/payment-fee-type.ts +5 -0
  28. package/src/enums/payment-method-kind.ts +4 -0
  29. package/src/enums/price-entry-type.ts +4 -0
  30. package/src/enums/price-list-status.ts +4 -0
  31. package/src/enums/shipping-method-matrix-basis.ts +6 -0
  32. package/src/enums/shipping-method-pricing-type.ts +5 -0
  33. package/src/enums/store-asset-request-visibility.ts +4 -0
  34. package/src/enums/visibility.ts +4 -0
  35. package/src/index.ts +28 -2
  36. package/src/models.ts +5309 -1009
  37. package/src/services/apps.ts +154 -154
  38. package/src/services/avatars.ts +57 -57
  39. package/src/services/carts.ts +739 -104
  40. package/src/services/channels.ts +147 -19
  41. package/src/services/customers.ts +809 -69
  42. package/src/services/greetings.ts +18 -18
  43. package/src/services/inventories.ts +620 -65
  44. package/src/services/locale.ts +16 -16
  45. package/src/services/markets.ts +690 -75
  46. package/src/services/messaging.ts +273 -273
  47. package/src/services/orderlists.ts +889 -0
  48. package/src/services/orders.ts +692 -137
  49. package/src/services/pages.ts +661 -155
  50. package/src/services/payments.ts +591 -64
  51. package/src/services/prices.ts +585 -59
  52. package/src/services/products.ts +1908 -272
  53. package/src/services/search.ts +24 -24
  54. package/src/services/shipping.ts +451 -59
  55. package/src/services/sites.ts +116 -116
  56. package/src/services/storage.ts +933 -599
  57. package/src/services/tokens.ts +14 -14
  58. package/types/enums/address-type.d.ts +4 -0
  59. package/types/enums/cart-export-format.d.ts +4 -0
  60. package/types/enums/cart-io-apply-mode.d.ts +5 -0
  61. package/types/enums/cart-io-direction.d.ts +4 -0
  62. package/types/enums/cart-io-entity.d.ts +4 -0
  63. package/types/enums/cart-io-format.d.ts +4 -0
  64. package/types/enums/cart-item-type.d.ts +5 -0
  65. package/types/enums/channel-status.d.ts +4 -0
  66. package/types/enums/channel-type.d.ts +7 -0
  67. package/types/enums/contact-role.d.ts +6 -0
  68. package/types/enums/contact-status.d.ts +5 -0
  69. package/types/enums/location-type.d.ts +6 -0
  70. package/types/enums/market-status.d.ts +4 -0
  71. package/types/enums/order-comment-visibility.d.ts +4 -0
  72. package/types/enums/order-item-type.d.ts +5 -0
  73. package/types/enums/order-list-kind.d.ts +4 -0
  74. package/types/enums/order-payment-status.d.ts +9 -0
  75. package/types/enums/organization-status.d.ts +4 -0
  76. package/types/enums/page-status.d.ts +5 -0
  77. package/types/enums/payment-fee-type.d.ts +5 -0
  78. package/types/enums/payment-method-kind.d.ts +4 -0
  79. package/types/enums/price-entry-type.d.ts +4 -0
  80. package/types/enums/price-list-status.d.ts +4 -0
  81. package/types/enums/shipping-method-matrix-basis.d.ts +6 -0
  82. package/types/enums/shipping-method-pricing-type.d.ts +5 -0
  83. package/types/enums/store-asset-request-visibility.d.ts +4 -0
  84. package/types/enums/visibility.d.ts +4 -0
  85. package/types/index.d.ts +28 -2
  86. package/types/models.d.ts +5170 -1010
  87. package/types/services/carts.d.ts +271 -12
  88. package/types/services/channels.d.ts +54 -2
  89. package/types/services/customers.d.ts +298 -12
  90. package/types/services/inventories.d.ts +225 -11
  91. package/types/services/markets.d.ts +235 -6
  92. package/types/services/orderlists.d.ts +324 -0
  93. package/types/services/orders.d.ts +238 -16
  94. package/types/services/pages.d.ts +190 -6
  95. package/types/services/payments.d.ts +221 -7
  96. package/types/services/prices.d.ts +218 -6
  97. package/types/services/products.d.ts +672 -32
  98. package/types/services/shipping.d.ts +168 -6
  99. package/types/services/storage.d.ts +353 -285
@@ -2,6 +2,7 @@ import { Service } from '../service';
2
2
  import { RevenexxException, Client, type Payload, UploadProgress } from '../client';
3
3
  import type { Models } from '../models';
4
4
 
5
+ import { MarketStatus } from '../enums/market-status';
5
6
 
6
7
  export class Markets {
7
8
  client: Client;
@@ -18,7 +19,7 @@ export class Markets {
18
19
  marketsList(): Promise<{}> {
19
20
 
20
21
  const apiPath = '/v1/markets';
21
- const payload: Payload = {};
22
+ const apiPayload: Payload = {};
22
23
  const uri = new URL(this.client.config.endpoint + apiPath);
23
24
 
24
25
  const apiHeaders: { [header: string]: string } = {
@@ -28,19 +29,95 @@ export class Markets {
28
29
  'get',
29
30
  uri,
30
31
  apiHeaders,
31
- payload
32
+ apiPayload
32
33
  );
33
34
  }
34
35
 
35
36
  /**
36
37
  *
38
+ * @param {string} params.code - Market code (unique per tenant).
39
+ * @param {string} params.name -
40
+ * @param {string} params.currency - ISO 4217 code (default 'EUR').
41
+ * @param {boolean} params.isDefault -
42
+ * @param {object} params.labels - Localized display names ({locale: label}).
43
+ * @param {number} params.position - Sort position (default 0).
44
+ * @param {MarketStatus} params.status - Default 'active'.
37
45
  * @throws {RevenexxException}
38
46
  * @returns {Promise<Models.Market>}
39
47
  */
40
- marketsCreate(): Promise<Models.Market> {
48
+ marketsCreate(params: { code: string, name: string, currency?: string, isDefault?: boolean, labels?: object, position?: number, status?: MarketStatus }): Promise<Models.Market>;
49
+ /**
50
+ *
51
+ * @param {string} code - Market code (unique per tenant).
52
+ * @param {string} name -
53
+ * @param {string} currency - ISO 4217 code (default 'EUR').
54
+ * @param {boolean} isDefault -
55
+ * @param {object} labels - Localized display names ({locale: label}).
56
+ * @param {number} position - Sort position (default 0).
57
+ * @param {MarketStatus} status - Default 'active'.
58
+ * @throws {RevenexxException}
59
+ * @returns {Promise<Models.Market>}
60
+ * @deprecated Use the object parameter style method for a better developer experience.
61
+ */
62
+ marketsCreate(code: string, name: string, currency?: string, isDefault?: boolean, labels?: object, position?: number, status?: MarketStatus): Promise<Models.Market>;
63
+ marketsCreate(
64
+ paramsOrFirst: { code: string, name: string, currency?: string, isDefault?: boolean, labels?: object, position?: number, status?: MarketStatus } | string,
65
+ ...rest: [(string)?, (string)?, (boolean)?, (object)?, (number)?, (MarketStatus)?]
66
+ ): Promise<Models.Market> {
67
+ let params: { code: string, name: string, currency?: string, isDefault?: boolean, labels?: object, position?: number, status?: MarketStatus };
68
+
69
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
70
+ params = (paramsOrFirst || {}) as { code: string, name: string, currency?: string, isDefault?: boolean, labels?: object, position?: number, status?: MarketStatus };
71
+ } else {
72
+ params = {
73
+ code: paramsOrFirst as string,
74
+ name: rest[0] as string,
75
+ currency: rest[1] as string,
76
+ isDefault: rest[2] as boolean,
77
+ labels: rest[3] as object,
78
+ position: rest[4] as number,
79
+ status: rest[5] as MarketStatus
80
+ };
81
+ }
82
+
83
+ const code = params.code;
84
+ const name = params.name;
85
+ const currency = params.currency;
86
+ const isDefault = params.isDefault;
87
+ const labels = params.labels;
88
+ const position = params.position;
89
+ const status = params.status;
90
+
91
+ if (typeof code === 'undefined') {
92
+ throw new RevenexxException('Missing required parameter: "code"');
93
+ }
94
+ if (typeof name === 'undefined') {
95
+ throw new RevenexxException('Missing required parameter: "name"');
96
+ }
41
97
 
42
98
  const apiPath = '/v1/markets';
43
- const payload: Payload = {};
99
+ const apiPayload: Payload = {};
100
+ if (typeof code !== 'undefined') {
101
+ apiPayload['code'] = code;
102
+ }
103
+ if (typeof currency !== 'undefined') {
104
+ apiPayload['currency'] = currency;
105
+ }
106
+ if (typeof isDefault !== 'undefined') {
107
+ apiPayload['is_default'] = isDefault;
108
+ }
109
+ if (typeof labels !== 'undefined') {
110
+ apiPayload['labels'] = labels;
111
+ }
112
+ if (typeof name !== 'undefined') {
113
+ apiPayload['name'] = name;
114
+ }
115
+ if (typeof position !== 'undefined') {
116
+ apiPayload['position'] = position;
117
+ }
118
+ if (typeof status !== 'undefined') {
119
+ apiPayload['status'] = status;
120
+ }
44
121
  const uri = new URL(this.client.config.endpoint + apiPath);
45
122
 
46
123
  const apiHeaders: { [header: string]: string } = {
@@ -51,7 +128,7 @@ export class Markets {
51
128
  'post',
52
129
  uri,
53
130
  apiHeaders,
54
- payload
131
+ apiPayload
55
132
  );
56
133
  }
57
134
 
@@ -90,7 +167,7 @@ export class Markets {
90
167
  }
91
168
 
92
169
  const apiPath = '/v1/markets/{id}'.replace('{id}', id);
93
- const payload: Payload = {};
170
+ const apiPayload: Payload = {};
94
171
  const uri = new URL(this.client.config.endpoint + apiPath);
95
172
 
96
173
  const apiHeaders: { [header: string]: string } = {
@@ -100,7 +177,7 @@ export class Markets {
100
177
  'delete',
101
178
  uri,
102
179
  apiHeaders,
103
- payload
180
+ apiPayload
104
181
  );
105
182
  }
106
183
 
@@ -139,7 +216,7 @@ export class Markets {
139
216
  }
140
217
 
141
218
  const apiPath = '/v1/markets/{id}'.replace('{id}', id);
142
- const payload: Payload = {};
219
+ const apiPayload: Payload = {};
143
220
  const uri = new URL(this.client.config.endpoint + apiPath);
144
221
 
145
222
  const apiHeaders: { [header: string]: string } = {
@@ -149,46 +226,96 @@ export class Markets {
149
226
  'get',
150
227
  uri,
151
228
  apiHeaders,
152
- payload
229
+ apiPayload
153
230
  );
154
231
  }
155
232
 
156
233
  /**
157
234
  *
158
235
  * @param {string} params.id -
236
+ * @param {string} params.code - Market code (unique per tenant).
237
+ * @param {string} params.currency - ISO 4217 code (default 'EUR').
238
+ * @param {boolean} params.isDefault -
239
+ * @param {object} params.labels - Localized display names ({locale: label}).
240
+ * @param {string} params.name -
241
+ * @param {number} params.position - Sort position (default 0).
242
+ * @param {MarketStatus} params.status - Default 'active'.
159
243
  * @throws {RevenexxException}
160
244
  * @returns {Promise<Models.Market>}
161
245
  */
162
- marketsUpdate(params: { id: string }): Promise<Models.Market>;
246
+ marketsUpdate(params: { id: string, code?: string, currency?: string, isDefault?: boolean, labels?: object, name?: string, position?: number, status?: MarketStatus }): Promise<Models.Market>;
163
247
  /**
164
248
  *
165
249
  * @param {string} id -
250
+ * @param {string} code - Market code (unique per tenant).
251
+ * @param {string} currency - ISO 4217 code (default 'EUR').
252
+ * @param {boolean} isDefault -
253
+ * @param {object} labels - Localized display names ({locale: label}).
254
+ * @param {string} name -
255
+ * @param {number} position - Sort position (default 0).
256
+ * @param {MarketStatus} status - Default 'active'.
166
257
  * @throws {RevenexxException}
167
258
  * @returns {Promise<Models.Market>}
168
259
  * @deprecated Use the object parameter style method for a better developer experience.
169
260
  */
170
- marketsUpdate(id: string): Promise<Models.Market>;
261
+ marketsUpdate(id: string, code?: string, currency?: string, isDefault?: boolean, labels?: object, name?: string, position?: number, status?: MarketStatus): Promise<Models.Market>;
171
262
  marketsUpdate(
172
- paramsOrFirst: { id: string } | string
263
+ paramsOrFirst: { id: string, code?: string, currency?: string, isDefault?: boolean, labels?: object, name?: string, position?: number, status?: MarketStatus } | string,
264
+ ...rest: [(string)?, (string)?, (boolean)?, (object)?, (string)?, (number)?, (MarketStatus)?]
173
265
  ): Promise<Models.Market> {
174
- let params: { id: string };
266
+ let params: { id: string, code?: string, currency?: string, isDefault?: boolean, labels?: object, name?: string, position?: number, status?: MarketStatus };
175
267
 
176
268
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
177
- params = (paramsOrFirst || {}) as { id: string };
269
+ params = (paramsOrFirst || {}) as { id: string, code?: string, currency?: string, isDefault?: boolean, labels?: object, name?: string, position?: number, status?: MarketStatus };
178
270
  } else {
179
271
  params = {
180
- id: paramsOrFirst as string
272
+ id: paramsOrFirst as string,
273
+ code: rest[0] as string,
274
+ currency: rest[1] as string,
275
+ isDefault: rest[2] as boolean,
276
+ labels: rest[3] as object,
277
+ name: rest[4] as string,
278
+ position: rest[5] as number,
279
+ status: rest[6] as MarketStatus
181
280
  };
182
281
  }
183
282
 
184
283
  const id = params.id;
284
+ const code = params.code;
285
+ const currency = params.currency;
286
+ const isDefault = params.isDefault;
287
+ const labels = params.labels;
288
+ const name = params.name;
289
+ const position = params.position;
290
+ const status = params.status;
185
291
 
186
292
  if (typeof id === 'undefined') {
187
293
  throw new RevenexxException('Missing required parameter: "id"');
188
294
  }
189
295
 
190
296
  const apiPath = '/v1/markets/{id}'.replace('{id}', id);
191
- const payload: Payload = {};
297
+ const apiPayload: Payload = {};
298
+ if (typeof code !== 'undefined') {
299
+ apiPayload['code'] = code;
300
+ }
301
+ if (typeof currency !== 'undefined') {
302
+ apiPayload['currency'] = currency;
303
+ }
304
+ if (typeof isDefault !== 'undefined') {
305
+ apiPayload['is_default'] = isDefault;
306
+ }
307
+ if (typeof labels !== 'undefined') {
308
+ apiPayload['labels'] = labels;
309
+ }
310
+ if (typeof name !== 'undefined') {
311
+ apiPayload['name'] = name;
312
+ }
313
+ if (typeof position !== 'undefined') {
314
+ apiPayload['position'] = position;
315
+ }
316
+ if (typeof status !== 'undefined') {
317
+ apiPayload['status'] = status;
318
+ }
192
319
  const uri = new URL(this.client.config.endpoint + apiPath);
193
320
 
194
321
  const apiHeaders: { [header: string]: string } = {
@@ -199,7 +326,7 @@ export class Markets {
199
326
  'put',
200
327
  uri,
201
328
  apiHeaders,
202
- payload
329
+ apiPayload
203
330
  );
204
331
  }
205
332
 
@@ -238,7 +365,245 @@ export class Markets {
238
365
  }
239
366
 
240
367
  const apiPath = '/v1/markets/{id}/context'.replace('{id}', id);
241
- const payload: Payload = {};
368
+ const apiPayload: Payload = {};
369
+ const uri = new URL(this.client.config.endpoint + apiPath);
370
+
371
+ const apiHeaders: { [header: string]: string } = {
372
+ }
373
+
374
+ return this.client.call(
375
+ 'get',
376
+ uri,
377
+ apiHeaders,
378
+ apiPayload
379
+ );
380
+ }
381
+
382
+ /**
383
+ *
384
+ * @param {string} params.marketId -
385
+ * @throws {RevenexxException}
386
+ * @returns {Promise<{}>}
387
+ */
388
+ marketsCurrenciesList(params: { marketId: string }): Promise<{}>;
389
+ /**
390
+ *
391
+ * @param {string} marketId -
392
+ * @throws {RevenexxException}
393
+ * @returns {Promise<{}>}
394
+ * @deprecated Use the object parameter style method for a better developer experience.
395
+ */
396
+ marketsCurrenciesList(marketId: string): Promise<{}>;
397
+ marketsCurrenciesList(
398
+ paramsOrFirst: { marketId: string } | string
399
+ ): Promise<{}> {
400
+ let params: { marketId: string };
401
+
402
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
403
+ params = (paramsOrFirst || {}) as { marketId: string };
404
+ } else {
405
+ params = {
406
+ marketId: paramsOrFirst as string
407
+ };
408
+ }
409
+
410
+ const marketId = params.marketId;
411
+
412
+ if (typeof marketId === 'undefined') {
413
+ throw new RevenexxException('Missing required parameter: "marketId"');
414
+ }
415
+
416
+ const apiPath = '/v1/markets/{market_id}/currencies'.replace('{market_id}', marketId);
417
+ const apiPayload: Payload = {};
418
+ const uri = new URL(this.client.config.endpoint + apiPath);
419
+
420
+ const apiHeaders: { [header: string]: string } = {
421
+ }
422
+
423
+ return this.client.call(
424
+ 'get',
425
+ uri,
426
+ apiHeaders,
427
+ apiPayload
428
+ );
429
+ }
430
+
431
+ /**
432
+ *
433
+ * @param {string} params.marketId -
434
+ * @param {string} params.code - ISO 4217 code, e.g. EUR (unique per market).
435
+ * @param {boolean} params.isDefault -
436
+ * @param {number} params.position - Sort position (default 0).
437
+ * @throws {RevenexxException}
438
+ * @returns {Promise<Models.MarketCurrency>}
439
+ */
440
+ marketsCurrenciesCreate(params: { marketId: string, code: string, isDefault?: boolean, position?: number }): Promise<Models.MarketCurrency>;
441
+ /**
442
+ *
443
+ * @param {string} marketId -
444
+ * @param {string} code - ISO 4217 code, e.g. EUR (unique per market).
445
+ * @param {boolean} isDefault -
446
+ * @param {number} position - Sort position (default 0).
447
+ * @throws {RevenexxException}
448
+ * @returns {Promise<Models.MarketCurrency>}
449
+ * @deprecated Use the object parameter style method for a better developer experience.
450
+ */
451
+ marketsCurrenciesCreate(marketId: string, code: string, isDefault?: boolean, position?: number): Promise<Models.MarketCurrency>;
452
+ marketsCurrenciesCreate(
453
+ paramsOrFirst: { marketId: string, code: string, isDefault?: boolean, position?: number } | string,
454
+ ...rest: [(string)?, (boolean)?, (number)?]
455
+ ): Promise<Models.MarketCurrency> {
456
+ let params: { marketId: string, code: string, isDefault?: boolean, position?: number };
457
+
458
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
459
+ params = (paramsOrFirst || {}) as { marketId: string, code: string, isDefault?: boolean, position?: number };
460
+ } else {
461
+ params = {
462
+ marketId: paramsOrFirst as string,
463
+ code: rest[0] as string,
464
+ isDefault: rest[1] as boolean,
465
+ position: rest[2] as number
466
+ };
467
+ }
468
+
469
+ const marketId = params.marketId;
470
+ const code = params.code;
471
+ const isDefault = params.isDefault;
472
+ const position = params.position;
473
+
474
+ if (typeof marketId === 'undefined') {
475
+ throw new RevenexxException('Missing required parameter: "marketId"');
476
+ }
477
+ if (typeof code === 'undefined') {
478
+ throw new RevenexxException('Missing required parameter: "code"');
479
+ }
480
+
481
+ const apiPath = '/v1/markets/{market_id}/currencies'.replace('{market_id}', marketId);
482
+ const apiPayload: Payload = {};
483
+ if (typeof code !== 'undefined') {
484
+ apiPayload['code'] = code;
485
+ }
486
+ if (typeof isDefault !== 'undefined') {
487
+ apiPayload['is_default'] = isDefault;
488
+ }
489
+ if (typeof position !== 'undefined') {
490
+ apiPayload['position'] = position;
491
+ }
492
+ const uri = new URL(this.client.config.endpoint + apiPath);
493
+
494
+ const apiHeaders: { [header: string]: string } = {
495
+ 'content-type': 'application/json',
496
+ }
497
+
498
+ return this.client.call(
499
+ 'post',
500
+ uri,
501
+ apiHeaders,
502
+ apiPayload
503
+ );
504
+ }
505
+
506
+ /**
507
+ *
508
+ * @param {string} params.marketId -
509
+ * @param {string} params.id -
510
+ * @throws {RevenexxException}
511
+ * @returns {Promise<{}>}
512
+ */
513
+ marketsCurrenciesDelete(params: { marketId: string, id: string }): Promise<{}>;
514
+ /**
515
+ *
516
+ * @param {string} marketId -
517
+ * @param {string} id -
518
+ * @throws {RevenexxException}
519
+ * @returns {Promise<{}>}
520
+ * @deprecated Use the object parameter style method for a better developer experience.
521
+ */
522
+ marketsCurrenciesDelete(marketId: string, id: string): Promise<{}>;
523
+ marketsCurrenciesDelete(
524
+ paramsOrFirst: { marketId: string, id: string } | string,
525
+ ...rest: [(string)?]
526
+ ): Promise<{}> {
527
+ let params: { marketId: string, id: string };
528
+
529
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
530
+ params = (paramsOrFirst || {}) as { marketId: string, id: string };
531
+ } else {
532
+ params = {
533
+ marketId: paramsOrFirst as string,
534
+ id: rest[0] as string
535
+ };
536
+ }
537
+
538
+ const marketId = params.marketId;
539
+ const id = params.id;
540
+
541
+ if (typeof marketId === 'undefined') {
542
+ throw new RevenexxException('Missing required parameter: "marketId"');
543
+ }
544
+ if (typeof id === 'undefined') {
545
+ throw new RevenexxException('Missing required parameter: "id"');
546
+ }
547
+
548
+ const apiPath = '/v1/markets/{market_id}/currencies/{id}'.replace('{market_id}', marketId).replace('{id}', id);
549
+ const apiPayload: Payload = {};
550
+ const uri = new URL(this.client.config.endpoint + apiPath);
551
+
552
+ const apiHeaders: { [header: string]: string } = {
553
+ }
554
+
555
+ return this.client.call(
556
+ 'delete',
557
+ uri,
558
+ apiHeaders,
559
+ apiPayload
560
+ );
561
+ }
562
+
563
+ /**
564
+ *
565
+ * @param {string} params.marketId -
566
+ * @param {string} params.id -
567
+ * @throws {RevenexxException}
568
+ * @returns {Promise<Models.MarketCurrency>}
569
+ */
570
+ marketsCurrenciesGet(params: { marketId: string, id: string }): Promise<Models.MarketCurrency>;
571
+ /**
572
+ *
573
+ * @param {string} marketId -
574
+ * @param {string} id -
575
+ * @throws {RevenexxException}
576
+ * @returns {Promise<Models.MarketCurrency>}
577
+ * @deprecated Use the object parameter style method for a better developer experience.
578
+ */
579
+ marketsCurrenciesGet(marketId: string, id: string): Promise<Models.MarketCurrency>;
580
+ marketsCurrenciesGet(
581
+ paramsOrFirst: { marketId: string, id: string } | string,
582
+ ...rest: [(string)?]
583
+ ): Promise<Models.MarketCurrency> {
584
+ let params: { marketId: string, id: string };
585
+
586
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
587
+ params = (paramsOrFirst || {}) as { marketId: string, id: string };
588
+ } else {
589
+ params = {
590
+ marketId: paramsOrFirst as string,
591
+ id: rest[0] as string
592
+ };
593
+ }
594
+
595
+ const marketId = params.marketId;
596
+ const id = params.id;
597
+
598
+ if (typeof marketId === 'undefined') {
599
+ throw new RevenexxException('Missing required parameter: "marketId"');
600
+ }
601
+ if (typeof id === 'undefined') {
602
+ throw new RevenexxException('Missing required parameter: "id"');
603
+ }
604
+
605
+ const apiPath = '/v1/markets/{market_id}/currencies/{id}'.replace('{market_id}', marketId).replace('{id}', id);
606
+ const apiPayload: Payload = {};
242
607
  const uri = new URL(this.client.config.endpoint + apiPath);
243
608
 
244
609
  const apiHeaders: { [header: string]: string } = {
@@ -248,7 +613,86 @@ export class Markets {
248
613
  'get',
249
614
  uri,
250
615
  apiHeaders,
251
- payload
616
+ apiPayload
617
+ );
618
+ }
619
+
620
+ /**
621
+ *
622
+ * @param {string} params.marketId -
623
+ * @param {string} params.id -
624
+ * @param {string} params.code - ISO 4217 code, e.g. EUR (unique per market).
625
+ * @param {boolean} params.isDefault -
626
+ * @param {number} params.position - Sort position (default 0).
627
+ * @throws {RevenexxException}
628
+ * @returns {Promise<Models.MarketCurrency>}
629
+ */
630
+ marketsCurrenciesUpdate(params: { marketId: string, id: string, code?: string, isDefault?: boolean, position?: number }): Promise<Models.MarketCurrency>;
631
+ /**
632
+ *
633
+ * @param {string} marketId -
634
+ * @param {string} id -
635
+ * @param {string} code - ISO 4217 code, e.g. EUR (unique per market).
636
+ * @param {boolean} isDefault -
637
+ * @param {number} position - Sort position (default 0).
638
+ * @throws {RevenexxException}
639
+ * @returns {Promise<Models.MarketCurrency>}
640
+ * @deprecated Use the object parameter style method for a better developer experience.
641
+ */
642
+ marketsCurrenciesUpdate(marketId: string, id: string, code?: string, isDefault?: boolean, position?: number): Promise<Models.MarketCurrency>;
643
+ marketsCurrenciesUpdate(
644
+ paramsOrFirst: { marketId: string, id: string, code?: string, isDefault?: boolean, position?: number } | string,
645
+ ...rest: [(string)?, (string)?, (boolean)?, (number)?]
646
+ ): Promise<Models.MarketCurrency> {
647
+ let params: { marketId: string, id: string, code?: string, isDefault?: boolean, position?: number };
648
+
649
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
650
+ params = (paramsOrFirst || {}) as { marketId: string, id: string, code?: string, isDefault?: boolean, position?: number };
651
+ } else {
652
+ params = {
653
+ marketId: paramsOrFirst as string,
654
+ id: rest[0] as string,
655
+ code: rest[1] as string,
656
+ isDefault: rest[2] as boolean,
657
+ position: rest[3] as number
658
+ };
659
+ }
660
+
661
+ const marketId = params.marketId;
662
+ const id = params.id;
663
+ const code = params.code;
664
+ const isDefault = params.isDefault;
665
+ const position = params.position;
666
+
667
+ if (typeof marketId === 'undefined') {
668
+ throw new RevenexxException('Missing required parameter: "marketId"');
669
+ }
670
+ if (typeof id === 'undefined') {
671
+ throw new RevenexxException('Missing required parameter: "id"');
672
+ }
673
+
674
+ const apiPath = '/v1/markets/{market_id}/currencies/{id}'.replace('{market_id}', marketId).replace('{id}', id);
675
+ const apiPayload: Payload = {};
676
+ if (typeof code !== 'undefined') {
677
+ apiPayload['code'] = code;
678
+ }
679
+ if (typeof isDefault !== 'undefined') {
680
+ apiPayload['is_default'] = isDefault;
681
+ }
682
+ if (typeof position !== 'undefined') {
683
+ apiPayload['position'] = position;
684
+ }
685
+ const uri = new URL(this.client.config.endpoint + apiPath);
686
+
687
+ const apiHeaders: { [header: string]: string } = {
688
+ 'content-type': 'application/json',
689
+ }
690
+
691
+ return this.client.call(
692
+ 'put',
693
+ uri,
694
+ apiHeaders,
695
+ apiPayload
252
696
  );
253
697
  }
254
698
 
@@ -286,8 +730,8 @@ export class Markets {
286
730
  throw new RevenexxException('Missing required parameter: "marketId"');
287
731
  }
288
732
 
289
- const apiPath = '/v1/markets/{market_id}/locales'.replace('{marketId}', marketId);
290
- const payload: Payload = {};
733
+ const apiPath = '/v1/markets/{market_id}/locales'.replace('{market_id}', marketId);
734
+ const apiPayload: Payload = {};
291
735
  const uri = new URL(this.client.config.endpoint + apiPath);
292
736
 
293
737
  const apiHeaders: { [header: string]: string } = {
@@ -297,46 +741,91 @@ export class Markets {
297
741
  'get',
298
742
  uri,
299
743
  apiHeaders,
300
- payload
744
+ apiPayload
301
745
  );
302
746
  }
303
747
 
304
748
  /**
305
749
  *
306
750
  * @param {string} params.marketId -
751
+ * @param {string} params.code - Locale code, e.g. 'de-DE' (unique per market).
752
+ * @param {string} params.country - ISO 3166-1 alpha-2 country code.
753
+ * @param {string} params.language - ISO 639-1 language code.
754
+ * @param {boolean} params.isDefault -
755
+ * @param {number} params.position - Sort position (default 0).
307
756
  * @throws {RevenexxException}
308
757
  * @returns {Promise<Models.MarketLocale>}
309
758
  */
310
- marketsLocalesCreate(params: { marketId: string }): Promise<Models.MarketLocale>;
759
+ marketsLocalesCreate(params: { marketId: string, code: string, country: string, language: string, isDefault?: boolean, position?: number }): Promise<Models.MarketLocale>;
311
760
  /**
312
761
  *
313
762
  * @param {string} marketId -
763
+ * @param {string} code - Locale code, e.g. 'de-DE' (unique per market).
764
+ * @param {string} country - ISO 3166-1 alpha-2 country code.
765
+ * @param {string} language - ISO 639-1 language code.
766
+ * @param {boolean} isDefault -
767
+ * @param {number} position - Sort position (default 0).
314
768
  * @throws {RevenexxException}
315
769
  * @returns {Promise<Models.MarketLocale>}
316
770
  * @deprecated Use the object parameter style method for a better developer experience.
317
771
  */
318
- marketsLocalesCreate(marketId: string): Promise<Models.MarketLocale>;
772
+ marketsLocalesCreate(marketId: string, code: string, country: string, language: string, isDefault?: boolean, position?: number): Promise<Models.MarketLocale>;
319
773
  marketsLocalesCreate(
320
- paramsOrFirst: { marketId: string } | string
774
+ paramsOrFirst: { marketId: string, code: string, country: string, language: string, isDefault?: boolean, position?: number } | string,
775
+ ...rest: [(string)?, (string)?, (string)?, (boolean)?, (number)?]
321
776
  ): Promise<Models.MarketLocale> {
322
- let params: { marketId: string };
777
+ let params: { marketId: string, code: string, country: string, language: string, isDefault?: boolean, position?: number };
323
778
 
324
779
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
325
- params = (paramsOrFirst || {}) as { marketId: string };
780
+ params = (paramsOrFirst || {}) as { marketId: string, code: string, country: string, language: string, isDefault?: boolean, position?: number };
326
781
  } else {
327
782
  params = {
328
- marketId: paramsOrFirst as string
783
+ marketId: paramsOrFirst as string,
784
+ code: rest[0] as string,
785
+ country: rest[1] as string,
786
+ language: rest[2] as string,
787
+ isDefault: rest[3] as boolean,
788
+ position: rest[4] as number
329
789
  };
330
790
  }
331
791
 
332
792
  const marketId = params.marketId;
793
+ const code = params.code;
794
+ const country = params.country;
795
+ const language = params.language;
796
+ const isDefault = params.isDefault;
797
+ const position = params.position;
333
798
 
334
799
  if (typeof marketId === 'undefined') {
335
800
  throw new RevenexxException('Missing required parameter: "marketId"');
336
801
  }
802
+ if (typeof code === 'undefined') {
803
+ throw new RevenexxException('Missing required parameter: "code"');
804
+ }
805
+ if (typeof country === 'undefined') {
806
+ throw new RevenexxException('Missing required parameter: "country"');
807
+ }
808
+ if (typeof language === 'undefined') {
809
+ throw new RevenexxException('Missing required parameter: "language"');
810
+ }
337
811
 
338
- const apiPath = '/v1/markets/{market_id}/locales'.replace('{marketId}', marketId);
339
- const payload: Payload = {};
812
+ const apiPath = '/v1/markets/{market_id}/locales'.replace('{market_id}', marketId);
813
+ const apiPayload: Payload = {};
814
+ if (typeof code !== 'undefined') {
815
+ apiPayload['code'] = code;
816
+ }
817
+ if (typeof country !== 'undefined') {
818
+ apiPayload['country'] = country;
819
+ }
820
+ if (typeof isDefault !== 'undefined') {
821
+ apiPayload['is_default'] = isDefault;
822
+ }
823
+ if (typeof language !== 'undefined') {
824
+ apiPayload['language'] = language;
825
+ }
826
+ if (typeof position !== 'undefined') {
827
+ apiPayload['position'] = position;
828
+ }
340
829
  const uri = new URL(this.client.config.endpoint + apiPath);
341
830
 
342
831
  const apiHeaders: { [header: string]: string } = {
@@ -347,7 +836,7 @@ export class Markets {
347
836
  'post',
348
837
  uri,
349
838
  apiHeaders,
350
- payload
839
+ apiPayload
351
840
  );
352
841
  }
353
842
 
@@ -393,8 +882,8 @@ export class Markets {
393
882
  throw new RevenexxException('Missing required parameter: "id"');
394
883
  }
395
884
 
396
- const apiPath = '/v1/markets/{market_id}/locales/{id}'.replace('{marketId}', marketId).replace('{id}', id);
397
- const payload: Payload = {};
885
+ const apiPath = '/v1/markets/{market_id}/locales/{id}'.replace('{market_id}', marketId).replace('{id}', id);
886
+ const apiPayload: Payload = {};
398
887
  const uri = new URL(this.client.config.endpoint + apiPath);
399
888
 
400
889
  const apiHeaders: { [header: string]: string } = {
@@ -404,7 +893,7 @@ export class Markets {
404
893
  'delete',
405
894
  uri,
406
895
  apiHeaders,
407
- payload
896
+ apiPayload
408
897
  );
409
898
  }
410
899
 
@@ -450,8 +939,8 @@ export class Markets {
450
939
  throw new RevenexxException('Missing required parameter: "id"');
451
940
  }
452
941
 
453
- const apiPath = '/v1/markets/{market_id}/locales/{id}'.replace('{marketId}', marketId).replace('{id}', id);
454
- const payload: Payload = {};
942
+ const apiPath = '/v1/markets/{market_id}/locales/{id}'.replace('{market_id}', marketId).replace('{id}', id);
943
+ const apiPayload: Payload = {};
455
944
  const uri = new URL(this.client.config.endpoint + apiPath);
456
945
 
457
946
  const apiHeaders: { [header: string]: string } = {
@@ -461,7 +950,7 @@ export class Markets {
461
950
  'get',
462
951
  uri,
463
952
  apiHeaders,
464
- payload
953
+ apiPayload
465
954
  );
466
955
  }
467
956
 
@@ -469,36 +958,56 @@ export class Markets {
469
958
  *
470
959
  * @param {string} params.marketId -
471
960
  * @param {string} params.id -
961
+ * @param {string} params.code - Locale code, e.g. 'de-DE' (unique per market).
962
+ * @param {string} params.country - ISO 3166-1 alpha-2 country code.
963
+ * @param {boolean} params.isDefault -
964
+ * @param {string} params.language - ISO 639-1 language code.
965
+ * @param {number} params.position - Sort position (default 0).
472
966
  * @throws {RevenexxException}
473
967
  * @returns {Promise<Models.MarketLocale>}
474
968
  */
475
- marketsLocalesUpdate(params: { marketId: string, id: string }): Promise<Models.MarketLocale>;
969
+ marketsLocalesUpdate(params: { marketId: string, id: string, code?: string, country?: string, isDefault?: boolean, language?: string, position?: number }): Promise<Models.MarketLocale>;
476
970
  /**
477
971
  *
478
972
  * @param {string} marketId -
479
973
  * @param {string} id -
974
+ * @param {string} code - Locale code, e.g. 'de-DE' (unique per market).
975
+ * @param {string} country - ISO 3166-1 alpha-2 country code.
976
+ * @param {boolean} isDefault -
977
+ * @param {string} language - ISO 639-1 language code.
978
+ * @param {number} position - Sort position (default 0).
480
979
  * @throws {RevenexxException}
481
980
  * @returns {Promise<Models.MarketLocale>}
482
981
  * @deprecated Use the object parameter style method for a better developer experience.
483
982
  */
484
- marketsLocalesUpdate(marketId: string, id: string): Promise<Models.MarketLocale>;
983
+ marketsLocalesUpdate(marketId: string, id: string, code?: string, country?: string, isDefault?: boolean, language?: string, position?: number): Promise<Models.MarketLocale>;
485
984
  marketsLocalesUpdate(
486
- paramsOrFirst: { marketId: string, id: string } | string,
487
- ...rest: [(string)?]
985
+ paramsOrFirst: { marketId: string, id: string, code?: string, country?: string, isDefault?: boolean, language?: string, position?: number } | string,
986
+ ...rest: [(string)?, (string)?, (string)?, (boolean)?, (string)?, (number)?]
488
987
  ): Promise<Models.MarketLocale> {
489
- let params: { marketId: string, id: string };
988
+ let params: { marketId: string, id: string, code?: string, country?: string, isDefault?: boolean, language?: string, position?: number };
490
989
 
491
990
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
492
- params = (paramsOrFirst || {}) as { marketId: string, id: string };
991
+ params = (paramsOrFirst || {}) as { marketId: string, id: string, code?: string, country?: string, isDefault?: boolean, language?: string, position?: number };
493
992
  } else {
494
993
  params = {
495
994
  marketId: paramsOrFirst as string,
496
- id: rest[0] as string
995
+ id: rest[0] as string,
996
+ code: rest[1] as string,
997
+ country: rest[2] as string,
998
+ isDefault: rest[3] as boolean,
999
+ language: rest[4] as string,
1000
+ position: rest[5] as number
497
1001
  };
498
1002
  }
499
1003
 
500
1004
  const marketId = params.marketId;
501
1005
  const id = params.id;
1006
+ const code = params.code;
1007
+ const country = params.country;
1008
+ const isDefault = params.isDefault;
1009
+ const language = params.language;
1010
+ const position = params.position;
502
1011
 
503
1012
  if (typeof marketId === 'undefined') {
504
1013
  throw new RevenexxException('Missing required parameter: "marketId"');
@@ -507,8 +1016,23 @@ export class Markets {
507
1016
  throw new RevenexxException('Missing required parameter: "id"');
508
1017
  }
509
1018
 
510
- const apiPath = '/v1/markets/{market_id}/locales/{id}'.replace('{marketId}', marketId).replace('{id}', id);
511
- const payload: Payload = {};
1019
+ const apiPath = '/v1/markets/{market_id}/locales/{id}'.replace('{market_id}', marketId).replace('{id}', id);
1020
+ const apiPayload: Payload = {};
1021
+ if (typeof code !== 'undefined') {
1022
+ apiPayload['code'] = code;
1023
+ }
1024
+ if (typeof country !== 'undefined') {
1025
+ apiPayload['country'] = country;
1026
+ }
1027
+ if (typeof isDefault !== 'undefined') {
1028
+ apiPayload['is_default'] = isDefault;
1029
+ }
1030
+ if (typeof language !== 'undefined') {
1031
+ apiPayload['language'] = language;
1032
+ }
1033
+ if (typeof position !== 'undefined') {
1034
+ apiPayload['position'] = position;
1035
+ }
512
1036
  const uri = new URL(this.client.config.endpoint + apiPath);
513
1037
 
514
1038
  const apiHeaders: { [header: string]: string } = {
@@ -519,7 +1043,7 @@ export class Markets {
519
1043
  'put',
520
1044
  uri,
521
1045
  apiHeaders,
522
- payload
1046
+ apiPayload
523
1047
  );
524
1048
  }
525
1049
 
@@ -557,8 +1081,8 @@ export class Markets {
557
1081
  throw new RevenexxException('Missing required parameter: "marketId"');
558
1082
  }
559
1083
 
560
- const apiPath = '/v1/markets/{market_id}/tax_classes'.replace('{marketId}', marketId);
561
- const payload: Payload = {};
1084
+ const apiPath = '/v1/markets/{market_id}/tax_classes'.replace('{market_id}', marketId);
1085
+ const apiPayload: Payload = {};
562
1086
  const uri = new URL(this.client.config.endpoint + apiPath);
563
1087
 
564
1088
  const apiHeaders: { [header: string]: string } = {
@@ -568,46 +1092,95 @@ export class Markets {
568
1092
  'get',
569
1093
  uri,
570
1094
  apiHeaders,
571
- payload
1095
+ apiPayload
572
1096
  );
573
1097
  }
574
1098
 
575
1099
  /**
576
1100
  *
577
1101
  * @param {string} params.marketId -
1102
+ * @param {string} params.code - Tax class code (unique per market).
1103
+ * @param {string} params.name -
1104
+ * @param {boolean} params.isDefault -
1105
+ * @param {object} params.labels - Localized display names ({locale: label}).
1106
+ * @param {number} params.position - Sort position (default 0).
1107
+ * @param {number} params.rate - Tax rate in percent, 0–100 (default 0).
578
1108
  * @throws {RevenexxException}
579
1109
  * @returns {Promise<Models.MarketTaxClass>}
580
1110
  */
581
- marketsTaxClassesCreate(params: { marketId: string }): Promise<Models.MarketTaxClass>;
1111
+ marketsTaxClassesCreate(params: { marketId: string, code: string, name: string, isDefault?: boolean, labels?: object, position?: number, rate?: number }): Promise<Models.MarketTaxClass>;
582
1112
  /**
583
1113
  *
584
1114
  * @param {string} marketId -
1115
+ * @param {string} code - Tax class code (unique per market).
1116
+ * @param {string} name -
1117
+ * @param {boolean} isDefault -
1118
+ * @param {object} labels - Localized display names ({locale: label}).
1119
+ * @param {number} position - Sort position (default 0).
1120
+ * @param {number} rate - Tax rate in percent, 0–100 (default 0).
585
1121
  * @throws {RevenexxException}
586
1122
  * @returns {Promise<Models.MarketTaxClass>}
587
1123
  * @deprecated Use the object parameter style method for a better developer experience.
588
1124
  */
589
- marketsTaxClassesCreate(marketId: string): Promise<Models.MarketTaxClass>;
1125
+ marketsTaxClassesCreate(marketId: string, code: string, name: string, isDefault?: boolean, labels?: object, position?: number, rate?: number): Promise<Models.MarketTaxClass>;
590
1126
  marketsTaxClassesCreate(
591
- paramsOrFirst: { marketId: string } | string
1127
+ paramsOrFirst: { marketId: string, code: string, name: string, isDefault?: boolean, labels?: object, position?: number, rate?: number } | string,
1128
+ ...rest: [(string)?, (string)?, (boolean)?, (object)?, (number)?, (number)?]
592
1129
  ): Promise<Models.MarketTaxClass> {
593
- let params: { marketId: string };
1130
+ let params: { marketId: string, code: string, name: string, isDefault?: boolean, labels?: object, position?: number, rate?: number };
594
1131
 
595
1132
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
596
- params = (paramsOrFirst || {}) as { marketId: string };
1133
+ params = (paramsOrFirst || {}) as { marketId: string, code: string, name: string, isDefault?: boolean, labels?: object, position?: number, rate?: number };
597
1134
  } else {
598
1135
  params = {
599
- marketId: paramsOrFirst as string
1136
+ marketId: paramsOrFirst as string,
1137
+ code: rest[0] as string,
1138
+ name: rest[1] as string,
1139
+ isDefault: rest[2] as boolean,
1140
+ labels: rest[3] as object,
1141
+ position: rest[4] as number,
1142
+ rate: rest[5] as number
600
1143
  };
601
1144
  }
602
1145
 
603
1146
  const marketId = params.marketId;
1147
+ const code = params.code;
1148
+ const name = params.name;
1149
+ const isDefault = params.isDefault;
1150
+ const labels = params.labels;
1151
+ const position = params.position;
1152
+ const rate = params.rate;
604
1153
 
605
1154
  if (typeof marketId === 'undefined') {
606
1155
  throw new RevenexxException('Missing required parameter: "marketId"');
607
1156
  }
1157
+ if (typeof code === 'undefined') {
1158
+ throw new RevenexxException('Missing required parameter: "code"');
1159
+ }
1160
+ if (typeof name === 'undefined') {
1161
+ throw new RevenexxException('Missing required parameter: "name"');
1162
+ }
608
1163
 
609
- const apiPath = '/v1/markets/{market_id}/tax_classes'.replace('{marketId}', marketId);
610
- const payload: Payload = {};
1164
+ const apiPath = '/v1/markets/{market_id}/tax_classes'.replace('{market_id}', marketId);
1165
+ const apiPayload: Payload = {};
1166
+ if (typeof code !== 'undefined') {
1167
+ apiPayload['code'] = code;
1168
+ }
1169
+ if (typeof isDefault !== 'undefined') {
1170
+ apiPayload['is_default'] = isDefault;
1171
+ }
1172
+ if (typeof labels !== 'undefined') {
1173
+ apiPayload['labels'] = labels;
1174
+ }
1175
+ if (typeof name !== 'undefined') {
1176
+ apiPayload['name'] = name;
1177
+ }
1178
+ if (typeof position !== 'undefined') {
1179
+ apiPayload['position'] = position;
1180
+ }
1181
+ if (typeof rate !== 'undefined') {
1182
+ apiPayload['rate'] = rate;
1183
+ }
611
1184
  const uri = new URL(this.client.config.endpoint + apiPath);
612
1185
 
613
1186
  const apiHeaders: { [header: string]: string } = {
@@ -618,7 +1191,7 @@ export class Markets {
618
1191
  'post',
619
1192
  uri,
620
1193
  apiHeaders,
621
- payload
1194
+ apiPayload
622
1195
  );
623
1196
  }
624
1197
 
@@ -664,8 +1237,8 @@ export class Markets {
664
1237
  throw new RevenexxException('Missing required parameter: "id"');
665
1238
  }
666
1239
 
667
- const apiPath = '/v1/markets/{market_id}/tax_classes/{id}'.replace('{marketId}', marketId).replace('{id}', id);
668
- const payload: Payload = {};
1240
+ const apiPath = '/v1/markets/{market_id}/tax_classes/{id}'.replace('{market_id}', marketId).replace('{id}', id);
1241
+ const apiPayload: Payload = {};
669
1242
  const uri = new URL(this.client.config.endpoint + apiPath);
670
1243
 
671
1244
  const apiHeaders: { [header: string]: string } = {
@@ -675,7 +1248,7 @@ export class Markets {
675
1248
  'delete',
676
1249
  uri,
677
1250
  apiHeaders,
678
- payload
1251
+ apiPayload
679
1252
  );
680
1253
  }
681
1254
 
@@ -721,8 +1294,8 @@ export class Markets {
721
1294
  throw new RevenexxException('Missing required parameter: "id"');
722
1295
  }
723
1296
 
724
- const apiPath = '/v1/markets/{market_id}/tax_classes/{id}'.replace('{marketId}', marketId).replace('{id}', id);
725
- const payload: Payload = {};
1297
+ const apiPath = '/v1/markets/{market_id}/tax_classes/{id}'.replace('{market_id}', marketId).replace('{id}', id);
1298
+ const apiPayload: Payload = {};
726
1299
  const uri = new URL(this.client.config.endpoint + apiPath);
727
1300
 
728
1301
  const apiHeaders: { [header: string]: string } = {
@@ -732,7 +1305,7 @@ export class Markets {
732
1305
  'get',
733
1306
  uri,
734
1307
  apiHeaders,
735
- payload
1308
+ apiPayload
736
1309
  );
737
1310
  }
738
1311
 
@@ -740,36 +1313,60 @@ export class Markets {
740
1313
  *
741
1314
  * @param {string} params.marketId -
742
1315
  * @param {string} params.id -
1316
+ * @param {string} params.code - Tax class code (unique per market).
1317
+ * @param {boolean} params.isDefault -
1318
+ * @param {object} params.labels - Localized display names ({locale: label}).
1319
+ * @param {string} params.name -
1320
+ * @param {number} params.position - Sort position (default 0).
1321
+ * @param {number} params.rate - Tax rate in percent, 0–100 (default 0).
743
1322
  * @throws {RevenexxException}
744
1323
  * @returns {Promise<Models.MarketTaxClass>}
745
1324
  */
746
- marketsTaxClassesUpdate(params: { marketId: string, id: string }): Promise<Models.MarketTaxClass>;
1325
+ marketsTaxClassesUpdate(params: { marketId: string, id: string, code?: string, isDefault?: boolean, labels?: object, name?: string, position?: number, rate?: number }): Promise<Models.MarketTaxClass>;
747
1326
  /**
748
1327
  *
749
1328
  * @param {string} marketId -
750
1329
  * @param {string} id -
1330
+ * @param {string} code - Tax class code (unique per market).
1331
+ * @param {boolean} isDefault -
1332
+ * @param {object} labels - Localized display names ({locale: label}).
1333
+ * @param {string} name -
1334
+ * @param {number} position - Sort position (default 0).
1335
+ * @param {number} rate - Tax rate in percent, 0–100 (default 0).
751
1336
  * @throws {RevenexxException}
752
1337
  * @returns {Promise<Models.MarketTaxClass>}
753
1338
  * @deprecated Use the object parameter style method for a better developer experience.
754
1339
  */
755
- marketsTaxClassesUpdate(marketId: string, id: string): Promise<Models.MarketTaxClass>;
1340
+ marketsTaxClassesUpdate(marketId: string, id: string, code?: string, isDefault?: boolean, labels?: object, name?: string, position?: number, rate?: number): Promise<Models.MarketTaxClass>;
756
1341
  marketsTaxClassesUpdate(
757
- paramsOrFirst: { marketId: string, id: string } | string,
758
- ...rest: [(string)?]
1342
+ paramsOrFirst: { marketId: string, id: string, code?: string, isDefault?: boolean, labels?: object, name?: string, position?: number, rate?: number } | string,
1343
+ ...rest: [(string)?, (string)?, (boolean)?, (object)?, (string)?, (number)?, (number)?]
759
1344
  ): Promise<Models.MarketTaxClass> {
760
- let params: { marketId: string, id: string };
1345
+ let params: { marketId: string, id: string, code?: string, isDefault?: boolean, labels?: object, name?: string, position?: number, rate?: number };
761
1346
 
762
1347
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
763
- params = (paramsOrFirst || {}) as { marketId: string, id: string };
1348
+ params = (paramsOrFirst || {}) as { marketId: string, id: string, code?: string, isDefault?: boolean, labels?: object, name?: string, position?: number, rate?: number };
764
1349
  } else {
765
1350
  params = {
766
1351
  marketId: paramsOrFirst as string,
767
- id: rest[0] as string
1352
+ id: rest[0] as string,
1353
+ code: rest[1] as string,
1354
+ isDefault: rest[2] as boolean,
1355
+ labels: rest[3] as object,
1356
+ name: rest[4] as string,
1357
+ position: rest[5] as number,
1358
+ rate: rest[6] as number
768
1359
  };
769
1360
  }
770
1361
 
771
1362
  const marketId = params.marketId;
772
1363
  const id = params.id;
1364
+ const code = params.code;
1365
+ const isDefault = params.isDefault;
1366
+ const labels = params.labels;
1367
+ const name = params.name;
1368
+ const position = params.position;
1369
+ const rate = params.rate;
773
1370
 
774
1371
  if (typeof marketId === 'undefined') {
775
1372
  throw new RevenexxException('Missing required parameter: "marketId"');
@@ -778,8 +1375,26 @@ export class Markets {
778
1375
  throw new RevenexxException('Missing required parameter: "id"');
779
1376
  }
780
1377
 
781
- const apiPath = '/v1/markets/{market_id}/tax_classes/{id}'.replace('{marketId}', marketId).replace('{id}', id);
782
- const payload: Payload = {};
1378
+ const apiPath = '/v1/markets/{market_id}/tax_classes/{id}'.replace('{market_id}', marketId).replace('{id}', id);
1379
+ const apiPayload: Payload = {};
1380
+ if (typeof code !== 'undefined') {
1381
+ apiPayload['code'] = code;
1382
+ }
1383
+ if (typeof isDefault !== 'undefined') {
1384
+ apiPayload['is_default'] = isDefault;
1385
+ }
1386
+ if (typeof labels !== 'undefined') {
1387
+ apiPayload['labels'] = labels;
1388
+ }
1389
+ if (typeof name !== 'undefined') {
1390
+ apiPayload['name'] = name;
1391
+ }
1392
+ if (typeof position !== 'undefined') {
1393
+ apiPayload['position'] = position;
1394
+ }
1395
+ if (typeof rate !== 'undefined') {
1396
+ apiPayload['rate'] = rate;
1397
+ }
783
1398
  const uri = new URL(this.client.config.endpoint + apiPath);
784
1399
 
785
1400
  const apiHeaders: { [header: string]: string } = {
@@ -790,7 +1405,7 @@ export class Markets {
790
1405
  'put',
791
1406
  uri,
792
1407
  apiHeaders,
793
- payload
1408
+ apiPayload
794
1409
  );
795
1410
  }
796
1411
  }