@epilot/pricing-client 3.15.3 → 3.16.1

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/openapi.d.ts CHANGED
@@ -63,24 +63,6 @@ declare namespace Components {
63
63
  */
64
64
  title?: string | null;
65
65
  }
66
- export interface Amounts {
67
- /**
68
- * Total of all items before (discounts or) taxes are applied.
69
- */
70
- amount_subtotal?: number;
71
- /**
72
- * Total of all items before (discounts or) taxes are applied, as a string with all the decimal places.
73
- */
74
- amount_subtotal_decimal?: string;
75
- /**
76
- * Total of all items after (discounts and) taxes are applied.
77
- */
78
- amount_total?: number;
79
- /**
80
- * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
81
- */
82
- amount_total_decimal?: string;
83
- }
84
66
  /**
85
67
  * Availability check request payload
86
68
  */
@@ -183,39 +165,19 @@ declare namespace Components {
183
165
  * }
184
166
  */
185
167
  export interface BasePriceItem {
186
- /**
187
- * Total of all items before (discounts or) taxes are applied.
188
- */
189
- amount_subtotal?: number;
190
- /**
191
- * Total of all items before (discounts or) taxes are applied, as a string with all the decimal places.
192
- */
193
- amount_subtotal_decimal?: string;
194
- /**
195
- * Total of all items after (discounts and) taxes are applied.
196
- */
197
- amount_total?: number;
198
- /**
199
- * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
200
- */
201
- amount_total_decimal?: string;
202
168
  /**
203
169
  * price item id
204
170
  */
205
- _id?: string;
171
+ id?: string;
206
172
  metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
207
173
  /**
208
174
  * The unit amount value
209
175
  */
210
176
  unit_amount?: number;
211
177
  /**
212
- * The unit gross amount value.
178
+ * Total before any (discounts or) taxes are applied.
213
179
  */
214
- unit_amount_gross?: number;
215
- /**
216
- * Total tax amount for this line item.
217
- */
218
- amount_tax?: number;
180
+ amount_subtotal?: number;
219
181
  /**
220
182
  * Net unit amount without taxes or discounts.
221
183
  */
@@ -224,6 +186,10 @@ declare namespace Components {
224
186
  * The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
225
187
  */
226
188
  unit_amount_decimal?: string;
189
+ /**
190
+ * Total after (discounts and) taxes.
191
+ */
192
+ amount_total?: number;
227
193
  currency?: /**
228
194
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
229
195
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
@@ -286,26 +252,6 @@ declare namespace Components {
286
252
  * The sum of amounts of the price items by recurrence.
287
253
  */
288
254
  recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
289
- price_mappings?: /**
290
- * example:
291
- * [
292
- * {
293
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
294
- * "frequency_unit": "weekly",
295
- * "value": 1000.245,
296
- * "name": "avg consumption",
297
- * "metadata": {
298
- * "journey_title": "energy journey",
299
- * "step_name": "avg consumption picker"
300
- * }
301
- * }
302
- * ]
303
- */
304
- PriceInputMappings;
305
- /**
306
- * 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'.
307
- */
308
- on_request_approved?: boolean;
309
255
  }
310
256
  /**
311
257
  * Represents a valid base price item from a client.
@@ -316,25 +262,6 @@ declare namespace Components {
316
262
  * The quantity of products being purchased.
317
263
  */
318
264
  quantity?: number;
319
- /**
320
- * Price mapping information required to compute totals
321
- */
322
- price_mappings?: /**
323
- * example:
324
- * [
325
- * {
326
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
327
- * "frequency_unit": "weekly",
328
- * "value": 1000.245,
329
- * "name": "avg consumption",
330
- * "metadata": {
331
- * "journey_title": "energy journey",
332
- * "step_name": "avg consumption picker"
333
- * }
334
- * }
335
- * ]
336
- */
337
- PriceInputMappings;
338
265
  /**
339
266
  * An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
340
267
  */
@@ -368,10 +295,6 @@ declare namespace Components {
368
295
  */
369
296
  _product?: {
370
297
  [name: string]: any;
371
- /**
372
- * The description for the product
373
- */
374
- description?: string;
375
298
  /**
376
299
  * The product code
377
300
  */
@@ -451,27 +374,11 @@ declare namespace Components {
451
374
  _updated_at?: string;
452
375
  };
453
376
  }
454
- 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";
455
378
  /**
456
379
  * Supports shopping for products and services until ready for checkout.
457
380
  */
458
381
  export interface Cart {
459
- /**
460
- * Total of all items before (discounts or) taxes are applied.
461
- */
462
- amount_subtotal?: number;
463
- /**
464
- * Total of all items before (discounts or) taxes are applied, as a string with all the decimal places.
465
- */
466
- amount_subtotal_decimal?: string;
467
- /**
468
- * Total of all items after (discounts and) taxes are applied.
469
- */
470
- amount_total?: number;
471
- /**
472
- * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
473
- */
474
- amount_total_decimal?: string;
475
382
  /**
476
383
  * The cart identifier
477
384
  */
@@ -493,6 +400,14 @@ declare namespace Components {
493
400
  delivery_address?: Address;
494
401
  metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
495
402
  line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
403
+ /**
404
+ * Total of all items before (discounts or) taxes are applied.
405
+ */
406
+ amount_subtotal?: number;
407
+ /**
408
+ * Total of all items after (discounts and) taxes are applied.
409
+ */
410
+ amount_total?: number;
496
411
  total_details?: /* The total details with tax (and discount) aggregated totals. */ TotalDetails;
497
412
  created_at?: string; // date-time
498
413
  updated_at?: string; // date-time
@@ -733,39 +648,19 @@ declare namespace Components {
733
648
  * }
734
649
  */
735
650
  export interface CompositePriceItem {
736
- /**
737
- * Total of all items before (discounts or) taxes are applied.
738
- */
739
- amount_subtotal?: number;
740
- /**
741
- * Total of all items before (discounts or) taxes are applied, as a string with all the decimal places.
742
- */
743
- amount_subtotal_decimal?: string;
744
- /**
745
- * Total of all items after (discounts and) taxes are applied.
746
- */
747
- amount_total?: number;
748
- /**
749
- * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
750
- */
751
- amount_total_decimal?: string;
752
651
  /**
753
652
  * price item id
754
653
  */
755
- _id?: string;
654
+ id?: string;
756
655
  metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
757
656
  /**
758
657
  * The unit amount value
759
658
  */
760
659
  unit_amount?: number;
761
660
  /**
762
- * The unit gross amount value.
763
- */
764
- unit_amount_gross?: number;
765
- /**
766
- * Total tax amount for this line item.
661
+ * Total before any (discounts or) taxes are applied.
767
662
  */
768
- amount_tax?: number;
663
+ amount_subtotal?: number;
769
664
  /**
770
665
  * Net unit amount without taxes or discounts.
771
666
  */
@@ -774,6 +669,10 @@ declare namespace Components {
774
669
  * The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
775
670
  */
776
671
  unit_amount_decimal?: string;
672
+ /**
673
+ * Total after (discounts and) taxes.
674
+ */
675
+ amount_total?: number;
777
676
  currency?: /**
778
677
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
779
678
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
@@ -836,26 +735,6 @@ declare namespace Components {
836
735
  * The sum of amounts of the price items by recurrence.
837
736
  */
838
737
  recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
839
- price_mappings?: /**
840
- * example:
841
- * [
842
- * {
843
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
844
- * "frequency_unit": "weekly",
845
- * "value": 1000.245,
846
- * "name": "avg consumption",
847
- * "metadata": {
848
- * "journey_title": "energy journey",
849
- * "step_name": "avg consumption picker"
850
- * }
851
- * }
852
- * ]
853
- */
854
- PriceInputMappings;
855
- /**
856
- * 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'.
857
- */
858
- on_request_approved?: boolean;
859
738
  /**
860
739
  * Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).
861
740
  */
@@ -867,7 +746,6 @@ declare namespace Components {
867
746
  * }
868
747
  */
869
748
  PriceItem[];
870
- total_details?: /* The total details with tax (and discount) aggregated totals. */ TotalDetails;
871
749
  }
872
750
  /**
873
751
  * Represents a composite price input to the pricing library.
@@ -878,22 +756,6 @@ declare namespace Components {
878
756
  * The quantity of products being purchased.
879
757
  */
880
758
  quantity?: number;
881
- price_mappings?: /**
882
- * example:
883
- * [
884
- * {
885
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
886
- * "frequency_unit": "weekly",
887
- * "value": 1000.245,
888
- * "name": "avg consumption",
889
- * "metadata": {
890
- * "journey_title": "energy journey",
891
- * "step_name": "avg consumption picker"
892
- * }
893
- * }
894
- * ]
895
- */
896
- PriceInputMappings;
897
759
  /**
898
760
  * An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
899
761
  */
@@ -927,10 +789,6 @@ declare namespace Components {
927
789
  */
928
790
  _product?: {
929
791
  [name: string]: any;
930
- /**
931
- * The description for the product
932
- */
933
- description?: string;
934
792
  /**
935
793
  * The product code
936
794
  */
@@ -1461,7 +1319,7 @@ declare namespace Components {
1461
1319
  *
1462
1320
  */
1463
1321
  OrderStatus;
1464
- line_items?: /* A valid set of product prices, quantities, (discounts) and taxes from a client. */ PriceItemsDto;
1322
+ line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
1465
1323
  /**
1466
1324
  * type of source, e.g. journey or manual
1467
1325
  * example:
@@ -1568,27 +1426,18 @@ declare namespace Components {
1568
1426
  */
1569
1427
  is_composite_price?: boolean;
1570
1428
  /**
1571
- * Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
1429
+ * Describes how to compute the price per period. Either `per_unit` or `tiered`.
1572
1430
  * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
1573
- * - `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.
1574
- * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
1575
- * - `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.
1576
1432
  *
1577
- */
1578
- pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
1579
- /**
1580
- * 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.
1581
1434
  *
1582
1435
  */
1583
- tiers?: PriceTier[];
1436
+ billing_scheme?: "per_unit";
1584
1437
  /**
1585
1438
  * A brief description of the price.
1586
1439
  */
1587
1440
  description?: string;
1588
- /**
1589
- * A detailed description of the price. This is shown on the order document and order table.
1590
- */
1591
- long_description?: string;
1592
1441
  /**
1593
1442
  * The default tax rate applicable to the product.
1594
1443
  * This field is deprecated, use the new `tax` attribute.
@@ -1612,6 +1461,7 @@ declare namespace Components {
1612
1461
  * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1613
1462
  * "type": "VAT",
1614
1463
  * "description": "Tax description",
1464
+ * "behavior": "Exclusive",
1615
1465
  * "active": "true",
1616
1466
  * "region": "DE",
1617
1467
  * "region_label": "Germany",
@@ -1627,9 +1477,15 @@ declare namespace Components {
1627
1477
  */
1628
1478
  Tax[];
1629
1479
  /**
1630
- * Specifies whether the price is considered `inclusive` of taxes or not.
1480
+ * Specifies whether the price is considered `inclusive` of taxes or `exclusive` of taxes.
1481
+ * One of `inclusive`, `exclusive`, or `unspecified`.
1482
+ *
1631
1483
  */
1632
- is_tax_inclusive?: boolean;
1484
+ tax_behavior?: "inclusive" | "exclusive";
1485
+ /**
1486
+ * Defines the tiered pricing type of the price.
1487
+ */
1488
+ tiers_mode?: "standard";
1633
1489
  /**
1634
1490
  * One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
1635
1491
  */
@@ -1700,7 +1556,7 @@ declare namespace Components {
1700
1556
  /**
1701
1557
  * The unit of measurement used for display purposes and possibly for calculations when the price is variable.
1702
1558
  */
1703
- unit?: /* The unit of measurement used for display purposes and possibly for calculations when the price is variable. */ ("kw" | "kwh" | "m" | "m2" | "l" | "cubic-meter" | "cubic-meter-h" | "ls" | "a" | "kva" | "w" | "wp" | "kwp") | string;
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;
1704
1560
  /**
1705
1561
  * The price creation date
1706
1562
  */
@@ -1742,57 +1598,6 @@ declare namespace Components {
1742
1598
  */
1743
1599
  _tags?: string[];
1744
1600
  }
1745
- /**
1746
- * example:
1747
- * {
1748
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
1749
- * "frequency_unit": "weekly",
1750
- * "value": 1000.245,
1751
- * "name": "avg consumption",
1752
- * "metadata": {
1753
- * "journey_title": "energy journey",
1754
- * "step_name": "avg consumption picker"
1755
- * }
1756
- * }
1757
- */
1758
- export interface PriceInputMapping {
1759
- price_id?: string;
1760
- frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time";
1761
- name?: string;
1762
- value?: number;
1763
- metadata?: {
1764
- [name: string]: string;
1765
- };
1766
- }
1767
- /**
1768
- * example:
1769
- * [
1770
- * {
1771
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
1772
- * "frequency_unit": "weekly",
1773
- * "value": 1000.245,
1774
- * "name": "avg consumption",
1775
- * "metadata": {
1776
- * "journey_title": "energy journey",
1777
- * "step_name": "avg consumption picker"
1778
- * }
1779
- * }
1780
- * ]
1781
- */
1782
- export type PriceInputMappings = /**
1783
- * example:
1784
- * {
1785
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
1786
- * "frequency_unit": "weekly",
1787
- * "value": 1000.245,
1788
- * "name": "avg consumption",
1789
- * "metadata": {
1790
- * "journey_title": "energy journey",
1791
- * "step_name": "avg consumption picker"
1792
- * }
1793
- * }
1794
- */
1795
- PriceInputMapping[];
1796
1601
  /**
1797
1602
  * Represents a price item
1798
1603
  * example:
@@ -1801,39 +1606,19 @@ declare namespace Components {
1801
1606
  * }
1802
1607
  */
1803
1608
  export interface PriceItem {
1804
- /**
1805
- * Total of all items before (discounts or) taxes are applied.
1806
- */
1807
- amount_subtotal?: number;
1808
- /**
1809
- * Total of all items before (discounts or) taxes are applied, as a string with all the decimal places.
1810
- */
1811
- amount_subtotal_decimal?: string;
1812
- /**
1813
- * Total of all items after (discounts and) taxes are applied.
1814
- */
1815
- amount_total?: number;
1816
- /**
1817
- * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
1818
- */
1819
- amount_total_decimal?: string;
1820
1609
  /**
1821
1610
  * price item id
1822
1611
  */
1823
- _id?: string;
1612
+ id?: string;
1824
1613
  metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
1825
1614
  /**
1826
1615
  * The unit amount value
1827
1616
  */
1828
1617
  unit_amount?: number;
1829
1618
  /**
1830
- * The unit gross amount value.
1619
+ * Total before any (discounts or) taxes are applied.
1831
1620
  */
1832
- unit_amount_gross?: number;
1833
- /**
1834
- * Total tax amount for this line item.
1835
- */
1836
- amount_tax?: number;
1621
+ amount_subtotal?: number;
1837
1622
  /**
1838
1623
  * Net unit amount without taxes or discounts.
1839
1624
  */
@@ -1842,6 +1627,10 @@ declare namespace Components {
1842
1627
  * The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
1843
1628
  */
1844
1629
  unit_amount_decimal?: string;
1630
+ /**
1631
+ * Total after (discounts and) taxes.
1632
+ */
1633
+ amount_total?: number;
1845
1634
  currency?: /**
1846
1635
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
1847
1636
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
@@ -1904,39 +1693,14 @@ declare namespace Components {
1904
1693
  * The sum of amounts of the price items by recurrence.
1905
1694
  */
1906
1695
  recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
1907
- price_mappings?: /**
1908
- * example:
1909
- * [
1910
- * {
1911
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
1912
- * "frequency_unit": "weekly",
1913
- * "value": 1000.245,
1914
- * "name": "avg consumption",
1915
- * "metadata": {
1916
- * "journey_title": "energy journey",
1917
- * "step_name": "avg consumption picker"
1918
- * }
1919
- * }
1920
- * ]
1921
- */
1922
- PriceInputMappings;
1923
- /**
1924
- * 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'.
1925
- */
1926
- on_request_approved?: boolean;
1927
1696
  /**
1928
1697
  * One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
1929
1698
  */
1930
1699
  type?: "one_time" | "recurring";
1931
1700
  /**
1932
- * Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
1933
- * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
1934
- * - `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.
1935
- * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
1936
- * - `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.
1937
- *
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'.
1938
1702
  */
1939
- pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
1703
+ on_request_approved?: boolean;
1940
1704
  }
1941
1705
  /**
1942
1706
  * Represents a price input to the pricing library.
@@ -1947,22 +1711,6 @@ declare namespace Components {
1947
1711
  * The quantity of products being purchased.
1948
1712
  */
1949
1713
  quantity?: number;
1950
- price_mappings?: /**
1951
- * example:
1952
- * [
1953
- * {
1954
- * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
1955
- * "frequency_unit": "weekly",
1956
- * "value": 1000.245,
1957
- * "name": "avg consumption",
1958
- * "metadata": {
1959
- * "journey_title": "energy journey",
1960
- * "step_name": "avg consumption picker"
1961
- * }
1962
- * }
1963
- * ]
1964
- */
1965
- PriceInputMappings;
1966
1714
  /**
1967
1715
  * An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
1968
1716
  */
@@ -1996,10 +1744,6 @@ declare namespace Components {
1996
1744
  */
1997
1745
  _product?: {
1998
1746
  [name: string]: any;
1999
- /**
2000
- * The description for the product
2001
- */
2002
- description?: string;
2003
1747
  /**
2004
1748
  * The product code
2005
1749
  */
@@ -2086,31 +1830,10 @@ declare namespace Components {
2086
1830
  * The unit amount value
2087
1831
  */
2088
1832
  unit_amount?: number;
2089
- /**
2090
- * The unit gross amount value.
2091
- */
2092
- unit_amount_gross?: number;
2093
- unit_amount_currency?: /**
2094
- * Three-letter ISO currency code, in lowercase. Must be a supported currency.
2095
- * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
2096
- *
2097
- * example:
2098
- * EUR
2099
- */
2100
- Currency;
2101
1833
  /**
2102
1834
  * The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
2103
1835
  */
2104
1836
  unit_amount_decimal?: string;
2105
- /**
2106
- * Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
2107
- * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
2108
- * - `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.
2109
- * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
2110
- * - `tiered_flatfee` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
2111
- *
2112
- */
2113
- pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
2114
1837
  /**
2115
1838
  * The snapshot of the price linked to the price item.
2116
1839
  * example:
@@ -2129,27 +1852,18 @@ declare namespace Components {
2129
1852
  */
2130
1853
  is_composite_price?: boolean;
2131
1854
  /**
2132
- * Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
1855
+ * Describes how to compute the price per period. Either `per_unit` or `tiered`.
2133
1856
  * - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
2134
- * - `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.
2135
- * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
2136
- * - `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.
2137
1858
  *
2138
- */
2139
- pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
2140
- /**
2141
- * 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.
2142
1860
  *
2143
1861
  */
2144
- tiers?: PriceTier[];
1862
+ billing_scheme?: "per_unit";
2145
1863
  /**
2146
1864
  * A brief description of the price.
2147
1865
  */
2148
1866
  description?: string;
2149
- /**
2150
- * A detailed description of the price. This is shown on the order document and order table.
2151
- */
2152
- long_description?: string;
2153
1867
  /**
2154
1868
  * The default tax rate applicable to the product.
2155
1869
  * This field is deprecated, use the new `tax` attribute.
@@ -2173,6 +1887,7 @@ declare namespace Components {
2173
1887
  * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2174
1888
  * "type": "VAT",
2175
1889
  * "description": "Tax description",
1890
+ * "behavior": "Exclusive",
2176
1891
  * "active": "true",
2177
1892
  * "region": "DE",
2178
1893
  * "region_label": "Germany",
@@ -2188,9 +1903,15 @@ declare namespace Components {
2188
1903
  */
2189
1904
  Tax[];
2190
1905
  /**
2191
- * Specifies whether the price is considered `inclusive` of taxes or not.
1906
+ * Specifies whether the price is considered `inclusive` of taxes or `exclusive` of taxes.
1907
+ * One of `inclusive`, `exclusive`, or `unspecified`.
1908
+ *
2192
1909
  */
2193
- is_tax_inclusive?: boolean;
1910
+ tax_behavior?: "inclusive" | "exclusive";
1911
+ /**
1912
+ * Defines the tiered pricing type of the price.
1913
+ */
1914
+ tiers_mode?: "standard";
2194
1915
  /**
2195
1916
  * One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
2196
1917
  */
@@ -2261,7 +1982,7 @@ declare namespace Components {
2261
1982
  /**
2262
1983
  * The unit of measurement used for display purposes and possibly for calculations when the price is variable.
2263
1984
  */
2264
- unit?: /* The unit of measurement used for display purposes and possibly for calculations when the price is variable. */ ("kw" | "kwh" | "m" | "m2" | "l" | "cubic-meter" | "cubic-meter-h" | "ls" | "a" | "kva" | "w" | "wp" | "kwp") | string;
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;
2265
1986
  /**
2266
1987
  * The price creation date
2267
1988
  */
@@ -2309,16 +2030,7 @@ declare namespace Components {
2309
2030
  /**
2310
2031
  * A valid set of product prices, quantities, (discounts) and taxes from a client.
2311
2032
  */
2312
- export type PriceItemsDto = (/* Represents a price input to the pricing library. */ PriceItemDto | /* Represents a composite price input to the pricing library. */ CompositePriceItemDto)[];
2313
- export interface PriceTier {
2314
- up_to?: number | null;
2315
- flat_fee_amount?: number;
2316
- flat_fee_amount_decimal?: string;
2317
- unit_amount?: number;
2318
- unit_amount_decimal?: string;
2319
- display_mode?: PriceTierDisplayMode;
2320
- }
2321
- export type PriceTierDisplayMode = "hidden" | "on_request";
2033
+ export type PriceItemsDto = (/* Represents a price input to the pricing library. */ PriceItemDto)[];
2322
2034
  /**
2323
2035
  * The result from the calculation of a set of price items.
2324
2036
  */
@@ -2330,14 +2042,7 @@ declare namespace Components {
2330
2042
  * "$ref": "#/components/examples/price-item"
2331
2043
  * }
2332
2044
  */
2333
- PriceItem | /**
2334
- * Represents a composite price input to the pricing library.
2335
- * example:
2336
- * {
2337
- * "$ref": "#/components/examples/price-item"
2338
- * }
2339
- */
2340
- CompositePriceItem)[];
2045
+ PriceItem)[];
2341
2046
  /**
2342
2047
  * Total of all items before (discounts or) taxes are applied.
2343
2048
  */
@@ -2346,23 +2051,7 @@ declare namespace Components {
2346
2051
  * Total of all items after (discounts and) taxes are applied.
2347
2052
  */
2348
2053
  amount_total?: number;
2349
- /**
2350
- * The unit gross amount value.
2351
- */
2352
- unit_amount_gross?: number;
2353
- /**
2354
- * This is the sum of all the price item tax amounts.
2355
- */
2356
- amount_tax?: number;
2357
2054
  total_details?: /* The total details with tax (and discount) aggregated totals. */ TotalDetails;
2358
- currency?: /**
2359
- * Three-letter ISO currency code, in lowercase. Must be a supported currency.
2360
- * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
2361
- *
2362
- * example:
2363
- * EUR
2364
- */
2365
- Currency;
2366
2055
  }
2367
2056
  /**
2368
2057
  * The product entity
@@ -2373,10 +2062,6 @@ declare namespace Components {
2373
2062
  */
2374
2063
  export interface Product {
2375
2064
  [name: string]: any;
2376
- /**
2377
- * The description for the product
2378
- */
2379
- description?: string;
2380
2065
  /**
2381
2066
  * The product code
2382
2067
  */
@@ -2459,22 +2144,6 @@ declare namespace Components {
2459
2144
  * An amount associated with a specific recurrence.
2460
2145
  */
2461
2146
  export interface RecurrenceAmount {
2462
- /**
2463
- * Total of all items before (discounts or) taxes are applied.
2464
- */
2465
- amount_subtotal: number;
2466
- /**
2467
- * Total of all items before (discounts or) taxes are applied, as a string with all the decimal places.
2468
- */
2469
- amount_subtotal_decimal: string;
2470
- /**
2471
- * Total of all items after (discounts and) taxes are applied.
2472
- */
2473
- amount_total: number;
2474
- /**
2475
- * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
2476
- */
2477
- amount_total_decimal: string;
2478
2147
  /**
2479
2148
  * The price type.
2480
2149
  */
@@ -2482,44 +2151,24 @@ declare namespace Components {
2482
2151
  /**
2483
2152
  * The price billing period.
2484
2153
  */
2485
- billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
2154
+ billing_period?: string;
2155
+ /**
2156
+ * Total of all items, with same recurrence, before (discounts or) taxes are applied.
2157
+ */
2158
+ amount_subtotal: number;
2486
2159
  /**
2487
- * The unit gross amount value.
2160
+ * Total of all items, with same recurrence, after (discounts and) taxes are applied.
2488
2161
  */
2489
- unit_amount_gross?: number;
2162
+ amount_total: number;
2490
2163
  /**
2491
2164
  * Total of all items taxes, with same recurrence.
2492
2165
  */
2493
2166
  amount_tax?: number;
2494
- currency?: /**
2495
- * Three-letter ISO currency code, in lowercase. Must be a supported currency.
2496
- * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
2497
- *
2498
- * example:
2499
- * EUR
2500
- */
2501
- Currency;
2502
2167
  }
2503
2168
  /**
2504
2169
  * An amount associated with a specific recurrence.
2505
2170
  */
2506
2171
  export interface RecurrenceAmountDto {
2507
- /**
2508
- * Total of all items before (discounts or) taxes are applied.
2509
- */
2510
- amount_subtotal: number;
2511
- /**
2512
- * Total of all items before (discounts or) taxes are applied, as a string with all the decimal places.
2513
- */
2514
- amount_subtotal_decimal: string;
2515
- /**
2516
- * Total of all items after (discounts and) taxes are applied.
2517
- */
2518
- amount_total: number;
2519
- /**
2520
- * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
2521
- */
2522
- amount_total_decimal: string;
2523
2172
  /**
2524
2173
  * The price type.
2525
2174
  */
@@ -2527,11 +2176,15 @@ declare namespace Components {
2527
2176
  /**
2528
2177
  * The price billing period.
2529
2178
  */
2530
- billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
2179
+ billing_period?: string;
2531
2180
  /**
2532
- * The unit gross amount value.
2181
+ * Total of all items, with same recurrence, before (discounts or) taxes are applied.
2533
2182
  */
2534
- unit_amount_gross?: number;
2183
+ amount_subtotal: number;
2184
+ /**
2185
+ * Total of all items, with same recurrence, after (discounts and) taxes are applied.
2186
+ */
2187
+ amount_total: number;
2535
2188
  /**
2536
2189
  * Total of all items taxes, with same recurrence.
2537
2190
  */
@@ -2545,6 +2198,7 @@ declare namespace Components {
2545
2198
  * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2546
2199
  * "type": "VAT",
2547
2200
  * "description": "Tax description",
2201
+ * "behavior": "Exclusive",
2548
2202
  * "active": "true",
2549
2203
  * "region": "DE",
2550
2204
  * "region_label": "Germany",
@@ -2576,6 +2230,7 @@ declare namespace Components {
2576
2230
  type: "VAT" | "GST" | "Custom";
2577
2231
  description?: string;
2578
2232
  rate: number;
2233
+ behavior: "Exclusive" | "Inclusive" | "exclusive" | "inclusive";
2579
2234
  active?: boolean;
2580
2235
  region?: string;
2581
2236
  region_label?: string;
@@ -2610,6 +2265,7 @@ declare namespace Components {
2610
2265
  * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2611
2266
  * "type": "VAT",
2612
2267
  * "description": "Tax description",
2268
+ * "behavior": "Exclusive",
2613
2269
  * "active": "true",
2614
2270
  * "region": "DE",
2615
2271
  * "region_label": "Germany",
@@ -2660,6 +2316,7 @@ declare namespace Components {
2660
2316
  * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2661
2317
  * "type": "VAT",
2662
2318
  * "description": "Tax description",
2319
+ * "behavior": "Exclusive",
2663
2320
  * "active": "true",
2664
2321
  * "region": "DE",
2665
2322
  * "region_label": "Germany",
@@ -2706,49 +2363,6 @@ declare namespace Components {
2706
2363
  recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
2707
2364
  };
2708
2365
  }
2709
- /**
2710
- * The availability rule error
2711
- */
2712
- export interface ValidateAvailabilityFileError {
2713
- /**
2714
- * The line number where the error was found
2715
- */
2716
- line?: number;
2717
- /**
2718
- * The error message
2719
- */
2720
- msg: string;
2721
- /**
2722
- * Data related to the error
2723
- */
2724
- data?: string;
2725
- }
2726
- /**
2727
- * The availability map file result payload
2728
- * example:
2729
- * {
2730
- * "rules_parsed_count": 8,
2731
- * "errors": [
2732
- * "File must be UTF-8 encoded",
2733
- * "Error on line 3 - street_number must be of type number",
2734
- * "Error on line 6 - start_date cant be greater than end_date"
2735
- * ]
2736
- * }
2737
- */
2738
- export interface ValidateAvailabilityFileResult {
2739
- /**
2740
- * The status of the validation
2741
- */
2742
- status: "success" | "error";
2743
- /**
2744
- * The number of rules successfully parsed
2745
- */
2746
- rules_parsed_count: number;
2747
- /**
2748
- * The errors found on the file
2749
- */
2750
- errors: /* The availability rule error */ ValidateAvailabilityFileError[];
2751
- }
2752
2366
  }
2753
2367
  }
2754
2368
  declare namespace Paths {
@@ -2873,34 +2487,6 @@ declare namespace Paths {
2873
2487
  export type $400 = Components.Schemas.Error;
2874
2488
  }
2875
2489
  }
2876
- namespace $ValidateAvailabilityFile {
2877
- export interface HeaderParameters {
2878
- "X-Epilot-Org-ID": Parameters.XEpilotOrgID;
2879
- }
2880
- namespace Parameters {
2881
- export type Id = string;
2882
- export type XEpilotOrgID = string;
2883
- }
2884
- export interface PathParameters {
2885
- id: Parameters.Id;
2886
- }
2887
- namespace Responses {
2888
- export type $200 = /**
2889
- * The availability map file result payload
2890
- * example:
2891
- * {
2892
- * "rules_parsed_count": 8,
2893
- * "errors": [
2894
- * "File must be UTF-8 encoded",
2895
- * "Error on line 3 - street_number must be of type number",
2896
- * "Error on line 6 - start_date cant be greater than end_date"
2897
- * ]
2898
- * }
2899
- */
2900
- Components.Schemas.ValidateAvailabilityFileResult;
2901
- export type $400 = Components.Schemas.Error;
2902
- }
2903
- }
2904
2490
  namespace CreateOrder {
2905
2491
  export type RequestBody = /* Order Entity Payload */ Components.Schemas.OrderPayload;
2906
2492
  namespace Responses {
@@ -2999,16 +2585,6 @@ export interface OperationMethods {
2999
2585
  data?: Paths.$AvailabilityCheck.RequestBody,
3000
2586
  config?: AxiosRequestConfig
3001
2587
  ): OperationResponse<Paths.$AvailabilityCheck.Responses.$200>
3002
- /**
3003
- * $validateAvailabilityFile - validateAvailabilityFile
3004
- *
3005
- * Validates an availability file, it returns an array of errors if the file is invalid
3006
- */
3007
- '$validateAvailabilityFile'(
3008
- parameters?: Parameters<Paths.$ValidateAvailabilityFile.PathParameters & Paths.$ValidateAvailabilityFile.HeaderParameters> | null,
3009
- data?: any,
3010
- config?: AxiosRequestConfig
3011
- ): OperationResponse<Paths.$ValidateAvailabilityFile.Responses.$200>
3012
2588
  /**
3013
2589
  * $createOpportunity - createOpportunity
3014
2590
  *
@@ -3097,18 +2673,6 @@ export interface PathsDictionary {
3097
2673
  config?: AxiosRequestConfig
3098
2674
  ): OperationResponse<Paths.$AvailabilityCheck.Responses.$200>
3099
2675
  }
3100
- ['/v1/validate-availability/{id}']: {
3101
- /**
3102
- * $validateAvailabilityFile - validateAvailabilityFile
3103
- *
3104
- * Validates an availability file, it returns an array of errors if the file is invalid
3105
- */
3106
- 'get'(
3107
- parameters?: Parameters<Paths.$ValidateAvailabilityFile.PathParameters & Paths.$ValidateAvailabilityFile.HeaderParameters> | null,
3108
- data?: any,
3109
- config?: AxiosRequestConfig
3110
- ): OperationResponse<Paths.$ValidateAvailabilityFile.Responses.$200>
3111
- }
3112
2676
  ['/v1/public/opportunity']: {
3113
2677
  /**
3114
2678
  * $createOpportunity - createOpportunity