@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.
- package/CHANGELOG.md +47 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +9 -1
- package/client.js.map +1 -1
- package/client.mjs +9 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/shared.d.mts +354 -20
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +354 -20
- package/resources/shared.d.ts.map +1 -1
- package/resources/v1/alerts.d.mts +39 -0
- package/resources/v1/alerts.d.mts.map +1 -1
- package/resources/v1/alerts.d.ts +39 -0
- package/resources/v1/alerts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.d.mts +303 -20
- package/resources/v1/contracts/contracts.d.mts.map +1 -1
- package/resources/v1/contracts/contracts.d.ts +303 -20
- package/resources/v1/contracts/contracts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.js +43 -0
- package/resources/v1/contracts/contracts.js.map +1 -1
- package/resources/v1/contracts/contracts.mjs +43 -0
- package/resources/v1/contracts/contracts.mjs.map +1 -1
- package/resources/v1/contracts/index.d.mts +1 -1
- package/resources/v1/contracts/index.d.mts.map +1 -1
- package/resources/v1/contracts/index.d.ts +1 -1
- package/resources/v1/contracts/index.d.ts.map +1 -1
- package/resources/v1/contracts/index.js.map +1 -1
- package/resources/v1/contracts/index.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.d.mts +4 -0
- package/resources/v1/contracts/rate-cards/rates.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.d.ts +4 -0
- package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.js +4 -0
- package/resources/v1/contracts/rate-cards/rates.js.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.mjs +4 -0
- package/resources/v1/contracts/rate-cards/rates.mjs.map +1 -1
- package/resources/v1/customers/alerts.d.mts +79 -2
- package/resources/v1/customers/alerts.d.mts.map +1 -1
- package/resources/v1/customers/alerts.d.ts +79 -2
- package/resources/v1/customers/alerts.d.ts.map +1 -1
- package/resources/v1/customers/alerts.js +1 -1
- package/resources/v1/customers/alerts.mjs +1 -1
- package/resources/v1/customers/invoices.d.mts +5 -0
- package/resources/v1/customers/invoices.d.mts.map +1 -1
- package/resources/v1/customers/invoices.d.ts +5 -0
- package/resources/v1/customers/invoices.d.ts.map +1 -1
- package/resources/v1/dashboards.d.mts +8 -3
- package/resources/v1/dashboards.d.mts.map +1 -1
- package/resources/v1/dashboards.d.ts +8 -3
- package/resources/v1/dashboards.d.ts.map +1 -1
- package/resources/v1/dashboards.js +7 -2
- package/resources/v1/dashboards.js.map +1 -1
- package/resources/v1/dashboards.mjs +7 -2
- package/resources/v1/dashboards.mjs.map +1 -1
- package/resources/v1/index.d.mts +1 -1
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +1 -1
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/packages.d.mts +240 -9
- package/resources/v1/packages.d.mts.map +1 -1
- package/resources/v1/packages.d.ts +240 -9
- package/resources/v1/packages.d.ts.map +1 -1
- package/resources/v1/v1.d.mts +2 -2
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +2 -2
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v2/contracts.d.mts +429 -8
- package/resources/v2/contracts.d.mts.map +1 -1
- package/resources/v2/contracts.d.ts +429 -8
- package/resources/v2/contracts.d.ts.map +1 -1
- package/src/client.ts +9 -1
- package/src/resources/shared.ts +422 -21
- package/src/resources/v1/alerts.ts +49 -0
- package/src/resources/v1/contracts/contracts.ts +356 -19
- package/src/resources/v1/contracts/index.ts +2 -0
- package/src/resources/v1/contracts/rate-cards/rates.ts +4 -0
- package/src/resources/v1/customers/alerts.ts +99 -2
- package/src/resources/v1/customers/invoices.ts +6 -0
- package/src/resources/v1/dashboards.ts +10 -3
- package/src/resources/v1/index.ts +2 -0
- package/src/resources/v1/packages.ts +291 -9
- package/src/resources/v1/v1.ts +4 -0
- package/src/resources/v2/contracts.ts +519 -8
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/shared.ts
CHANGED
|
@@ -103,6 +103,12 @@ export interface Commit {
|
|
|
103
103
|
|
|
104
104
|
contract?: Commit.Contract;
|
|
105
105
|
|
|
106
|
+
/**
|
|
107
|
+
* The actor who created this commit. Omitted for system-generated commits such as
|
|
108
|
+
* recurring commits, rollover commits, and threshold commits.
|
|
109
|
+
*/
|
|
110
|
+
created_by?: string;
|
|
111
|
+
|
|
106
112
|
/**
|
|
107
113
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
108
114
|
*/
|
|
@@ -525,9 +531,6 @@ export interface Contract {
|
|
|
525
531
|
*/
|
|
526
532
|
custom_fields?: { [key: string]: string };
|
|
527
533
|
|
|
528
|
-
/**
|
|
529
|
-
* The billing provider configuration associated with a contract.
|
|
530
|
-
*/
|
|
531
534
|
customer_billing_provider_configuration?: Contract.CustomerBillingProviderConfiguration;
|
|
532
535
|
|
|
533
536
|
/**
|
|
@@ -636,12 +639,18 @@ export namespace Contract {
|
|
|
636
639
|
}
|
|
637
640
|
}
|
|
638
641
|
|
|
639
|
-
/**
|
|
640
|
-
* The billing provider configuration associated with a contract.
|
|
641
|
-
*/
|
|
642
642
|
export interface CustomerBillingProviderConfiguration {
|
|
643
|
+
/**
|
|
644
|
+
* ID of this configuration; can be provided as the
|
|
645
|
+
* billing_provider_configuration_id when creating a contract.
|
|
646
|
+
*/
|
|
647
|
+
id: string;
|
|
648
|
+
|
|
643
649
|
archived_at: string | null;
|
|
644
650
|
|
|
651
|
+
/**
|
|
652
|
+
* The billing provider set for this configuration.
|
|
653
|
+
*/
|
|
645
654
|
billing_provider:
|
|
646
655
|
| 'aws_marketplace'
|
|
647
656
|
| 'stripe'
|
|
@@ -653,15 +662,29 @@ export namespace Contract {
|
|
|
653
662
|
| 'gcp_marketplace'
|
|
654
663
|
| 'metronome';
|
|
655
664
|
|
|
665
|
+
/**
|
|
666
|
+
* Configuration for the billing provider. The structure of this object is specific
|
|
667
|
+
* to the billing provider.
|
|
668
|
+
*/
|
|
669
|
+
configuration: { [key: string]: unknown };
|
|
670
|
+
|
|
671
|
+
customer_id: string;
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* The method to use for delivering invoices to this customer.
|
|
675
|
+
*/
|
|
656
676
|
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
657
677
|
|
|
658
|
-
|
|
678
|
+
/**
|
|
679
|
+
* Configuration for the delivery method. The structure of this object is specific
|
|
680
|
+
* to the delivery method.
|
|
681
|
+
*/
|
|
682
|
+
delivery_method_configuration: { [key: string]: unknown };
|
|
659
683
|
|
|
660
684
|
/**
|
|
661
|
-
*
|
|
662
|
-
* to the billing provider.
|
|
685
|
+
* ID of the delivery method to use for this customer.
|
|
663
686
|
*/
|
|
664
|
-
|
|
687
|
+
delivery_method_id: string;
|
|
665
688
|
}
|
|
666
689
|
|
|
667
690
|
export interface SpendTracker {
|
|
@@ -723,6 +746,12 @@ export interface ContractV2 {
|
|
|
723
746
|
|
|
724
747
|
archived_at?: string;
|
|
725
748
|
|
|
749
|
+
/**
|
|
750
|
+
* The schedule of billing provider configuration changes on the contract, ordered
|
|
751
|
+
* by effective_at ascending.
|
|
752
|
+
*/
|
|
753
|
+
billing_provider_configuration_schedule?: Array<ContractV2.BillingProviderConfigurationSchedule>;
|
|
754
|
+
|
|
726
755
|
credits?: Array<ContractV2.Credit>;
|
|
727
756
|
|
|
728
757
|
/**
|
|
@@ -730,9 +759,6 @@ export interface ContractV2 {
|
|
|
730
759
|
*/
|
|
731
760
|
custom_fields?: { [key: string]: string };
|
|
732
761
|
|
|
733
|
-
/**
|
|
734
|
-
* This field's availability is dependent on your client's configuration.
|
|
735
|
-
*/
|
|
736
762
|
customer_billing_provider_configuration?: ContractV2.CustomerBillingProviderConfiguration;
|
|
737
763
|
|
|
738
764
|
/**
|
|
@@ -796,6 +822,12 @@ export interface ContractV2 {
|
|
|
796
822
|
*/
|
|
797
823
|
reseller_royalties?: Array<ContractV2.ResellerRoyalty>;
|
|
798
824
|
|
|
825
|
+
/**
|
|
826
|
+
* The schedule of revenue system configuration changes on the contract, ordered by
|
|
827
|
+
* effective_at ascending.
|
|
828
|
+
*/
|
|
829
|
+
revenue_system_configuration_schedule?: Array<ContractV2.RevenueSystemConfigurationSchedule>;
|
|
830
|
+
|
|
799
831
|
/**
|
|
800
832
|
* This field's availability is dependent on your client's configuration.
|
|
801
833
|
*/
|
|
@@ -875,6 +907,12 @@ export namespace ContractV2 {
|
|
|
875
907
|
|
|
876
908
|
contract?: Commit.Contract;
|
|
877
909
|
|
|
910
|
+
/**
|
|
911
|
+
* The actor who created this commit. Omitted for system-generated commits such as
|
|
912
|
+
* recurring commits, rollover commits, and threshold commits.
|
|
913
|
+
*/
|
|
914
|
+
created_by?: string;
|
|
915
|
+
|
|
878
916
|
/**
|
|
879
917
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
880
918
|
*/
|
|
@@ -1193,6 +1231,8 @@ export namespace ContractV2 {
|
|
|
1193
1231
|
|
|
1194
1232
|
export namespace Override {
|
|
1195
1233
|
export interface OverrideSpecifier {
|
|
1234
|
+
any_commit_or_credit_ids?: Array<string>;
|
|
1235
|
+
|
|
1196
1236
|
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1197
1237
|
|
|
1198
1238
|
commit_ids?: Array<string>;
|
|
@@ -1284,6 +1324,71 @@ export namespace ContractV2 {
|
|
|
1284
1324
|
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1285
1325
|
}
|
|
1286
1326
|
|
|
1327
|
+
export interface BillingProviderConfigurationSchedule {
|
|
1328
|
+
billing_provider_configuration: BillingProviderConfigurationSchedule.BillingProviderConfiguration;
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
* The date this billing provider configuration became or becomes active.
|
|
1332
|
+
*/
|
|
1333
|
+
effective_at: string;
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* The date this billing provider configuration is superseded by the next entry.
|
|
1337
|
+
* Null for the last entry in the schedule.
|
|
1338
|
+
*/
|
|
1339
|
+
effective_until?: string;
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
export namespace BillingProviderConfigurationSchedule {
|
|
1343
|
+
export interface BillingProviderConfiguration {
|
|
1344
|
+
/**
|
|
1345
|
+
* ID of this configuration; can be provided as the
|
|
1346
|
+
* billing_provider_configuration_id when creating a contract.
|
|
1347
|
+
*/
|
|
1348
|
+
id: string;
|
|
1349
|
+
|
|
1350
|
+
archived_at: string | null;
|
|
1351
|
+
|
|
1352
|
+
/**
|
|
1353
|
+
* The billing provider set for this configuration.
|
|
1354
|
+
*/
|
|
1355
|
+
billing_provider:
|
|
1356
|
+
| 'aws_marketplace'
|
|
1357
|
+
| 'stripe'
|
|
1358
|
+
| 'netsuite'
|
|
1359
|
+
| 'custom'
|
|
1360
|
+
| 'azure_marketplace'
|
|
1361
|
+
| 'quickbooks_online'
|
|
1362
|
+
| 'workday'
|
|
1363
|
+
| 'gcp_marketplace'
|
|
1364
|
+
| 'metronome';
|
|
1365
|
+
|
|
1366
|
+
/**
|
|
1367
|
+
* Configuration for the billing provider. The structure of this object is specific
|
|
1368
|
+
* to the billing provider.
|
|
1369
|
+
*/
|
|
1370
|
+
configuration: { [key: string]: unknown };
|
|
1371
|
+
|
|
1372
|
+
customer_id: string;
|
|
1373
|
+
|
|
1374
|
+
/**
|
|
1375
|
+
* The method to use for delivering invoices to this customer.
|
|
1376
|
+
*/
|
|
1377
|
+
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
1378
|
+
|
|
1379
|
+
/**
|
|
1380
|
+
* Configuration for the delivery method. The structure of this object is specific
|
|
1381
|
+
* to the delivery method.
|
|
1382
|
+
*/
|
|
1383
|
+
delivery_method_configuration: { [key: string]: unknown };
|
|
1384
|
+
|
|
1385
|
+
/**
|
|
1386
|
+
* ID of the delivery method to use for this customer.
|
|
1387
|
+
*/
|
|
1388
|
+
delivery_method_id: string;
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1287
1392
|
export interface Credit {
|
|
1288
1393
|
id: string;
|
|
1289
1394
|
|
|
@@ -1326,6 +1431,12 @@ export namespace ContractV2 {
|
|
|
1326
1431
|
*/
|
|
1327
1432
|
created_at?: string;
|
|
1328
1433
|
|
|
1434
|
+
/**
|
|
1435
|
+
* The actor who created this credit. Omitted for system-generated credits such as
|
|
1436
|
+
* recurring credits.
|
|
1437
|
+
*/
|
|
1438
|
+
created_by?: string;
|
|
1439
|
+
|
|
1329
1440
|
/**
|
|
1330
1441
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1331
1442
|
*/
|
|
@@ -1503,15 +1614,18 @@ export namespace ContractV2 {
|
|
|
1503
1614
|
}
|
|
1504
1615
|
}
|
|
1505
1616
|
|
|
1506
|
-
/**
|
|
1507
|
-
* This field's availability is dependent on your client's configuration.
|
|
1508
|
-
*/
|
|
1509
1617
|
export interface CustomerBillingProviderConfiguration {
|
|
1510
1618
|
/**
|
|
1511
|
-
* ID of
|
|
1619
|
+
* ID of this configuration; can be provided as the
|
|
1620
|
+
* billing_provider_configuration_id when creating a contract.
|
|
1512
1621
|
*/
|
|
1513
1622
|
id: string;
|
|
1514
1623
|
|
|
1624
|
+
archived_at: string | null;
|
|
1625
|
+
|
|
1626
|
+
/**
|
|
1627
|
+
* The billing provider set for this configuration.
|
|
1628
|
+
*/
|
|
1515
1629
|
billing_provider:
|
|
1516
1630
|
| 'aws_marketplace'
|
|
1517
1631
|
| 'stripe'
|
|
@@ -1523,7 +1637,29 @@ export namespace ContractV2 {
|
|
|
1523
1637
|
| 'gcp_marketplace'
|
|
1524
1638
|
| 'metronome';
|
|
1525
1639
|
|
|
1640
|
+
/**
|
|
1641
|
+
* Configuration for the billing provider. The structure of this object is specific
|
|
1642
|
+
* to the billing provider.
|
|
1643
|
+
*/
|
|
1644
|
+
configuration: { [key: string]: unknown };
|
|
1645
|
+
|
|
1646
|
+
customer_id: string;
|
|
1647
|
+
|
|
1648
|
+
/**
|
|
1649
|
+
* The method to use for delivering invoices to this customer.
|
|
1650
|
+
*/
|
|
1526
1651
|
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
1652
|
+
|
|
1653
|
+
/**
|
|
1654
|
+
* Configuration for the delivery method. The structure of this object is specific
|
|
1655
|
+
* to the delivery method.
|
|
1656
|
+
*/
|
|
1657
|
+
delivery_method_configuration: { [key: string]: unknown };
|
|
1658
|
+
|
|
1659
|
+
/**
|
|
1660
|
+
* ID of the delivery method to use for this customer.
|
|
1661
|
+
*/
|
|
1662
|
+
delivery_method_id: string;
|
|
1527
1663
|
}
|
|
1528
1664
|
|
|
1529
1665
|
/**
|
|
@@ -1691,6 +1827,11 @@ export namespace ContractV2 {
|
|
|
1691
1827
|
*/
|
|
1692
1828
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1693
1829
|
|
|
1830
|
+
/**
|
|
1831
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
1832
|
+
*/
|
|
1833
|
+
proration_rounding?: RecurringCommit.ProrationRounding | null;
|
|
1834
|
+
|
|
1694
1835
|
/**
|
|
1695
1836
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1696
1837
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -1698,7 +1839,7 @@ export namespace ContractV2 {
|
|
|
1698
1839
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1699
1840
|
* invoice dates.
|
|
1700
1841
|
*/
|
|
1701
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1842
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
1702
1843
|
|
|
1703
1844
|
/**
|
|
1704
1845
|
* Will be passed down to the individual commits. This controls how much of an
|
|
@@ -1761,6 +1902,39 @@ export namespace ContractV2 {
|
|
|
1761
1902
|
|
|
1762
1903
|
unit_price: number;
|
|
1763
1904
|
}
|
|
1905
|
+
|
|
1906
|
+
/**
|
|
1907
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
1908
|
+
*/
|
|
1909
|
+
export interface ProrationRounding {
|
|
1910
|
+
access?: ProrationRounding.Access;
|
|
1911
|
+
|
|
1912
|
+
invoice?: ProrationRounding.Invoice;
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
export namespace ProrationRounding {
|
|
1916
|
+
export interface Access {
|
|
1917
|
+
/**
|
|
1918
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
1919
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1920
|
+
* nearest 100 in the stored unit).
|
|
1921
|
+
*/
|
|
1922
|
+
decimal_places: number;
|
|
1923
|
+
|
|
1924
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
export interface Invoice {
|
|
1928
|
+
/**
|
|
1929
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
1930
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1931
|
+
* nearest 100 in the stored unit).
|
|
1932
|
+
*/
|
|
1933
|
+
decimal_places: number;
|
|
1934
|
+
|
|
1935
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
1936
|
+
}
|
|
1937
|
+
}
|
|
1764
1938
|
}
|
|
1765
1939
|
|
|
1766
1940
|
export interface RecurringCredit {
|
|
@@ -1836,6 +2010,11 @@ export namespace ContractV2 {
|
|
|
1836
2010
|
*/
|
|
1837
2011
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1838
2012
|
|
|
2013
|
+
/**
|
|
2014
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
2015
|
+
*/
|
|
2016
|
+
proration_rounding?: RecurringCredit.ProrationRounding | null;
|
|
2017
|
+
|
|
1839
2018
|
/**
|
|
1840
2019
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1841
2020
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -1843,7 +2022,7 @@ export namespace ContractV2 {
|
|
|
1843
2022
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1844
2023
|
* invoice dates.
|
|
1845
2024
|
*/
|
|
1846
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2025
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
1847
2026
|
|
|
1848
2027
|
/**
|
|
1849
2028
|
* Will be passed down to the individual commits. This controls how much of an
|
|
@@ -1895,6 +2074,26 @@ export namespace ContractV2 {
|
|
|
1895
2074
|
export interface Contract {
|
|
1896
2075
|
id: string;
|
|
1897
2076
|
}
|
|
2077
|
+
|
|
2078
|
+
/**
|
|
2079
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
2080
|
+
*/
|
|
2081
|
+
export interface ProrationRounding {
|
|
2082
|
+
access?: ProrationRounding.Access;
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
export namespace ProrationRounding {
|
|
2086
|
+
export interface Access {
|
|
2087
|
+
/**
|
|
2088
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
2089
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2090
|
+
* nearest 100 in the stored unit).
|
|
2091
|
+
*/
|
|
2092
|
+
decimal_places: number;
|
|
2093
|
+
|
|
2094
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
2095
|
+
}
|
|
2096
|
+
}
|
|
1898
2097
|
}
|
|
1899
2098
|
|
|
1900
2099
|
export interface ResellerRoyalty {
|
|
@@ -1933,6 +2132,61 @@ export namespace ContractV2 {
|
|
|
1933
2132
|
}
|
|
1934
2133
|
}
|
|
1935
2134
|
|
|
2135
|
+
export interface RevenueSystemConfigurationSchedule {
|
|
2136
|
+
/**
|
|
2137
|
+
* The date this revenue system configuration became or becomes active.
|
|
2138
|
+
*/
|
|
2139
|
+
effective_at: string;
|
|
2140
|
+
|
|
2141
|
+
revenue_system_configuration: RevenueSystemConfigurationSchedule.RevenueSystemConfiguration;
|
|
2142
|
+
|
|
2143
|
+
/**
|
|
2144
|
+
* The date this revenue system configuration is superseded by the next entry. Null
|
|
2145
|
+
* for the last entry in the schedule.
|
|
2146
|
+
*/
|
|
2147
|
+
effective_until?: string;
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2150
|
+
export namespace RevenueSystemConfigurationSchedule {
|
|
2151
|
+
export interface RevenueSystemConfiguration {
|
|
2152
|
+
/**
|
|
2153
|
+
* ID of the revenue system configuration.
|
|
2154
|
+
*/
|
|
2155
|
+
id: string;
|
|
2156
|
+
|
|
2157
|
+
/**
|
|
2158
|
+
* Configuration for the revenue system. The structure of this object is specific
|
|
2159
|
+
* to the provider.
|
|
2160
|
+
*/
|
|
2161
|
+
configuration: { [key: string]: unknown };
|
|
2162
|
+
|
|
2163
|
+
customer_id: string;
|
|
2164
|
+
|
|
2165
|
+
/**
|
|
2166
|
+
* ID of the delivery method used for this customer configuration.
|
|
2167
|
+
*/
|
|
2168
|
+
delivery_method_id: string;
|
|
2169
|
+
|
|
2170
|
+
/**
|
|
2171
|
+
* The revenue system provider (e.g. netsuite).
|
|
2172
|
+
*/
|
|
2173
|
+
provider: 'netsuite';
|
|
2174
|
+
|
|
2175
|
+
archived_at?: string | null;
|
|
2176
|
+
|
|
2177
|
+
/**
|
|
2178
|
+
* The method to use for delivering data to the revenue system.
|
|
2179
|
+
*/
|
|
2180
|
+
delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
2181
|
+
|
|
2182
|
+
/**
|
|
2183
|
+
* Configuration for the delivery method. The structure of this object is specific
|
|
2184
|
+
* to the delivery method.
|
|
2185
|
+
*/
|
|
2186
|
+
delivery_method_configuration?: { [key: string]: unknown };
|
|
2187
|
+
}
|
|
2188
|
+
}
|
|
2189
|
+
|
|
1936
2190
|
export interface SpendTracker {
|
|
1937
2191
|
/**
|
|
1938
2192
|
* Human-readable identifier, unique per contract.
|
|
@@ -2001,6 +2255,8 @@ export namespace ContractV2 {
|
|
|
2001
2255
|
|
|
2002
2256
|
id?: string;
|
|
2003
2257
|
|
|
2258
|
+
billing_cycle_config?: Subscription.BillingCycleConfig;
|
|
2259
|
+
|
|
2004
2260
|
/**
|
|
2005
2261
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2006
2262
|
*/
|
|
@@ -2053,6 +2309,21 @@ export namespace ContractV2 {
|
|
|
2053
2309
|
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
2054
2310
|
|
|
2055
2311
|
is_prorated: boolean;
|
|
2312
|
+
|
|
2313
|
+
rounding?: Proration.Rounding;
|
|
2314
|
+
}
|
|
2315
|
+
|
|
2316
|
+
export namespace Proration {
|
|
2317
|
+
export interface Rounding {
|
|
2318
|
+
/**
|
|
2319
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
2320
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2321
|
+
* nearest 100 in the stored unit).
|
|
2322
|
+
*/
|
|
2323
|
+
decimal_places: number;
|
|
2324
|
+
|
|
2325
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
2326
|
+
}
|
|
2056
2327
|
}
|
|
2057
2328
|
|
|
2058
2329
|
export interface QuantitySchedule {
|
|
@@ -2077,6 +2348,19 @@ export namespace ContractV2 {
|
|
|
2077
2348
|
}
|
|
2078
2349
|
}
|
|
2079
2350
|
|
|
2351
|
+
export interface BillingCycleConfig {
|
|
2352
|
+
/**
|
|
2353
|
+
* The date this subscription's billing cycle is anchored to.
|
|
2354
|
+
*/
|
|
2355
|
+
anchor_date: string;
|
|
2356
|
+
|
|
2357
|
+
/**
|
|
2358
|
+
* Controls whether this subscription consolidates onto usage invoices or gets its
|
|
2359
|
+
* own scheduled invoice.
|
|
2360
|
+
*/
|
|
2361
|
+
invoice_placement: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2080
2364
|
export interface SeatConfig {
|
|
2081
2365
|
/**
|
|
2082
2366
|
* The property name, sent on usage events, that identifies the seat ID associated
|
|
@@ -2275,6 +2559,11 @@ export namespace ContractWithoutAmendments {
|
|
|
2275
2559
|
*/
|
|
2276
2560
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
2277
2561
|
|
|
2562
|
+
/**
|
|
2563
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
2564
|
+
*/
|
|
2565
|
+
proration_rounding?: RecurringCommit.ProrationRounding | null;
|
|
2566
|
+
|
|
2278
2567
|
/**
|
|
2279
2568
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
2280
2569
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -2282,7 +2571,7 @@ export namespace ContractWithoutAmendments {
|
|
|
2282
2571
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
2283
2572
|
* invoice dates.
|
|
2284
2573
|
*/
|
|
2285
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2574
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
2286
2575
|
|
|
2287
2576
|
/**
|
|
2288
2577
|
* Will be passed down to the individual commits. This controls how much of an
|
|
@@ -2345,6 +2634,41 @@ export namespace ContractWithoutAmendments {
|
|
|
2345
2634
|
|
|
2346
2635
|
unit_price: number;
|
|
2347
2636
|
}
|
|
2637
|
+
|
|
2638
|
+
/**
|
|
2639
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
2640
|
+
*/
|
|
2641
|
+
export interface ProrationRounding {
|
|
2642
|
+
access?: ProrationRounding.Access;
|
|
2643
|
+
|
|
2644
|
+
invoice?: ProrationRounding.Invoice;
|
|
2645
|
+
}
|
|
2646
|
+
|
|
2647
|
+
export namespace ProrationRounding {
|
|
2648
|
+
export interface Access {
|
|
2649
|
+
/**
|
|
2650
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
2651
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2652
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
2653
|
+
* dollar).
|
|
2654
|
+
*/
|
|
2655
|
+
decimal_places: number;
|
|
2656
|
+
|
|
2657
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2660
|
+
export interface Invoice {
|
|
2661
|
+
/**
|
|
2662
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
2663
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2664
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
2665
|
+
* dollar).
|
|
2666
|
+
*/
|
|
2667
|
+
decimal_places: number;
|
|
2668
|
+
|
|
2669
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
2670
|
+
}
|
|
2671
|
+
}
|
|
2348
2672
|
}
|
|
2349
2673
|
|
|
2350
2674
|
export interface RecurringCredit {
|
|
@@ -2420,6 +2744,11 @@ export namespace ContractWithoutAmendments {
|
|
|
2420
2744
|
*/
|
|
2421
2745
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
2422
2746
|
|
|
2747
|
+
/**
|
|
2748
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
2749
|
+
*/
|
|
2750
|
+
proration_rounding?: RecurringCredit.ProrationRounding | null;
|
|
2751
|
+
|
|
2423
2752
|
/**
|
|
2424
2753
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
2425
2754
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -2427,7 +2756,7 @@ export namespace ContractWithoutAmendments {
|
|
|
2427
2756
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
2428
2757
|
* invoice dates.
|
|
2429
2758
|
*/
|
|
2430
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2759
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
2431
2760
|
|
|
2432
2761
|
/**
|
|
2433
2762
|
* Will be passed down to the individual commits. This controls how much of an
|
|
@@ -2479,6 +2808,27 @@ export namespace ContractWithoutAmendments {
|
|
|
2479
2808
|
export interface Contract {
|
|
2480
2809
|
id: string;
|
|
2481
2810
|
}
|
|
2811
|
+
|
|
2812
|
+
/**
|
|
2813
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
2814
|
+
*/
|
|
2815
|
+
export interface ProrationRounding {
|
|
2816
|
+
access?: ProrationRounding.Access;
|
|
2817
|
+
}
|
|
2818
|
+
|
|
2819
|
+
export namespace ProrationRounding {
|
|
2820
|
+
export interface Access {
|
|
2821
|
+
/**
|
|
2822
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
2823
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2824
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
2825
|
+
* dollar).
|
|
2826
|
+
*/
|
|
2827
|
+
decimal_places: number;
|
|
2828
|
+
|
|
2829
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
2830
|
+
}
|
|
2831
|
+
}
|
|
2482
2832
|
}
|
|
2483
2833
|
|
|
2484
2834
|
export interface ResellerRoyalty {
|
|
@@ -2593,6 +2943,12 @@ export interface Credit {
|
|
|
2593
2943
|
|
|
2594
2944
|
contract?: Credit.Contract;
|
|
2595
2945
|
|
|
2946
|
+
/**
|
|
2947
|
+
* The actor who created this credit. Omitted for system-generated credits such as
|
|
2948
|
+
* recurring credits.
|
|
2949
|
+
*/
|
|
2950
|
+
created_by?: string;
|
|
2951
|
+
|
|
2596
2952
|
/**
|
|
2597
2953
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2598
2954
|
*/
|
|
@@ -3005,6 +3361,8 @@ export interface Override {
|
|
|
3005
3361
|
|
|
3006
3362
|
export namespace Override {
|
|
3007
3363
|
export interface OverrideSpecifier {
|
|
3364
|
+
any_commit_or_credit_ids?: Array<string>;
|
|
3365
|
+
|
|
3008
3366
|
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
3009
3367
|
|
|
3010
3368
|
commit_ids?: Array<string>;
|
|
@@ -3222,6 +3580,10 @@ export interface PrepaidBalanceThresholdConfiguration {
|
|
|
3222
3580
|
|
|
3223
3581
|
discount_configuration?: PrepaidBalanceThresholdConfiguration.DiscountConfiguration;
|
|
3224
3582
|
|
|
3583
|
+
/**
|
|
3584
|
+
* Determines which balances are excluded from remaining balance calculation for
|
|
3585
|
+
* threshold billing.
|
|
3586
|
+
*/
|
|
3225
3587
|
threshold_balance_specifiers?: Array<PrepaidBalanceThresholdConfiguration.ThresholdBalanceSpecifier>;
|
|
3226
3588
|
}
|
|
3227
3589
|
|
|
@@ -3284,6 +3646,10 @@ export namespace PrepaidBalanceThresholdConfiguration {
|
|
|
3284
3646
|
}
|
|
3285
3647
|
|
|
3286
3648
|
export interface ThresholdBalanceSpecifier {
|
|
3649
|
+
/**
|
|
3650
|
+
* If any of the exclude specifier is met, the balance is not considered when
|
|
3651
|
+
* evaluating threshold billing
|
|
3652
|
+
*/
|
|
3287
3653
|
exclude: Array<ThresholdBalanceSpecifier.Exclude>;
|
|
3288
3654
|
}
|
|
3289
3655
|
|
|
@@ -3339,6 +3705,10 @@ export interface PrepaidBalanceThresholdConfigurationV2 {
|
|
|
3339
3705
|
|
|
3340
3706
|
discount_configuration?: PrepaidBalanceThresholdConfigurationV2.DiscountConfiguration;
|
|
3341
3707
|
|
|
3708
|
+
/**
|
|
3709
|
+
* Determines which balances are excluded from remaining balance calculation for
|
|
3710
|
+
* threshold billing.
|
|
3711
|
+
*/
|
|
3342
3712
|
threshold_balance_specifiers?: Array<PrepaidBalanceThresholdConfigurationV2.ThresholdBalanceSpecifier>;
|
|
3343
3713
|
}
|
|
3344
3714
|
|
|
@@ -3772,6 +4142,8 @@ export interface Subscription {
|
|
|
3772
4142
|
|
|
3773
4143
|
id?: string;
|
|
3774
4144
|
|
|
4145
|
+
billing_cycle_config?: Subscription.BillingCycleConfig;
|
|
4146
|
+
|
|
3775
4147
|
/**
|
|
3776
4148
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
3777
4149
|
*/
|
|
@@ -3824,6 +4196,22 @@ export namespace Subscription {
|
|
|
3824
4196
|
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
3825
4197
|
|
|
3826
4198
|
is_prorated: boolean;
|
|
4199
|
+
|
|
4200
|
+
rounding?: Proration.Rounding;
|
|
4201
|
+
}
|
|
4202
|
+
|
|
4203
|
+
export namespace Proration {
|
|
4204
|
+
export interface Rounding {
|
|
4205
|
+
/**
|
|
4206
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
4207
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
4208
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
4209
|
+
* dollar).
|
|
4210
|
+
*/
|
|
4211
|
+
decimal_places: number;
|
|
4212
|
+
|
|
4213
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
4214
|
+
}
|
|
3827
4215
|
}
|
|
3828
4216
|
|
|
3829
4217
|
export interface QuantitySchedule {
|
|
@@ -3848,6 +4236,19 @@ export namespace Subscription {
|
|
|
3848
4236
|
}
|
|
3849
4237
|
}
|
|
3850
4238
|
|
|
4239
|
+
export interface BillingCycleConfig {
|
|
4240
|
+
/**
|
|
4241
|
+
* The date this subscription's billing cycle is anchored to.
|
|
4242
|
+
*/
|
|
4243
|
+
anchor_date: string;
|
|
4244
|
+
|
|
4245
|
+
/**
|
|
4246
|
+
* Controls whether this subscription consolidates onto usage invoices or gets its
|
|
4247
|
+
* own scheduled invoice.
|
|
4248
|
+
*/
|
|
4249
|
+
invoice_placement: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
|
|
4250
|
+
}
|
|
4251
|
+
|
|
3851
4252
|
export interface SeatConfig {
|
|
3852
4253
|
/**
|
|
3853
4254
|
* The property name, sent on usage events, that identifies the seat ID associated
|