@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
@@ -80,6 +80,11 @@ export interface Commit {
80
80
  */
81
81
  balance?: number;
82
82
  contract?: Commit.Contract;
83
+ /**
84
+ * The actor who created this commit. Omitted for system-generated commits such as
85
+ * recurring commits, rollover commits, and threshold commits.
86
+ */
87
+ created_by?: string;
83
88
  /**
84
89
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
85
90
  */
@@ -379,9 +384,6 @@ export interface Contract {
379
384
  custom_fields?: {
380
385
  [key: string]: string;
381
386
  };
382
- /**
383
- * The billing provider configuration associated with a contract.
384
- */
385
387
  customer_billing_provider_configuration?: Contract.CustomerBillingProviderConfiguration;
386
388
  /**
387
389
  * ID of the package this contract was created from, if applicable.
@@ -458,21 +460,40 @@ export declare namespace Contract {
458
460
  starting_at?: string;
459
461
  }
460
462
  }
461
- /**
462
- * The billing provider configuration associated with a contract.
463
- */
464
463
  interface CustomerBillingProviderConfiguration {
464
+ /**
465
+ * ID of this configuration; can be provided as the
466
+ * billing_provider_configuration_id when creating a contract.
467
+ */
468
+ id: string;
465
469
  archived_at: string | null;
470
+ /**
471
+ * The billing provider set for this configuration.
472
+ */
466
473
  billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace' | 'metronome';
467
- delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
468
- id?: string;
469
474
  /**
470
475
  * Configuration for the billing provider. The structure of this object is specific
471
476
  * to the billing provider.
472
477
  */
473
- configuration?: {
478
+ configuration: {
479
+ [key: string]: unknown;
480
+ };
481
+ customer_id: string;
482
+ /**
483
+ * The method to use for delivering invoices to this customer.
484
+ */
485
+ delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
486
+ /**
487
+ * Configuration for the delivery method. The structure of this object is specific
488
+ * to the delivery method.
489
+ */
490
+ delivery_method_configuration: {
474
491
  [key: string]: unknown;
475
492
  };
493
+ /**
494
+ * ID of the delivery method to use for this customer.
495
+ */
496
+ delivery_method_id: string;
476
497
  }
477
498
  interface SpendTracker {
478
499
  /**
@@ -510,6 +531,11 @@ export interface ContractV2 {
510
531
  usage_filter: Array<ContractV2.UsageFilter>;
511
532
  usage_statement_schedule: ContractV2.UsageStatementSchedule;
512
533
  archived_at?: string;
534
+ /**
535
+ * The schedule of billing provider configuration changes on the contract, ordered
536
+ * by effective_at ascending.
537
+ */
538
+ billing_provider_configuration_schedule?: Array<ContractV2.BillingProviderConfigurationSchedule>;
513
539
  credits?: Array<ContractV2.Credit>;
514
540
  /**
515
541
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
@@ -517,9 +543,6 @@ export interface ContractV2 {
517
543
  custom_fields?: {
518
544
  [key: string]: string;
519
545
  };
520
- /**
521
- * This field's availability is dependent on your client's configuration.
522
- */
523
546
  customer_billing_provider_configuration?: ContractV2.CustomerBillingProviderConfiguration;
524
547
  /**
525
548
  * This field's availability is dependent on your client's configuration.
@@ -565,6 +588,11 @@ export interface ContractV2 {
565
588
  * This field's availability is dependent on your client's configuration.
566
589
  */
567
590
  reseller_royalties?: Array<ContractV2.ResellerRoyalty>;
591
+ /**
592
+ * The schedule of revenue system configuration changes on the contract, ordered by
593
+ * effective_at ascending.
594
+ */
595
+ revenue_system_configuration_schedule?: Array<ContractV2.RevenueSystemConfigurationSchedule>;
568
596
  /**
569
597
  * This field's availability is dependent on your client's configuration.
570
598
  */
@@ -626,6 +654,11 @@ export declare namespace ContractV2 {
626
654
  */
627
655
  balance?: number;
628
656
  contract?: Commit.Contract;
657
+ /**
658
+ * The actor who created this commit. Omitted for system-generated commits such as
659
+ * recurring commits, rollover commits, and threshold commits.
660
+ */
661
+ created_by?: string;
629
662
  /**
630
663
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
631
664
  */
@@ -827,6 +860,7 @@ export declare namespace ContractV2 {
827
860
  }
828
861
  namespace Override {
829
862
  interface OverrideSpecifier {
863
+ any_commit_or_credit_ids?: Array<string>;
830
864
  billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
831
865
  commit_ids?: Array<string>;
832
866
  presentation_group_values?: {
@@ -899,6 +933,55 @@ export declare namespace ContractV2 {
899
933
  billing_anchor_date: string;
900
934
  frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
901
935
  }
936
+ interface BillingProviderConfigurationSchedule {
937
+ billing_provider_configuration: BillingProviderConfigurationSchedule.BillingProviderConfiguration;
938
+ /**
939
+ * The date this billing provider configuration became or becomes active.
940
+ */
941
+ effective_at: string;
942
+ /**
943
+ * The date this billing provider configuration is superseded by the next entry.
944
+ * Null for the last entry in the schedule.
945
+ */
946
+ effective_until?: string;
947
+ }
948
+ namespace BillingProviderConfigurationSchedule {
949
+ interface BillingProviderConfiguration {
950
+ /**
951
+ * ID of this configuration; can be provided as the
952
+ * billing_provider_configuration_id when creating a contract.
953
+ */
954
+ id: string;
955
+ archived_at: string | null;
956
+ /**
957
+ * The billing provider set for this configuration.
958
+ */
959
+ billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace' | 'metronome';
960
+ /**
961
+ * Configuration for the billing provider. The structure of this object is specific
962
+ * to the billing provider.
963
+ */
964
+ configuration: {
965
+ [key: string]: unknown;
966
+ };
967
+ customer_id: string;
968
+ /**
969
+ * The method to use for delivering invoices to this customer.
970
+ */
971
+ delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
972
+ /**
973
+ * Configuration for the delivery method. The structure of this object is specific
974
+ * to the delivery method.
975
+ */
976
+ delivery_method_configuration: {
977
+ [key: string]: unknown;
978
+ };
979
+ /**
980
+ * ID of the delivery method to use for this customer.
981
+ */
982
+ delivery_method_id: string;
983
+ }
984
+ }
902
985
  interface Credit {
903
986
  id: string;
904
987
  product: Credit.Product;
@@ -930,6 +1013,11 @@ export declare namespace ContractV2 {
930
1013
  * start date
931
1014
  */
932
1015
  created_at?: string;
1016
+ /**
1017
+ * The actor who created this credit. Omitted for system-generated credits such as
1018
+ * recurring credits.
1019
+ */
1020
+ created_by?: string;
933
1021
  /**
934
1022
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
935
1023
  */
@@ -1044,16 +1132,40 @@ export declare namespace ContractV2 {
1044
1132
  credit_id: string;
1045
1133
  }
1046
1134
  }
1047
- /**
1048
- * This field's availability is dependent on your client's configuration.
1049
- */
1050
1135
  interface CustomerBillingProviderConfiguration {
1051
1136
  /**
1052
- * ID of Customer's billing provider configuration.
1137
+ * ID of this configuration; can be provided as the
1138
+ * billing_provider_configuration_id when creating a contract.
1053
1139
  */
1054
1140
  id: string;
1141
+ archived_at: string | null;
1142
+ /**
1143
+ * The billing provider set for this configuration.
1144
+ */
1055
1145
  billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace' | 'metronome';
1146
+ /**
1147
+ * Configuration for the billing provider. The structure of this object is specific
1148
+ * to the billing provider.
1149
+ */
1150
+ configuration: {
1151
+ [key: string]: unknown;
1152
+ };
1153
+ customer_id: string;
1154
+ /**
1155
+ * The method to use for delivering invoices to this customer.
1156
+ */
1056
1157
  delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
1158
+ /**
1159
+ * Configuration for the delivery method. The structure of this object is specific
1160
+ * to the delivery method.
1161
+ */
1162
+ delivery_method_configuration: {
1163
+ [key: string]: unknown;
1164
+ };
1165
+ /**
1166
+ * ID of the delivery method to use for this customer.
1167
+ */
1168
+ delivery_method_id: string;
1057
1169
  }
1058
1170
  /**
1059
1171
  * Indicates whether there are more items than the limit for this endpoint. Use the
@@ -1191,6 +1303,10 @@ export declare namespace ContractV2 {
1191
1303
  * the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1192
1304
  */
1193
1305
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
1306
+ /**
1307
+ * Rounding configuration for prorated recurring commit amounts.
1308
+ */
1309
+ proration_rounding?: RecurringCommit.ProrationRounding | null;
1194
1310
  /**
1195
1311
  * The frequency at which the recurring commits will be created. If not provided: -
1196
1312
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -1198,7 +1314,7 @@ export declare namespace ContractV2 {
1198
1314
  * be created aligned with the recurring commit's starting_at rather than the usage
1199
1315
  * invoice dates.
1200
1316
  */
1201
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1317
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
1202
1318
  /**
1203
1319
  * Will be passed down to the individual commits. This controls how much of an
1204
1320
  * individual unexpired commit will roll over upon contract transition. Must be
@@ -1247,6 +1363,33 @@ export declare namespace ContractV2 {
1247
1363
  quantity: number;
1248
1364
  unit_price: number;
1249
1365
  }
1366
+ /**
1367
+ * Rounding configuration for prorated recurring commit amounts.
1368
+ */
1369
+ interface ProrationRounding {
1370
+ access?: ProrationRounding.Access;
1371
+ invoice?: ProrationRounding.Invoice;
1372
+ }
1373
+ namespace ProrationRounding {
1374
+ interface Access {
1375
+ /**
1376
+ * Number of decimal places to round to. Applied directly to the stored monetary
1377
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1378
+ * nearest 100 in the stored unit).
1379
+ */
1380
+ decimal_places: number;
1381
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1382
+ }
1383
+ interface Invoice {
1384
+ /**
1385
+ * Number of decimal places to round to. Applied directly to the stored monetary
1386
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1387
+ * nearest 100 in the stored unit).
1388
+ */
1389
+ decimal_places: number;
1390
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1391
+ }
1392
+ }
1250
1393
  }
1251
1394
  interface RecurringCredit {
1252
1395
  id: string;
@@ -1305,6 +1448,10 @@ export declare namespace ContractV2 {
1305
1448
  * the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1306
1449
  */
1307
1450
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
1451
+ /**
1452
+ * Rounding configuration for prorated recurring credit amounts.
1453
+ */
1454
+ proration_rounding?: RecurringCredit.ProrationRounding | null;
1308
1455
  /**
1309
1456
  * The frequency at which the recurring commits will be created. If not provided: -
1310
1457
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -1312,7 +1459,7 @@ export declare namespace ContractV2 {
1312
1459
  * be created aligned with the recurring commit's starting_at rather than the usage
1313
1460
  * invoice dates.
1314
1461
  */
1315
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1462
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
1316
1463
  /**
1317
1464
  * Will be passed down to the individual commits. This controls how much of an
1318
1465
  * individual unexpired commit will roll over upon contract transition. Must be
@@ -1353,6 +1500,23 @@ export declare namespace ContractV2 {
1353
1500
  interface Contract {
1354
1501
  id: string;
1355
1502
  }
1503
+ /**
1504
+ * Rounding configuration for prorated recurring credit amounts.
1505
+ */
1506
+ interface ProrationRounding {
1507
+ access?: ProrationRounding.Access;
1508
+ }
1509
+ namespace ProrationRounding {
1510
+ interface Access {
1511
+ /**
1512
+ * Number of decimal places to round to. Applied directly to the stored monetary
1513
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1514
+ * nearest 100 in the stored unit).
1515
+ */
1516
+ decimal_places: number;
1517
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1518
+ }
1519
+ }
1356
1520
  }
1357
1521
  interface ResellerRoyalty {
1358
1522
  reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
@@ -1375,6 +1539,54 @@ export declare namespace ContractV2 {
1375
1539
  reseller_contract_value?: number;
1376
1540
  }
1377
1541
  }
1542
+ interface RevenueSystemConfigurationSchedule {
1543
+ /**
1544
+ * The date this revenue system configuration became or becomes active.
1545
+ */
1546
+ effective_at: string;
1547
+ revenue_system_configuration: RevenueSystemConfigurationSchedule.RevenueSystemConfiguration;
1548
+ /**
1549
+ * The date this revenue system configuration is superseded by the next entry. Null
1550
+ * for the last entry in the schedule.
1551
+ */
1552
+ effective_until?: string;
1553
+ }
1554
+ namespace RevenueSystemConfigurationSchedule {
1555
+ interface RevenueSystemConfiguration {
1556
+ /**
1557
+ * ID of the revenue system configuration.
1558
+ */
1559
+ id: string;
1560
+ /**
1561
+ * Configuration for the revenue system. The structure of this object is specific
1562
+ * to the provider.
1563
+ */
1564
+ configuration: {
1565
+ [key: string]: unknown;
1566
+ };
1567
+ customer_id: string;
1568
+ /**
1569
+ * ID of the delivery method used for this customer configuration.
1570
+ */
1571
+ delivery_method_id: string;
1572
+ /**
1573
+ * The revenue system provider (e.g. netsuite).
1574
+ */
1575
+ provider: 'netsuite';
1576
+ archived_at?: string | null;
1577
+ /**
1578
+ * The method to use for delivering data to the revenue system.
1579
+ */
1580
+ delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
1581
+ /**
1582
+ * Configuration for the delivery method. The structure of this object is specific
1583
+ * to the delivery method.
1584
+ */
1585
+ delivery_method_configuration?: {
1586
+ [key: string]: unknown;
1587
+ };
1588
+ }
1589
+ }
1378
1590
  interface SpendTracker {
1379
1591
  /**
1380
1592
  * Human-readable identifier, unique per contract.
@@ -1424,6 +1636,7 @@ export declare namespace ContractV2 {
1424
1636
  starting_at: string;
1425
1637
  subscription_rate: Subscription.SubscriptionRate;
1426
1638
  id?: string;
1639
+ billing_cycle_config?: Subscription.BillingCycleConfig;
1427
1640
  /**
1428
1641
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1429
1642
  */
@@ -1462,6 +1675,18 @@ export declare namespace ContractV2 {
1462
1675
  interface Proration {
1463
1676
  invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
1464
1677
  is_prorated: boolean;
1678
+ rounding?: Proration.Rounding;
1679
+ }
1680
+ namespace Proration {
1681
+ interface Rounding {
1682
+ /**
1683
+ * Number of decimal places to round to. Applied directly to the stored monetary
1684
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1685
+ * nearest 100 in the stored unit).
1686
+ */
1687
+ decimal_places: number;
1688
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1689
+ }
1465
1690
  }
1466
1691
  interface QuantitySchedule {
1467
1692
  quantity: number;
@@ -1478,6 +1703,17 @@ export declare namespace ContractV2 {
1478
1703
  name: string;
1479
1704
  }
1480
1705
  }
1706
+ interface BillingCycleConfig {
1707
+ /**
1708
+ * The date this subscription's billing cycle is anchored to.
1709
+ */
1710
+ anchor_date: string;
1711
+ /**
1712
+ * Controls whether this subscription consolidates onto usage invoices or gets its
1713
+ * own scheduled invoice.
1714
+ */
1715
+ invoice_placement: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
1716
+ }
1481
1717
  interface SeatConfig {
1482
1718
  /**
1483
1719
  * The property name, sent on usage events, that identifies the seat ID associated
@@ -1626,6 +1862,10 @@ export declare namespace ContractWithoutAmendments {
1626
1862
  * the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1627
1863
  */
1628
1864
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
1865
+ /**
1866
+ * Rounding configuration for prorated recurring commit amounts.
1867
+ */
1868
+ proration_rounding?: RecurringCommit.ProrationRounding | null;
1629
1869
  /**
1630
1870
  * The frequency at which the recurring commits will be created. If not provided: -
1631
1871
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -1633,7 +1873,7 @@ export declare namespace ContractWithoutAmendments {
1633
1873
  * be created aligned with the recurring commit's starting_at rather than the usage
1634
1874
  * invoice dates.
1635
1875
  */
1636
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1876
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
1637
1877
  /**
1638
1878
  * Will be passed down to the individual commits. This controls how much of an
1639
1879
  * individual unexpired commit will roll over upon contract transition. Must be
@@ -1682,6 +1922,35 @@ export declare namespace ContractWithoutAmendments {
1682
1922
  quantity: number;
1683
1923
  unit_price: number;
1684
1924
  }
1925
+ /**
1926
+ * Rounding configuration for prorated recurring commit amounts.
1927
+ */
1928
+ interface ProrationRounding {
1929
+ access?: ProrationRounding.Access;
1930
+ invoice?: ProrationRounding.Invoice;
1931
+ }
1932
+ namespace ProrationRounding {
1933
+ interface Access {
1934
+ /**
1935
+ * Number of decimal places to round to. Applied directly to the stored monetary
1936
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1937
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
1938
+ * dollar).
1939
+ */
1940
+ decimal_places: number;
1941
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1942
+ }
1943
+ interface Invoice {
1944
+ /**
1945
+ * Number of decimal places to round to. Applied directly to the stored monetary
1946
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1947
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
1948
+ * dollar).
1949
+ */
1950
+ decimal_places: number;
1951
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1952
+ }
1953
+ }
1685
1954
  }
1686
1955
  interface RecurringCredit {
1687
1956
  id: string;
@@ -1740,6 +2009,10 @@ export declare namespace ContractWithoutAmendments {
1740
2009
  * the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1741
2010
  */
1742
2011
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
2012
+ /**
2013
+ * Rounding configuration for prorated recurring credit amounts.
2014
+ */
2015
+ proration_rounding?: RecurringCredit.ProrationRounding | null;
1743
2016
  /**
1744
2017
  * The frequency at which the recurring commits will be created. If not provided: -
1745
2018
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -1747,7 +2020,7 @@ export declare namespace ContractWithoutAmendments {
1747
2020
  * be created aligned with the recurring commit's starting_at rather than the usage
1748
2021
  * invoice dates.
1749
2022
  */
1750
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
2023
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
1751
2024
  /**
1752
2025
  * Will be passed down to the individual commits. This controls how much of an
1753
2026
  * individual unexpired commit will roll over upon contract transition. Must be
@@ -1788,6 +2061,24 @@ export declare namespace ContractWithoutAmendments {
1788
2061
  interface Contract {
1789
2062
  id: string;
1790
2063
  }
2064
+ /**
2065
+ * Rounding configuration for prorated recurring credit amounts.
2066
+ */
2067
+ interface ProrationRounding {
2068
+ access?: ProrationRounding.Access;
2069
+ }
2070
+ namespace ProrationRounding {
2071
+ interface Access {
2072
+ /**
2073
+ * Number of decimal places to round to. Applied directly to the stored monetary
2074
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2075
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
2076
+ * dollar).
2077
+ */
2078
+ decimal_places: number;
2079
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2080
+ }
2081
+ }
1791
2082
  }
1792
2083
  interface ResellerRoyalty {
1793
2084
  fraction: number;
@@ -1862,6 +2153,11 @@ export interface Credit {
1862
2153
  */
1863
2154
  balance?: number;
1864
2155
  contract?: Credit.Contract;
2156
+ /**
2157
+ * The actor who created this credit. Omitted for system-generated credits such as
2158
+ * recurring credits.
2159
+ */
2160
+ created_by?: string;
1865
2161
  /**
1866
2162
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1867
2163
  */
@@ -2161,6 +2457,7 @@ export interface Override {
2161
2457
  }
2162
2458
  export declare namespace Override {
2163
2459
  interface OverrideSpecifier {
2460
+ any_commit_or_credit_ids?: Array<string>;
2164
2461
  billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
2165
2462
  commit_ids?: Array<string>;
2166
2463
  presentation_group_values?: {
@@ -2347,6 +2644,10 @@ export interface PrepaidBalanceThresholdConfiguration {
2347
2644
  */
2348
2645
  custom_credit_type_id?: string;
2349
2646
  discount_configuration?: PrepaidBalanceThresholdConfiguration.DiscountConfiguration;
2647
+ /**
2648
+ * Determines which balances are excluded from remaining balance calculation for
2649
+ * threshold billing.
2650
+ */
2350
2651
  threshold_balance_specifiers?: Array<PrepaidBalanceThresholdConfiguration.ThresholdBalanceSpecifier>;
2351
2652
  }
2352
2653
  export declare namespace PrepaidBalanceThresholdConfiguration {
@@ -2401,6 +2702,10 @@ export declare namespace PrepaidBalanceThresholdConfiguration {
2401
2702
  }
2402
2703
  }
2403
2704
  interface ThresholdBalanceSpecifier {
2705
+ /**
2706
+ * If any of the exclude specifier is met, the balance is not considered when
2707
+ * evaluating threshold billing
2708
+ */
2404
2709
  exclude: Array<ThresholdBalanceSpecifier.Exclude>;
2405
2710
  }
2406
2711
  namespace ThresholdBalanceSpecifier {
@@ -2444,6 +2749,10 @@ export interface PrepaidBalanceThresholdConfigurationV2 {
2444
2749
  */
2445
2750
  custom_credit_type_id?: string;
2446
2751
  discount_configuration?: PrepaidBalanceThresholdConfigurationV2.DiscountConfiguration;
2752
+ /**
2753
+ * Determines which balances are excluded from remaining balance calculation for
2754
+ * threshold billing.
2755
+ */
2447
2756
  threshold_balance_specifiers?: Array<PrepaidBalanceThresholdConfigurationV2.ThresholdBalanceSpecifier>;
2448
2757
  }
2449
2758
  export declare namespace PrepaidBalanceThresholdConfigurationV2 {
@@ -2798,6 +3107,7 @@ export interface Subscription {
2798
3107
  starting_at: string;
2799
3108
  subscription_rate: Subscription.SubscriptionRate;
2800
3109
  id?: string;
3110
+ billing_cycle_config?: Subscription.BillingCycleConfig;
2801
3111
  /**
2802
3112
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2803
3113
  */
@@ -2836,6 +3146,19 @@ export declare namespace Subscription {
2836
3146
  interface Proration {
2837
3147
  invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
2838
3148
  is_prorated: boolean;
3149
+ rounding?: Proration.Rounding;
3150
+ }
3151
+ namespace Proration {
3152
+ interface Rounding {
3153
+ /**
3154
+ * Number of decimal places to round to. Applied directly to the stored monetary
3155
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
3156
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
3157
+ * dollar).
3158
+ */
3159
+ decimal_places: number;
3160
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
3161
+ }
2839
3162
  }
2840
3163
  interface QuantitySchedule {
2841
3164
  quantity: number;
@@ -2852,6 +3175,17 @@ export declare namespace Subscription {
2852
3175
  name: string;
2853
3176
  }
2854
3177
  }
3178
+ interface BillingCycleConfig {
3179
+ /**
3180
+ * The date this subscription's billing cycle is anchored to.
3181
+ */
3182
+ anchor_date: string;
3183
+ /**
3184
+ * Controls whether this subscription consolidates onto usage invoices or gets its
3185
+ * own scheduled invoice.
3186
+ */
3187
+ invoice_placement: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
3188
+ }
2855
3189
  interface SeatConfig {
2856
3190
  /**
2857
3191
  * The property name, sent on usage events, that identifies the seat ID associated