@epilot/pricing-client 3.16.2 → 3.17.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
  */
@@ -91,20 +73,6 @@ declare namespace Components {
91
73
  products: string[];
92
74
  filters: /* Availability filters dimensions */ AvailabilityFilters;
93
75
  }
94
- export interface AvailabilityDate {
95
- /**
96
- * The availability interval start date
97
- * example:
98
- * 2017-07-21
99
- */
100
- available_start_date?: string; // date
101
- /**
102
- * The availability interval end date
103
- * example:
104
- * 2017-07-21
105
- */
106
- available_end_date?: string; // date
107
- }
108
76
  /**
109
77
  * Availability filters dimensions
110
78
  */
@@ -183,39 +151,19 @@ declare namespace Components {
183
151
  * }
184
152
  */
185
153
  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
154
  /**
203
155
  * price item id
204
156
  */
205
- _id?: string;
157
+ id?: string;
206
158
  metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
207
159
  /**
208
160
  * The unit amount value
209
161
  */
210
162
  unit_amount?: number;
211
163
  /**
212
- * The unit gross amount value.
164
+ * Total before any (discounts or) taxes are applied.
213
165
  */
214
- unit_amount_gross?: number;
215
- /**
216
- * Total tax amount for this line item.
217
- */
218
- amount_tax?: number;
166
+ amount_subtotal?: number;
219
167
  /**
220
168
  * Net unit amount without taxes or discounts.
221
169
  */
@@ -224,6 +172,10 @@ declare namespace Components {
224
172
  * The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
225
173
  */
226
174
  unit_amount_decimal?: string;
175
+ /**
176
+ * Total after (discounts and) taxes.
177
+ */
178
+ amount_total?: number;
227
179
  currency?: /**
228
180
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
229
181
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
@@ -286,26 +238,6 @@ declare namespace Components {
286
238
  * The sum of amounts of the price items by recurrence.
287
239
  */
288
240
  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
241
  }
310
242
  /**
311
243
  * Represents a valid base price item from a client.
@@ -316,25 +248,6 @@ declare namespace Components {
316
248
  * The quantity of products being purchased.
317
249
  */
318
250
  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
251
  /**
339
252
  * An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
340
253
  */
@@ -368,10 +281,6 @@ declare namespace Components {
368
281
  */
369
282
  _product?: {
370
283
  [name: string]: any;
371
- /**
372
- * The description for the product
373
- */
374
- description?: string;
375
284
  /**
376
285
  * The product code
377
286
  */
@@ -451,52 +360,7 @@ declare namespace Components {
451
360
  _updated_at?: string;
452
361
  };
453
362
  }
454
- export type BillingPeriod = "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
455
- /**
456
- * Supports shopping for products and services until ready for checkout.
457
- */
458
- 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
- /**
476
- * The cart identifier
477
- */
478
- id?: string;
479
- /**
480
- * The user's Organization Id the cart belongs to
481
- */
482
- org_id?: string;
483
- /**
484
- * The status of the Cart:
485
- * - open - the cart checkout is still in progress. Payment processing has not started
486
- * - complete - the cart checkout is complete. Payment processing may still be in progress
487
- * - expired - the cart checkout has expired. No further processing will occur
488
- *
489
- */
490
- status?: "open" | "complete" | "expired";
491
- customer?: Customer;
492
- billing_address?: Address;
493
- delivery_address?: Address;
494
- metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
495
- line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
496
- total_details?: /* The total details with tax (and discount) aggregated totals. */ TotalDetails;
497
- created_at?: string; // date-time
498
- updated_at?: string; // date-time
499
- }
363
+ export type BillingPeriod = "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time";
500
364
  /**
501
365
  * A valid cart payload from a client.
502
366
  */
@@ -733,39 +597,19 @@ declare namespace Components {
733
597
  * }
734
598
  */
735
599
  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
600
  /**
753
601
  * price item id
754
602
  */
755
- _id?: string;
603
+ id?: string;
756
604
  metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
