@epilot/pricing-client 3.15.0 → 3.16.0
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-runtime.json +0 -17
- package/dist/openapi.d.ts +43 -419
- package/dist/openapi.json +70 -521
- package/package.json +6 -6
package/dist/openapi.d.ts
CHANGED
|
@@ -168,24 +168,16 @@ declare namespace Components {
|
|
|
168
168
|
/**
|
|
169
169
|
* price item id
|
|
170
170
|
*/
|
|
171
|
-
|
|
171
|
+
id?: string;
|
|
172
172
|
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
173
173
|
/**
|
|
174
174
|
* The unit amount value
|
|
175
175
|
*/
|
|
176
176
|
unit_amount?: number;
|
|
177
|
-
/**
|
|
178
|
-
* The unit gross amount value.
|
|
179
|
-
*/
|
|
180
|
-
unit_amount_gross?: number;
|
|
181
177
|
/**
|
|
182
178
|
* Total before any (discounts or) taxes are applied.
|
|
183
179
|
*/
|
|
184
180
|
amount_subtotal?: number;
|
|
185
|
-
/**
|
|
186
|
-
* Total tax amount for this line item.
|
|
187
|
-
*/
|
|
188
|
-
amount_tax?: number;
|
|
189
181
|
/**
|
|
190
182
|
* Net unit amount without taxes or discounts.
|
|
191
183
|
*/
|
|
@@ -260,29 +252,6 @@ declare namespace Components {
|
|
|
260
252
|
* The sum of amounts of the price items by recurrence.
|
|
261
253
|
*/
|
|
262
254
|
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
|
|
263
|
-
/**
|
|
264
|
-
* Price mapping information required to compute totals
|
|
265
|
-
*/
|
|
266
|
-
price_mappings?: /**
|
|
267
|
-
* example:
|
|
268
|
-
* [
|
|
269
|
-
* {
|
|
270
|
-
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
271
|
-
* "frequency_unit": "weekly",
|
|
272
|
-
* "value": 1000.245,
|
|
273
|
-
* "name": "avg consumption",
|
|
274
|
-
* "metadata": {
|
|
275
|
-
* "journey_title": "energy journey",
|
|
276
|
-
* "step_name": "avg consumption picker"
|
|
277
|
-
* }
|
|
278
|
-
* }
|
|
279
|
-
* ]
|
|
280
|
-
*/
|
|
281
|
-
PriceInputMappings;
|
|
282
|
-
/**
|
|
283
|
-
* When set to true on a `_price` displayed as OnRequest (`show_as_on_request: 'on_request'`) this flag means the price has been approved and can now be displayed to the customer. This flag is only valid for prices shown as 'on_request'.
|
|
284
|
-
*/
|
|
285
|
-
on_request_approved?: boolean;
|
|
286
255
|
}
|
|
287
256
|
/**
|
|
288
257
|
* Represents a valid base price item from a client.
|
|
@@ -293,25 +262,6 @@ declare namespace Components {
|
|
|
293
262
|
* The quantity of products being purchased.
|
|
294
263
|
*/
|
|
295
264
|
quantity?: number;
|
|
296
|
-
/**
|
|
297
|
-
* Price mapping information required to compute totals
|
|
298
|
-
*/
|
|
299
|
-
price_mappings?: /**
|
|
300
|
-
* example:
|
|
301
|
-
* [
|
|
302
|
-
* {
|
|
303
|
-
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
304
|
-
* "frequency_unit": "weekly",
|
|
305
|
-
* "value": 1000.245,
|
|
306
|
-
* "name": "avg consumption",
|
|
307
|
-
* "metadata": {
|
|
308
|
-
* "journey_title": "energy journey",
|
|
309
|
-
* "step_name": "avg consumption picker"
|
|
310
|
-
* }
|
|
311
|
-
* }
|
|
312
|
-
* ]
|
|
313
|
-
*/
|
|
314
|
-
PriceInputMappings;
|
|
315
265
|
/**
|
|
316
266
|
* An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
|
|
317
267
|
*/
|
|
@@ -345,10 +295,6 @@ declare namespace Components {
|
|
|
345
295
|
*/
|
|
346
296
|
_product?: {
|
|
347
297
|
[name: string]: any;
|
|
348
|
-
/**
|
|
349
|
-
* The description for the product
|
|
350
|
-
*/
|
|
351
|
-
description?: string;
|
|
352
298
|
/**
|
|
353
299
|
* The product code
|
|
354
300
|
*/
|
|
@@ -428,7 +374,7 @@ declare namespace Components {
|
|
|
428
374
|
_updated_at?: string;
|
|
429
375
|
};
|
|
430
376
|
}
|
|
431
|
-
export type BillingPeriod = "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
|
|
377
|
+
export type BillingPeriod = "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time";
|
|
432
378
|
/**
|
|
433
379
|
* Supports shopping for products and services until ready for checkout.
|
|
434
380
|
*/
|
|
@@ -705,24 +651,16 @@ declare namespace Components {
|
|
|
705
651
|
/**
|
|
706
652
|
* price item id
|
|
707
653
|
*/
|
|
708
|
-
|
|
654
|
+
id?: string;
|
|
709
655
|
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
710
656
|
/**
|
|
711
657
|
* The unit amount value
|
|
712
658
|
*/
|
|
713
659
|
unit_amount?: number;
|
|
714
|
-
/**
|
|
715
|
-
* The unit gross amount value.
|
|
716
|
-
*/
|
|
717
|
-
unit_amount_gross?: number;
|
|
718
660
|
/**
|
|
719
661
|
* Total before any (discounts or) taxes are applied.
|
|
720
662
|
*/
|
|
721
663
|
amount_subtotal?: number;
|
|
722
|
-
/**
|
|
723
|
-
* Total tax amount for this line item.
|
|
724
|
-
*/
|
|
725
|
-
amount_tax?: number;
|
|
726
664
|
/**
|
|
727
665
|
* Net unit amount without taxes or discounts.
|
|
728
666
|
*/
|
|
@@ -797,26 +735,6 @@ declare namespace Components {
|
|
|
797
735
|
* The sum of amounts of the price items by recurrence.
|
|
798
736
|
*/
|
|
799
737
|
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
|
|
800
|
-
price_mappings?: /**
|
|
801
|
-
* example:
|
|
802
|
-
* [
|
|
803
|
-
* {
|
|
804
|
-
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
805
|
-
* "frequency_unit": "weekly",
|
|
806
|
-
* "value": 1000.245,
|
|
807
|
-
* "name": "avg consumption",
|
|
808
|
-
* "metadata": {
|
|
809
|
-
* "journey_title": "energy journey",
|
|
810
|
-
* "step_name": "avg consumption picker"
|
|
811
|
-
* }
|
|
812
|
-
* }
|
|
813
|
-
* ]
|
|
814
|
-
*/
|
|
815
|
-
PriceInputMappings;
|
|
816
|
-
/**
|
|
817
|
-
* When set to true on a `_price` displayed as OnRequest (`show_as_on_request: 'on_request'`) this flag means the price has been approved and can now be displayed to the customer. This flag is only valid for prices shown as 'on_request'.
|
|
818
|
-
*/
|
|
819
|
-
on_request_approved?: boolean;
|
|
820
738
|
/**
|
|
821
739
|
* Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).
|
|
822
740
|
*/
|
|
@@ -828,7 +746,6 @@ declare namespace Components {
|
|
|
828
746
|
* }
|
|
829
747
|
*/
|
|
830
748
|
PriceItem[];
|
|
831
|
-
total_details?: /* The total details with tax (and discount) aggregated totals. */ TotalDetails;
|
|
832
749
|
}
|
|
833
750
|
/**
|
|
834
751
|
* Represents a composite price input to the pricing library.
|
|
@@ -839,22 +756,6 @@ declare namespace Components {
|
|
|
839
756
|
* The quantity of products being purchased.
|
|
840
757
|
*/
|
|
841
758
|
quantity?: number;
|
|
842
|
-
price_mappings?: /**
|
|
843
|
-
* example:
|
|
844
|
-
* [
|
|
845
|
-
* {
|
|
846
|
-
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
847
|
-
* "frequency_unit": "weekly",
|
|
848
|
-
* "value": 1000.245,
|
|
849
|
-
* "name": "avg consumption",
|
|
850
|
-
* "metadata": {
|
|
851
|
-
* "journey_title": "energy journey",
|
|
852
|
-
* "step_name": "avg consumption picker"
|
|
853
|
-
* }
|
|
854
|
-
* }
|
|
855
|
-
* ]
|
|
856
|
-
*/
|
|
857
|
-
PriceInputMappings;
|
|
858
759
|
/**
|
|
859
760
|
* An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
|
|
860
761
|
*/
|
|
@@ -888,10 +789,6 @@ declare namespace Components {
|
|
|
888
789
|
*/
|
|
889
790
|
_product?: {
|
|
890
791
|
[name: string]: any;
|
|
891
|
-
/**
|
|
892
|
-
* The description for the product
|
|
893
|
-
*/
|
|
894
|
-
description?: string;
|
|
895
792
|
/**
|
|
896
793
|
* The product code
|
|
897
794
|
*/
|
|
@@ -1422,7 +1319,7 @@ declare namespace Components {
|
|
|
1422
1319
|
*
|
|
1423
1320
|
*/
|
|
1424
1321
|
OrderStatus;
|
|
1425
|
-
line_items?: /*
|
|
1322
|
+
line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
|
|
1426
1323
|
/**
|
|
1427
1324
|
* type of source, e.g. journey or manual
|
|
1428
1325
|
* example:
|
|
@@ -1529,27 +1426,18 @@ declare namespace Components {
|
|
|
1529
1426
|
*/
|
|
1530
1427
|
is_composite_price?: boolean;
|
|
1531
1428
|
/**
|
|
1532
|
-
* Describes how to compute the price per period. Either `per_unit
|
|
1429
|
+
* Describes how to compute the price per period. Either `per_unit` or `tiered`.
|
|
1533
1430
|
* - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
|
|
1534
|
-
* - `
|
|
1535
|
-
* - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
|
|
1536
|
-
* - `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.
|
|
1431
|
+
* - `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.
|
|
1537
1432
|
*
|
|
1538
|
-
|
|
1539
|
-
pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
|
|
1540
|
-
/**
|
|
1541
|
-
* Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.
|
|
1433
|
+
* ⚠️ Tiered pricing is **not supported** yet.
|
|
1542
1434
|
*
|
|
1543
1435
|
*/
|
|
1544
|
-
|
|
1436
|
+
billing_scheme?: "per_unit";
|
|
1545
1437
|
/**
|
|
1546
1438
|
* A brief description of the price.
|
|
1547
1439
|
*/
|
|
1548
1440
|
description?: string;
|
|
1549
|
-
/**
|
|
1550
|
-
* A detailed description of the price. This is shown on the order document and order table.
|
|
1551
|
-
*/
|
|
1552
|
-
long_description?: string;
|
|
1553
1441
|
/**
|
|
1554
1442
|
* The default tax rate applicable to the product.
|
|
1555
1443
|
* This field is deprecated, use the new `tax` attribute.
|
|
@@ -1573,6 +1461,7 @@ declare namespace Components {
|
|
|
1573
1461
|
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1574
1462
|
* "type": "VAT",
|
|
1575
1463
|
* "description": "Tax description",
|
|
1464
|
+
* "behavior": "Exclusive",
|
|
1576
1465
|
* "active": "true",
|
|
1577
1466
|
* "region": "DE",
|
|
1578
1467
|
* "region_label": "Germany",
|
|
@@ -1588,9 +1477,15 @@ declare namespace Components {
|
|
|
1588
1477
|
*/
|
|
1589
1478
|
Tax[];
|
|
1590
1479
|
/**
|
|
1591
|
-
* Specifies whether the price is considered `inclusive` of taxes or
|
|
1480
|
+
* Specifies whether the price is considered `inclusive` of taxes or `exclusive` of taxes.
|
|
1481
|
+
* One of `inclusive`, `exclusive`, or `unspecified`.
|
|
1482
|
+
*
|
|
1592
1483
|
*/
|
|
1593
|
-
|
|
1484
|
+
tax_behavior?: "inclusive" | "exclusive";
|
|
1485
|
+
/**
|
|
1486
|
+
* Defines the tiered pricing type of the price.
|
|
1487
|
+
*/
|
|
1488
|
+
tiers_mode?: "standard";
|
|
1594
1489
|
/**
|
|
1595
1490
|
* One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
|
|
1596
1491
|
*/
|
|
@@ -1661,7 +1556,7 @@ declare namespace Components {
|
|
|
1661
1556
|
/**
|
|
1662
1557
|
* The unit of measurement used for display purposes and possibly for calculations when the price is variable.
|
|
1663
1558
|
*/
|
|
1664
|
-
unit?: /* The unit of measurement used for display purposes and possibly for calculations when the price is variable. */ ("kw" | "kwh" | "m" | "m2" | "l"
|
|
1559
|
+
unit?: /* The unit of measurement used for display purposes and possibly for calculations when the price is variable. */ ("kw" | "kwh" | "m" | "m2" | "l") | string;
|
|
1665
1560
|
/**
|
|
1666
1561
|
* The price creation date
|
|
1667
1562
|
*/
|
|
@@ -1703,57 +1598,6 @@ declare namespace Components {
|
|
|
1703
1598
|
*/
|
|
1704
1599
|
_tags?: string[];
|
|
1705
1600
|
}
|
|
1706
|
-
/**
|
|
1707
|
-
* example:
|
|
1708
|
-
* {
|
|
1709
|
-
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
1710
|
-
* "frequency_unit": "weekly",
|
|
1711
|
-
* "value": 1000.245,
|
|
1712
|
-
* "name": "avg consumption",
|
|
1713
|
-
* "metadata": {
|
|
1714
|
-
* "journey_title": "energy journey",
|
|
1715
|
-
* "step_name": "avg consumption picker"
|
|
1716
|
-
* }
|
|
1717
|
-
* }
|
|
1718
|
-
*/
|
|
1719
|
-
export interface PriceInputMapping {
|
|
1720
|
-
price_id?: string;
|
|
1721
|
-
frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time";
|
|
1722
|
-
name?: string;
|
|
1723
|
-
value?: number;
|
|
1724
|
-
metadata?: {
|
|
1725
|
-
[name: string]: string;
|
|
1726
|
-
};
|
|
1727
|
-
}
|
|
1728
|
-
/**
|
|
1729
|
-
* example:
|
|
1730
|
-
* [
|
|
1731
|
-
* {
|
|
1732
|
-
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
1733
|
-
* "frequency_unit": "weekly",
|
|
1734
|
-
* "value": 1000.245,
|
|
1735
|
-
* "name": "avg consumption",
|
|
1736
|
-
* "metadata": {
|
|
1737
|
-
* "journey_title": "energy journey",
|
|
1738
|
-
* "step_name": "avg consumption picker"
|
|
1739
|
-
* }
|
|
1740
|
-
* }
|
|
1741
|
-
* ]
|
|
1742
|
-
*/
|
|
1743
|
-
export type PriceInputMappings = /**
|
|
1744
|
-
* example:
|
|
1745
|
-
* {
|
|
1746
|
-
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
1747
|
-
* "frequency_unit": "weekly",
|
|
1748
|
-
* "value": 1000.245,
|
|
1749
|
-
* "name": "avg consumption",
|
|
1750
|
-
* "metadata": {
|
|
1751
|
-
* "journey_title": "energy journey",
|
|
1752
|
-
* "step_name": "avg consumption picker"
|
|
1753
|
-
* }
|
|
1754
|
-
* }
|
|
1755
|
-
*/
|
|
1756
|
-
PriceInputMapping[];
|
|
1757
1601
|
/**
|
|
1758
1602
|
* Represents a price item
|
|
1759
1603
|
* example:
|
|
@@ -1765,24 +1609,16 @@ declare namespace Components {
|
|
|
1765
1609
|
/**
|
|
1766
1610
|
* price item id
|
|
1767
1611
|
*/
|
|
1768
|
-
|
|
1612
|
+
id?: string;
|
|
1769
1613
|
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
1770
1614
|
/**
|
|
1771
1615
|
* The unit amount value
|
|
1772
1616
|
*/
|
|
1773
1617
|
unit_amount?: number;
|
|
1774
|
-
/**
|
|
1775
|
-
* The unit gross amount value.
|
|
1776
|
-
*/
|
|
1777
|
-
unit_amount_gross?: number;
|
|
1778
1618
|
/**
|
|
1779
1619
|
* Total before any (discounts or) taxes are applied.
|
|
1780
1620
|
*/
|
|
1781
1621
|
amount_subtotal?: number;
|
|
1782
|
-
/**
|
|
1783
|
-
* Total tax amount for this line item.
|
|
1784
|
-
*/
|
|
1785
|
-
amount_tax?: number;
|
|
1786
1622
|
/**
|
|
1787
1623
|
* Net unit amount without taxes or discounts.
|
|
1788
1624
|
*/
|
|
@@ -1857,39 +1693,14 @@ declare namespace Components {
|
|
|
1857
1693
|
* The sum of amounts of the price items by recurrence.
|
|
1858
1694
|
*/
|
|
1859
1695
|
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
|
|
1860
|
-
price_mappings?: /**
|
|
1861
|
-
* example:
|
|
1862
|
-
* [
|
|
1863
|
-
* {
|
|
1864
|
-
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
1865
|
-
* "frequency_unit": "weekly",
|
|
1866
|
-
* "value": 1000.245,
|
|
1867
|
-
* "name": "avg consumption",
|
|
1868
|
-
* "metadata": {
|
|
1869
|
-
* "journey_title": "energy journey",
|
|
1870
|
-
* "step_name": "avg consumption picker"
|
|
1871
|
-
* }
|
|
1872
|
-
* }
|
|
1873
|
-
* ]
|
|
1874
|
-
*/
|
|
1875
|
-
PriceInputMappings;
|
|
1876
|
-
/**
|
|
1877
|
-
* When set to true on a `_price` displayed as OnRequest (`show_as_on_request: 'on_request'`) this flag means the price has been approved and can now be displayed to the customer. This flag is only valid for prices shown as 'on_request'.
|
|
1878
|
-
*/
|
|
1879
|
-
on_request_approved?: boolean;
|
|
1880
1696
|
/**
|
|
1881
1697
|
* One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
|
|
1882
1698
|
*/
|
|
1883
1699
|
type?: "one_time" | "recurring";
|
|
1884
1700
|
/**
|
|
1885
|
-
*
|
|
1886
|
-
* - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
|
|
1887
|
-
* - `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.
|
|
1888
|
-
* - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
|
|
1889
|
-
* - `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.
|
|
1890
|
-
*
|
|
1701
|
+
* When set to true on a `_price` displayed as OnRequest (`show_as_on_request: 'on_request'`) this flag means the price has been approved and can now be displayed to the customer. This flag is only valid for prices shown as 'on_request'.
|
|
1891
1702
|
*/
|
|
1892
|
-
|
|
1703
|
+
on_request_approved?: boolean;
|
|
1893
1704
|
}
|
|
1894
1705
|
/**
|
|
1895
1706
|
* Represents a price input to the pricing library.
|
|
@@ -1900,22 +1711,6 @@ declare namespace Components {
|
|
|
1900
1711
|
* The quantity of products being purchased.
|
|
1901
1712
|
*/
|
|
1902
1713
|
quantity?: number;
|
|
1903
|
-
price_mappings?: /**
|
|
1904
|
-
* example:
|
|
1905
|
-
* [
|
|
1906
|
-
* {
|
|
1907
|
-
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
1908
|
-
* "frequency_unit": "weekly",
|
|
1909
|
-
* "value": 1000.245,
|
|
1910
|
-
* "name": "avg consumption",
|
|
1911
|
-
* "metadata": {
|
|
1912
|
-
* "journey_title": "energy journey",
|
|
1913
|
-
* "step_name": "avg consumption picker"
|
|
1914
|
-
* }
|
|
1915
|
-
* }
|
|
1916
|
-
* ]
|
|
1917
|
-
*/
|
|
1918
|
-
PriceInputMappings;
|
|
1919
1714
|
/**
|
|
1920
1715
|
* An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
|
|
1921
1716
|
*/
|
|
@@ -1949,10 +1744,6 @@ declare namespace Components {
|
|
|
1949
1744
|
*/
|
|
1950
1745
|
_product?: {
|
|
1951
1746
|
[name: string]: any;
|
|
1952
|
-
/**
|
|
1953
|
-
* The description for the product
|
|
1954
|
-
*/
|
|
1955
|
-
description?: string;
|
|
1956
1747
|
/**
|
|
1957
1748
|
* The product code
|
|
1958
1749
|
*/
|
|
@@ -2039,31 +1830,10 @@ declare namespace Components {
|
|
|
2039
1830
|
* The unit amount value
|
|
2040
1831
|
*/
|
|
2041
1832
|
unit_amount?: number;
|
|
2042
|
-
/**
|
|
2043
|
-
* The unit gross amount value.
|
|
2044
|
-
*/
|
|
2045
|
-
unit_amount_gross?: number;
|
|
2046
|
-
unit_amount_currency?: /**
|
|
2047
|
-
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
2048
|
-
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
2049
|
-
*
|
|
2050
|
-
* example:
|
|
2051
|
-
* EUR
|
|
2052
|
-
*/
|
|
2053
|
-
Currency;
|
|
2054
1833
|
/**
|
|
2055
1834
|
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
2056
1835
|
*/
|
|
2057
1836
|
unit_amount_decimal?: string;
|
|
2058
|
-
/**
|
|
2059
|
-
* Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
|
|
2060
|
-
* - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
|
|
2061
|
-
* - `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.
|
|
2062
|
-
* - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
|
|
2063
|
-
* - `tiered_flatfee` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
|
|
2064
|
-
*
|
|
2065
|
-
*/
|
|
2066
|
-
pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
|
|
2067
1837
|
/**
|
|
2068
1838
|
* The snapshot of the price linked to the price item.
|
|
2069
1839
|
* example:
|
|
@@ -2082,27 +1852,18 @@ declare namespace Components {
|
|
|
2082
1852
|
*/
|
|
2083
1853
|
is_composite_price?: boolean;
|
|
2084
1854
|
/**
|
|
2085
|
-
* Describes how to compute the price per period. Either `per_unit
|
|
1855
|
+
* Describes how to compute the price per period. Either `per_unit` or `tiered`.
|
|
2086
1856
|
* - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
|
|
2087
|
-
* - `
|
|
2088
|
-
* - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
|
|
2089
|
-
* - `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.
|
|
1857
|
+
* - `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.
|
|
2090
1858
|
*
|
|
2091
|
-
|
|
2092
|
-
pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
|
|
2093
|
-
/**
|
|
2094
|
-
* Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.
|
|
1859
|
+
* ⚠️ Tiered pricing is **not supported** yet.
|
|
2095
1860
|
*
|
|
2096
1861
|
*/
|
|
2097
|
-
|
|
1862
|
+
billing_scheme?: "per_unit";
|
|
2098
1863
|
/**
|
|
2099
1864
|
* A brief description of the price.
|
|
2100
1865
|
*/
|
|
2101
1866
|
description?: string;
|
|
2102
|
-
/**
|
|
2103
|
-
* A detailed description of the price. This is shown on the order document and order table.
|
|
2104
|
-
*/
|
|
2105
|
-
long_description?: string;
|
|
2106
1867
|
/**
|
|
2107
1868
|
* The default tax rate applicable to the product.
|
|
2108
1869
|
* This field is deprecated, use the new `tax` attribute.
|
|
@@ -2126,6 +1887,7 @@ declare namespace Components {
|
|
|
2126
1887
|
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
2127
1888
|
* "type": "VAT",
|
|
2128
1889
|
* "description": "Tax description",
|
|
1890
|
+
* "behavior": "Exclusive",
|
|
2129
1891
|
* "active": "true",
|
|
2130
1892
|
* "region": "DE",
|
|
2131
1893
|
* "region_label": "Germany",
|
|
@@ -2141,9 +1903,15 @@ declare namespace Components {
|
|
|
2141
1903
|
*/
|
|
2142
1904
|
Tax[];
|
|
2143
1905
|
/**
|
|
2144
|
-
* Specifies whether the price is considered `inclusive` of taxes or
|
|
1906
|
+
* Specifies whether the price is considered `inclusive` of taxes or `exclusive` of taxes.
|
|
1907
|
+
* One of `inclusive`, `exclusive`, or `unspecified`.
|
|
1908
|
+
*
|
|
2145
1909
|
*/
|
|
2146
|
-
|
|
1910
|
+
tax_behavior?: "inclusive" | "exclusive";
|
|
1911
|
+
/**
|
|
1912
|
+
* Defines the tiered pricing type of the price.
|
|
1913
|
+
*/
|
|
1914
|
+
tiers_mode?: "standard";
|
|
2147
1915
|
/**
|
|
2148
1916
|
* One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
|
|
2149
1917
|
*/
|
|
@@ -2214,7 +1982,7 @@ declare namespace Components {
|
|
|
2214
1982
|
/**
|
|
2215
1983
|
* The unit of measurement used for display purposes and possibly for calculations when the price is variable.
|
|
2216
1984
|
*/
|
|
2217
|
-
unit?: /* The unit of measurement used for display purposes and possibly for calculations when the price is variable. */ ("kw" | "kwh" | "m" | "m2" | "l"
|
|
1985
|
+
unit?: /* The unit of measurement used for display purposes and possibly for calculations when the price is variable. */ ("kw" | "kwh" | "m" | "m2" | "l") | string;
|
|
2218
1986
|
/**
|
|
2219
1987
|
* The price creation date
|
|
2220
1988
|
*/
|
|
@@ -2262,16 +2030,7 @@ declare namespace Components {
|
|
|
2262
2030
|
/**
|
|
2263
2031
|
* A valid set of product prices, quantities, (discounts) and taxes from a client.
|
|
2264
2032
|
*/
|
|
2265
|
-
export type PriceItemsDto = (/* Represents a price input to the pricing library. */ PriceItemDto
|
|
2266
|
-
export interface PriceTier {
|
|
2267
|
-
up_to?: number | null;
|
|
2268
|
-
flat_fee_amount?: number;
|
|
2269
|
-
flat_fee_amount_decimal?: string;
|
|
2270
|
-
unit_amount?: number;
|
|
2271
|
-
unit_amount_decimal?: string;
|
|
2272
|
-
display_mode?: PriceTierDisplayMode;
|
|
2273
|
-
}
|
|
2274
|
-
export type PriceTierDisplayMode = "hidden" | "on_request";
|
|
2033
|
+
export type PriceItemsDto = (/* Represents a price input to the pricing library. */ PriceItemDto)[];
|
|
2275
2034
|
/**
|
|
2276
2035
|
* The result from the calculation of a set of price items.
|
|
2277
2036
|
*/
|
|
@@ -2283,14 +2042,7 @@ declare namespace Components {
|
|
|
2283
2042
|
* "$ref": "#/components/examples/price-item"
|
|
2284
2043
|
* }
|
|
2285
2044
|
*/
|
|
2286
|
-
PriceItem
|
|
2287
|
-
* Represents a composite price input to the pricing library.
|
|
2288
|
-
* example:
|
|
2289
|
-
* {
|
|
2290
|
-
* "$ref": "#/components/examples/price-item"
|
|
2291
|
-
* }
|
|
2292
|
-
*/
|
|
2293
|
-
CompositePriceItem)[];
|
|
2045
|
+
PriceItem)[];
|
|
2294
2046
|
/**
|
|
2295
2047
|
* Total of all items before (discounts or) taxes are applied.
|
|
2296
2048
|
*/
|
|
@@ -2299,23 +2051,7 @@ declare namespace Components {
|
|
|
2299
2051
|
* Total of all items after (discounts and) taxes are applied.
|
|
2300
2052
|
*/
|
|
2301
2053
|
amount_total?: number;
|
|
2302
|
-
/**
|
|
2303
|
-
* The unit gross amount value.
|
|
2304
|
-
*/
|
|
2305
|
-
unit_amount_gross?: number;
|
|
2306
|
-
/**
|
|
2307
|
-
* This is the sum of all the price item tax amounts.
|
|
2308
|
-
*/
|
|
2309
|
-
amount_tax?: number;
|
|
2310
2054
|
total_details?: /* The total details with tax (and discount) aggregated totals. */ TotalDetails;
|
|
2311
|
-
currency?: /**
|
|
2312
|
-
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
2313
|
-
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
2314
|
-
*
|
|
2315
|
-
* example:
|
|
2316
|
-
* EUR
|
|
2317
|
-
*/
|
|
2318
|
-
Currency;
|
|
2319
2055
|
}
|
|
2320
2056
|
/**
|
|
2321
2057
|
* The product entity
|
|
@@ -2326,10 +2062,6 @@ declare namespace Components {
|
|
|
2326
2062
|
*/
|
|
2327
2063
|
export interface Product {
|
|
2328
2064
|
[name: string]: any;
|
|
2329
|
-
/**
|
|
2330
|
-
* The description for the product
|
|
2331
|
-
*/
|
|
2332
|
-
description?: string;
|
|
2333
2065
|
/**
|
|
2334
2066
|
* The product code
|
|
2335
2067
|
*/
|
|
@@ -2419,7 +2151,7 @@ declare namespace Components {
|
|
|
2419
2151
|
/**
|
|
2420
2152
|
* The price billing period.
|
|
2421
2153
|
*/
|
|
2422
|
-
billing_period?:
|
|
2154
|
+
billing_period?: string;
|
|
2423
2155
|
/**
|
|
2424
2156
|
* Total of all items, with same recurrence, before (discounts or) taxes are applied.
|
|
2425
2157
|
*/
|
|
@@ -2428,25 +2160,10 @@ declare namespace Components {
|
|
|
2428
2160
|
* Total of all items, with same recurrence, after (discounts and) taxes are applied.
|
|
2429
2161
|
*/
|
|
2430
2162
|
amount_total: number;
|
|
2431
|
-
/**
|
|
2432
|
-
* The unit gross amount value.
|
|
2433
|
-
*/
|
|
2434
|
-
unit_amount_gross?: number;
|
|
2435
2163
|
/**
|
|
2436
2164
|
* Total of all items taxes, with same recurrence.
|
|
2437
2165
|
*/
|
|
2438
2166
|
amount_tax?: number;
|
|
2439
|
-
/**
|
|
2440
|
-
* Currency
|
|
2441
|
-
*/
|
|
2442
|
-
currency?: /**
|
|
2443
|
-
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
2444
|
-
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
2445
|
-
*
|
|
2446
|
-
* example:
|
|
2447
|
-
* EUR
|
|
2448
|
-
*/
|
|
2449
|
-
Currency;
|
|
2450
2167
|
}
|
|
2451
2168
|
/**
|
|
2452
2169
|
* An amount associated with a specific recurrence.
|
|
@@ -2459,7 +2176,7 @@ declare namespace Components {
|
|
|
2459
2176
|
/**
|
|
2460
2177
|
* The price billing period.
|
|
2461
2178
|
*/
|
|
2462
|
-
billing_period?:
|
|
2179
|
+
billing_period?: string;
|
|
2463
2180
|
/**
|
|
2464
2181
|
* Total of all items, with same recurrence, before (discounts or) taxes are applied.
|
|
2465
2182
|
*/
|
|
@@ -2468,10 +2185,6 @@ declare namespace Components {
|
|
|
2468
2185
|
* Total of all items, with same recurrence, after (discounts and) taxes are applied.
|
|
2469
2186
|
*/
|
|
2470
2187
|
amount_total: number;
|
|
2471
|
-
/**
|
|
2472
|
-
* The unit gross amount value.
|
|
2473
|
-
*/
|
|
2474
|
-
unit_amount_gross?: number;
|
|
2475
2188
|
/**
|
|
2476
2189
|
* Total of all items taxes, with same recurrence.
|
|
2477
2190
|
*/
|
|
@@ -2485,6 +2198,7 @@ declare namespace Components {
|
|
|
2485
2198
|
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
2486
2199
|
* "type": "VAT",
|
|
2487
2200
|
* "description": "Tax description",
|
|
2201
|
+
* "behavior": "Exclusive",
|
|
2488
2202
|
* "active": "true",
|
|
2489
2203
|
* "region": "DE",
|
|
2490
2204
|
* "region_label": "Germany",
|
|
@@ -2516,6 +2230,7 @@ declare namespace Components {
|
|
|
2516
2230
|
type: "VAT" | "GST" | "Custom";
|
|
2517
2231
|
description?: string;
|
|
2518
2232
|
rate: number;
|
|
2233
|
+
behavior: "Exclusive" | "Inclusive" | "exclusive" | "inclusive";
|
|
2519
2234
|
active?: boolean;
|
|
2520
2235
|
region?: string;
|
|
2521
2236
|
region_label?: string;
|
|
@@ -2550,6 +2265,7 @@ declare namespace Components {
|
|
|
2550
2265
|
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
2551
2266
|
* "type": "VAT",
|
|
2552
2267
|
* "description": "Tax description",
|
|
2268
|
+
* "behavior": "Exclusive",
|
|
2553
2269
|
* "active": "true",
|
|
2554
2270
|
* "region": "DE",
|
|
2555
2271
|
* "region_label": "Germany",
|
|
@@ -2600,6 +2316,7 @@ declare namespace Components {
|
|
|
2600
2316
|
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
2601
2317
|
* "type": "VAT",
|
|
2602
2318
|
* "description": "Tax description",
|
|
2319
|
+
* "behavior": "Exclusive",
|
|
2603
2320
|
* "active": "true",
|
|
2604
2321
|
* "region": "DE",
|
|
2605
2322
|
* "region_label": "Germany",
|
|
@@ -2646,49 +2363,6 @@ declare namespace Components {
|
|
|
2646
2363
|
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
|
|
2647
2364
|
};
|
|
2648
2365
|
}
|
|
2649
|
-
/**
|
|
2650
|
-
* The availability rule error
|
|
2651
|
-
*/
|
|
2652
|
-
export interface ValidateAvailabilityFileError {
|
|
2653
|
-
/**
|
|
2654
|
-
* The line number where the error was found
|
|
2655
|
-
*/
|
|
2656
|
-
line?: number;
|
|
2657
|
-
/**
|
|
2658
|
-
* The error message
|
|
2659
|
-
*/
|
|
2660
|
-
msg: string;
|
|
2661
|
-
/**
|
|
2662
|
-
* Data related to the error
|
|
2663
|
-
*/
|
|
2664
|
-
data?: string;
|
|
2665
|
-
}
|
|
2666
|
-
/**
|
|
2667
|
-
* The availability map file result payload
|
|
2668
|
-
* example:
|
|
2669
|
-
* {
|
|
2670
|
-
* "rules_parsed_count": 8,
|
|
2671
|
-
* "errors": [
|
|
2672
|
-
* "File must be UTF-8 encoded",
|
|
2673
|
-
* "Error on line 3 - street_number must be of type number",
|
|
2674
|
-
* "Error on line 6 - start_date cant be greater than end_date"
|
|
2675
|
-
* ]
|
|
2676
|
-
* }
|
|
2677
|
-
*/
|
|
2678
|
-
export interface ValidateAvailabilityFileResult {
|
|
2679
|
-
/**
|
|
2680
|
-
* The status of the validation
|
|
2681
|
-
*/
|
|
2682
|
-
status: "success" | "error";
|
|
2683
|
-
/**
|
|
2684
|
-
* The number of rules successfully parsed
|
|
2685
|
-
*/
|
|
2686
|
-
rules_parsed_count: number;
|
|
2687
|
-
/**
|
|
2688
|
-
* The errors found on the file
|
|
2689
|
-
*/
|
|
2690
|
-
errors: /* The availability rule error */ ValidateAvailabilityFileError[];
|
|
2691
|
-
}
|
|
2692
2366
|
}
|
|
2693
2367
|
}
|
|
2694
2368
|
declare namespace Paths {
|
|
@@ -2813,34 +2487,6 @@ declare namespace Paths {
|
|
|
2813
2487
|
export type $400 = Components.Schemas.Error;
|
|
2814
2488
|
}
|
|
2815
2489
|
}
|
|
2816
|
-
namespace $ValidateAvailabilityFile {
|
|
2817
|
-
export interface HeaderParameters {
|
|
2818
|
-
"X-Epilot-Org-ID": Parameters.XEpilotOrgID;
|
|
2819
|
-
}
|
|
2820
|
-
namespace Parameters {
|
|
2821
|
-
export type Id = string;
|
|
2822
|
-
export type XEpilotOrgID = string;
|
|
2823
|
-
}
|
|
2824
|
-
export interface PathParameters {
|
|
2825
|
-
id: Parameters.Id;
|
|
2826
|
-
}
|
|
2827
|
-
namespace Responses {
|
|
2828
|
-
export type $200 = /**
|
|
2829
|
-
* The availability map file result payload
|
|
2830
|
-
* example:
|
|
2831
|
-
* {
|
|
2832
|
-
* "rules_parsed_count": 8,
|
|
2833
|
-
* "errors": [
|
|
2834
|
-
* "File must be UTF-8 encoded",
|
|
2835
|
-
* "Error on line 3 - street_number must be of type number",
|
|
2836
|
-
* "Error on line 6 - start_date cant be greater than end_date"
|
|
2837
|
-
* ]
|
|
2838
|
-
* }
|
|
2839
|
-
*/
|
|
2840
|
-
Components.Schemas.ValidateAvailabilityFileResult;
|
|
2841
|
-
export type $400 = Components.Schemas.Error;
|
|
2842
|
-
}
|
|
2843
|
-
}
|
|
2844
2490
|
namespace CreateOrder {
|
|
2845
2491
|
export type RequestBody = /* Order Entity Payload */ Components.Schemas.OrderPayload;
|
|
2846
2492
|
namespace Responses {
|
|
@@ -2939,16 +2585,6 @@ export interface OperationMethods {
|
|
|
2939
2585
|
data?: Paths.$AvailabilityCheck.RequestBody,
|
|
2940
2586
|
config?: AxiosRequestConfig
|
|
2941
2587
|
): OperationResponse<Paths.$AvailabilityCheck.Responses.$200>
|
|
2942
|
-
/**
|
|
2943
|
-
* $validateAvailabilityFile - validateAvailabilityFile
|
|
2944
|
-
*
|
|
2945
|
-
* Validates an availability file, it returns an array of errors if the file is invalid
|
|
2946
|
-
*/
|
|
2947
|
-
'$validateAvailabilityFile'(
|
|
2948
|
-
parameters?: Parameters<Paths.$ValidateAvailabilityFile.PathParameters & Paths.$ValidateAvailabilityFile.HeaderParameters> | null,
|
|
2949
|
-
data?: any,
|
|
2950
|
-
config?: AxiosRequestConfig
|
|
2951
|
-
): OperationResponse<Paths.$ValidateAvailabilityFile.Responses.$200>
|
|
2952
2588
|
/**
|
|
2953
2589
|
* $createOpportunity - createOpportunity
|
|
2954
2590
|
*
|
|
@@ -3037,18 +2673,6 @@ export interface PathsDictionary {
|
|
|
3037
2673
|
config?: AxiosRequestConfig
|
|
3038
2674
|
): OperationResponse<Paths.$AvailabilityCheck.Responses.$200>
|
|
3039
2675
|
}
|
|
3040
|
-
['/v1/validate-availability/{id}']: {
|
|
3041
|
-
/**
|
|
3042
|
-
* $validateAvailabilityFile - validateAvailabilityFile
|
|
3043
|
-
*
|
|
3044
|
-
* Validates an availability file, it returns an array of errors if the file is invalid
|
|
3045
|
-
*/
|
|
3046
|
-
'get'(
|
|
3047
|
-
parameters?: Parameters<Paths.$ValidateAvailabilityFile.PathParameters & Paths.$ValidateAvailabilityFile.HeaderParameters> | null,
|
|
3048
|
-
data?: any,
|
|
3049
|
-
config?: AxiosRequestConfig
|
|
3050
|
-
): OperationResponse<Paths.$ValidateAvailabilityFile.Responses.$200>
|
|
3051
|
-
}
|
|
3052
2676
|
['/v1/public/opportunity']: {
|
|
3053
2677
|
/**
|
|
3054
2678
|
* $createOpportunity - createOpportunity
|