@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
package/resources/shared.d.mts
CHANGED
|
@@ -80,6 +80,11 @@ export interface Commit {
|
|
|
80
80
|
*/
|
|
81
81
|
balance?: number;
|
|
82
82
|
contract?: Commit.Contract;
|
|
83
|
+
/**
|
|
84
|
+
* The actor who created this commit. Omitted for system-generated commits such as
|
|
85
|
+
* recurring commits, rollover commits, and threshold commits.
|
|
86
|
+
*/
|
|
87
|
+
created_by?: string;
|
|
83
88
|
/**
|
|
84
89
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
85
90
|
*/
|
|
@@ -132,6 +137,10 @@ export interface Commit {
|
|
|
132
137
|
* specifiers to contribute to a commit's or credit's drawdown.
|
|
133
138
|
*/
|
|
134
139
|
specifiers?: Array<CommitSpecifier>;
|
|
140
|
+
/**
|
|
141
|
+
* Optional attributes controlling how this commit interacts with spend trackers.
|
|
142
|
+
*/
|
|
143
|
+
spend_tracker_attributes?: Commit.SpendTrackerAttributes;
|
|
135
144
|
/**
|
|
136
145
|
* The subscription configuration for this commit, if it was generated from a
|
|
137
146
|
* recurring commit with a subscription attached.
|
|
@@ -256,6 +265,16 @@ export declare namespace Commit {
|
|
|
256
265
|
commit_id: string;
|
|
257
266
|
contract_id: string;
|
|
258
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* Optional attributes controlling how this commit interacts with spend trackers.
|
|
270
|
+
*/
|
|
271
|
+
interface SpendTrackerAttributes {
|
|
272
|
+
/**
|
|
273
|
+
* If true, this commit is included in spend trackers with discounted set to
|
|
274
|
+
* DISCOUNTED_ONLY
|
|
275
|
+
*/
|
|
276
|
+
counts_as_discounted: boolean;
|
|
277
|
+
}
|
|
259
278
|
/**
|
|
260
279
|
* The subscription configuration for this commit, if it was generated from a
|
|
261
280
|
* recurring commit with a subscription attached.
|
|
@@ -383,6 +402,10 @@ export interface Contract {
|
|
|
383
402
|
*/
|
|
384
403
|
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
385
404
|
spend_threshold_configuration?: SpendThresholdConfiguration;
|
|
405
|
+
/**
|
|
406
|
+
* Spend trackers attached to this contract.
|
|
407
|
+
*/
|
|
408
|
+
spend_trackers?: Array<Contract.SpendTracker>;
|
|
386
409
|
/**
|
|
387
410
|
* List of subscriptions on the contract.
|
|
388
411
|
*/
|
|
@@ -456,6 +479,28 @@ export declare namespace Contract {
|
|
|
456
479
|
[key: string]: unknown;
|
|
457
480
|
};
|
|
458
481
|
}
|
|
482
|
+
interface SpendTracker {
|
|
483
|
+
/**
|
|
484
|
+
* Human-readable identifier, unique per contract.
|
|
485
|
+
*/
|
|
486
|
+
alias: string;
|
|
487
|
+
applicable_spend_specifiers: Array<SpendTracker.ApplicableSpendSpecifier>;
|
|
488
|
+
credit_type_id: string;
|
|
489
|
+
reset_frequency: 'BILLING_PERIOD';
|
|
490
|
+
accumulated_spend?: SpendTracker.AccumulatedSpend;
|
|
491
|
+
}
|
|
492
|
+
namespace SpendTracker {
|
|
493
|
+
interface ApplicableSpendSpecifier {
|
|
494
|
+
sources: Array<'THRESHOLD_RECHARGE' | 'MANUAL'>;
|
|
495
|
+
spend_type: 'COMMIT_PURCHASE';
|
|
496
|
+
discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY';
|
|
497
|
+
}
|
|
498
|
+
interface AccumulatedSpend {
|
|
499
|
+
amount: number;
|
|
500
|
+
period_ending_before: string;
|
|
501
|
+
period_starting_at: string;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
459
504
|
}
|
|
460
505
|
export interface ContractV2 {
|
|
461
506
|
id: string;
|
|
@@ -538,6 +583,10 @@ export interface ContractV2 {
|
|
|
538
583
|
*/
|
|
539
584
|
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
540
585
|
spend_threshold_configuration?: SpendThresholdConfigurationV2;
|
|
586
|
+
/**
|
|
587
|
+
* Spend trackers attached to this contract.
|
|
588
|
+
*/
|
|
589
|
+
spend_trackers?: Array<ContractV2.SpendTracker>;
|
|
541
590
|
/**
|
|
542
591
|
* List of subscriptions on the contract.
|
|
543
592
|
*/
|
|
@@ -582,6 +631,11 @@ export declare namespace ContractV2 {
|
|
|
582
631
|
*/
|
|
583
632
|
balance?: number;
|
|
584
633
|
contract?: Commit.Contract;
|
|
634
|
+
/**
|
|
635
|
+
* The actor who created this commit. Omitted for system-generated commits such as
|
|
636
|
+
* recurring commits, rollover commits, and threshold commits.
|
|
637
|
+
*/
|
|
638
|
+
created_by?: string;
|
|
585
639
|
/**
|
|
586
640
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
587
641
|
*/
|
|
@@ -633,6 +687,10 @@ export declare namespace ContractV2 {
|
|
|
633
687
|
* specifiers to contribute to a commit's or credit's drawdown.
|
|
634
688
|
*/
|
|
635
689
|
specifiers?: Array<Shared.CommitSpecifier>;
|
|
690
|
+
/**
|
|
691
|
+
* Optional attributes controlling how this commit interacts with spend trackers.
|
|
692
|
+
*/
|
|
693
|
+
spend_tracker_attributes?: Commit.SpendTrackerAttributes;
|
|
636
694
|
/**
|
|
637
695
|
* Attach a subscription to the recurring commit/credit.
|
|
638
696
|
*/
|
|
@@ -749,6 +807,16 @@ export declare namespace ContractV2 {
|
|
|
749
807
|
commit_id: string;
|
|
750
808
|
contract_id: string;
|
|
751
809
|
}
|
|
810
|
+
/**
|
|
811
|
+
* Optional attributes controlling how this commit interacts with spend trackers.
|
|
812
|
+
*/
|
|
813
|
+
interface SpendTrackerAttributes {
|
|
814
|
+
/**
|
|
815
|
+
* If true, this commit is included in spend trackers with discounted set to
|
|
816
|
+
* DISCOUNTED_ONLY
|
|
817
|
+
*/
|
|
818
|
+
counts_as_discounted: boolean;
|
|
819
|
+
}
|
|
752
820
|
}
|
|
753
821
|
interface Override {
|
|
754
822
|
id: string;
|
|
@@ -769,6 +837,7 @@ export declare namespace ContractV2 {
|
|
|
769
837
|
}
|
|
770
838
|
namespace Override {
|
|
771
839
|
interface OverrideSpecifier {
|
|
840
|
+
any_commit_or_credit_ids?: Array<string>;
|
|
772
841
|
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
773
842
|
commit_ids?: Array<string>;
|
|
774
843
|
presentation_group_values?: {
|
|
@@ -872,6 +941,11 @@ export declare namespace ContractV2 {
|
|
|
872
941
|
* start date
|
|
873
942
|
*/
|
|
874
943
|
created_at?: string;
|
|
944
|
+
/**
|
|
945
|
+
* The actor who created this credit. Omitted for system-generated credits such as
|
|
946
|
+
* recurring credits.
|
|
947
|
+
*/
|
|
948
|
+
created_by?: string;
|
|
875
949
|
/**
|
|
876
950
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
877
951
|
*/
|
|
@@ -1133,6 +1207,10 @@ export declare namespace ContractV2 {
|
|
|
1133
1207
|
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1134
1208
|
*/
|
|
1135
1209
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1210
|
+
/**
|
|
1211
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
1212
|
+
*/
|
|
1213
|
+
proration_rounding?: RecurringCommit.ProrationRounding | null;
|
|
1136
1214
|
/**
|
|
1137
1215
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1138
1216
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -1140,7 +1218,7 @@ export declare namespace ContractV2 {
|
|
|
1140
1218
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1141
1219
|
* invoice dates.
|
|
1142
1220
|
*/
|
|
1143
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1221
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
1144
1222
|
/**
|
|
1145
1223
|
* Will be passed down to the individual commits. This controls how much of an
|
|
1146
1224
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
@@ -1189,6 +1267,33 @@ export declare namespace ContractV2 {
|
|
|
1189
1267
|
quantity: number;
|
|
1190
1268
|
unit_price: number;
|
|
1191
1269
|
}
|
|
1270
|
+
/**
|
|
1271
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
1272
|
+
*/
|
|
1273
|
+
interface ProrationRounding {
|
|
1274
|
+
access?: ProrationRounding.Access;
|
|
1275
|
+
invoice?: ProrationRounding.Invoice;
|
|
1276
|
+
}
|
|
1277
|
+
namespace ProrationRounding {
|
|
1278
|
+
interface Access {
|
|
1279
|
+
/**
|
|
1280
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
1281
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1282
|
+
* nearest 100 in the stored unit).
|
|
1283
|
+
*/
|
|
1284
|
+
decimal_places: number;
|
|
1285
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
1286
|
+
}
|
|
1287
|
+
interface Invoice {
|
|
1288
|
+
/**
|
|
1289
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
1290
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1291
|
+
* nearest 100 in the stored unit).
|
|
1292
|
+
*/
|
|
1293
|
+
decimal_places: number;
|
|
1294
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1192
1297
|
}
|
|
1193
1298
|
interface RecurringCredit {
|
|
1194
1299
|
id: string;
|
|
@@ -1247,6 +1352,10 @@ export declare namespace ContractV2 {
|
|
|
1247
1352
|
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1248
1353
|
*/
|
|
1249
1354
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1355
|
+
/**
|
|
1356
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
1357
|
+
*/
|
|
1358
|
+
proration_rounding?: RecurringCredit.ProrationRounding | null;
|
|
1250
1359
|
/**
|
|
1251
1360
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1252
1361
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -1254,7 +1363,7 @@ export declare namespace ContractV2 {
|
|
|
1254
1363
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1255
1364
|
* invoice dates.
|
|
1256
1365
|
*/
|
|
1257
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1366
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
1258
1367
|
/**
|
|
1259
1368
|
* Will be passed down to the individual commits. This controls how much of an
|
|
1260
1369
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
@@ -1295,6 +1404,23 @@ export declare namespace ContractV2 {
|
|
|
1295
1404
|
interface Contract {
|
|
1296
1405
|
id: string;
|
|
1297
1406
|
}
|
|
1407
|
+
/**
|
|
1408
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
1409
|
+
*/
|
|
1410
|
+
interface ProrationRounding {
|
|
1411
|
+
access?: ProrationRounding.Access;
|
|
1412
|
+
}
|
|
1413
|
+
namespace ProrationRounding {
|
|
1414
|
+
interface Access {
|
|
1415
|
+
/**
|
|
1416
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
1417
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1418
|
+
* nearest 100 in the stored unit).
|
|
1419
|
+
*/
|
|
1420
|
+
decimal_places: number;
|
|
1421
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1298
1424
|
}
|
|
1299
1425
|
interface ResellerRoyalty {
|
|
1300
1426
|
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
@@ -1317,6 +1443,28 @@ export declare namespace ContractV2 {
|
|
|
1317
1443
|
reseller_contract_value?: number;
|
|
1318
1444
|
}
|
|
1319
1445
|
}
|
|
1446
|
+
interface SpendTracker {
|
|
1447
|
+
/**
|
|
1448
|
+
* Human-readable identifier, unique per contract.
|
|
1449
|
+
*/
|
|
1450
|
+
alias: string;
|
|
1451
|
+
applicable_spend_specifiers: Array<SpendTracker.ApplicableSpendSpecifier>;
|
|
1452
|
+
credit_type_id: string;
|
|
1453
|
+
reset_frequency: 'BILLING_PERIOD';
|
|
1454
|
+
accumulated_spend?: SpendTracker.AccumulatedSpend;
|
|
1455
|
+
}
|
|
1456
|
+
namespace SpendTracker {
|
|
1457
|
+
interface ApplicableSpendSpecifier {
|
|
1458
|
+
sources: Array<'THRESHOLD_RECHARGE' | 'MANUAL'>;
|
|
1459
|
+
spend_type: 'COMMIT_PURCHASE';
|
|
1460
|
+
discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY';
|
|
1461
|
+
}
|
|
1462
|
+
interface AccumulatedSpend {
|
|
1463
|
+
amount: number;
|
|
1464
|
+
period_ending_before: string;
|
|
1465
|
+
period_starting_at: string;
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1320
1468
|
interface Subscription {
|
|
1321
1469
|
/**
|
|
1322
1470
|
* Previous, current, and next billing periods for the subscription.
|
|
@@ -1344,6 +1492,7 @@ export declare namespace ContractV2 {
|
|
|
1344
1492
|
starting_at: string;
|
|
1345
1493
|
subscription_rate: Subscription.SubscriptionRate;
|
|
1346
1494
|
id?: string;
|
|
1495
|
+
billing_cycle_config?: Subscription.BillingCycleConfig;
|
|
1347
1496
|
/**
|
|
1348
1497
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1349
1498
|
*/
|
|
@@ -1382,6 +1531,18 @@ export declare namespace ContractV2 {
|
|
|
1382
1531
|
interface Proration {
|
|
1383
1532
|
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
1384
1533
|
is_prorated: boolean;
|
|
1534
|
+
rounding?: Proration.Rounding;
|
|
1535
|
+
}
|
|
1536
|
+
namespace Proration {
|
|
1537
|
+
interface Rounding {
|
|
1538
|
+
/**
|
|
1539
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
1540
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1541
|
+
* nearest 100 in the stored unit).
|
|
1542
|
+
*/
|
|
1543
|
+
decimal_places: number;
|
|
1544
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
1545
|
+
}
|
|
1385
1546
|
}
|
|
1386
1547
|
interface QuantitySchedule {
|
|
1387
1548
|
quantity: number;
|
|
@@ -1398,6 +1559,17 @@ export declare namespace ContractV2 {
|
|
|
1398
1559
|
name: string;
|
|
1399
1560
|
}
|
|
1400
1561
|
}
|
|
1562
|
+
interface BillingCycleConfig {
|
|
1563
|
+
/**
|
|
1564
|
+
* The date this subscription's billing cycle is anchored to.
|
|
1565
|
+
*/
|
|
1566
|
+
anchor_date: string;
|
|
1567
|
+
/**
|
|
1568
|
+
* Controls whether this subscription consolidates onto usage invoices or gets its
|
|
1569
|
+
* own scheduled invoice.
|
|
1570
|
+
*/
|
|
1571
|
+
invoice_placement: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
|
|
1572
|
+
}
|
|
1401
1573
|
interface SeatConfig {
|
|
1402
1574
|
/**
|
|
1403
1575
|
* The property name, sent on usage events, that identifies the seat ID associated
|
|
@@ -1462,6 +1634,10 @@ export interface ContractWithoutAmendments {
|
|
|
1462
1634
|
*/
|
|
1463
1635
|
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
1464
1636
|
spend_threshold_configuration?: SpendThresholdConfiguration;
|
|
1637
|
+
/**
|
|
1638
|
+
* Spend trackers attached to this contract.
|
|
1639
|
+
*/
|
|
1640
|
+
spend_trackers?: Array<ContractWithoutAmendments.SpendTracker>;
|
|
1465
1641
|
/**
|
|
1466
1642
|
* This field's availability is dependent on your client's configuration.
|
|
1467
1643
|
*/
|
|
@@ -1542,6 +1718,10 @@ export declare namespace ContractWithoutAmendments {
|
|
|
1542
1718
|
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1543
1719
|
*/
|
|
1544
1720
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1721
|
+
/**
|
|
1722
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
1723
|
+
*/
|
|
1724
|
+
proration_rounding?: RecurringCommit.ProrationRounding | null;
|
|
1545
1725
|
/**
|
|
1546
1726
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1547
1727
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -1549,7 +1729,7 @@ export declare namespace ContractWithoutAmendments {
|
|
|
1549
1729
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1550
1730
|
* invoice dates.
|
|
1551
1731
|
*/
|
|
1552
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1732
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
1553
1733
|
/**
|
|
1554
1734
|
* Will be passed down to the individual commits. This controls how much of an
|
|
1555
1735
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
@@ -1598,6 +1778,35 @@ export declare namespace ContractWithoutAmendments {
|
|
|
1598
1778
|
quantity: number;
|
|
1599
1779
|
unit_price: number;
|
|
1600
1780
|
}
|
|
1781
|
+
/**
|
|
1782
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
1783
|
+
*/
|
|
1784
|
+
interface ProrationRounding {
|
|
1785
|
+
access?: ProrationRounding.Access;
|
|
1786
|
+
invoice?: ProrationRounding.Invoice;
|
|
1787
|
+
}
|
|
1788
|
+
namespace ProrationRounding {
|
|
1789
|
+
interface Access {
|
|
1790
|
+
/**
|
|
1791
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
1792
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1793
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
1794
|
+
* dollar).
|
|
1795
|
+
*/
|
|
1796
|
+
decimal_places: number;
|
|
1797
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
1798
|
+
}
|
|
1799
|
+
interface Invoice {
|
|
1800
|
+
/**
|
|
1801
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
1802
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1803
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
1804
|
+
* dollar).
|
|
1805
|
+
*/
|
|
1806
|
+
decimal_places: number;
|
|
1807
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1601
1810
|
}
|
|
1602
1811
|
interface RecurringCredit {
|
|
1603
1812
|
id: string;
|
|
@@ -1656,6 +1865,10 @@ export declare namespace ContractWithoutAmendments {
|
|
|
1656
1865
|
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1657
1866
|
*/
|
|
1658
1867
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1868
|
+
/**
|
|
1869
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
1870
|
+
*/
|
|
1871
|
+
proration_rounding?: RecurringCredit.ProrationRounding | null;
|
|
1659
1872
|
/**
|
|
1660
1873
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1661
1874
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -1663,7 +1876,7 @@ export declare namespace ContractWithoutAmendments {
|
|
|
1663
1876
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1664
1877
|
* invoice dates.
|
|
1665
1878
|
*/
|
|
1666
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1879
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
1667
1880
|
/**
|
|
1668
1881
|
* Will be passed down to the individual commits. This controls how much of an
|
|
1669
1882
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
@@ -1704,6 +1917,24 @@ export declare namespace ContractWithoutAmendments {
|
|
|
1704
1917
|
interface Contract {
|
|
1705
1918
|
id: string;
|
|
1706
1919
|
}
|
|
1920
|
+
/**
|
|
1921
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
1922
|
+
*/
|
|
1923
|
+
interface ProrationRounding {
|
|
1924
|
+
access?: ProrationRounding.Access;
|
|
1925
|
+
}
|
|
1926
|
+
namespace ProrationRounding {
|
|
1927
|
+
interface Access {
|
|
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. For USD, this means rounding to the nearest
|
|
1932
|
+
* dollar).
|
|
1933
|
+
*/
|
|
1934
|
+
decimal_places: number;
|
|
1935
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
1936
|
+
}
|
|
1937
|
+
}
|
|
1707
1938
|
}
|
|
1708
1939
|
interface ResellerRoyalty {
|
|
1709
1940
|
fraction: number;
|
|
@@ -1720,6 +1951,28 @@ export declare namespace ContractWithoutAmendments {
|
|
|
1720
1951
|
gcp_offer_id?: string;
|
|
1721
1952
|
reseller_contract_value?: number;
|
|
1722
1953
|
}
|
|
1954
|
+
interface SpendTracker {
|
|
1955
|
+
/**
|
|
1956
|
+
* Human-readable identifier, unique per contract.
|
|
1957
|
+
*/
|
|
1958
|
+
alias: string;
|
|
1959
|
+
applicable_spend_specifiers: Array<SpendTracker.ApplicableSpendSpecifier>;
|
|
1960
|
+
credit_type_id: string;
|
|
1961
|
+
reset_frequency: 'BILLING_PERIOD';
|
|
1962
|
+
accumulated_spend?: SpendTracker.AccumulatedSpend;
|
|
1963
|
+
}
|
|
1964
|
+
namespace SpendTracker {
|
|
1965
|
+
interface ApplicableSpendSpecifier {
|
|
1966
|
+
sources: Array<'THRESHOLD_RECHARGE' | 'MANUAL'>;
|
|
1967
|
+
spend_type: 'COMMIT_PURCHASE';
|
|
1968
|
+
discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY';
|
|
1969
|
+
}
|
|
1970
|
+
interface AccumulatedSpend {
|
|
1971
|
+
amount: number;
|
|
1972
|
+
period_ending_before: string;
|
|
1973
|
+
period_starting_at: string;
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1723
1976
|
interface UsageFilter {
|
|
1724
1977
|
current: Shared.BaseUsageFilter | null;
|
|
1725
1978
|
initial: Shared.BaseUsageFilter;
|
|
@@ -1756,6 +2009,11 @@ export interface Credit {
|
|
|
1756
2009
|
*/
|
|
1757
2010
|
balance?: number;
|
|
1758
2011
|
contract?: Credit.Contract;
|
|
2012
|
+
/**
|
|
2013
|
+
* The actor who created this credit. Omitted for system-generated credits such as
|
|
2014
|
+
* recurring credits.
|
|
2015
|
+
*/
|
|
2016
|
+
created_by?: string;
|
|
1759
2017
|
/**
|
|
1760
2018
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1761
2019
|
*/
|
|
@@ -2055,6 +2313,7 @@ export interface Override {
|
|
|
2055
2313
|
}
|
|
2056
2314
|
export declare namespace Override {
|
|
2057
2315
|
interface OverrideSpecifier {
|
|
2316
|
+
any_commit_or_credit_ids?: Array<string>;
|
|
2058
2317
|
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2059
2318
|
commit_ids?: Array<string>;
|
|
2060
2319
|
presentation_group_values?: {
|
|
@@ -2241,6 +2500,11 @@ export interface PrepaidBalanceThresholdConfiguration {
|
|
|
2241
2500
|
*/
|
|
2242
2501
|
custom_credit_type_id?: string;
|
|
2243
2502
|
discount_configuration?: PrepaidBalanceThresholdConfiguration.DiscountConfiguration;
|
|
2503
|
+
/**
|
|
2504
|
+
* Determines which balances are excluded from remaining balance calculation for
|
|
2505
|
+
* threshold billing.
|
|
2506
|
+
*/
|
|
2507
|
+
threshold_balance_specifiers?: Array<PrepaidBalanceThresholdConfiguration.ThresholdBalanceSpecifier>;
|
|
2244
2508
|
}
|
|
2245
2509
|
export declare namespace PrepaidBalanceThresholdConfiguration {
|
|
2246
2510
|
interface Commit extends Shared.BaseThresholdCommit {
|
|
@@ -2271,6 +2535,50 @@ export declare namespace PrepaidBalanceThresholdConfiguration {
|
|
|
2271
2535
|
* (a 15% discount).
|
|
2272
2536
|
*/
|
|
2273
2537
|
payment_fraction: number;
|
|
2538
|
+
/**
|
|
2539
|
+
* If provided, the discount stops applying once the spend tracker has accumulated
|
|
2540
|
+
* this much spend in the billing period.
|
|
2541
|
+
*/
|
|
2542
|
+
cap?: DiscountConfiguration.Cap;
|
|
2543
|
+
}
|
|
2544
|
+
namespace DiscountConfiguration {
|
|
2545
|
+
/**
|
|
2546
|
+
* If provided, the discount stops applying once the spend tracker has accumulated
|
|
2547
|
+
* this much spend in the billing period.
|
|
2548
|
+
*/
|
|
2549
|
+
interface Cap {
|
|
2550
|
+
/**
|
|
2551
|
+
* Accumulated spend ceiling above which the discount stops applying.
|
|
2552
|
+
*/
|
|
2553
|
+
amount: number;
|
|
2554
|
+
/**
|
|
2555
|
+
* Alias of the spend tracker this cap is measured against.
|
|
2556
|
+
*/
|
|
2557
|
+
spend_tracker_alias: string;
|
|
2558
|
+
}
|
|
2559
|
+
}
|
|
2560
|
+
interface ThresholdBalanceSpecifier {
|
|
2561
|
+
/**
|
|
2562
|
+
* If any of the exclude specifier is met, the balance is not considered when
|
|
2563
|
+
* evaluating threshold billing
|
|
2564
|
+
*/
|
|
2565
|
+
exclude: Array<ThresholdBalanceSpecifier.Exclude>;
|
|
2566
|
+
}
|
|
2567
|
+
namespace ThresholdBalanceSpecifier {
|
|
2568
|
+
interface Exclude {
|
|
2569
|
+
/**
|
|
2570
|
+
* If provided, balances with all the custom fields will not be considered when
|
|
2571
|
+
* evaluating threshold billing
|
|
2572
|
+
*/
|
|
2573
|
+
custom_field_filters: Array<Exclude.CustomFieldFilter>;
|
|
2574
|
+
}
|
|
2575
|
+
namespace Exclude {
|
|
2576
|
+
interface CustomFieldFilter {
|
|
2577
|
+
entity: 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit';
|
|
2578
|
+
key: string;
|
|
2579
|
+
value: string;
|
|
2580
|
+
}
|
|
2581
|
+
}
|
|
2274
2582
|
}
|
|
2275
2583
|
}
|
|
2276
2584
|
export interface PrepaidBalanceThresholdConfigurationV2 {
|
|
@@ -2297,6 +2605,11 @@ export interface PrepaidBalanceThresholdConfigurationV2 {
|
|
|
2297
2605
|
*/
|
|
2298
2606
|
custom_credit_type_id?: string;
|
|
2299
2607
|
discount_configuration?: PrepaidBalanceThresholdConfigurationV2.DiscountConfiguration;
|
|
2608
|
+
/**
|
|
2609
|
+
* Determines which balances are excluded from remaining balance calculation for
|
|
2610
|
+
* threshold billing.
|
|
2611
|
+
*/
|
|
2612
|
+
threshold_balance_specifiers?: Array<PrepaidBalanceThresholdConfigurationV2.ThresholdBalanceSpecifier>;
|
|
2300
2613
|
}
|
|
2301
2614
|
export declare namespace PrepaidBalanceThresholdConfigurationV2 {
|
|
2302
2615
|
interface Commit extends Shared.BaseThresholdCommit {
|
|
@@ -2329,6 +2642,42 @@ export declare namespace PrepaidBalanceThresholdConfigurationV2 {
|
|
|
2329
2642
|
* (a 15% discount).
|
|
2330
2643
|
*/
|
|
2331
2644
|
payment_fraction: number;
|
|
2645
|
+
/**
|
|
2646
|
+
* If provided, the discount stops applying once the spend tracker has accumulated
|
|
2647
|
+
* this much spend in the billing period.
|
|
2648
|
+
*/
|
|
2649
|
+
cap?: DiscountConfiguration.Cap;
|
|
2650
|
+
}
|
|
2651
|
+
namespace DiscountConfiguration {
|
|
2652
|
+
/**
|
|
2653
|
+
* If provided, the discount stops applying once the spend tracker has accumulated
|
|
2654
|
+
* this much spend in the billing period.
|
|
2655
|
+
*/
|
|
2656
|
+
interface Cap {
|
|
2657
|
+
/**
|
|
2658
|
+
* Accumulated spend ceiling above which the discount stops applying.
|
|
2659
|
+
*/
|
|
2660
|
+
amount: number;
|
|
2661
|
+
/**
|
|
2662
|
+
* Alias of the spend tracker this cap is measured against.
|
|
2663
|
+
*/
|
|
2664
|
+
spend_tracker_alias: string;
|
|
2665
|
+
}
|
|
2666
|
+
}
|
|
2667
|
+
interface ThresholdBalanceSpecifier {
|
|
2668
|
+
exclude: Array<ThresholdBalanceSpecifier.Exclude>;
|
|
2669
|
+
}
|
|
2670
|
+
namespace ThresholdBalanceSpecifier {
|
|
2671
|
+
interface Exclude {
|
|
2672
|
+
custom_field_filters: Array<Exclude.CustomFieldFilter>;
|
|
2673
|
+
}
|
|
2674
|
+
namespace Exclude {
|
|
2675
|
+
interface CustomFieldFilter {
|
|
2676
|
+
entity: 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit';
|
|
2677
|
+
key: string;
|
|
2678
|
+
value: string;
|
|
2679
|
+
}
|
|
2680
|
+
}
|
|
2332
2681
|
}
|
|
2333
2682
|
}
|
|
2334
2683
|
export interface PropertyFilter {
|
|
@@ -2517,6 +2866,27 @@ export declare namespace SpendThresholdConfiguration {
|
|
|
2517
2866
|
* (a 15% discount).
|
|
2518
2867
|
*/
|
|
2519
2868
|
payment_fraction: number;
|
|
2869
|
+
/**
|
|
2870
|
+
* If provided, the discount stops applying once the spend tracker has accumulated
|
|
2871
|
+
* this much spend in the billing period.
|
|
2872
|
+
*/
|
|
2873
|
+
cap?: DiscountConfiguration.Cap;
|
|
2874
|
+
}
|
|
2875
|
+
namespace DiscountConfiguration {
|
|
2876
|
+
/**
|
|
2877
|
+
* If provided, the discount stops applying once the spend tracker has accumulated
|
|
2878
|
+
* this much spend in the billing period.
|
|
2879
|
+
*/
|
|
2880
|
+
interface Cap {
|
|
2881
|
+
/**
|
|
2882
|
+
* Accumulated spend ceiling above which the discount stops applying.
|
|
2883
|
+
*/
|
|
2884
|
+
amount: number;
|
|
2885
|
+
/**
|
|
2886
|
+
* Alias of the spend tracker this cap is measured against.
|
|
2887
|
+
*/
|
|
2888
|
+
spend_tracker_alias: string;
|
|
2889
|
+
}
|
|
2520
2890
|
}
|
|
2521
2891
|
}
|
|
2522
2892
|
export interface SpendThresholdConfigurationV2 {
|
|
@@ -2543,6 +2913,27 @@ export declare namespace SpendThresholdConfigurationV2 {
|
|
|
2543
2913
|
* (a 15% discount).
|
|
2544
2914
|
*/
|
|
2545
2915
|
payment_fraction: number;
|
|
2916
|
+
/**
|
|
2917
|
+
* If provided, the discount stops applying once the spend tracker has accumulated
|
|
2918
|
+
* this much spend in the billing period.
|
|
2919
|
+
*/
|
|
2920
|
+
cap?: DiscountConfiguration.Cap;
|
|
2921
|
+
}
|
|
2922
|
+
namespace DiscountConfiguration {
|
|
2923
|
+
/**
|
|
2924
|
+
* If provided, the discount stops applying once the spend tracker has accumulated
|
|
2925
|
+
* this much spend in the billing period.
|
|
2926
|
+
*/
|
|
2927
|
+
interface Cap {
|
|
2928
|
+
/**
|
|
2929
|
+
* Accumulated spend ceiling above which the discount stops applying.
|
|
2930
|
+
*/
|
|
2931
|
+
amount: number;
|
|
2932
|
+
/**
|
|
2933
|
+
* Alias of the spend tracker this cap is measured against.
|
|
2934
|
+
*/
|
|
2935
|
+
spend_tracker_alias: string;
|
|
2936
|
+
}
|
|
2546
2937
|
}
|
|
2547
2938
|
}
|
|
2548
2939
|
export interface Subscription {
|
|
@@ -2572,6 +2963,7 @@ export interface Subscription {
|
|
|
2572
2963
|
starting_at: string;
|
|
2573
2964
|
subscription_rate: Subscription.SubscriptionRate;
|
|
2574
2965
|
id?: string;
|
|
2966
|
+
billing_cycle_config?: Subscription.BillingCycleConfig;
|
|
2575
2967
|
/**
|
|
2576
2968
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2577
2969
|
*/
|
|
@@ -2610,6 +3002,19 @@ export declare namespace Subscription {
|
|
|
2610
3002
|
interface Proration {
|
|
2611
3003
|
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
2612
3004
|
is_prorated: boolean;
|
|
3005
|
+
rounding?: Proration.Rounding;
|
|
3006
|
+
}
|
|
3007
|
+
namespace Proration {
|
|
3008
|
+
interface Rounding {
|
|
3009
|
+
/**
|
|
3010
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
3011
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
3012
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
3013
|
+
* dollar).
|
|
3014
|
+
*/
|
|
3015
|
+
decimal_places: number;
|
|
3016
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
3017
|
+
}
|
|
2613
3018
|
}
|
|
2614
3019
|
interface QuantitySchedule {
|
|
2615
3020
|
quantity: number;
|
|
@@ -2626,6 +3031,17 @@ export declare namespace Subscription {
|
|
|
2626
3031
|
name: string;
|
|
2627
3032
|
}
|
|
2628
3033
|
}
|
|
3034
|
+
interface BillingCycleConfig {
|
|
3035
|
+
/**
|
|
3036
|
+
* The date this subscription's billing cycle is anchored to.
|
|
3037
|
+
*/
|
|
3038
|
+
anchor_date: string;
|
|
3039
|
+
/**
|
|
3040
|
+
* Controls whether this subscription consolidates onto usage invoices or gets its
|
|
3041
|
+
* own scheduled invoice.
|
|
3042
|
+
*/
|
|
3043
|
+
invoice_placement: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
|
|
3044
|
+
}
|
|
2629
3045
|
interface SeatConfig {
|
|
2630
3046
|
/**
|
|
2631
3047
|
* The property name, sent on usage events, that identifies the seat ID associated
|