757
605
  /**
758
606
  * The unit amount value
759
607
  */
760
608
  unit_amount?: number;
761
609
  /**
762
- * The unit gross amount value.
763
- */
764
- unit_amount_gross?: number;
765
- /**
766
- * Total tax amount for this line item.
610
+ * Total before any (discounts or) taxes are applied.
767
611
  */
768
- amount_tax?: number;
612
+ amount_subtotal?: number;
769
613
  /**
770
614
  * Net unit amount without taxes or discounts.
771
615
  */
@@ -774,6 +618,10 @@ declare namespace Components {
774
618
  * The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
775
619
  */
776
620
  unit_amount_decimal?: string;
621
+ /**
622
+ * Total after (discounts and) taxes.
623
+ */
624
+ amount_total?: number;
777
625
  currency?: /**
778
626
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
779
627
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
@@ -836,26 +684,6 @@ declare namespace Components {
836
684
  * The sum of amounts of the price items by recurrence.
837
685
  */
838
686
  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
687
  /**
860
688
  * Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).
861
689
  */
@@ -867,160 +695,6 @@ declare namespace Components {
867
695
  * }
868
696
  */
869
697
  PriceItem[];
870
- total_details?: /* The total details with tax (and discount) aggregated totals. */ TotalDetails;
871
- }
872
- /**
873
- * Represents a composite price input to the pricing library.
874
- */
875
- export interface CompositePriceItemDto {
876
- metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
877
- /**
878
- * The quantity of products being purchased.
879
- */
880
- 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
- /**
898
- * An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
899
- */
900
- description?: string;
901
- /**
902
- * The id of the product.
903
- */
904
- product_id?: string;
905
- /**
906
- * The id of the price.
907
- */
908
- price_id?: string;
909
- /**
910
- * The taxes applied to the price item.
911
- */
912
- taxes?: (/* A valid tax rate from a client. */ TaxAmountDto)[];
913
- /**
914
- * The taxes applied to the price item.
915
- */
916
- recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmountDto)[];
917
- /**
918
- * The flag for prices that contain price components.
919
- */
920
- is_composite_price?: boolean;
921
- /**
922
- * The snapshot of the product.
923
- * example:
924
- * {
925
- * "$ref": "#/components/examples/product"
926
- * }
927
- */
928
- _product?: {
929
- [name: string]: any;
930
- /**
931
- * The description for the product
932
- */
933
- description?: string;
934
- /**
935
- * The product code
936
- */
937
- code?: string;
938
- /**
939
- * The type of Product:
940
- *
941
- * | type | description |
942
- * |----| ----|
943
- * | `product` | Represents a physical good |
944
- * | `service` | Represents a service or virtual product |
945
- *
946
- */
947
- type?: "product" | "service";
948
- /**
949
- * The product main name
950
- */
951
- name?: string;
952
- feature?: {
953
- /**
954
- * An arbitrary set of tags attached to a feature
955
- */
956
- _tags?: string[];
957
- feature?: string;
958
- }[];
959
- /**
960
- * Stores references to products that can be cross sold with the current product.
961
- */
962
- cross_sellable_products?: {
963
- $relation?: EntityRelation[];
964
- };
965
- /**
966
- * Stores references to a set of file images of the product
967
- */
968
- product_images?: {
969
- $relation?: EntityRelation[];
970
- };
971
- /**
972
- * Stores references to a set of files downloadable from the product.
973
- * e.g: tech specifications, quality control sheets, privacy policy agreements
974
- *
975
- */
976
- product_downloads?: {
977
- $relation?: EntityRelation[];
978
- };
979
- /**
980
- * A set of [prices](/api/pricing#tag/simple_price_schema) or [composite prices](/api/pricing#tag/dynamic_price_schema) for the current product.
981
- */
982
- price_options?: {
983
- $relation?: EntityRelation[];
984
- };
985
- /**
986
- * Stores references to the availability files that define where this product is available.
987
- * These files are used when interacting with products via epilot Journeys, thought the AvailabilityCheck block.
988
- *
989
- */
990
- _availability_files?: File[];
991
- /**
992
- * The product id
993
- */
994
- _id?: string;
995
- /**
996
- * The autogenerated product title
997
- */
998
- _title?: string;
999
- /**
1000
- * The organization id the product belongs to
1001
- */
1002
- _org_id?: string;
1003
- /**
1004
- * The product creation date
1005
- */
1006
- _created_at?: string;
1007
- /**
1008
- * The product last update date
1009
- */
1010
- _updated_at?: string;
1011
- };
1012
- /**
1013
- * Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).
1014
- */
1015
- item_components?: /* Represents a price input to the pricing library. */ PriceItemDto[];
1016
- _price?: /**
1017
- * The price entity schema for dynamic pricing
1018
- * example:
1019
- * {
1020
- * "$ref": "#/components/examples/composite-price"
1021
- * }
1022
- */
1023
- CompositePrice;
1024
698
  }
