@epilot/pricing-client 3.7.1 → 3.9.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/client.d.ts +0 -0
- package/dist/client.js +0 -0
- package/dist/definition.d.ts +0 -0
- package/dist/definition.js +1 -1
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/dist/openapi-runtime.json +17 -0
- package/dist/openapi.d.ts +349 -40
- package/dist/openapi.json +464 -66
- package/package.json +1 -1
package/dist/openapi.d.ts
CHANGED
|
@@ -168,7 +168,7 @@ 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
|
|
@@ -252,6 +252,29 @@ declare namespace Components {
|
|
|
252
252
|
* The sum of amounts of the price items by recurrence.
|
|
253
253
|
*/
|
|
254
254
|
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
|
|
255
|
+
/**
|
|
256
|
+
* Price mapping information required to compute totals
|
|
257
|
+
*/
|
|
258
|
+
price_mappings?: /**
|
|
259
|
+
* example:
|
|
260
|
+
* [
|
|
261
|
+
* {
|
|
262
|
+
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
263
|
+
* "frequency_unit": "weekly",
|
|
264
|
+
* "value": 1000.245,
|
|
265
|
+
* "name": "avg consumption",
|
|
266
|
+
* "metadata": {
|
|
267
|
+
* "journey_title": "energy journey",
|
|
268
|
+
* "step_name": "avg consumption picker"
|
|
269
|
+
* }
|
|
270
|
+
* }
|
|
271
|
+
* ]
|
|
272
|
+
*/
|
|
273
|
+
PriceInputMappings;
|
|
274
|
+
/**
|
|
275
|
+
* 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'.
|
|
276
|
+
*/
|
|
277
|
+
on_request_approved?: boolean;
|
|
255
278
|
}
|
|
256
279
|
/**
|
|
257
280
|
* Represents a valid base price item from a client.
|
|
@@ -262,6 +285,25 @@ declare namespace Components {
|
|
|
262
285
|
* The quantity of products being purchased.
|
|
263
286
|
*/
|
|
264
287
|
quantity?: number;
|
|
288
|
+
/**
|
|
289
|
+
* Price mapping information required to compute totals
|
|
290
|
+
*/
|
|
291
|
+
price_mappings?: /**
|
|
292
|
+
* example:
|
|
293
|
+
* [
|
|
294
|
+
* {
|
|
295
|
+
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
296
|
+
* "frequency_unit": "weekly",
|
|
297
|
+
* "value": 1000.245,
|
|
298
|
+
* "name": "avg consumption",
|
|
299
|
+
* "metadata": {
|
|
300
|
+
* "journey_title": "energy journey",
|
|
301
|
+
* "step_name": "avg consumption picker"
|
|
302
|
+
* }
|
|
303
|
+
* }
|
|
304
|
+
* ]
|
|
305
|
+
*/
|
|
306
|
+
PriceInputMappings;
|
|
265
307
|
/**
|
|
266
308
|
* An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
|
|
267
309
|
*/
|
|
@@ -295,6 +337,10 @@ declare namespace Components {
|
|
|
295
337
|
*/
|
|
296
338
|
_product?: {
|
|
297
339
|
[name: string]: any;
|
|
340
|
+
/**
|
|
341
|
+
* The description for the product
|
|
342
|
+
*/
|
|
343
|
+
description?: string;
|
|
298
344
|
/**
|
|
299
345
|
* The product code
|
|
300
346
|
*/
|
|
@@ -651,7 +697,7 @@ declare namespace Components {
|
|
|
651
697
|
/**
|
|
652
698
|
* price item id
|
|
653
699
|
*/
|
|
654
|
-
|
|
700
|
+
_id?: string;
|
|
655
701
|
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
656
702
|
/**
|
|
657
703
|
* The unit amount value
|
|
@@ -735,6 +781,26 @@ declare namespace Components {
|
|
|
735
781
|
* The sum of amounts of the price items by recurrence.
|
|
736
782
|
*/
|
|
737
783
|
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
|
|
784
|
+
price_mappings?: /**
|
|
785
|
+
* example:
|
|
786
|
+
* [
|
|
787
|
+
* {
|
|
788
|
+
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
789
|
+
* "frequency_unit": "weekly",
|
|
790
|
+
* "value": 1000.245,
|
|
791
|
+
* "name": "avg consumption",
|
|
792
|
+
* "metadata": {
|
|
793
|
+
* "journey_title": "energy journey",
|
|
794
|
+
* "step_name": "avg consumption picker"
|
|
795
|
+
* }
|
|
796
|
+
* }
|
|
797
|
+
* ]
|
|
798
|
+
*/
|
|
799
|
+
PriceInputMappings;
|
|
800
|
+
/**
|
|
801
|
+
* 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'.
|
|
802
|
+
*/
|
|
803
|
+
on_request_approved?: boolean;
|
|
738
804
|
/**
|
|
739
805
|
* Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).
|
|
740
806
|
*/
|
|
@@ -746,6 +812,7 @@ declare namespace Components {
|
|
|
746
812
|
* }
|
|
747
813
|
*/
|
|
748
814
|
PriceItem[];
|
|
815
|
+
total_details?: /* The total details with tax (and discount) aggregated totals. */ TotalDetails;
|
|
749
816
|
}
|
|
750
817
|
/**
|
|
751
818
|
* Represents a composite price input to the pricing library.
|
|
@@ -756,6 +823,22 @@ declare namespace Components {
|
|
|
756
823
|
* The quantity of products being purchased.
|
|
757
824
|
*/
|
|
758
825
|
quantity?: number;
|
|
826
|
+
price_mappings?: /**
|
|
827
|
+
* example:
|
|
828
|
+
* [
|
|
829
|
+
* {
|
|
830
|
+
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
831
|
+
* "frequency_unit": "weekly",
|
|
832
|
+
* "value": 1000.245,
|
|
833
|
+
* "name": "avg consumption",
|
|
834
|
+
* "metadata": {
|
|
835
|
+
* "journey_title": "energy journey",
|
|
836
|
+
* "step_name": "avg consumption picker"
|
|
837
|
+
* }
|
|
838
|
+
* }
|
|
839
|
+
* ]
|
|
840
|
+
*/
|
|
841
|
+
PriceInputMappings;
|
|
759
842
|
/**
|
|
760
843
|
* An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
|
|
761
844
|
*/
|
|
@@ -789,6 +872,10 @@ declare namespace Components {
|
|
|
789
872
|
*/
|
|
790
873
|
_product?: {
|
|
791
874
|
[name: string]: any;
|
|
875
|
+
/**
|
|
876
|
+
* The description for the product
|
|
877
|
+
*/
|
|
878
|
+
description?: string;
|
|
792
879
|
/**
|
|
793
880
|
* The product code
|
|
794
881
|
*/
|
|
@@ -1319,7 +1406,7 @@ declare namespace Components {
|
|
|
1319
1406
|
*
|
|
1320
1407
|
*/
|
|
1321
1408
|
OrderStatus;
|
|
1322
|
-
line_items?: /*
|
|
1409
|
+
line_items?: /* A valid set of product prices, quantities, (discounts) and taxes from a client. */ PriceItemsDto;
|
|
1323
1410
|
/**
|
|
1324
1411
|
* type of source, e.g. journey or manual
|
|
1325
1412
|
* example:
|
|
@@ -1426,18 +1513,27 @@ declare namespace Components {
|
|
|
1426
1513
|
*/
|
|
1427
1514
|
is_composite_price?: boolean;
|
|
1428
1515
|
/**
|
|
1429
|
-
* Describes how to compute the price per period. Either `per_unit` or `
|
|
1516
|
+
* Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
|
|
1430
1517
|
* - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
|
|
1431
|
-
* - `
|
|
1518
|
+
* - `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.
|
|
1519
|
+
* - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
|
|
1520
|
+
* - `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.
|
|
1432
1521
|
*
|
|
1433
|
-
|
|
1522
|
+
*/
|
|
1523
|
+
pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
|
|
1524
|
+
/**
|
|
1525
|
+
* Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.
|
|
1434
1526
|
*
|
|
1435
1527
|
*/
|
|
1436
|
-
|
|
1528
|
+
tiers?: PriceTier[];
|
|
1437
1529
|
/**
|
|
1438
1530
|
* A brief description of the price.
|
|
1439
1531
|
*/
|
|
1440
1532
|
description?: string;
|
|
1533
|
+
/**
|
|
1534
|
+
* A detailed description of the price. This is shown on the order document and order table.
|
|
1535
|
+
*/
|
|
1536
|
+
long_description?: string;
|
|
1441
1537
|
/**
|
|
1442
1538
|
* The default tax rate applicable to the product.
|
|
1443
1539
|
* This field is deprecated, use the new `tax` attribute.
|
|
@@ -1461,7 +1557,6 @@ declare namespace Components {
|
|
|
1461
1557
|
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1462
1558
|
* "type": "VAT",
|
|
1463
1559
|
* "description": "Tax description",
|
|
1464
|
-
* "behavior": "Exclusive",
|
|
1465
1560
|
* "active": "true",
|
|
1466
1561
|
* "region": "DE",
|
|
1467
1562
|
* "region_label": "Germany",
|
|
@@ -1477,15 +1572,9 @@ declare namespace Components {
|
|
|
1477
1572
|
*/
|
|
1478
1573
|
Tax[];
|
|
1479
1574
|
/**
|
|
1480
|
-
* Specifies whether the price is considered `inclusive` of taxes or
|
|
1481
|
-
* One of `inclusive`, `exclusive`, or `unspecified`.
|
|
1482
|
-
*
|
|
1575
|
+
* Specifies whether the price is considered `inclusive` of taxes or not.
|
|
1483
1576
|
*/
|
|
1484
|
-
|
|
1485
|
-
/**
|
|
1486
|
-
* Defines the tiered pricing type of the price.
|
|
1487
|
-
*/
|
|
1488
|
-
tiers_mode?: "standard";
|
|
1577
|
+
is_tax_inclusive?: boolean;
|
|
1489
1578
|
/**
|
|
1490
1579
|
* One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
|
|
1491
1580
|
*/
|
|
@@ -1556,7 +1645,7 @@ declare namespace Components {
|
|
|
1556
1645
|
/**
|
|
1557
1646
|
* The unit of measurement used for display purposes and possibly for calculations when the price is variable.
|
|
1558
1647
|
*/
|
|
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;
|
|
1648
|
+
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;
|
|
1560
1649
|
/**
|
|
1561
1650
|
* The price creation date
|
|
1562
1651
|
*/
|
|
@@ -1598,6 +1687,57 @@ declare namespace Components {
|
|
|
1598
1687
|
*/
|
|
1599
1688
|
_tags?: string[];
|
|
1600
1689
|
}
|
|
1690
|
+
/**
|
|
1691
|
+
* example:
|
|
1692
|
+
* {
|
|
1693
|
+
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
1694
|
+
* "frequency_unit": "weekly",
|
|
1695
|
+
* "value": 1000.245,
|
|
1696
|
+
* "name": "avg consumption",
|
|
1697
|
+
* "metadata": {
|
|
1698
|
+
* "journey_title": "energy journey",
|
|
1699
|
+
* "step_name": "avg consumption picker"
|
|
1700
|
+
* }
|
|
1701
|
+
* }
|
|
1702
|
+
*/
|
|
1703
|
+
export interface PriceInputMapping {
|
|
1704
|
+
price_id?: string;
|
|
1705
|
+
frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time";
|
|
1706
|
+
name?: string;
|
|
1707
|
+
value?: number;
|
|
1708
|
+
metadata?: {
|
|
1709
|
+
[name: string]: string;
|
|
1710
|
+
};
|
|
1711
|
+
}
|
|
1712
|
+
/**
|
|
1713
|
+
* example:
|
|
1714
|
+
* [
|
|
1715
|
+
* {
|
|
1716
|
+
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
1717
|
+
* "frequency_unit": "weekly",
|
|
1718
|
+
* "value": 1000.245,
|
|
1719
|
+
* "name": "avg consumption",
|
|
1720
|
+
* "metadata": {
|
|
1721
|
+
* "journey_title": "energy journey",
|
|
1722
|
+
* "step_name": "avg consumption picker"
|
|
1723
|
+
* }
|
|
1724
|
+
* }
|
|
1725
|
+
* ]
|
|
1726
|
+
*/
|
|
1727
|
+
export type PriceInputMappings = /**
|
|
1728
|
+
* example:
|
|
1729
|
+
* {
|
|
1730
|
+
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
1731
|
+
* "frequency_unit": "weekly",
|
|
1732
|
+
* "value": 1000.245,
|
|
1733
|
+
* "name": "avg consumption",
|
|
1734
|
+
* "metadata": {
|
|
1735
|
+
* "journey_title": "energy journey",
|
|
1736
|
+
* "step_name": "avg consumption picker"
|
|
1737
|
+
* }
|
|
1738
|
+
* }
|
|
1739
|
+
*/
|
|
1740
|
+
PriceInputMapping[];
|
|
1601
1741
|
/**
|
|
1602
1742
|
* Represents a price item
|
|
1603
1743
|
* example:
|
|
@@ -1609,7 +1749,7 @@ declare namespace Components {
|
|
|
1609
1749
|
/**
|
|
1610
1750
|
* price item id
|
|
1611
1751
|
*/
|
|
1612
|
-
|
|
1752
|
+
_id?: string;
|
|
1613
1753
|
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
1614
1754
|
/**
|
|
1615
1755
|
* The unit amount value
|
|
@@ -1693,14 +1833,39 @@ declare namespace Components {
|
|
|
1693
1833
|
* The sum of amounts of the price items by recurrence.
|
|
1694
1834
|
*/
|
|
1695
1835
|
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
|
|
1836
|
+
price_mappings?: /**
|
|
1837
|
+
* example:
|
|
1838
|
+
* [
|
|
1839
|
+
* {
|
|
1840
|
+
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
1841
|
+
* "frequency_unit": "weekly",
|
|
1842
|
+
* "value": 1000.245,
|
|
1843
|
+
* "name": "avg consumption",
|
|
1844
|
+
* "metadata": {
|
|
1845
|
+
* "journey_title": "energy journey",
|
|
1846
|
+
* "step_name": "avg consumption picker"
|
|
1847
|
+
* }
|
|
1848
|
+
* }
|
|
1849
|
+
* ]
|
|
1850
|
+
*/
|
|
1851
|
+
PriceInputMappings;
|
|
1852
|
+
/**
|
|
1853
|
+
* 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'.
|
|
1854
|
+
*/
|
|
1855
|
+
on_request_approved?: boolean;
|
|
1696
1856
|
/**
|
|
1697
1857
|
* One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
|
|
1698
1858
|
*/
|
|
1699
1859
|
type?: "one_time" | "recurring";
|
|
1700
1860
|
/**
|
|
1701
|
-
*
|
|
1861
|
+
* Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
|
|
1862
|
+
* - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
|
|
1863
|
+
* - `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.
|
|
1864
|
+
* - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
|
|
1865
|
+
* - `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.
|
|
1866
|
+
*
|
|
1702
1867
|
*/
|
|
1703
|
-
|
|
1868
|
+
pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
|
|
1704
1869
|
}
|
|
1705
1870
|
/**
|
|
1706
1871
|
* Represents a price input to the pricing library.
|
|
@@ -1711,6 +1876,22 @@ declare namespace Components {
|
|
|
1711
1876
|
* The quantity of products being purchased.
|
|
1712
1877
|
*/
|
|
1713
1878
|
quantity?: number;
|
|
1879
|
+
price_mappings?: /**
|
|
1880
|
+
* example:
|
|
1881
|
+
* [
|
|
1882
|
+
* {
|
|
1883
|
+
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
1884
|
+
* "frequency_unit": "weekly",
|
|
1885
|
+
* "value": 1000.245,
|
|
1886
|
+
* "name": "avg consumption",
|
|
1887
|
+
* "metadata": {
|
|
1888
|
+
* "journey_title": "energy journey",
|
|
1889
|
+
* "step_name": "avg consumption picker"
|
|
1890
|
+
* }
|
|
1891
|
+
* }
|
|
1892
|
+
* ]
|
|
1893
|
+
*/
|
|
1894
|
+
PriceInputMappings;
|
|
1714
1895
|
/**
|
|
1715
1896
|
* An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
|
|
1716
1897
|
*/
|
|
@@ -1744,6 +1925,10 @@ declare namespace Components {
|
|
|
1744
1925
|
*/
|
|
1745
1926
|
_product?: {
|
|
1746
1927
|
[name: string]: any;
|
|
1928
|
+
/**
|
|
1929
|
+
* The description for the product
|
|
1930
|
+
*/
|
|
1931
|
+
description?: string;
|
|
1747
1932
|
/**
|
|
1748
1933
|
* The product code
|
|
1749
1934
|
*/
|
|
@@ -1830,10 +2015,27 @@ declare namespace Components {
|
|
|
1830
2015
|
* The unit amount value
|
|
1831
2016
|
*/
|
|
1832
2017
|
unit_amount?: number;
|
|
2018
|
+
unit_amount_currency?: /**
|
|
2019
|
+
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
2020
|
+
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
2021
|
+
*
|
|
2022
|
+
* example:
|
|
2023
|
+
* EUR
|
|
2024
|
+
*/
|
|
2025
|
+
Currency;
|
|
1833
2026
|
/**
|
|
1834
2027
|
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
1835
2028
|
*/
|
|
1836
2029
|
unit_amount_decimal?: string;
|
|
2030
|
+
/**
|
|
2031
|
+
* Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
|
|
2032
|
+
* - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
|
|
2033
|
+
* - `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.
|
|
2034
|
+
* - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
|
|
2035
|
+
* - `tiered_flatfee` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
|
|
2036
|
+
*
|
|
2037
|
+
*/
|
|
2038
|
+
pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
|
|
1837
2039
|
/**
|
|
1838
2040
|
* The snapshot of the price linked to the price item.
|
|
1839
2041
|
* example:
|
|
@@ -1852,18 +2054,27 @@ declare namespace Components {
|
|
|
1852
2054
|
*/
|
|
1853
2055
|
is_composite_price?: boolean;
|
|
1854
2056
|
/**
|
|
1855
|
-
* Describes how to compute the price per period. Either `per_unit` or `
|
|
2057
|
+
* Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
|
|
1856
2058
|
* - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
|
|
1857
|
-
* - `
|
|
2059
|
+
* - `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.
|
|
2060
|
+
* - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
|
|
2061
|
+
* - `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.
|
|
1858
2062
|
*
|
|
1859
|
-
|
|
2063
|
+
*/
|
|
2064
|
+
pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
|
|
2065
|
+
/**
|
|
2066
|
+
* Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.
|
|
1860
2067
|
*
|
|
1861
2068
|
*/
|
|
1862
|
-
|
|
2069
|
+
tiers?: PriceTier[];
|
|
1863
2070
|
/**
|
|
1864
2071
|
* A brief description of the price.
|
|
1865
2072
|
*/
|
|
1866
2073
|
description?: string;
|
|
2074
|
+
/**
|
|
2075
|
+
* A detailed description of the price. This is shown on the order document and order table.
|
|
2076
|
+
*/
|
|
2077
|
+
long_description?: string;
|
|
1867
2078
|
/**
|
|
1868
2079
|
* The default tax rate applicable to the product.
|
|
1869
2080
|
* This field is deprecated, use the new `tax` attribute.
|
|
@@ -1887,7 +2098,6 @@ declare namespace Components {
|
|
|
1887
2098
|
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1888
2099
|
* "type": "VAT",
|
|
1889
2100
|
* "description": "Tax description",
|
|
1890
|
-
* "behavior": "Exclusive",
|
|
1891
2101
|
* "active": "true",
|
|
1892
2102
|
* "region": "DE",
|
|
1893
2103
|
* "region_label": "Germany",
|
|
@@ -1903,15 +2113,9 @@ declare namespace Components {
|
|
|
1903
2113
|
*/
|
|
1904
2114
|
Tax[];
|
|
1905
2115
|
/**
|
|
1906
|
-
* Specifies whether the price is considered `inclusive` of taxes or
|
|
1907
|
-
* One of `inclusive`, `exclusive`, or `unspecified`.
|
|
1908
|
-
*
|
|
1909
|
-
*/
|
|
1910
|
-
tax_behavior?: "inclusive" | "exclusive";
|
|
1911
|
-
/**
|
|
1912
|
-
* Defines the tiered pricing type of the price.
|
|
2116
|
+
* Specifies whether the price is considered `inclusive` of taxes or not.
|
|
1913
2117
|
*/
|
|
1914
|
-
|
|
2118
|
+
is_tax_inclusive?: boolean;
|
|
1915
2119
|
/**
|
|
1916
2120
|
* One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
|
|
1917
2121
|
*/
|
|
@@ -1982,7 +2186,7 @@ declare namespace Components {
|
|
|
1982
2186
|
/**
|
|
1983
2187
|
* The unit of measurement used for display purposes and possibly for calculations when the price is variable.
|
|
1984
2188
|
*/
|
|
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;
|
|
2189
|
+
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;
|
|
1986
2190
|
/**
|
|
1987
2191
|
* The price creation date
|
|
1988
2192
|
*/
|
|
@@ -2030,7 +2234,16 @@ declare namespace Components {
|
|
|
2030
2234
|
/**
|
|
2031
2235
|
* A valid set of product prices, quantities, (discounts) and taxes from a client.
|
|
2032
2236
|
*/
|
|
2033
|
-
export type PriceItemsDto = (/* Represents a price input to the pricing library. */ PriceItemDto)[];
|
|
2237
|
+
export type PriceItemsDto = (/* Represents a price input to the pricing library. */ PriceItemDto | /* Represents a composite price input to the pricing library. */ CompositePriceItemDto)[];
|
|
2238
|
+
export interface PriceTier {
|
|
2239
|
+
up_to?: number | null;
|
|
2240
|
+
flat_fee_amount?: number;
|
|
2241
|
+
flat_fee_amount_decimal?: string;
|
|
2242
|
+
unit_amount?: number;
|
|
2243
|
+
unit_amount_decimal?: string;
|
|
2244
|
+
display_mode?: PriceTierDisplayMode;
|
|
2245
|
+
}
|
|
2246
|
+
export type PriceTierDisplayMode = "hidden" | "on_request";
|
|
2034
2247
|
/**
|
|
2035
2248
|
* The result from the calculation of a set of price items.
|
|
2036
2249
|
*/
|
|
@@ -2042,7 +2255,14 @@ declare namespace Components {
|
|
|
2042
2255
|
* "$ref": "#/components/examples/price-item"
|
|
2043
2256
|
* }
|
|
2044
2257
|
*/
|
|
2045
|
-
PriceItem
|
|
2258
|
+
PriceItem | /**
|
|
2259
|
+
* Represents a composite price input to the pricing library.
|
|
2260
|
+
* example:
|
|
2261
|
+
* {
|
|
2262
|
+
* "$ref": "#/components/examples/price-item"
|
|
2263
|
+
* }
|
|
2264
|
+
*/
|
|
2265
|
+
CompositePriceItem)[];
|
|
2046
2266
|
/**
|
|
2047
2267
|
* Total of all items before (discounts or) taxes are applied.
|
|
2048
2268
|
*/
|
|
@@ -2062,6 +2282,10 @@ declare namespace Components {
|
|
|
2062
2282
|
*/
|
|
2063
2283
|
export interface Product {
|
|
2064
2284
|
[name: string]: any;
|
|
2285
|
+
/**
|
|
2286
|
+
* The description for the product
|
|
2287
|
+
*/
|
|
2288
|
+
description?: string;
|
|
2065
2289
|
/**
|
|
2066
2290
|
* The product code
|
|
2067
2291
|
*/
|
|
@@ -2198,7 +2422,6 @@ declare namespace Components {
|
|
|
2198
2422
|
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
2199
2423
|
* "type": "VAT",
|
|
2200
2424
|
* "description": "Tax description",
|
|
2201
|
-
* "behavior": "Exclusive",
|
|
2202
2425
|
* "active": "true",
|
|
2203
2426
|
* "region": "DE",
|
|
2204
2427
|
* "region_label": "Germany",
|
|
@@ -2230,7 +2453,6 @@ declare namespace Components {
|
|
|
2230
2453
|
type: "VAT" | "GST" | "Custom";
|
|
2231
2454
|
description?: string;
|
|
2232
2455
|
rate: number;
|
|
2233
|
-
behavior: "Exclusive" | "Inclusive" | "exclusive" | "inclusive";
|
|
2234
2456
|
active?: boolean;
|
|
2235
2457
|
region?: string;
|
|
2236
2458
|
region_label?: string;
|
|
@@ -2265,7 +2487,6 @@ declare namespace Components {
|
|
|
2265
2487
|
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
2266
2488
|
* "type": "VAT",
|
|
2267
2489
|
* "description": "Tax description",
|
|
2268
|
-
* "behavior": "Exclusive",
|
|
2269
2490
|
* "active": "true",
|
|
2270
2491
|
* "region": "DE",
|
|
2271
2492
|
* "region_label": "Germany",
|
|
@@ -2316,7 +2537,6 @@ declare namespace Components {
|
|
|
2316
2537
|
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
2317
2538
|
* "type": "VAT",
|
|
2318
2539
|
* "description": "Tax description",
|
|
2319
|
-
* "behavior": "Exclusive",
|
|
2320
2540
|
* "active": "true",
|
|
2321
2541
|
* "region": "DE",
|
|
2322
2542
|
* "region_label": "Germany",
|
|
@@ -2363,6 +2583,45 @@ declare namespace Components {
|
|
|
2363
2583
|
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
|
|
2364
2584
|
};
|
|
2365
2585
|
}
|
|
2586
|
+
/**
|
|
2587
|
+
* The availability rule error
|
|
2588
|
+
*/
|
|
2589
|
+
export interface ValidateAvailabilityFileError {
|
|
2590
|
+
/**
|
|
2591
|
+
* The line number where the error was found
|
|
2592
|
+
*/
|
|
2593
|
+
line?: number;
|
|
2594
|
+
/**
|
|
2595
|
+
* The error message
|
|
2596
|
+
*/
|
|
2597
|
+
msg: string;
|
|
2598
|
+
}
|
|
2599
|
+
/**
|
|
2600
|
+
* The availability map file result payload
|
|
2601
|
+
* example:
|
|
2602
|
+
* {
|
|
2603
|
+
* "rules_parsed_count": 8,
|
|
2604
|
+
* "errors": [
|
|
2605
|
+
* "File must be UTF-8 encoded",
|
|
2606
|
+
* "Error on line 3 - street_number must be of type number",
|
|
2607
|
+
* "Error on line 6 - start_date cant be greater than end_date"
|
|
2608
|
+
* ]
|
|
2609
|
+
* }
|
|
2610
|
+
*/
|
|
2611
|
+
export interface ValidateAvailabilityFileResult {
|
|
2612
|
+
/**
|
|
2613
|
+
* The status of the validation
|
|
2614
|
+
*/
|
|
2615
|
+
status: "success" | "error";
|
|
2616
|
+
/**
|
|
2617
|
+
* The number of rules successfully parsed
|
|
2618
|
+
*/
|
|
2619
|
+
rules_parsed_count: number;
|
|
2620
|
+
/**
|
|
2621
|
+
* The errors found on the file
|
|
2622
|
+
*/
|
|
2623
|
+
errors: /* The availability rule error */ ValidateAvailabilityFileError[];
|
|
2624
|
+
}
|
|
2366
2625
|
}
|
|
2367
2626
|
}
|
|
2368
2627
|
declare namespace Paths {
|
|
@@ -2487,6 +2746,34 @@ declare namespace Paths {
|
|
|
2487
2746
|
export type $400 = Components.Schemas.Error;
|
|
2488
2747
|
}
|
|
2489
2748
|
}
|
|
2749
|
+
namespace $ValidateAvailabilityFile {
|
|
2750
|
+
export interface HeaderParameters {
|
|
2751
|
+
"X-Epilot-Org-ID": Parameters.XEpilotOrgID;
|
|
2752
|
+
}
|
|
2753
|
+
namespace Parameters {
|
|
2754
|
+
export type Id = string;
|
|
2755
|
+
export type XEpilotOrgID = string;
|
|
2756
|
+
}
|
|
2757
|
+
export interface PathParameters {
|
|
2758
|
+
id: Parameters.Id;
|
|
2759
|
+
}
|
|
2760
|
+
namespace Responses {
|
|
2761
|
+
export type $200 = /**
|
|
2762
|
+
* The availability map file result payload
|
|
2763
|
+
* example:
|
|
2764
|
+
* {
|
|
2765
|
+
* "rules_parsed_count": 8,
|
|
2766
|
+
* "errors": [
|
|
2767
|
+
* "File must be UTF-8 encoded",
|
|
2768
|
+
* "Error on line 3 - street_number must be of type number",
|
|
2769
|
+
* "Error on line 6 - start_date cant be greater than end_date"
|
|
2770
|
+
* ]
|
|
2771
|
+
* }
|
|
2772
|
+
*/
|
|
2773
|
+
Components.Schemas.ValidateAvailabilityFileResult;
|
|
2774
|
+
export type $400 = Components.Schemas.Error;
|
|
2775
|
+
}
|
|
2776
|
+
}
|
|
2490
2777
|
namespace CreateOrder {
|
|
2491
2778
|
export type RequestBody = /* Order Entity Payload */ Components.Schemas.OrderPayload;
|
|
2492
2779
|
namespace Responses {
|
|
@@ -2585,6 +2872,16 @@ export interface OperationMethods {
|
|
|
2585
2872
|
data?: Paths.$AvailabilityCheck.RequestBody,
|
|
2586
2873
|
config?: AxiosRequestConfig
|
|
2587
2874
|
): OperationResponse<Paths.$AvailabilityCheck.Responses.$200>
|
|
2875
|
+
/**
|
|
2876
|
+
* $validateAvailabilityFile - validateAvailabilityFile
|
|
2877
|
+
*
|
|
2878
|
+
* Validates an availability file, it returns an array of errors if the file is invalid
|
|
2879
|
+
*/
|
|
2880
|
+
'$validateAvailabilityFile'(
|
|
2881
|
+
parameters?: Parameters<Paths.$ValidateAvailabilityFile.PathParameters & Paths.$ValidateAvailabilityFile.HeaderParameters> | null,
|
|
2882
|
+
data?: any,
|
|
2883
|
+
config?: AxiosRequestConfig
|
|
2884
|
+
): OperationResponse<Paths.$ValidateAvailabilityFile.Responses.$200>
|
|
2588
2885
|
/**
|
|
2589
2886
|
* $createOpportunity - createOpportunity
|
|
2590
2887
|
*
|
|
@@ -2673,6 +2970,18 @@ export interface PathsDictionary {
|
|
|
2673
2970
|
config?: AxiosRequestConfig
|
|
2674
2971
|
): OperationResponse<Paths.$AvailabilityCheck.Responses.$200>
|
|
2675
2972
|
}
|
|
2973
|
+
['/v1/validate-availability/{id}']: {
|
|
2974
|
+
/**
|
|
2975
|
+
* $validateAvailabilityFile - validateAvailabilityFile
|
|
2976
|
+
*
|
|
2977
|
+
* Validates an availability file, it returns an array of errors if the file is invalid
|
|
2978
|
+
*/
|
|
2979
|
+
'get'(
|
|
2980
|
+
parameters?: Parameters<Paths.$ValidateAvailabilityFile.PathParameters & Paths.$ValidateAvailabilityFile.HeaderParameters> | null,
|
|
2981
|
+
data?: any,
|
|
2982
|
+
config?: AxiosRequestConfig
|
|
2983
|
+
): OperationResponse<Paths.$ValidateAvailabilityFile.Responses.$200>
|
|
2984
|
+
}
|
|
2676
2985
|
['/v1/public/opportunity']: {
|
|
2677
2986
|
/**
|
|
2678
2987
|
* $createOpportunity - createOpportunity
|