@metronome/sdk 3.6.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 +61 -0
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- 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/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts.map +1 -1
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/index.d.mts +2 -2
- package/internal/qs/index.d.mts.map +1 -1
- package/internal/qs/index.d.ts +2 -2
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/index.mjs.map +1 -1
- package/internal/qs/stringify.d.mts.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.d.mts.map +1 -1
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/package.json +1 -1
- package/pagination.d.mts +1 -0
- package/pagination.d.mts.map +1 -1
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.mjs +1 -0
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/shared.d.mts +420 -4
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +420 -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/alerts.mjs.map +1 -1
- package/resources/v1/audit-logs.d.mts.map +1 -1
- package/resources/v1/audit-logs.d.ts.map +1 -1
- package/resources/v1/audit-logs.mjs.map +1 -1
- package/resources/v1/billable-metrics.d.mts.map +1 -1
- package/resources/v1/billable-metrics.d.ts.map +1 -1
- package/resources/v1/billable-metrics.mjs.map +1 -1
- package/resources/v1/contracts/contracts.d.mts +674 -10
- package/resources/v1/contracts/contracts.d.mts.map +1 -1
- package/resources/v1/contracts/contracts.d.ts +674 -10
- 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/named-schedules.d.mts.map +1 -1
- package/resources/v1/contracts/named-schedules.d.ts.map +1 -1
- package/resources/v1/contracts/named-schedules.mjs.map +1 -1
- package/resources/v1/contracts/products.d.mts.map +1 -1
- package/resources/v1/contracts/products.d.ts.map +1 -1
- package/resources/v1/contracts/products.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/index.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards/index.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/index.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.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/contracts/rate-cards.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards.mjs.map +1 -1
- package/resources/v1/contracts.d.mts.map +1 -1
- package/resources/v1/contracts.d.ts.map +1 -1
- package/resources/v1/contracts.mjs.map +1 -1
- package/resources/v1/credit-grants.d.mts.map +1 -1
- package/resources/v1/credit-grants.d.ts.map +1 -1
- package/resources/v1/credit-grants.mjs.map +1 -1
- package/resources/v1/custom-fields.d.mts.map +1 -1
- package/resources/v1/custom-fields.d.ts.map +1 -1
- package/resources/v1/custom-fields.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/alerts.mjs.map +1 -1
- package/resources/v1/customers/billing-config.d.mts.map +1 -1
- package/resources/v1/customers/billing-config.d.ts.map +1 -1
- package/resources/v1/customers/billing-config.mjs.map +1 -1
- package/resources/v1/customers/commits.d.mts.map +1 -1
- package/resources/v1/customers/commits.d.ts.map +1 -1
- package/resources/v1/customers/commits.mjs.map +1 -1
- package/resources/v1/customers/credits.d.mts.map +1 -1
- package/resources/v1/customers/credits.d.ts.map +1 -1
- package/resources/v1/customers/credits.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.mjs.map +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/customers/invoices.mjs.map +1 -1
- package/resources/v1/customers/named-schedules.d.mts.map +1 -1
- package/resources/v1/customers/named-schedules.d.ts.map +1 -1
- package/resources/v1/customers/named-schedules.mjs.map +1 -1
- package/resources/v1/customers/plans.d.mts.map +1 -1
- package/resources/v1/customers/plans.d.ts.map +1 -1
- package/resources/v1/customers/plans.mjs.map +1 -1
- package/resources/v1/customers.d.mts.map +1 -1
- package/resources/v1/customers.d.ts.map +1 -1
- package/resources/v1/customers.mjs.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 -2
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +1 -2
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +1 -3
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +0 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/invoices.d.mts.map +1 -1
- package/resources/v1/invoices.d.ts.map +1 -1
- package/resources/v1/invoices.mjs.map +1 -1
- package/resources/v1/packages.d.mts +297 -13
- package/resources/v1/packages.d.mts.map +1 -1
- package/resources/v1/packages.d.ts +297 -13
- package/resources/v1/packages.d.ts.map +1 -1
- package/resources/v1/packages.js +3 -4
- package/resources/v1/packages.js.map +1 -1
- package/resources/v1/packages.mjs +3 -4
- package/resources/v1/packages.mjs.map +1 -1
- package/resources/v1/plans.d.mts.map +1 -1
- package/resources/v1/plans.d.ts.map +1 -1
- package/resources/v1/plans.mjs.map +1 -1
- package/resources/v1/pricing-units.d.mts.map +1 -1
- package/resources/v1/pricing-units.d.ts.map +1 -1
- package/resources/v1/pricing-units.mjs.map +1 -1
- package/resources/v1/services.d.mts.map +1 -1
- package/resources/v1/services.d.ts.map +1 -1
- package/resources/v1/services.mjs.map +1 -1
- package/resources/v1/settings/billing-providers.d.mts.map +1 -1
- package/resources/v1/settings/billing-providers.d.ts.map +1 -1
- package/resources/v1/settings/billing-providers.mjs.map +1 -1
- package/resources/v1/settings/index.d.mts.map +1 -1
- package/resources/v1/settings/index.d.ts.map +1 -1
- package/resources/v1/settings/index.mjs.map +1 -1
- package/resources/v1/settings/settings.d.mts.map +1 -1
- package/resources/v1/settings/settings.d.ts.map +1 -1
- package/resources/v1/settings/settings.mjs.map +1 -1
- package/resources/v1/settings.d.mts.map +1 -1
- package/resources/v1/settings.d.ts.map +1 -1
- package/resources/v1/settings.mjs.map +1 -1
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +2 -6
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +2 -6
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +0 -4
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +0 -4
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v1.d.mts.map +1 -1
- package/resources/v1.d.ts.map +1 -1
- package/resources/v1.mjs.map +1 -1
- package/resources/v2/contracts.d.mts +1762 -5
- package/resources/v2/contracts.d.mts.map +1 -1
- package/resources/v2/contracts.d.ts +1762 -5
- package/resources/v2/contracts.d.ts.map +1 -1
- package/resources/v2/contracts.mjs.map +1 -1
- package/resources/v2/index.d.mts.map +1 -1
- package/resources/v2/index.d.ts.map +1 -1
- package/resources/v2/index.mjs.map +1 -1
- package/resources/v2/v2.d.mts.map +1 -1
- package/resources/v2/v2.d.ts.map +1 -1
- package/resources/v2/v2.mjs.map +1 -1
- package/resources/v2.d.mts.map +1 -1
- package/resources/v2.d.ts.map +1 -1
- package/resources/v2.mjs.map +1 -1
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +9 -1
- package/src/resources/shared.ts +524 -4
- package/src/resources/v1/alerts.ts +49 -0
- package/src/resources/v1/contracts/contracts.ts +850 -9
- 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 -11
- package/src/resources/v1/packages.ts +372 -13
- package/src/resources/v1/v1.ts +4 -26
- package/src/resources/v2/contracts.ts +2271 -5
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +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/resources/v1/payments.d.mts +0 -127
- package/resources/v1/payments.d.mts.map +0 -1
- package/resources/v1/payments.d.ts +0 -127
- package/resources/v1/payments.d.ts.map +0 -1
- package/resources/v1/payments.js +0 -71
- package/resources/v1/payments.js.map +0 -1
- package/resources/v1/payments.mjs +0 -67
- package/resources/v1/payments.mjs.map +0 -1
- package/src/resources/v1/payments.ts +0 -187
|
@@ -145,10 +145,9 @@ export class Packages extends APIResource {
|
|
|
145
145
|
*
|
|
146
146
|
* ### **Usage guidelines:**
|
|
147
147
|
*
|
|
148
|
-
* Use the
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
* pass **`covering_date`** equal to the current time.
|
|
148
|
+
* Use the **`starting_at`**, **`covering_date`**, and **`include_archived`**
|
|
149
|
+
* parameters to filter the list of returned contracts. For example, to list only
|
|
150
|
+
* currently active contracts, pass **`covering_date`** equal to the current time.
|
|
152
151
|
*
|
|
153
152
|
* @example
|
|
154
153
|
* ```ts
|
|
@@ -259,6 +258,8 @@ export namespace PackageRetrieveResponse {
|
|
|
259
258
|
|
|
260
259
|
spend_threshold_configuration?: Shared.SpendThresholdConfiguration;
|
|
261
260
|
|
|
261
|
+
spend_trackers?: Array<Data.SpendTracker>;
|
|
262
|
+
|
|
262
263
|
subscriptions?: Array<Data.Subscription>;
|
|
263
264
|
|
|
264
265
|
/**
|
|
@@ -429,6 +430,8 @@ export namespace PackageRetrieveResponse {
|
|
|
429
430
|
|
|
430
431
|
export namespace Override {
|
|
431
432
|
export interface OverrideSpecifier {
|
|
433
|
+
any_commit_or_credit_template_ids?: Array<string>;
|
|
434
|
+
|
|
432
435
|
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
433
436
|
|
|
434
437
|
commit_template_ids?: Array<string>;
|
|
@@ -665,6 +668,11 @@ export namespace PackageRetrieveResponse {
|
|
|
665
668
|
*/
|
|
666
669
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
667
670
|
|
|
671
|
+
/**
|
|
672
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
673
|
+
*/
|
|
674
|
+
proration_rounding?: RecurringCommit.ProrationRounding | null;
|
|
675
|
+
|
|
668
676
|
/**
|
|
669
677
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
670
678
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -672,7 +680,7 @@ export namespace PackageRetrieveResponse {
|
|
|
672
680
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
673
681
|
* invoice dates.
|
|
674
682
|
*/
|
|
675
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
683
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
676
684
|
|
|
677
685
|
/**
|
|
678
686
|
* Will be passed down to the individual commits. This controls how much of an
|
|
@@ -752,6 +760,41 @@ export namespace PackageRetrieveResponse {
|
|
|
752
760
|
unit_price: number;
|
|
753
761
|
}
|
|
754
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
|
+
|
|
755
798
|
/**
|
|
756
799
|
* Attach a subscription to the recurring commit/credit.
|
|
757
800
|
*/
|
|
@@ -827,6 +870,11 @@ export namespace PackageRetrieveResponse {
|
|
|
827
870
|
*/
|
|
828
871
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
829
872
|
|
|
873
|
+
/**
|
|
874
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
875
|
+
*/
|
|
876
|
+
proration_rounding?: RecurringCredit.ProrationRounding | null;
|
|
877
|
+
|
|
830
878
|
/**
|
|
831
879
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
832
880
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -834,7 +882,7 @@ export namespace PackageRetrieveResponse {
|
|
|
834
882
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
835
883
|
* invoice dates.
|
|
836
884
|
*/
|
|
837
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
885
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
838
886
|
|
|
839
887
|
/**
|
|
840
888
|
* Will be passed down to the individual commits. This controls how much of an
|
|
@@ -903,6 +951,27 @@ export namespace PackageRetrieveResponse {
|
|
|
903
951
|
value: number;
|
|
904
952
|
}
|
|
905
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
|
+
|
|
906
975
|
/**
|
|
907
976
|
* Attach a subscription to the recurring commit/credit.
|
|
908
977
|
*/
|
|
@@ -924,6 +993,29 @@ export namespace PackageRetrieveResponse {
|
|
|
924
993
|
}
|
|
925
994
|
}
|
|
926
995
|
|
|
996
|
+
export interface SpendTracker {
|
|
997
|
+
/**
|
|
998
|
+
* Human-readable identifier, unique per contract.
|
|
999
|
+
*/
|
|
1000
|
+
alias: string;
|
|
1001
|
+
|
|
1002
|
+
applicable_spend_specifiers: Array<SpendTracker.ApplicableSpendSpecifier>;
|
|
1003
|
+
|
|
1004
|
+
credit_type_id: string;
|
|
1005
|
+
|
|
1006
|
+
reset_frequency: 'BILLING_PERIOD';
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
export namespace SpendTracker {
|
|
1010
|
+
export interface ApplicableSpendSpecifier {
|
|
1011
|
+
sources: Array<'THRESHOLD_RECHARGE' | 'MANUAL'>;
|
|
1012
|
+
|
|
1013
|
+
spend_type: 'COMMIT_PURCHASE';
|
|
1014
|
+
|
|
1015
|
+
discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY';
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
|
|
927
1019
|
export interface Subscription {
|
|
928
1020
|
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
929
1021
|
|
|
@@ -933,6 +1025,8 @@ export namespace PackageRetrieveResponse {
|
|
|
933
1025
|
|
|
934
1026
|
id?: string;
|
|
935
1027
|
|
|
1028
|
+
billing_cycle_config?: Subscription.BillingCycleConfig;
|
|
1029
|
+
|
|
936
1030
|
/**
|
|
937
1031
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
938
1032
|
*/
|
|
@@ -971,6 +1065,22 @@ export namespace PackageRetrieveResponse {
|
|
|
971
1065
|
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
972
1066
|
|
|
973
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
|
+
}
|
|
974
1084
|
}
|
|
975
1085
|
|
|
976
1086
|
export interface SubscriptionRate {
|
|
@@ -987,6 +1097,10 @@ export namespace PackageRetrieveResponse {
|
|
|
987
1097
|
}
|
|
988
1098
|
}
|
|
989
1099
|
|
|
1100
|
+
export interface BillingCycleConfig {
|
|
1101
|
+
invoice_placement?: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
|
|
1102
|
+
}
|
|
1103
|
+
|
|
990
1104
|
export interface Duration {
|
|
991
1105
|
unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS';
|
|
992
1106
|
|
|
@@ -1086,6 +1200,8 @@ export interface PackageListResponse {
|
|
|
1086
1200
|
|
|
1087
1201
|
spend_threshold_configuration?: Shared.SpendThresholdConfiguration;
|
|
1088
1202
|
|
|
1203
|
+
spend_trackers?: Array<PackageListResponse.SpendTracker>;
|
|
1204
|
+
|
|
1089
1205
|
subscriptions?: Array<PackageListResponse.Subscription>;
|
|
1090
1206
|
|
|
1091
1207
|
/**
|
|
@@ -1256,6 +1372,8 @@ export namespace PackageListResponse {
|
|
|
1256
1372
|
|
|
1257
1373
|
export namespace Override {
|
|
1258
1374
|
export interface OverrideSpecifier {
|
|
1375
|
+
any_commit_or_credit_template_ids?: Array<string>;
|
|
1376
|
+
|
|
1259
1377
|
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1260
1378
|
|
|
1261
1379
|
commit_template_ids?: Array<string>;
|
|
@@ -1492,6 +1610,11 @@ export namespace PackageListResponse {
|
|
|
1492
1610
|
*/
|
|
1493
1611
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1494
1612
|
|
|
1613
|
+
/**
|
|
1614
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
1615
|
+
*/
|
|
1616
|
+
proration_rounding?: RecurringCommit.ProrationRounding | null;
|
|
1617
|
+
|
|
1495
1618
|
/**
|
|
1496
1619
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1497
1620
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -1499,7 +1622,7 @@ export namespace PackageListResponse {
|
|
|
1499
1622
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1500
1623
|
* invoice dates.
|
|
1501
1624
|
*/
|
|
1502
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1625
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
1503
1626
|
|
|
1504
1627
|
/**
|
|
1505
1628
|
* Will be passed down to the individual commits. This controls how much of an
|
|
@@ -1579,6 +1702,41 @@ export namespace PackageListResponse {
|
|
|
1579
1702
|
unit_price: number;
|
|
1580
1703
|
}
|
|
1581
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
|
+
|
|
1582
1740
|
/**
|
|
1583
1741
|
* Attach a subscription to the recurring commit/credit.
|
|
1584
1742
|
*/
|
|
@@ -1654,6 +1812,11 @@ export namespace PackageListResponse {
|
|
|
1654
1812
|
*/
|
|
1655
1813
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1656
1814
|
|
|
1815
|
+
/**
|
|
1816
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
1817
|
+
*/
|
|
1818
|
+
proration_rounding?: RecurringCredit.ProrationRounding | null;
|
|
1819
|
+
|
|
1657
1820
|
/**
|
|
1658
1821
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1659
1822
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -1661,7 +1824,7 @@ export namespace PackageListResponse {
|
|
|
1661
1824
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1662
1825
|
* invoice dates.
|
|
1663
1826
|
*/
|
|
1664
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1827
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
1665
1828
|
|
|
1666
1829
|
/**
|
|
1667
1830
|
* Will be passed down to the individual commits. This controls how much of an
|
|
@@ -1730,6 +1893,27 @@ export namespace PackageListResponse {
|
|
|
1730
1893
|
value: number;
|
|
1731
1894
|
}
|
|
1732
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
|
+
|
|
1733
1917
|
/**
|
|
1734
1918
|
* Attach a subscription to the recurring commit/credit.
|
|
1735
1919
|
*/
|
|
@@ -1751,6 +1935,29 @@ export namespace PackageListResponse {
|
|
|
1751
1935
|
}
|
|
1752
1936
|
}
|
|
1753
1937
|
|
|
1938
|
+
export interface SpendTracker {
|
|
1939
|
+
/**
|
|
1940
|
+
* Human-readable identifier, unique per contract.
|
|
1941
|
+
*/
|
|
1942
|
+
alias: string;
|
|
1943
|
+
|
|
1944
|
+
applicable_spend_specifiers: Array<SpendTracker.ApplicableSpendSpecifier>;
|
|
1945
|
+
|
|
1946
|
+
credit_type_id: string;
|
|
1947
|
+
|
|
1948
|
+
reset_frequency: 'BILLING_PERIOD';
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
export namespace SpendTracker {
|
|
1952
|
+
export interface ApplicableSpendSpecifier {
|
|
1953
|
+
sources: Array<'THRESHOLD_RECHARGE' | 'MANUAL'>;
|
|
1954
|
+
|
|
1955
|
+
spend_type: 'COMMIT_PURCHASE';
|
|
1956
|
+
|
|
1957
|
+
discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY';
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1754
1961
|
export interface Subscription {
|
|
1755
1962
|
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
1756
1963
|
|
|
@@ -1760,6 +1967,8 @@ export namespace PackageListResponse {
|
|
|
1760
1967
|
|
|
1761
1968
|
id?: string;
|
|
1762
1969
|
|
|
1970
|
+
billing_cycle_config?: Subscription.BillingCycleConfig;
|
|
1971
|
+
|
|
1763
1972
|
/**
|
|
1764
1973
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1765
1974
|
*/
|
|
@@ -1798,6 +2007,22 @@ export namespace PackageListResponse {
|
|
|
1798
2007
|
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
1799
2008
|
|
|
1800
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
|
+
}
|
|
1801
2026
|
}
|
|
1802
2027
|
|
|
1803
2028
|
export interface SubscriptionRate {
|
|
@@ -1814,6 +2039,10 @@ export namespace PackageListResponse {
|
|
|
1814
2039
|
}
|
|
1815
2040
|
}
|
|
1816
2041
|
|
|
2042
|
+
export interface BillingCycleConfig {
|
|
2043
|
+
invoice_placement?: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
|
|
2044
|
+
}
|
|
2045
|
+
|
|
1817
2046
|
export interface Duration {
|
|
1818
2047
|
unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS';
|
|
1819
2048
|
|
|
@@ -1917,6 +2146,8 @@ export interface PackageCreateParams {
|
|
|
1917
2146
|
|
|
1918
2147
|
spend_threshold_configuration?: Shared.SpendThresholdConfiguration;
|
|
1919
2148
|
|
|
2149
|
+
spend_trackers?: Array<PackageCreateParams.SpendTracker>;
|
|
2150
|
+
|
|
1920
2151
|
subscriptions?: Array<PackageCreateParams.Subscription>;
|
|
1921
2152
|
|
|
1922
2153
|
/**
|
|
@@ -2256,9 +2487,10 @@ export namespace PackageCreateParams {
|
|
|
2256
2487
|
|
|
2257
2488
|
/**
|
|
2258
2489
|
* Indicates whether the override should only apply to commits. Defaults to
|
|
2259
|
-
* `false`. If `true
|
|
2260
|
-
* passing `commit_ids
|
|
2261
|
-
*
|
|
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
|
|
2262
2494
|
*/
|
|
2263
2495
|
is_commit_specific?: boolean;
|
|
2264
2496
|
|
|
@@ -2300,6 +2532,15 @@ export namespace PackageCreateParams {
|
|
|
2300
2532
|
|
|
2301
2533
|
export namespace Override {
|
|
2302
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
|
+
|
|
2303
2544
|
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2304
2545
|
|
|
2305
2546
|
/**
|
|
@@ -2469,6 +2710,11 @@ export namespace PackageCreateParams {
|
|
|
2469
2710
|
*/
|
|
2470
2711
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
2471
2712
|
|
|
2713
|
+
/**
|
|
2714
|
+
* Optional rounding configuration for prorated recurring commit amounts.
|
|
2715
|
+
*/
|
|
2716
|
+
proration_rounding?: RecurringCommit.ProrationRounding;
|
|
2717
|
+
|
|
2472
2718
|
/**
|
|
2473
2719
|
* Whether the created commits will use the commit rate or list rate
|
|
2474
2720
|
*/
|
|
@@ -2481,7 +2727,7 @@ export namespace PackageCreateParams {
|
|
|
2481
2727
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
2482
2728
|
* invoice dates.
|
|
2483
2729
|
*/
|
|
2484
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2730
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
2485
2731
|
|
|
2486
2732
|
/**
|
|
2487
2733
|
* Will be passed down to the individual commits. This controls how much of an
|
|
@@ -2568,6 +2814,41 @@ export namespace PackageCreateParams {
|
|
|
2568
2814
|
unit_price: number;
|
|
2569
2815
|
}
|
|
2570
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
|
+
|
|
2571
2852
|
/**
|
|
2572
2853
|
* Attach a subscription to the recurring commit/credit.
|
|
2573
2854
|
*/
|
|
@@ -2654,6 +2935,11 @@ export namespace PackageCreateParams {
|
|
|
2654
2935
|
*/
|
|
2655
2936
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
2656
2937
|
|
|
2938
|
+
/**
|
|
2939
|
+
* Optional rounding configuration for prorated recurring credit amounts.
|
|
2940
|
+
*/
|
|
2941
|
+
proration_rounding?: RecurringCredit.ProrationRounding;
|
|
2942
|
+
|
|
2657
2943
|
/**
|
|
2658
2944
|
* Whether the created commits will use the commit rate or list rate
|
|
2659
2945
|
*/
|
|
@@ -2666,7 +2952,7 @@ export namespace PackageCreateParams {
|
|
|
2666
2952
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
2667
2953
|
* invoice dates.
|
|
2668
2954
|
*/
|
|
2669
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2955
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
2670
2956
|
|
|
2671
2957
|
/**
|
|
2672
2958
|
* Will be passed down to the individual commits. This controls how much of an
|
|
@@ -2742,6 +3028,27 @@ export namespace PackageCreateParams {
|
|
|
2742
3028
|
value: number;
|
|
2743
3029
|
}
|
|
2744
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
|
+
|
|
2745
3052
|
/**
|
|
2746
3053
|
* Attach a subscription to the recurring commit/credit.
|
|
2747
3054
|
*/
|
|
@@ -2838,6 +3145,32 @@ export namespace PackageCreateParams {
|
|
|
2838
3145
|
}
|
|
2839
3146
|
}
|
|
2840
3147
|
|
|
3148
|
+
export interface SpendTracker {
|
|
3149
|
+
/**
|
|
3150
|
+
* Human-readable identifier, unique per contract.
|
|
3151
|
+
*/
|
|
3152
|
+
alias: string;
|
|
3153
|
+
|
|
3154
|
+
applicable_spend_specifiers: Array<SpendTracker.ApplicableSpendSpecifier>;
|
|
3155
|
+
|
|
3156
|
+
credit_type_id: string;
|
|
3157
|
+
|
|
3158
|
+
reset_frequency: 'BILLING_PERIOD';
|
|
3159
|
+
}
|
|
3160
|
+
|
|
3161
|
+
export namespace SpendTracker {
|
|
3162
|
+
export interface ApplicableSpendSpecifier {
|
|
3163
|
+
sources: Array<'THRESHOLD_RECHARGE' | 'MANUAL'>;
|
|
3164
|
+
|
|
3165
|
+
spend_type: 'COMMIT_PURCHASE';
|
|
3166
|
+
|
|
3167
|
+
/**
|
|
3168
|
+
* Filter by whether the spend was discounted. Defaults to ANY if omitted.
|
|
3169
|
+
*/
|
|
3170
|
+
discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY';
|
|
3171
|
+
}
|
|
3172
|
+
}
|
|
3173
|
+
|
|
2841
3174
|
export interface Subscription {
|
|
2842
3175
|
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
2843
3176
|
|
|
@@ -2845,6 +3178,8 @@ export namespace PackageCreateParams {
|
|
|
2845
3178
|
|
|
2846
3179
|
subscription_rate: Subscription.SubscriptionRate;
|
|
2847
3180
|
|
|
3181
|
+
billing_cycle_config?: Subscription.BillingCycleConfig;
|
|
3182
|
+
|
|
2848
3183
|
/**
|
|
2849
3184
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2850
3185
|
*/
|
|
@@ -2909,6 +3244,22 @@ export namespace PackageCreateParams {
|
|
|
2909
3244
|
* Indicates if the partial period will be prorated or charged a full amount.
|
|
2910
3245
|
*/
|
|
2911
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
|
+
}
|
|
2912
3263
|
}
|
|
2913
3264
|
|
|
2914
3265
|
export interface SubscriptionRate {
|
|
@@ -2924,6 +3275,14 @@ export namespace PackageCreateParams {
|
|
|
2924
3275
|
product_id: string;
|
|
2925
3276
|
}
|
|
2926
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
|
+
|
|
2927
3286
|
/**
|
|
2928
3287
|
* Lifetime of the subscription from its start. If not provided, subscription
|
|
2929
3288
|
* inherits contract end date.
|