1025
699
  /**
1026
700
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
@@ -1042,35 +716,6 @@ declare namespace Components {
1042
716
  phone?: string;
1043
717
  }
1044
718
  export type EntityId = string; // uuid
1045
- /**
1046
- * example:
1047
- * {
1048
- * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1049
- * "_org": "123",
1050
- * "_schema": "contact",
1051
- * "_tags": [
1052
- * "example",
1053
- * "mock"
1054
- * ],
1055
- * "_created_at": "2021-02-09T12:41:43.662Z",
1056
- * "_updated_at": "2021-02-09T12:41:43.662Z"
1057
- * }
1058
- */
1059
- export interface EntityItem {
1060
- _id: EntityId /* uuid */;
1061
- /**
1062
- * Title of entity
1063
- */
1064
- _title: string;
1065
- /**
1066
- * Organization Id the entity belongs to
1067
- */
1068
- _org: string;
1069
- _schema: string;
1070
- _tags?: string[];
1071
- _created_at: string; // date-time
1072
- _updated_at: string; // date-time
1073
- }
1074
719
  export interface EntityRelation {
1075
720
  [name: string]: any;
1076
721
  entity_id?: string;
@@ -1461,7 +1106,7 @@ declare namespace Components {
1461
1106
  *
1462
1107
  */
1463
1108
  OrderStatus;
1464
- line_items?: /* A valid set of product prices, quantities, (discounts) and taxes from a client. */ PriceItemsDto;
1109
+ line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
1465
1110
  /**
1466
1111
  * type of source, e.g. journey or manual
1467
1112
  * example:
@@ -1568,27 +1213,18 @@ declare namespace Components {
1568
1213
  */
1569
1214
  is_composite_price?: boolean;
1570
1215
  /**
1571
- * Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
1216
+ * Describes how to compute the price per period. Either `per_unit` or `tiered`.
1572
1217
  * - `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.
1218
+ * - `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.
1576
1219
  *
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.
1220
+ * ⚠️ Tiered pricing is **not supported** yet.
1581
1221
  *
1582
1222
  */
1583
- tiers?: PriceTier[];
1223
+ billing_scheme?: "per_unit";
1584
1224
  /**
1585
1225
  * A brief description of the price.
1586
1226
  */
1587
1227
  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
1228
  /**
1593
1229
  * The default tax rate applicable to the product.
1594
1230
  * This field is deprecated, use the new `tax` attribute.
@@ -1612,6 +1248,7 @@ declare namespace Components {
1612
1248
  * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1613
1249
  * "type": "VAT",
1614
1250
  * "description": "Tax description",
1251
+ * "behavior": "Exclusive",
1615
1252
  * "active": "true",
1616
1253
  * "region": "DE",
1617
1254
  * "region_label": "Germany",
@@ -1627,9 +1264,15 @@ declare namespace Components {
1627
1264
  */
1628
1265
  Tax[];
1629
1266
  /**
1630
- * Specifies whether the price is considered `inclusive` of taxes or not.
1267
+ * Specifies whether the price is considered `inclusive` of taxes or `exclusive` of taxes.
1268
+ * One of `inclusive`, `exclusive`, or `unspecified`.
1269
+ *
1270
+ */
1271
+ tax_behavior?: "inclusive" | "exclusive";
1272
+ /**
1273
+ * Defines the tiered pricing type of the price.
1631
1274
  */
1632
- is_tax_inclusive?: boolean;
1275
+ tiers_mode?: "standard";
1633
1276
  /**
1634
1277
  * One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
1635
1278
  */
@@ -1700,7 +1343,7 @@ declare namespace Components {
1700
1343
  /**
1701
1344
  * The unit of measurement used for display purposes and possibly for calculations when the price is variable.
1702
1345
  */
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;
1346
+ 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
1347
  /**
1705
1348
  * The price creation date
1706
1349
  */
@@ -1742,57 +1385,6 @@ declare namespace Components {
1742
1385
  */
1743
1386
  _tags?: string[];
1744
1387
  }
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
1388
  /**
1797
1389
  * Represents a price item
1798
1390
  * example:
@@ -1801,39 +1393,19 @@ declare namespace Components {
1801
1393
  * }
1802
1394
  */
1803
1395
  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
1396
  /**
1821
1397
  * price item id
1822
1398
  */
1823
- _id?: string;
1399
+ id?: string;
1824
1400
  metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
1825
1401
  /**
1826
1402
  * The unit amount value
1827
1403
  */
1828
1404
  unit_amount?: number;
1829
1405
  /**
1830
- * The unit gross amount value.
1831
- */
1832
- unit_amount_gross?: number;
1833
- /**
1834
- * Total tax amount for this line item.
1406
+ * Total before any (discounts or) taxes are applied.
1835
1407
  */
1836
- amount_tax?: number;
1408
+ amount_subtotal?: number;
1837
1409
  /**
1838
1410
  * Net unit amount without taxes or discounts.
1839
1411
  */
@@ -1842,6 +1414,10 @@ declare namespace Components {
1842
1414
  * The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
1843
1415
  */
1844
1416
  unit_amount_decimal?: string;
1417
+ /**
1418
+ * Total after (discounts and) taxes.
1419
+ */
1420
+ amount_total?: number;
1845
1421
  currency?: /**
1846
1422
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
1847
1423
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
@@ -1904,39 +1480,14 @@ declare namespace Components {
1904
1480
  * The sum of amounts of the price items by recurrence.
1905
1481
  */
1906
1482
  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
1483
  /**
1928
1484
  * One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
1929
1485
  */
1930
1486
  type?: "one_time" | "recurring";
1931
1487
  /**
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
- *
1488
+ * 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
1489
  */
1939
- pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
1490
+ on_request_approved?: boolean;
1940
1491
  }
1941
1492
  /**
1942
1493
  * Represents a price input to the pricing library.
@@ -1947,22 +1498,6 @@ declare namespace Components {
1947
1498
  * The quantity of products being purchased.
1948
1499
  */
1949
1500
  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
1501
  /**
1967
1502
  * An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
1968
1503
  */
@@ -1996,10 +1531,6 @@ declare namespace Components {
1996
1531
  */
1997
1532
  _product?: {
1998
1533
  [name: string]: any;
1999
- /**
2000
- * The description for the product
2001
- */
2002
- description?: string;
2003
1534
  /**
2004
1535
  * The product code
2005
1536
  */
@@ -2086,31 +1617,10 @@ declare namespace Components {
2086
1617
  * The unit amount value
2087
1618
  */
2088
1619
  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
1620
  /**
2102
1621
  * The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
2103
1622
  */
2104
1623
  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
1624
  /**
2115
1625
  * The snapshot of the price linked to the price item.
2116
1626
  * example:
@@ -2129,27 +1639,18 @@ declare namespace Components {
2129
1639
  */
2130
1640
  is_composite_price?: boolean;
2131
1641
  /**
2132
- * Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
1642
+ * Describes how to compute the price per period. Either `per_unit` or `tiered`.
2133
1643
  * - `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.
1644
+ * - `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.
2137
1645
  *
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.
1646
+ * ⚠️ Tiered pricing is **not supported** yet.
2142
1647
  *
2143
1648
  */
2144
- tiers?: PriceTier[];
1649
+ billing_scheme?: "per_unit";
2145
1650
  /**
2146
1651
  * A brief description of the price.
2147
1652
  */
2148
1653
  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
1654
  /**
2154
1655
  * The default tax rate applicable to the product.
2155
1656
  * This field is deprecated, use the new `tax` attribute.
@@ -2173,6 +1674,7 @@ declare namespace Components {
2173
1674
  * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2174
1675
  * "type": "VAT",
2175
1676
  * "description": "Tax description",
1677
+ * "behavior": "Exclusive",
2176
1678
  * "active": "true",
2177
1679
  * "region": "DE",
2178
1680
  * "region_label": "Germany",
@@ -2188,9 +1690,15 @@ declare namespace Components {
2188
1690
  */
2189
1691
  Tax[];
2190
1692
  /**
2191
- * Specifies whether the price is considered `inclusive` of taxes or not.
1693
+ * Specifies whether the price is considered `inclusive` of taxes or `exclusive` of taxes.
1694
+ * One of `inclusive`, `exclusive`, or `unspecified`.
1695
+ *
2192
1696
  */
2193
- is_tax_inclusive?: boolean;
1697
+ tax_behavior?: "inclusive" | "exclusive";
1698
+ /**
1699
+ * Defines the tiered pricing type of the price.
1700
+ */
1701
+ tiers_mode?: "standard";
2194
1702
  /**
2195
1703
  * One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
2196
1704
  */
@@ -2261,7 +1769,7 @@ declare namespace Components {
2261
1769
  /**
2262
1770
  * The unit of measurement used for display purposes and possibly for calculations when the price is variable.
2263
1771
  */
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;
1772
+ 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
1773
  /**
2266
1774
  * The price creation date
2267
1775
  */
@@ -2309,61 +1817,7 @@ declare namespace Components {
2309
1817
  /**
2310
1818
  * A valid set of product prices, quantities, (discounts) and taxes from a client.
2311
1819
  */
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";
2322
- /**
2323
- * The result from the calculation of a set of price items.
2324
- */
2325
- export interface PricingDetails {
2326
- items?: (/**
2327
- * Represents a price item
2328
- * example:
2329
- * {
2330
- * "$ref": "#/components/examples/price-item"
2331
- * }
2332
- */
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)[];
2341
- /**
2342
- * Total of all items before (discounts or) taxes are applied.
2343
- */
2344
- amount_subtotal?: number;
2345
- /**
2346
- * Total of all items after (discounts and) taxes are applied.
2347
- */
2348
- 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
- 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
- }
1820
+ export type PriceItemsDto = (/* Represents a price input to the pricing library. */ PriceItemDto)[];
2367
1821
  /**
2368
1822
  * The product entity
2369
1823
  * example:
@@ -2373,10 +1827,6 @@ declare namespace Components {
2373
1827
  */
2374
1828
  export interface Product {
2375
1829
  [name: string]: any;
2376
- /**
2377
- * The description for the product
2378
- */
2379
- description?: string;
2380
1830
  /**
2381
1831
  * The product code
2382
1832
  */
@@ -2459,22 +1909,6 @@ declare namespace Components {
2459
1909
  * An amount associated with a specific recurrence.
2460
1910
  */
2461
1911
  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
1912
  /**
2479
1913
  * The price type.
2480
1914
  */
@@ -2482,44 +1916,24 @@ declare namespace Components {
2482
1916
  /**
2483
1917
  * The price billing period.
2484
1918
  */
2485
- billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
1919
+ billing_period?: string;
1920
+ /**
1921
+ * Total of all items, with same recurrence, before (discounts or) taxes are applied.
1922
+ */
1923
+ amount_subtotal: number;
2486
1924
  /**
2487
- * The unit gross amount value.
1925
+ * Total of all items, with same recurrence, after (discounts and) taxes are applied.
2488
1926
  */
2489
- unit_amount_gross?: number;
1927
+ amount_total: number;
2490
1928
  /**
2491
1929
  * Total of all items taxes, with same recurrence.
2492
1930
  */
2493
1931
  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
1932
  }
2503
1933
  /**
2504
1934
  * An amount associated with a specific recurrence.
2505
1935
  */
2506
1936
  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
1937
  /**
2524
1938
  * The price type.
2525
1939
  */
@@ -2527,11 +1941,15 @@ declare namespace Components {
2527
1941
  /**
2528
1942
  * The price billing period.
2529
1943
  */
2530
- billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
1944
+ billing_period?: string;
1945
+ /**
1946
+ * Total of all items, with same recurrence, before (discounts or) taxes are applied.
1947
+ */
1948
+ amount_subtotal: number;
2531
1949
  /**
2532
- * The unit gross amount value.
1950
+ * Total of all items, with same recurrence, after (discounts and) taxes are applied.
2533
1951
  */
2534
- unit_amount_gross?: number;
1952
+ amount_total: number;
2535
1953
  /**
2536
1954
  * Total of all items taxes, with same recurrence.
2537
1955
  */
@@ -2545,6 +1963,7 @@ declare namespace Components {
2545
1963
  * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2546
1964
  * "type": "VAT",
2547
1965
  * "description": "Tax description",
1966
+ * "behavior": "Exclusive",
2548
1967
  * "active": "true",
2549
1968
  * "region": "DE",
2550
1969
  * "region_label": "Germany",
@@ -2576,6 +1995,7 @@ declare namespace Components {
2576
1995
  type: "VAT" | "GST" | "Custom";
2577
1996
  description?: string;
2578
1997
  rate: number;
1998
+ behavior: "Exclusive" | "Inclusive" | "exclusive" | "inclusive";
2579
1999
  active?: boolean;
2580
2000
  region?: string;
2581
2001
  region_label?: string;
@@ -2610,6 +2030,7 @@ declare namespace Components {
2610
2030
  * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2611
2031
  * "type": "VAT",
2612
2032
  * "description": "Tax description",
2033
+ * "behavior": "Exclusive",
2613
2034
  * "active": "true",
2614
2035
  * "region": "DE",
2615
2036
  * "region_label": "Germany",
@@ -2660,6 +2081,7 @@ declare namespace Components {
2660
2081
  * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2661
2082
  * "type": "VAT",
2662
2083
  * "description": "Tax description",
2084
+ * "behavior": "Exclusive",
2663
2085
  * "active": "true",
2664
2086
  * "region": "DE",
2665
2087
  * "region_label": "Germany",
@@ -2706,49 +2128,6 @@ declare namespace Components {
2706
2128
  recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
2707
2129
  };
2708
2130
  }
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
2131
  }
2753
2132
  }
2754
2133
  declare namespace Paths {
@@ -2873,34 +2252,6 @@ declare namespace Paths {
2873
2252
  export type $400 = Components.Schemas.Error;
2874
2253
  }
2875
2254
  }
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
2255
  namespace CreateOrder {
2905
2256
  export type RequestBody = /* Order Entity Payload */ Components.Schemas.OrderPayload;
2906
2257
  namespace Responses {
@@ -2999,16 +2350,6 @@ export interface OperationMethods {
2999
2350
  data?: Paths.$AvailabilityCheck.RequestBody,
3000
2351
  config?: AxiosRequestConfig
3001
2352
  ): 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
2353
  /**
3013
2354
  * $createOpportunity - createOpportunity
3014
2355
  *
@@ -3097,18 +2438,6 @@ export interface PathsDictionary {
3097
2438
  config?: AxiosRequestConfig
3098
2439
  ): OperationResponse<Paths.$AvailabilityCheck.Responses.$200>
3099
2440
  }
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
2441
  ['/v1/public/opportunity']: {
3113
2442
  /**
3114
2443
  * $createOpportunity - createOpportunity