@metronome/sdk 3.7.0 → 3.8.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.
Files changed (94) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts.map +1 -1
  4. package/client.js +9 -1
  5. package/client.js.map +1 -1
  6. package/client.mjs +9 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/shared.d.mts +194 -4
  10. package/resources/shared.d.mts.map +1 -1
  11. package/resources/shared.d.ts +194 -4
  12. package/resources/shared.d.ts.map +1 -1
  13. package/resources/v1/alerts.d.mts +39 -0
  14. package/resources/v1/alerts.d.mts.map +1 -1
  15. package/resources/v1/alerts.d.ts +39 -0
  16. package/resources/v1/alerts.d.ts.map +1 -1
  17. package/resources/v1/contracts/contracts.d.mts +270 -11
  18. package/resources/v1/contracts/contracts.d.mts.map +1 -1
  19. package/resources/v1/contracts/contracts.d.ts +270 -11
  20. package/resources/v1/contracts/contracts.d.ts.map +1 -1
  21. package/resources/v1/contracts/contracts.js +43 -0
  22. package/resources/v1/contracts/contracts.js.map +1 -1
  23. package/resources/v1/contracts/contracts.mjs +43 -0
  24. package/resources/v1/contracts/contracts.mjs.map +1 -1
  25. package/resources/v1/contracts/index.d.mts +1 -1
  26. package/resources/v1/contracts/index.d.mts.map +1 -1
  27. package/resources/v1/contracts/index.d.ts +1 -1
  28. package/resources/v1/contracts/index.d.ts.map +1 -1
  29. package/resources/v1/contracts/index.js.map +1 -1
  30. package/resources/v1/contracts/index.mjs.map +1 -1
  31. package/resources/v1/contracts/rate-cards/rates.d.mts +4 -0
  32. package/resources/v1/contracts/rate-cards/rates.d.mts.map +1 -1
  33. package/resources/v1/contracts/rate-cards/rates.d.ts +4 -0
  34. package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -1
  35. package/resources/v1/contracts/rate-cards/rates.js +4 -0
  36. package/resources/v1/contracts/rate-cards/rates.js.map +1 -1
  37. package/resources/v1/contracts/rate-cards/rates.mjs +4 -0
  38. package/resources/v1/contracts/rate-cards/rates.mjs.map +1 -1
  39. package/resources/v1/customers/alerts.d.mts +79 -2
  40. package/resources/v1/customers/alerts.d.mts.map +1 -1
  41. package/resources/v1/customers/alerts.d.ts +79 -2
  42. package/resources/v1/customers/alerts.d.ts.map +1 -1
  43. package/resources/v1/customers/alerts.js +1 -1
  44. package/resources/v1/customers/alerts.mjs +1 -1
  45. package/resources/v1/customers/invoices.d.mts +5 -0
  46. package/resources/v1/customers/invoices.d.mts.map +1 -1
  47. package/resources/v1/customers/invoices.d.ts +5 -0
  48. package/resources/v1/customers/invoices.d.ts.map +1 -1
  49. package/resources/v1/dashboards.d.mts +8 -3
  50. package/resources/v1/dashboards.d.mts.map +1 -1
  51. package/resources/v1/dashboards.d.ts +8 -3
  52. package/resources/v1/dashboards.d.ts.map +1 -1
  53. package/resources/v1/dashboards.js +7 -2
  54. package/resources/v1/dashboards.js.map +1 -1
  55. package/resources/v1/dashboards.mjs +7 -2
  56. package/resources/v1/dashboards.mjs.map +1 -1
  57. package/resources/v1/index.d.mts +1 -1
  58. package/resources/v1/index.d.mts.map +1 -1
  59. package/resources/v1/index.d.ts +1 -1
  60. package/resources/v1/index.d.ts.map +1 -1
  61. package/resources/v1/index.js.map +1 -1
  62. package/resources/v1/index.mjs.map +1 -1
  63. package/resources/v1/packages.d.mts +240 -9
  64. package/resources/v1/packages.d.mts.map +1 -1
  65. package/resources/v1/packages.d.ts +240 -9
  66. package/resources/v1/packages.d.ts.map +1 -1
  67. package/resources/v1/v1.d.mts +2 -2
  68. package/resources/v1/v1.d.mts.map +1 -1
  69. package/resources/v1/v1.d.ts +2 -2
  70. package/resources/v1/v1.d.ts.map +1 -1
  71. package/resources/v1/v1.js.map +1 -1
  72. package/resources/v1/v1.mjs.map +1 -1
  73. package/resources/v2/contracts.d.mts +427 -6
  74. package/resources/v2/contracts.d.mts.map +1 -1
  75. package/resources/v2/contracts.d.ts +427 -6
  76. package/resources/v2/contracts.d.ts.map +1 -1
  77. package/src/client.ts +9 -1
  78. package/src/resources/shared.ts +234 -4
  79. package/src/resources/v1/alerts.ts +49 -0
  80. package/src/resources/v1/contracts/contracts.ts +322 -10
  81. package/src/resources/v1/contracts/index.ts +2 -0
  82. package/src/resources/v1/contracts/rate-cards/rates.ts +4 -0
  83. package/src/resources/v1/customers/alerts.ts +99 -2
  84. package/src/resources/v1/customers/invoices.ts +6 -0
  85. package/src/resources/v1/dashboards.ts +10 -3
  86. package/src/resources/v1/index.ts +2 -0
  87. package/src/resources/v1/packages.ts +291 -9
  88. package/src/resources/v1/v1.ts +4 -0
  89. package/src/resources/v2/contracts.ts +517 -6
  90. package/src/version.ts +1 -1
  91. package/version.d.mts +1 -1
  92. package/version.d.ts +1 -1
  93. package/version.js +1 -1
  94. package/version.mjs +1 -1
