@metronome/sdk 3.7.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -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 +194 -4
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +194 -4
- 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 +270 -11
- package/resources/v1/contracts/contracts.d.mts.map +1 -1
- package/resources/v1/contracts/contracts.d.ts +270 -11
- 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 +427 -6
- package/resources/v2/contracts.d.mts.map +1 -1
- package/resources/v2/contracts.d.ts +427 -6
- package/resources/v2/contracts.d.ts.map +1 -1
- package/src/client.ts +9 -1
- package/src/resources/shared.ts +234 -4
- package/src/resources/v1/alerts.ts +49 -0
- package/src/resources/v1/contracts/contracts.ts +322 -10
- 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 +517 -6
- 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
|
@@ -31,8 +31,13 @@ export class Dashboards extends APIResource {
|
|
|
31
31
|
*
|
|
32
32
|
* - Dashboard types: Choose from `invoices`, `usage`, or `commits_and_credits`
|
|
33
33
|
* - Customization options:
|
|
34
|
-
* - `dashboard_options`: Configure
|
|
35
|
-
*
|
|
34
|
+
* - `dashboard_options`: Configure dashboard behavior. For the invoices
|
|
35
|
+
* dashboard, supported keys include: `show_zero_usage_line_items`
|
|
36
|
+
* ("true"/"false"), `hide_voided_invoices` ("true"/"false"), `contract_id`
|
|
37
|
+
* (UUID, filters invoices by contract), `invoice_type` ("USAGE" or
|
|
38
|
+
* "SCHEDULED", filters by invoice type), `invoice_status_filter` ("VOID",
|
|
39
|
+
* "FINALIZED", "DRAFT", "FINALIZED_AND_DRAFT", or "ALL"), and
|
|
40
|
+
* `billable_status_filter` ("BILLABLE", "UNBILLABLE", or "ALL")
|
|
36
41
|
* - `color_overrides`: Match your brand's color palette
|
|
37
42
|
* - `bm_group_key_overrides`: Customize how dimensions are displayed (for the
|
|
38
43
|
* usage embeddable dashboard)
|
|
@@ -151,7 +156,9 @@ export namespace DashboardGetEmbeddableURLParams {
|
|
|
151
156
|
| 'Primary_green'
|
|
152
157
|
| 'Primary_red'
|
|
153
158
|
| 'Progress_bar'
|
|
154
|
-
| 'Progress_bar_background'
|
|
159
|
+
| 'Progress_bar_background'
|
|
160
|
+
| 'Action'
|
|
161
|
+
| 'Action_hover';
|
|
155
162
|
|
|
156
163
|
/**
|
|
157
164
|
* Hex value representation of the color
|
|
@@ -34,6 +34,7 @@ export {
|
|
|
34
34
|
type ContractArchiveResponse,
|
|
35
35
|
type ContractCreateHistoricalInvoicesResponse,
|
|
36
36
|
type ContractGetNetBalanceResponse,
|
|
37
|
+
type ContractGetSubscriptionSeatsHistoryResponse,
|
|
37
38
|
type ContractListBalancesResponse,
|
|
38
39
|
type ContractListSeatBalancesResponse,
|
|
39
40
|
type ContractRetrieveRateScheduleResponse,
|
|
@@ -48,6 +49,7 @@ export {
|
|
|
48
49
|
type ContractArchiveParams,
|
|
49
50
|
type ContractCreateHistoricalInvoicesParams,
|
|
50
51
|
type ContractGetNetBalanceParams,
|
|
52
|
+
type ContractGetSubscriptionSeatsHistoryParams,
|
|
51
53
|
type ContractListBalancesParams,
|
|
52
54
|
type ContractListSeatBalancesParams,
|
|
53
55
|
type ContractRetrieveRateScheduleParams,
|
|
@@ -430,6 +430,8 @@ export namespace PackageRetrieveResponse {
|
|
|
430
430
|
|
|
431
431
|
export namespace Override {
|
|
432
432
|
export interface OverrideSpecifier {
|
|
433
|
+
any_commit_or_credit_template_ids?: Array<string>;
|
|
434
|
+
|
|
433
435
|
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
434
436
|
|
|
435
437
|
commit_template_ids?: Array<string>;
|
|
@@ -666,6 +668,11 @@ export namespace PackageRetrieveResponse {
|
|
|
666
668
|
*/
|
|
667
669
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
668
670
|
|
|
671
|
+
/**
|
|
672
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
673
|
+
*/
|
|
674
|
+
proration_rounding?: RecurringCommit.ProrationRounding | null;
|
|
675
|
+
|
|
669
676
|
/**
|
|
670
677
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
671
678
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -673,7 +680,7 @@ export namespace PackageRetrieveResponse {
|
|
|
673
680
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
674
681
|
* invoice dates.
|
|
675
682
|
*/
|
|
676
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
683
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
677
684
|
|
|
678
685
|
/**
|
|
679
686
|
* Will be passed down to the individual commits. This controls how much of an
|
|
@@ -753,6 +760,41 @@ export namespace PackageRetrieveResponse {
|
|
|
753
760
|
unit_price: number;
|
|
754
761
|
}
|
|
755
762
|
|
|
763
|
+
/**
|
|
764
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
765
|
+
*/
|
|
766
|
+
export interface ProrationRounding {
|
|
767
|
+
access?: ProrationRounding.Access;
|
|
768
|
+
|
|
769
|
+
invoice?: ProrationRounding.Invoice;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
export namespace ProrationRounding {
|
|
773
|
+
export interface Access {
|
|
774
|
+
/**
|
|
775
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
776
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
777
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
778
|
+
* dollar).
|
|
779
|
+
*/
|
|
780
|
+
decimal_places: number;
|
|
781
|
+
|
|
782
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
export interface Invoice {
|
|
786
|
+
/**
|
|
787
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
788
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
789
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
790
|
+
* dollar).
|
|
791
|
+
*/
|
|
792
|
+
decimal_places: number;
|
|
793
|
+
|
|
794
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
|
|
756
798
|
/**
|
|
757
799
|
* Attach a subscription to the recurring commit/credit.
|
|
758
800
|
*/
|
|
@@ -828,6 +870,11 @@ export namespace PackageRetrieveResponse {
|
|
|
828
870
|
*/
|
|
829
871
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
830
872
|
|
|
873
|
+
/**
|
|
874
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
875
|
+
*/
|
|
876
|
+
proration_rounding?: RecurringCredit.ProrationRounding | null;
|
|
877
|
+
|
|
831
878
|
/**
|
|
832
879
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
833
880
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -835,7 +882,7 @@ export namespace PackageRetrieveResponse {
|
|
|
835
882
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
836
883
|
* invoice dates.
|
|
837
884
|
*/
|
|
838
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
885
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
839
886
|
|
|
840
887
|
/**
|
|
841
888
|
* Will be passed down to the individual commits. This controls how much of an
|
|
@@ -904,6 +951,27 @@ export namespace PackageRetrieveResponse {
|
|
|
904
951
|
value: number;
|
|
905
952
|
}
|
|
906
953
|
|
|
954
|
+
/**
|
|
955
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
956
|
+
*/
|
|
957
|
+
export interface ProrationRounding {
|
|
958
|
+
access?: ProrationRounding.Access;
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
export namespace ProrationRounding {
|
|
962
|
+
export interface Access {
|
|
963
|
+
/**
|
|
964
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
965
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
966
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
967
|
+
* dollar).
|
|
968
|
+
*/
|
|
969
|
+
decimal_places: number;
|
|
970
|
+
|
|
971
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
|
|
907
975
|
/**
|
|
908
976
|
* Attach a subscription to the recurring commit/credit.
|
|
909
977
|
*/
|
|
@@ -957,6 +1025,8 @@ export namespace PackageRetrieveResponse {
|
|
|
957
1025
|
|
|
958
1026
|
id?: string;
|
|
959
1027
|
|
|
1028
|
+
billing_cycle_config?: Subscription.BillingCycleConfig;
|
|
1029
|
+
|
|
960
1030
|
/**
|
|
961
1031
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
962
1032
|
*/
|
|
@@ -995,6 +1065,22 @@ export namespace PackageRetrieveResponse {
|
|
|
995
1065
|
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
996
1066
|
|
|
997
1067
|
is_prorated: boolean;
|
|
1068
|
+
|
|
1069
|
+
rounding?: Proration.Rounding;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
export namespace Proration {
|
|
1073
|
+
export interface Rounding {
|
|
1074
|
+
/**
|
|
1075
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
1076
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1077
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
1078
|
+
* dollar).
|
|
1079
|
+
*/
|
|
1080
|
+
decimal_places: number;
|
|
1081
|
+
|
|
1082
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
1083
|
+
}
|
|
998
1084
|
}
|
|
999
1085
|
|
|
1000
1086
|
export interface SubscriptionRate {
|
|
@@ -1011,6 +1097,10 @@ export namespace PackageRetrieveResponse {
|
|
|
1011
1097
|
}
|
|
1012
1098
|
}
|
|
1013
1099
|
|
|
1100
|
+
export interface BillingCycleConfig {
|
|
1101
|
+
invoice_placement?: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1014
1104
|
export interface Duration {
|
|
1015
1105
|
unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS';
|
|
1016
1106
|
|
|
@@ -1282,6 +1372,8 @@ export namespace PackageListResponse {
|
|
|
1282
1372
|
|
|
1283
1373
|
export namespace Override {
|
|
1284
1374
|
export interface OverrideSpecifier {
|
|
1375
|
+
any_commit_or_credit_template_ids?: Array<string>;
|
|
1376
|
+
|
|
1285
1377
|
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1286
1378
|
|
|
1287
1379
|
commit_template_ids?: Array<string>;
|
|
@@ -1518,6 +1610,11 @@ export namespace PackageListResponse {
|
|
|
1518
1610
|
*/
|
|
1519
1611
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1520
1612
|
|
|
1613
|
+
/**
|
|
1614
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
1615
|
+
*/
|
|
1616
|
+
proration_rounding?: RecurringCommit.ProrationRounding | null;
|
|
1617
|
+
|
|
1521
1618
|
/**
|
|
1522
1619
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1523
1620
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -1525,7 +1622,7 @@ export namespace PackageListResponse {
|
|
|
1525
1622
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1526
1623
|
* invoice dates.
|
|
1527
1624
|
*/
|
|
1528
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1625
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
1529
1626
|
|
|
1530
1627
|
/**
|
|
1531
1628
|
* Will be passed down to the individual commits. This controls how much of an
|
|
@@ -1605,6 +1702,41 @@ export namespace PackageListResponse {
|
|
|
1605
1702
|
unit_price: number;
|
|
1606
1703
|
}
|
|
1607
1704
|
|
|
1705
|
+
/**
|
|
1706
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
1707
|
+
*/
|
|
1708
|
+
export interface ProrationRounding {
|
|
1709
|
+
access?: ProrationRounding.Access;
|
|
1710
|
+
|
|
1711
|
+
invoice?: ProrationRounding.Invoice;
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
export namespace ProrationRounding {
|
|
1715
|
+
export interface Access {
|
|
1716
|
+
/**
|
|
1717
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
1718
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1719
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
1720
|
+
* dollar).
|
|
1721
|
+
*/
|
|
1722
|
+
decimal_places: number;
|
|
1723
|
+
|
|
1724
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
export interface Invoice {
|
|
1728
|
+
/**
|
|
1729
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
1730
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1731
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
1732
|
+
* dollar).
|
|
1733
|
+
*/
|
|
1734
|
+
decimal_places: number;
|
|
1735
|
+
|
|
1736
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1608
1740
|
/**
|
|
1609
1741
|
* Attach a subscription to the recurring commit/credit.
|
|
1610
1742
|
*/
|
|
@@ -1680,6 +1812,11 @@ export namespace PackageListResponse {
|
|
|
1680
1812
|
*/
|
|
1681
1813
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1682
1814
|
|
|
1815
|
+
/**
|
|
1816
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
1817
|
+
*/
|
|
1818
|
+
proration_rounding?: RecurringCredit.ProrationRounding | null;
|
|
1819
|
+
|
|
1683
1820
|
/**
|
|
1684
1821
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1685
1822
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -1687,7 +1824,7 @@ export namespace PackageListResponse {
|
|
|
1687
1824
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1688
1825
|
* invoice dates.
|
|
1689
1826
|
*/
|
|
1690
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1827
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
1691
1828
|
|
|
1692
1829
|
/**
|
|
1693
1830
|
* Will be passed down to the individual commits. This controls how much of an
|
|
@@ -1756,6 +1893,27 @@ export namespace PackageListResponse {
|
|
|
1756
1893
|
value: number;
|
|
1757
1894
|
}
|
|
1758
1895
|
|
|
1896
|
+
/**
|
|
1897
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
1898
|
+
*/
|
|
1899
|
+
export interface ProrationRounding {
|
|
1900
|
+
access?: ProrationRounding.Access;
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
export namespace ProrationRounding {
|
|
1904
|
+
export interface Access {
|
|
1905
|
+
/**
|
|
1906
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
1907
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1908
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
1909
|
+
* dollar).
|
|
1910
|
+
*/
|
|
1911
|
+
decimal_places: number;
|
|
1912
|
+
|
|
1913
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1759
1917
|
/**
|
|
1760
1918
|
* Attach a subscription to the recurring commit/credit.
|
|
1761
1919
|
*/
|
|
@@ -1809,6 +1967,8 @@ export namespace PackageListResponse {
|
|
|
1809
1967
|
|
|
1810
1968
|
id?: string;
|
|
1811
1969
|
|
|
1970
|
+
billing_cycle_config?: Subscription.BillingCycleConfig;
|
|
1971
|
+
|
|
1812
1972
|
/**
|
|
1813
1973
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1814
1974
|
*/
|
|
@@ -1847,6 +2007,22 @@ export namespace PackageListResponse {
|
|
|
1847
2007
|
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
1848
2008
|
|
|
1849
2009
|
is_prorated: boolean;
|
|
2010
|
+
|
|
2011
|
+
rounding?: Proration.Rounding;
|
|
2012
|
+
}
|
|
2013
|
+
|
|
2014
|
+
export namespace Proration {
|
|
2015
|
+
export interface Rounding {
|
|
2016
|
+
/**
|
|
2017
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
2018
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2019
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
2020
|
+
* dollar).
|
|
2021
|
+
*/
|
|
2022
|
+
decimal_places: number;
|
|
2023
|
+
|
|
2024
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
2025
|
+
}
|
|
1850
2026
|
}
|
|
1851
2027
|
|
|
1852
2028
|
export interface SubscriptionRate {
|
|
@@ -1863,6 +2039,10 @@ export namespace PackageListResponse {
|
|
|
1863
2039
|
}
|
|
1864
2040
|
}
|
|
1865
2041
|
|
|
2042
|
+
export interface BillingCycleConfig {
|
|
2043
|
+
invoice_placement?: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
|
|
2044
|
+
}
|
|
2045
|
+
|
|
1866
2046
|
export interface Duration {
|
|
1867
2047
|
unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS';
|
|
1868
2048
|
|
|
@@ -2307,9 +2487,10 @@ export namespace PackageCreateParams {
|
|
|
2307
2487
|
|
|
2308
2488
|
/**
|
|
2309
2489
|
* Indicates whether the override should only apply to commits. Defaults to
|
|
2310
|
-
* `false`. If `true
|
|
2311
|
-
* passing `commit_ids
|
|
2312
|
-
*
|
|
2490
|
+
* `false`. If `true` you can specify relevant commits in `override_specifiers` by
|
|
2491
|
+
* passing `commit_ids`, `recurring_commit_ids`, or `any_commit_or_credit_ids`. If
|
|
2492
|
+
* you do not specify any of these fields, the override will apply when consuming
|
|
2493
|
+
* any prepaid commit, postpaid commit, or credit
|
|
2313
2494
|
*/
|
|
2314
2495
|
is_commit_specific?: boolean;
|
|
2315
2496
|
|
|
@@ -2351,6 +2532,15 @@ export namespace PackageCreateParams {
|
|
|
2351
2532
|
|
|
2352
2533
|
export namespace Override {
|
|
2353
2534
|
export interface OverrideSpecifier {
|
|
2535
|
+
/**
|
|
2536
|
+
* Can only be used for commit specific overrides. Must be used in conjunction with
|
|
2537
|
+
* one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
2538
|
+
* `presentation_group_values`. Must be used instead of both `commit_ids` and
|
|
2539
|
+
* `recurring_commit_ids` If provided, the override will apply to any specified
|
|
2540
|
+
* commit, credit, recurring commit or recurring credit IDs.
|
|
2541
|
+
*/
|
|
2542
|
+
any_commit_or_credit_ids?: Array<string>;
|
|
2543
|
+
|
|
2354
2544
|
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2355
2545
|
|
|
2356
2546
|
/**
|
|
@@ -2520,6 +2710,11 @@ export namespace PackageCreateParams {
|
|
|
2520
2710
|
*/
|
|
2521
2711
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
2522
2712
|
|
|
2713
|
+
/**
|
|
2714
|
+
* Optional rounding configuration for prorated recurring commit amounts.
|
|
2715
|
+
*/
|
|
2716
|
+
proration_rounding?: RecurringCommit.ProrationRounding;
|
|
2717
|
+
|
|
2523
2718
|
/**
|
|
2524
2719
|
* Whether the created commits will use the commit rate or list rate
|
|
2525
2720
|
*/
|
|
@@ -2532,7 +2727,7 @@ export namespace PackageCreateParams {
|
|
|
2532
2727
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
2533
2728
|
* invoice dates.
|
|
2534
2729
|
*/
|
|
2535
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2730
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
2536
2731
|
|
|
2537
2732
|
/**
|
|
2538
2733
|
* Will be passed down to the individual commits. This controls how much of an
|
|
@@ -2619,6 +2814,41 @@ export namespace PackageCreateParams {
|
|
|
2619
2814
|
unit_price: number;
|
|
2620
2815
|
}
|
|
2621
2816
|
|
|
2817
|
+
/**
|
|
2818
|
+
* Optional rounding configuration for prorated recurring commit amounts.
|
|
2819
|
+
*/
|
|
2820
|
+
export interface ProrationRounding {
|
|
2821
|
+
access?: ProrationRounding.Access;
|
|
2822
|
+
|
|
2823
|
+
invoice?: ProrationRounding.Invoice;
|
|
2824
|
+
}
|
|
2825
|
+
|
|
2826
|
+
export namespace ProrationRounding {
|
|
2827
|
+
export interface Access {
|
|
2828
|
+
/**
|
|
2829
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
2830
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2831
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
2832
|
+
* dollar).
|
|
2833
|
+
*/
|
|
2834
|
+
decimal_places: number;
|
|
2835
|
+
|
|
2836
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
2837
|
+
}
|
|
2838
|
+
|
|
2839
|
+
export interface Invoice {
|
|
2840
|
+
/**
|
|
2841
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
2842
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2843
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
2844
|
+
* dollar).
|
|
2845
|
+
*/
|
|
2846
|
+
decimal_places: number;
|
|
2847
|
+
|
|
2848
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
2849
|
+
}
|
|
2850
|
+
}
|
|
2851
|
+
|
|
2622
2852
|
/**
|
|
2623
2853
|
* Attach a subscription to the recurring commit/credit.
|
|
2624
2854
|
*/
|
|
@@ -2705,6 +2935,11 @@ export namespace PackageCreateParams {
|
|
|
2705
2935
|
*/
|
|
2706
2936
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
2707
2937
|
|
|
2938
|
+
/**
|
|
2939
|
+
* Optional rounding configuration for prorated recurring credit amounts.
|
|
2940
|
+
*/
|
|
2941
|
+
proration_rounding?: RecurringCredit.ProrationRounding;
|
|
2942
|
+
|
|
2708
2943
|
/**
|
|
2709
2944
|
* Whether the created commits will use the commit rate or list rate
|
|
2710
2945
|
*/
|
|
@@ -2717,7 +2952,7 @@ export namespace PackageCreateParams {
|
|
|
2717
2952
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
2718
2953
|
* invoice dates.
|
|
2719
2954
|
*/
|
|
2720
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2955
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
2721
2956
|
|
|
2722
2957
|
/**
|
|
2723
2958
|
* Will be passed down to the individual commits. This controls how much of an
|
|
@@ -2793,6 +3028,27 @@ export namespace PackageCreateParams {
|
|
|
2793
3028
|
value: number;
|
|
2794
3029
|
}
|
|
2795
3030
|
|
|
3031
|
+
/**
|
|
3032
|
+
* Optional rounding configuration for prorated recurring credit amounts.
|
|
3033
|
+
*/
|
|
3034
|
+
export interface ProrationRounding {
|
|
3035
|
+
access?: ProrationRounding.Access;
|
|
3036
|
+
}
|
|
3037
|
+
|
|
3038
|
+
export namespace ProrationRounding {
|
|
3039
|
+
export interface Access {
|
|
3040
|
+
/**
|
|
3041
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
3042
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
3043
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
3044
|
+
* dollar).
|
|
3045
|
+
*/
|
|
3046
|
+
decimal_places: number;
|
|
3047
|
+
|
|
3048
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
3049
|
+
}
|
|
3050
|
+
}
|
|
3051
|
+
|
|
2796
3052
|
/**
|
|
2797
3053
|
* Attach a subscription to the recurring commit/credit.
|
|
2798
3054
|
*/
|
|
@@ -2922,6 +3178,8 @@ export namespace PackageCreateParams {
|
|
|
2922
3178
|
|
|
2923
3179
|
subscription_rate: Subscription.SubscriptionRate;
|
|
2924
3180
|
|
|
3181
|
+
billing_cycle_config?: Subscription.BillingCycleConfig;
|
|
3182
|
+
|
|
2925
3183
|
/**
|
|
2926
3184
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2927
3185
|
*/
|
|
@@ -2986,6 +3244,22 @@ export namespace PackageCreateParams {
|
|
|
2986
3244
|
* Indicates if the partial period will be prorated or charged a full amount.
|
|
2987
3245
|
*/
|
|
2988
3246
|
is_prorated?: boolean;
|
|
3247
|
+
|
|
3248
|
+
rounding?: Proration.Rounding;
|
|
3249
|
+
}
|
|
3250
|
+
|
|
3251
|
+
export namespace Proration {
|
|
3252
|
+
export interface Rounding {
|
|
3253
|
+
/**
|
|
3254
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
3255
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
3256
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
3257
|
+
* dollar).
|
|
3258
|
+
*/
|
|
3259
|
+
decimal_places: number;
|
|
3260
|
+
|
|
3261
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
3262
|
+
}
|
|
2989
3263
|
}
|
|
2990
3264
|
|
|
2991
3265
|
export interface SubscriptionRate {
|
|
@@ -3001,6 +3275,14 @@ export namespace PackageCreateParams {
|
|
|
3001
3275
|
product_id: string;
|
|
3002
3276
|
}
|
|
3003
3277
|
|
|
3278
|
+
export interface BillingCycleConfig {
|
|
3279
|
+
/**
|
|
3280
|
+
* Controls whether subscriptions consolidate onto usage invoices. Defaults to
|
|
3281
|
+
* ON_USAGE_INVOICE if omitted.
|
|
3282
|
+
*/
|
|
3283
|
+
invoice_placement?: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
|
|
3284
|
+
}
|
|
3285
|
+
|
|
3004
3286
|
/**
|
|
3005
3287
|
* Lifetime of the subscription from its start. If not provided, subscription
|
|
3006
3288
|
* inherits contract end date.
|
package/src/resources/v1/v1.ts
CHANGED
|
@@ -136,6 +136,8 @@ import {
|
|
|
136
136
|
ContractCreateResponse,
|
|
137
137
|
ContractGetNetBalanceParams,
|
|
138
138
|
ContractGetNetBalanceResponse,
|
|
139
|
+
ContractGetSubscriptionSeatsHistoryParams,
|
|
140
|
+
ContractGetSubscriptionSeatsHistoryResponse,
|
|
139
141
|
ContractListBalancesParams,
|
|
140
142
|
ContractListBalancesResponse,
|
|
141
143
|
ContractListBalancesResponsesBodyCursorPage,
|
|
@@ -381,6 +383,7 @@ export declare namespace V1 {
|
|
|
381
383
|
type ContractArchiveResponse as ContractArchiveResponse,
|
|
382
384
|
type ContractCreateHistoricalInvoicesResponse as ContractCreateHistoricalInvoicesResponse,
|
|
383
385
|
type ContractGetNetBalanceResponse as ContractGetNetBalanceResponse,
|
|
386
|
+
type ContractGetSubscriptionSeatsHistoryResponse as ContractGetSubscriptionSeatsHistoryResponse,
|
|
384
387
|
type ContractListBalancesResponse as ContractListBalancesResponse,
|
|
385
388
|
type ContractListSeatBalancesResponse as ContractListSeatBalancesResponse,
|
|
386
389
|
type ContractRetrieveRateScheduleResponse as ContractRetrieveRateScheduleResponse,
|
|
@@ -396,6 +399,7 @@ export declare namespace V1 {
|
|
|
396
399
|
type ContractArchiveParams as ContractArchiveParams,
|
|
397
400
|
type ContractCreateHistoricalInvoicesParams as ContractCreateHistoricalInvoicesParams,
|
|
398
401
|
type ContractGetNetBalanceParams as ContractGetNetBalanceParams,
|
|
402
|
+
type ContractGetSubscriptionSeatsHistoryParams as ContractGetSubscriptionSeatsHistoryParams,
|
|
399
403
|
type ContractListBalancesParams as ContractListBalancesParams,
|
|
400
404
|
type ContractListSeatBalancesParams as ContractListSeatBalancesParams,
|
|
401
405
|
type ContractRetrieveRateScheduleParams as ContractRetrieveRateScheduleParams,
|