@metronome/sdk 0.3.0 → 2.0.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 +113 -28
- package/README.md +123 -51
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/bin/cli +46 -0
- package/bin/migration-config.json +6 -0
- package/client.d.mts +232 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +232 -0
- package/client.d.ts.map +1 -0
- package/client.js +464 -0
- package/client.js.map +1 -0
- package/client.mjs +460 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/pagination.d.mts +137 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +137 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +158 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +150 -0
- package/core/pagination.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +1 -46
- package/error.d.ts.map +1 -1
- package/error.js +3 -110
- package/error.js.map +1 -1
- package/error.mjs +1 -96
- package/error.mjs.map +1 -1
- package/index.d.mts +7 -144
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -143
- package/index.d.ts.map +1 -1
- package/index.js +14 -120
- package/index.js.map +1 -1
- package/index.mjs +6 -93
- package/index.mjs.map +1 -1
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +26 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +26 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +120 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +112 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +35 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +32 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +1 -0
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/formats.js +4 -2
- package/internal/qs/formats.js.map +1 -1
- package/internal/qs/formats.mjs +2 -1
- package/internal/qs/formats.mjs.map +1 -1
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.js +16 -19
- package/internal/qs/stringify.js.map +1 -1
- package/internal/qs/stringify.mjs +17 -19
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +1 -0
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.js +22 -21
- package/internal/qs/utils.js.map +1 -1
- package/internal/qs/utils.mjs +12 -12
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +85 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +79 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +113 -64
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +1 -36
- package/pagination.d.ts.map +1 -1
- package/pagination.js +3 -40
- package/pagination.js.map +1 -1
- package/pagination.mjs +1 -38
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +1 -5
- package/resource.d.ts.map +1 -1
- package/resource.js +3 -8
- package/resource.js.map +1 -1
- package/resource.mjs +1 -6
- package/resource.mjs.map +1 -1
- package/resources/index.d.mts +5 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +2 -15
- package/resources/index.js.map +1 -1
- package/resources/shared.d.mts +2363 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +1470 -465
- package/resources/shared.d.ts.map +1 -1
- package/resources/v1/alerts.d.mts +207 -0
- package/resources/v1/alerts.d.mts.map +1 -0
- package/resources/v1/alerts.d.ts +107 -32
- package/resources/v1/alerts.d.ts.map +1 -1
- package/resources/v1/alerts.js +74 -3
- package/resources/v1/alerts.js.map +1 -1
- package/resources/v1/alerts.mjs +74 -3
- package/resources/v1/alerts.mjs.map +1 -1
- package/resources/v1/audit-logs.d.mts +108 -0
- package/resources/v1/audit-logs.d.mts.map +1 -0
- package/resources/v1/audit-logs.d.ts +45 -12
- package/resources/v1/audit-logs.d.ts.map +1 -1
- package/resources/v1/audit-logs.js +53 -12
- package/resources/v1/audit-logs.js.map +1 -1
- package/resources/v1/audit-logs.mjs +52 -10
- package/resources/v1/audit-logs.mjs.map +1 -1
- package/resources/v1/billable-metrics.d.mts +293 -0
- package/resources/v1/billable-metrics.d.mts.map +1 -0
- package/resources/v1/billable-metrics.d.ts +70 -15
- package/resources/v1/billable-metrics.d.ts.map +1 -1
- package/resources/v1/billable-metrics.js +70 -16
- package/resources/v1/billable-metrics.js.map +1 -1
- package/resources/v1/billable-metrics.mjs +69 -14
- package/resources/v1/billable-metrics.mjs.map +1 -1
- package/resources/v1/contracts/contracts.d.mts +3006 -0
- package/resources/v1/contracts/contracts.d.mts.map +1 -0
- package/resources/v1/contracts/contracts.d.ts +428 -1299
- package/resources/v1/contracts/contracts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.js +269 -50
- package/resources/v1/contracts/contracts.js.map +1 -1
- package/resources/v1/contracts/contracts.mjs +267 -26
- package/resources/v1/contracts/contracts.mjs.map +1 -1
- package/resources/v1/contracts/index.d.mts +5 -0
- package/resources/v1/contracts/index.d.mts.map +1 -0
- package/resources/v1/contracts/index.d.ts +3 -3
- package/resources/v1/contracts/index.d.ts.map +1 -1
- package/resources/v1/contracts/index.js +1 -3
- package/resources/v1/contracts/index.js.map +1 -1
- package/resources/v1/contracts/index.mjs +2 -2
- package/resources/v1/contracts/index.mjs.map +1 -1
- package/resources/v1/contracts/named-schedules.d.mts +82 -0
- package/resources/v1/contracts/named-schedules.d.mts.map +1 -0
- package/resources/v1/contracts/named-schedules.d.ts +5 -4
- package/resources/v1/contracts/named-schedules.d.ts.map +1 -1
- package/resources/v1/contracts/named-schedules.js +3 -2
- package/resources/v1/contracts/named-schedules.js.map +1 -1
- package/resources/v1/contracts/named-schedules.mjs +3 -2
- package/resources/v1/contracts/named-schedules.mjs.map +1 -1
- package/resources/v1/contracts/products.d.mts +502 -0
- package/resources/v1/contracts/products.d.mts.map +1 -0
- package/resources/v1/contracts/products.d.ts +44 -17
- package/resources/v1/contracts/products.d.ts.map +1 -1
- package/resources/v1/contracts/products.js +41 -17
- package/resources/v1/contracts/products.js.map +1 -1
- package/resources/v1/contracts/products.mjs +40 -15
- package/resources/v1/contracts/products.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/index.d.mts +5 -0
- package/resources/v1/contracts/rate-cards/index.d.mts.map +1 -0
- package/resources/v1/contracts/rate-cards/index.d.ts +2 -2
- package/resources/v1/contracts/rate-cards/index.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/index.js +1 -3
- package/resources/v1/contracts/rate-cards/index.js.map +1 -1
- package/resources/v1/contracts/rate-cards/index.mjs +2 -2
- package/resources/v1/contracts/rate-cards/index.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.d.mts +94 -0
- package/resources/v1/contracts/rate-cards/named-schedules.d.mts.map +1 -0
- package/resources/v1/contracts/rate-cards/named-schedules.d.ts +5 -4
- package/resources/v1/contracts/rate-cards/named-schedules.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.js +3 -2
- package/resources/v1/contracts/rate-cards/named-schedules.js.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.mjs +3 -2
- package/resources/v1/contracts/rate-cards/named-schedules.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.d.mts +85 -0
- package/resources/v1/contracts/rate-cards/product-orders.d.mts.map +1 -0
- package/resources/v1/contracts/rate-cards/product-orders.d.ts +12 -6
- package/resources/v1/contracts/rate-cards/product-orders.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.js +8 -3
- package/resources/v1/contracts/rate-cards/product-orders.js.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.mjs +8 -3
- package/resources/v1/contracts/rate-cards/product-orders.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.d.mts +452 -0
- package/resources/v1/contracts/rate-cards/rate-cards.d.mts.map +1 -0
- package/resources/v1/contracts/rate-cards/rate-cards.d.ts +134 -41
- package/resources/v1/contracts/rate-cards/rate-cards.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.js +127 -47
- package/resources/v1/contracts/rate-cards/rate-cards.js.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.mjs +123 -20
- package/resources/v1/contracts/rate-cards/rate-cards.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.d.mts +382 -0
- package/resources/v1/contracts/rate-cards/rates.d.mts.map +1 -0
- package/resources/v1/contracts/rate-cards/rates.d.ts +25 -82
- package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.js +13 -9
- package/resources/v1/contracts/rate-cards/rates.js.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.mjs +12 -7
- package/resources/v1/contracts/rate-cards/rates.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards.d.mts +2 -0
- package/resources/v1/contracts/rate-cards.d.mts.map +1 -0
- package/resources/v1/contracts/rate-cards.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards.js +2 -15
- package/resources/v1/contracts/rate-cards.js.map +1 -1
- package/resources/v1/contracts.d.mts +2 -0
- package/resources/v1/contracts.d.mts.map +1 -0
- package/resources/v1/contracts.d.ts.map +1 -1
- package/resources/v1/contracts.js +2 -15
- package/resources/v1/contracts.js.map +1 -1
- package/resources/v1/credit-grants.d.mts +505 -0
- package/resources/v1/credit-grants.d.mts.map +1 -0
- package/resources/v1/credit-grants.d.ts +73 -74
- package/resources/v1/credit-grants.d.ts.map +1 -1
- package/resources/v1/credit-grants.js +52 -18
- package/resources/v1/credit-grants.js.map +1 -1
- package/resources/v1/credit-grants.mjs +51 -16
- package/resources/v1/credit-grants.mjs.map +1 -1
- package/resources/v1/custom-fields.d.mts +151 -0
- package/resources/v1/custom-fields.d.mts.map +1 -0
- package/resources/v1/custom-fields.d.ts +69 -38
- package/resources/v1/custom-fields.d.ts.map +1 -1
- package/resources/v1/custom-fields.js +66 -22
- package/resources/v1/custom-fields.js.map +1 -1
- package/resources/v1/custom-fields.mjs +66 -22
- package/resources/v1/custom-fields.mjs.map +1 -1
- package/resources/v1/customers/alerts.d.mts +309 -0
- package/resources/v1/customers/alerts.d.mts.map +1 -0
- package/resources/v1/customers/alerts.d.ts +176 -50
- package/resources/v1/customers/alerts.d.ts.map +1 -1
- package/resources/v1/customers/alerts.js +131 -10
- package/resources/v1/customers/alerts.js.map +1 -1
- package/resources/v1/customers/alerts.mjs +131 -10
- package/resources/v1/customers/alerts.mjs.map +1 -1
- package/resources/v1/customers/billing-config.d.mts +125 -0
- package/resources/v1/customers/billing-config.d.mts.map +1 -0
- package/resources/v1/customers/billing-config.d.ts +8 -7
- package/resources/v1/customers/billing-config.d.ts.map +1 -1
- package/resources/v1/customers/billing-config.js +8 -6
- package/resources/v1/customers/billing-config.js.map +1 -1
- package/resources/v1/customers/billing-config.mjs +8 -6
- package/resources/v1/customers/billing-config.mjs.map +1 -1
- package/resources/v1/customers/commits.d.mts +456 -0
- package/resources/v1/customers/commits.d.mts.map +1 -0
- package/resources/v1/customers/commits.d.ts +139 -47
- package/resources/v1/customers/commits.d.ts.map +1 -1
- package/resources/v1/customers/commits.js +131 -12
- package/resources/v1/customers/commits.js.map +1 -1
- package/resources/v1/customers/commits.mjs +131 -12
- package/resources/v1/customers/commits.mjs.map +1 -1
- package/resources/v1/customers/credits.d.mts +310 -0
- package/resources/v1/customers/credits.d.mts.map +1 -0
- package/resources/v1/customers/credits.d.ts +124 -46
- package/resources/v1/customers/credits.d.ts.map +1 -1
- package/resources/v1/customers/credits.js +116 -11
- package/resources/v1/customers/credits.js.map +1 -1
- package/resources/v1/customers/credits.mjs +116 -11
- package/resources/v1/customers/credits.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +819 -0
- package/resources/v1/customers/customers.d.mts.map +1 -0
- package/resources/v1/customers/customers.d.ts +319 -55
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +220 -76
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +213 -44
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts +9 -0
- package/resources/v1/customers/index.d.mts.map +1 -0
- package/resources/v1/customers/index.d.ts +6 -6
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js +1 -8
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs +3 -3
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/invoices.d.mts +825 -0
- package/resources/v1/customers/invoices.d.mts.map +1 -0
- package/resources/v1/customers/invoices.d.ts +309 -25
- package/resources/v1/customers/invoices.d.ts.map +1 -1
- package/resources/v1/customers/invoices.js +180 -22
- package/resources/v1/customers/invoices.js.map +1 -1
- package/resources/v1/customers/invoices.mjs +179 -19
- package/resources/v1/customers/invoices.mjs.map +1 -1
- package/resources/v1/customers/named-schedules.d.mts +82 -0
- package/resources/v1/customers/named-schedules.d.mts.map +1 -0
- package/resources/v1/customers/named-schedules.d.ts +5 -4
- package/resources/v1/customers/named-schedules.d.ts.map +1 -1
- package/resources/v1/customers/named-schedules.js +3 -2
- package/resources/v1/customers/named-schedules.js.map +1 -1
- package/resources/v1/customers/named-schedules.mjs +3 -2
- package/resources/v1/customers/named-schedules.mjs.map +1 -1
- package/resources/v1/customers/plans.d.mts +281 -0
- package/resources/v1/customers/plans.d.mts.map +1 -0
- package/resources/v1/customers/plans.d.ts +14 -12
- package/resources/v1/customers/plans.d.ts.map +1 -1
- package/resources/v1/customers/plans.js +8 -15
- package/resources/v1/customers/plans.js.map +1 -1
- package/resources/v1/customers/plans.mjs +7 -12
- package/resources/v1/customers/plans.mjs.map +1 -1
- package/resources/v1/customers.d.mts +2 -0
- package/resources/v1/customers.d.mts.map +1 -0
- package/resources/v1/customers.d.ts.map +1 -1
- package/resources/v1/customers.js +2 -15
- package/resources/v1/customers.js.map +1 -1
- package/resources/v1/dashboards.d.mts +133 -0
- package/resources/v1/dashboards.d.mts.map +1 -0
- package/resources/v1/dashboards.d.ts +33 -6
- package/resources/v1/dashboards.d.ts.map +1 -1
- package/resources/v1/dashboards.js +30 -4
- package/resources/v1/dashboards.js.map +1 -1
- package/resources/v1/dashboards.mjs +30 -4
- package/resources/v1/dashboards.mjs.map +1 -1
- package/resources/v1/index.d.mts +16 -0
- package/resources/v1/index.d.mts.map +1 -0
- package/resources/v1/index.d.ts +10 -9
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +3 -12
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +8 -7
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/invoices.d.mts +83 -0
- package/resources/v1/invoices.d.mts.map +1 -0
- package/resources/v1/invoices.d.ts +28 -6
- package/resources/v1/invoices.d.ts.map +1 -1
- package/resources/v1/invoices.js +24 -3
- package/resources/v1/invoices.js.map +1 -1
- package/resources/v1/invoices.mjs +24 -3
- package/resources/v1/invoices.mjs.map +1 -1
- package/resources/v1/payments.d.mts +116 -0
- package/resources/v1/payments.d.mts.map +1 -0
- package/resources/v1/payments.d.ts +116 -0
- package/resources/v1/payments.d.ts.map +1 -0
- package/resources/v1/payments.js +71 -0
- package/resources/v1/payments.js.map +1 -0
- package/resources/v1/payments.mjs +67 -0
- package/resources/v1/payments.mjs.map +1 -0
- package/resources/v1/plans.d.mts +240 -0
- package/resources/v1/plans.d.mts.map +1 -0
- package/resources/v1/plans.d.ts +24 -15
- package/resources/v1/plans.d.ts.map +1 -1
- package/resources/v1/plans.js +19 -26
- package/resources/v1/plans.js.map +1 -1
- package/resources/v1/plans.mjs +18 -22
- package/resources/v1/plans.mjs.map +1 -1
- package/resources/v1/pricing-units.d.mts +34 -0
- package/resources/v1/pricing-units.d.mts.map +1 -0
- package/resources/v1/pricing-units.d.ts +12 -9
- package/resources/v1/pricing-units.d.ts.map +1 -1
- package/resources/v1/pricing-units.js +20 -12
- package/resources/v1/pricing-units.js.map +1 -1
- package/resources/v1/pricing-units.mjs +19 -10
- package/resources/v1/pricing-units.mjs.map +1 -1
- package/resources/v1/services.d.mts +33 -0
- package/resources/v1/services.d.mts.map +1 -0
- package/resources/v1/services.d.ts +10 -7
- package/resources/v1/services.d.ts.map +1 -1
- package/resources/v1/services.js +7 -5
- package/resources/v1/services.js.map +1 -1
- package/resources/v1/services.mjs +7 -5
- package/resources/v1/services.mjs.map +1 -1
- package/resources/v1/usage.d.mts +490 -0
- package/resources/v1/usage.d.mts.map +1 -0
- package/resources/v1/usage.d.ts +223 -58
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +214 -26
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +213 -24
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +62 -0
- package/resources/v1/v1.d.mts.map +1 -0
- package/resources/v1/v1.d.ts +19 -15
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +19 -48
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +12 -19
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v1.d.mts +2 -0
- package/resources/v1.d.mts.map +1 -0
- package/resources/v1.d.ts.map +1 -1
- package/resources/v1.js +2 -15
- package/resources/v1.js.map +1 -1
- package/resources/v2/contracts.d.mts +2900 -0
- package/resources/v2/contracts.d.mts.map +1 -0
- package/resources/v2/contracts.d.ts +399 -3830
- package/resources/v2/contracts.d.ts.map +1 -1
- package/resources/v2/contracts.js +102 -12
- package/resources/v2/contracts.js.map +1 -1
- package/resources/v2/contracts.mjs +102 -12
- package/resources/v2/contracts.mjs.map +1 -1
- package/resources/v2/index.d.mts +3 -0
- package/resources/v2/index.d.mts.map +1 -0
- package/resources/v2/index.d.ts.map +1 -1
- package/resources/v2/v2.d.mts +10 -0
- package/resources/v2/v2.d.mts.map +1 -0
- package/resources/v2/v2.d.ts +1 -1
- package/resources/v2/v2.d.ts.map +1 -1
- package/resources/v2/v2.js +3 -25
- package/resources/v2/v2.js.map +1 -1
- package/resources/v2/v2.mjs +1 -1
- package/resources/v2.d.mts +2 -0
- package/resources/v2.d.mts.map +1 -0
- package/resources/v2.d.ts.map +1 -1
- package/resources/v2.js +2 -15
- package/resources/v2.js.map +1 -1
- package/resources/webhooks.d.mts +22 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +1 -1
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +3 -3
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/api-promise.ts +2 -0
- package/src/client.ts +809 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/pagination.ts +319 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -130
- package/src/index.ts +6 -221
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +144 -0
- package/src/internal/parse.ts +50 -0
- package/src/internal/qs/formats.ts +3 -2
- package/src/internal/qs/index.ts +3 -3
- package/src/internal/qs/stringify.ts +18 -21
- package/src/internal/qs/utils.ts +16 -16
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +126 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +8 -0
- package/src/pagination.ts +2 -82
- package/src/resource.ts +2 -11
- package/src/resources/index.ts +4 -4
- package/src/resources/shared.ts +1921 -506
- package/src/resources/v1/alerts.ts +108 -33
- package/src/resources/v1/audit-logs.ts +48 -26
- package/src/resources/v1/billable-metrics.ts +79 -34
- package/src/resources/v1/contracts/contracts.ts +490 -1632
- package/src/resources/v1/contracts/index.ts +7 -6
- package/src/resources/v1/contracts/named-schedules.ts +8 -6
- package/src/resources/v1/contracts/products.ts +50 -38
- package/src/resources/v1/contracts/rate-cards/index.ts +6 -6
- package/src/resources/v1/contracts/rate-cards/named-schedules.ts +8 -6
- package/src/resources/v1/contracts/rate-cards/product-orders.ts +13 -10
- package/src/resources/v1/contracts/rate-cards/rate-cards.ts +145 -72
- package/src/resources/v1/contracts/rate-cards/rates.ts +28 -98
- package/src/resources/v1/contracts/rate-cards.ts +1 -1
- package/src/resources/v1/contracts.ts +1 -1
- package/src/resources/v1/credit-grants.ts +100 -112
- package/src/resources/v1/custom-fields.ts +106 -74
- package/src/resources/v1/customers/alerts.ts +195 -55
- package/src/resources/v1/customers/billing-config.ts +27 -13
- package/src/resources/v1/customers/commits.ts +146 -54
- package/src/resources/v1/customers/credits.ts +131 -53
- package/src/resources/v1/customers/customers.ts +407 -115
- package/src/resources/v1/customers/index.ts +20 -18
- package/src/resources/v1/customers/invoices.ts +343 -42
- package/src/resources/v1/customers/named-schedules.ts +8 -6
- package/src/resources/v1/customers/plans.ts +24 -22
- package/src/resources/v1/customers.ts +1 -1
- package/src/resources/v1/dashboards.ts +34 -7
- package/src/resources/v1/index.ts +43 -25
- package/src/resources/v1/invoices.ts +28 -9
- package/src/resources/v1/payments.ts +170 -0
- package/src/resources/v1/plans.ts +42 -43
- package/src/resources/v1/pricing-units.ts +15 -23
- package/src/resources/v1/services.ts +10 -7
- package/src/resources/v1/usage.ts +247 -73
- package/src/resources/v1/v1.ts +78 -49
- package/src/resources/v1.ts +1 -1
- package/src/resources/v2/contracts.ts +469 -4930
- package/src/resources/v2/index.ts +2 -2
- package/src/resources/v2/v2.ts +3 -3
- package/src/resources/v2.ts +1 -1
- package/src/resources/webhooks.ts +2 -2
- package/src/resources.ts +1 -1
- package/src/tsconfig.json +2 -2
- package/src/uploads.ts +2 -255
- package/src/version.ts +1 -1
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +1 -74
- package/uploads.d.ts.map +1 -1
- package/uploads.js +3 -168
- package/uploads.js.map +1 -1
- package/uploads.mjs +1 -157
- package/uploads.mjs.map +1 -1
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/_shims/MultipartBody.d.ts +0 -9
- package/_shims/MultipartBody.d.ts.map +0 -1
- package/_shims/MultipartBody.js +0 -16
- package/_shims/MultipartBody.js.map +0 -1
- package/_shims/MultipartBody.mjs +0 -12
- package/_shims/MultipartBody.mjs.map +0 -1
- package/_shims/README.md +0 -46
- package/_shims/auto/runtime-bun.d.ts +0 -5
- package/_shims/auto/runtime-bun.d.ts.map +0 -1
- package/_shims/auto/runtime-bun.js +0 -21
- package/_shims/auto/runtime-bun.js.map +0 -1
- package/_shims/auto/runtime-bun.mjs +0 -2
- package/_shims/auto/runtime-bun.mjs.map +0 -1
- package/_shims/auto/runtime-node.d.ts +0 -5
- package/_shims/auto/runtime-node.d.ts.map +0 -1
- package/_shims/auto/runtime-node.js +0 -21
- package/_shims/auto/runtime-node.js.map +0 -1
- package/_shims/auto/runtime-node.mjs +0 -2
- package/_shims/auto/runtime-node.mjs.map +0 -1
- package/_shims/auto/runtime.d.ts +0 -5
- package/_shims/auto/runtime.d.ts.map +0 -1
- package/_shims/auto/runtime.js +0 -21
- package/_shims/auto/runtime.js.map +0 -1
- package/_shims/auto/runtime.mjs +0 -2
- package/_shims/auto/runtime.mjs.map +0 -1
- package/_shims/auto/types-node.d.ts +0 -5
- package/_shims/auto/types-node.d.ts.map +0 -1
- package/_shims/auto/types-node.js +0 -21
- package/_shims/auto/types-node.js.map +0 -1
- package/_shims/auto/types-node.mjs +0 -2
- package/_shims/auto/types-node.mjs.map +0 -1
- package/_shims/auto/types.d.ts +0 -101
- package/_shims/auto/types.js +0 -3
- package/_shims/auto/types.mjs +0 -3
- package/_shims/bun-runtime.d.ts +0 -6
- package/_shims/bun-runtime.d.ts.map +0 -1
- package/_shims/bun-runtime.js +0 -14
- package/_shims/bun-runtime.js.map +0 -1
- package/_shims/bun-runtime.mjs +0 -10
- package/_shims/bun-runtime.mjs.map +0 -1
- package/_shims/index.d.ts +0 -83
- package/_shims/index.js +0 -17
- package/_shims/index.mjs +0 -11
- package/_shims/manual-types.d.ts +0 -12
- package/_shims/manual-types.js +0 -3
- package/_shims/manual-types.mjs +0 -3
- package/_shims/node-runtime.d.ts +0 -3
- package/_shims/node-runtime.d.ts.map +0 -1
- package/_shims/node-runtime.js +0 -89
- package/_shims/node-runtime.js.map +0 -1
- package/_shims/node-runtime.mjs +0 -56
- package/_shims/node-runtime.mjs.map +0 -1
- package/_shims/node-types.d.ts +0 -42
- package/_shims/node-types.js +0 -3
- package/_shims/node-types.mjs +0 -3
- package/_shims/registry.d.ts +0 -37
- package/_shims/registry.d.ts.map +0 -1
- package/_shims/registry.js +0 -41
- package/_shims/registry.js.map +0 -1
- package/_shims/registry.mjs +0 -37
- package/_shims/registry.mjs.map +0 -1
- package/_shims/web-runtime.d.ts +0 -5
- package/_shims/web-runtime.d.ts.map +0 -1
- package/_shims/web-runtime.js +0 -78
- package/_shims/web-runtime.js.map +0 -1
- package/_shims/web-runtime.mjs +0 -71
- package/_shims/web-runtime.mjs.map +0 -1
- package/_shims/web-types.d.ts +0 -83
- package/_shims/web-types.js +0 -3
- package/_shims/web-types.mjs +0 -3
- package/core.d.ts +0 -255
- package/core.d.ts.map +0 -1
- package/core.js +0 -924
- package/core.js.map +0 -1
- package/core.mjs +0 -892
- package/core.mjs.map +0 -1
- package/shims/node.d.ts +0 -30
- package/shims/node.d.ts.map +0 -1
- package/shims/node.js +0 -31
- package/shims/node.js.map +0 -1
- package/shims/node.mjs +0 -5
- package/shims/node.mjs.map +0 -1
- package/shims/web.d.ts +0 -26
- package/shims/web.d.ts.map +0 -1
- package/shims/web.js +0 -31
- package/shims/web.js.map +0 -1
- package/shims/web.mjs +0 -5
- package/shims/web.mjs.map +0 -1
- package/src/_shims/MultipartBody.ts +0 -9
- package/src/_shims/README.md +0 -46
- package/src/_shims/auto/runtime-bun.ts +0 -4
- package/src/_shims/auto/runtime-node.ts +0 -4
- package/src/_shims/auto/runtime.ts +0 -4
- package/src/_shims/auto/types-node.ts +0 -4
- package/src/_shims/auto/types.d.ts +0 -101
- package/src/_shims/auto/types.js +0 -3
- package/src/_shims/auto/types.mjs +0 -3
- package/src/_shims/bun-runtime.ts +0 -14
- package/src/_shims/index.d.ts +0 -83
- package/src/_shims/index.js +0 -17
- package/src/_shims/index.mjs +0 -11
- package/src/_shims/manual-types.d.ts +0 -12
- package/src/_shims/manual-types.js +0 -3
- package/src/_shims/manual-types.mjs +0 -3
- package/src/_shims/node-runtime.ts +0 -81
- package/src/_shims/node-types.d.ts +0 -42
- package/src/_shims/node-types.js +0 -3
- package/src/_shims/node-types.mjs +0 -3
- package/src/_shims/registry.ts +0 -67
- package/src/_shims/web-runtime.ts +0 -103
- package/src/_shims/web-types.d.ts +0 -83
- package/src/_shims/web-types.js +0 -3
- package/src/_shims/web-types.mjs +0 -3
- package/src/core.ts +0 -1236
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
|
@@ -0,0 +1,2363 @@
|
|
|
1
|
+
import * as Shared from "./shared.mjs";
|
|
2
|
+
import { BodyCursorPage } from "../core/pagination.mjs";
|
|
3
|
+
export interface BaseThresholdCommit {
|
|
4
|
+
/**
|
|
5
|
+
* The commit product that will be used to generate the line item for commit
|
|
6
|
+
* payment.
|
|
7
|
+
*/
|
|
8
|
+
product_id: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
12
|
+
* will default to the commit product name.
|
|
13
|
+
*/
|
|
14
|
+
name?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface BaseUsageFilter {
|
|
17
|
+
group_key: string;
|
|
18
|
+
group_values: Array<string>;
|
|
19
|
+
starting_at?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface Commit {
|
|
22
|
+
id: string;
|
|
23
|
+
/**
|
|
24
|
+
* Timestamp of when the commit was created.
|
|
25
|
+
*
|
|
26
|
+
* - Recurring commits: latter of commit service period date and parent commit
|
|
27
|
+
* start date
|
|
28
|
+
* - Rollover commits: when the new contract started
|
|
29
|
+
*/
|
|
30
|
+
created_at: string;
|
|
31
|
+
product: Commit.Product;
|
|
32
|
+
type: 'PREPAID' | 'POSTPAID';
|
|
33
|
+
/**
|
|
34
|
+
* The schedule that the customer will gain access to the credits purposed with
|
|
35
|
+
* this commit.
|
|
36
|
+
*/
|
|
37
|
+
access_schedule?: ScheduleDuration;
|
|
38
|
+
/**
|
|
39
|
+
* (DEPRECATED) Use access_schedule + invoice_schedule instead.
|
|
40
|
+
*/
|
|
41
|
+
amount?: number;
|
|
42
|
+
applicable_contract_ids?: Array<string>;
|
|
43
|
+
applicable_product_ids?: Array<string>;
|
|
44
|
+
applicable_product_tags?: Array<string>;
|
|
45
|
+
/**
|
|
46
|
+
* RFC 3339 timestamp indicating when the commit was archived. If not provided, the
|
|
47
|
+
* commit is not archived.
|
|
48
|
+
*/
|
|
49
|
+
archived_at?: string;
|
|
50
|
+
/**
|
|
51
|
+
* The current balance of the credit or commit. This balance reflects the amount of
|
|
52
|
+
* credit or commit that the customer has access to use at this moment - thus,
|
|
53
|
+
* expired and upcoming credit or commit segments contribute 0 to the balance. The
|
|
54
|
+
* balance will match the sum of all ledger entries with the exception of the case
|
|
55
|
+
* where the sum of negative manual ledger entries exceeds the positive amount
|
|
56
|
+
* remaining on the credit or commit - in that case, the balance will be 0. All
|
|
57
|
+
* manual ledger entries associated with active credit or commit segments are
|
|
58
|
+
* included in the balance, including future-dated manual ledger entries.
|
|
59
|
+
*/
|
|
60
|
+
balance?: number;
|
|
61
|
+
contract?: Commit.Contract;
|
|
62
|
+
/**
|
|
63
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
64
|
+
*/
|
|
65
|
+
custom_fields?: {
|
|
66
|
+
[key: string]: string;
|
|
67
|
+
};
|
|
68
|
+
description?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Optional configuration for commit hierarchy access control
|
|
71
|
+
*/
|
|
72
|
+
hierarchy_configuration?: CommitHierarchyConfiguration;
|
|
73
|
+
/**
|
|
74
|
+
* The contract that this commit will be billed on.
|
|
75
|
+
*/
|
|
76
|
+
invoice_contract?: Commit.InvoiceContract;
|
|
77
|
+
/**
|
|
78
|
+
* The schedule that the customer will be invoiced for this commit.
|
|
79
|
+
*/
|
|
80
|
+
invoice_schedule?: SchedulePointInTime;
|
|
81
|
+
/**
|
|
82
|
+
* A list of ordered events that impact the balance of a commit. For example, an
|
|
83
|
+
* invoice deduction or a rollover.
|
|
84
|
+
*/
|
|
85
|
+
ledger?: Array<Commit.PrepaidCommitSegmentStartLedgerEntry | Commit.PrepaidCommitAutomatedInvoiceDeductionLedgerEntry | Commit.PrepaidCommitRolloverLedgerEntry | Commit.PrepaidCommitExpirationLedgerEntry | Commit.PrepaidCommitCanceledLedgerEntry | Commit.PrepaidCommitCreditedLedgerEntry | Commit.PrepaidCommitSeatBasedAdjustmentLedgerEntry | Commit.PostpaidCommitInitialBalanceLedgerEntry | Commit.PostpaidCommitAutomatedInvoiceDeductionLedgerEntry | Commit.PostpaidCommitRolloverLedgerEntry | Commit.PostpaidCommitTrueupLedgerEntry | Commit.PrepaidCommitManualLedgerEntry | Commit.PostpaidCommitManualLedgerEntry | Commit.PostpaidCommitExpirationLedgerEntry>;
|
|
86
|
+
name?: string;
|
|
87
|
+
/**
|
|
88
|
+
* This field's availability is dependent on your client's configuration.
|
|
89
|
+
*/
|
|
90
|
+
netsuite_sales_order_id?: string;
|
|
91
|
+
/**
|
|
92
|
+
* If multiple credits or commits are applicable, the one with the lower priority
|
|
93
|
+
* will apply first.
|
|
94
|
+
*/
|
|
95
|
+
priority?: number;
|
|
96
|
+
rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
97
|
+
rolled_over_from?: Commit.RolledOverFrom;
|
|
98
|
+
rollover_fraction?: number;
|
|
99
|
+
/**
|
|
100
|
+
* This field's availability is dependent on your client's configuration.
|
|
101
|
+
*/
|
|
102
|
+
salesforce_opportunity_id?: string;
|
|
103
|
+
/**
|
|
104
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
105
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
106
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
107
|
+
*/
|
|
108
|
+
specifiers?: Array<CommitSpecifier>;
|
|
109
|
+
/**
|
|
110
|
+
* Prevents the creation of duplicates. If a request to create a commit or credit
|
|
111
|
+
* is made with a uniqueness key that was previously used to create a commit or
|
|
112
|
+
* credit, a new record will not be created and the request will fail with a 409
|
|
113
|
+
* error.
|
|
114
|
+
*/
|
|
115
|
+
uniqueness_key?: string;
|
|
116
|
+
}
|
|
117
|
+
export declare namespace Commit {
|
|
118
|
+
interface Product {
|
|
119
|
+
id: string;
|
|
120
|
+
name: string;
|
|
121
|
+
}
|
|
122
|
+
interface Contract {
|
|
123
|
+
id: string;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* The contract that this commit will be billed on.
|
|
127
|
+
*/
|
|
128
|
+
interface InvoiceContract {
|
|
129
|
+
id: string;
|
|
130
|
+
}
|
|
131
|
+
interface PrepaidCommitSegmentStartLedgerEntry {
|
|
132
|
+
amount: number;
|
|
133
|
+
segment_id: string;
|
|
134
|
+
timestamp: string;
|
|
135
|
+
type: 'PREPAID_COMMIT_SEGMENT_START';
|
|
136
|
+
}
|
|
137
|
+
interface PrepaidCommitAutomatedInvoiceDeductionLedgerEntry {
|
|
138
|
+
amount: number;
|
|
139
|
+
invoice_id: string;
|
|
140
|
+
segment_id: string;
|
|
141
|
+
timestamp: string;
|
|
142
|
+
type: 'PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
143
|
+
contract_id?: string;
|
|
144
|
+
}
|
|
145
|
+
interface PrepaidCommitRolloverLedgerEntry {
|
|
146
|
+
amount: number;
|
|
147
|
+
new_contract_id: string;
|
|
148
|
+
segment_id: string;
|
|
149
|
+
timestamp: string;
|
|
150
|
+
type: 'PREPAID_COMMIT_ROLLOVER';
|
|
151
|
+
}
|
|
152
|
+
interface PrepaidCommitExpirationLedgerEntry {
|
|
153
|
+
amount: number;
|
|
154
|
+
segment_id: string;
|
|
155
|
+
timestamp: string;
|
|
156
|
+
type: 'PREPAID_COMMIT_EXPIRATION';
|
|
157
|
+
}
|
|
158
|
+
interface PrepaidCommitCanceledLedgerEntry {
|
|
159
|
+
amount: number;
|
|
160
|
+
invoice_id: string;
|
|
161
|
+
segment_id: string;
|
|
162
|
+
timestamp: string;
|
|
163
|
+
type: 'PREPAID_COMMIT_CANCELED';
|
|
164
|
+
contract_id?: string;
|
|
165
|
+
}
|
|
166
|
+
interface PrepaidCommitCreditedLedgerEntry {
|
|
167
|
+
amount: number;
|
|
168
|
+
invoice_id: string;
|
|
169
|
+
segment_id: string;
|
|
170
|
+
timestamp: string;
|
|
171
|
+
type: 'PREPAID_COMMIT_CREDITED';
|
|
172
|
+
contract_id?: string;
|
|
173
|
+
}
|
|
174
|
+
interface PrepaidCommitSeatBasedAdjustmentLedgerEntry {
|
|
175
|
+
amount: number;
|
|
176
|
+
segment_id: string;
|
|
177
|
+
timestamp: string;
|
|
178
|
+
type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT';
|
|
179
|
+
}
|
|
180
|
+
interface PostpaidCommitInitialBalanceLedgerEntry {
|
|
181
|
+
amount: number;
|
|
182
|
+
timestamp: string;
|
|
183
|
+
type: 'POSTPAID_COMMIT_INITIAL_BALANCE';
|
|
184
|
+
}
|
|
185
|
+
interface PostpaidCommitAutomatedInvoiceDeductionLedgerEntry {
|
|
186
|
+
amount: number;
|
|
187
|
+
invoice_id: string;
|
|
188
|
+
segment_id: string;
|
|
189
|
+
timestamp: string;
|
|
190
|
+
type: 'POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
191
|
+
contract_id?: string;
|
|
192
|
+
}
|
|
193
|
+
interface PostpaidCommitRolloverLedgerEntry {
|
|
194
|
+
amount: number;
|
|
195
|
+
new_contract_id: string;
|
|
196
|
+
segment_id: string;
|
|
197
|
+
timestamp: string;
|
|
198
|
+
type: 'POSTPAID_COMMIT_ROLLOVER';
|
|
199
|
+
}
|
|
200
|
+
interface PostpaidCommitTrueupLedgerEntry {
|
|
201
|
+
amount: number;
|
|
202
|
+
invoice_id: string;
|
|
203
|
+
timestamp: string;
|
|
204
|
+
type: 'POSTPAID_COMMIT_TRUEUP';
|
|
205
|
+
contract_id?: string;
|
|
206
|
+
}
|
|
207
|
+
interface PrepaidCommitManualLedgerEntry {
|
|
208
|
+
amount: number;
|
|
209
|
+
reason: string;
|
|
210
|
+
timestamp: string;
|
|
211
|
+
type: 'PREPAID_COMMIT_MANUAL';
|
|
212
|
+
}
|
|
213
|
+
interface PostpaidCommitManualLedgerEntry {
|
|
214
|
+
amount: number;
|
|
215
|
+
reason: string;
|
|
216
|
+
timestamp: string;
|
|
217
|
+
type: 'POSTPAID_COMMIT_MANUAL';
|
|
218
|
+
}
|
|
219
|
+
interface PostpaidCommitExpirationLedgerEntry {
|
|
220
|
+
amount: number;
|
|
221
|
+
timestamp: string;
|
|
222
|
+
type: 'POSTPAID_COMMIT_EXPIRATION';
|
|
223
|
+
}
|
|
224
|
+
interface RolledOverFrom {
|
|
225
|
+
commit_id: string;
|
|
226
|
+
contract_id: string;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
export interface CommitHierarchyConfiguration {
|
|
230
|
+
child_access: CommitHierarchyConfiguration.CommitHierarchyChildAccessAll | CommitHierarchyConfiguration.CommitHierarchyChildAccessNone | CommitHierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
231
|
+
}
|
|
232
|
+
export declare namespace CommitHierarchyConfiguration {
|
|
233
|
+
interface CommitHierarchyChildAccessAll {
|
|
234
|
+
type: 'ALL';
|
|
235
|
+
}
|
|
236
|
+
interface CommitHierarchyChildAccessNone {
|
|
237
|
+
type: 'NONE';
|
|
238
|
+
}
|
|
239
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
240
|
+
contract_ids: Array<string>;
|
|
241
|
+
type: 'CONTRACT_IDS';
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* A distinct rate on the rate card. You can choose to use this rate rather than
|
|
246
|
+
* list rate when consuming a credit or commit.
|
|
247
|
+
*/
|
|
248
|
+
export interface CommitRate {
|
|
249
|
+
rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
|
|
250
|
+
/**
|
|
251
|
+
* Commit rate price. For FLAT rate_type, this must be >=0.
|
|
252
|
+
*/
|
|
253
|
+
price?: number;
|
|
254
|
+
/**
|
|
255
|
+
* Only set for TIERED rate_type.
|
|
256
|
+
*/
|
|
257
|
+
tiers?: Array<Tier>;
|
|
258
|
+
}
|
|
259
|
+
export interface CommitSpecifier {
|
|
260
|
+
presentation_group_values?: {
|
|
261
|
+
[key: string]: string;
|
|
262
|
+
};
|
|
263
|
+
pricing_group_values?: {
|
|
264
|
+
[key: string]: string;
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
268
|
+
*/
|
|
269
|
+
product_id?: string;
|
|
270
|
+
/**
|
|
271
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
272
|
+
* tags.
|
|
273
|
+
*/
|
|
274
|
+
product_tags?: Array<string>;
|
|
275
|
+
}
|
|
276
|
+
export interface CommitSpecifierInput {
|
|
277
|
+
presentation_group_values?: {
|
|
278
|
+
[key: string]: string;
|
|
279
|
+
};
|
|
280
|
+
pricing_group_values?: {
|
|
281
|
+
[key: string]: string;
|
|
282
|
+
};
|
|
283
|
+
/**
|
|
284
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
285
|
+
*/
|
|
286
|
+
product_id?: string;
|
|
287
|
+
/**
|
|
288
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
289
|
+
* tags.
|
|
290
|
+
*/
|
|
291
|
+
product_tags?: Array<string>;
|
|
292
|
+
}
|
|
293
|
+
export interface Contract {
|
|
294
|
+
id: string;
|
|
295
|
+
amendments: Array<Contract.Amendment>;
|
|
296
|
+
current: ContractWithoutAmendments;
|
|
297
|
+
customer_id: string;
|
|
298
|
+
initial: ContractWithoutAmendments;
|
|
299
|
+
/**
|
|
300
|
+
* RFC 3339 timestamp indicating when the contract was archived. If not returned,
|
|
301
|
+
* the contract is not archived.
|
|
302
|
+
*/
|
|
303
|
+
archived_at?: string;
|
|
304
|
+
/**
|
|
305
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
306
|
+
*/
|
|
307
|
+
custom_fields?: {
|
|
308
|
+
[key: string]: string;
|
|
309
|
+
};
|
|
310
|
+
/**
|
|
311
|
+
* The billing provider configuration associated with a contract.
|
|
312
|
+
*/
|
|
313
|
+
customer_billing_provider_configuration?: Contract.CustomerBillingProviderConfiguration;
|
|
314
|
+
prepaid_balance_threshold_configuration?: PrepaidBalanceThresholdConfiguration;
|
|
315
|
+
/**
|
|
316
|
+
* Priority of the contract.
|
|
317
|
+
*/
|
|
318
|
+
priority?: number;
|
|
319
|
+
/**
|
|
320
|
+
* Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
321
|
+
* usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
322
|
+
* `ending_before` date for consolidation to occur. This field cannot be modified
|
|
323
|
+
* after a Contract has been created. If this field is omitted, charges will appear
|
|
324
|
+
* on a separate invoice from usage charges.
|
|
325
|
+
*/
|
|
326
|
+
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
327
|
+
spend_threshold_configuration?: SpendThresholdConfiguration;
|
|
328
|
+
/**
|
|
329
|
+
* List of subscriptions on the contract.
|
|
330
|
+
*/
|
|
331
|
+
subscriptions?: Array<Subscription>;
|
|
332
|
+
/**
|
|
333
|
+
* Prevents the creation of duplicates. If a request to create a record is made
|
|
334
|
+
* with a previously used uniqueness key, a new record will not be created and the
|
|
335
|
+
* request will fail with a 409 error.
|
|
336
|
+
*/
|
|
337
|
+
uniqueness_key?: string;
|
|
338
|
+
}
|
|
339
|
+
export declare namespace Contract {
|
|
340
|
+
interface Amendment {
|
|
341
|
+
id: string;
|
|
342
|
+
commits: Array<Shared.Commit>;
|
|
343
|
+
created_at: string;
|
|
344
|
+
created_by: string;
|
|
345
|
+
overrides: Array<Shared.Override>;
|
|
346
|
+
scheduled_charges: Array<Shared.ScheduledCharge>;
|
|
347
|
+
starting_at: string;
|
|
348
|
+
credits?: Array<Shared.Credit>;
|
|
349
|
+
/**
|
|
350
|
+
* This field's availability is dependent on your client's configuration.
|
|
351
|
+
*/
|
|
352
|
+
discounts?: Array<Shared.Discount>;
|
|
353
|
+
/**
|
|
354
|
+
* This field's availability is dependent on your client's configuration.
|
|
355
|
+
*/
|
|
356
|
+
netsuite_sales_order_id?: string;
|
|
357
|
+
/**
|
|
358
|
+
* This field's availability is dependent on your client's configuration.
|
|
359
|
+
*/
|
|
360
|
+
professional_services?: Array<Shared.ProService>;
|
|
361
|
+
/**
|
|
362
|
+
* This field's availability is dependent on your client's configuration.
|
|
363
|
+
*/
|
|
364
|
+
reseller_royalties?: Array<Amendment.ResellerRoyalty>;
|
|
365
|
+
/**
|
|
366
|
+
* This field's availability is dependent on your client's configuration.
|
|
367
|
+
*/
|
|
368
|
+
salesforce_opportunity_id?: string;
|
|
369
|
+
}
|
|
370
|
+
namespace Amendment {
|
|
371
|
+
interface ResellerRoyalty {
|
|
372
|
+
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
373
|
+
aws_account_number?: string;
|
|
374
|
+
aws_offer_id?: string;
|
|
375
|
+
aws_payer_reference_id?: string;
|
|
376
|
+
ending_before?: string | null;
|
|
377
|
+
fraction?: number;
|
|
378
|
+
gcp_account_id?: string;
|
|
379
|
+
gcp_offer_id?: string;
|
|
380
|
+
netsuite_reseller_id?: string;
|
|
381
|
+
reseller_contract_value?: number;
|
|
382
|
+
starting_at?: string;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* The billing provider configuration associated with a contract.
|
|
387
|
+
*/
|
|
388
|
+
interface CustomerBillingProviderConfiguration {
|
|
389
|
+
archived_at: string | null;
|
|
390
|
+
billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
|
|
391
|
+
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
392
|
+
id?: string;
|
|
393
|
+
/**
|
|
394
|
+
* Configuration for the billing provider. The structure of this object is specific
|
|
395
|
+
* to the billing provider.
|
|
396
|
+
*/
|
|
397
|
+
configuration?: {
|
|
398
|
+
[key: string]: unknown;
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
export interface ContractV2 {
|
|
403
|
+
id: string;
|
|
404
|
+
commits: Array<ContractV2.Commit>;
|
|
405
|
+
created_at: string;
|
|
406
|
+
created_by: string;
|
|
407
|
+
customer_id: string;
|
|
408
|
+
overrides: Array<ContractV2.Override>;
|
|
409
|
+
scheduled_charges: Array<ScheduledCharge>;
|
|
410
|
+
starting_at: string;
|
|
411
|
+
transitions: Array<ContractV2.Transition>;
|
|
412
|
+
usage_filter: Array<ContractV2.UsageFilter>;
|
|
413
|
+
usage_statement_schedule: ContractV2.UsageStatementSchedule;
|
|
414
|
+
archived_at?: string;
|
|
415
|
+
credits?: Array<ContractV2.Credit>;
|
|
416
|
+
/**
|
|
417
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
418
|
+
*/
|
|
419
|
+
custom_fields?: {
|
|
420
|
+
[key: string]: string;
|
|
421
|
+
};
|
|
422
|
+
/**
|
|
423
|
+
* This field's availability is dependent on your client's configuration.
|
|
424
|
+
*/
|
|
425
|
+
customer_billing_provider_configuration?: ContractV2.CustomerBillingProviderConfiguration;
|
|
426
|
+
/**
|
|
427
|
+
* This field's availability is dependent on your client's configuration.
|
|
428
|
+
*/
|
|
429
|
+
discounts?: Array<Discount>;
|
|
430
|
+
ending_before?: string;
|
|
431
|
+
/**
|
|
432
|
+
* Indicates whether there are more items than the limit for this endpoint. Use the
|
|
433
|
+
* respective list endpoints to get the full lists.
|
|
434
|
+
*/
|
|
435
|
+
has_more?: ContractV2.HasMore;
|
|
436
|
+
/**
|
|
437
|
+
* Either a **parent** configuration with a list of children or a **child**
|
|
438
|
+
* configuration with a single parent.
|
|
439
|
+
*/
|
|
440
|
+
hierarchy_configuration?: ContractV2.ParentHierarchyConfiguration | ContractV2.ChildHierarchyConfigurationV2;
|
|
441
|
+
/**
|
|
442
|
+
* Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
|
443
|
+
* prices automatically. EXPLICIT prioritization requires specifying priorities for
|
|
444
|
+
* each multiplier; the one with the lowest priority value will be prioritized
|
|
445
|
+
* first.
|
|
446
|
+
*/
|
|
447
|
+
multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT';
|
|
448
|
+
name?: string;
|
|
449
|
+
net_payment_terms_days?: number;
|
|
450
|
+
/**
|
|
451
|
+
* This field's availability is dependent on your client's configuration.
|
|
452
|
+
*/
|
|
453
|
+
netsuite_sales_order_id?: string;
|
|
454
|
+
prepaid_balance_threshold_configuration?: PrepaidBalanceThresholdConfigurationV2;
|
|
455
|
+
/**
|
|
456
|
+
* Priority of the contract.
|
|
457
|
+
*/
|
|
458
|
+
priority?: number;
|
|
459
|
+
/**
|
|
460
|
+
* This field's availability is dependent on your client's configuration.
|
|
461
|
+
*/
|
|
462
|
+
professional_services?: Array<ProService>;
|
|
463
|
+
rate_card_id?: string;
|
|
464
|
+
recurring_commits?: Array<ContractV2.RecurringCommit>;
|
|
465
|
+
recurring_credits?: Array<ContractV2.RecurringCredit>;
|
|
466
|
+
/**
|
|
467
|
+
* This field's availability is dependent on your client's configuration.
|
|
468
|
+
*/
|
|
469
|
+
reseller_royalties?: Array<ContractV2.ResellerRoyalty>;
|
|
470
|
+
/**
|
|
471
|
+
* This field's availability is dependent on your client's configuration.
|
|
472
|
+
*/
|
|
473
|
+
salesforce_opportunity_id?: string;
|
|
474
|
+
/**
|
|
475
|
+
* Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
476
|
+
* usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
477
|
+
* `ending_before` date for consolidation to occur. This field cannot be modified
|
|
478
|
+
* after a Contract has been created. If this field is omitted, charges will appear
|
|
479
|
+
* on a separate invoice from usage charges.
|
|
480
|
+
*/
|
|
481
|
+
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
482
|
+
spend_threshold_configuration?: SpendThresholdConfigurationV2;
|
|
483
|
+
/**
|
|
484
|
+
* List of subscriptions on the contract.
|
|
485
|
+
*/
|
|
486
|
+
subscriptions?: Array<Subscription>;
|
|
487
|
+
total_contract_value?: number;
|
|
488
|
+
/**
|
|
489
|
+
* Optional uniqueness key to prevent duplicate contract creations.
|
|
490
|
+
*/
|
|
491
|
+
uniqueness_key?: string;
|
|
492
|
+
}
|
|
493
|
+
export declare namespace ContractV2 {
|
|
494
|
+
interface Commit {
|
|
495
|
+
id: string;
|
|
496
|
+
/**
|
|
497
|
+
* Timestamp of when the commit was created.
|
|
498
|
+
*
|
|
499
|
+
* - Recurring commits: latter of commit service period date and parent commit
|
|
500
|
+
* start date
|
|
501
|
+
* - Rollover commits: when the new contract started
|
|
502
|
+
*/
|
|
503
|
+
created_at: string;
|
|
504
|
+
product: Commit.Product;
|
|
505
|
+
type: 'PREPAID' | 'POSTPAID';
|
|
506
|
+
/**
|
|
507
|
+
* The schedule that the customer will gain access to the credits purposed with
|
|
508
|
+
* this commit.
|
|
509
|
+
*/
|
|
510
|
+
access_schedule?: Shared.ScheduleDuration;
|
|
511
|
+
applicable_contract_ids?: Array<string>;
|
|
512
|
+
applicable_product_ids?: Array<string>;
|
|
513
|
+
applicable_product_tags?: Array<string>;
|
|
514
|
+
archived_at?: string;
|
|
515
|
+
/**
|
|
516
|
+
* The current balance of the credit or commit. This balance reflects the amount of
|
|
517
|
+
* credit or commit that the customer has access to use at this moment - thus,
|
|
518
|
+
* expired and upcoming credit or commit segments contribute 0 to the balance. The
|
|
519
|
+
* balance will match the sum of all ledger entries with the exception of the case
|
|
520
|
+
* where the sum of negative manual ledger entries exceeds the positive amount
|
|
521
|
+
* remaining on the credit or commit - in that case, the balance will be 0. All
|
|
522
|
+
* manual ledger entries associated with active credit or commit segments are
|
|
523
|
+
* included in the balance, including future-dated manual ledger entries.
|
|
524
|
+
*/
|
|
525
|
+
balance?: number;
|
|
526
|
+
contract?: Commit.Contract;
|
|
527
|
+
/**
|
|
528
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
529
|
+
*/
|
|
530
|
+
custom_fields?: {
|
|
531
|
+
[key: string]: string;
|
|
532
|
+
};
|
|
533
|
+
description?: string;
|
|
534
|
+
/**
|
|
535
|
+
* Optional configuration for commit hierarchy access control
|
|
536
|
+
*/
|
|
537
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
538
|
+
/**
|
|
539
|
+
* The contract that this commit will be billed on.
|
|
540
|
+
*/
|
|
541
|
+
invoice_contract?: Commit.InvoiceContract;
|
|
542
|
+
/**
|
|
543
|
+
* The schedule that the customer will be invoiced for this commit.
|
|
544
|
+
*/
|
|
545
|
+
invoice_schedule?: Shared.SchedulePointInTime;
|
|
546
|
+
/**
|
|
547
|
+
* A list of ordered events that impact the balance of a commit. For example, an
|
|
548
|
+
* invoice deduction or a rollover.
|
|
549
|
+
*/
|
|
550
|
+
ledger?: Array<Commit.PrepaidCommitSegmentStartLedgerEntry | Commit.PrepaidCommitAutomatedInvoiceDeductionLedgerEntry | Commit.PrepaidCommitRolloverLedgerEntry | Commit.PrepaidCommitExpirationLedgerEntry | Commit.PrepaidCommitCanceledLedgerEntry | Commit.PrepaidCommitCreditedLedgerEntry | Commit.PrepaidCommitSeatBasedAdjustmentLedgerEntry | Commit.PostpaidCommitInitialBalanceLedgerEntry | Commit.PostpaidCommitAutomatedInvoiceDeductionLedgerEntry | Commit.PostpaidCommitRolloverLedgerEntry | Commit.PostpaidCommitTrueupLedgerEntry | Commit.PrepaidCommitManualLedgerEntry | Commit.PostpaidCommitManualLedgerEntry | Commit.PostpaidCommitExpirationLedgerEntry>;
|
|
551
|
+
name?: string;
|
|
552
|
+
/**
|
|
553
|
+
* This field's availability is dependent on your client's configuration.
|
|
554
|
+
*/
|
|
555
|
+
netsuite_sales_order_id?: string;
|
|
556
|
+
/**
|
|
557
|
+
* If multiple credits or commits are applicable, the one with the lower priority
|
|
558
|
+
* will apply first.
|
|
559
|
+
*/
|
|
560
|
+
priority?: number;
|
|
561
|
+
rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
562
|
+
rolled_over_from?: Commit.RolledOverFrom;
|
|
563
|
+
rollover_fraction?: number;
|
|
564
|
+
/**
|
|
565
|
+
* This field's availability is dependent on your client's configuration.
|
|
566
|
+
*/
|
|
567
|
+
salesforce_opportunity_id?: string;
|
|
568
|
+
/**
|
|
569
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
570
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
571
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
572
|
+
*/
|
|
573
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
574
|
+
}
|
|
575
|
+
namespace Commit {
|
|
576
|
+
interface Product {
|
|
577
|
+
id: string;
|
|
578
|
+
name: string;
|
|
579
|
+
}
|
|
580
|
+
interface Contract {
|
|
581
|
+
id: string;
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* The contract that this commit will be billed on.
|
|
585
|
+
*/
|
|
586
|
+
interface InvoiceContract {
|
|
587
|
+
id: string;
|
|
588
|
+
}
|
|
589
|
+
interface PrepaidCommitSegmentStartLedgerEntry {
|
|
590
|
+
amount: number;
|
|
591
|
+
segment_id: string;
|
|
592
|
+
timestamp: string;
|
|
593
|
+
type: 'PREPAID_COMMIT_SEGMENT_START';
|
|
594
|
+
}
|
|
595
|
+
interface PrepaidCommitAutomatedInvoiceDeductionLedgerEntry {
|
|
596
|
+
amount: number;
|
|
597
|
+
invoice_id: string;
|
|
598
|
+
segment_id: string;
|
|
599
|
+
timestamp: string;
|
|
600
|
+
type: 'PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
601
|
+
contract_id?: string;
|
|
602
|
+
}
|
|
603
|
+
interface PrepaidCommitRolloverLedgerEntry {
|
|
604
|
+
amount: number;
|
|
605
|
+
new_contract_id: string;
|
|
606
|
+
segment_id: string;
|
|
607
|
+
timestamp: string;
|
|
608
|
+
type: 'PREPAID_COMMIT_ROLLOVER';
|
|
609
|
+
}
|
|
610
|
+
interface PrepaidCommitExpirationLedgerEntry {
|
|
611
|
+
amount: number;
|
|
612
|
+
segment_id: string;
|
|
613
|
+
timestamp: string;
|
|
614
|
+
type: 'PREPAID_COMMIT_EXPIRATION';
|
|
615
|
+
}
|
|
616
|
+
interface PrepaidCommitCanceledLedgerEntry {
|
|
617
|
+
amount: number;
|
|
618
|
+
invoice_id: string;
|
|
619
|
+
segment_id: string;
|
|
620
|
+
timestamp: string;
|
|
621
|
+
type: 'PREPAID_COMMIT_CANCELED';
|
|
622
|
+
contract_id?: string;
|
|
623
|
+
}
|
|
624
|
+
interface PrepaidCommitCreditedLedgerEntry {
|
|
625
|
+
amount: number;
|
|
626
|
+
invoice_id: string;
|
|
627
|
+
segment_id: string;
|
|
628
|
+
timestamp: string;
|
|
629
|
+
type: 'PREPAID_COMMIT_CREDITED';
|
|
630
|
+
contract_id?: string;
|
|
631
|
+
}
|
|
632
|
+
interface PrepaidCommitSeatBasedAdjustmentLedgerEntry {
|
|
633
|
+
amount: number;
|
|
634
|
+
segment_id: string;
|
|
635
|
+
timestamp: string;
|
|
636
|
+
type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT';
|
|
637
|
+
}
|
|
638
|
+
interface PostpaidCommitInitialBalanceLedgerEntry {
|
|
639
|
+
amount: number;
|
|
640
|
+
timestamp: string;
|
|
641
|
+
type: 'POSTPAID_COMMIT_INITIAL_BALANCE';
|
|
642
|
+
}
|
|
643
|
+
interface PostpaidCommitAutomatedInvoiceDeductionLedgerEntry {
|
|
644
|
+
amount: number;
|
|
645
|
+
invoice_id: string;
|
|
646
|
+
segment_id: string;
|
|
647
|
+
timestamp: string;
|
|
648
|
+
type: 'POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
649
|
+
contract_id?: string;
|
|
650
|
+
}
|
|
651
|
+
interface PostpaidCommitRolloverLedgerEntry {
|
|
652
|
+
amount: number;
|
|
653
|
+
new_contract_id: string;
|
|
654
|
+
segment_id: string;
|
|
655
|
+
timestamp: string;
|
|
656
|
+
type: 'POSTPAID_COMMIT_ROLLOVER';
|
|
657
|
+
}
|
|
658
|
+
interface PostpaidCommitTrueupLedgerEntry {
|
|
659
|
+
amount: number;
|
|
660
|
+
invoice_id: string;
|
|
661
|
+
timestamp: string;
|
|
662
|
+
type: 'POSTPAID_COMMIT_TRUEUP';
|
|
663
|
+
contract_id?: string;
|
|
664
|
+
}
|
|
665
|
+
interface PrepaidCommitManualLedgerEntry {
|
|
666
|
+
amount: number;
|
|
667
|
+
reason: string;
|
|
668
|
+
timestamp: string;
|
|
669
|
+
type: 'PREPAID_COMMIT_MANUAL';
|
|
670
|
+
}
|
|
671
|
+
interface PostpaidCommitManualLedgerEntry {
|
|
672
|
+
amount: number;
|
|
673
|
+
reason: string;
|
|
674
|
+
timestamp: string;
|
|
675
|
+
type: 'POSTPAID_COMMIT_MANUAL';
|
|
676
|
+
}
|
|
677
|
+
interface PostpaidCommitExpirationLedgerEntry {
|
|
678
|
+
amount: number;
|
|
679
|
+
timestamp: string;
|
|
680
|
+
type: 'POSTPAID_COMMIT_EXPIRATION';
|
|
681
|
+
}
|
|
682
|
+
interface RolledOverFrom {
|
|
683
|
+
commit_id: string;
|
|
684
|
+
contract_id: string;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
interface Override {
|
|
688
|
+
id: string;
|
|
689
|
+
starting_at: string;
|
|
690
|
+
applicable_product_tags?: Array<string>;
|
|
691
|
+
ending_before?: string;
|
|
692
|
+
entitled?: boolean;
|
|
693
|
+
is_commit_specific?: boolean;
|
|
694
|
+
multiplier?: number;
|
|
695
|
+
override_specifiers?: Array<Override.OverrideSpecifier>;
|
|
696
|
+
override_tiers?: Array<Shared.OverrideTier>;
|
|
697
|
+
overwrite_rate?: Override.OverwriteRate;
|
|
698
|
+
priority?: number;
|
|
699
|
+
product?: Override.Product;
|
|
700
|
+
target?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
701
|
+
type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED';
|
|
702
|
+
}
|
|
703
|
+
namespace Override {
|
|
704
|
+
interface OverrideSpecifier {
|
|
705
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
706
|
+
commit_ids?: Array<string>;
|
|
707
|
+
presentation_group_values?: {
|
|
708
|
+
[key: string]: string | null;
|
|
709
|
+
};
|
|
710
|
+
pricing_group_values?: {
|
|
711
|
+
[key: string]: string;
|
|
712
|
+
};
|
|
713
|
+
product_id?: string;
|
|
714
|
+
product_tags?: Array<string>;
|
|
715
|
+
recurring_commit_ids?: Array<string>;
|
|
716
|
+
recurring_credit_ids?: Array<string>;
|
|
717
|
+
}
|
|
718
|
+
interface OverwriteRate {
|
|
719
|
+
rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
|
|
720
|
+
credit_type?: Shared.CreditTypeData;
|
|
721
|
+
/**
|
|
722
|
+
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
723
|
+
* processors.
|
|
724
|
+
*/
|
|
725
|
+
custom_rate?: {
|
|
726
|
+
[key: string]: unknown;
|
|
727
|
+
};
|
|
728
|
+
/**
|
|
729
|
+
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
730
|
+
* set to true.
|
|
731
|
+
*/
|
|
732
|
+
is_prorated?: boolean;
|
|
733
|
+
/**
|
|
734
|
+
* Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
|
|
735
|
+
* this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
|
|
736
|
+
*/
|
|
737
|
+
price?: number;
|
|
738
|
+
/**
|
|
739
|
+
* Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
|
|
740
|
+
*/
|
|
741
|
+
quantity?: number;
|
|
742
|
+
/**
|
|
743
|
+
* Only set for TIERED rate_type.
|
|
744
|
+
*/
|
|
745
|
+
tiers?: Array<Shared.Tier>;
|
|
746
|
+
}
|
|
747
|
+
interface Product {
|
|
748
|
+
id: string;
|
|
749
|
+
name: string;
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
interface Transition {
|
|
753
|
+
from_contract_id: string;
|
|
754
|
+
to_contract_id: string;
|
|
755
|
+
type: 'SUPERSEDE' | 'RENEWAL';
|
|
756
|
+
}
|
|
757
|
+
interface UsageFilter {
|
|
758
|
+
group_key: string;
|
|
759
|
+
group_values: Array<string>;
|
|
760
|
+
/**
|
|
761
|
+
* This will match contract starting_at value if usage filter is active from the
|
|
762
|
+
* beginning of the contract.
|
|
763
|
+
*/
|
|
764
|
+
starting_at: string;
|
|
765
|
+
/**
|
|
766
|
+
* This will match contract ending_before value if usage filter is active until the
|
|
767
|
+
* end of the contract. It will be undefined if the contract is open-ended.
|
|
768
|
+
*/
|
|
769
|
+
ending_before?: string;
|
|
770
|
+
}
|
|
771
|
+
interface UsageStatementSchedule {
|
|
772
|
+
/**
|
|
773
|
+
* Contract usage statements follow a selected cadence based on this date.
|
|
774
|
+
*/
|
|
775
|
+
billing_anchor_date: string;
|
|
776
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
777
|
+
}
|
|
778
|
+
interface Credit {
|
|
779
|
+
id: string;
|
|
780
|
+
product: Credit.Product;
|
|
781
|
+
type: 'CREDIT';
|
|
782
|
+
/**
|
|
783
|
+
* The schedule that the customer will gain access to the credits.
|
|
784
|
+
*/
|
|
785
|
+
access_schedule?: Shared.ScheduleDuration;
|
|
786
|
+
applicable_contract_ids?: Array<string>;
|
|
787
|
+
applicable_product_ids?: Array<string>;
|
|
788
|
+
applicable_product_tags?: Array<string>;
|
|
789
|
+
/**
|
|
790
|
+
* The current balance of the credit or commit. This balance reflects the amount of
|
|
791
|
+
* credit or commit that the customer has access to use at this moment - thus,
|
|
792
|
+
* expired and upcoming credit or commit segments contribute 0 to the balance. The
|
|
793
|
+
* balance will match the sum of all ledger entries with the exception of the case
|
|
794
|
+
* where the sum of negative manual ledger entries exceeds the positive amount
|
|
795
|
+
* remaining on the credit or commit - in that case, the balance will be 0. All
|
|
796
|
+
* manual ledger entries associated with active credit or commit segments are
|
|
797
|
+
* included in the balance, including future-dated manual ledger entries.
|
|
798
|
+
*/
|
|
799
|
+
balance?: number;
|
|
800
|
+
contract?: Credit.Contract;
|
|
801
|
+
/**
|
|
802
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
803
|
+
*/
|
|
804
|
+
custom_fields?: {
|
|
805
|
+
[key: string]: string;
|
|
806
|
+
};
|
|
807
|
+
description?: string;
|
|
808
|
+
/**
|
|
809
|
+
* Optional configuration for credit hierarchy access control
|
|
810
|
+
*/
|
|
811
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
812
|
+
/**
|
|
813
|
+
* A list of ordered events that impact the balance of a credit. For example, an
|
|
814
|
+
* invoice deduction or an expiration.
|
|
815
|
+
*/
|
|
816
|
+
ledger?: Array<Credit.CreditSegmentStartLedgerEntry | Credit.CreditAutomatedInvoiceDeductionLedgerEntry | Credit.CreditExpirationLedgerEntry | Credit.CreditCanceledLedgerEntry | Credit.CreditCreditedLedgerEntry | Credit.CreditManualLedgerEntry | Credit.CreditSeatBasedAdjustmentLedgerEntry>;
|
|
817
|
+
name?: string;
|
|
818
|
+
/**
|
|
819
|
+
* This field's availability is dependent on your client's configuration.
|
|
820
|
+
*/
|
|
821
|
+
netsuite_sales_order_id?: string;
|
|
822
|
+
/**
|
|
823
|
+
* If multiple credits or commits are applicable, the one with the lower priority
|
|
824
|
+
* will apply first.
|
|
825
|
+
*/
|
|
826
|
+
priority?: number;
|
|
827
|
+
/**
|
|
828
|
+
* This field's availability is dependent on your client's configuration.
|
|
829
|
+
*/
|
|
830
|
+
salesforce_opportunity_id?: string;
|
|
831
|
+
/**
|
|
832
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
833
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
834
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
835
|
+
*/
|
|
836
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
837
|
+
}
|
|
838
|
+
namespace Credit {
|
|
839
|
+
interface Product {
|
|
840
|
+
id: string;
|
|
841
|
+
name: string;
|
|
842
|
+
}
|
|
843
|
+
interface Contract {
|
|
844
|
+
id: string;
|
|
845
|
+
}
|
|
846
|
+
interface CreditSegmentStartLedgerEntry {
|
|
847
|
+
amount: number;
|
|
848
|
+
segment_id: string;
|
|
849
|
+
timestamp: string;
|
|
850
|
+
type: 'CREDIT_SEGMENT_START';
|
|
851
|
+
}
|
|
852
|
+
interface CreditAutomatedInvoiceDeductionLedgerEntry {
|
|
853
|
+
amount: number;
|
|
854
|
+
invoice_id: string;
|
|
855
|
+
segment_id: string;
|
|
856
|
+
timestamp: string;
|
|
857
|
+
type: 'CREDIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
858
|
+
contract_id?: string;
|
|
859
|
+
}
|
|
860
|
+
interface CreditExpirationLedgerEntry {
|
|
861
|
+
amount: number;
|
|
862
|
+
segment_id: string;
|
|
863
|
+
timestamp: string;
|
|
864
|
+
type: 'CREDIT_EXPIRATION';
|
|
865
|
+
}
|
|
866
|
+
interface CreditCanceledLedgerEntry {
|
|
867
|
+
amount: number;
|
|
868
|
+
invoice_id: string;
|
|
869
|
+
segment_id: string;
|
|
870
|
+
timestamp: string;
|
|
871
|
+
type: 'CREDIT_CANCELED';
|
|
872
|
+
contract_id?: string;
|
|
873
|
+
}
|
|
874
|
+
interface CreditCreditedLedgerEntry {
|
|
875
|
+
amount: number;
|
|
876
|
+
invoice_id: string;
|
|
877
|
+
segment_id: string;
|
|
878
|
+
timestamp: string;
|
|
879
|
+
type: 'CREDIT_CREDITED';
|
|
880
|
+
contract_id?: string;
|
|
881
|
+
}
|
|
882
|
+
interface CreditManualLedgerEntry {
|
|
883
|
+
amount: number;
|
|
884
|
+
reason: string;
|
|
885
|
+
timestamp: string;
|
|
886
|
+
type: 'CREDIT_MANUAL';
|
|
887
|
+
}
|
|
888
|
+
interface CreditSeatBasedAdjustmentLedgerEntry {
|
|
889
|
+
amount: number;
|
|
890
|
+
segment_id: string;
|
|
891
|
+
timestamp: string;
|
|
892
|
+
type: 'CREDIT_SEAT_BASED_ADJUSTMENT';
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
/**
|
|
896
|
+
* This field's availability is dependent on your client's configuration.
|
|
897
|
+
*/
|
|
898
|
+
interface CustomerBillingProviderConfiguration {
|
|
899
|
+
/**
|
|
900
|
+
* ID of Customer's billing provider configuration.
|
|
901
|
+
*/
|
|
902
|
+
id: string;
|
|
903
|
+
billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
|
|
904
|
+
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
* Indicates whether there are more items than the limit for this endpoint. Use the
|
|
908
|
+
* respective list endpoints to get the full lists.
|
|
909
|
+
*/
|
|
910
|
+
interface HasMore {
|
|
911
|
+
/**
|
|
912
|
+
* Whether there are more commits on this contract than the limit for this
|
|
913
|
+
* endpoint. Use the /contracts/customerCommits/list endpoint to get the full list
|
|
914
|
+
* of commits.
|
|
915
|
+
*/
|
|
916
|
+
commits: boolean;
|
|
917
|
+
/**
|
|
918
|
+
* Whether there are more credits on this contract than the limit for this
|
|
919
|
+
* endpoint. Use the /contracts/customerCredits/list endpoint to get the full list
|
|
920
|
+
* of credits.
|
|
921
|
+
*/
|
|
922
|
+
credits: boolean;
|
|
923
|
+
}
|
|
924
|
+
interface ParentHierarchyConfiguration {
|
|
925
|
+
/**
|
|
926
|
+
* List of contracts that belong to this parent.
|
|
927
|
+
*/
|
|
928
|
+
children: Array<ParentHierarchyConfiguration.Child>;
|
|
929
|
+
parent_behavior?: ParentHierarchyConfiguration.ParentBehavior;
|
|
930
|
+
}
|
|
931
|
+
namespace ParentHierarchyConfiguration {
|
|
932
|
+
interface Child {
|
|
933
|
+
contract_id: string;
|
|
934
|
+
customer_id: string;
|
|
935
|
+
}
|
|
936
|
+
interface ParentBehavior {
|
|
937
|
+
/**
|
|
938
|
+
* Indicates the desired behavior of consolidated invoices generated by the parent
|
|
939
|
+
* in a customer hierarchy **CONCATENATE**: Statements on the invoices of child
|
|
940
|
+
* customers will be appended to the consolidated invoice **NONE**: Do not generate
|
|
941
|
+
* consolidated invoices
|
|
942
|
+
*/
|
|
943
|
+
invoice_consolidation_type?: 'CONCATENATE' | 'NONE';
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
interface ChildHierarchyConfigurationV2 {
|
|
947
|
+
/**
|
|
948
|
+
* The single parent contract/customer for this child.
|
|
949
|
+
*/
|
|
950
|
+
parent: ChildHierarchyConfigurationV2.Parent;
|
|
951
|
+
/**
|
|
952
|
+
* Indicates whether the child or parent should pay for the child's invoice charges
|
|
953
|
+
*/
|
|
954
|
+
payer?: 'SELF' | 'PARENT';
|
|
955
|
+
/**
|
|
956
|
+
* Indicates the behavior of the child's invoice statements on the parent's
|
|
957
|
+
* invoices **CONSOLIDATE**: Child's invoice statements will be added to parent's
|
|
958
|
+
* consolidated invoices **SEPARATE**: Child's invoice statements will appear not
|
|
959
|
+
* appear on parent's consolidated invoices
|
|
960
|
+
*/
|
|
961
|
+
usage_statement_behavior?: 'CONSOLIDATE' | 'SEPARATE';
|
|
962
|
+
}
|
|
963
|
+
namespace ChildHierarchyConfigurationV2 {
|
|
964
|
+
/**
|
|
965
|
+
* The single parent contract/customer for this child.
|
|
966
|
+
*/
|
|
967
|
+
interface Parent {
|
|
968
|
+
contract_id: string;
|
|
969
|
+
customer_id: string;
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
interface RecurringCommit {
|
|
973
|
+
id: string;
|
|
974
|
+
/**
|
|
975
|
+
* The amount of commit to grant.
|
|
976
|
+
*/
|
|
977
|
+
access_amount: RecurringCommit.AccessAmount;
|
|
978
|
+
/**
|
|
979
|
+
* The amount of time the created commits will be valid for
|
|
980
|
+
*/
|
|
981
|
+
commit_duration: RecurringCommit.CommitDuration;
|
|
982
|
+
/**
|
|
983
|
+
* Will be passed down to the individual commits
|
|
984
|
+
*/
|
|
985
|
+
priority: number;
|
|
986
|
+
product: RecurringCommit.Product;
|
|
987
|
+
/**
|
|
988
|
+
* Whether the created commits will use the commit rate or list rate
|
|
989
|
+
*/
|
|
990
|
+
rate_type: 'COMMIT_RATE' | 'LIST_RATE';
|
|
991
|
+
/**
|
|
992
|
+
* Determines the start time for the first commit
|
|
993
|
+
*/
|
|
994
|
+
starting_at: string;
|
|
995
|
+
/**
|
|
996
|
+
* Will be passed down to the individual commits
|
|
997
|
+
*/
|
|
998
|
+
applicable_product_ids?: Array<string>;
|
|
999
|
+
/**
|
|
1000
|
+
* Will be passed down to the individual commits
|
|
1001
|
+
*/
|
|
1002
|
+
applicable_product_tags?: Array<string>;
|
|
1003
|
+
contract?: RecurringCommit.Contract;
|
|
1004
|
+
/**
|
|
1005
|
+
* Will be passed down to the individual commits
|
|
1006
|
+
*/
|
|
1007
|
+
description?: string;
|
|
1008
|
+
/**
|
|
1009
|
+
* Determines when the contract will stop creating recurring commits. Optional
|
|
1010
|
+
*/
|
|
1011
|
+
ending_before?: string;
|
|
1012
|
+
/**
|
|
1013
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
1014
|
+
*/
|
|
1015
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
1016
|
+
/**
|
|
1017
|
+
* The amount the customer should be billed for the commit. Not required.
|
|
1018
|
+
*/
|
|
1019
|
+
invoice_amount?: RecurringCommit.InvoiceAmount;
|
|
1020
|
+
/**
|
|
1021
|
+
* Displayed on invoices. Will be passed through to the individual commits
|
|
1022
|
+
*/
|
|
1023
|
+
name?: string;
|
|
1024
|
+
/**
|
|
1025
|
+
* Will be passed down to the individual commits
|
|
1026
|
+
*/
|
|
1027
|
+
netsuite_sales_order_id?: string;
|
|
1028
|
+
/**
|
|
1029
|
+
* Determines whether the first and last commit will be prorated. If not provided,
|
|
1030
|
+
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1031
|
+
*/
|
|
1032
|
+
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1033
|
+
/**
|
|
1034
|
+
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1035
|
+
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1036
|
+
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1037
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1038
|
+
* invoice dates.
|
|
1039
|
+
*/
|
|
1040
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1041
|
+
/**
|
|
1042
|
+
* Will be passed down to the individual commits. This controls how much of an
|
|
1043
|
+
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1044
|
+
* between 0 and 1.
|
|
1045
|
+
*/
|
|
1046
|
+
rollover_fraction?: number;
|
|
1047
|
+
/**
|
|
1048
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1049
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1050
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1051
|
+
*/
|
|
1052
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
1053
|
+
/**
|
|
1054
|
+
* Attach a subscription to the recurring commit/credit.
|
|
1055
|
+
*/
|
|
1056
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
1057
|
+
}
|
|
1058
|
+
namespace RecurringCommit {
|
|
1059
|
+
/**
|
|
1060
|
+
* The amount of commit to grant.
|
|
1061
|
+
*/
|
|
1062
|
+
interface AccessAmount {
|
|
1063
|
+
credit_type_id: string;
|
|
1064
|
+
unit_price: number;
|
|
1065
|
+
quantity?: number;
|
|
1066
|
+
}
|
|
1067
|
+
/**
|
|
1068
|
+
* The amount of time the created commits will be valid for
|
|
1069
|
+
*/
|
|
1070
|
+
interface CommitDuration {
|
|
1071
|
+
value: number;
|
|
1072
|
+
unit?: 'PERIODS';
|
|
1073
|
+
}
|
|
1074
|
+
interface Product {
|
|
1075
|
+
id: string;
|
|
1076
|
+
name: string;
|
|
1077
|
+
}
|
|
1078
|
+
interface Contract {
|
|
1079
|
+
id: string;
|
|
1080
|
+
}
|
|
1081
|
+
/**
|
|
1082
|
+
* The amount the customer should be billed for the commit. Not required.
|
|
1083
|
+
*/
|
|
1084
|
+
interface InvoiceAmount {
|
|
1085
|
+
credit_type_id: string;
|
|
1086
|
+
quantity: number;
|
|
1087
|
+
unit_price: number;
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
interface RecurringCredit {
|
|
1091
|
+
id: string;
|
|
1092
|
+
/**
|
|
1093
|
+
* The amount of commit to grant.
|
|
1094
|
+
*/
|
|
1095
|
+
access_amount: RecurringCredit.AccessAmount;
|
|
1096
|
+
/**
|
|
1097
|
+
* The amount of time the created commits will be valid for
|
|
1098
|
+
*/
|
|
1099
|
+
commit_duration: RecurringCredit.CommitDuration;
|
|
1100
|
+
/**
|
|
1101
|
+
* Will be passed down to the individual commits
|
|
1102
|
+
*/
|
|
1103
|
+
priority: number;
|
|
1104
|
+
product: RecurringCredit.Product;
|
|
1105
|
+
/**
|
|
1106
|
+
* Whether the created commits will use the commit rate or list rate
|
|
1107
|
+
*/
|
|
1108
|
+
rate_type: 'COMMIT_RATE' | 'LIST_RATE';
|
|
1109
|
+
/**
|
|
1110
|
+
* Determines the start time for the first commit
|
|
1111
|
+
*/
|
|
1112
|
+
starting_at: string;
|
|
1113
|
+
/**
|
|
1114
|
+
* Will be passed down to the individual commits
|
|
1115
|
+
*/
|
|
1116
|
+
applicable_product_ids?: Array<string>;
|
|
1117
|
+
/**
|
|
1118
|
+
* Will be passed down to the individual commits
|
|
1119
|
+
*/
|
|
1120
|
+
applicable_product_tags?: Array<string>;
|
|
1121
|
+
contract?: RecurringCredit.Contract;
|
|
1122
|
+
/**
|
|
1123
|
+
* Will be passed down to the individual commits
|
|
1124
|
+
*/
|
|
1125
|
+
description?: string;
|
|
1126
|
+
/**
|
|
1127
|
+
* Determines when the contract will stop creating recurring commits. Optional
|
|
1128
|
+
*/
|
|
1129
|
+
ending_before?: string;
|
|
1130
|
+
/**
|
|
1131
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
1132
|
+
*/
|
|
1133
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
1134
|
+
/**
|
|
1135
|
+
* Displayed on invoices. Will be passed through to the individual commits
|
|
1136
|
+
*/
|
|
1137
|
+
name?: string;
|
|
1138
|
+
/**
|
|
1139
|
+
* Will be passed down to the individual commits
|
|
1140
|
+
*/
|
|
1141
|
+
netsuite_sales_order_id?: string;
|
|
1142
|
+
/**
|
|
1143
|
+
* Determines whether the first and last commit will be prorated. If not provided,
|
|
1144
|
+
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1145
|
+
*/
|
|
1146
|
+
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1147
|
+
/**
|
|
1148
|
+
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1149
|
+
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1150
|
+
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1151
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1152
|
+
* invoice dates.
|
|
1153
|
+
*/
|
|
1154
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1155
|
+
/**
|
|
1156
|
+
* Will be passed down to the individual commits. This controls how much of an
|
|
1157
|
+
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1158
|
+
* between 0 and 1.
|
|
1159
|
+
*/
|
|
1160
|
+
rollover_fraction?: number;
|
|
1161
|
+
/**
|
|
1162
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1163
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1164
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1165
|
+
*/
|
|
1166
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
1167
|
+
/**
|
|
1168
|
+
* Attach a subscription to the recurring commit/credit.
|
|
1169
|
+
*/
|
|
1170
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
1171
|
+
}
|
|
1172
|
+
namespace RecurringCredit {
|
|
1173
|
+
/**
|
|
1174
|
+
* The amount of commit to grant.
|
|
1175
|
+
*/
|
|
1176
|
+
interface AccessAmount {
|
|
1177
|
+
credit_type_id: string;
|
|
1178
|
+
unit_price: number;
|
|
1179
|
+
quantity?: number;
|
|
1180
|
+
}
|
|
1181
|
+
/**
|
|
1182
|
+
* The amount of time the created commits will be valid for
|
|
1183
|
+
*/
|
|
1184
|
+
interface CommitDuration {
|
|
1185
|
+
value: number;
|
|
1186
|
+
unit?: 'PERIODS';
|
|
1187
|
+
}
|
|
1188
|
+
interface Product {
|
|
1189
|
+
id: string;
|
|
1190
|
+
name: string;
|
|
1191
|
+
}
|
|
1192
|
+
interface Contract {
|
|
1193
|
+
id: string;
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
interface ResellerRoyalty {
|
|
1197
|
+
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
1198
|
+
segments: Array<ResellerRoyalty.Segment>;
|
|
1199
|
+
}
|
|
1200
|
+
namespace ResellerRoyalty {
|
|
1201
|
+
interface Segment {
|
|
1202
|
+
fraction: number;
|
|
1203
|
+
netsuite_reseller_id: string;
|
|
1204
|
+
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
1205
|
+
starting_at: string;
|
|
1206
|
+
applicable_product_ids?: Array<string>;
|
|
1207
|
+
applicable_product_tags?: Array<string>;
|
|
1208
|
+
aws_account_number?: string;
|
|
1209
|
+
aws_offer_id?: string;
|
|
1210
|
+
aws_payer_reference_id?: string;
|
|
1211
|
+
ending_before?: string;
|
|
1212
|
+
gcp_account_id?: string;
|
|
1213
|
+
gcp_offer_id?: string;
|
|
1214
|
+
reseller_contract_value?: number;
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
export interface ContractWithoutAmendments {
|
|
1219
|
+
commits: Array<Commit>;
|
|
1220
|
+
created_at: string;
|
|
1221
|
+
created_by: string;
|
|
1222
|
+
overrides: Array<Override>;
|
|
1223
|
+
scheduled_charges: Array<ScheduledCharge>;
|
|
1224
|
+
starting_at: string;
|
|
1225
|
+
transitions: Array<ContractWithoutAmendments.Transition>;
|
|
1226
|
+
usage_statement_schedule: ContractWithoutAmendments.UsageStatementSchedule;
|
|
1227
|
+
credits?: Array<Credit>;
|
|
1228
|
+
/**
|
|
1229
|
+
* This field's availability is dependent on your client's
|
|
1230
|
+
*/
|
|
1231
|
+
discounts?: Array<Discount>;
|
|
1232
|
+
ending_before?: string;
|
|
1233
|
+
/**
|
|
1234
|
+
* Either a **parent** configuration with a list of children or a **child**
|
|
1235
|
+
* configuration with a single parent.
|
|
1236
|
+
*/
|
|
1237
|
+
hierarchy_configuration?: HierarchyConfiguration;
|
|
1238
|
+
name?: string;
|
|
1239
|
+
net_payment_terms_days?: number;
|
|
1240
|
+
/**
|
|
1241
|
+
* This field's availability is dependent on your client's configuration.
|
|
1242
|
+
*/
|
|
1243
|
+
netsuite_sales_order_id?: string;
|
|
1244
|
+
prepaid_balance_threshold_configuration?: PrepaidBalanceThresholdConfiguration;
|
|
1245
|
+
/**
|
|
1246
|
+
* This field's availability is dependent on your client's configuration.
|
|
1247
|
+
*/
|
|
1248
|
+
professional_services?: Array<ProService>;
|
|
1249
|
+
rate_card_id?: string;
|
|
1250
|
+
recurring_commits?: Array<ContractWithoutAmendments.RecurringCommit>;
|
|
1251
|
+
recurring_credits?: Array<ContractWithoutAmendments.RecurringCredit>;
|
|
1252
|
+
/**
|
|
1253
|
+
* This field's availability is dependent on your client's configuration.
|
|
1254
|
+
*/
|
|
1255
|
+
reseller_royalties?: Array<ContractWithoutAmendments.ResellerRoyalty>;
|
|
1256
|
+
/**
|
|
1257
|
+
* This field's availability is dependent on your client's configuration.
|
|
1258
|
+
*/
|
|
1259
|
+
salesforce_opportunity_id?: string;
|
|
1260
|
+
/**
|
|
1261
|
+
* Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
1262
|
+
* usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
1263
|
+
* `ending_before` date for consolidation to occur. This field cannot be modified
|
|
1264
|
+
* after a Contract has been created. If this field is omitted, charges will appear
|
|
1265
|
+
* on a separate invoice from usage charges.
|
|
1266
|
+
*/
|
|
1267
|
+
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
1268
|
+
spend_threshold_configuration?: SpendThresholdConfiguration;
|
|
1269
|
+
/**
|
|
1270
|
+
* This field's availability is dependent on your client's configuration.
|
|
1271
|
+
*/
|
|
1272
|
+
total_contract_value?: number;
|
|
1273
|
+
usage_filter?: ContractWithoutAmendments.UsageFilter;
|
|
1274
|
+
}
|
|
1275
|
+
export declare namespace ContractWithoutAmendments {
|
|
1276
|
+
interface Transition {
|
|
1277
|
+
from_contract_id: string;
|
|
1278
|
+
to_contract_id: string;
|
|
1279
|
+
type: 'SUPERSEDE' | 'RENEWAL';
|
|
1280
|
+
}
|
|
1281
|
+
interface UsageStatementSchedule {
|
|
1282
|
+
/**
|
|
1283
|
+
* Contract usage statements follow a selected cadence based on this date.
|
|
1284
|
+
*/
|
|
1285
|
+
billing_anchor_date: string;
|
|
1286
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1287
|
+
}
|
|
1288
|
+
interface RecurringCommit {
|
|
1289
|
+
id: string;
|
|
1290
|
+
/**
|
|
1291
|
+
* The amount of commit to grant.
|
|
1292
|
+
*/
|
|
1293
|
+
access_amount: RecurringCommit.AccessAmount;
|
|
1294
|
+
/**
|
|
1295
|
+
* The amount of time the created commits will be valid for
|
|
1296
|
+
*/
|
|
1297
|
+
commit_duration: RecurringCommit.CommitDuration;
|
|
1298
|
+
/**
|
|
1299
|
+
* Will be passed down to the individual commits
|
|
1300
|
+
*/
|
|
1301
|
+
priority: number;
|
|
1302
|
+
product: RecurringCommit.Product;
|
|
1303
|
+
/**
|
|
1304
|
+
* Whether the created commits will use the commit rate or list rate
|
|
1305
|
+
*/
|
|
1306
|
+
rate_type: 'COMMIT_RATE' | 'LIST_RATE';
|
|
1307
|
+
/**
|
|
1308
|
+
* Determines the start time for the first commit
|
|
1309
|
+
*/
|
|
1310
|
+
starting_at: string;
|
|
1311
|
+
/**
|
|
1312
|
+
* Will be passed down to the individual commits
|
|
1313
|
+
*/
|
|
1314
|
+
applicable_product_ids?: Array<string>;
|
|
1315
|
+
/**
|
|
1316
|
+
* Will be passed down to the individual commits
|
|
1317
|
+
*/
|
|
1318
|
+
applicable_product_tags?: Array<string>;
|
|
1319
|
+
contract?: RecurringCommit.Contract;
|
|
1320
|
+
/**
|
|
1321
|
+
* Will be passed down to the individual commits
|
|
1322
|
+
*/
|
|
1323
|
+
description?: string;
|
|
1324
|
+
/**
|
|
1325
|
+
* Determines when the contract will stop creating recurring commits. Optional
|
|
1326
|
+
*/
|
|
1327
|
+
ending_before?: string;
|
|
1328
|
+
/**
|
|
1329
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
1330
|
+
*/
|
|
1331
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
1332
|
+
/**
|
|
1333
|
+
* The amount the customer should be billed for the commit. Not required.
|
|
1334
|
+
*/
|
|
1335
|
+
invoice_amount?: RecurringCommit.InvoiceAmount;
|
|
1336
|
+
/**
|
|
1337
|
+
* Displayed on invoices. Will be passed through to the individual commits
|
|
1338
|
+
*/
|
|
1339
|
+
name?: string;
|
|
1340
|
+
/**
|
|
1341
|
+
* Will be passed down to the individual commits
|
|
1342
|
+
*/
|
|
1343
|
+
netsuite_sales_order_id?: string;
|
|
1344
|
+
/**
|
|
1345
|
+
* Determines whether the first and last commit will be prorated. If not provided,
|
|
1346
|
+
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1347
|
+
*/
|
|
1348
|
+
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1349
|
+
/**
|
|
1350
|
+
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1351
|
+
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1352
|
+
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1353
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1354
|
+
* invoice dates.
|
|
1355
|
+
*/
|
|
1356
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1357
|
+
/**
|
|
1358
|
+
* Will be passed down to the individual commits. This controls how much of an
|
|
1359
|
+
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1360
|
+
* between 0 and 1.
|
|
1361
|
+
*/
|
|
1362
|
+
rollover_fraction?: number;
|
|
1363
|
+
/**
|
|
1364
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1365
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1366
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1367
|
+
*/
|
|
1368
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
1369
|
+
/**
|
|
1370
|
+
* Attach a subscription to the recurring commit/credit.
|
|
1371
|
+
*/
|
|
1372
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
1373
|
+
}
|
|
1374
|
+
namespace RecurringCommit {
|
|
1375
|
+
/**
|
|
1376
|
+
* The amount of commit to grant.
|
|
1377
|
+
*/
|
|
1378
|
+
interface AccessAmount {
|
|
1379
|
+
credit_type_id: string;
|
|
1380
|
+
unit_price: number;
|
|
1381
|
+
quantity?: number;
|
|
1382
|
+
}
|
|
1383
|
+
/**
|
|
1384
|
+
* The amount of time the created commits will be valid for
|
|
1385
|
+
*/
|
|
1386
|
+
interface CommitDuration {
|
|
1387
|
+
value: number;
|
|
1388
|
+
unit?: 'PERIODS';
|
|
1389
|
+
}
|
|
1390
|
+
interface Product {
|
|
1391
|
+
id: string;
|
|
1392
|
+
name: string;
|
|
1393
|
+
}
|
|
1394
|
+
interface Contract {
|
|
1395
|
+
id: string;
|
|
1396
|
+
}
|
|
1397
|
+
/**
|
|
1398
|
+
* The amount the customer should be billed for the commit. Not required.
|
|
1399
|
+
*/
|
|
1400
|
+
interface InvoiceAmount {
|
|
1401
|
+
credit_type_id: string;
|
|
1402
|
+
quantity: number;
|
|
1403
|
+
unit_price: number;
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
interface RecurringCredit {
|
|
1407
|
+
id: string;
|
|
1408
|
+
/**
|
|
1409
|
+
* The amount of commit to grant.
|
|
1410
|
+
*/
|
|
1411
|
+
access_amount: RecurringCredit.AccessAmount;
|
|
1412
|
+
/**
|
|
1413
|
+
* The amount of time the created commits will be valid for
|
|
1414
|
+
*/
|
|
1415
|
+
commit_duration: RecurringCredit.CommitDuration;
|
|
1416
|
+
/**
|
|
1417
|
+
* Will be passed down to the individual commits
|
|
1418
|
+
*/
|
|
1419
|
+
priority: number;
|
|
1420
|
+
product: RecurringCredit.Product;
|
|
1421
|
+
/**
|
|
1422
|
+
* Whether the created commits will use the commit rate or list rate
|
|
1423
|
+
*/
|
|
1424
|
+
rate_type: 'COMMIT_RATE' | 'LIST_RATE';
|
|
1425
|
+
/**
|
|
1426
|
+
* Determines the start time for the first commit
|
|
1427
|
+
*/
|
|
1428
|
+
starting_at: string;
|
|
1429
|
+
/**
|
|
1430
|
+
* Will be passed down to the individual commits
|
|
1431
|
+
*/
|
|
1432
|
+
applicable_product_ids?: Array<string>;
|
|
1433
|
+
/**
|
|
1434
|
+
* Will be passed down to the individual commits
|
|
1435
|
+
*/
|
|
1436
|
+
applicable_product_tags?: Array<string>;
|
|
1437
|
+
contract?: RecurringCredit.Contract;
|
|
1438
|
+
/**
|
|
1439
|
+
* Will be passed down to the individual commits
|
|
1440
|
+
*/
|
|
1441
|
+
description?: string;
|
|
1442
|
+
/**
|
|
1443
|
+
* Determines when the contract will stop creating recurring commits. Optional
|
|
1444
|
+
*/
|
|
1445
|
+
ending_before?: string;
|
|
1446
|
+
/**
|
|
1447
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
1448
|
+
*/
|
|
1449
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
1450
|
+
/**
|
|
1451
|
+
* Displayed on invoices. Will be passed through to the individual commits
|
|
1452
|
+
*/
|
|
1453
|
+
name?: string;
|
|
1454
|
+
/**
|
|
1455
|
+
* Will be passed down to the individual commits
|
|
1456
|
+
*/
|
|
1457
|
+
netsuite_sales_order_id?: string;
|
|
1458
|
+
/**
|
|
1459
|
+
* Determines whether the first and last commit will be prorated. If not provided,
|
|
1460
|
+
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1461
|
+
*/
|
|
1462
|
+
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1463
|
+
/**
|
|
1464
|
+
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1465
|
+
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1466
|
+
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1467
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1468
|
+
* invoice dates.
|
|
1469
|
+
*/
|
|
1470
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1471
|
+
/**
|
|
1472
|
+
* Will be passed down to the individual commits. This controls how much of an
|
|
1473
|
+
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1474
|
+
* between 0 and 1.
|
|
1475
|
+
*/
|
|
1476
|
+
rollover_fraction?: number;
|
|
1477
|
+
/**
|
|
1478
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1479
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1480
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1481
|
+
*/
|
|
1482
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
1483
|
+
/**
|
|
1484
|
+
* Attach a subscription to the recurring commit/credit.
|
|
1485
|
+
*/
|
|
1486
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
1487
|
+
}
|
|
1488
|
+
namespace RecurringCredit {
|
|
1489
|
+
/**
|
|
1490
|
+
* The amount of commit to grant.
|
|
1491
|
+
*/
|
|
1492
|
+
interface AccessAmount {
|
|
1493
|
+
credit_type_id: string;
|
|
1494
|
+
unit_price: number;
|
|
1495
|
+
quantity?: number;
|
|
1496
|
+
}
|
|
1497
|
+
/**
|
|
1498
|
+
* The amount of time the created commits will be valid for
|
|
1499
|
+
*/
|
|
1500
|
+
interface CommitDuration {
|
|
1501
|
+
value: number;
|
|
1502
|
+
unit?: 'PERIODS';
|
|
1503
|
+
}
|
|
1504
|
+
interface Product {
|
|
1505
|
+
id: string;
|
|
1506
|
+
name: string;
|
|
1507
|
+
}
|
|
1508
|
+
interface Contract {
|
|
1509
|
+
id: string;
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
interface ResellerRoyalty {
|
|
1513
|
+
fraction: number;
|
|
1514
|
+
netsuite_reseller_id: string;
|
|
1515
|
+
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
1516
|
+
starting_at: string;
|
|
1517
|
+
applicable_product_ids?: Array<string>;
|
|
1518
|
+
applicable_product_tags?: Array<string>;
|
|
1519
|
+
aws_account_number?: string;
|
|
1520
|
+
aws_offer_id?: string;
|
|
1521
|
+
aws_payer_reference_id?: string;
|
|
1522
|
+
ending_before?: string;
|
|
1523
|
+
gcp_account_id?: string;
|
|
1524
|
+
gcp_offer_id?: string;
|
|
1525
|
+
reseller_contract_value?: number;
|
|
1526
|
+
}
|
|
1527
|
+
interface UsageFilter {
|
|
1528
|
+
current: Shared.BaseUsageFilter | null;
|
|
1529
|
+
initial: Shared.BaseUsageFilter;
|
|
1530
|
+
updates: Array<UsageFilter.Update>;
|
|
1531
|
+
}
|
|
1532
|
+
namespace UsageFilter {
|
|
1533
|
+
interface Update {
|
|
1534
|
+
group_key: string;
|
|
1535
|
+
group_values: Array<string>;
|
|
1536
|
+
starting_at: string;
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
export interface Credit {
|
|
1541
|
+
id: string;
|
|
1542
|
+
product: Credit.Product;
|
|
1543
|
+
type: 'CREDIT';
|
|
1544
|
+
/**
|
|
1545
|
+
* The schedule that the customer will gain access to the credits.
|
|
1546
|
+
*/
|
|
1547
|
+
access_schedule?: ScheduleDuration;
|
|
1548
|
+
applicable_contract_ids?: Array<string>;
|
|
1549
|
+
applicable_product_ids?: Array<string>;
|
|
1550
|
+
applicable_product_tags?: Array<string>;
|
|
1551
|
+
/**
|
|
1552
|
+
* The current balance of the credit or commit. This balance reflects the amount of
|
|
1553
|
+
* credit or commit that the customer has access to use at this moment - thus,
|
|
1554
|
+
* expired and upcoming credit or commit segments contribute 0 to the balance. The
|
|
1555
|
+
* balance will match the sum of all ledger entries with the exception of the case
|
|
1556
|
+
* where the sum of negative manual ledger entries exceeds the positive amount
|
|
1557
|
+
* remaining on the credit or commit - in that case, the balance will be 0. All
|
|
1558
|
+
* manual ledger entries associated with active credit or commit segments are
|
|
1559
|
+
* included in the balance, including future-dated manual ledger entries.
|
|
1560
|
+
*/
|
|
1561
|
+
balance?: number;
|
|
1562
|
+
contract?: Credit.Contract;
|
|
1563
|
+
/**
|
|
1564
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1565
|
+
*/
|
|
1566
|
+
custom_fields?: {
|
|
1567
|
+
[key: string]: string;
|
|
1568
|
+
};
|
|
1569
|
+
description?: string;
|
|
1570
|
+
/**
|
|
1571
|
+
* Optional configuration for credit hierarchy access control
|
|
1572
|
+
*/
|
|
1573
|
+
hierarchy_configuration?: CommitHierarchyConfiguration;
|
|
1574
|
+
/**
|
|
1575
|
+
* A list of ordered events that impact the balance of a credit. For example, an
|
|
1576
|
+
* invoice deduction or an expiration.
|
|
1577
|
+
*/
|
|
1578
|
+
ledger?: Array<Credit.CreditSegmentStartLedgerEntry | Credit.CreditAutomatedInvoiceDeductionLedgerEntry | Credit.CreditExpirationLedgerEntry | Credit.CreditCanceledLedgerEntry | Credit.CreditCreditedLedgerEntry | Credit.CreditManualLedgerEntry | Credit.CreditSeatBasedAdjustmentLedgerEntry>;
|
|
1579
|
+
name?: string;
|
|
1580
|
+
/**
|
|
1581
|
+
* This field's availability is dependent on your client's configuration.
|
|
1582
|
+
*/
|
|
1583
|
+
netsuite_sales_order_id?: string;
|
|
1584
|
+
/**
|
|
1585
|
+
* If multiple credits or commits are applicable, the one with the lower priority
|
|
1586
|
+
* will apply first.
|
|
1587
|
+
*/
|
|
1588
|
+
priority?: number;
|
|
1589
|
+
rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
1590
|
+
/**
|
|
1591
|
+
* This field's availability is dependent on your client's configuration.
|
|
1592
|
+
*/
|
|
1593
|
+
salesforce_opportunity_id?: string;
|
|
1594
|
+
/**
|
|
1595
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1596
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1597
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1598
|
+
*/
|
|
1599
|
+
specifiers?: Array<CommitSpecifier>;
|
|
1600
|
+
/**
|
|
1601
|
+
* Prevents the creation of duplicates. If a request to create a commit or credit
|
|
1602
|
+
* is made with a uniqueness key that was previously used to create a commit or
|
|
1603
|
+
* credit, a new record will not be created and the request will fail with a 409
|
|
1604
|
+
* error.
|
|
1605
|
+
*/
|
|
1606
|
+
uniqueness_key?: string;
|
|
1607
|
+
}
|
|
1608
|
+
export declare namespace Credit {
|
|
1609
|
+
interface Product {
|
|
1610
|
+
id: string;
|
|
1611
|
+
name: string;
|
|
1612
|
+
}
|
|
1613
|
+
interface Contract {
|
|
1614
|
+
id: string;
|
|
1615
|
+
}
|
|
1616
|
+
interface CreditSegmentStartLedgerEntry {
|
|
1617
|
+
amount: number;
|
|
1618
|
+
segment_id: string;
|
|
1619
|
+
timestamp: string;
|
|
1620
|
+
type: 'CREDIT_SEGMENT_START';
|
|
1621
|
+
}
|
|
1622
|
+
interface CreditAutomatedInvoiceDeductionLedgerEntry {
|
|
1623
|
+
amount: number;
|
|
1624
|
+
invoice_id: string;
|
|
1625
|
+
segment_id: string;
|
|
1626
|
+
timestamp: string;
|
|
1627
|
+
type: 'CREDIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
1628
|
+
contract_id?: string;
|
|
1629
|
+
}
|
|
1630
|
+
interface CreditExpirationLedgerEntry {
|
|
1631
|
+
amount: number;
|
|
1632
|
+
segment_id: string;
|
|
1633
|
+
timestamp: string;
|
|
1634
|
+
type: 'CREDIT_EXPIRATION';
|
|
1635
|
+
}
|
|
1636
|
+
interface CreditCanceledLedgerEntry {
|
|
1637
|
+
amount: number;
|
|
1638
|
+
invoice_id: string;
|
|
1639
|
+
segment_id: string;
|
|
1640
|
+
timestamp: string;
|
|
1641
|
+
type: 'CREDIT_CANCELED';
|
|
1642
|
+
contract_id?: string;
|
|
1643
|
+
}
|
|
1644
|
+
interface CreditCreditedLedgerEntry {
|
|
1645
|
+
amount: number;
|
|
1646
|
+
invoice_id: string;
|
|
1647
|
+
segment_id: string;
|
|
1648
|
+
timestamp: string;
|
|
1649
|
+
type: 'CREDIT_CREDITED';
|
|
1650
|
+
contract_id?: string;
|
|
1651
|
+
}
|
|
1652
|
+
interface CreditManualLedgerEntry {
|
|
1653
|
+
amount: number;
|
|
1654
|
+
reason: string;
|
|
1655
|
+
timestamp: string;
|
|
1656
|
+
type: 'CREDIT_MANUAL';
|
|
1657
|
+
}
|
|
1658
|
+
interface CreditSeatBasedAdjustmentLedgerEntry {
|
|
1659
|
+
amount: number;
|
|
1660
|
+
segment_id: string;
|
|
1661
|
+
timestamp: string;
|
|
1662
|
+
type: 'CREDIT_SEAT_BASED_ADJUSTMENT';
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
export interface CreditTypeData {
|
|
1666
|
+
id: string;
|
|
1667
|
+
name: string;
|
|
1668
|
+
}
|
|
1669
|
+
export interface Discount {
|
|
1670
|
+
id: string;
|
|
1671
|
+
product: Discount.Product;
|
|
1672
|
+
schedule: SchedulePointInTime;
|
|
1673
|
+
/**
|
|
1674
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1675
|
+
*/
|
|
1676
|
+
custom_fields?: {
|
|
1677
|
+
[key: string]: string;
|
|
1678
|
+
};
|
|
1679
|
+
name?: string;
|
|
1680
|
+
/**
|
|
1681
|
+
* This field's availability is dependent on your client's configuration.
|
|
1682
|
+
*/
|
|
1683
|
+
netsuite_sales_order_id?: string;
|
|
1684
|
+
}
|
|
1685
|
+
export declare namespace Discount {
|
|
1686
|
+
interface Product {
|
|
1687
|
+
id: string;
|
|
1688
|
+
name: string;
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
/**
|
|
1692
|
+
* An optional filtering rule to match the 'event_type' property of an event.
|
|
1693
|
+
*/
|
|
1694
|
+
export interface EventTypeFilter {
|
|
1695
|
+
/**
|
|
1696
|
+
* A list of event types that are explicitly included in the billable metric. If
|
|
1697
|
+
* specified, only events of these types will match the billable metric. Must be
|
|
1698
|
+
* non-empty if present.
|
|
1699
|
+
*/
|
|
1700
|
+
in_values?: Array<string>;
|
|
1701
|
+
/**
|
|
1702
|
+
* A list of event types that are explicitly excluded from the billable metric. If
|
|
1703
|
+
* specified, events of these types will not match the billable metric. Must be
|
|
1704
|
+
* non-empty if present.
|
|
1705
|
+
*/
|
|
1706
|
+
not_in_values?: Array<string>;
|
|
1707
|
+
}
|
|
1708
|
+
/**
|
|
1709
|
+
* Either a **parent** configuration with a list of children or a **child**
|
|
1710
|
+
* configuration with a single parent.
|
|
1711
|
+
*/
|
|
1712
|
+
export type HierarchyConfiguration = HierarchyConfiguration.ParentHierarchyConfiguration | HierarchyConfiguration.ChildHierarchyConfiguration;
|
|
1713
|
+
export declare namespace HierarchyConfiguration {
|
|
1714
|
+
interface ParentHierarchyConfiguration {
|
|
1715
|
+
/**
|
|
1716
|
+
* List of contracts that belong to this parent.
|
|
1717
|
+
*/
|
|
1718
|
+
children: Array<ParentHierarchyConfiguration.Child>;
|
|
1719
|
+
parent_behavior?: ParentHierarchyConfiguration.ParentBehavior;
|
|
1720
|
+
}
|
|
1721
|
+
namespace ParentHierarchyConfiguration {
|
|
1722
|
+
interface Child {
|
|
1723
|
+
contract_id: string;
|
|
1724
|
+
customer_id: string;
|
|
1725
|
+
}
|
|
1726
|
+
interface ParentBehavior {
|
|
1727
|
+
/**
|
|
1728
|
+
* Indicates the desired behavior of consolidated invoices generated by the parent
|
|
1729
|
+
* in a customer hierarchy **CONCATENATE**: Statements on the invoices of child
|
|
1730
|
+
* customers will be appended to the consolidated invoice **NONE**: Do not generate
|
|
1731
|
+
* consolidated invoices
|
|
1732
|
+
*/
|
|
1733
|
+
invoice_consolidation_type?: 'CONCATENATE' | 'NONE';
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
interface ChildHierarchyConfiguration {
|
|
1737
|
+
/**
|
|
1738
|
+
* The single parent contract/customer for this child.
|
|
1739
|
+
*/
|
|
1740
|
+
parent: ChildHierarchyConfiguration.Parent;
|
|
1741
|
+
/**
|
|
1742
|
+
* Indicates whether the parent should pay for the child's invoice charges
|
|
1743
|
+
*/
|
|
1744
|
+
payer?: 'SELF' | 'PARENT';
|
|
1745
|
+
/**
|
|
1746
|
+
* Indicates the behavior of the child's invoice statements on the parent's
|
|
1747
|
+
* invoices **CONSOLIDATE**: Child's invoice statements will be added to parent's
|
|
1748
|
+
* consolidated invoices **SEPARATE**: Child's invoice statements will appear not
|
|
1749
|
+
* appear on parent's consolidated invoices
|
|
1750
|
+
*/
|
|
1751
|
+
usage_statement_behavior?: 'CONSOLIDATE' | 'SEPARATE';
|
|
1752
|
+
}
|
|
1753
|
+
namespace ChildHierarchyConfiguration {
|
|
1754
|
+
/**
|
|
1755
|
+
* The single parent contract/customer for this child.
|
|
1756
|
+
*/
|
|
1757
|
+
interface Parent {
|
|
1758
|
+
contract_id: string;
|
|
1759
|
+
customer_id: string;
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
export interface ID {
|
|
1764
|
+
id: string;
|
|
1765
|
+
}
|
|
1766
|
+
export interface Override {
|
|
1767
|
+
id: string;
|
|
1768
|
+
starting_at: string;
|
|
1769
|
+
applicable_product_tags?: Array<string>;
|
|
1770
|
+
credit_type?: CreditTypeData;
|
|
1771
|
+
ending_before?: string;
|
|
1772
|
+
entitled?: boolean;
|
|
1773
|
+
is_commit_specific?: boolean;
|
|
1774
|
+
/**
|
|
1775
|
+
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
1776
|
+
* set to true.
|
|
1777
|
+
*/
|
|
1778
|
+
is_prorated?: boolean;
|
|
1779
|
+
multiplier?: number;
|
|
1780
|
+
override_specifiers?: Array<Override.OverrideSpecifier>;
|
|
1781
|
+
override_tiers?: Array<OverrideTier>;
|
|
1782
|
+
overwrite_rate?: OverwriteRate;
|
|
1783
|
+
/**
|
|
1784
|
+
* Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
|
|
1785
|
+
* this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
|
|
1786
|
+
*/
|
|
1787
|
+
price?: number;
|
|
1788
|
+
priority?: number;
|
|
1789
|
+
product?: Override.Product;
|
|
1790
|
+
/**
|
|
1791
|
+
* Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
|
|
1792
|
+
*/
|
|
1793
|
+
quantity?: number;
|
|
1794
|
+
rate_type?: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
|
|
1795
|
+
target?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
1796
|
+
/**
|
|
1797
|
+
* Only set for TIERED rate_type.
|
|
1798
|
+
*/
|
|
1799
|
+
tiers?: Array<Tier>;
|
|
1800
|
+
type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED';
|
|
1801
|
+
/**
|
|
1802
|
+
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
1803
|
+
* processors.
|
|
1804
|
+
*/
|
|
1805
|
+
value?: {
|
|
1806
|
+
[key: string]: unknown;
|
|
1807
|
+
};
|
|
1808
|
+
}
|
|
1809
|
+
export declare namespace Override {
|
|
1810
|
+
interface OverrideSpecifier {
|
|
1811
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1812
|
+
commit_ids?: Array<string>;
|
|
1813
|
+
presentation_group_values?: {
|
|
1814
|
+
[key: string]: string | null;
|
|
1815
|
+
};
|
|
1816
|
+
pricing_group_values?: {
|
|
1817
|
+
[key: string]: string;
|
|
1818
|
+
};
|
|
1819
|
+
product_id?: string;
|
|
1820
|
+
product_tags?: Array<string>;
|
|
1821
|
+
recurring_commit_ids?: Array<string>;
|
|
1822
|
+
recurring_credit_ids?: Array<string>;
|
|
1823
|
+
}
|
|
1824
|
+
interface Product {
|
|
1825
|
+
id: string;
|
|
1826
|
+
name: string;
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
export interface OverrideTier {
|
|
1830
|
+
multiplier: number;
|
|
1831
|
+
size?: number;
|
|
1832
|
+
}
|
|
1833
|
+
export interface OverwriteRate {
|
|
1834
|
+
rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
|
|
1835
|
+
credit_type?: CreditTypeData;
|
|
1836
|
+
/**
|
|
1837
|
+
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
1838
|
+
* processors.
|
|
1839
|
+
*/
|
|
1840
|
+
custom_rate?: {
|
|
1841
|
+
[key: string]: unknown;
|
|
1842
|
+
};
|
|
1843
|
+
/**
|
|
1844
|
+
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
1845
|
+
* set to true.
|
|
1846
|
+
*/
|
|
1847
|
+
is_prorated?: boolean;
|
|
1848
|
+
/**
|
|
1849
|
+
* Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
|
|
1850
|
+
* this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
|
|
1851
|
+
*/
|
|
1852
|
+
price?: number;
|
|
1853
|
+
/**
|
|
1854
|
+
* Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
|
|
1855
|
+
*/
|
|
1856
|
+
quantity?: number;
|
|
1857
|
+
/**
|
|
1858
|
+
* Only set for TIERED rate_type.
|
|
1859
|
+
*/
|
|
1860
|
+
tiers?: Array<Tier>;
|
|
1861
|
+
}
|
|
1862
|
+
export interface PaymentGateConfig {
|
|
1863
|
+
/**
|
|
1864
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
1865
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
1866
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
1867
|
+
* wish to payment gate the commit balance.
|
|
1868
|
+
*/
|
|
1869
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
1870
|
+
/**
|
|
1871
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
1872
|
+
*/
|
|
1873
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
1874
|
+
/**
|
|
1875
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
1876
|
+
*/
|
|
1877
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
1878
|
+
/**
|
|
1879
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
1880
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
1881
|
+
* will default to NONE.
|
|
1882
|
+
*/
|
|
1883
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'AVALARA' | 'PRECALCULATED';
|
|
1884
|
+
}
|
|
1885
|
+
export declare namespace PaymentGateConfig {
|
|
1886
|
+
/**
|
|
1887
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
1888
|
+
*/
|
|
1889
|
+
interface PrecalculatedTaxConfig {
|
|
1890
|
+
/**
|
|
1891
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
1892
|
+
* denomination as the commit's invoice schedule
|
|
1893
|
+
*/
|
|
1894
|
+
tax_amount: number;
|
|
1895
|
+
/**
|
|
1896
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
1897
|
+
* description.
|
|
1898
|
+
*/
|
|
1899
|
+
tax_name?: string;
|
|
1900
|
+
}
|
|
1901
|
+
/**
|
|
1902
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
1903
|
+
*/
|
|
1904
|
+
interface StripeConfig {
|
|
1905
|
+
/**
|
|
1906
|
+
* If left blank, will default to INVOICE
|
|
1907
|
+
*/
|
|
1908
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
1909
|
+
/**
|
|
1910
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
1911
|
+
* your payment type.
|
|
1912
|
+
*/
|
|
1913
|
+
invoice_metadata?: {
|
|
1914
|
+
[key: string]: string;
|
|
1915
|
+
};
|
|
1916
|
+
}
|
|
1917
|
+
}
|
|
1918
|
+
export interface PaymentGateConfigV2 {
|
|
1919
|
+
/**
|
|
1920
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
1921
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
1922
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
1923
|
+
* wish to payment gate the commit balance.
|
|
1924
|
+
*/
|
|
1925
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
1926
|
+
/**
|
|
1927
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
1928
|
+
*/
|
|
1929
|
+
precalculated_tax_config?: PaymentGateConfigV2.PrecalculatedTaxConfig;
|
|
1930
|
+
/**
|
|
1931
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
1932
|
+
*/
|
|
1933
|
+
stripe_config?: PaymentGateConfigV2.StripeConfig;
|
|
1934
|
+
/**
|
|
1935
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
1936
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
1937
|
+
* will default to NONE.
|
|
1938
|
+
*/
|
|
1939
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'AVALARA' | 'PRECALCULATED';
|
|
1940
|
+
}
|
|
1941
|
+
export declare namespace PaymentGateConfigV2 {
|
|
1942
|
+
/**
|
|
1943
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
1944
|
+
*/
|
|
1945
|
+
interface PrecalculatedTaxConfig {
|
|
1946
|
+
/**
|
|
1947
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
1948
|
+
* denomination as the commit's invoice schedule
|
|
1949
|
+
*/
|
|
1950
|
+
tax_amount: number;
|
|
1951
|
+
/**
|
|
1952
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
1953
|
+
* description.
|
|
1954
|
+
*/
|
|
1955
|
+
tax_name?: string;
|
|
1956
|
+
}
|
|
1957
|
+
/**
|
|
1958
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
1959
|
+
*/
|
|
1960
|
+
interface StripeConfig {
|
|
1961
|
+
/**
|
|
1962
|
+
* If left blank, will default to INVOICE
|
|
1963
|
+
*/
|
|
1964
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
1965
|
+
/**
|
|
1966
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
1967
|
+
* your payment type.
|
|
1968
|
+
*/
|
|
1969
|
+
invoice_metadata?: {
|
|
1970
|
+
[key: string]: string;
|
|
1971
|
+
};
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
export interface PrepaidBalanceThresholdConfiguration {
|
|
1975
|
+
commit: PrepaidBalanceThresholdConfiguration.Commit;
|
|
1976
|
+
/**
|
|
1977
|
+
* When set to false, the contract will not be evaluated against the
|
|
1978
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
1979
|
+
* regardless of prior state.
|
|
1980
|
+
*/
|
|
1981
|
+
is_enabled: boolean;
|
|
1982
|
+
payment_gate_config: PaymentGateConfig;
|
|
1983
|
+
/**
|
|
1984
|
+
* Specify the amount the balance should be recharged to.
|
|
1985
|
+
*/
|
|
1986
|
+
recharge_to_amount: number;
|
|
1987
|
+
/**
|
|
1988
|
+
* Specify the threshold amount for the contract. Each time the contract's prepaid
|
|
1989
|
+
* balance lowers to this amount, a threshold charge will be initiated.
|
|
1990
|
+
*/
|
|
1991
|
+
threshold_amount: number;
|
|
1992
|
+
/**
|
|
1993
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
1994
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
1995
|
+
*/
|
|
1996
|
+
custom_credit_type_id?: string;
|
|
1997
|
+
}
|
|
1998
|
+
export declare namespace PrepaidBalanceThresholdConfiguration {
|
|
1999
|
+
interface Commit extends Shared.BaseThresholdCommit {
|
|
2000
|
+
/**
|
|
2001
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
2002
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
2003
|
+
* all products.
|
|
2004
|
+
*/
|
|
2005
|
+
applicable_product_ids?: Array<string>;
|
|
2006
|
+
/**
|
|
2007
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
2008
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
2009
|
+
* all products.
|
|
2010
|
+
*/
|
|
2011
|
+
applicable_product_tags?: Array<string>;
|
|
2012
|
+
/**
|
|
2013
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2014
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2015
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
2016
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
2017
|
+
*/
|
|
2018
|
+
specifiers?: Array<Shared.CommitSpecifierInput>;
|
|
2019
|
+
}
|
|
2020
|
+
}
|
|
2021
|
+
export interface PrepaidBalanceThresholdConfigurationV2 {
|
|
2022
|
+
commit: PrepaidBalanceThresholdConfigurationV2.Commit;
|
|
2023
|
+
/**
|
|
2024
|
+
* When set to false, the contract will not be evaluated against the
|
|
2025
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
2026
|
+
* regardless of prior state.
|
|
2027
|
+
*/
|
|
2028
|
+
is_enabled: boolean;
|
|
2029
|
+
payment_gate_config: PaymentGateConfigV2;
|
|
2030
|
+
/**
|
|
2031
|
+
* Specify the amount the balance should be recharged to.
|
|
2032
|
+
*/
|
|
2033
|
+
recharge_to_amount: number;
|
|
2034
|
+
/**
|
|
2035
|
+
* Specify the threshold amount for the contract. Each time the contract's balance
|
|
2036
|
+
* lowers to this amount, a threshold charge will be initiated.
|
|
2037
|
+
*/
|
|
2038
|
+
threshold_amount: number;
|
|
2039
|
+
/**
|
|
2040
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
2041
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
2042
|
+
*/
|
|
2043
|
+
custom_credit_type_id?: string;
|
|
2044
|
+
}
|
|
2045
|
+
export declare namespace PrepaidBalanceThresholdConfigurationV2 {
|
|
2046
|
+
interface Commit extends Shared.UpdateBaseThresholdCommit {
|
|
2047
|
+
/**
|
|
2048
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
2049
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
2050
|
+
* all products.
|
|
2051
|
+
*/
|
|
2052
|
+
applicable_product_ids?: Array<string>;
|
|
2053
|
+
/**
|
|
2054
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
2055
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
2056
|
+
* all products.
|
|
2057
|
+
*/
|
|
2058
|
+
applicable_product_tags?: Array<string>;
|
|
2059
|
+
/**
|
|
2060
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2061
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2062
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
2063
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
2064
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
2065
|
+
* body of `specifiers`.
|
|
2066
|
+
*/
|
|
2067
|
+
specifiers?: Array<Shared.CommitSpecifierInput>;
|
|
2068
|
+
}
|
|
2069
|
+
}
|
|
2070
|
+
export interface PropertyFilter {
|
|
2071
|
+
/**
|
|
2072
|
+
* The name of the event property.
|
|
2073
|
+
*/
|
|
2074
|
+
name: string;
|
|
2075
|
+
/**
|
|
2076
|
+
* Determines whether the property must exist in the event. If true, only events
|
|
2077
|
+
* with this property will pass the filter. If false, only events without this
|
|
2078
|
+
* property will pass the filter. If null or omitted, the existence of the property
|
|
2079
|
+
* is optional.
|
|
2080
|
+
*/
|
|
2081
|
+
exists?: boolean;
|
|
2082
|
+
/**
|
|
2083
|
+
* Specifies the allowed values for the property to match an event. An event will
|
|
2084
|
+
* pass the filter only if its property value is included in this list. If
|
|
2085
|
+
* undefined, all property values will pass the filter. Must be non-empty if
|
|
2086
|
+
* present.
|
|
2087
|
+
*/
|
|
2088
|
+
in_values?: Array<string>;
|
|
2089
|
+
/**
|
|
2090
|
+
* Specifies the values that prevent an event from matching the filter. An event
|
|
2091
|
+
* will not pass the filter if its property value is included in this list. If null
|
|
2092
|
+
* or empty, all property values will pass the filter. Must be non-empty if
|
|
2093
|
+
* present.
|
|
2094
|
+
*/
|
|
2095
|
+
not_in_values?: Array<string>;
|
|
2096
|
+
}
|
|
2097
|
+
export interface ProService {
|
|
2098
|
+
id: string;
|
|
2099
|
+
/**
|
|
2100
|
+
* Maximum amount for the term.
|
|
2101
|
+
*/
|
|
2102
|
+
max_amount: number;
|
|
2103
|
+
product_id: string;
|
|
2104
|
+
/**
|
|
2105
|
+
* Quantity for the charge. Will be multiplied by unit_price to determine the
|
|
2106
|
+
* amount.
|
|
2107
|
+
*/
|
|
2108
|
+
quantity: number;
|
|
2109
|
+
/**
|
|
2110
|
+
* Unit price for the charge. Will be multiplied by quantity to determine the
|
|
2111
|
+
* amount and must be specified.
|
|
2112
|
+
*/
|
|
2113
|
+
unit_price: number;
|
|
2114
|
+
/**
|
|
2115
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2116
|
+
*/
|
|
2117
|
+
custom_fields?: {
|
|
2118
|
+
[key: string]: string;
|
|
2119
|
+
};
|
|
2120
|
+
description?: string;
|
|
2121
|
+
/**
|
|
2122
|
+
* This field's availability is dependent on your client's configuration.
|
|
2123
|
+
*/
|
|
2124
|
+
netsuite_sales_order_id?: string;
|
|
2125
|
+
}
|
|
2126
|
+
export interface Rate {
|
|
2127
|
+
rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'CUSTOM' | 'TIERED';
|
|
2128
|
+
credit_type?: CreditTypeData;
|
|
2129
|
+
/**
|
|
2130
|
+
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
2131
|
+
* processors.
|
|
2132
|
+
*/
|
|
2133
|
+
custom_rate?: {
|
|
2134
|
+
[key: string]: unknown;
|
|
2135
|
+
};
|
|
2136
|
+
/**
|
|
2137
|
+
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
2138
|
+
* set to true.
|
|
2139
|
+
*/
|
|
2140
|
+
is_prorated?: boolean;
|
|
2141
|
+
/**
|
|
2142
|
+
* Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
|
|
2143
|
+
* this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
|
|
2144
|
+
*/
|
|
2145
|
+
price?: number;
|
|
2146
|
+
/**
|
|
2147
|
+
* if pricing groups are used, this will contain the values used to calculate the
|
|
2148
|
+
* price
|
|
2149
|
+
*/
|
|
2150
|
+
pricing_group_values?: {
|
|
2151
|
+
[key: string]: string;
|
|
2152
|
+
};
|
|
2153
|
+
/**
|
|
2154
|
+
* Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
|
|
2155
|
+
*/
|
|
2156
|
+
quantity?: number;
|
|
2157
|
+
/**
|
|
2158
|
+
* Only set for TIERED rate_type.
|
|
2159
|
+
*/
|
|
2160
|
+
tiers?: Array<Tier>;
|
|
2161
|
+
/**
|
|
2162
|
+
* Only set for PERCENTAGE rate_type. Defaults to false. If true, rate is computed
|
|
2163
|
+
* using list prices rather than the standard rates for this product on the
|
|
2164
|
+
* contract.
|
|
2165
|
+
*/
|
|
2166
|
+
use_list_prices?: boolean;
|
|
2167
|
+
}
|
|
2168
|
+
export interface RecurringCommitSubscriptionConfig {
|
|
2169
|
+
allocation: 'INDIVIDUAL' | 'POOLED';
|
|
2170
|
+
apply_seat_increase_config: RecurringCommitSubscriptionConfig.ApplySeatIncreaseConfig;
|
|
2171
|
+
subscription_id: string;
|
|
2172
|
+
}
|
|
2173
|
+
export declare namespace RecurringCommitSubscriptionConfig {
|
|
2174
|
+
interface ApplySeatIncreaseConfig {
|
|
2175
|
+
/**
|
|
2176
|
+
* Indicates whether a mid-period seat increase should be prorated.
|
|
2177
|
+
*/
|
|
2178
|
+
is_prorated: boolean;
|
|
2179
|
+
}
|
|
2180
|
+
}
|
|
2181
|
+
export interface ScheduledCharge {
|
|
2182
|
+
id: string;
|
|
2183
|
+
product: ScheduledCharge.Product;
|
|
2184
|
+
schedule: SchedulePointInTime;
|
|
2185
|
+
archived_at?: string;
|
|
2186
|
+
/**
|
|
2187
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2188
|
+
*/
|
|
2189
|
+
custom_fields?: {
|
|
2190
|
+
[key: string]: string;
|
|
2191
|
+
};
|
|
2192
|
+
/**
|
|
2193
|
+
* displayed on invoices
|
|
2194
|
+
*/
|
|
2195
|
+
name?: string;
|
|
2196
|
+
/**
|
|
2197
|
+
* This field's availability is dependent on your client's configuration.
|
|
2198
|
+
*/
|
|
2199
|
+
netsuite_sales_order_id?: string;
|
|
2200
|
+
}
|
|
2201
|
+
export declare namespace ScheduledCharge {
|
|
2202
|
+
interface Product {
|
|
2203
|
+
id: string;
|
|
2204
|
+
name: string;
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
export interface ScheduleDuration {
|
|
2208
|
+
schedule_items: Array<ScheduleDuration.ScheduleItem>;
|
|
2209
|
+
credit_type?: CreditTypeData;
|
|
2210
|
+
}
|
|
2211
|
+
export declare namespace ScheduleDuration {
|
|
2212
|
+
interface ScheduleItem {
|
|
2213
|
+
id: string;
|
|
2214
|
+
amount: number;
|
|
2215
|
+
ending_before: string;
|
|
2216
|
+
starting_at: string;
|
|
2217
|
+
}
|
|
2218
|
+
}
|
|
2219
|
+
export interface SchedulePointInTime {
|
|
2220
|
+
credit_type?: CreditTypeData;
|
|
2221
|
+
/**
|
|
2222
|
+
* This field is only applicable to commit invoice schedules. If true, this
|
|
2223
|
+
* schedule will not generate an invoice.
|
|
2224
|
+
*/
|
|
2225
|
+
do_not_invoice?: boolean;
|
|
2226
|
+
schedule_items?: Array<SchedulePointInTime.ScheduleItem>;
|
|
2227
|
+
}
|
|
2228
|
+
export declare namespace SchedulePointInTime {
|
|
2229
|
+
interface ScheduleItem {
|
|
2230
|
+
id: string;
|
|
2231
|
+
amount: number;
|
|
2232
|
+
quantity: number;
|
|
2233
|
+
timestamp: string;
|
|
2234
|
+
unit_price: number;
|
|
2235
|
+
invoice_id?: string | null;
|
|
2236
|
+
}
|
|
2237
|
+
}
|
|
2238
|
+
export interface SpendThresholdConfiguration {
|
|
2239
|
+
commit: BaseThresholdCommit;
|
|
2240
|
+
/**
|
|
2241
|
+
* When set to false, the contract will not be evaluated against the
|
|
2242
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
2243
|
+
* regardless of prior state.
|
|
2244
|
+
*/
|
|
2245
|
+
is_enabled: boolean;
|
|
2246
|
+
payment_gate_config: PaymentGateConfig;
|
|
2247
|
+
/**
|
|
2248
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
2249
|
+
* hits this amount, a threshold charge will be initiated.
|
|
2250
|
+
*/
|
|
2251
|
+
threshold_amount: number;
|
|
2252
|
+
}
|
|
2253
|
+
export interface SpendThresholdConfigurationV2 {
|
|
2254
|
+
commit: UpdateBaseThresholdCommit;
|
|
2255
|
+
/**
|
|
2256
|
+
* When set to false, the contract will not be evaluated against the
|
|
2257
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
2258
|
+
* regardless of prior state.
|
|
2259
|
+
*/
|
|
2260
|
+
is_enabled: boolean;
|
|
2261
|
+
payment_gate_config: PaymentGateConfigV2;
|
|
2262
|
+
/**
|
|
2263
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
2264
|
+
* hits this amount, a threshold charge will be initiated.
|
|
2265
|
+
*/
|
|
2266
|
+
threshold_amount: number;
|
|
2267
|
+
}
|
|
2268
|
+
export interface Subscription {
|
|
2269
|
+
/**
|
|
2270
|
+
* Previous, current, and next billing periods for the subscription.
|
|
2271
|
+
*/
|
|
2272
|
+
billing_periods: Subscription.BillingPeriods;
|
|
2273
|
+
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
2274
|
+
proration: Subscription.Proration;
|
|
2275
|
+
/**
|
|
2276
|
+
* Determines how the subscription's quantity is controlled. Defaults to
|
|
2277
|
+
* QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
|
|
2278
|
+
* directly on the subscription. `initial_quantity` must be provided with this
|
|
2279
|
+
* option. Compatible with recurring commits/credits that use POOLED allocation.
|
|
2280
|
+
*/
|
|
2281
|
+
quantity_management_mode: 'SEAT_BASED' | 'QUANTITY_ONLY';
|
|
2282
|
+
/**
|
|
2283
|
+
* List of quantity schedule items for the subscription. Only includes the current
|
|
2284
|
+
* quantity and future quantity changes.
|
|
2285
|
+
*/
|
|
2286
|
+
quantity_schedule: Array<Subscription.QuantitySchedule>;
|
|
2287
|
+
starting_at: string;
|
|
2288
|
+
subscription_rate: Subscription.SubscriptionRate;
|
|
2289
|
+
id?: string;
|
|
2290
|
+
/**
|
|
2291
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2292
|
+
*/
|
|
2293
|
+
custom_fields?: {
|
|
2294
|
+
[key: string]: string;
|
|
2295
|
+
};
|
|
2296
|
+
description?: string;
|
|
2297
|
+
ending_before?: string;
|
|
2298
|
+
fiat_credit_type_id?: string;
|
|
2299
|
+
name?: string;
|
|
2300
|
+
}
|
|
2301
|
+
export declare namespace Subscription {
|
|
2302
|
+
/**
|
|
2303
|
+
* Previous, current, and next billing periods for the subscription.
|
|
2304
|
+
*/
|
|
2305
|
+
interface BillingPeriods {
|
|
2306
|
+
current?: BillingPeriods.Current;
|
|
2307
|
+
next?: BillingPeriods.Next;
|
|
2308
|
+
previous?: BillingPeriods.Previous;
|
|
2309
|
+
}
|
|
2310
|
+
namespace BillingPeriods {
|
|
2311
|
+
interface Current {
|
|
2312
|
+
ending_before: string;
|
|
2313
|
+
starting_at: string;
|
|
2314
|
+
}
|
|
2315
|
+
interface Next {
|
|
2316
|
+
ending_before: string;
|
|
2317
|
+
starting_at: string;
|
|
2318
|
+
}
|
|
2319
|
+
interface Previous {
|
|
2320
|
+
ending_before: string;
|
|
2321
|
+
starting_at: string;
|
|
2322
|
+
}
|
|
2323
|
+
}
|
|
2324
|
+
interface Proration {
|
|
2325
|
+
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
2326
|
+
is_prorated: boolean;
|
|
2327
|
+
}
|
|
2328
|
+
interface QuantitySchedule {
|
|
2329
|
+
quantity: number;
|
|
2330
|
+
starting_at: string;
|
|
2331
|
+
ending_before?: string;
|
|
2332
|
+
}
|
|
2333
|
+
interface SubscriptionRate {
|
|
2334
|
+
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2335
|
+
product: SubscriptionRate.Product;
|
|
2336
|
+
}
|
|
2337
|
+
namespace SubscriptionRate {
|
|
2338
|
+
interface Product {
|
|
2339
|
+
id: string;
|
|
2340
|
+
name: string;
|
|
2341
|
+
}
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
2344
|
+
export interface Tier {
|
|
2345
|
+
price: number;
|
|
2346
|
+
size?: number;
|
|
2347
|
+
}
|
|
2348
|
+
export interface UpdateBaseThresholdCommit {
|
|
2349
|
+
description?: string;
|
|
2350
|
+
/**
|
|
2351
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
2352
|
+
* will default to the commit product name.
|
|
2353
|
+
*/
|
|
2354
|
+
name?: string;
|
|
2355
|
+
/**
|
|
2356
|
+
* The commit product that will be used to generate the line item for commit
|
|
2357
|
+
* payment.
|
|
2358
|
+
*/
|
|
2359
|
+
product_id?: string;
|
|
2360
|
+
}
|
|
2361
|
+
export type CommitsBodyCursorPage = BodyCursorPage<Commit>;
|
|
2362
|
+
export type CreditsBodyCursorPage = BodyCursorPage<Credit>;
|
|
2363
|
+
//# sourceMappingURL=shared.d.mts.map
|