@@ -536,6 +536,8 @@ export namespace ContractEditResponse {
536
536
 
537
537
  export namespace AddOverride {
538
538
  export interface OverrideSpecifier {
539
+ any_commit_or_credit_ids?: Array<string>;
540
+
539
541
  billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
540
542
 
541
543
  commit_ids?: Array<string>;
@@ -670,6 +672,11 @@ export namespace ContractEditResponse {
670
672
  */
671
673
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
672
674
 
675
+ /**
676
+ * Rounding configuration for prorated recurring commit amounts.
677
+ */
678
+ proration_rounding?: AddRecurringCommit.ProrationRounding | null;
679
+
673
680
  /**
674
681
  * The frequency at which the recurring commits will be created. If not provided: -
675
682
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -677,7 +684,7 @@ export namespace ContractEditResponse {
677
684
  * be created aligned with the recurring commit's starting_at rather than the usage
678
685
  * invoice dates.
679
686
  */
680
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
687
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
681
688
 
682
689
  /**
683
690
  * Will be passed down to the individual commits. This controls how much of an
@@ -740,6 +747,39 @@ export namespace ContractEditResponse {
740
747
 
741
748
  unit_price: number;
742
749
  }
750
+
751
+ /**
752
+ * Rounding configuration for prorated recurring commit amounts.
753
+ */
754
+ export interface ProrationRounding {
755
+ access?: ProrationRounding.Access;
756
+
757
+ invoice?: ProrationRounding.Invoice;
758
+ }
759
+
760
+ export namespace ProrationRounding {
761
+ export interface Access {
762
+ /**
763
+ * Number of decimal places to round to. Applied directly to the stored monetary
764
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
765
+ * nearest 100 in the stored unit).
766
+ */
767
+ decimal_places: number;
768
+
769
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
770
+ }
771
+
772
+ export interface Invoice {
773
+ /**
774
+ * Number of decimal places to round to. Applied directly to the stored monetary
775
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
776
+ * nearest 100 in the stored unit).
777
+ */
778
+ decimal_places: number;
779
+
780
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
781
+ }
782
+ }
743
783
  }
744
784
 
745
785
  export interface AddRecurringCredit {
@@ -815,6 +855,11 @@ export namespace ContractEditResponse {
815
855
  */
816
856
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
817
857
 
858
+ /**
859
+ * Rounding configuration for prorated recurring credit amounts.
860
+ */
861
+ proration_rounding?: AddRecurringCredit.ProrationRounding | null;
862
+
818
863
  /**
819
864
  * The frequency at which the recurring commits will be created. If not provided: -
820
865
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -822,7 +867,7 @@ export namespace ContractEditResponse {
822
867
  * be created aligned with the recurring commit's starting_at rather than the usage
823
868
  * invoice dates.
824
869
  */
825
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
870
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
826
871
 
827
872
  /**
828
873
  * Will be passed down to the individual commits. This controls how much of an
@@ -874,6 +919,26 @@ export namespace ContractEditResponse {
874
919
  export interface Contract {
875
920
  id: string;
876
921
  }
922
+
923
+ /**
924
+ * Rounding configuration for prorated recurring credit amounts.
925
+ */
926
+ export interface ProrationRounding {
927
+ access?: ProrationRounding.Access;
928
+ }
929
+
930
+ export namespace ProrationRounding {
931
+ export interface Access {
932
+ /**
933
+ * Number of decimal places to round to. Applied directly to the stored monetary
934
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
935
+ * nearest 100 in the stored unit).
936
+ */
937
+ decimal_places: number;
938
+
939
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
940
+ }
941
+ }
877
942
  }
878
943
 
879
944
  export interface AddResellerRoyalty {
@@ -965,6 +1030,8 @@ export namespace ContractEditResponse {
965
1030
 
966
1031
  id?: string;
967
1032
 
1033
+ billing_cycle_config?: AddSubscription.BillingCycleConfig;
1034
+
968
1035
  /**
969
1036
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
970
1037
  */
@@ -1017,6 +1084,21 @@ export namespace ContractEditResponse {
1017
1084
  invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
1018
1085
 
1019
1086
  is_prorated: boolean;
1087
+
1088
+ rounding?: Proration.Rounding;
1089
+ }
1090
+
1091
+ export namespace Proration {
1092
+ export interface Rounding {
1093
+ /**
1094
+ * Number of decimal places to round to. Applied directly to the stored monetary
1095
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1096
+ * nearest 100 in the stored unit).
1097
+ */
1098
+ decimal_places: number;
1099
+
1100
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1101
+ }
1020
1102
  }
1021
1103
 
1022
1104
  export interface QuantitySchedule {
@@ -1041,6 +1123,19 @@ export namespace ContractEditResponse {
1041
1123
  }
1042
1124
  }
1043
1125
 
1126
+ export interface BillingCycleConfig {
1127
+ /**
1128
+ * The date this subscription's billing cycle is anchored to.
1129
+ */
1130
+ anchor_date: string;
1131
+
1132
+ /**
1133
+ * Controls whether this subscription consolidates onto usage invoices or gets its
1134
+ * own scheduled invoice.
1135
+ */
1136
+ invoice_placement: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
1137
+ }
1138
+
1044
1139
  export interface SeatConfig {
1045
1140
  /**
1046
1141
  * The property name, sent on usage events, that identifies the seat ID associated
@@ -1481,6 +1576,10 @@ export namespace ContractEditResponse {
1481
1576
  */
1482
1577
  threshold_amount?: number;
1483
1578
 
1579
+ /**
1580
+ * Determines which balances are excluded from remaining balance calculation for
1581
+ * threshold billing.
1582
+ */
1484
1583
  threshold_balance_specifiers?: Array<UpdatePrepaidBalanceThresholdConfiguration.ThresholdBalanceSpecifier> | null;
1485
1584
  }
1486
1585
 
@@ -1571,6 +1670,11 @@ export namespace ContractEditResponse {
1571
1670
 
1572
1671
  invoice_amount?: UpdateRecurringCommit.InvoiceAmount;
1573
1672
 
1673
+ /**
1674
+ * Rounding configuration for prorated recurring commit amounts.
1675
+ */
1676
+ proration_rounding?: UpdateRecurringCommit.ProrationRounding | null;
1677
+
1574
1678
  rate_type?: 'LIST_RATE' | 'COMMIT_RATE';
1575
1679
  }
1576
1680
 
@@ -1586,6 +1690,39 @@ export namespace ContractEditResponse {
1586
1690
 
1587
1691
  unit_price?: number;
1588
1692
  }
1693
+
1694
+ /**
1695
+ * Rounding configuration for prorated recurring commit amounts.
1696
+ */
1697
+ export interface ProrationRounding {
1698
+ access?: ProrationRounding.Access;
1699
+
1700
+ invoice?: ProrationRounding.Invoice;
1701
+ }
1702
+
1703
+ export namespace ProrationRounding {
1704
+ export interface Access {
1705
+ /**
1706
+ * Number of decimal places to round to. Applied directly to the stored monetary
1707
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1708
+ * nearest 100 in the stored unit).
1709
+ */
1710
+ decimal_places: number;
1711
+
1712
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1713
+ }
1714
+
1715
+ export interface Invoice {
1716
+ /**
1717
+ * Number of decimal places to round to. Applied directly to the stored monetary
1718
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1719
+ * nearest 100 in the stored unit).
1720
+ */
1721
+ decimal_places: number;
1722
+
1723
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1724
+ }
1725
+ }
1589
1726
  }
1590
1727
 
1591
1728
  export interface UpdateRecurringCredit {
@@ -1595,6 +1732,11 @@ export namespace ContractEditResponse {
1595
1732
 
1596
1733
  ending_before?: string;
1597
1734
 
1735
+ /**
1736
+ * Rounding configuration for prorated recurring credit amounts.
1737
+ */
1738
+ proration_rounding?: UpdateRecurringCredit.ProrationRounding | null;
1739
+
1598
1740
  rate_type?: 'LIST_RATE' | 'COMMIT_RATE';
1599
1741
  }
1600
1742
 
@@ -1604,6 +1746,26 @@ export namespace ContractEditResponse {
1604
1746
 
1605
1747
  unit_price?: number;
1606
1748
  }
1749
+
1750
+ /**
1751
+ * Rounding configuration for prorated recurring credit amounts.
1752
+ */
1753
+ export interface ProrationRounding {
1754
+ access?: ProrationRounding.Access;
1755
+ }
1756
+
1757
+ export namespace ProrationRounding {
1758
+ export interface Access {
1759
+ /**
1760
+ * Number of decimal places to round to. Applied directly to the stored monetary
1761
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1762
+ * nearest 100 in the stored unit).
1763
+ */
1764
+ decimal_places: number;
1765
+
1766
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1767
+ }
1768
+ }
1607
1769
  }
1608
1770
 
1609
1771
  export interface UpdateRefundInvoice {
@@ -2111,6 +2273,8 @@ export namespace ContractGetEditHistoryResponse {
2111
2273
 
2112
2274
  export namespace AddOverride {
2113
2275
  export interface OverrideSpecifier {
2276
+ any_commit_or_credit_ids?: Array<string>;
2277
+
2114
2278
  billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
2115
2279
 
2116
2280
  commit_ids?: Array<string>;
@@ -2245,6 +2409,11 @@ export namespace ContractGetEditHistoryResponse {
2245
2409
  */
2246
2410
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
2247
2411
 
2412
+ /**
2413
+ * Rounding configuration for prorated recurring commit amounts.
2414
+ */
2415
+ proration_rounding?: AddRecurringCommit.ProrationRounding | null;
2416
+
2248
2417
  /**
2249
2418
  * The frequency at which the recurring commits will be created. If not provided: -
2250
2419
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -2252,7 +2421,7 @@ export namespace ContractGetEditHistoryResponse {
2252
2421
  * be created aligned with the recurring commit's starting_at rather than the usage
2253
2422
  * invoice dates.
2254
2423
  */
2255
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
2424
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
2256
2425
 
2257
2426
  /**
2258
2427
  * Will be passed down to the individual commits. This controls how much of an
@@ -2315,6 +2484,39 @@ export namespace ContractGetEditHistoryResponse {
2315
2484
 
2316
2485
  unit_price: number;
2317
2486
  }
2487
+
2488
+ /**
2489
+ * Rounding configuration for prorated recurring commit amounts.
2490
+ */
2491
+ export interface ProrationRounding {
2492
+ access?: ProrationRounding.Access;
2493
+
2494
+ invoice?: ProrationRounding.Invoice;
2495
+ }
2496
+
2497
+ export namespace ProrationRounding {
2498
+ export interface Access {
2499
+ /**
2500
+ * Number of decimal places to round to. Applied directly to the stored monetary
2501
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2502
+ * nearest 100 in the stored unit).
2503
+ */
2504
+ decimal_places: number;
2505
+
2506
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2507
+ }
2508
+
2509
+ export interface Invoice {
2510
+ /**
2511
+ * Number of decimal places to round to. Applied directly to the stored monetary
2512
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2513
+ * nearest 100 in the stored unit).
2514
+ */
2515
+ decimal_places: number;
2516
+
2517
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2518
+ }
2519
+ }
2318
2520
  }
2319
2521
 
2320
2522
  export interface AddRecurringCredit {
@@ -2390,6 +2592,11 @@ export namespace ContractGetEditHistoryResponse {
2390
2592
  */
2391
2593
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
2392
2594
 
2595
+ /**
2596
+ * Rounding configuration for prorated recurring credit amounts.
2597
+ */
2598
+ proration_rounding?: AddRecurringCredit.ProrationRounding | null;
2599
+
2393
2600
  /**
2394
2601
  * The frequency at which the recurring commits will be created. If not provided: -
2395
2602
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -2397,7 +2604,7 @@ export namespace ContractGetEditHistoryResponse {
2397
2604
  * be created aligned with the recurring commit's starting_at rather than the usage
2398
2605
  * invoice dates.
2399
2606
  */
2400
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
2607
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
2401
2608
 
2402
2609
  /**
2403
2610
  * Will be passed down to the individual commits. This controls how much of an
@@ -2449,6 +2656,26 @@ export namespace ContractGetEditHistoryResponse {
2449
2656
  export interface Contract {
2450
2657
  id: string;
2451
2658
  }
2659
+
2660
+ /**
2661
+ * Rounding configuration for prorated recurring credit amounts.
2662
+ */
2663
+ export interface ProrationRounding {
2664
+ access?: ProrationRounding.Access;
2665
+ }
2666
+
2667
+ export namespace ProrationRounding {
2668
+ export interface Access {
2669
+ /**
2670
+ * Number of decimal places to round to. Applied directly to the stored monetary
2671
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2672
+ * nearest 100 in the stored unit).
2673
+ */
2674
+ decimal_places: number;
2675
+
2676
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2677
+ }
2678
+ }
2452
2679
  }
2453
2680
 
2454
2681
  export interface AddResellerRoyalty {
@@ -2540,6 +2767,8 @@ export namespace ContractGetEditHistoryResponse {
2540
2767
 
2541
2768
  id?: string;
2542
2769
 
2770
+ billing_cycle_config?: AddSubscription.BillingCycleConfig;
2771
+
2543
2772
  /**
2544
2773
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2545
2774
  */
@@ -2592,6 +2821,21 @@ export namespace ContractGetEditHistoryResponse {
2592
2821
  invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
2593
2822
 
2594
2823
  is_prorated: boolean;
2824
+
2825
+ rounding?: Proration.Rounding;
2826
+ }
2827
+
2828
+ export namespace Proration {
2829
+ export interface Rounding {
2830
+ /**
2831
+ * Number of decimal places to round to. Applied directly to the stored monetary
2832
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2833
+ * nearest 100 in the stored unit).
2834
+ */
2835
+ decimal_places: number;
2836
+
2837
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2838
+ }
2595
2839
  }
2596
2840
 
2597
2841
  export interface QuantitySchedule {
@@ -2616,6 +2860,19 @@ export namespace ContractGetEditHistoryResponse {
2616
2860
  }
2617
2861
  }
2618
2862
 
2863
+ export interface BillingCycleConfig {
2864
+ /**
2865
+ * The date this subscription's billing cycle is anchored to.
2866
+ */
2867
+ anchor_date: string;
2868
+
2869
+ /**
2870
+ * Controls whether this subscription consolidates onto usage invoices or gets its
2871
+ * own scheduled invoice.
2872
+ */
2873
+ invoice_placement: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
2874
+ }
2875
+
2619
2876
  export interface SeatConfig {
2620
2877
  /**
2621
2878
  * The property name, sent on usage events, that identifies the seat ID associated
@@ -3056,6 +3313,10 @@ export namespace ContractGetEditHistoryResponse {
3056
3313
  */
3057
3314
  threshold_amount?: number;
3058
3315
 
3316
+ /**
3317
+ * Determines which balances are excluded from remaining balance calculation for
3318
+ * threshold billing.
3319
+ */
3059
3320
  threshold_balance_specifiers?: Array<UpdatePrepaidBalanceThresholdConfiguration.ThresholdBalanceSpecifier> | null;
3060
3321
  }
3061
3322
 
@@ -3146,6 +3407,11 @@ export namespace ContractGetEditHistoryResponse {
3146
3407
 
3147
3408
  invoice_amount?: UpdateRecurringCommit.InvoiceAmount;
3148
3409
 
3410
+ /**
3411
+ * Rounding configuration for prorated recurring commit amounts.
3412
+ */
3413
+ proration_rounding?: UpdateRecurringCommit.ProrationRounding | null;
3414
+
3149
3415
  rate_type?: 'LIST_RATE' | 'COMMIT_RATE';
3150
3416
  }
3151
3417
 
@@ -3161,6 +3427,39 @@ export namespace ContractGetEditHistoryResponse {
3161
3427
 
3162
3428
  unit_price?: number;
3163
3429
  }
3430
+
3431
+ /**
3432
+ * Rounding configuration for prorated recurring commit amounts.
3433
+ */
3434
+ export interface ProrationRounding {
3435
+ access?: ProrationRounding.Access;
3436
+
3437
+ invoice?: ProrationRounding.Invoice;
3438
+ }
3439
+
3440
+ export namespace ProrationRounding {
3441
+ export interface Access {
3442
+ /**
3443
+ * Number of decimal places to round to. Applied directly to the stored monetary
3444
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
3445
+ * nearest 100 in the stored unit).
3446
+ */
3447
+ decimal_places: number;
3448
+
3449
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
3450
+ }
3451
+
3452
+ export interface Invoice {
3453
+ /**
3454
+ * Number of decimal places to round to. Applied directly to the stored monetary
3455
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
3456
+ * nearest 100 in the stored unit).
3457
+ */
3458
+ decimal_places: number;
3459
+
3460
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
3461
+ }
3462
+ }
3164
3463
  }
3165
3464
 
3166
3465
  export interface UpdateRecurringCredit {
@@ -3170,6 +3469,11 @@ export namespace ContractGetEditHistoryResponse {
3170
3469
 
3171
3470
  ending_before?: string;
3172
3471
 
3472
+ /**
3473
+ * Rounding configuration for prorated recurring credit amounts.
3474
+ */
3475
+ proration_rounding?: UpdateRecurringCredit.ProrationRounding | null;
3476
+
3173
3477
  rate_type?: 'LIST_RATE' | 'COMMIT_RATE';
3174
3478
  }
3175
3479
 
@@ -3179,6 +3483,26 @@ export namespace ContractGetEditHistoryResponse {
3179
3483
 
3180
3484
  unit_price?: number;
3181
3485
  }
3486
+
3487
+ /**
3488
+ * Rounding configuration for prorated recurring credit amounts.
3489
+ */
3490
+ export interface ProrationRounding {
3491
+ access?: ProrationRounding.Access;
3492
+ }
3493
+
3494
+ export namespace ProrationRounding {
3495
+ export interface Access {
3496
+ /**
3497
+ * Number of decimal places to round to. Applied directly to the stored monetary
3498
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
3499
+ * nearest 100 in the stored unit).
3500
+ */
3501
+ decimal_places: number;
3502
+
3503
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
3504
+ }
3505
+ }
3182
3506
  }
3183
3507
 
3184
3508
  export interface UpdateRefundInvoice {
@@ -4263,6 +4587,15 @@ export namespace ContractEditParams {
4263
4587
 
4264
4588
  export namespace AddOverride {
4265
4589
  export interface OverrideSpecifier {
4590
+ /**
4591
+ * Can only be used for commit specific overrides. Must be used in conjunction with
4592
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
4593
+ * `presentation_group_values`. Must be used instead of both `commit_ids` and
4594
+ * `recurring_commit_ids` If provided, the override will apply to any specified
4595
+ * commit, credit, recurring commit or recurring credit IDs.
4596
+ */
4597
+ any_commit_or_credit_ids?: Array<string>;
4598
+
4266
4599
  billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
4267
4600
 
4268
4601
  /**
@@ -4453,6 +4786,11 @@ export namespace ContractEditParams {
4453
4786
  */
4454
4787
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
4455
4788
 
4789
+ /**
4790
+ * Optional rounding configuration for prorated recurring commit amounts.
4791
+ */
4792
+ proration_rounding?: AddRecurringCommit.ProrationRounding;
4793
+
4456
4794
  /**
4457
4795
  * Whether the created commits will use the commit rate or list rate
4458
4796
  */
@@ -4465,7 +4803,7 @@ export namespace ContractEditParams {
4465
4803
  * be created aligned with the recurring commit's starting_at rather than the usage
4466
4804
  * invoice dates.
4467
4805
  */
4468
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
4806
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
4469
4807
 
4470
4808
  /**
4471
4809
  * Will be passed down to the individual commits. This controls how much of an
@@ -4534,6 +4872,39 @@ export namespace ContractEditParams {
4534
4872
  unit_price: number;
4535
4873
  }
4536
4874
 
4875
+ /**
4876
+ * Optional rounding configuration for prorated recurring commit amounts.
4877
+ */
4878
+ export interface ProrationRounding {
4879
+ access?: ProrationRounding.Access;
4880
+
4881
+ invoice?: ProrationRounding.Invoice;
4882
+ }
4883
+
4884
+ export namespace ProrationRounding {
4885
+ export interface Access {
4886
+ /**
4887
+ * Number of decimal places to round to. Applied directly to the stored monetary
4888
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
4889
+ * nearest 100 in the stored unit).
4890
+ */
4891
+ decimal_places: number;
4892
+
4893
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
4894
+ }
4895
+
4896
+ export interface Invoice {
4897
+ /**
4898
+ * Number of decimal places to round to. Applied directly to the stored monetary
4899
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
4900
+ * nearest 100 in the stored unit).
4901
+ */
4902
+ decimal_places: number;
4903
+
4904
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
4905
+ }
4906
+ }
4907
+
4537
4908
  /**
4538
4909
  * Attach a subscription to the recurring commit/credit.
4539
4910
  */
@@ -4628,6 +4999,11 @@ export namespace ContractEditParams {
4628
4999
  */
4629
5000
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
4630
5001
 
5002
+ /**
5003
+ * Optional rounding configuration for prorated recurring credit amounts.
5004
+ */
5005
+ proration_rounding?: AddRecurringCredit.ProrationRounding;
5006
+
4631
5007
  /**
4632
5008
  * Whether the created commits will use the commit rate or list rate
4633
5009
  */
@@ -4640,7 +5016,7 @@ export namespace ContractEditParams {
4640
5016
  * be created aligned with the recurring commit's starting_at rather than the usage
4641
5017
  * invoice dates.
4642
5018
  */
4643
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
5019
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
4644
5020
 
4645
5021
  /**
4646
5022
  * Will be passed down to the individual commits. This controls how much of an
@@ -4698,6 +5074,26 @@ export namespace ContractEditParams {
4698
5074
  unit?: 'PERIODS';
4699
5075
  }
4700
5076
 
5077
+ /**
5078
+ * Optional rounding configuration for prorated recurring credit amounts.
5079
+ */
5080
+ export interface ProrationRounding {
5081
+ access?: ProrationRounding.Access;
5082
+ }
5083
+
5084
+ export namespace ProrationRounding {
5085
+ export interface Access {
5086
+ /**
5087
+ * Number of decimal places to round to. Applied directly to the stored monetary
5088
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
5089
+ * nearest 100 in the stored unit).
5090
+ */
5091
+ decimal_places: number;
5092
+
5093
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
5094
+ }
5095
+ }
5096
+
4701
5097
  /**
4702
5098
  * Attach a subscription to the recurring commit/credit.
4703
5099
  */
@@ -4963,6 +5359,8 @@ export namespace ContractEditParams {
4963
5359
 
4964
5360
  subscription_rate: AddSubscription.SubscriptionRate;
4965
5361
 
5362
+ billing_cycle_config?: AddSubscription.BillingCycleConfig;
5363
+
4966
5364
  /**
4967
5365
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
4968
5366
  */
@@ -5027,6 +5425,21 @@ export namespace ContractEditParams {
5027
5425
  * Indicates if the partial period will be prorated or charged a full amount.
5028
5426
  */
5029
5427
  is_prorated?: boolean;
5428
+
5429
+ rounding?: Proration.Rounding;
5430
+ }
5431
+
5432
+ export namespace Proration {
5433
+ export interface Rounding {
5434
+ /**
5435
+ * Number of decimal places to round to. Applied directly to the stored monetary
5436
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
5437
+ * nearest 100 in the stored unit).
5438
+ */
5439
+ decimal_places: number;
5440
+
5441
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
5442
+ }
5030
5443
  }
5031
5444
 
5032
5445
  export interface SubscriptionRate {
@@ -5042,6 +5455,20 @@ export namespace ContractEditParams {
5042
5455
  product_id: string;
5043
5456
  }
5044
5457
 
5458
+ export interface BillingCycleConfig {
5459
+ /**
5460
+ * The date to anchor the billing cycle to. If omitted, defaults to the contract's
5461
+ * usage invoice billing cycle anchor date.
5462
+ */
5463
+ anchor_date?: string;
5464
+
5465
+ /**
5466
+ * Controls whether this subscription consolidates onto usage invoices or gets its
5467
+ * own scheduled invoice. Defaults to ON_USAGE_INVOICE if omitted.
5468
+ */
5469
+ invoice_placement?: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
5470
+ }
5471
+
5045
5472
  export interface SeatConfig {
5046
5473
  /**
5047
5474
  * The initial assigned seats on this subscription.
@@ -5306,6 +5733,10 @@ export namespace ContractEditParams {
5306
5733
  */
5307
5734
  threshold_amount?: number;
5308
5735
 
5736
+ /**
5737
+ * Determines which balances are excluded from remaining balance calculation for
5738
+ * threshold billing.
5739
+ */
5309
5740
  threshold_balance_specifiers?: Array<UpdatePrepaidBalanceThresholdConfiguration.ThresholdBalanceSpecifier> | null;
5310
5741
  }
5311
5742
 
@@ -5396,6 +5827,12 @@ export namespace ContractEditParams {
5396
5827
 
5397
5828
  invoice_amount?: UpdateRecurringCommit.InvoiceAmount;
5398
5829
 
5830
+ /**
5831
+ * If provided, updates the rounding config on the recurring commit. Set to null to
5832
+ * clear rounding. Omit to leave unchanged.
5833
+ */
5834
+ proration_rounding?: UpdateRecurringCommit.ProrationRounding | null;
5835
+
5399
5836
  /**
5400
5837
  * If provided, updates the recurring commit to use the specified rate type when
5401
5838
  * generating future commits.
@@ -5415,6 +5852,40 @@ export namespace ContractEditParams {
5415
5852
 
5416
5853
  unit_price?: number;
5417
5854
  }
5855
+
5856
+ /**
5857
+ * If provided, updates the rounding config on the recurring commit. Set to null to
5858
+ * clear rounding. Omit to leave unchanged.
5859
+ */
5860
+ export interface ProrationRounding {
5861
+ access?: ProrationRounding.Access | null;
5862
+
5863
+ invoice?: ProrationRounding.Invoice | null;
5864
+ }
5865
+
5866
+ export namespace ProrationRounding {
5867
+ export interface Access {
5868
+ /**
5869
+ * Number of decimal places to round to. Applied directly to the stored monetary
5870
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
5871
+ * nearest 100 in the stored unit).
5872
+ */
5873
+ decimal_places: number;
5874
+
5875
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
5876
+ }
5877
+
5878
+ export interface Invoice {
5879
+ /**
5880
+ * Number of decimal places to round to. Applied directly to the stored monetary
5881
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
5882
+ * nearest 100 in the stored unit).
5883
+ */
5884
+ decimal_places: number;
5885
+
5886
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
5887
+ }
5888
+ }
5418
5889
  }
5419
5890
 
5420
5891
  export interface UpdateRecurringCredit {
@@ -5424,6 +5895,12 @@ export namespace ContractEditParams {
5424
5895
 
5425
5896
  ending_before?: string | null;
5426
5897
 
5898
+ /**
5899
+ * If provided, updates the rounding config on the recurring credit. Set to null to
5900
+ * clear rounding. Omit to leave unchanged.
5901
+ */
5902
+ proration_rounding?: UpdateRecurringCredit.ProrationRounding | null;
5903
+
5427
5904
  /**
5428
5905
  * If provided, updates the recurring credit to use the specified rate type when
5429
5906
  * generating future credits.
@@ -5437,6 +5914,27 @@ export namespace ContractEditParams {
5437
5914
 
5438
5915
  unit_price?: number;
5439
5916
  }
5917
+
5918
+ /**
5919
+ * If provided, updates the rounding config on the recurring credit. Set to null to
5920
+ * clear rounding. Omit to leave unchanged.
5921
+ */
5922
+ export interface ProrationRounding {
5923
+ access?: ProrationRounding.Access | null;
5924
+ }
5925
+
5926
+ export namespace ProrationRounding {
5927
+ export interface Access {
5928
+ /**
5929
+ * Number of decimal places to round to. Applied directly to the stored monetary
5930
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
5931
+ * nearest 100 in the stored unit).
5932
+ */
5933
+ decimal_places: number;
5934
+
5935
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
5936
+ }
5937
+ }
5440
5938
  }
5441
5939
 
5442
5940
  export interface UpdateScheduledCharge {
@@ -5544,6 +6042,8 @@ export namespace ContractEditParams {
5544
6042
 
5545
6043
  ending_before?: string | null;
5546
6044
 
6045
+ proration_rounding?: UpdateSubscription.ProrationRounding | null;
6046
+
5547
6047
  /**
5548
6048
  * Update the subscription's quantity management mode from QUANTITY_ONLY to
5549
6049
  * SEAT_BASED with the provided seat_group_key.
@@ -5561,6 +6061,17 @@ export namespace ContractEditParams {
5561
6061
  }
5562
6062
 
5563
6063
  export namespace UpdateSubscription {
6064
+ export interface ProrationRounding {
6065
+ /**
6066
+ * Number of decimal places to round to. Applied directly to the stored monetary
6067
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
6068
+ * nearest 100 in the stored unit).
6069
+ */
6070
+ decimal_places: number;
6071
+
6072
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
6073
+ }
6074
+
5564
6075
  /**
5565
6076
  * Update the subscription's quantity management mode from QUANTITY_ONLY to
5566
6077
  * SEAT_BASED with the provided seat_group_key.