@metronome/sdk 3.7.0 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/CHANGELOG.md +47 -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 +354 -20
  10. package/resources/shared.d.mts.map +1 -1
  11. package/resources/shared.d.ts +354 -20
  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 +303 -20
  18. package/resources/v1/contracts/contracts.d.mts.map +1 -1
  19. package/resources/v1/contracts/contracts.d.ts +303 -20
  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 +429 -8
  74. package/resources/v2/contracts.d.mts.map +1 -1
  75. package/resources/v2/contracts.d.ts +429 -8
  76. package/resources/v2/contracts.d.ts.map +1 -1
  77. package/src/client.ts +9 -1
  78. package/src/resources/shared.ts +422 -21
  79. package/src/resources/v1/alerts.ts +49 -0
  80. package/src/resources/v1/contracts/contracts.ts +356 -19
  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 +519 -8
  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
@@ -373,6 +373,47 @@ export declare class Contracts extends APIResource {
373
373
  * ```
374
374
  */
375
375
  getNetBalance(body: ContractGetNetBalanceParams, options?: RequestOptions): APIPromise<ContractGetNetBalanceResponse>;
376
+ /**
377
+ * Get the history of subscription seats schedule over time for a given
378
+ * `subscription_id`. This endpoint provides information about seat assignments and
379
+ * total quantities for different time periods, allowing you to track how seat
380
+ * assignments have changed over time.
381
+ *
382
+ * ### Use this endpoint to:
383
+ *
384
+ * - Track changes to seat assignments over time
385
+ * - Get seat schedule for a specific date using the `covering_date` parameter
386
+ * - Get seat schedule history with optional date range filtering using
387
+ * `starting_at` and `ending_before`
388
+ *
389
+ * ### Key response fields:
390
+ *
391
+ * - data: array of seat schedule entries with time periods, quantity, and
392
+ * assignments
393
+ * - next_page: cursor for pagination to retrieve additional results
394
+ *
395
+ * ### Usage guidelines:
396
+ *
397
+ * - Use `covering_date` to get the active seats for a specific point in time.
398
+ * `covering_date` cannot be used with `starting_at` or `ending_before`.
399
+ * - Use `starting_at` and `ending_before` to filter results by time range.
400
+ * `starting_at` and `ending_before` cannot be used with `covering_date`.
401
+ * - Maximum limit is 10 seat schedule entries per request
402
+ * - Results are ordered by `starting_at` timestamp
403
+ *
404
+ * @example
405
+ * ```ts
406
+ * const response =
407
+ * await client.v1.contracts.getSubscriptionSeatsHistory({
408
+ * contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
409
+ * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
410
+ * subscription_id: '1a824d53-bde6-4d82-96d7-6347ff227d5c',
411
+ * covering_date: '2024-01-15T00:00:00.000Z',
412
+ * limit: 10,
413
+ * });
414
+ * ```
415
+ */
416
+ getSubscriptionSeatsHistory(body: ContractGetSubscriptionSeatsHistoryParams, options?: RequestOptions): APIPromise<ContractGetSubscriptionSeatsHistoryResponse>;
376
417
  /**
377
418
  * Retrieve a comprehensive view of all available balances (commits and credits)
378
419
  * for a customer. This endpoint provides real-time visibility into prepaid funds,
@@ -632,9 +673,6 @@ export declare namespace ContractCreateResponse {
632
673
  custom_fields?: {
633
674
  [key: string]: string;
634
675
  };
635
- /**
636
- * The billing provider configuration associated with the contract.
637
- */
638
676
  customer_billing_provider_configuration?: Contract.CustomerBillingProviderConfiguration;
639
677
  ending_before?: string;
640
678
  /**
@@ -701,13 +739,40 @@ export declare namespace ContractCreateResponse {
701
739
  billing_anchor_date: string;
702
740
  frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
703
741
  }
704
- /**
705
- * The billing provider configuration associated with the contract.
706
- */
707
742
  interface CustomerBillingProviderConfiguration {
708
- id?: string;
709
- billing_provider?: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace' | 'metronome';
710
- delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
743
+ /**
744
+ * ID of this configuration; can be provided as the
745
+ * billing_provider_configuration_id when creating a contract.
746
+ */
747
+ id: string;
748
+ archived_at: string | null;
749
+ /**
750
+ * The billing provider set for this configuration.
751
+ */
752
+ billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace' | 'metronome';
753
+ /**
754
+ * Configuration for the billing provider. The structure of this object is specific
755
+ * to the billing provider.
756
+ */
757
+ configuration: {
758
+ [key: string]: unknown;
759
+ };
760
+ customer_id: string;
761
+ /**
762
+ * The method to use for delivering invoices to this customer.
763
+ */
764
+ delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
765
+ /**
766
+ * Configuration for the delivery method. The structure of this object is specific
767
+ * to the delivery method.
768
+ */
769
+ delivery_method_configuration: {
770
+ [key: string]: unknown;
771
+ };
772
+ /**
773
+ * ID of the delivery method to use for this customer.
774
+ */
775
+ delivery_method_id: string;
711
776
  }
712
777
  /**
713
778
  * Indicates whether there are more items than the limit for this endpoint. Use the
@@ -788,6 +853,10 @@ export declare namespace ContractCreateResponse {
788
853
  * the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
789
854
  */
790
855
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
856
+ /**
857
+ * Rounding configuration for prorated recurring commit amounts.
858
+ */
859
+ proration_rounding?: RecurringCommit.ProrationRounding | null;
791
860
  /**
792
861
  * The frequency at which the recurring commits will be created. If not provided: -
793
862
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -795,7 +864,7 @@ export declare namespace ContractCreateResponse {
795
864
  * be created aligned with the recurring commit's starting_at rather than the usage
796
865
  * invoice dates.
797
866
  */
798
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
867
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
799
868
  /**
800
869
  * Will be passed down to the individual commits. This controls how much of an
801
870
  * individual unexpired commit will roll over upon contract transition. Must be
@@ -844,6 +913,35 @@ export declare namespace ContractCreateResponse {
844
913
  quantity: number;
845
914
  unit_price: number;
846
915
  }
916
+ /**
917
+ * Rounding configuration for prorated recurring commit amounts.
918
+ */
919
+ interface ProrationRounding {
920
+ access?: ProrationRounding.Access;
921
+ invoice?: ProrationRounding.Invoice;
922
+ }
923
+ namespace ProrationRounding {
924
+ interface Access {
925
+ /**
926
+ * Number of decimal places to round to. Applied directly to the stored monetary
927
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
928
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
929
+ * dollar).
930
+ */
931
+ decimal_places: number;
932
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
933
+ }
934
+ interface Invoice {
935
+ /**
936
+ * Number of decimal places to round to. Applied directly to the stored monetary
937
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
938
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
939
+ * dollar).
940
+ */
941
+ decimal_places: number;
942
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
943
+ }
944
+ }
847
945
  }
848
946
  interface RecurringCredit {
849
947
  id: string;
@@ -902,6 +1000,10 @@ export declare namespace ContractCreateResponse {
902
1000
  * the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
903
1001
  */
904
1002
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
1003
+ /**
1004
+ * Rounding configuration for prorated recurring credit amounts.
1005
+ */
1006
+ proration_rounding?: RecurringCredit.ProrationRounding | null;
905
1007
  /**
906
1008
  * The frequency at which the recurring commits will be created. If not provided: -
907
1009
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -909,7 +1011,7 @@ export declare namespace ContractCreateResponse {
909
1011
  * be created aligned with the recurring commit's starting_at rather than the usage
910
1012
  * invoice dates.
911
1013
  */
912
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1014
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
913
1015
  /**
914
1016
  * Will be passed down to the individual commits. This controls how much of an
915
1017
  * individual unexpired commit will roll over upon contract transition. Must be
@@ -950,6 +1052,24 @@ export declare namespace ContractCreateResponse {
950
1052
  interface Contract {
951
1053
  id: string;
952
1054
  }
1055
+ /**
1056
+ * Rounding configuration for prorated recurring credit amounts.
1057
+ */
1058
+ interface ProrationRounding {
1059
+ access?: ProrationRounding.Access;
1060
+ }
1061
+ namespace ProrationRounding {
1062
+ interface Access {
1063
+ /**
1064
+ * Number of decimal places to round to. Applied directly to the stored monetary
1065
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1066
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
1067
+ * dollar).
1068
+ */
1069
+ decimal_places: number;
1070
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1071
+ }
1072
+ }
953
1073
  }
954
1074
  }
955
1075
  }
@@ -986,6 +1106,33 @@ export declare namespace ContractGetNetBalanceResponse {
986
1106
  credit_type_id: string;
987
1107
  }
988
1108
  }
1109
+ export interface ContractGetSubscriptionSeatsHistoryResponse {
1110
+ data: Array<ContractGetSubscriptionSeatsHistoryResponse.Data>;
1111
+ /**
1112
+ * Cursor for the next page of results
1113
+ */
1114
+ next_page: string | null;
1115
+ }
1116
+ export declare namespace ContractGetSubscriptionSeatsHistoryResponse {
1117
+ interface Data {
1118
+ /**
1119
+ * Array of seat IDs that are assigned in this period
1120
+ */
1121
+ assigned_seat_ids: Array<string>;
1122
+ /**
1123
+ * The end time of this seat schedule period (null if ongoing)
1124
+ */
1125
+ ending_before: string | null;
1126
+ /**
1127
+ * The start time of this seat schedule period
1128
+ */
1129
+ starting_at: string;
1130
+ /**
1131
+ * Total number of assigned and unassigned seats in this period
1132
+ */
1133
+ total_quantity: number;
1134
+ }
1135
+ }
989
1136
  export type ContractListBalancesResponse = Shared.Commit | Shared.Credit;
990
1137
  export interface ContractListSeatBalancesResponse {
991
1138
  data: Array<ContractListSeatBalancesResponse.Data>;
@@ -1764,9 +1911,10 @@ export declare namespace ContractCreateParams {
1764
1911
  entitled?: boolean;
1765
1912
  /**
1766
1913
  * Indicates whether the override should only apply to commits. Defaults to
1767
- * `false`. If `true`, you can specify relevant commits in `override_specifiers` by
1768
- * passing `commit_ids`. if you do not specify `commit_ids`, then the override will
1769
- * apply when consuming any prepaid or postpaid commit.
1914
+ * `false`. If `true` you can specify relevant commits in `override_specifiers` by
1915
+ * passing `commit_ids`, `recurring_commit_ids`, or `any_commit_or_credit_ids`. If
1916
+ * you do not specify any of these fields, the override will apply when consuming
1917
+ * any prepaid commit, postpaid commit, or credit
1770
1918
  */
1771
1919
  is_commit_specific?: boolean;
1772
1920
  /**
@@ -1811,6 +1959,14 @@ export declare namespace ContractCreateParams {
1811
1959
  }
1812
1960
  namespace Override {
1813
1961
  interface OverrideSpecifier {
1962
+ /**
1963
+ * Can only be used for commit specific overrides. Must be used in conjunction with
1964
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
1965
+ * `presentation_group_values`. Must be used instead of both `commit_ids` and
1966
+ * `recurring_commit_ids` If provided, the override will apply to any specified
1967
+ * commit, credit, recurring commit or recurring credit IDs.
1968
+ */
1969
+ any_commit_or_credit_ids?: Array<string>;
1814
1970
  billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1815
1971
  /**
1816
1972
  * Can only be used for commit specific overrides. Must be used in conjunction with
@@ -1972,6 +2128,10 @@ export declare namespace ContractCreateParams {
1972
2128
  * the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1973
2129
  */
1974
2130
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
2131
+ /**
2132
+ * Optional rounding configuration for prorated recurring commit amounts.
2133
+ */
2134
+ proration_rounding?: RecurringCommit.ProrationRounding;
1975
2135
  /**
1976
2136
  * Whether the created commits will use the commit rate or list rate
1977
2137
  */
@@ -1983,7 +2143,7 @@ export declare namespace ContractCreateParams {
1983
2143
  * be created aligned with the recurring commit's starting_at rather than the usage
1984
2144
  * invoice dates.
1985
2145
  */
1986
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
2146
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
1987
2147
  /**
1988
2148
  * Will be passed down to the individual commits. This controls how much of an
1989
2149
  * individual unexpired commit will roll over upon contract transition. Must be
@@ -2037,6 +2197,35 @@ export declare namespace ContractCreateParams {
2037
2197
  quantity: number;
2038
2198
  unit_price: number;
2039
2199
  }
2200
+ /**
2201
+ * Optional rounding configuration for prorated recurring commit amounts.
2202
+ */
2203
+ interface ProrationRounding {
2204
+ access?: ProrationRounding.Access;
2205
+ invoice?: ProrationRounding.Invoice;
2206
+ }
2207
+ namespace ProrationRounding {
2208
+ interface Access {
2209
+ /**
2210
+ * Number of decimal places to round to. Applied directly to the stored monetary
2211
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2212
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
2213
+ * dollar).
2214
+ */
2215
+ decimal_places: number;
2216
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2217
+ }
2218
+ interface Invoice {
2219
+ /**
2220
+ * Number of decimal places to round to. Applied directly to the stored monetary
2221
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2222
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
2223
+ * dollar).
2224
+ */
2225
+ decimal_places: number;
2226
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2227
+ }
2228
+ }
2040
2229
  /**
2041
2230
  * Attach a subscription to the recurring commit/credit.
2042
2231
  */
@@ -2114,6 +2303,10 @@ export declare namespace ContractCreateParams {
2114
2303
  * the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
2115
2304
  */
2116
2305
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
2306
+ /**
2307
+ * Optional rounding configuration for prorated recurring credit amounts.
2308
+ */
2309
+ proration_rounding?: RecurringCredit.ProrationRounding;
2117
2310
  /**
2118
2311
  * Whether the created commits will use the commit rate or list rate
2119
2312
  */
@@ -2125,7 +2318,7 @@ export declare namespace ContractCreateParams {
2125
2318
  * be created aligned with the recurring commit's starting_at rather than the usage
2126
2319
  * invoice dates.
2127
2320
  */
2128
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
2321
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
2129
2322
  /**
2130
2323
  * Will be passed down to the individual commits. This controls how much of an
2131
2324
  * individual unexpired commit will roll over upon contract transition. Must be
@@ -2171,6 +2364,24 @@ export declare namespace ContractCreateParams {
2171
2364
  value: number;
2172
2365
  unit?: 'PERIODS';
2173
2366
  }
2367
+ /**
2368
+ * Optional rounding configuration for prorated recurring credit amounts.
2369
+ */
2370
+ interface ProrationRounding {
2371
+ access?: ProrationRounding.Access;
2372
+ }
2373
+ namespace ProrationRounding {
2374
+ interface Access {
2375
+ /**
2376
+ * Number of decimal places to round to. Applied directly to the stored monetary
2377
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2378
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
2379
+ * dollar).
2380
+ */
2381
+ decimal_places: number;
2382
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2383
+ }
2384
+ }
2174
2385
  /**
2175
2386
  * Attach a subscription to the recurring commit/credit.
2176
2387
  */
@@ -2377,6 +2588,7 @@ export declare namespace ContractCreateParams {
2377
2588
  collection_schedule: 'ADVANCE' | 'ARREARS';
2378
2589
  proration: Subscription.Proration;
2379
2590
  subscription_rate: Subscription.SubscriptionRate;
2591
+ billing_cycle_config?: Subscription.BillingCycleConfig;
2380
2592
  /**
2381
2593
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2382
2594
  */
@@ -2433,6 +2645,19 @@ export declare namespace ContractCreateParams {
2433
2645
  * Indicates if the partial period will be prorated or charged a full amount.
2434
2646
  */
2435
2647
  is_prorated?: boolean;
2648
+ rounding?: Proration.Rounding;
2649
+ }
2650
+ namespace Proration {
2651
+ interface Rounding {
2652
+ /**
2653
+ * Number of decimal places to round to. Applied directly to the stored monetary
2654
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2655
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
2656
+ * dollar).
2657
+ */
2658
+ decimal_places: number;
2659
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2660
+ }
2436
2661
  }
2437
2662
  interface SubscriptionRate {
2438
2663
  /**
@@ -2445,6 +2670,18 @@ export declare namespace ContractCreateParams {
2445
2670
  */
2446
2671
  product_id: string;
2447
2672
  }
2673
+ interface BillingCycleConfig {
2674
+ /**
2675
+ * The date to anchor the billing cycle to. If omitted, defaults to the contract's
2676
+ * usage invoice billing cycle anchor date.
2677
+ */
2678
+ anchor_date?: string;
2679
+ /**
2680
+ * Controls whether this subscription consolidates onto usage invoices or gets its
2681
+ * own scheduled invoice. Defaults to ON_USAGE_INVOICE if omitted.
2682
+ */
2683
+ invoice_placement?: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
2684
+ }
2448
2685
  interface SeatConfig {
2449
2686
  /**
2450
2687
  * The initial assigned seats on this subscription.
@@ -3047,9 +3284,10 @@ export declare namespace ContractAmendParams {
3047
3284
  entitled?: boolean;
3048
3285
  /**
3049
3286
  * Indicates whether the override should only apply to commits. Defaults to
3050
- * `false`. If `true`, you can specify relevant commits in `override_specifiers` by
3051
- * passing `commit_ids`. if you do not specify `commit_ids`, then the override will
3052
- * apply when consuming any prepaid or postpaid commit.
3287
+ * `false`. If `true` you can specify relevant commits in `override_specifiers` by
3288
+ * passing `commit_ids`, `recurring_commit_ids`, or `any_commit_or_credit_ids`. If
3289
+ * you do not specify any of these fields, the override will apply when consuming
3290
+ * any prepaid commit, postpaid commit, or credit
3053
3291
  */
3054
3292
  is_commit_specific?: boolean;
3055
3293
  /**
@@ -3094,6 +3332,14 @@ export declare namespace ContractAmendParams {
3094
3332
  }
3095
3333
  namespace Override {
3096
3334
  interface OverrideSpecifier {
3335
+ /**
3336
+ * Can only be used for commit specific overrides. Must be used in conjunction with
3337
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
3338
+ * `presentation_group_values`. Must be used instead of both `commit_ids` and
3339
+ * `recurring_commit_ids` If provided, the override will apply to any specified
3340
+ * commit, credit, recurring commit or recurring credit IDs.
3341
+ */
3342
+ any_commit_or_credit_ids?: Array<string>;
3097
3343
  billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
3098
3344
  /**
3099
3345
  * Can only be used for commit specific overrides. Must be used in conjunction with
@@ -3424,6 +3670,38 @@ export interface ContractGetNetBalanceParams {
3424
3670
  */
3425
3671
  invoice_inclusion_mode?: 'FINALIZED' | 'FINALIZED_AND_DRAFT';
3426
3672
  }
3673
+ export interface ContractGetSubscriptionSeatsHistoryParams {
3674
+ contract_id: string;
3675
+ customer_id: string;
3676
+ subscription_id: string;
3677
+ /**
3678
+ * Get the seats history segment for the covering date. Cannot be used with
3679
+ * `starting_at` or `ending_before`.
3680
+ */
3681
+ covering_date?: string | null;
3682
+ /**
3683
+ * Cursor for pagination. Use the value from the `next_page` field of the previous
3684
+ * response to retrieve the next page of results.
3685
+ */
3686
+ cursor?: string | null;
3687
+ /**
3688
+ * Include seats history segments that are active at or before this timestamp. Use
3689
+ * with `starting_at` to get a specific time range. If not set, there's no upper
3690
+ * bound.
3691
+ */
3692
+ ending_before?: string | null;
3693
+ /**
3694
+ * Maximum number of seat schedule entries to return. Defaults to 10. Required
3695
+ * range: 1 <= x <= 10.
3696
+ */
3697
+ limit?: number | null;
3698
+ /**
3699
+ * Include seats history segments that are active at or after this timestamp. Use
3700
+ * with `ending_before` to get a specific time range. If not set, there's no lower
3701
+ * bound.
3702
+ */
3703
+ starting_at?: string | null;
3704
+ }
3427
3705
  export interface ContractListBalancesParams extends BodyCursorPageParams {
3428
3706
  customer_id: string;
3429
3707
  id?: string;
@@ -3508,6 +3786,11 @@ export interface ContractListSeatBalancesParams {
3508
3786
  * Optional filter to only include specific seats.
3509
3787
  */
3510
3788
  seat_ids?: Array<string>;
3789
+ /**
3790
+ * When true, any seat_ids not found in contract subscriptions will be silently
3791
+ * omitted from the response instead of returning a 400 error.
3792
+ */
3793
+ skip_missing_seat_ids?: boolean;
3511
3794
  /**
3512
3795
  * Include only commits or credits with access effective on or after this date
3513
3796
  * (cannot be used with covering_date).
@@ -3674,7 +3957,7 @@ export interface ContractUpdateEndDateParams {
3674
3957
  ending_before?: string;
3675
3958
  }
3676
3959
  export declare namespace Contracts {
3677
- export { type ContractCreateResponse as ContractCreateResponse, type ContractRetrieveResponse as ContractRetrieveResponse, type ContractListResponse as ContractListResponse, type ContractAmendResponse as ContractAmendResponse, type ContractArchiveResponse as ContractArchiveResponse, type ContractCreateHistoricalInvoicesResponse as ContractCreateHistoricalInvoicesResponse, type ContractGetNetBalanceResponse as ContractGetNetBalanceResponse, type ContractListBalancesResponse as ContractListBalancesResponse, type ContractListSeatBalancesResponse as ContractListSeatBalancesResponse, type ContractRetrieveRateScheduleResponse as ContractRetrieveRateScheduleResponse, type ContractRetrieveSubscriptionQuantityHistoryResponse as ContractRetrieveSubscriptionQuantityHistoryResponse, type ContractScheduleProServicesInvoiceResponse as ContractScheduleProServicesInvoiceResponse, type ContractUpdateEndDateResponse as ContractUpdateEndDateResponse, type ContractListBalancesResponsesBodyCursorPage as ContractListBalancesResponsesBodyCursorPage, type ContractCreateParams as ContractCreateParams, type ContractRetrieveParams as ContractRetrieveParams, type ContractListParams as ContractListParams, type ContractAddManualBalanceEntryParams as ContractAddManualBalanceEntryParams, type ContractAmendParams as ContractAmendParams, type ContractArchiveParams as ContractArchiveParams, type ContractCreateHistoricalInvoicesParams as ContractCreateHistoricalInvoicesParams, type ContractGetNetBalanceParams as ContractGetNetBalanceParams, type ContractListBalancesParams as ContractListBalancesParams, type ContractListSeatBalancesParams as ContractListSeatBalancesParams, type ContractRetrieveRateScheduleParams as ContractRetrieveRateScheduleParams, type ContractRetrieveSubscriptionQuantityHistoryParams as ContractRetrieveSubscriptionQuantityHistoryParams, type ContractScheduleProServicesInvoiceParams as ContractScheduleProServicesInvoiceParams, type ContractSetUsageFilterParams as ContractSetUsageFilterParams, type ContractUpdateEndDateParams as ContractUpdateEndDateParams, };
3960
+ export { type ContractCreateResponse as ContractCreateResponse, type ContractRetrieveResponse as ContractRetrieveResponse, type ContractListResponse as ContractListResponse, type ContractAmendResponse as ContractAmendResponse, type ContractArchiveResponse as ContractArchiveResponse, type ContractCreateHistoricalInvoicesResponse as ContractCreateHistoricalInvoicesResponse, type ContractGetNetBalanceResponse as ContractGetNetBalanceResponse, type ContractGetSubscriptionSeatsHistoryResponse as ContractGetSubscriptionSeatsHistoryResponse, type ContractListBalancesResponse as ContractListBalancesResponse, type ContractListSeatBalancesResponse as ContractListSeatBalancesResponse, type ContractRetrieveRateScheduleResponse as ContractRetrieveRateScheduleResponse, type ContractRetrieveSubscriptionQuantityHistoryResponse as ContractRetrieveSubscriptionQuantityHistoryResponse, type ContractScheduleProServicesInvoiceResponse as ContractScheduleProServicesInvoiceResponse, type ContractUpdateEndDateResponse as ContractUpdateEndDateResponse, type ContractListBalancesResponsesBodyCursorPage as ContractListBalancesResponsesBodyCursorPage, type ContractCreateParams as ContractCreateParams, type ContractRetrieveParams as ContractRetrieveParams, type ContractListParams as ContractListParams, type ContractAddManualBalanceEntryParams as ContractAddManualBalanceEntryParams, type ContractAmendParams as ContractAmendParams, type ContractArchiveParams as ContractArchiveParams, type ContractCreateHistoricalInvoicesParams as ContractCreateHistoricalInvoicesParams, type ContractGetNetBalanceParams as ContractGetNetBalanceParams, type ContractGetSubscriptionSeatsHistoryParams as ContractGetSubscriptionSeatsHistoryParams, type ContractListBalancesParams as ContractListBalancesParams, type ContractListSeatBalancesParams as ContractListSeatBalancesParams, type ContractRetrieveRateScheduleParams as ContractRetrieveRateScheduleParams, type ContractRetrieveSubscriptionQuantityHistoryParams as ContractRetrieveSubscriptionQuantityHistoryParams, type ContractScheduleProServicesInvoiceParams as ContractScheduleProServicesInvoiceParams, type ContractSetUsageFilterParams as ContractSetUsageFilterParams, type ContractUpdateEndDateParams as ContractUpdateEndDateParams, };
3678
3961
  export { Products as Products, type ProductListItemState as ProductListItemState, type QuantityConversion as QuantityConversion, type QuantityRounding as QuantityRounding, type ProductCreateResponse as ProductCreateResponse, type ProductRetrieveResponse as ProductRetrieveResponse, type ProductUpdateResponse as ProductUpdateResponse, type ProductListResponse as ProductListResponse, type ProductArchiveResponse as ProductArchiveResponse, type ProductListResponsesCursorPage as ProductListResponsesCursorPage, type ProductCreateParams as ProductCreateParams, type ProductRetrieveParams as ProductRetrieveParams, type ProductUpdateParams as ProductUpdateParams, type ProductListParams as ProductListParams, type ProductArchiveParams as ProductArchiveParams, };
3679
3962
  export { RateCards as RateCards, type RateCardCreateResponse as RateCardCreateResponse, type RateCardRetrieveResponse as RateCardRetrieveResponse, type RateCardUpdateResponse as RateCardUpdateResponse, type RateCardListResponse as RateCardListResponse, type RateCardArchiveResponse as RateCardArchiveResponse, type RateCardRetrieveRateScheduleResponse as RateCardRetrieveRateScheduleResponse, type RateCardListResponsesCursorPage as RateCardListResponsesCursorPage, type RateCardCreateParams as RateCardCreateParams, type RateCardRetrieveParams as RateCardRetrieveParams, type RateCardUpdateParams as RateCardUpdateParams, type RateCardListParams as RateCardListParams, type RateCardArchiveParams as RateCardArchiveParams, type RateCardRetrieveRateScheduleParams as RateCardRetrieveRateScheduleParams, };
3680
3963
  export { NamedSchedules as NamedSchedules, type NamedScheduleRetrieveResponse as NamedScheduleRetrieveResponse, type NamedScheduleRetrieveParams as NamedScheduleRetrieveParams, type NamedScheduleUpdateParams as NamedScheduleUpdateParams, };