@epilot/pricing-client 3.14.1 → 3.15.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,6 +63,24 @@ 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
+ }
66
84
  /**
67
85
  * Availability check request payload
68
86
  */
@@ -165,6 +183,22 @@ declare namespace Components {
165
183
  * }
166
184
  */
167
185
  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;
168
202
  /**
169
203
  * price item id
170
204
  */
@@ -178,10 +212,6 @@ declare namespace Components {
178
212
  * The unit gross amount value.
179
213
  */
180
214
  unit_amount_gross?: number;
181
- /**
182
- * Total before any (discounts or) taxes are applied.
183
- */
184
- amount_subtotal?: number;
185
215
  /**
186
216
  * Total tax amount for this line item.
187
217
  */
@@ -194,10 +224,6 @@ declare namespace Components {
194
224
  * The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
195
225
  */
196
226
  unit_amount_decimal?: string;
197
- /**
198
- * Total after (discounts and) taxes.
199
- */
200
- amount_total?: number;
201
227
  currency?: /**
202
228
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
203
229
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
@@ -260,9 +286,6 @@ declare namespace Components {
260
286
  * The sum of amounts of the price items by recurrence.
261
287
  */
262
288
  recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
263
- /**
264
- * Price mapping information required to compute totals
265
- */
266
289
  price_mappings?: /**
267
290
  * example:
268
291
  * [
@@ -433,6 +456,22 @@ declare namespace Components {
433
456
  * Supports shopping for products and services until ready for checkout.
434
457
  */
435
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;
436
475
  /**
437
476
  * The cart identifier
438
477
  */
@@ -454,14 +493,6 @@ declare namespace Components {
454
493
  delivery_address?: Address;
455
494
  metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
456
495
  line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
457
- /**
458
- * Total of all items before (discounts or) taxes are applied.
459
- */
460
- amount_subtotal?: number;
461
- /**
462
- * Total of all items after (discounts and) taxes are applied.
463
- */
464
- amount_total?: number;
465
496
  total_details?: /* The total details with tax (and discount) aggregated totals. */ TotalDetails;
466
497
  created_at?: string; // date-time
467
498
  updated_at?: string; // date-time
@@ -702,6 +733,22 @@ declare namespace Components {
702
733
  * }
703
734
  */
704
735
  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;
705
752
  /**
706
753
  * price item id
707
754
  */
@@ -715,10 +762,6 @@ declare namespace Components {
715
762
  * The unit gross amount value.
716
763
  */
717
764
  unit_amount_gross?: number;
718
- /**
719
- * Total before any (discounts or) taxes are applied.
720
- */
721
- amount_subtotal?: number;
722
765
  /**
723
766
  * Total tax amount for this line item.
724
767
  */
@@ -731,10 +774,6 @@ declare namespace Components {
731
774
  * The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
732
775
  */
733
776
  unit_amount_decimal?: string;
734
- /**
735
- * Total after (discounts and) taxes.
736
- */
737
- amount_total?: number;
738
777
  currency?: /**
739
778
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
740
779
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
@@ -1762,6 +1801,22 @@ declare namespace Components {
1762
1801
  * }
1763
1802
  */
1764
1803
  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;
1765
1820
  /**
1766
1821
  * price item id
1767
1822
  */
@@ -1775,10 +1830,6 @@ declare namespace Components {
1775
1830
  * The unit gross amount value.
1776
1831
  */
1777
1832
  unit_amount_gross?: number;
1778
- /**
1779
- * Total before any (discounts or) taxes are applied.
1780
- */
1781
- amount_subtotal?: number;
1782
1833
  /**
1783
1834
  * Total tax amount for this line item.
1784
1835
  */
@@ -1791,10 +1842,6 @@ declare namespace Components {
1791
1842
  * The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
1792
1843
  */
1793
1844
  unit_amount_decimal?: string;
1794
- /**
1795
- * Total after (discounts and) taxes.
1796
- */
1797
- amount_total?: number;
1798
1845
  currency?: /**
1799
1846
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
1800
1847
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
package/dist/openapi.json CHANGED
@@ -2461,6 +2461,11 @@
2461
2461
  },
2462
2462
  "Cart": {
2463
2463
  "description": "Supports shopping for products and services until ready for checkout.",
2464
+ "allOf": [
2465
+ {
2466
+ "$ref": "#/components/schemas/Amounts"
2467
+ }
2468
+ ],
2464
2469
  "properties": {
2465
2470
  "id": {
2466
2471
  "type": "string",
@@ -2496,16 +2501,6 @@
2496
2501
  "line_items": {
2497
2502
  "$ref": "#/components/schemas/PriceItems"
2498
2503
  },
2499
- "amount_subtotal": {
2500
- "readOnly": true,
2501
- "type": "integer",
2502
- "description": "Total of all items before (discounts or) taxes are applied."
2503
- },
2504
- "amount_total": {
2505
- "readOnly": true,
2506
- "type": "integer",
2507
- "description": "Total of all items after (discounts and) taxes are applied."
2508
- },
2509
2504
  "total_details": {
2510
2505
  "$ref": "#/components/schemas/TotalDetails"
2511
2506
  },
@@ -2652,6 +2647,11 @@
2652
2647
  "example": {
2653
2648
  "$ref": "#/components/examples/price-item"
2654
2649
  },
2650
+ "allOf": [
2651
+ {
2652
+ "$ref": "#/components/schemas/Amounts"
2653
+ }
2654
+ ],
2655
2655
  "properties": {
2656
2656
  "_id": {
2657
2657
  "type": "string",
@@ -2671,11 +2671,6 @@
2671
2671
  "description": "The unit gross amount value.",
2672
2672
  "readOnly": true
2673
2673
  },
2674
- "amount_subtotal": {
2675
- "type": "integer",
2676
- "description": "Total before any (discounts or) taxes are applied.",
2677
- "readOnly": true
2678
- },
2679
2674
  "amount_tax": {
2680
2675
  "type": "integer",
2681
2676
  "description": "Total tax amount for this line item."
@@ -2689,11 +2684,6 @@
2689
2684
  "description": "The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.",
2690
2685
  "type": "string"
2691
2686
  },
2692
- "amount_total": {
2693
- "type": "integer",
2694
- "description": "Total after (discounts and) taxes.",
2695
- "readOnly": true
2696
- },
2697
2687
  "currency": {
2698
2688
  "$ref": "#/components/schemas/Currency"
2699
2689
  },
@@ -2765,6 +2755,27 @@
2765
2755
  }
2766
2756
  }
2767
2757
  },
2758
+ "Amounts": {
2759
+ "type": "object",
2760
+ "properties": {
2761
+ "amount_subtotal": {
2762
+ "type": "integer",
2763
+ "description": "Total of all items before (discounts or) taxes are applied."
2764
+ },
2765
+ "amount_subtotal_decimal": {
2766
+ "type": "string",
2767
+ "description": "Total of all items before (discounts or) taxes are applied, as a string with all the decimal places."
2768
+ },
2769
+ "amount_total": {
2770
+ "type": "integer",
2771
+ "description": "Total of all items after (discounts and) taxes are applied."
2772
+ },
2773
+ "amount_total_decimal": {
2774
+ "type": "string",
2775
+ "description": "Total of all items after (discounts and) taxes are applied, as a string with all the decimal places."
2776
+ }
2777
+ }
2778
+ },
2768
2779
  "PriceItem": {
2769
2780
  "allOf": [
2770
2781
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/pricing-client",
3
- "version": "3.14.1",
3
+ "version": "3.15.1",
4
4
  "description": "Client for epilot Pricing APIs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",