@epilot/pricing-client 2.1.0 → 2.1.3
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.
- package/dist/definition.js +1 -1
- package/dist/index.js +5 -1
- package/dist/openapi.d.ts +262 -98
- package/dist/openapi.json +245 -55
- package/package.json +2 -2
package/dist/openapi.d.ts
CHANGED
|
@@ -157,6 +157,50 @@ declare namespace Components {
|
|
|
157
157
|
};
|
|
158
158
|
}[];
|
|
159
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* Represents a valid base price item from a client.
|
|
162
|
+
*/
|
|
163
|
+
export interface BasePriceItemDto {
|
|
164
|
+
/**
|
|
165
|
+
* An additional structure to keep metadata related with the price item.
|
|
166
|
+
*/
|
|
167
|
+
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
168
|
+
/**
|
|
169
|
+
* The quantity of products being purchased.
|
|
170
|
+
*/
|
|
171
|
+
quantity?: number;
|
|
172
|
+
/**
|
|
173
|
+
* An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
|
|
174
|
+
*/
|
|
175
|
+
description?: string;
|
|
176
|
+
/**
|
|
177
|
+
* The id of the product.
|
|
178
|
+
*/
|
|
179
|
+
product_id?: string;
|
|
180
|
+
/**
|
|
181
|
+
* The id of the price.
|
|
182
|
+
*/
|
|
183
|
+
price_id?: string;
|
|
184
|
+
/**
|
|
185
|
+
* The taxes applied to the price item.
|
|
186
|
+
*/
|
|
187
|
+
taxes?: (/* A valid tax rate from a client. */ TaxAmountDto)[];
|
|
188
|
+
/**
|
|
189
|
+
* The taxes applied to the price item.
|
|
190
|
+
*/
|
|
191
|
+
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmountDto)[];
|
|
192
|
+
/**
|
|
193
|
+
* The snapshot of the product linked to the price item.
|
|
194
|
+
*/
|
|
195
|
+
_product?: /**
|
|
196
|
+
* The product entity
|
|
197
|
+
* example:
|
|
198
|
+
* {
|
|
199
|
+
* "$ref": "#/components/examples/product"
|
|
200
|
+
* }
|
|
201
|
+
*/
|
|
202
|
+
Product;
|
|
203
|
+
}
|
|
160
204
|
export type BillingPeriod = "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time";
|
|
161
205
|
/**
|
|
162
206
|
* Supports shopping for products and services until ready for checkout.
|
|
@@ -373,7 +417,14 @@ declare namespace Components {
|
|
|
373
417
|
/**
|
|
374
418
|
* A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price.
|
|
375
419
|
*/
|
|
376
|
-
price_components?:
|
|
420
|
+
price_components?: /* A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price. */ /**
|
|
421
|
+
* The price entity schema for simple pricing
|
|
422
|
+
* example:
|
|
423
|
+
* {
|
|
424
|
+
* "$ref": "#/components/examples/price"
|
|
425
|
+
* }
|
|
426
|
+
*/
|
|
427
|
+
Price[] | {
|
|
377
428
|
$relation?: PriceComponentRelation[];
|
|
378
429
|
};
|
|
379
430
|
/**
|
|
@@ -437,6 +488,10 @@ declare namespace Components {
|
|
|
437
488
|
* Net unit amount without taxes or discounts.
|
|
438
489
|
*/
|
|
439
490
|
unit_amount_net?: number;
|
|
491
|
+
/**
|
|
492
|
+
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
493
|
+
*/
|
|
494
|
+
unit_amount_decimal?: string;
|
|
440
495
|
/**
|
|
441
496
|
* Total after (discounts and) taxes.
|
|
442
497
|
*/
|
|
@@ -539,29 +594,6 @@ declare namespace Components {
|
|
|
539
594
|
* The id of the price.
|
|
540
595
|
*/
|
|
541
596
|
price_id?: string;
|
|
542
|
-
/**
|
|
543
|
-
* The unit amount value
|
|
544
|
-
*/
|
|
545
|
-
unit_amount?: number;
|
|
546
|
-
/**
|
|
547
|
-
* Three-letter ISO currency code, in lowercase.
|
|
548
|
-
*/
|
|
549
|
-
unit_amount_currency?: /* Three-letter ISO currency code, in lowercase. */ /**
|
|
550
|
-
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
551
|
-
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
552
|
-
*
|
|
553
|
-
* example:
|
|
554
|
-
* EUR
|
|
555
|
-
*/
|
|
556
|
-
Currency;
|
|
557
|
-
/**
|
|
558
|
-
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
559
|
-
*/
|
|
560
|
-
unit_amount_decimal?: string;
|
|
561
|
-
/**
|
|
562
|
-
* The flag for prices that contain price components.
|
|
563
|
-
*/
|
|
564
|
-
is_composite_price?: boolean;
|
|
565
597
|
/**
|
|
566
598
|
* The taxes applied to the price item.
|
|
567
599
|
*/
|
|
@@ -570,21 +602,6 @@ declare namespace Components {
|
|
|
570
602
|
* The taxes applied to the price item.
|
|
571
603
|
*/
|
|
572
604
|
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmountDto)[];
|
|
573
|
-
_price?: /**
|
|
574
|
-
* The price entity schema for simple pricing
|
|
575
|
-
* example:
|
|
576
|
-
* {
|
|
577
|
-
* "$ref": "#/components/examples/price"
|
|
578
|
-
* }
|
|
579
|
-
*/
|
|
580
|
-
Price | /**
|
|
581
|
-
* The price entity schema for dynamic pricing
|
|
582
|
-
* example:
|
|
583
|
-
* {
|
|
584
|
-
* "$ref": "#/components/examples/composite-price"
|
|
585
|
-
* }
|
|
586
|
-
*/
|
|
587
|
-
CompositePrice;
|
|
588
605
|
_product?: /**
|
|
589
606
|
* The product entity
|
|
590
607
|
* example:
|
|
@@ -596,7 +613,15 @@ declare namespace Components {
|
|
|
596
613
|
/**
|
|
597
614
|
* Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).
|
|
598
615
|
*/
|
|
599
|
-
item_components?: /* Represents a
|
|
616
|
+
item_components?: /* Represents a price input to the pricing library. */ PriceItemDto[];
|
|
617
|
+
_price?: /**
|
|
618
|
+
* The price entity schema for dynamic pricing
|
|
619
|
+
* example:
|
|
620
|
+
* {
|
|
621
|
+
* "$ref": "#/components/examples/composite-price"
|
|
622
|
+
* }
|
|
623
|
+
*/
|
|
624
|
+
CompositePrice;
|
|
600
625
|
}
|
|
601
626
|
/**
|
|
602
627
|
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
@@ -617,6 +642,36 @@ declare namespace Components {
|
|
|
617
642
|
email?: string;
|
|
618
643
|
phone?: string;
|
|
619
644
|
}
|
|
645
|
+
export type EntityId = string; // uuid
|
|
646
|
+
/**
|
|
647
|
+
* example:
|
|
648
|
+
* {
|
|
649
|
+
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
650
|
+
* "_org": "123",
|
|
651
|
+
* "_schema": "contact",
|
|
652
|
+
* "_tags": [
|
|
653
|
+
* "example",
|
|
654
|
+
* "mock"
|
|
655
|
+
* ],
|
|
656
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
657
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
658
|
+
* }
|
|
659
|
+
*/
|
|
660
|
+
export interface EntityItem {
|
|
661
|
+
_id: EntityId /* uuid */;
|
|
662
|
+
/**
|
|
663
|
+
* Title of entity
|
|
664
|
+
*/
|
|
665
|
+
_title: string;
|
|
666
|
+
/**
|
|
667
|
+
* Organization Id the entity belongs to
|
|
668
|
+
*/
|
|
669
|
+
_org: string;
|
|
670
|
+
_schema: string;
|
|
671
|
+
_tags?: string[];
|
|
672
|
+
_created_at: string; // date-time
|
|
673
|
+
_updated_at: string; // date-time
|
|
674
|
+
}
|
|
620
675
|
export interface EntityRelation {
|
|
621
676
|
[name: string]: any;
|
|
622
677
|
entity_id?: string;
|
|
@@ -627,6 +682,14 @@ declare namespace Components {
|
|
|
627
682
|
* Error message
|
|
628
683
|
*/
|
|
629
684
|
message: string;
|
|
685
|
+
/**
|
|
686
|
+
* The HTTP status code
|
|
687
|
+
*/
|
|
688
|
+
status?: number;
|
|
689
|
+
/**
|
|
690
|
+
* The cause of the error (visible for bad requests - http 400)
|
|
691
|
+
*/
|
|
692
|
+
cause?: string;
|
|
630
693
|
}
|
|
631
694
|
export interface File {
|
|
632
695
|
[name: string]: any;
|
|
@@ -1115,9 +1178,30 @@ declare namespace Components {
|
|
|
1115
1178
|
/**
|
|
1116
1179
|
* The default tax rate applied to the price
|
|
1117
1180
|
*/
|
|
1118
|
-
tax?: {
|
|
1181
|
+
tax?: /* The default tax rate applied to the price */ {
|
|
1119
1182
|
$relation?: EntityRelation[];
|
|
1120
|
-
}
|
|
1183
|
+
} | /**
|
|
1184
|
+
* the tax configuration
|
|
1185
|
+
* example:
|
|
1186
|
+
* {
|
|
1187
|
+
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1188
|
+
* "type": "VAT",
|
|
1189
|
+
* "description": "Tax description",
|
|
1190
|
+
* "behavior": "Exclusive",
|
|
1191
|
+
* "active": "true",
|
|
1192
|
+
* "region": "DE",
|
|
1193
|
+
* "region_label": "Germany",
|
|
1194
|
+
* "_org": "123",
|
|
1195
|
+
* "_schema": "tax",
|
|
1196
|
+
* "_tags": [
|
|
1197
|
+
* "example",
|
|
1198
|
+
* "mock"
|
|
1199
|
+
* ],
|
|
1200
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
1201
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
1202
|
+
* }
|
|
1203
|
+
*/
|
|
1204
|
+
Tax[];
|
|
1121
1205
|
/**
|
|
1122
1206
|
* Specifies whether the price is considered `inclusive` of taxes or `exclusive` of taxes.
|
|
1123
1207
|
* One of `inclusive`, `exclusive`, or `unspecified`.
|
|
@@ -1227,14 +1311,6 @@ declare namespace Components {
|
|
|
1227
1311
|
*
|
|
1228
1312
|
*/
|
|
1229
1313
|
quantity?: number;
|
|
1230
|
-
item?: /**
|
|
1231
|
-
* The price entity schema for simple pricing
|
|
1232
|
-
* example:
|
|
1233
|
-
* {
|
|
1234
|
-
* "$ref": "#/components/examples/price"
|
|
1235
|
-
* }
|
|
1236
|
-
*/
|
|
1237
|
-
Price;
|
|
1238
1314
|
/**
|
|
1239
1315
|
* An arbitrary set of tags attached to the composite price - component relation
|
|
1240
1316
|
*/
|
|
@@ -1265,6 +1341,10 @@ declare namespace Components {
|
|
|
1265
1341
|
* Net unit amount without taxes or discounts.
|
|
1266
1342
|
*/
|
|
1267
1343
|
unit_amount_net?: number;
|
|
1344
|
+
/**
|
|
1345
|
+
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
1346
|
+
*/
|
|
1347
|
+
unit_amount_decimal?: string;
|
|
1268
1348
|
/**
|
|
1269
1349
|
* Total after (discounts and) taxes.
|
|
1270
1350
|
*/
|
|
@@ -1336,7 +1416,7 @@ declare namespace Components {
|
|
|
1336
1416
|
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
|
|
1337
1417
|
}
|
|
1338
1418
|
/**
|
|
1339
|
-
* Represents a
|
|
1419
|
+
* Represents a price input to the pricing library.
|
|
1340
1420
|
*/
|
|
1341
1421
|
export interface PriceItemDto {
|
|
1342
1422
|
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
@@ -1356,29 +1436,6 @@ declare namespace Components {
|
|
|
1356
1436
|
* The id of the price.
|
|
1357
1437
|
*/
|
|
1358
1438
|
price_id?: string;
|
|
1359
|
-
/**
|
|
1360
|
-
* The unit amount value
|
|
1361
|
-
*/
|
|
1362
|
-
unit_amount?: number;
|
|
1363
|
-
/**
|
|
1364
|
-
* Three-letter ISO currency code, in lowercase.
|
|
1365
|
-
*/
|
|
1366
|
-
unit_amount_currency?: /* Three-letter ISO currency code, in lowercase. */ /**
|
|
1367
|
-
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
1368
|
-
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
1369
|
-
*
|
|
1370
|
-
* example:
|
|
1371
|
-
* EUR
|
|
1372
|
-
*/
|
|
1373
|
-
Currency;
|
|
1374
|
-
/**
|
|
1375
|
-
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
1376
|
-
*/
|
|
1377
|
-
unit_amount_decimal?: string;
|
|
1378
|
-
/**
|
|
1379
|
-
* The flag for prices that contain price components.
|
|
1380
|
-
*/
|
|
1381
|
-
is_composite_price?: boolean;
|
|
1382
1439
|
/**
|
|
1383
1440
|
* The taxes applied to the price item.
|
|
1384
1441
|
*/
|
|
@@ -1387,32 +1444,30 @@ declare namespace Components {
|
|
|
1387
1444
|
* The taxes applied to the price item.
|
|
1388
1445
|
*/
|
|
1389
1446
|
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmountDto)[];
|
|
1390
|
-
|
|
1391
|
-
* The
|
|
1447
|
+
_product?: /**
|
|
1448
|
+
* The product entity
|
|
1392
1449
|
* example:
|
|
1393
1450
|
* {
|
|
1394
|
-
* "$ref": "#/components/examples/
|
|
1451
|
+
* "$ref": "#/components/examples/product"
|
|
1395
1452
|
* }
|
|
1396
1453
|
*/
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
*
|
|
1400
|
-
* {
|
|
1401
|
-
* "$ref": "#/components/examples/composite-price"
|
|
1402
|
-
* }
|
|
1454
|
+
Product;
|
|
1455
|
+
/**
|
|
1456
|
+
* The unit amount value
|
|
1403
1457
|
*/
|
|
1404
|
-
|
|
1458
|
+
unit_amount?: number;
|
|
1405
1459
|
/**
|
|
1406
|
-
* The
|
|
1460
|
+
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
1407
1461
|
*/
|
|
1408
|
-
|
|
1409
|
-
|
|
1462
|
+
unit_amount_decimal?: string;
|
|
1463
|
+
_price?: /**
|
|
1464
|
+
* The price entity schema for simple pricing
|
|
1410
1465
|
* example:
|
|
1411
1466
|
* {
|
|
1412
|
-
* "$ref": "#/components/examples/
|
|
1467
|
+
* "$ref": "#/components/examples/price"
|
|
1413
1468
|
* }
|
|
1414
1469
|
*/
|
|
1415
|
-
|
|
1470
|
+
Price;
|
|
1416
1471
|
}
|
|
1417
1472
|
/**
|
|
1418
1473
|
* Tracks a set of product prices, quantities, (discounts) and taxes.
|
|
@@ -1435,7 +1490,7 @@ declare namespace Components {
|
|
|
1435
1490
|
/**
|
|
1436
1491
|
* A valid set of product prices, quantities, (discounts) and taxes from a client.
|
|
1437
1492
|
*/
|
|
1438
|
-
export type PriceItemsDto = (/* Represents a
|
|
1493
|
+
export type PriceItemsDto = (/* Represents a price input to the pricing library. */ PriceItemDto)[];
|
|
1439
1494
|
/**
|
|
1440
1495
|
* The result from the calculation of a set of price items.
|
|
1441
1496
|
*/
|
|
@@ -1552,7 +1607,7 @@ declare namespace Components {
|
|
|
1552
1607
|
/**
|
|
1553
1608
|
* The price type.
|
|
1554
1609
|
*/
|
|
1555
|
-
type
|
|
1610
|
+
type?: string;
|
|
1556
1611
|
/**
|
|
1557
1612
|
* The price billing period.
|
|
1558
1613
|
*/
|
|
@@ -1577,7 +1632,7 @@ declare namespace Components {
|
|
|
1577
1632
|
/**
|
|
1578
1633
|
* The price type.
|
|
1579
1634
|
*/
|
|
1580
|
-
type
|
|
1635
|
+
type?: string;
|
|
1581
1636
|
/**
|
|
1582
1637
|
* The price billing period.
|
|
1583
1638
|
*/
|
|
@@ -1598,13 +1653,44 @@ declare namespace Components {
|
|
|
1598
1653
|
export type SalesTax = "nontaxable" | "reduced" | "standard";
|
|
1599
1654
|
/**
|
|
1600
1655
|
* the tax configuration
|
|
1656
|
+
* example:
|
|
1657
|
+
* {
|
|
1658
|
+
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1659
|
+
* "type": "VAT",
|
|
1660
|
+
* "description": "Tax description",
|
|
1661
|
+
* "behavior": "Exclusive",
|
|
1662
|
+
* "active": "true",
|
|
1663
|
+
* "region": "DE",
|
|
1664
|
+
* "region_label": "Germany",
|
|
1665
|
+
* "_org": "123",
|
|
1666
|
+
* "_schema": "tax",
|
|
1667
|
+
* "_tags": [
|
|
1668
|
+
* "example",
|
|
1669
|
+
* "mock"
|
|
1670
|
+
* ],
|
|
1671
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
1672
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
1673
|
+
* }
|
|
1601
1674
|
*/
|
|
1602
1675
|
export interface Tax {
|
|
1603
1676
|
[name: string]: any;
|
|
1677
|
+
_id: EntityId /* uuid */;
|
|
1678
|
+
/**
|
|
1679
|
+
* Title of entity
|
|
1680
|
+
*/
|
|
1681
|
+
_title: string;
|
|
1682
|
+
/**
|
|
1683
|
+
* Organization Id the entity belongs to
|
|
1684
|
+
*/
|
|
1685
|
+
_org: string;
|
|
1686
|
+
_schema: string;
|
|
1687
|
+
_tags?: string[];
|
|
1688
|
+
_created_at: string; // date-time
|
|
1689
|
+
_updated_at: string; // date-time
|
|
1604
1690
|
type: "VAT" | "GST" | "Custom";
|
|
1605
1691
|
description?: string;
|
|
1606
1692
|
rate: number;
|
|
1607
|
-
behavior: "Exclusive" | "Inclusive";
|
|
1693
|
+
behavior: "Exclusive" | "Inclusive" | "exclusive" | "inclusive";
|
|
1608
1694
|
active?: boolean;
|
|
1609
1695
|
region?: string;
|
|
1610
1696
|
region_label?: string;
|
|
@@ -1618,26 +1704,104 @@ declare namespace Components {
|
|
|
1618
1704
|
*/
|
|
1619
1705
|
amount?: number;
|
|
1620
1706
|
/**
|
|
1621
|
-
* The tax rate applied.
|
|
1707
|
+
* The tax rate applied. With the release of the tax management feature this field is being deprecated in favor of the tax field.
|
|
1708
|
+
*/
|
|
1709
|
+
rate?: string;
|
|
1710
|
+
/**
|
|
1711
|
+
* The tax rate value applied (represented as an integer percentage, e.g, 19 or 7).
|
|
1712
|
+
* With the release of the tax management feature this field is being deprecated in favor of the tax field.
|
|
1713
|
+
*
|
|
1714
|
+
* example:
|
|
1715
|
+
* 19
|
|
1716
|
+
*/
|
|
1717
|
+
rateValue?: number;
|
|
1718
|
+
/**
|
|
1719
|
+
* The tax applied.
|
|
1720
|
+
*/
|
|
1721
|
+
tax?: /* The tax applied. */ /**
|
|
1722
|
+
* the tax configuration
|
|
1723
|
+
* example:
|
|
1724
|
+
* {
|
|
1725
|
+
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1726
|
+
* "type": "VAT",
|
|
1727
|
+
* "description": "Tax description",
|
|
1728
|
+
* "behavior": "Exclusive",
|
|
1729
|
+
* "active": "true",
|
|
1730
|
+
* "region": "DE",
|
|
1731
|
+
* "region_label": "Germany",
|
|
1732
|
+
* "_org": "123",
|
|
1733
|
+
* "_schema": "tax",
|
|
1734
|
+
* "_tags": [
|
|
1735
|
+
* "example",
|
|
1736
|
+
* "mock"
|
|
1737
|
+
* ],
|
|
1738
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
1739
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
1740
|
+
* }
|
|
1741
|
+
*/
|
|
1742
|
+
Tax;
|
|
1743
|
+
}
|
|
1744
|
+
/**
|
|
1745
|
+
* A tax amount associated with a specific tax rate.
|
|
1746
|
+
*/
|
|
1747
|
+
export interface TaxAmountBreakdown {
|
|
1748
|
+
/**
|
|
1749
|
+
* The tax amount.
|
|
1750
|
+
*/
|
|
1751
|
+
amount?: number;
|
|
1752
|
+
/**
|
|
1753
|
+
* The tax rate applied. With the release of the tax manager feature this field is being deprecated in favor of the tax field.
|
|
1622
1754
|
*/
|
|
1623
1755
|
rate?: string;
|
|
1756
|
+
/**
|
|
1757
|
+
* The tax rate value applied. With the release of the tax manager feature this field is being deprecated in favor of the tax field.
|
|
1758
|
+
*/
|
|
1759
|
+
rateValue?: number;
|
|
1624
1760
|
/**
|
|
1625
1761
|
* The tax applied.
|
|
1626
1762
|
*/
|
|
1627
|
-
tax?: /* The tax applied. */
|
|
1763
|
+
tax?: /* The tax applied. */ TaxBreakdownInfo;
|
|
1628
1764
|
}
|
|
1629
1765
|
/**
|
|
1630
1766
|
* A valid tax rate from a client.
|
|
1631
1767
|
*/
|
|
1632
1768
|
export interface TaxAmountDto {
|
|
1633
1769
|
/**
|
|
1634
|
-
* The tax rate applied.
|
|
1770
|
+
* The deprecated tax rate applied.
|
|
1771
|
+
* This field has been deprecated in favor of the new Tax Management. You should use the new tax fields pointing to a proper tax entity.
|
|
1772
|
+
*
|
|
1635
1773
|
*/
|
|
1636
1774
|
rate?: string;
|
|
1637
1775
|
/**
|
|
1638
1776
|
* The tax applied.
|
|
1639
1777
|
*/
|
|
1640
|
-
tax?: /* The tax applied. */
|
|
1778
|
+
tax?: /* The tax applied. */ /**
|
|
1779
|
+
* the tax configuration
|
|
1780
|
+
* example:
|
|
1781
|
+
* {
|
|
1782
|
+
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1783
|
+
* "type": "VAT",
|
|
1784
|
+
* "description": "Tax description",
|
|
1785
|
+
* "behavior": "Exclusive",
|
|
1786
|
+
* "active": "true",
|
|
1787
|
+
* "region": "DE",
|
|
1788
|
+
* "region_label": "Germany",
|
|
1789
|
+
* "_org": "123",
|
|
1790
|
+
* "_schema": "tax",
|
|
1791
|
+
* "_tags": [
|
|
1792
|
+
* "example",
|
|
1793
|
+
* "mock"
|
|
1794
|
+
* ],
|
|
1795
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
1796
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
1797
|
+
* }
|
|
1798
|
+
*/
|
|
1799
|
+
Tax;
|
|
1800
|
+
}
|
|
1801
|
+
export interface TaxBreakdownInfo {
|
|
1802
|
+
rate?: number;
|
|
1803
|
+
type?: "VAT" | "GST" | "Custom";
|
|
1804
|
+
_id?: string;
|
|
1641
1805
|
}
|
|
1642
1806
|
/**
|
|
1643
1807
|
* The total details with tax (and discount) aggregated totals.
|
|
@@ -1658,7 +1822,7 @@ declare namespace Components {
|
|
|
1658
1822
|
/**
|
|
1659
1823
|
* The aggregated price items tax amount per rate.
|
|
1660
1824
|
*/
|
|
1661
|
-
taxes?: (/* A tax amount associated with a specific tax rate. */
|
|
1825
|
+
taxes?: (/* A tax amount associated with a specific tax rate. */ TaxAmountBreakdown)[];
|
|
1662
1826
|
/**
|
|
1663
1827
|
* The aggregated price items tax amount per rate.
|
|
1664
1828
|
*/
|