@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
|
@@ -213,7 +213,1326 @@ export interface ContractListResponse {
|
|
|
213
213
|
data: Array<Shared.ContractV2>;
|
|
214
214
|
}
|
|
215
215
|
export interface ContractEditResponse {
|
|
216
|
-
data:
|
|
216
|
+
data: ContractEditResponse.Data;
|
|
217
|
+
}
|
|
218
|
+
export declare namespace ContractEditResponse {
|
|
219
|
+
interface Data {
|
|
220
|
+
id: string;
|
|
221
|
+
edit?: Data.Edit;
|
|
222
|
+
}
|
|
223
|
+
namespace Data {
|
|
224
|
+
interface Edit {
|
|
225
|
+
id: string;
|
|
226
|
+
add_commits?: Array<Edit.AddCommit>;
|
|
227
|
+
add_credits?: Array<Edit.AddCredit>;
|
|
228
|
+
add_discounts?: Array<Shared.Discount>;
|
|
229
|
+
add_overrides?: Array<Edit.AddOverride>;
|
|
230
|
+
add_prepaid_balance_threshold_configuration?: Shared.PrepaidBalanceThresholdConfigurationV2;
|
|
231
|
+
add_pro_services?: Array<Shared.ProService>;
|
|
232
|
+
add_recurring_commits?: Array<Edit.AddRecurringCommit>;
|
|
233
|
+
add_recurring_credits?: Array<Edit.AddRecurringCredit>;
|
|
234
|
+
add_reseller_royalties?: Array<Edit.AddResellerRoyalty>;
|
|
235
|
+
add_scheduled_charges?: Array<Edit.AddScheduledCharge>;
|
|
236
|
+
add_spend_threshold_configuration?: Shared.SpendThresholdConfigurationV2;
|
|
237
|
+
/**
|
|
238
|
+
* List of subscriptions on the contract.
|
|
239
|
+
*/
|
|
240
|
+
add_subscriptions?: Array<Edit.AddSubscription>;
|
|
241
|
+
add_usage_filters?: Array<Edit.AddUsageFilter>;
|
|
242
|
+
archive_commits?: Array<Edit.ArchiveCommit>;
|
|
243
|
+
archive_credits?: Array<Edit.ArchiveCredit>;
|
|
244
|
+
archive_scheduled_charges?: Array<Edit.ArchiveScheduledCharge>;
|
|
245
|
+
remove_overrides?: Array<Edit.RemoveOverride>;
|
|
246
|
+
timestamp?: string;
|
|
247
|
+
/**
|
|
248
|
+
* Prevents the creation of duplicates. If a request to create a record is made
|
|
249
|
+
* with a previously used uniqueness key, a new record will not be created and the
|
|
250
|
+
* request will fail with a 409 error.
|
|
251
|
+
*/
|
|
252
|
+
uniqueness_key?: string;
|
|
253
|
+
update_commits?: Array<Edit.UpdateCommit>;
|
|
254
|
+
update_contract_end_date?: string;
|
|
255
|
+
/**
|
|
256
|
+
* Value to update the contract name to. If not provided, the contract name will
|
|
257
|
+
* remain unchanged.
|
|
258
|
+
*/
|
|
259
|
+
update_contract_name?: string | null;
|
|
260
|
+
update_credits?: Array<Edit.UpdateCredit>;
|
|
261
|
+
update_discounts?: Array<Edit.UpdateDiscount>;
|
|
262
|
+
update_prepaid_balance_threshold_configuration?: Edit.UpdatePrepaidBalanceThresholdConfiguration;
|
|
263
|
+
update_recurring_commits?: Array<Edit.UpdateRecurringCommit>;
|
|
264
|
+
update_recurring_credits?: Array<Edit.UpdateRecurringCredit>;
|
|
265
|
+
update_refund_invoices?: Array<Edit.UpdateRefundInvoice>;
|
|
266
|
+
update_scheduled_charges?: Array<Edit.UpdateScheduledCharge>;
|
|
267
|
+
update_spend_threshold_configuration?: Edit.UpdateSpendThresholdConfiguration;
|
|
268
|
+
/**
|
|
269
|
+
* Optional list of subscriptions to update.
|
|
270
|
+
*/
|
|
271
|
+
update_subscriptions?: Array<Edit.UpdateSubscription>;
|
|
272
|
+
}
|
|
273
|
+
namespace Edit {
|
|
274
|
+
interface AddCommit {
|
|
275
|
+
id: string;
|
|
276
|
+
product: AddCommit.Product;
|
|
277
|
+
type: 'PREPAID' | 'POSTPAID';
|
|
278
|
+
/**
|
|
279
|
+
* The schedule that the customer will gain access to the credits purposed with
|
|
280
|
+
* this commit.
|
|
281
|
+
*/
|
|
282
|
+
access_schedule?: Shared.ScheduleDuration;
|
|
283
|
+
applicable_product_ids?: Array<string>;
|
|
284
|
+
applicable_product_tags?: Array<string>;
|
|
285
|
+
description?: string;
|
|
286
|
+
/**
|
|
287
|
+
* Optional configuration for commit hierarchy access control
|
|
288
|
+
*/
|
|
289
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
290
|
+
/**
|
|
291
|
+
* The schedule that the customer will be invoiced for this commit.
|
|
292
|
+
*/
|
|
293
|
+
invoice_schedule?: AddCommit.InvoiceSchedule;
|
|
294
|
+
name?: string;
|
|
295
|
+
/**
|
|
296
|
+
* This field's availability is dependent on your client's configuration.
|
|
297
|
+
*/
|
|
298
|
+
netsuite_sales_order_id?: string;
|
|
299
|
+
/**
|
|
300
|
+
* If multiple credits or commits are applicable, the one with the lower priority
|
|
301
|
+
* will apply first.
|
|
302
|
+
*/
|
|
303
|
+
priority?: number;
|
|
304
|
+
rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
305
|
+
rollover_fraction?: number;
|
|
306
|
+
/**
|
|
307
|
+
* This field's availability is dependent on your client's configuration.
|
|
308
|
+
*/
|
|
309
|
+
salesforce_opportunity_id?: string;
|
|
310
|
+
/**
|
|
311
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
312
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
313
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
314
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
315
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
316
|
+
* body of `specifiers`.
|
|
317
|
+
*/
|
|
318
|
+
specifiers?: Array<Shared.CommitSpecifierInput>;
|
|
319
|
+
}
|
|
320
|
+
namespace AddCommit {
|
|
321
|
+
interface Product {
|
|
322
|
+
id: string;
|
|
323
|
+
name: string;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* The schedule that the customer will be invoiced for this commit.
|
|
327
|
+
*/
|
|
328
|
+
interface InvoiceSchedule {
|
|
329
|
+
credit_type?: Shared.CreditTypeData;
|
|
330
|
+
/**
|
|
331
|
+
* If true, this schedule will not generate an invoice.
|
|
332
|
+
*/
|
|
333
|
+
do_not_invoice?: boolean;
|
|
334
|
+
schedule_items?: Array<InvoiceSchedule.ScheduleItem>;
|
|
335
|
+
}
|
|
336
|
+
namespace InvoiceSchedule {
|
|
337
|
+
interface ScheduleItem {
|
|
338
|
+
id: string;
|
|
339
|
+
timestamp: string;
|
|
340
|
+
amount?: number;
|
|
341
|
+
invoice_id?: string | null;
|
|
342
|
+
quantity?: number;
|
|
343
|
+
unit_price?: number;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
interface AddCredit {
|
|
348
|
+
id: string;
|
|
349
|
+
product: AddCredit.Product;
|
|
350
|
+
type: 'CREDIT';
|
|
351
|
+
/**
|
|
352
|
+
* The schedule that the customer will gain access to the credits.
|
|
353
|
+
*/
|
|
354
|
+
access_schedule?: Shared.ScheduleDuration;
|
|
355
|
+
applicable_product_ids?: Array<string>;
|
|
356
|
+
applicable_product_tags?: Array<string>;
|
|
357
|
+
description?: string;
|
|
358
|
+
/**
|
|
359
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
360
|
+
*/
|
|
361
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
362
|
+
name?: string;
|
|
363
|
+
/**
|
|
364
|
+
* This field's availability is dependent on your client's configuration.
|
|
365
|
+
*/
|
|
366
|
+
netsuite_sales_order_id?: string;
|
|
367
|
+
/**
|
|
368
|
+
* If multiple credits or commits are applicable, the one with the lower priority
|
|
369
|
+
* will apply first.
|
|
370
|
+
*/
|
|
371
|
+
priority?: number;
|
|
372
|
+
rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
373
|
+
rollover_fraction?: number;
|
|
374
|
+
/**
|
|
375
|
+
* This field's availability is dependent on your client's configuration.
|
|
376
|
+
*/
|
|
377
|
+
salesforce_opportunity_id?: string;
|
|
378
|
+
/**
|
|
379
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
380
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
381
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
382
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
383
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
384
|
+
* body of `specifiers`.
|
|
385
|
+
*/
|
|
386
|
+
specifiers?: Array<Shared.CommitSpecifierInput>;
|
|
387
|
+
}
|
|
388
|
+
namespace AddCredit {
|
|
389
|
+
interface Product {
|
|
390
|
+
id: string;
|
|
391
|
+
name: string;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
interface AddOverride {
|
|
395
|
+
id: string;
|
|
396
|
+
created_at: string;
|
|
397
|
+
starting_at: string;
|
|
398
|
+
applicable_product_tags?: Array<string>;
|
|
399
|
+
ending_before?: string;
|
|
400
|
+
entitled?: boolean;
|
|
401
|
+
is_commit_specific?: boolean;
|
|
402
|
+
multiplier?: number;
|
|
403
|
+
override_specifiers?: Array<AddOverride.OverrideSpecifier>;
|
|
404
|
+
override_tiers?: Array<Shared.OverrideTier>;
|
|
405
|
+
overwrite_rate?: AddOverride.OverwriteRate;
|
|
406
|
+
priority?: number;
|
|
407
|
+
product?: AddOverride.Product;
|
|
408
|
+
target?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
409
|
+
type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED';
|
|
410
|
+
}
|
|
411
|
+
namespace AddOverride {
|
|
412
|
+
interface OverrideSpecifier {
|
|
413
|
+
any_commit_or_credit_ids?: Array<string>;
|
|
414
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
415
|
+
commit_ids?: Array<string>;
|
|
416
|
+
presentation_group_values?: {
|
|
417
|
+
[key: string]: string | null;
|
|
418
|
+
};
|
|
419
|
+
pricing_group_values?: {
|
|
420
|
+
[key: string]: string;
|
|
421
|
+
};
|
|
422
|
+
product_id?: string;
|
|
423
|
+
product_tags?: Array<string>;
|
|
424
|
+
recurring_commit_ids?: Array<string>;
|
|
425
|
+
}
|
|
426
|
+
interface OverwriteRate {
|
|
427
|
+
rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM';
|
|
428
|
+
credit_type?: Shared.CreditTypeData;
|
|
429
|
+
/**
|
|
430
|
+
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
431
|
+
* processors.
|
|
432
|
+
*/
|
|
433
|
+
custom_rate?: {
|
|
434
|
+
[key: string]: unknown;
|
|
435
|
+
};
|
|
436
|
+
/**
|
|
437
|
+
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
438
|
+
* set to true.
|
|
439
|
+
*/
|
|
440
|
+
is_prorated?: boolean;
|
|
441
|
+
/**
|
|
442
|
+
* Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
|
|
443
|
+
* this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
|
|
444
|
+
*/
|
|
445
|
+
price?: number;
|
|
446
|
+
/**
|
|
447
|
+
* Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
|
|
448
|
+
*/
|
|
449
|
+
quantity?: number;
|
|
450
|
+
/**
|
|
451
|
+
* Only set for TIERED rate_type.
|
|
452
|
+
*/
|
|
453
|
+
tiers?: Array<Shared.Tier>;
|
|
454
|
+
}
|
|
455
|
+
interface Product {
|
|
456
|
+
id: string;
|
|
457
|
+
name: string;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
interface AddRecurringCommit {
|
|
461
|
+
id: string;
|
|
462
|
+
/**
|
|
463
|
+
* The amount of commit to grant.
|
|
464
|
+
*/
|
|
465
|
+
access_amount: AddRecurringCommit.AccessAmount;
|
|
466
|
+
/**
|
|
467
|
+
* The amount of time the created commits will be valid for
|
|
468
|
+
*/
|
|
469
|
+
commit_duration: AddRecurringCommit.CommitDuration;
|
|
470
|
+
/**
|
|
471
|
+
* Will be passed down to the individual commits
|
|
472
|
+
*/
|
|
473
|
+
priority: number;
|
|
474
|
+
product: AddRecurringCommit.Product;
|
|
475
|
+
/**
|
|
476
|
+
* Whether the created commits will use the commit rate or list rate
|
|
477
|
+
*/
|
|
478
|
+
rate_type: 'COMMIT_RATE' | 'LIST_RATE';
|
|
479
|
+
/**
|
|
480
|
+
* Determines the start time for the first commit
|
|
481
|
+
*/
|
|
482
|
+
starting_at: string;
|
|
483
|
+
/**
|
|
484
|
+
* Will be passed down to the individual commits
|
|
485
|
+
*/
|
|
486
|
+
applicable_product_ids?: Array<string>;
|
|
487
|
+
/**
|
|
488
|
+
* Will be passed down to the individual commits
|
|
489
|
+
*/
|
|
490
|
+
applicable_product_tags?: Array<string>;
|
|
491
|
+
contract?: AddRecurringCommit.Contract;
|
|
492
|
+
/**
|
|
493
|
+
* Will be passed down to the individual commits
|
|
494
|
+
*/
|
|
495
|
+
description?: string;
|
|
496
|
+
/**
|
|
497
|
+
* Determines when the contract will stop creating recurring commits. Optional
|
|
498
|
+
*/
|
|
499
|
+
ending_before?: string;
|
|
500
|
+
/**
|
|
501
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
502
|
+
*/
|
|
503
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
504
|
+
/**
|
|
505
|
+
* The amount the customer should be billed for the commit. Not required.
|
|
506
|
+
*/
|
|
507
|
+
invoice_amount?: AddRecurringCommit.InvoiceAmount;
|
|
508
|
+
/**
|
|
509
|
+
* Displayed on invoices. Will be passed through to the individual commits
|
|
510
|
+
*/
|
|
511
|
+
name?: string;
|
|
512
|
+
/**
|
|
513
|
+
* Will be passed down to the individual commits
|
|
514
|
+
*/
|
|
515
|
+
netsuite_sales_order_id?: string;
|
|
516
|
+
/**
|
|
517
|
+
* Determines whether the first and last commit will be prorated. If not provided,
|
|
518
|
+
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
519
|
+
*/
|
|
520
|
+
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
521
|
+
/**
|
|
522
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
523
|
+
*/
|
|
524
|
+
proration_rounding?: AddRecurringCommit.ProrationRounding | null;
|
|
525
|
+
/**
|
|
526
|
+
* The frequency at which the recurring commits will be created. If not provided: -
|
|
527
|
+
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
528
|
+
* period defined in the duration will correspond to this frequency. - Commits will
|
|
529
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
530
|
+
* invoice dates.
|
|
531
|
+
*/
|
|
532
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
533
|
+
/**
|
|
534
|
+
* Will be passed down to the individual commits. This controls how much of an
|
|
535
|
+
* individual unexpired commit will roll over upon contract transition. Must be
|
|
536
|
+
* between 0 and 1.
|
|
537
|
+
*/
|
|
538
|
+
rollover_fraction?: number;
|
|
539
|
+
/**
|
|
540
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
541
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
542
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
543
|
+
*/
|
|
544
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
545
|
+
/**
|
|
546
|
+
* Attach a subscription to the recurring commit/credit.
|
|
547
|
+
*/
|
|
548
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
549
|
+
}
|
|
550
|
+
namespace AddRecurringCommit {
|
|
551
|
+
/**
|
|
552
|
+
* The amount of commit to grant.
|
|
553
|
+
*/
|
|
554
|
+
interface AccessAmount {
|
|
555
|
+
credit_type_id: string;
|
|
556
|
+
unit_price: number;
|
|
557
|
+
quantity?: number;
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* The amount of time the created commits will be valid for
|
|
561
|
+
*/
|
|
562
|
+
interface CommitDuration {
|
|
563
|
+
value: number;
|
|
564
|
+
unit?: 'PERIODS';
|
|
565
|
+
}
|
|
566
|
+
interface Product {
|
|
567
|
+
id: string;
|
|
568
|
+
name: string;
|
|
569
|
+
}
|
|
570
|
+
interface Contract {
|
|
571
|
+
id: string;
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* The amount the customer should be billed for the commit. Not required.
|
|
575
|
+
*/
|
|
576
|
+
interface InvoiceAmount {
|
|
577
|
+
credit_type_id: string;
|
|
578
|
+
quantity: number;
|
|
579
|
+
unit_price: number;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
583
|
+
*/
|
|
584
|
+
interface ProrationRounding {
|
|
585
|
+
access?: ProrationRounding.Access;
|
|
586
|
+
invoice?: ProrationRounding.Invoice;
|
|
587
|
+
}
|
|
588
|
+
namespace ProrationRounding {
|
|
589
|
+
interface Access {
|
|
590
|
+
/**
|
|
591
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
592
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
593
|
+
* nearest 100 in the stored unit).
|
|
594
|
+
*/
|
|
595
|
+
decimal_places: number;
|
|
596
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
597
|
+
}
|
|
598
|
+
interface Invoice {
|
|
599
|
+
/**
|
|
600
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
601
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
602
|
+
* nearest 100 in the stored unit).
|
|
603
|
+
*/
|
|
604
|
+
decimal_places: number;
|
|
605
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
interface AddRecurringCredit {
|
|
610
|
+
id: string;
|
|
611
|
+
/**
|
|
612
|
+
* The amount of commit to grant.
|
|
613
|
+
*/
|
|
614
|
+
access_amount: AddRecurringCredit.AccessAmount;
|
|
615
|
+
/**
|
|
616
|
+
* The amount of time the created commits will be valid for
|
|
617
|
+
*/
|
|
618
|
+
commit_duration: AddRecurringCredit.CommitDuration;
|
|
619
|
+
/**
|
|
620
|
+
* Will be passed down to the individual commits
|
|
621
|
+
*/
|
|
622
|
+
priority: number;
|
|
623
|
+
product: AddRecurringCredit.Product;
|
|
624
|
+
/**
|
|
625
|
+
* Whether the created commits will use the commit rate or list rate
|
|
626
|
+
*/
|
|
627
|
+
rate_type: 'COMMIT_RATE' | 'LIST_RATE';
|
|
628
|
+
/**
|
|
629
|
+
* Determines the start time for the first commit
|
|
630
|
+
*/
|
|
631
|
+
starting_at: string;
|
|
632
|
+
/**
|
|
633
|
+
* Will be passed down to the individual commits
|
|
634
|
+
*/
|
|
635
|
+
applicable_product_ids?: Array<string>;
|
|
636
|
+
/**
|
|
637
|
+
* Will be passed down to the individual commits
|
|
638
|
+
*/
|
|
639
|
+
applicable_product_tags?: Array<string>;
|
|
640
|
+
contract?: AddRecurringCredit.Contract;
|
|
641
|
+
/**
|
|
642
|
+
* Will be passed down to the individual commits
|
|
643
|
+
*/
|
|
644
|
+
description?: string;
|
|
645
|
+
/**
|
|
646
|
+
* Determines when the contract will stop creating recurring commits. Optional
|
|
647
|
+
*/
|
|
648
|
+
ending_before?: string;
|
|
649
|
+
/**
|
|
650
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
651
|
+
*/
|
|
652
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
653
|
+
/**
|
|
654
|
+
* Displayed on invoices. Will be passed through to the individual commits
|
|
655
|
+
*/
|
|
656
|
+
name?: string;
|
|
657
|
+
/**
|
|
658
|
+
* Will be passed down to the individual commits
|
|
659
|
+
*/
|
|
660
|
+
netsuite_sales_order_id?: string;
|
|
661
|
+
/**
|
|
662
|
+
* Determines whether the first and last commit will be prorated. If not provided,
|
|
663
|
+
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
664
|
+
*/
|
|
665
|
+
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
666
|
+
/**
|
|
667
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
668
|
+
*/
|
|
669
|
+
proration_rounding?: AddRecurringCredit.ProrationRounding | null;
|
|
670
|
+
/**
|
|
671
|
+
* The frequency at which the recurring commits will be created. If not provided: -
|
|
672
|
+
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
673
|
+
* period defined in the duration will correspond to this frequency. - Commits will
|
|
674
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
675
|
+
* invoice dates.
|
|
676
|
+
*/
|
|
677
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
678
|
+
/**
|
|
679
|
+
* Will be passed down to the individual commits. This controls how much of an
|
|
680
|
+
* individual unexpired commit will roll over upon contract transition. Must be
|
|
681
|
+
* between 0 and 1.
|
|
682
|
+
*/
|
|
683
|
+
rollover_fraction?: number;
|
|
684
|
+
/**
|
|
685
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
686
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
687
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
688
|
+
*/
|
|
689
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
690
|
+
/**
|
|
691
|
+
* Attach a subscription to the recurring commit/credit.
|
|
692
|
+
*/
|
|
693
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
694
|
+
}
|
|
695
|
+
namespace AddRecurringCredit {
|
|
696
|
+
/**
|
|
697
|
+
* The amount of commit to grant.
|
|
698
|
+
*/
|
|
699
|
+
interface AccessAmount {
|
|
700
|
+
credit_type_id: string;
|
|
701
|
+
unit_price: number;
|
|
702
|
+
quantity?: number;
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* The amount of time the created commits will be valid for
|
|
706
|
+
*/
|
|
707
|
+
interface CommitDuration {
|
|
708
|
+
value: number;
|
|
709
|
+
unit?: 'PERIODS';
|
|
710
|
+
}
|
|
711
|
+
interface Product {
|
|
712
|
+
id: string;
|
|
713
|
+
name: string;
|
|
714
|
+
}
|
|
715
|
+
interface Contract {
|
|
716
|
+
id: string;
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
720
|
+
*/
|
|
721
|
+
interface ProrationRounding {
|
|
722
|
+
access?: ProrationRounding.Access;
|
|
723
|
+
}
|
|
724
|
+
namespace ProrationRounding {
|
|
725
|
+
interface Access {
|
|
726
|
+
/**
|
|
727
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
728
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
729
|
+
* nearest 100 in the stored unit).
|
|
730
|
+
*/
|
|
731
|
+
decimal_places: number;
|
|
732
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
interface AddResellerRoyalty {
|
|
737
|
+
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
738
|
+
applicable_product_ids?: Array<string>;
|
|
739
|
+
applicable_product_tags?: Array<string>;
|
|
740
|
+
aws_account_number?: string;
|
|
741
|
+
aws_offer_id?: string;
|
|
742
|
+
aws_payer_reference_id?: string;
|
|
743
|
+
ending_before?: string | null;
|
|
744
|
+
fraction?: number;
|
|
745
|
+
gcp_account_id?: string;
|
|
746
|
+
gcp_offer_id?: string;
|
|
747
|
+
netsuite_reseller_id?: string;
|
|
748
|
+
reseller_contract_value?: number;
|
|
749
|
+
starting_at?: string;
|
|
750
|
+
}
|
|
751
|
+
interface AddScheduledCharge {
|
|
752
|
+
id: string;
|
|
753
|
+
product: AddScheduledCharge.Product;
|
|
754
|
+
schedule: Shared.SchedulePointInTime;
|
|
755
|
+
/**
|
|
756
|
+
* displayed on invoices
|
|
757
|
+
*/
|
|
758
|
+
name?: string;
|
|
759
|
+
/**
|
|
760
|
+
* This field's availability is dependent on your client's configuration.
|
|
761
|
+
*/
|
|
762
|
+
netsuite_sales_order_id?: string;
|
|
763
|
+
}
|
|
764
|
+
namespace AddScheduledCharge {
|
|
765
|
+
interface Product {
|
|
766
|
+
id: string;
|
|
767
|
+
name: string;
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
interface AddSubscription {
|
|
771
|
+
/**
|
|
772
|
+
* Previous, current, and next billing periods for the subscription.
|
|
773
|
+
*/
|
|
774
|
+
billing_periods: AddSubscription.BillingPeriods;
|
|
775
|
+
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
776
|
+
proration: AddSubscription.Proration;
|
|
777
|
+
/**
|
|
778
|
+
* Determines how the subscription's quantity is controlled. Defaults to
|
|
779
|
+
* QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
|
|
780
|
+
* directly on the subscription. `initial_quantity` must be provided with this
|
|
781
|
+
* option. Compatible with recurring commits/credits that use POOLED allocation.
|
|
782
|
+
* **SEAT_BASED**: Use when you want to pass specific seat identifiers (e.g. add
|
|
783
|
+
* user_123) to increment and decrement a subscription quantity, rather than
|
|
784
|
+
* directly providing the quantity. You must use a **SEAT_BASED** subscription to
|
|
785
|
+
* use a linked recurring credit with an allocation per seat. `seat_config` must be
|
|
786
|
+
* provided with this option.
|
|
787
|
+
*/
|
|
788
|
+
quantity_management_mode: 'SEAT_BASED' | 'QUANTITY_ONLY';
|
|
789
|
+
/**
|
|
790
|
+
* List of quantity schedule items for the subscription. Only includes the current
|
|
791
|
+
* quantity and future quantity changes.
|
|
792
|
+
*/
|
|
793
|
+
quantity_schedule: Array<AddSubscription.QuantitySchedule>;
|
|
794
|
+
starting_at: string;
|
|
795
|
+
subscription_rate: AddSubscription.SubscriptionRate;
|
|
796
|
+
id?: string;
|
|
797
|
+
billing_cycle_config?: AddSubscription.BillingCycleConfig;
|
|
798
|
+
/**
|
|
799
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
800
|
+
*/
|
|
801
|
+
custom_fields?: {
|
|
802
|
+
[key: string]: string;
|
|
803
|
+
};
|
|
804
|
+
description?: string;
|
|
805
|
+
ending_before?: string;
|
|
806
|
+
fiat_credit_type_id?: string;
|
|
807
|
+
name?: string;
|
|
808
|
+
seat_config?: AddSubscription.SeatConfig;
|
|
809
|
+
}
|
|
810
|
+
namespace AddSubscription {
|
|
811
|
+
/**
|
|
812
|
+
* Previous, current, and next billing periods for the subscription.
|
|
813
|
+
*/
|
|
814
|
+
interface BillingPeriods {
|
|
815
|
+
current?: BillingPeriods.Current;
|
|
816
|
+
next?: BillingPeriods.Next;
|
|
817
|
+
previous?: BillingPeriods.Previous;
|
|
818
|
+
}
|
|
819
|
+
namespace BillingPeriods {
|
|
820
|
+
interface Current {
|
|
821
|
+
ending_before: string;
|
|
822
|
+
starting_at: string;
|
|
823
|
+
}
|
|
824
|
+
interface Next {
|
|
825
|
+
ending_before: string;
|
|
826
|
+
starting_at: string;
|
|
827
|
+
}
|
|
828
|
+
interface Previous {
|
|
829
|
+
ending_before: string;
|
|
830
|
+
starting_at: string;
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
interface Proration {
|
|
834
|
+
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
835
|
+
is_prorated: boolean;
|
|
836
|
+
rounding?: Proration.Rounding;
|
|
837
|
+
}
|
|
838
|
+
namespace Proration {
|
|
839
|
+
interface Rounding {
|
|
840
|
+
/**
|
|
841
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
842
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
843
|
+
* nearest 100 in the stored unit).
|
|
844
|
+
*/
|
|
845
|
+
decimal_places: number;
|
|
846
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
interface QuantitySchedule {
|
|
850
|
+
quantity: number;
|
|
851
|
+
starting_at: string;
|
|
852
|
+
ending_before?: string;
|
|
853
|
+
}
|
|
854
|
+
interface SubscriptionRate {
|
|
855
|
+
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
856
|
+
product: SubscriptionRate.Product;
|
|
857
|
+
}
|
|
858
|
+
namespace SubscriptionRate {
|
|
859
|
+
interface Product {
|
|
860
|
+
id: string;
|
|
861
|
+
name: string;
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
interface BillingCycleConfig {
|
|
865
|
+
/**
|
|
866
|
+
* The date this subscription's billing cycle is anchored to.
|
|
867
|
+
*/
|
|
868
|
+
anchor_date: string;
|
|
869
|
+
/**
|
|
870
|
+
* Controls whether this subscription consolidates onto usage invoices or gets its
|
|
871
|
+
* own scheduled invoice.
|
|
872
|
+
*/
|
|
873
|
+
invoice_placement: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
|
|
874
|
+
}
|
|
875
|
+
interface SeatConfig {
|
|
876
|
+
/**
|
|
877
|
+
* The property name, sent on usage events, that identifies the seat ID associated
|
|
878
|
+
* with the usage event. For example, the property name might be seat_id or
|
|
879
|
+
* user_id. The property must be set as a group key on billable metrics and a
|
|
880
|
+
* presentation/pricing group key on contract products. This allows linked
|
|
881
|
+
* recurring credits with an allocation per seat to be consumed by only one seat's
|
|
882
|
+
* usage.
|
|
883
|
+
*/
|
|
884
|
+
seat_group_key: string;
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
interface AddUsageFilter {
|
|
888
|
+
group_key: string;
|
|
889
|
+
group_values: Array<string>;
|
|
890
|
+
/**
|
|
891
|
+
* This will match contract starting_at value if usage filter is active from the
|
|
892
|
+
* beginning of the contract.
|
|
893
|
+
*/
|
|
894
|
+
starting_at: string;
|
|
895
|
+
/**
|
|
896
|
+
* This will match contract ending_before value if usage filter is active until the
|
|
897
|
+
* end of the contract. It will be undefined if the contract is open-ended.
|
|
898
|
+
*/
|
|
899
|
+
ending_before?: string;
|
|
900
|
+
}
|
|
901
|
+
interface ArchiveCommit {
|
|
902
|
+
id: string;
|
|
903
|
+
}
|
|
904
|
+
interface ArchiveCredit {
|
|
905
|
+
id: string;
|
|
906
|
+
}
|
|
907
|
+
interface ArchiveScheduledCharge {
|
|
908
|
+
id: string;
|
|
909
|
+
}
|
|
910
|
+
interface RemoveOverride {
|
|
911
|
+
id: string;
|
|
912
|
+
}
|
|
913
|
+
interface UpdateCommit {
|
|
914
|
+
id: string;
|
|
915
|
+
access_schedule?: UpdateCommit.AccessSchedule;
|
|
916
|
+
/**
|
|
917
|
+
* Which products the commit applies to. If applicable_product_ids,
|
|
918
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
919
|
+
* all products.
|
|
920
|
+
*/
|
|
921
|
+
applicable_product_ids?: Array<string> | null;
|
|
922
|
+
/**
|
|
923
|
+
* Which tags the commit applies to. If applicable_product_ids,
|
|
924
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
925
|
+
* all products.
|
|
926
|
+
*/
|
|
927
|
+
applicable_product_tags?: Array<string> | null;
|
|
928
|
+
description?: string;
|
|
929
|
+
/**
|
|
930
|
+
* Optional configuration for commit hierarchy access control
|
|
931
|
+
*/
|
|
932
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
933
|
+
invoice_schedule?: UpdateCommit.InvoiceSchedule;
|
|
934
|
+
name?: string;
|
|
935
|
+
netsuite_sales_order_id?: string | null;
|
|
936
|
+
/**
|
|
937
|
+
* If multiple commits are applicable, the one with the lower priority will apply
|
|
938
|
+
* first.
|
|
939
|
+
*/
|
|
940
|
+
priority?: number | null;
|
|
941
|
+
product_id?: string;
|
|
942
|
+
/**
|
|
943
|
+
* If set, the commit's rate type was updated to the specified value.
|
|
944
|
+
*/
|
|
945
|
+
rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
946
|
+
rollover_fraction?: number | null;
|
|
947
|
+
/**
|
|
948
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
949
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
950
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
951
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
952
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
953
|
+
* body of `specifiers`.
|
|
954
|
+
*/
|
|
955
|
+
specifiers?: Array<Shared.CommitSpecifierInput> | null;
|
|
956
|
+
}
|
|
957
|
+
namespace UpdateCommit {
|
|
958
|
+
interface AccessSchedule {
|
|
959
|
+
add_schedule_items?: Array<AccessSchedule.AddScheduleItem>;
|
|
960
|
+
remove_schedule_items?: Array<AccessSchedule.RemoveScheduleItem>;
|
|
961
|
+
update_schedule_items?: Array<AccessSchedule.UpdateScheduleItem>;
|
|
962
|
+
}
|
|
963
|
+
namespace AccessSchedule {
|
|
964
|
+
interface AddScheduleItem {
|
|
965
|
+
amount: number;
|
|
966
|
+
/**
|
|
967
|
+
* RFC 3339 timestamp (exclusive)
|
|
968
|
+
*/
|
|
969
|
+
ending_before: string;
|
|
970
|
+
/**
|
|
971
|
+
* RFC 3339 timestamp (inclusive)
|
|
972
|
+
*/
|
|
973
|
+
starting_at: string;
|
|
974
|
+
}
|
|
975
|
+
interface RemoveScheduleItem {
|
|
976
|
+
id: string;
|
|
977
|
+
}
|
|
978
|
+
interface UpdateScheduleItem {
|
|
979
|
+
id: string;
|
|
980
|
+
amount?: number;
|
|
981
|
+
/**
|
|
982
|
+
* RFC 3339 timestamp (exclusive)
|
|
983
|
+
*/
|
|
984
|
+
ending_before?: string;
|
|
985
|
+
/**
|
|
986
|
+
* RFC 3339 timestamp (inclusive)
|
|
987
|
+
*/
|
|
988
|
+
starting_at?: string;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
interface InvoiceSchedule {
|
|
992
|
+
add_schedule_items?: Array<InvoiceSchedule.AddScheduleItem>;
|
|
993
|
+
remove_schedule_items?: Array<InvoiceSchedule.RemoveScheduleItem>;
|
|
994
|
+
update_schedule_items?: Array<InvoiceSchedule.UpdateScheduleItem>;
|
|
995
|
+
}
|
|
996
|
+
namespace InvoiceSchedule {
|
|
997
|
+
interface AddScheduleItem {
|
|
998
|
+
timestamp: string;
|
|
999
|
+
amount?: number;
|
|
1000
|
+
quantity?: number;
|
|
1001
|
+
unit_price?: number;
|
|
1002
|
+
}
|
|
1003
|
+
interface RemoveScheduleItem {
|
|
1004
|
+
id: string;
|
|
1005
|
+
}
|
|
1006
|
+
interface UpdateScheduleItem {
|
|
1007
|
+
id: string;
|
|
1008
|
+
amount?: number;
|
|
1009
|
+
quantity?: number;
|
|
1010
|
+
timestamp?: string;
|
|
1011
|
+
unit_price?: number;
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
interface UpdateCredit {
|
|
1016
|
+
id: string;
|
|
1017
|
+
access_schedule?: UpdateCredit.AccessSchedule;
|
|
1018
|
+
/**
|
|
1019
|
+
* Which products the credit applies to. If applicable_product_ids,
|
|
1020
|
+
* applicable_product_tags or specifiers are not provided, the credit applies to
|
|
1021
|
+
* all products.
|
|
1022
|
+
*/
|
|
1023
|
+
applicable_product_ids?: Array<string> | null;
|
|
1024
|
+
/**
|
|
1025
|
+
* Which tags the credit applies to. If applicable_product_ids,
|
|
1026
|
+
* applicable_product_tags or specifiers are not provided, the credit applies to
|
|
1027
|
+
* all products.
|
|
1028
|
+
*/
|
|
1029
|
+
applicable_product_tags?: Array<string> | null;
|
|
1030
|
+
description?: string;
|
|
1031
|
+
/**
|
|
1032
|
+
* Optional configuration for credit hierarchy access control
|
|
1033
|
+
*/
|
|
1034
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
1035
|
+
name?: string;
|
|
1036
|
+
netsuite_sales_order_id?: string | null;
|
|
1037
|
+
/**
|
|
1038
|
+
* If multiple credits are applicable, the one with the lower priority will apply
|
|
1039
|
+
* first.
|
|
1040
|
+
*/
|
|
1041
|
+
priority?: number | null;
|
|
1042
|
+
product_id?: string;
|
|
1043
|
+
/**
|
|
1044
|
+
* If set, the credit's rate type was updated to the specified value.
|
|
1045
|
+
*/
|
|
1046
|
+
rate_type?: 'LIST_RATE' | 'COMMIT_RATE';
|
|
1047
|
+
rollover_fraction?: number | null;
|
|
1048
|
+
/**
|
|
1049
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1050
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1051
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
1052
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
1053
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
1054
|
+
* body of `specifiers`.
|
|
1055
|
+
*/
|
|
1056
|
+
specifiers?: Array<Shared.CommitSpecifierInput> | null;
|
|
1057
|
+
}
|
|
1058
|
+
namespace UpdateCredit {
|
|
1059
|
+
interface AccessSchedule {
|
|
1060
|
+
add_schedule_items?: Array<AccessSchedule.AddScheduleItem>;
|
|
1061
|
+
remove_schedule_items?: Array<AccessSchedule.RemoveScheduleItem>;
|
|
1062
|
+
update_schedule_items?: Array<AccessSchedule.UpdateScheduleItem>;
|
|
1063
|
+
}
|
|
1064
|
+
namespace AccessSchedule {
|
|
1065
|
+
interface AddScheduleItem {
|
|
1066
|
+
amount: number;
|
|
1067
|
+
/**
|
|
1068
|
+
* RFC 3339 timestamp (exclusive)
|
|
1069
|
+
*/
|
|
1070
|
+
ending_before: string;
|
|
1071
|
+
/**
|
|
1072
|
+
* RFC 3339 timestamp (inclusive)
|
|
1073
|
+
*/
|
|
1074
|
+
starting_at: string;
|
|
1075
|
+
}
|
|
1076
|
+
interface RemoveScheduleItem {
|
|
1077
|
+
id: string;
|
|
1078
|
+
}
|
|
1079
|
+
interface UpdateScheduleItem {
|
|
1080
|
+
id: string;
|
|
1081
|
+
amount?: number;
|
|
1082
|
+
/**
|
|
1083
|
+
* RFC 3339 timestamp (exclusive)
|
|
1084
|
+
*/
|
|
1085
|
+
ending_before?: string;
|
|
1086
|
+
/**
|
|
1087
|
+
* RFC 3339 timestamp (inclusive)
|
|
1088
|
+
*/
|
|
1089
|
+
starting_at?: string;
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
interface UpdateDiscount {
|
|
1094
|
+
id: string;
|
|
1095
|
+
/**
|
|
1096
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1097
|
+
*/
|
|
1098
|
+
custom_fields?: {
|
|
1099
|
+
[key: string]: string;
|
|
1100
|
+
};
|
|
1101
|
+
name?: string;
|
|
1102
|
+
netsuite_sales_order_id?: string;
|
|
1103
|
+
/**
|
|
1104
|
+
* Must provide either schedule_items or recurring_schedule.
|
|
1105
|
+
*/
|
|
1106
|
+
schedule?: UpdateDiscount.Schedule;
|
|
1107
|
+
}
|
|
1108
|
+
namespace UpdateDiscount {
|
|
1109
|
+
/**
|
|
1110
|
+
* Must provide either schedule_items or recurring_schedule.
|
|
1111
|
+
*/
|
|
1112
|
+
interface Schedule {
|
|
1113
|
+
/**
|
|
1114
|
+
* Defaults to USD (cents) if not passed.
|
|
1115
|
+
*/
|
|
1116
|
+
credit_type_id?: string;
|
|
1117
|
+
/**
|
|
1118
|
+
* This field is only applicable to commit invoice schedules. If true, this
|
|
1119
|
+
* schedule will not generate an invoice.
|
|
1120
|
+
*/
|
|
1121
|
+
do_not_invoice?: boolean;
|
|
1122
|
+
/**
|
|
1123
|
+
* Enter the unit price and quantity for the charge or instead only send the
|
|
1124
|
+
* amount. If amount is sent, the unit price is assumed to be the amount and
|
|
1125
|
+
* quantity is inferred to be 1.
|
|
1126
|
+
*/
|
|
1127
|
+
recurring_schedule?: Schedule.RecurringSchedule;
|
|
1128
|
+
/**
|
|
1129
|
+
* Either provide amount or provide both unit_price and quantity.
|
|
1130
|
+
*/
|
|
1131
|
+
schedule_items?: Array<Schedule.ScheduleItem>;
|
|
1132
|
+
}
|
|
1133
|
+
namespace Schedule {
|
|
1134
|
+
/**
|
|
1135
|
+
* Enter the unit price and quantity for the charge or instead only send the
|
|
1136
|
+
* amount. If amount is sent, the unit price is assumed to be the amount and
|
|
1137
|
+
* quantity is inferred to be 1.
|
|
1138
|
+
*/
|
|
1139
|
+
interface RecurringSchedule {
|
|
1140
|
+
amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH';
|
|
1141
|
+
/**
|
|
1142
|
+
* RFC 3339 timestamp (exclusive).
|
|
1143
|
+
*/
|
|
1144
|
+
ending_before: string;
|
|
1145
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY';
|
|
1146
|
+
/**
|
|
1147
|
+
* RFC 3339 timestamp (inclusive).
|
|
1148
|
+
*/
|
|
1149
|
+
starting_at: string;
|
|
1150
|
+
/**
|
|
1151
|
+
* Amount for the charge. Can be provided instead of unit_price and quantity. If
|
|
1152
|
+
* amount is sent, the unit_price is assumed to be the amount and quantity is
|
|
1153
|
+
* inferred to be 1.
|
|
1154
|
+
*/
|
|
1155
|
+
amount?: number;
|
|
1156
|
+
/**
|
|
1157
|
+
* Quantity for the charge. Will be multiplied by unit_price to determine the
|
|
1158
|
+
* amount and must be specified with unit_price. If specified amount cannot be
|
|
1159
|
+
* provided.
|
|
1160
|
+
*/
|
|
1161
|
+
quantity?: number;
|
|
1162
|
+
/**
|
|
1163
|
+
* Unit price for the charge. Will be multiplied by quantity to determine the
|
|
1164
|
+
* amount and must be specified with quantity. If specified amount cannot be
|
|
1165
|
+
* provided.
|
|
1166
|
+
*/
|
|
1167
|
+
unit_price?: number;
|
|
1168
|
+
}
|
|
1169
|
+
interface ScheduleItem {
|
|
1170
|
+
/**
|
|
1171
|
+
* timestamp of the scheduled event
|
|
1172
|
+
*/
|
|
1173
|
+
timestamp: string;
|
|
1174
|
+
/**
|
|
1175
|
+
* Amount for the charge. Can be provided instead of unit_price and quantity. If
|
|
1176
|
+
* amount is sent, the unit_price is assumed to be the amount and quantity is
|
|
1177
|
+
* inferred to be 1.
|
|
1178
|
+
*/
|
|
1179
|
+
amount?: number;
|
|
1180
|
+
/**
|
|
1181
|
+
* Quantity for the charge. Will be multiplied by unit_price to determine the
|
|
1182
|
+
* amount and must be specified with unit_price. If specified amount cannot be
|
|
1183
|
+
* provided.
|
|
1184
|
+
*/
|
|
1185
|
+
quantity?: number;
|
|
1186
|
+
/**
|
|
1187
|
+
* Unit price for the charge. Will be multiplied by quantity to determine the
|
|
1188
|
+
* amount and must be specified with quantity. If specified amount cannot be
|
|
1189
|
+
* provided.
|
|
1190
|
+
*/
|
|
1191
|
+
unit_price?: number;
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
interface UpdatePrepaidBalanceThresholdConfiguration {
|
|
1196
|
+
commit?: UpdatePrepaidBalanceThresholdConfiguration.Commit;
|
|
1197
|
+
/**
|
|
1198
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
1199
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
1200
|
+
*/
|
|
1201
|
+
custom_credit_type_id?: string | null;
|
|
1202
|
+
discount_configuration?: UpdatePrepaidBalanceThresholdConfiguration.DiscountConfiguration | null;
|
|
1203
|
+
/**
|
|
1204
|
+
* When set to false, the contract will not be evaluated against the
|
|
1205
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
1206
|
+
* regardless of prior state.
|
|
1207
|
+
*/
|
|
1208
|
+
is_enabled?: boolean;
|
|
1209
|
+
payment_gate_config?: Shared.PaymentGateConfigV2;
|
|
1210
|
+
/**
|
|
1211
|
+
* Specify the amount the balance should be recharged to.
|
|
1212
|
+
*/
|
|
1213
|
+
recharge_to_amount?: number;
|
|
1214
|
+
/**
|
|
1215
|
+
* Specify the threshold amount for the contract. Each time the contract's balance
|
|
1216
|
+
* lowers to this amount, a threshold charge will be initiated.
|
|
1217
|
+
*/
|
|
1218
|
+
threshold_amount?: number;
|
|
1219
|
+
/**
|
|
1220
|
+
* Determines which balances are excluded from remaining balance calculation for
|
|
1221
|
+
* threshold billing.
|
|
1222
|
+
*/
|
|
1223
|
+
threshold_balance_specifiers?: Array<UpdatePrepaidBalanceThresholdConfiguration.ThresholdBalanceSpecifier> | null;
|
|
1224
|
+
}
|
|
1225
|
+
namespace UpdatePrepaidBalanceThresholdConfiguration {
|
|
1226
|
+
interface Commit extends Shared.UpdateBaseThresholdCommit {
|
|
1227
|
+
/**
|
|
1228
|
+
* Which products the threshold commit applies to. If both applicable_product_ids
|
|
1229
|
+
* and applicable_product_tags are not provided, the commit applies to all
|
|
1230
|
+
* products.
|
|
1231
|
+
*/
|
|
1232
|
+
applicable_product_ids?: Array<string> | null;
|
|
1233
|
+
/**
|
|
1234
|
+
* Which tags the threshold commit applies to. If both applicable_product_ids and
|
|
1235
|
+
* applicable_product_tags are not provided, the commit applies to all products.
|
|
1236
|
+
*/
|
|
1237
|
+
applicable_product_tags?: Array<string> | null;
|
|
1238
|
+
/**
|
|
1239
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1240
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1241
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
1242
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
1243
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
1244
|
+
* body of `specifiers`.
|
|
1245
|
+
*/
|
|
1246
|
+
specifiers?: Array<Shared.CommitSpecifierInput> | null;
|
|
1247
|
+
}
|
|
1248
|
+
interface DiscountConfiguration {
|
|
1249
|
+
/**
|
|
1250
|
+
* Update the discount cap. Set to null to remove an existing cap.
|
|
1251
|
+
*/
|
|
1252
|
+
cap?: DiscountConfiguration.Cap | null;
|
|
1253
|
+
/**
|
|
1254
|
+
* The fraction of the original amount that the customer pays after applying the
|
|
1255
|
+
* discount. Set to null to remove the discount fraction. For example, 0.85 means
|
|
1256
|
+
* the customer pays 85% of the original amount (a 15% discount).
|
|
1257
|
+
*/
|
|
1258
|
+
payment_fraction?: number | null;
|
|
1259
|
+
}
|
|
1260
|
+
namespace DiscountConfiguration {
|
|
1261
|
+
/**
|
|
1262
|
+
* Update the discount cap. Set to null to remove an existing cap.
|
|
1263
|
+
*/
|
|
1264
|
+
interface Cap {
|
|
1265
|
+
/**
|
|
1266
|
+
* Accumulated spend ceiling above which the discount stops applying.
|
|
1267
|
+
*/
|
|
1268
|
+
amount: number;
|
|
1269
|
+
/**
|
|
1270
|
+
* Alias of the spend tracker this cap is measured against.
|
|
1271
|
+
*/
|
|
1272
|
+
spend_tracker_alias: string;
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
interface ThresholdBalanceSpecifier {
|
|
1276
|
+
exclude: Array<ThresholdBalanceSpecifier.Exclude>;
|
|
1277
|
+
}
|
|
1278
|
+
namespace ThresholdBalanceSpecifier {
|
|
1279
|
+
interface Exclude {
|
|
1280
|
+
custom_field_filters: Array<Exclude.CustomFieldFilter>;
|
|
1281
|
+
}
|
|
1282
|
+
namespace Exclude {
|
|
1283
|
+
interface CustomFieldFilter {
|
|
1284
|
+
entity: 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit';
|
|
1285
|
+
key: string;
|
|
1286
|
+
value: string;
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
interface UpdateRecurringCommit {
|
|
1292
|
+
id: string;
|
|
1293
|
+
access_amount?: UpdateRecurringCommit.AccessAmount;
|
|
1294
|
+
ending_before?: string;
|
|
1295
|
+
invoice_amount?: UpdateRecurringCommit.InvoiceAmount;
|
|
1296
|
+
/**
|
|
1297
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
1298
|
+
*/
|
|
1299
|
+
proration_rounding?: UpdateRecurringCommit.ProrationRounding | null;
|
|
1300
|
+
rate_type?: 'LIST_RATE' | 'COMMIT_RATE';
|
|
1301
|
+
}
|
|
1302
|
+
namespace UpdateRecurringCommit {
|
|
1303
|
+
interface AccessAmount {
|
|
1304
|
+
quantity?: number;
|
|
1305
|
+
unit_price?: number;
|
|
1306
|
+
}
|
|
1307
|
+
interface InvoiceAmount {
|
|
1308
|
+
quantity?: number;
|
|
1309
|
+
unit_price?: number;
|
|
1310
|
+
}
|
|
1311
|
+
/**
|
|
1312
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
1313
|
+
*/
|
|
1314
|
+
interface ProrationRounding {
|
|
1315
|
+
access?: ProrationRounding.Access;
|
|
1316
|
+
invoice?: ProrationRounding.Invoice;
|
|
1317
|
+
}
|
|
1318
|
+
namespace ProrationRounding {
|
|
1319
|
+
interface Access {
|
|
1320
|
+
/**
|
|
1321
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
1322
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1323
|
+
* nearest 100 in the stored unit).
|
|
1324
|
+
*/
|
|
1325
|
+
decimal_places: number;
|
|
1326
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
1327
|
+
}
|
|
1328
|
+
interface Invoice {
|
|
1329
|
+
/**
|
|
1330
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
1331
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1332
|
+
* nearest 100 in the stored unit).
|
|
1333
|
+
*/
|
|
1334
|
+
decimal_places: number;
|
|
1335
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
interface UpdateRecurringCredit {
|
|
1340
|
+
id: string;
|
|
1341
|
+
access_amount?: UpdateRecurringCredit.AccessAmount;
|
|
1342
|
+
ending_before?: string;
|
|
1343
|
+
/**
|
|
1344
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
1345
|
+
*/
|
|
1346
|
+
proration_rounding?: UpdateRecurringCredit.ProrationRounding | null;
|
|
1347
|
+
rate_type?: 'LIST_RATE' | 'COMMIT_RATE';
|
|
1348
|
+
}
|
|
1349
|
+
namespace UpdateRecurringCredit {
|
|
1350
|
+
interface AccessAmount {
|
|
1351
|
+
quantity?: number;
|
|
1352
|
+
unit_price?: number;
|
|
1353
|
+
}
|
|
1354
|
+
/**
|
|
1355
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
1356
|
+
*/
|
|
1357
|
+
interface ProrationRounding {
|
|
1358
|
+
access?: ProrationRounding.Access;
|
|
1359
|
+
}
|
|
1360
|
+
namespace ProrationRounding {
|
|
1361
|
+
interface Access {
|
|
1362
|
+
/**
|
|
1363
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
1364
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1365
|
+
* nearest 100 in the stored unit).
|
|
1366
|
+
*/
|
|
1367
|
+
decimal_places: number;
|
|
1368
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
interface UpdateRefundInvoice {
|
|
1373
|
+
date: string;
|
|
1374
|
+
invoice_id: string;
|
|
1375
|
+
}
|
|
1376
|
+
interface UpdateScheduledCharge {
|
|
1377
|
+
id: string;
|
|
1378
|
+
invoice_schedule?: UpdateScheduledCharge.InvoiceSchedule;
|
|
1379
|
+
name?: string;
|
|
1380
|
+
netsuite_sales_order_id?: string | null;
|
|
1381
|
+
}
|
|
1382
|
+
namespace UpdateScheduledCharge {
|
|
1383
|
+
interface InvoiceSchedule {
|
|
1384
|
+
add_schedule_items?: Array<InvoiceSchedule.AddScheduleItem>;
|
|
1385
|
+
remove_schedule_items?: Array<InvoiceSchedule.RemoveScheduleItem>;
|
|
1386
|
+
update_schedule_items?: Array<InvoiceSchedule.UpdateScheduleItem>;
|
|
1387
|
+
}
|
|
1388
|
+
namespace InvoiceSchedule {
|
|
1389
|
+
interface AddScheduleItem {
|
|
1390
|
+
timestamp: string;
|
|
1391
|
+
amount?: number;
|
|
1392
|
+
quantity?: number;
|
|
1393
|
+
unit_price?: number;
|
|
1394
|
+
}
|
|
1395
|
+
interface RemoveScheduleItem {
|
|
1396
|
+
id: string;
|
|
1397
|
+
}
|
|
1398
|
+
interface UpdateScheduleItem {
|
|
1399
|
+
id: string;
|
|
1400
|
+
amount?: number;
|
|
1401
|
+
quantity?: number;
|
|
1402
|
+
timestamp?: string;
|
|
1403
|
+
unit_price?: number;
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
interface UpdateSpendThresholdConfiguration {
|
|
1408
|
+
commit?: Shared.UpdateBaseThresholdCommit;
|
|
1409
|
+
discount_configuration?: UpdateSpendThresholdConfiguration.DiscountConfiguration | null;
|
|
1410
|
+
/**
|
|
1411
|
+
* When set to false, the contract will not be evaluated against the
|
|
1412
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
1413
|
+
* regardless of prior state.
|
|
1414
|
+
*/
|
|
1415
|
+
is_enabled?: boolean;
|
|
1416
|
+
payment_gate_config?: Shared.PaymentGateConfigV2;
|
|
1417
|
+
/**
|
|
1418
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
1419
|
+
* hits this amount, a threshold charge will be initiated.
|
|
1420
|
+
*/
|
|
1421
|
+
threshold_amount?: number;
|
|
1422
|
+
}
|
|
1423
|
+
namespace UpdateSpendThresholdConfiguration {
|
|
1424
|
+
interface DiscountConfiguration {
|
|
1425
|
+
/**
|
|
1426
|
+
* Update the discount cap. Set to null to remove an existing cap.
|
|
1427
|
+
*/
|
|
1428
|
+
cap?: DiscountConfiguration.Cap | null;
|
|
1429
|
+
/**
|
|
1430
|
+
* The fraction of the original amount that the customer pays after applying the
|
|
1431
|
+
* discount. Set to null to remove the discount fraction. For example, 0.85 means
|
|
1432
|
+
* the customer pays 85% of the original amount (a 15% discount).
|
|
1433
|
+
*/
|
|
1434
|
+
payment_fraction?: number | null;
|
|
1435
|
+
}
|
|
1436
|
+
namespace DiscountConfiguration {
|
|
1437
|
+
/**
|
|
1438
|
+
* Update the discount cap. Set to null to remove an existing cap.
|
|
1439
|
+
*/
|
|
1440
|
+
interface Cap {
|
|
1441
|
+
/**
|
|
1442
|
+
* Accumulated spend ceiling above which the discount stops applying.
|
|
1443
|
+
*/
|
|
1444
|
+
amount: number;
|
|
1445
|
+
/**
|
|
1446
|
+
* Alias of the spend tracker this cap is measured against.
|
|
1447
|
+
*/
|
|
1448
|
+
spend_tracker_alias: string;
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
interface UpdateSubscription {
|
|
1453
|
+
id: string;
|
|
1454
|
+
ending_before?: string;
|
|
1455
|
+
quantity_updates?: Array<UpdateSubscription.QuantityUpdate>;
|
|
1456
|
+
/**
|
|
1457
|
+
* Manage subscription seats for subscriptions in SEAT_BASED mode.
|
|
1458
|
+
*/
|
|
1459
|
+
seat_updates?: UpdateSubscription.SeatUpdates;
|
|
1460
|
+
}
|
|
1461
|
+
namespace UpdateSubscription {
|
|
1462
|
+
interface QuantityUpdate {
|
|
1463
|
+
starting_at: string;
|
|
1464
|
+
quantity?: number;
|
|
1465
|
+
quantity_delta?: number;
|
|
1466
|
+
}
|
|
1467
|
+
/**
|
|
1468
|
+
* Manage subscription seats for subscriptions in SEAT_BASED mode.
|
|
1469
|
+
*/
|
|
1470
|
+
interface SeatUpdates {
|
|
1471
|
+
/**
|
|
1472
|
+
* Adds seat IDs to the subscription. If there are unassigned seats, the new seat
|
|
1473
|
+
* IDs will fill these unassigned seats and not increase the total subscription
|
|
1474
|
+
* quantity. Otherwise, if there are more new seat IDs than unassigned seats, the
|
|
1475
|
+
* total subscription quantity will increase.
|
|
1476
|
+
*/
|
|
1477
|
+
add_seat_ids?: Array<SeatUpdates.AddSeatID>;
|
|
1478
|
+
/**
|
|
1479
|
+
* Adds unassigned seats to the subscription. This will increase the total
|
|
1480
|
+
* subscription quantity.
|
|
1481
|
+
*/
|
|
1482
|
+
add_unassigned_seats?: Array<SeatUpdates.AddUnassignedSeat>;
|
|
1483
|
+
/**
|
|
1484
|
+
* Removes seat IDs from the subscription, if possible. If a seat ID is removed,
|
|
1485
|
+
* the total subscription quantity will decrease. Otherwise, if the seat ID is not
|
|
1486
|
+
* found on the subscription, this is a no-op.
|
|
1487
|
+
*/
|
|
1488
|
+
remove_seat_ids?: Array<SeatUpdates.RemoveSeatID>;
|
|
1489
|
+
/**
|
|
1490
|
+
* Removes unassigned seats from the subscription. This will decrease the total
|
|
1491
|
+
* subscription quantity if there are are unassigned seats.
|
|
1492
|
+
*/
|
|
1493
|
+
remove_unassigned_seats?: Array<SeatUpdates.RemoveUnassignedSeat>;
|
|
1494
|
+
}
|
|
1495
|
+
namespace SeatUpdates {
|
|
1496
|
+
interface AddSeatID {
|
|
1497
|
+
seat_ids: Array<string>;
|
|
1498
|
+
/**
|
|
1499
|
+
* Assigned seats will be added/removed starting at this date.
|
|
1500
|
+
*/
|
|
1501
|
+
starting_at: string;
|
|
1502
|
+
}
|
|
1503
|
+
interface AddUnassignedSeat {
|
|
1504
|
+
/**
|
|
1505
|
+
* The number of unassigned seats on the subscription will increase/decrease by
|
|
1506
|
+
* this delta. Must be greater than 0.
|
|
1507
|
+
*/
|
|
1508
|
+
quantity: number;
|
|
1509
|
+
/**
|
|
1510
|
+
* Unassigned seats will be updated starting at this date.
|
|
1511
|
+
*/
|
|
1512
|
+
starting_at: string;
|
|
1513
|
+
}
|
|
1514
|
+
interface RemoveSeatID {
|
|
1515
|
+
seat_ids: Array<string>;
|
|
1516
|
+
/**
|
|
1517
|
+
* Assigned seats will be added/removed starting at this date.
|
|
1518
|
+
*/
|
|
1519
|
+
starting_at: string;
|
|
1520
|
+
}
|
|
1521
|
+
interface RemoveUnassignedSeat {
|
|
1522
|
+
/**
|
|
1523
|
+
* The number of unassigned seats on the subscription will increase/decrease by
|
|
1524
|
+
* this delta. Must be greater than 0.
|
|
1525
|
+
*/
|
|
1526
|
+
quantity: number;
|
|
1527
|
+
/**
|
|
1528
|
+
* Unassigned seats will be updated starting at this date.
|
|
1529
|
+
*/
|
|
1530
|
+
starting_at: string;
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
217
1536
|
}
|
|
218
1537
|
export interface ContractEditCommitResponse {
|
|
219
1538
|
data: Shared.ID;
|
|
@@ -414,6 +1733,7 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
414
1733
|
}
|
|
415
1734
|
namespace AddOverride {
|
|
416
1735
|
interface OverrideSpecifier {
|
|
1736
|
+
any_commit_or_credit_ids?: Array<string>;
|
|
417
1737
|
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
418
1738
|
commit_ids?: Array<string>;
|
|
419
1739
|
presentation_group_values?: {
|
|
@@ -521,6 +1841,10 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
521
1841
|
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
522
1842
|
*/
|
|
523
1843
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1844
|
+
/**
|
|
1845
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
1846
|
+
*/
|
|
1847
|
+
proration_rounding?: AddRecurringCommit.ProrationRounding | null;
|
|
524
1848
|
/**
|
|
525
1849
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
526
1850
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -528,7 +1852,7 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
528
1852
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
529
1853
|
* invoice dates.
|
|
530
1854
|
*/
|
|
531
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1855
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
532
1856
|
/**
|
|
533
1857
|
* Will be passed down to the individual commits. This controls how much of an
|
|
534
1858
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
@@ -577,6 +1901,33 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
577
1901
|
quantity: number;
|
|
578
1902
|
unit_price: number;
|
|
579
1903
|
}
|
|
1904
|
+
/**
|
|
1905
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
1906
|
+
*/
|
|
1907
|
+
interface ProrationRounding {
|
|
1908
|
+
access?: ProrationRounding.Access;
|
|
1909
|
+
invoice?: ProrationRounding.Invoice;
|
|
1910
|
+
}
|
|
1911
|
+
namespace ProrationRounding {
|
|
1912
|
+
interface Access {
|
|
1913
|
+
/**
|
|
1914
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
1915
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1916
|
+
* nearest 100 in the stored unit).
|
|
1917
|
+
*/
|
|
1918
|
+
decimal_places: number;
|
|
1919
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
1920
|
+
}
|
|
1921
|
+
interface Invoice {
|
|
1922
|
+
/**
|
|
1923
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
1924
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1925
|
+
* nearest 100 in the stored unit).
|
|
1926
|
+
*/
|
|
1927
|
+
decimal_places: number;
|
|
1928
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
580
1931
|
}
|
|
581
1932
|
interface AddRecurringCredit {
|
|
582
1933
|
id: string;
|
|
@@ -635,6 +1986,10 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
635
1986
|
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
636
1987
|
*/
|
|
637
1988
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1989
|
+
/**
|
|
1990
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
1991
|
+
*/
|
|
1992
|
+
proration_rounding?: AddRecurringCredit.ProrationRounding | null;
|
|
638
1993
|
/**
|
|
639
1994
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
640
1995
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -642,7 +1997,7 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
642
1997
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
643
1998
|
* invoice dates.
|
|
644
1999
|
*/
|
|
645
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2000
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
646
2001
|
/**
|
|
647
2002
|
* Will be passed down to the individual commits. This controls how much of an
|
|
648
2003
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
@@ -683,6 +2038,23 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
683
2038
|
interface Contract {
|
|
684
2039
|
id: string;
|
|
685
2040
|
}
|
|
2041
|
+
/**
|
|
2042
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
2043
|
+
*/
|
|
2044
|
+
interface ProrationRounding {
|
|
2045
|
+
access?: ProrationRounding.Access;
|
|
2046
|
+
}
|
|
2047
|
+
namespace ProrationRounding {
|
|
2048
|
+
interface Access {
|
|
2049
|
+
/**
|
|
2050
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
2051
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2052
|
+
* nearest 100 in the stored unit).
|
|
2053
|
+
*/
|
|
2054
|
+
decimal_places: number;
|
|
2055
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
2056
|
+
}
|
|
2057
|
+
}
|
|
686
2058
|
}
|
|
687
2059
|
interface AddResellerRoyalty {
|
|
688
2060
|
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
@@ -745,6 +2117,7 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
745
2117
|
starting_at: string;
|
|
746
2118
|
subscription_rate: AddSubscription.SubscriptionRate;
|
|
747
2119
|
id?: string;
|
|
2120
|
+
billing_cycle_config?: AddSubscription.BillingCycleConfig;
|
|
748
2121
|
/**
|
|
749
2122
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
750
2123
|
*/
|
|
@@ -783,6 +2156,18 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
783
2156
|
interface Proration {
|
|
784
2157
|
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
785
2158
|
is_prorated: boolean;
|
|
2159
|
+
rounding?: Proration.Rounding;
|
|
2160
|
+
}
|
|
2161
|
+
namespace Proration {
|
|
2162
|
+
interface Rounding {
|
|
2163
|
+
/**
|
|
2164
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
2165
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2166
|
+
* nearest 100 in the stored unit).
|
|
2167
|
+
*/
|
|
2168
|
+
decimal_places: number;
|
|
2169
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
2170
|
+
}
|
|
786
2171
|
}
|
|
787
2172
|
interface QuantitySchedule {
|
|
788
2173
|
quantity: number;
|
|
@@ -799,6 +2184,17 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
799
2184
|
name: string;
|
|
800
2185
|
}
|
|
801
2186
|
}
|
|
2187
|
+
interface BillingCycleConfig {
|
|
2188
|
+
/**
|
|
2189
|
+
* The date this subscription's billing cycle is anchored to.
|
|
2190
|
+
*/
|
|
2191
|
+
anchor_date: string;
|
|
2192
|
+
/**
|
|
2193
|
+
* Controls whether this subscription consolidates onto usage invoices or gets its
|
|
2194
|
+
* own scheduled invoice.
|
|
2195
|
+
*/
|
|
2196
|
+
invoice_placement: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
|
|
2197
|
+
}
|
|
802
2198
|
interface SeatConfig {
|
|
803
2199
|
/**
|
|
804
2200
|
* The property name, sent on usage events, that identifies the seat ID associated
|
|
@@ -1143,6 +2539,11 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1143
2539
|
* lowers to this amount, a threshold charge will be initiated.
|
|
1144
2540
|
*/
|
|
1145
2541
|
threshold_amount?: number;
|
|
2542
|
+
/**
|
|
2543
|
+
* Determines which balances are excluded from remaining balance calculation for
|
|
2544
|
+
* threshold billing.
|
|
2545
|
+
*/
|
|
2546
|
+
threshold_balance_specifiers?: Array<UpdatePrepaidBalanceThresholdConfiguration.ThresholdBalanceSpecifier> | null;
|
|
1146
2547
|
}
|
|
1147
2548
|
namespace UpdatePrepaidBalanceThresholdConfiguration {
|
|
1148
2549
|
interface Commit extends Shared.UpdateBaseThresholdCommit {
|
|
@@ -1168,6 +2569,10 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1168
2569
|
specifiers?: Array<Shared.CommitSpecifierInput> | null;
|
|
1169
2570
|
}
|
|
1170
2571
|
interface DiscountConfiguration {
|
|
2572
|
+
/**
|
|
2573
|
+
* Update the discount cap. Set to null to remove an existing cap.
|
|
2574
|
+
*/
|
|
2575
|
+
cap?: DiscountConfiguration.Cap | null;
|
|
1171
2576
|
/**
|
|
1172
2577
|
* The fraction of the original amount that the customer pays after applying the
|
|
1173
2578
|
* discount. Set to null to remove the discount fraction. For example, 0.85 means
|
|
@@ -1175,12 +2580,46 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1175
2580
|
*/
|
|
1176
2581
|
payment_fraction?: number | null;
|
|
1177
2582
|
}
|
|
2583
|
+
namespace DiscountConfiguration {
|
|
2584
|
+
/**
|
|
2585
|
+
* Update the discount cap. Set to null to remove an existing cap.
|
|
2586
|
+
*/
|
|
2587
|
+
interface Cap {
|
|
2588
|
+
/**
|
|
2589
|
+
* Accumulated spend ceiling above which the discount stops applying.
|
|
2590
|
+
*/
|
|
2591
|
+
amount: number;
|
|
2592
|
+
/**
|
|
2593
|
+
* Alias of the spend tracker this cap is measured against.
|
|
2594
|
+
*/
|
|
2595
|
+
spend_tracker_alias: string;
|
|
2596
|
+
}
|
|
2597
|
+
}
|
|
2598
|
+
interface ThresholdBalanceSpecifier {
|
|
2599
|
+
exclude: Array<ThresholdBalanceSpecifier.Exclude>;
|
|
2600
|
+
}
|
|
2601
|
+
namespace ThresholdBalanceSpecifier {
|
|
2602
|
+
interface Exclude {
|
|
2603
|
+
custom_field_filters: Array<Exclude.CustomFieldFilter>;
|
|
2604
|
+
}
|
|
2605
|
+
namespace Exclude {
|
|
2606
|
+
interface CustomFieldFilter {
|
|
2607
|
+
entity: 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit';
|
|
2608
|
+
key: string;
|
|
2609
|
+
value: string;
|
|
2610
|
+
}
|
|
2611
|
+
}
|
|
2612
|
+
}
|
|
1178
2613
|
}
|
|
1179
2614
|
interface UpdateRecurringCommit {
|
|
1180
2615
|
id: string;
|
|
1181
2616
|
access_amount?: UpdateRecurringCommit.AccessAmount;
|
|
1182
2617
|
ending_before?: string;
|
|
1183
2618
|
invoice_amount?: UpdateRecurringCommit.InvoiceAmount;
|
|
2619
|
+
/**
|
|
2620
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
2621
|
+
*/
|
|
2622
|
+
proration_rounding?: UpdateRecurringCommit.ProrationRounding | null;
|
|
1184
2623
|
rate_type?: 'LIST_RATE' | 'COMMIT_RATE';
|
|
1185
2624
|
}
|
|
1186
2625
|
namespace UpdateRecurringCommit {
|
|
@@ -1192,11 +2631,42 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1192
2631
|
quantity?: number;
|
|
1193
2632
|
unit_price?: number;
|
|
1194
2633
|
}
|
|
2634
|
+
/**
|
|
2635
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
2636
|
+
*/
|
|
2637
|
+
interface ProrationRounding {
|
|
2638
|
+
access?: ProrationRounding.Access;
|
|
2639
|
+
invoice?: ProrationRounding.Invoice;
|
|
2640
|
+
}
|
|
2641
|
+
namespace ProrationRounding {
|
|
2642
|
+
interface Access {
|
|
2643
|
+
/**
|
|
2644
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
2645
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2646
|
+
* nearest 100 in the stored unit).
|
|
2647
|
+
*/
|
|
2648
|
+
decimal_places: number;
|
|
2649
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
2650
|
+
}
|
|
2651
|
+
interface Invoice {
|
|
2652
|
+
/**
|
|
2653
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
2654
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2655
|
+
* nearest 100 in the stored unit).
|
|
2656
|
+
*/
|
|
2657
|
+
decimal_places: number;
|
|
2658
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
2659
|
+
}
|
|
2660
|
+
}
|
|
1195
2661
|
}
|
|
1196
2662
|
interface UpdateRecurringCredit {
|
|
1197
2663
|
id: string;
|
|
1198
2664
|
access_amount?: UpdateRecurringCredit.AccessAmount;
|
|
1199
2665
|
ending_before?: string;
|
|
2666
|
+
/**
|
|
2667
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
2668
|
+
*/
|
|
2669
|
+
proration_rounding?: UpdateRecurringCredit.ProrationRounding | null;
|
|
1200
2670
|
rate_type?: 'LIST_RATE' | 'COMMIT_RATE';
|
|
1201
2671
|
}
|
|
1202
2672
|
namespace UpdateRecurringCredit {
|
|
@@ -1204,6 +2674,23 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1204
2674
|
quantity?: number;
|
|
1205
2675
|
unit_price?: number;
|
|
1206
2676
|
}
|
|
2677
|
+
/**
|
|
2678
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
2679
|
+
*/
|
|
2680
|
+
interface ProrationRounding {
|
|
2681
|
+
access?: ProrationRounding.Access;
|
|
2682
|
+
}
|
|
2683
|
+
namespace ProrationRounding {
|
|
2684
|
+
interface Access {
|
|
2685
|
+
/**
|
|
2686
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
2687
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2688
|
+
* nearest 100 in the stored unit).
|
|
2689
|
+
*/
|
|
2690
|
+
decimal_places: number;
|
|
2691
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
2692
|
+
}
|
|
2693
|
+
}
|
|
1207
2694
|
}
|
|
1208
2695
|
interface UpdateRefundInvoice {
|
|
1209
2696
|
date: string;
|
|
@@ -1258,6 +2745,10 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1258
2745
|
}
|
|
1259
2746
|
namespace UpdateSpendThresholdConfiguration {
|
|
1260
2747
|
interface DiscountConfiguration {
|
|
2748
|
+
/**
|
|
2749
|
+
* Update the discount cap. Set to null to remove an existing cap.
|
|
2750
|
+
*/
|
|
2751
|
+
cap?: DiscountConfiguration.Cap | null;
|
|
1261
2752
|
/**
|
|
1262
2753
|
* The fraction of the original amount that the customer pays after applying the
|
|
1263
2754
|
* discount. Set to null to remove the discount fraction. For example, 0.85 means
|
|
@@ -1265,6 +2756,21 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1265
2756
|
*/
|
|
1266
2757
|
payment_fraction?: number | null;
|
|
1267
2758
|
}
|
|
2759
|
+
namespace DiscountConfiguration {
|
|
2760
|
+
/**
|
|
2761
|
+
* Update the discount cap. Set to null to remove an existing cap.
|
|
2762
|
+
*/
|
|
2763
|
+
interface Cap {
|
|
2764
|
+
/**
|
|
2765
|
+
* Accumulated spend ceiling above which the discount stops applying.
|
|
2766
|
+
*/
|
|
2767
|
+
amount: number;
|
|
2768
|
+
/**
|
|
2769
|
+
* Alias of the spend tracker this cap is measured against.
|
|
2770
|
+
*/
|
|
2771
|
+
spend_tracker_alias: string;
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
1268
2774
|
}
|
|
1269
2775
|
interface UpdateSubscription {
|
|
1270
2776
|
id: string;
|
|
@@ -1431,6 +2937,11 @@ export interface ContractEditParams {
|
|
|
1431
2937
|
add_revenue_system_configuration_update?: ContractEditParams.AddRevenueSystemConfigurationUpdate;
|
|
1432
2938
|
add_scheduled_charges?: Array<ContractEditParams.AddScheduledCharge>;
|
|
1433
2939
|
add_spend_threshold_configuration?: Shared.SpendThresholdConfigurationV2;
|
|
2940
|
+
/**
|
|
2941
|
+
* Spend trackers to add to this contract. Aliases must be unique within a
|
|
2942
|
+
* contract.
|
|
2943
|
+
*/
|
|
2944
|
+
add_spend_trackers?: Array<ContractEditParams.AddSpendTracker>;
|
|
1434
2945
|
/**
|
|
1435
2946
|
* Optional list of
|
|
1436
2947
|
* [subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/)
|
|
@@ -1456,6 +2967,10 @@ export interface ContractEditParams {
|
|
|
1456
2967
|
* IDs of scheduled charges to archive
|
|
1457
2968
|
*/
|
|
1458
2969
|
archive_scheduled_charges?: Array<ContractEditParams.ArchiveScheduledCharge>;
|
|
2970
|
+
/**
|
|
2971
|
+
* Aliases of spend trackers to archive.
|
|
2972
|
+
*/
|
|
2973
|
+
archive_spend_trackers?: Array<string>;
|
|
1459
2974
|
/**
|
|
1460
2975
|
* IDs of overrides to remove
|
|
1461
2976
|
*/
|
|
@@ -1608,6 +3123,10 @@ export declare namespace ContractEditParams {
|
|
|
1608
3123
|
* body of `specifiers`.
|
|
1609
3124
|
*/
|
|
1610
3125
|
specifiers?: Array<Shared.CommitSpecifierInput>;
|
|
3126
|
+
/**
|
|
3127
|
+
* Optional attributes for spend tracker integration. Immutable after creation.
|
|
3128
|
+
*/
|
|
3129
|
+
spend_tracker_attributes?: AddCommit.SpendTrackerAttributes;
|
|
1611
3130
|
/**
|
|
1612
3131
|
* A temporary ID for the commit that can be used to reference the commit for
|
|
1613
3132
|
* commit specific overrides.
|
|
@@ -1795,6 +3314,16 @@ export declare namespace ContractEditParams {
|
|
|
1795
3314
|
on_session_payment?: boolean;
|
|
1796
3315
|
}
|
|
1797
3316
|
}
|
|
3317
|
+
/**
|
|
3318
|
+
* Optional attributes for spend tracker integration. Immutable after creation.
|
|
3319
|
+
*/
|
|
3320
|
+
interface SpendTrackerAttributes {
|
|
3321
|
+
/**
|
|
3322
|
+
* If true, this commit will be included in spend trackers with discounted set to
|
|
3323
|
+
* DISCOUNTED_ONLY
|
|
3324
|
+
*/
|
|
3325
|
+
counts_as_discounted: boolean;
|
|
3326
|
+
}
|
|
1798
3327
|
}
|
|
1799
3328
|
interface AddCredit {
|
|
1800
3329
|
/**
|
|
@@ -2045,6 +3574,14 @@ export declare namespace ContractEditParams {
|
|
|
2045
3574
|
}
|
|
2046
3575
|
namespace AddOverride {
|
|
2047
3576
|
interface OverrideSpecifier {
|
|
3577
|
+
/**
|
|
3578
|
+
* Can only be used for commit specific overrides. Must be used in conjunction with
|
|
3579
|
+
* one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
3580
|
+
* `presentation_group_values`. Must be used instead of both `commit_ids` and
|
|
3581
|
+
* `recurring_commit_ids` If provided, the override will apply to any specified
|
|
3582
|
+
* commit, credit, recurring commit or recurring credit IDs.
|
|
3583
|
+
*/
|
|
3584
|
+
any_commit_or_credit_ids?: Array<string>;
|
|
2048
3585
|
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2049
3586
|
/**
|
|
2050
3587
|
* If provided, the override will only apply to the specified commits. Can only be
|
|
@@ -2206,6 +3743,10 @@ export declare namespace ContractEditParams {
|
|
|
2206
3743
|
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
2207
3744
|
*/
|
|
2208
3745
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
3746
|
+
/**
|
|
3747
|
+
* Optional rounding configuration for prorated recurring commit amounts.
|
|
3748
|
+
*/
|
|
3749
|
+
proration_rounding?: AddRecurringCommit.ProrationRounding;
|
|
2209
3750
|
/**
|
|
2210
3751
|
* Whether the created commits will use the commit rate or list rate
|
|
2211
3752
|
*/
|
|
@@ -2217,7 +3758,7 @@ export declare namespace ContractEditParams {
|
|
|
2217
3758
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
2218
3759
|
* invoice dates.
|
|
2219
3760
|
*/
|
|
2220
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
3761
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
2221
3762
|
/**
|
|
2222
3763
|
* Will be passed down to the individual commits. This controls how much of an
|
|
2223
3764
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
@@ -2273,6 +3814,33 @@ export declare namespace ContractEditParams {
|
|
|
2273
3814
|
quantity: number;
|
|
2274
3815
|
unit_price: number;
|
|
2275
3816
|
}
|
|
3817
|
+
/**
|
|
3818
|
+
* Optional rounding configuration for prorated recurring commit amounts.
|
|
3819
|
+
*/
|
|
3820
|
+
interface ProrationRounding {
|
|
3821
|
+
access?: ProrationRounding.Access;
|
|
3822
|
+
invoice?: ProrationRounding.Invoice;
|
|
3823
|
+
}
|
|
3824
|
+
namespace ProrationRounding {
|
|
3825
|
+
interface Access {
|
|
3826
|
+
/**
|
|
3827
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
3828
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
3829
|
+
* nearest 100 in the stored unit).
|
|
3830
|
+
*/
|
|
3831
|
+
decimal_places: number;
|
|
3832
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
3833
|
+
}
|
|
3834
|
+
interface Invoice {
|
|
3835
|
+
/**
|
|
3836
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
3837
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
3838
|
+
* nearest 100 in the stored unit).
|
|
3839
|
+
*/
|
|
3840
|
+
decimal_places: number;
|
|
3841
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
3842
|
+
}
|
|
3843
|
+
}
|
|
2276
3844
|
/**
|
|
2277
3845
|
* Attach a subscription to the recurring commit/credit.
|
|
2278
3846
|
*/
|
|
@@ -2350,6 +3918,10 @@ export declare namespace ContractEditParams {
|
|
|
2350
3918
|
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
2351
3919
|
*/
|
|
2352
3920
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
3921
|
+
/**
|
|
3922
|
+
* Optional rounding configuration for prorated recurring credit amounts.
|
|
3923
|
+
*/
|
|
3924
|
+
proration_rounding?: AddRecurringCredit.ProrationRounding;
|
|
2353
3925
|
/**
|
|
2354
3926
|
* Whether the created commits will use the commit rate or list rate
|
|
2355
3927
|
*/
|
|
@@ -2361,7 +3933,7 @@ export declare namespace ContractEditParams {
|
|
|
2361
3933
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
2362
3934
|
* invoice dates.
|
|
2363
3935
|
*/
|
|
2364
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
3936
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
2365
3937
|
/**
|
|
2366
3938
|
* Will be passed down to the individual commits. This controls how much of an
|
|
2367
3939
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
@@ -2409,6 +3981,23 @@ export declare namespace ContractEditParams {
|
|
|
2409
3981
|
value: number;
|
|
2410
3982
|
unit?: 'PERIODS';
|
|
2411
3983
|
}
|
|
3984
|
+
/**
|
|
3985
|
+
* Optional rounding configuration for prorated recurring credit amounts.
|
|
3986
|
+
*/
|
|
3987
|
+
interface ProrationRounding {
|
|
3988
|
+
access?: ProrationRounding.Access;
|
|
3989
|
+
}
|
|
3990
|
+
namespace ProrationRounding {
|
|
3991
|
+
interface Access {
|
|
3992
|
+
/**
|
|
3993
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
3994
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
3995
|
+
* nearest 100 in the stored unit).
|
|
3996
|
+
*/
|
|
3997
|
+
decimal_places: number;
|
|
3998
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
3999
|
+
}
|
|
4000
|
+
}
|
|
2412
4001
|
/**
|
|
2413
4002
|
* Attach a subscription to the recurring commit/credit.
|
|
2414
4003
|
*/
|
|
@@ -2598,10 +4187,30 @@ export declare namespace ContractEditParams {
|
|
|
2598
4187
|
}
|
|
2599
4188
|
}
|
|
2600
4189
|
}
|
|
4190
|
+
interface AddSpendTracker {
|
|
4191
|
+
/**
|
|
4192
|
+
* Human-readable identifier, unique per contract.
|
|
4193
|
+
*/
|
|
4194
|
+
alias: string;
|
|
4195
|
+
applicable_spend_specifiers: Array<AddSpendTracker.ApplicableSpendSpecifier>;
|
|
4196
|
+
credit_type_id: string;
|
|
4197
|
+
reset_frequency: 'BILLING_PERIOD';
|
|
4198
|
+
}
|
|
4199
|
+
namespace AddSpendTracker {
|
|
4200
|
+
interface ApplicableSpendSpecifier {
|
|
4201
|
+
sources: Array<'THRESHOLD_RECHARGE' | 'MANUAL'>;
|
|
4202
|
+
spend_type: 'COMMIT_PURCHASE';
|
|
4203
|
+
/**
|
|
4204
|
+
* Filter by whether the spend was discounted. Defaults to ANY if omitted.
|
|
4205
|
+
*/
|
|
4206
|
+
discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY';
|
|
4207
|
+
}
|
|
4208
|
+
}
|
|
2601
4209
|
interface AddSubscription {
|
|
2602
4210
|
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
2603
4211
|
proration: AddSubscription.Proration;
|
|
2604
4212
|
subscription_rate: AddSubscription.SubscriptionRate;
|
|
4213
|
+
billing_cycle_config?: AddSubscription.BillingCycleConfig;
|
|
2605
4214
|
/**
|
|
2606
4215
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2607
4216
|
*/
|
|
@@ -2658,6 +4267,18 @@ export declare namespace ContractEditParams {
|
|
|
2658
4267
|
* Indicates if the partial period will be prorated or charged a full amount.
|
|
2659
4268
|
*/
|
|
2660
4269
|
is_prorated?: boolean;
|
|
4270
|
+
rounding?: Proration.Rounding;
|
|
4271
|
+
}
|
|
4272
|
+
namespace Proration {
|
|
4273
|
+
interface Rounding {
|
|
4274
|
+
/**
|
|
4275
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
4276
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
4277
|
+
* nearest 100 in the stored unit).
|
|
4278
|
+
*/
|
|
4279
|
+
decimal_places: number;
|
|
4280
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
4281
|
+
}
|
|
2661
4282
|
}
|
|
2662
4283
|
interface SubscriptionRate {
|
|
2663
4284
|
/**
|
|
@@ -2670,6 +4291,18 @@ export declare namespace ContractEditParams {
|
|
|
2670
4291
|
*/
|
|
2671
4292
|
product_id: string;
|
|
2672
4293
|
}
|
|
4294
|
+
interface BillingCycleConfig {
|
|
4295
|
+
/**
|
|
4296
|
+
* The date to anchor the billing cycle to. If omitted, defaults to the contract's
|
|
4297
|
+
* usage invoice billing cycle anchor date.
|
|
4298
|
+
*/
|
|
4299
|
+
anchor_date?: string;
|
|
4300
|
+
/**
|
|
4301
|
+
* Controls whether this subscription consolidates onto usage invoices or gets its
|
|
4302
|
+
* own scheduled invoice. Defaults to ON_USAGE_INVOICE if omitted.
|
|
4303
|
+
*/
|
|
4304
|
+
invoice_placement?: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
|
|
4305
|
+
}
|
|
2673
4306
|
interface SeatConfig {
|
|
2674
4307
|
/**
|
|
2675
4308
|
* The initial assigned seats on this subscription.
|
|
@@ -2860,6 +4493,11 @@ export declare namespace ContractEditParams {
|
|
|
2860
4493
|
* lowers to this amount, a threshold charge will be initiated.
|
|
2861
4494
|
*/
|
|
2862
4495
|
threshold_amount?: number;
|
|
4496
|
+
/**
|
|
4497
|
+
* Determines which balances are excluded from remaining balance calculation for
|
|
4498
|
+
* threshold billing.
|
|
4499
|
+
*/
|
|
4500
|
+
threshold_balance_specifiers?: Array<UpdatePrepaidBalanceThresholdConfiguration.ThresholdBalanceSpecifier> | null;
|
|
2863
4501
|
}
|
|
2864
4502
|
namespace UpdatePrepaidBalanceThresholdConfiguration {
|
|
2865
4503
|
interface Commit extends Shared.UpdateBaseThresholdCommit {
|
|
@@ -2885,6 +4523,10 @@ export declare namespace ContractEditParams {
|
|
|
2885
4523
|
specifiers?: Array<Shared.CommitSpecifierInput> | null;
|
|
2886
4524
|
}
|
|
2887
4525
|
interface DiscountConfiguration {
|
|
4526
|
+
/**
|
|
4527
|
+
* Update the discount cap. Set to null to remove an existing cap.
|
|
4528
|
+
*/
|
|
4529
|
+
cap?: DiscountConfiguration.Cap | null;
|
|
2888
4530
|
/**
|
|
2889
4531
|
* The fraction of the original amount that the customer pays after applying the
|
|
2890
4532
|
* discount. Set to null to remove the discount fraction. For example, 0.85 means
|
|
@@ -2892,12 +4534,47 @@ export declare namespace ContractEditParams {
|
|
|
2892
4534
|
*/
|
|
2893
4535
|
payment_fraction?: number | null;
|
|
2894
4536
|
}
|
|
4537
|
+
namespace DiscountConfiguration {
|
|
4538
|
+
/**
|
|
4539
|
+
* Update the discount cap. Set to null to remove an existing cap.
|
|
4540
|
+
*/
|
|
4541
|
+
interface Cap {
|
|
4542
|
+
/**
|
|
4543
|
+
* Accumulated spend ceiling above which the discount stops applying.
|
|
4544
|
+
*/
|
|
4545
|
+
amount: number;
|
|
4546
|
+
/**
|
|
4547
|
+
* Alias of the spend tracker this cap is measured against.
|
|
4548
|
+
*/
|
|
4549
|
+
spend_tracker_alias: string;
|
|
4550
|
+
}
|
|
4551
|
+
}
|
|
4552
|
+
interface ThresholdBalanceSpecifier {
|
|
4553
|
+
exclude: Array<ThresholdBalanceSpecifier.Exclude>;
|
|
4554
|
+
}
|
|
4555
|
+
namespace ThresholdBalanceSpecifier {
|
|
4556
|
+
interface Exclude {
|
|
4557
|
+
custom_field_filters: Array<Exclude.CustomFieldFilter>;
|
|
4558
|
+
}
|
|
4559
|
+
namespace Exclude {
|
|
4560
|
+
interface CustomFieldFilter {
|
|
4561
|
+
entity: 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit';
|
|
4562
|
+
key: string;
|
|
4563
|
+
value: string;
|
|
4564
|
+
}
|
|
4565
|
+
}
|
|
4566
|
+
}
|
|
2895
4567
|
}
|
|
2896
4568
|
interface UpdateRecurringCommit {
|
|
2897
4569
|
recurring_commit_id: string;
|
|
2898
4570
|
access_amount?: UpdateRecurringCommit.AccessAmount;
|
|
2899
4571
|
ending_before?: string | null;
|
|
2900
4572
|
invoice_amount?: UpdateRecurringCommit.InvoiceAmount;
|
|
4573
|
+
/**
|
|
4574
|
+
* If provided, updates the rounding config on the recurring commit. Set to null to
|
|
4575
|
+
* clear rounding. Omit to leave unchanged.
|
|
4576
|
+
*/
|
|
4577
|
+
proration_rounding?: UpdateRecurringCommit.ProrationRounding | null;
|
|
2901
4578
|
/**
|
|
2902
4579
|
* If provided, updates the recurring commit to use the specified rate type when
|
|
2903
4580
|
* generating future commits.
|
|
@@ -2913,11 +4590,44 @@ export declare namespace ContractEditParams {
|
|
|
2913
4590
|
quantity?: number;
|
|
2914
4591
|
unit_price?: number;
|
|
2915
4592
|
}
|
|
4593
|
+
/**
|
|
4594
|
+
* If provided, updates the rounding config on the recurring commit. Set to null to
|
|
4595
|
+
* clear rounding. Omit to leave unchanged.
|
|
4596
|
+
*/
|
|
4597
|
+
interface ProrationRounding {
|
|
4598
|
+
access?: ProrationRounding.Access | null;
|
|
4599
|
+
invoice?: ProrationRounding.Invoice | null;
|
|
4600
|
+
}
|
|
4601
|
+
namespace ProrationRounding {
|
|
4602
|
+
interface Access {
|
|
4603
|
+
/**
|
|
4604
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
4605
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
4606
|
+
* nearest 100 in the stored unit).
|
|
4607
|
+
*/
|
|
4608
|
+
decimal_places: number;
|
|
4609
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
4610
|
+
}
|
|
4611
|
+
interface Invoice {
|
|
4612
|
+
/**
|
|
4613
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
4614
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
4615
|
+
* nearest 100 in the stored unit).
|
|
4616
|
+
*/
|
|
4617
|
+
decimal_places: number;
|
|
4618
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
4619
|
+
}
|
|
4620
|
+
}
|
|
2916
4621
|
}
|
|
2917
4622
|
interface UpdateRecurringCredit {
|
|
2918
4623
|
recurring_credit_id: string;
|
|
2919
4624
|
access_amount?: UpdateRecurringCredit.AccessAmount;
|
|
2920
4625
|
ending_before?: string | null;
|
|
4626
|
+
/**
|
|
4627
|
+
* If provided, updates the rounding config on the recurring credit. Set to null to
|
|
4628
|
+
* clear rounding. Omit to leave unchanged.
|
|
4629
|
+
*/
|
|
4630
|
+
proration_rounding?: UpdateRecurringCredit.ProrationRounding | null;
|
|
2921
4631
|
/**
|
|
2922
4632
|
* If provided, updates the recurring credit to use the specified rate type when
|
|
2923
4633
|
* generating future credits.
|
|
@@ -2929,6 +4639,24 @@ export declare namespace ContractEditParams {
|
|
|
2929
4639
|
quantity?: number;
|
|
2930
4640
|
unit_price?: number;
|
|
2931
4641
|
}
|
|
4642
|
+
/**
|
|
4643
|
+
* If provided, updates the rounding config on the recurring credit. Set to null to
|
|
4644
|
+
* clear rounding. Omit to leave unchanged.
|
|
4645
|
+
*/
|
|
4646
|
+
interface ProrationRounding {
|
|
4647
|
+
access?: ProrationRounding.Access | null;
|
|
4648
|
+
}
|
|
4649
|
+
namespace ProrationRounding {
|
|
4650
|
+
interface Access {
|
|
4651
|
+
/**
|
|
4652
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
4653
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
4654
|
+
* nearest 100 in the stored unit).
|
|
4655
|
+
*/
|
|
4656
|
+
decimal_places: number;
|
|
4657
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
4658
|
+
}
|
|
4659
|
+
}
|
|
2932
4660
|
}
|
|
2933
4661
|
interface UpdateScheduledCharge {
|
|
2934
4662
|
scheduled_charge_id: string;
|
|
@@ -2978,6 +4706,10 @@ export declare namespace ContractEditParams {
|
|
|
2978
4706
|
}
|
|
2979
4707
|
namespace UpdateSpendThresholdConfiguration {
|
|
2980
4708
|
interface DiscountConfiguration {
|
|
4709
|
+
/**
|
|
4710
|
+
* Update the discount cap. Set to null to remove an existing cap.
|
|
4711
|
+
*/
|
|
4712
|
+
cap?: DiscountConfiguration.Cap | null;
|
|
2981
4713
|
/**
|
|
2982
4714
|
* The fraction of the original amount that the customer pays after applying the
|
|
2983
4715
|
* discount. Set to null to remove the discount fraction. For example, 0.85 means
|
|
@@ -2985,10 +4717,26 @@ export declare namespace ContractEditParams {
|
|
|
2985
4717
|
*/
|
|
2986
4718
|
payment_fraction?: number | null;
|
|
2987
4719
|
}
|
|
4720
|
+
namespace DiscountConfiguration {
|
|
4721
|
+
/**
|
|
4722
|
+
* Update the discount cap. Set to null to remove an existing cap.
|
|
4723
|
+
*/
|
|
4724
|
+
interface Cap {
|
|
4725
|
+
/**
|
|
4726
|
+
* Accumulated spend ceiling above which the discount stops applying.
|
|
4727
|
+
*/
|
|
4728
|
+
amount: number;
|
|
4729
|
+
/**
|
|
4730
|
+
* Alias of the spend tracker this cap is measured against.
|
|
4731
|
+
*/
|
|
4732
|
+
spend_tracker_alias: string;
|
|
4733
|
+
}
|
|
4734
|
+
}
|
|
2988
4735
|
}
|
|
2989
4736
|
interface UpdateSubscription {
|
|
2990
4737
|
subscription_id: string;
|
|
2991
4738
|
ending_before?: string | null;
|
|
4739
|
+
proration_rounding?: UpdateSubscription.ProrationRounding | null;
|
|
2992
4740
|
/**
|
|
2993
4741
|
* Update the subscription's quantity management mode from QUANTITY_ONLY to
|
|
2994
4742
|
* SEAT_BASED with the provided seat_group_key.
|
|
@@ -3003,6 +4751,15 @@ export declare namespace ContractEditParams {
|
|
|
3003
4751
|
seat_updates?: UpdateSubscription.SeatUpdates;
|
|
3004
4752
|
}
|
|
3005
4753
|
namespace UpdateSubscription {
|
|
4754
|
+
interface ProrationRounding {
|
|
4755
|
+
/**
|
|
4756
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
4757
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
4758
|
+
* nearest 100 in the stored unit).
|
|
4759
|
+
*/
|
|
4760
|
+
decimal_places: number;
|
|
4761
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
4762
|
+
}
|
|
3006
4763
|
/**
|
|
3007
4764
|
* Update the subscription's quantity management mode from QUANTITY_ONLY to
|
|
3008
4765
|
* SEAT_BASED with the provided seat_group_key.
|