@epilot/pricing-client 3.15.0 → 3.15.2

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
@@ -2413,21 +2460,29 @@ declare namespace Components {
2413
2460
  */
2414
2461
  export interface RecurrenceAmount {
2415
2462
  /**
2416
- * The price type.
2463
+ * Total of all items before (discounts or) taxes are applied.
2417
2464
  */
2418
- type?: string;
2465
+ amount_subtotal: number;
2419
2466
  /**
2420
- * The price billing period.
2467
+ * Total of all items before (discounts or) taxes are applied, as a string with all the decimal places.
2421
2468
  */
2422
- billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
2469
+ amount_subtotal_decimal: string;
2423
2470
  /**
2424
- * Total of all items, with same recurrence, before (discounts or) taxes are applied.
2471
+ * Total of all items after (discounts and) taxes are applied.
2425
2472
  */
2426
- amount_subtotal: number;
2473
+ amount_total: number;
2427
2474
  /**
2428
- * Total of all items, with same recurrence, after (discounts and) taxes are applied.
2475
+ * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
2429
2476
  */
2430
- amount_total: number;
2477
+ amount_total_decimal: string;
2478
+ /**
2479
+ * The price type.
2480
+ */
2481
+ type?: string;
2482
+ /**
2483
+ * The price billing period.
2484
+ */
2485
+ billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
2431
2486
  /**
2432
2487
  * The unit gross amount value.
2433
2488
  */
@@ -2436,9 +2491,6 @@ declare namespace Components {
2436
2491
  * Total of all items taxes, with same recurrence.
2437
2492
  */
2438
2493
  amount_tax?: number;
2439
- /**
2440
- * Currency
2441
- */
2442
2494
  currency?: /**
2443
2495
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
2444
2496
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
@@ -2453,21 +2505,29 @@ declare namespace Components {
2453
2505
  */
2454
2506
  export interface RecurrenceAmountDto {
2455
2507
  /**
2456
- * The price type.
2508
+ * Total of all items before (discounts or) taxes are applied.
2457
2509
  */
2458
- type?: string;
2510
+ amount_subtotal: number;
2459
2511
  /**
2460
- * The price billing period.
2512
+ * Total of all items before (discounts or) taxes are applied, as a string with all the decimal places.
2461
2513
  */
2462
- billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
2514
+ amount_subtotal_decimal?: string;
2463
2515
  /**
2464
- * Total of all items, with same recurrence, before (discounts or) taxes are applied.
2516
+ * Total of all items after (discounts and) taxes are applied.
2465
2517
  */
2466
- amount_subtotal: number;
2518
+ amount_total: number;
2467
2519
  /**
2468
- * Total of all items, with same recurrence, after (discounts and) taxes are applied.
2520
+ * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
2469
2521
  */
2470
- amount_total: number;
2522
+ amount_total_decimal?: string;
2523
+ /**
2524
+ * The price type.
2525
+ */
2526
+ type?: string;
2527
+ /**
2528
+ * The price billing period.
2529
+ */
2530
+ billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
2471
2531
  /**
2472
2532
  * The unit gross amount value.
2473
2533
  */
package/dist/openapi.json CHANGED
@@ -2421,6 +2421,11 @@
2421
2421
  "RecurrenceAmountDto": {
2422
2422
  "type": "object",
2423
2423
  "description": "An amount associated with a specific recurrence.",
2424
+ "allOf": [
2425
+ {
2426
+ "$ref": "#/components/schemas/Amounts"
2427
+ }
2428
+ ],
2424
2429
  "properties": {
2425
2430
  "type": {
2426
2431
  "type": "string",
@@ -2437,14 +2442,6 @@
2437
2442
  "yearly"
2438
2443
  ]
2439
2444
  },
2440
- "amount_subtotal": {
2441
- "type": "integer",
2442
- "description": "Total of all items, with same recurrence, before (discounts or) taxes are applied."
2443
- },
2444
- "amount_total": {
2445
- "type": "integer",
2446
- "description": "Total of all items, with same recurrence, after (discounts and) taxes are applied."
2447
- },
2448
2445
  "unit_amount_gross": {
2449
2446
  "type": "integer",
2450
2447
  "description": "The unit gross amount value."
@@ -2461,6 +2458,11 @@
2461
2458
  },
2462
2459
  "Cart": {
2463
2460
  "description": "Supports shopping for products and services until ready for checkout.",
2461
+ "allOf": [
2462
+ {
2463
+ "$ref": "#/components/schemas/Amounts"
2464
+ }
2465
+ ],
2464
2466
  "properties": {
2465
2467
  "id": {
2466
2468
  "type": "string",
@@ -2496,16 +2498,6 @@
2496
2498
  "line_items": {
2497
2499
  "$ref": "#/components/schemas/PriceItems"
2498
2500
  },
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
2501
  "total_details": {
2510
2502
  "$ref": "#/components/schemas/TotalDetails"
2511
2503
  },
@@ -2652,6 +2644,11 @@
2652
2644
  "example": {
2653
2645
  "$ref": "#/components/examples/price-item"
2654
2646
  },
2647
+ "allOf": [
2648
+ {
2649
+ "$ref": "#/components/schemas/Amounts"
2650
+ }
2651
+ ],
2655
2652
  "properties": {
2656
2653
  "_id": {
2657
2654
  "type": "string",
@@ -2671,11 +2668,6 @@
2671
2668
  "description": "The unit gross amount value.",
2672
2669
  "readOnly": true
2673
2670
  },
2674
- "amount_subtotal": {
2675
- "type": "integer",
2676
- "description": "Total before any (discounts or) taxes are applied.",
2677
- "readOnly": true
2678
- },
2679
2671
  "amount_tax": {
2680
2672
  "type": "integer",
2681
2673
  "description": "Total tax amount for this line item."
@@ -2689,11 +2681,6 @@
2689
2681
  "description": "The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.",
2690
2682
  "type": "string"
2691
2683
  },
2692
- "amount_total": {
2693
- "type": "integer",
2694
- "description": "Total after (discounts and) taxes.",
2695
- "readOnly": true
2696
- },
2697
2684
  "currency": {
2698
2685
  "$ref": "#/components/schemas/Currency"
2699
2686
  },
@@ -2765,6 +2752,27 @@
2765
2752
  }
2766
2753
  }
2767
2754
  },
2755
+ "Amounts": {
2756
+ "type": "object",
2757
+ "properties": {
2758
+ "amount_subtotal": {
2759
+ "type": "integer",
2760
+ "description": "Total of all items before (discounts or) taxes are applied."
2761
+ },
2762
+ "amount_subtotal_decimal": {
2763
+ "type": "string",
2764
+ "description": "Total of all items before (discounts or) taxes are applied, as a string with all the decimal places."
2765
+ },
2766
+ "amount_total": {
2767
+ "type": "integer",
2768
+ "description": "Total of all items after (discounts and) taxes are applied."
2769
+ },
2770
+ "amount_total_decimal": {
2771
+ "type": "string",
2772
+ "description": "Total of all items after (discounts and) taxes are applied, as a string with all the decimal places."
2773
+ }
2774
+ }
2775
+ },
2768
2776
  "PriceItem": {
2769
2777
  "allOf": [
2770
2778
  {
@@ -2858,6 +2866,11 @@
2858
2866
  "type": "object",
2859
2867
  "description": "An amount associated with a specific recurrence.",
2860
2868
  "readOnly": true,
2869
+ "allOf": [
2870
+ {
2871
+ "$ref": "#/components/schemas/Amounts"
2872
+ }
2873
+ ],
2861
2874
  "properties": {
2862
2875
  "type": {
2863
2876
  "type": "string",
@@ -2874,14 +2887,6 @@
2874
2887
  "yearly"
2875
2888
  ]
2876
2889
  },
2877
- "amount_subtotal": {
2878
- "type": "integer",
2879
- "description": "Total of all items, with same recurrence, before (discounts or) taxes are applied."
2880
- },
2881
- "amount_total": {
2882
- "type": "integer",
2883
- "description": "Total of all items, with same recurrence, after (discounts and) taxes are applied."
2884
- },
2885
2890
  "unit_amount_gross": {
2886
2891
  "type": "integer",
2887
2892
  "description": "The unit gross amount value."
@@ -2897,7 +2902,9 @@
2897
2902
  },
2898
2903
  "required": [
2899
2904
  "amount_subtotal",
2900
- "amount_total"
2905
+ "amount_total",
2906
+ "amount_subtotal_decimal",
2907
+ "amount_total_decimal"
2901
2908
  ]
2902
2909
  },
2903
2910
  "TotalDetails": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/pricing-client",
3
- "version": "3.15.0",
3
+ "version": "3.15.2",
4
4
  "description": "Client for epilot Pricing APIs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",