@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
package/src/resources/shared.ts
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Shared from
|
|
3
|
+
import * as Shared from './shared';
|
|
4
|
+
import { BodyCursorPage } from '../core/pagination';
|
|
5
|
+
|
|
6
|
+
export interface BaseThresholdCommit {
|
|
7
|
+
/**
|
|
8
|
+
* The commit product that will be used to generate the line item for commit
|
|
9
|
+
* payment.
|
|
10
|
+
*/
|
|
11
|
+
product_id: string;
|
|
12
|
+
|
|
13
|
+
description?: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
17
|
+
* will default to the commit product name.
|
|
18
|
+
*/
|
|
19
|
+
name?: string;
|
|
20
|
+
}
|
|
4
21
|
|
|
5
22
|
export interface BaseUsageFilter {
|
|
6
23
|
group_key: string;
|
|
@@ -13,6 +30,15 @@ export interface BaseUsageFilter {
|
|
|
13
30
|
export interface Commit {
|
|
14
31
|
id: string;
|
|
15
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Timestamp of when the commit was created.
|
|
35
|
+
*
|
|
36
|
+
* - Recurring commits: latter of commit service period date and parent commit
|
|
37
|
+
* start date
|
|
38
|
+
* - Rollover commits: when the new contract started
|
|
39
|
+
*/
|
|
40
|
+
created_at: string;
|
|
41
|
+
|
|
16
42
|
product: Commit.Product;
|
|
17
43
|
|
|
18
44
|
type: 'PREPAID' | 'POSTPAID';
|
|
@@ -54,6 +80,9 @@ export interface Commit {
|
|
|
54
80
|
|
|
55
81
|
contract?: Commit.Contract;
|
|
56
82
|
|
|
83
|
+
/**
|
|
84
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
85
|
+
*/
|
|
57
86
|
custom_fields?: { [key: string]: string };
|
|
58
87
|
|
|
59
88
|
description?: string;
|
|
@@ -61,7 +90,7 @@ export interface Commit {
|
|
|
61
90
|
/**
|
|
62
91
|
* Optional configuration for commit hierarchy access control
|
|
63
92
|
*/
|
|
64
|
-
hierarchy_configuration?:
|
|
93
|
+
hierarchy_configuration?: CommitHierarchyConfiguration;
|
|
65
94
|
|
|
66
95
|
/**
|
|
67
96
|
* The contract that this commit will be billed on.
|
|
@@ -123,7 +152,7 @@ export interface Commit {
|
|
|
123
152
|
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
124
153
|
* specifiers to contribute to a commit's or credit's drawdown.
|
|
125
154
|
*/
|
|
126
|
-
specifiers?: Array<
|
|
155
|
+
specifiers?: Array<CommitSpecifier>;
|
|
127
156
|
|
|
128
157
|
/**
|
|
129
158
|
* Prevents the creation of duplicates. If a request to create a commit or credit
|
|
@@ -145,32 +174,6 @@ export namespace Commit {
|
|
|
145
174
|
id: string;
|
|
146
175
|
}
|
|
147
176
|
|
|
148
|
-
/**
|
|
149
|
-
* Optional configuration for commit hierarchy access control
|
|
150
|
-
*/
|
|
151
|
-
export interface HierarchyConfiguration {
|
|
152
|
-
child_access:
|
|
153
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessAll
|
|
154
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessNone
|
|
155
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export namespace HierarchyConfiguration {
|
|
159
|
-
export interface CommitHierarchyChildAccessAll {
|
|
160
|
-
type: 'ALL';
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export interface CommitHierarchyChildAccessNone {
|
|
164
|
-
type: 'NONE';
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export interface CommitHierarchyChildAccessContractIDs {
|
|
168
|
-
contract_ids: Array<string>;
|
|
169
|
-
|
|
170
|
-
type: 'CONTRACT_IDS';
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
177
|
/**
|
|
175
178
|
* The contract that this commit will be billed on.
|
|
176
179
|
*/
|
|
@@ -341,43 +344,275 @@ export namespace Commit {
|
|
|
341
344
|
|
|
342
345
|
contract_id: string;
|
|
343
346
|
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export interface CommitHierarchyConfiguration {
|
|
350
|
+
child_access:
|
|
351
|
+
| CommitHierarchyConfiguration.CommitHierarchyChildAccessAll
|
|
352
|
+
| CommitHierarchyConfiguration.CommitHierarchyChildAccessNone
|
|
353
|
+
| CommitHierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export namespace CommitHierarchyConfiguration {
|
|
357
|
+
export interface CommitHierarchyChildAccessAll {
|
|
358
|
+
type: 'ALL';
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export interface CommitHierarchyChildAccessNone {
|
|
362
|
+
type: 'NONE';
|
|
363
|
+
}
|
|
344
364
|
|
|
345
|
-
export interface
|
|
346
|
-
|
|
365
|
+
export interface CommitHierarchyChildAccessContractIDs {
|
|
366
|
+
contract_ids: Array<string>;
|
|
347
367
|
|
|
348
|
-
|
|
368
|
+
type: 'CONTRACT_IDS';
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* A distinct rate on the rate card. You can choose to use this rate rather than
|
|
374
|
+
* list rate when consuming a credit or commit.
|
|
375
|
+
*/
|
|
376
|
+
export interface CommitRate {
|
|
377
|
+
rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Commit rate price. For FLAT rate_type, this must be >=0.
|
|
381
|
+
*/
|
|
382
|
+
price?: number;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Only set for TIERED rate_type.
|
|
386
|
+
*/
|
|
387
|
+
tiers?: Array<Tier>;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export interface CommitSpecifier {
|
|
391
|
+
presentation_group_values?: { [key: string]: string };
|
|
392
|
+
|
|
393
|
+
pricing_group_values?: { [key: string]: string };
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
397
|
+
*/
|
|
398
|
+
product_id?: string;
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
402
|
+
* tags.
|
|
403
|
+
*/
|
|
404
|
+
product_tags?: Array<string>;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export interface CommitSpecifierInput {
|
|
408
|
+
presentation_group_values?: { [key: string]: string };
|
|
409
|
+
|
|
410
|
+
pricing_group_values?: { [key: string]: string };
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
414
|
+
*/
|
|
415
|
+
product_id?: string;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
419
|
+
* tags.
|
|
420
|
+
*/
|
|
421
|
+
product_tags?: Array<string>;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
export interface Contract {
|
|
425
|
+
id: string;
|
|
426
|
+
|
|
427
|
+
amendments: Array<Contract.Amendment>;
|
|
428
|
+
|
|
429
|
+
current: ContractWithoutAmendments;
|
|
430
|
+
|
|
431
|
+
customer_id: string;
|
|
432
|
+
|
|
433
|
+
initial: ContractWithoutAmendments;
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* RFC 3339 timestamp indicating when the contract was archived. If not returned,
|
|
437
|
+
* the contract is not archived.
|
|
438
|
+
*/
|
|
439
|
+
archived_at?: string;
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
443
|
+
*/
|
|
444
|
+
custom_fields?: { [key: string]: string };
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* The billing provider configuration associated with a contract.
|
|
448
|
+
*/
|
|
449
|
+
customer_billing_provider_configuration?: Contract.CustomerBillingProviderConfiguration;
|
|
450
|
+
|
|
451
|
+
prepaid_balance_threshold_configuration?: PrepaidBalanceThresholdConfiguration;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Priority of the contract.
|
|
455
|
+
*/
|
|
456
|
+
priority?: number;
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
460
|
+
* usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
461
|
+
* `ending_before` date for consolidation to occur. This field cannot be modified
|
|
462
|
+
* after a Contract has been created. If this field is omitted, charges will appear
|
|
463
|
+
* on a separate invoice from usage charges.
|
|
464
|
+
*/
|
|
465
|
+
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
466
|
+
|
|
467
|
+
spend_threshold_configuration?: SpendThresholdConfiguration;
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* List of subscriptions on the contract.
|
|
471
|
+
*/
|
|
472
|
+
subscriptions?: Array<Subscription>;
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Prevents the creation of duplicates. If a request to create a record is made
|
|
476
|
+
* with a previously used uniqueness key, a new record will not be created and the
|
|
477
|
+
* request will fail with a 409 error.
|
|
478
|
+
*/
|
|
479
|
+
uniqueness_key?: string;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
export namespace Contract {
|
|
483
|
+
export interface Amendment {
|
|
484
|
+
id: string;
|
|
485
|
+
|
|
486
|
+
commits: Array<Shared.Commit>;
|
|
487
|
+
|
|
488
|
+
created_at: string;
|
|
489
|
+
|
|
490
|
+
created_by: string;
|
|
491
|
+
|
|
492
|
+
overrides: Array<Shared.Override>;
|
|
493
|
+
|
|
494
|
+
scheduled_charges: Array<Shared.ScheduledCharge>;
|
|
495
|
+
|
|
496
|
+
starting_at: string;
|
|
497
|
+
|
|
498
|
+
credits?: Array<Shared.Credit>;
|
|
349
499
|
|
|
350
500
|
/**
|
|
351
|
-
*
|
|
501
|
+
* This field's availability is dependent on your client's configuration.
|
|
352
502
|
*/
|
|
353
|
-
|
|
503
|
+
discounts?: Array<Shared.Discount>;
|
|
354
504
|
|
|
355
505
|
/**
|
|
356
|
-
*
|
|
357
|
-
* tags.
|
|
506
|
+
* This field's availability is dependent on your client's configuration.
|
|
358
507
|
*/
|
|
359
|
-
|
|
508
|
+
netsuite_sales_order_id?: string;
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* This field's availability is dependent on your client's configuration.
|
|
512
|
+
*/
|
|
513
|
+
professional_services?: Array<Shared.ProService>;
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* This field's availability is dependent on your client's configuration.
|
|
517
|
+
*/
|
|
518
|
+
reseller_royalties?: Array<Amendment.ResellerRoyalty>;
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* This field's availability is dependent on your client's configuration.
|
|
522
|
+
*/
|
|
523
|
+
salesforce_opportunity_id?: string;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
export namespace Amendment {
|
|
527
|
+
export interface ResellerRoyalty {
|
|
528
|
+
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
529
|
+
|
|
530
|
+
aws_account_number?: string;
|
|
531
|
+
|
|
532
|
+
aws_offer_id?: string;
|
|
533
|
+
|
|
534
|
+
aws_payer_reference_id?: string;
|
|
535
|
+
|
|
536
|
+
ending_before?: string | null;
|
|
537
|
+
|
|
538
|
+
fraction?: number;
|
|
539
|
+
|
|
540
|
+
gcp_account_id?: string;
|
|
541
|
+
|
|
542
|
+
gcp_offer_id?: string;
|
|
543
|
+
|
|
544
|
+
netsuite_reseller_id?: string;
|
|
545
|
+
|
|
546
|
+
reseller_contract_value?: number;
|
|
547
|
+
|
|
548
|
+
starting_at?: string;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* The billing provider configuration associated with a contract.
|
|
554
|
+
*/
|
|
555
|
+
export interface CustomerBillingProviderConfiguration {
|
|
556
|
+
archived_at: string | null;
|
|
557
|
+
|
|
558
|
+
billing_provider:
|
|
559
|
+
| 'aws_marketplace'
|
|
560
|
+
| 'stripe'
|
|
561
|
+
| 'netsuite'
|
|
562
|
+
| 'custom'
|
|
563
|
+
| 'azure_marketplace'
|
|
564
|
+
| 'quickbooks_online'
|
|
565
|
+
| 'workday'
|
|
566
|
+
| 'gcp_marketplace';
|
|
567
|
+
|
|
568
|
+
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
569
|
+
|
|
570
|
+
id?: string;
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Configuration for the billing provider. The structure of this object is specific
|
|
574
|
+
* to the billing provider.
|
|
575
|
+
*/
|
|
576
|
+
configuration?: { [key: string]: unknown };
|
|
360
577
|
}
|
|
361
578
|
}
|
|
362
579
|
|
|
363
|
-
export interface
|
|
364
|
-
|
|
580
|
+
export interface ContractV2 {
|
|
581
|
+
id: string;
|
|
582
|
+
|
|
583
|
+
commits: Array<ContractV2.Commit>;
|
|
365
584
|
|
|
366
585
|
created_at: string;
|
|
367
586
|
|
|
368
587
|
created_by: string;
|
|
369
588
|
|
|
370
|
-
|
|
589
|
+
customer_id: string;
|
|
590
|
+
|
|
591
|
+
overrides: Array<ContractV2.Override>;
|
|
371
592
|
|
|
372
593
|
scheduled_charges: Array<ScheduledCharge>;
|
|
373
594
|
|
|
374
595
|
starting_at: string;
|
|
375
596
|
|
|
376
|
-
transitions: Array<
|
|
597
|
+
transitions: Array<ContractV2.Transition>;
|
|
377
598
|
|
|
378
|
-
|
|
599
|
+
usage_filter: Array<ContractV2.UsageFilter>;
|
|
379
600
|
|
|
380
|
-
|
|
601
|
+
usage_statement_schedule: ContractV2.UsageStatementSchedule;
|
|
602
|
+
|
|
603
|
+
archived_at?: string;
|
|
604
|
+
|
|
605
|
+
credits?: Array<ContractV2.Credit>;
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
609
|
+
*/
|
|
610
|
+
custom_fields?: { [key: string]: string };
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* This field's availability is dependent on your client's configuration.
|
|
614
|
+
*/
|
|
615
|
+
customer_billing_provider_configuration?: ContractV2.CustomerBillingProviderConfiguration;
|
|
381
616
|
|
|
382
617
|
/**
|
|
383
618
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -386,13 +621,27 @@ export interface ContractWithoutAmendments {
|
|
|
386
621
|
|
|
387
622
|
ending_before?: string;
|
|
388
623
|
|
|
624
|
+
/**
|
|
625
|
+
* Indicates whether there are more items than the limit for this endpoint. Use the
|
|
626
|
+
* respective list endpoints to get the full lists.
|
|
627
|
+
*/
|
|
628
|
+
has_more?: ContractV2.HasMore;
|
|
629
|
+
|
|
389
630
|
/**
|
|
390
631
|
* Either a **parent** configuration with a list of children or a **child**
|
|
391
632
|
* configuration with a single parent.
|
|
392
633
|
*/
|
|
393
634
|
hierarchy_configuration?:
|
|
394
|
-
|
|
|
395
|
-
|
|
|
635
|
+
| ContractV2.ParentHierarchyConfiguration
|
|
636
|
+
| ContractV2.ChildHierarchyConfigurationV2;
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
|
640
|
+
* prices automatically. EXPLICIT prioritization requires specifying priorities for
|
|
641
|
+
* each multiplier; the one with the lowest priority value will be prioritized
|
|
642
|
+
* first.
|
|
643
|
+
*/
|
|
644
|
+
multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT';
|
|
396
645
|
|
|
397
646
|
name?: string;
|
|
398
647
|
|
|
@@ -403,7 +652,12 @@ export interface ContractWithoutAmendments {
|
|
|
403
652
|
*/
|
|
404
653
|
netsuite_sales_order_id?: string;
|
|
405
654
|
|
|
406
|
-
prepaid_balance_threshold_configuration?:
|
|
655
|
+
prepaid_balance_threshold_configuration?: PrepaidBalanceThresholdConfigurationV2;
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Priority of the contract.
|
|
659
|
+
*/
|
|
660
|
+
priority?: number;
|
|
407
661
|
|
|
408
662
|
/**
|
|
409
663
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -412,14 +666,14 @@ export interface ContractWithoutAmendments {
|
|
|
412
666
|
|
|
413
667
|
rate_card_id?: string;
|
|
414
668
|
|
|
415
|
-
recurring_commits?: Array<
|
|
669
|
+
recurring_commits?: Array<ContractV2.RecurringCommit>;
|
|
416
670
|
|
|
417
|
-
recurring_credits?: Array<
|
|
671
|
+
recurring_credits?: Array<ContractV2.RecurringCredit>;
|
|
418
672
|
|
|
419
673
|
/**
|
|
420
674
|
* This field's availability is dependent on your client's configuration.
|
|
421
675
|
*/
|
|
422
|
-
reseller_royalties?: Array<
|
|
676
|
+
reseller_royalties?: Array<ContractV2.ResellerRoyalty>;
|
|
423
677
|
|
|
424
678
|
/**
|
|
425
679
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -435,216 +689,1147 @@ export interface ContractWithoutAmendments {
|
|
|
435
689
|
*/
|
|
436
690
|
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
437
691
|
|
|
438
|
-
spend_threshold_configuration?:
|
|
692
|
+
spend_threshold_configuration?: SpendThresholdConfigurationV2;
|
|
439
693
|
|
|
440
694
|
/**
|
|
441
|
-
*
|
|
695
|
+
* List of subscriptions on the contract.
|
|
442
696
|
*/
|
|
697
|
+
subscriptions?: Array<Subscription>;
|
|
698
|
+
|
|
443
699
|
total_contract_value?: number;
|
|
444
700
|
|
|
445
|
-
|
|
701
|
+
/**
|
|
702
|
+
* Optional uniqueness key to prevent duplicate contract creations.
|
|
703
|
+
*/
|
|
704
|
+
uniqueness_key?: string;
|
|
446
705
|
}
|
|
447
706
|
|
|
448
|
-
export namespace
|
|
449
|
-
export interface
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
to_contract_id: string;
|
|
453
|
-
|
|
454
|
-
type: 'SUPERSEDE' | 'RENEWAL';
|
|
455
|
-
}
|
|
707
|
+
export namespace ContractV2 {
|
|
708
|
+
export interface Commit {
|
|
709
|
+
id: string;
|
|
456
710
|
|
|
457
|
-
export interface UsageStatementSchedule {
|
|
458
711
|
/**
|
|
459
|
-
*
|
|
712
|
+
* Timestamp of when the commit was created.
|
|
713
|
+
*
|
|
714
|
+
* - Recurring commits: latter of commit service period date and parent commit
|
|
715
|
+
* start date
|
|
716
|
+
* - Rollover commits: when the new contract started
|
|
460
717
|
*/
|
|
461
|
-
|
|
718
|
+
created_at: string;
|
|
462
719
|
|
|
463
|
-
|
|
464
|
-
|
|
720
|
+
product: Commit.Product;
|
|
721
|
+
|
|
722
|
+
type: 'PREPAID' | 'POSTPAID';
|
|
465
723
|
|
|
466
|
-
export interface ParentHierarchyConfiguration {
|
|
467
724
|
/**
|
|
468
|
-
*
|
|
725
|
+
* The schedule that the customer will gain access to the credits purposed with
|
|
726
|
+
* this commit.
|
|
469
727
|
*/
|
|
470
|
-
|
|
471
|
-
}
|
|
728
|
+
access_schedule?: Shared.ScheduleDuration;
|
|
472
729
|
|
|
473
|
-
|
|
474
|
-
export interface Child {
|
|
475
|
-
contract_id: string;
|
|
730
|
+
applicable_contract_ids?: Array<string>;
|
|
476
731
|
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
732
|
+
applicable_product_ids?: Array<string>;
|
|
733
|
+
|
|
734
|
+
applicable_product_tags?: Array<string>;
|
|
735
|
+
|
|
736
|
+
archived_at?: string;
|
|
480
737
|
|
|
481
|
-
export interface ChildHierarchyConfiguration {
|
|
482
738
|
/**
|
|
483
|
-
* The
|
|
739
|
+
* The current balance of the credit or commit. This balance reflects the amount of
|
|
740
|
+
* credit or commit that the customer has access to use at this moment - thus,
|
|
741
|
+
* expired and upcoming credit or commit segments contribute 0 to the balance. The
|
|
742
|
+
* balance will match the sum of all ledger entries with the exception of the case
|
|
743
|
+
* where the sum of negative manual ledger entries exceeds the positive amount
|
|
744
|
+
* remaining on the credit or commit - in that case, the balance will be 0. All
|
|
745
|
+
* manual ledger entries associated with active credit or commit segments are
|
|
746
|
+
* included in the balance, including future-dated manual ledger entries.
|
|
484
747
|
*/
|
|
485
|
-
|
|
486
|
-
|
|
748
|
+
balance?: number;
|
|
749
|
+
|
|
750
|
+
contract?: Commit.Contract;
|
|
487
751
|
|
|
488
|
-
export namespace ChildHierarchyConfiguration {
|
|
489
752
|
/**
|
|
490
|
-
*
|
|
753
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
491
754
|
*/
|
|
492
|
-
|
|
493
|
-
contract_id: string;
|
|
755
|
+
custom_fields?: { [key: string]: string };
|
|
494
756
|
|
|
495
|
-
|
|
496
|
-
}
|
|
497
|
-
}
|
|
757
|
+
description?: string;
|
|
498
758
|
|
|
499
|
-
|
|
500
|
-
|
|
759
|
+
/**
|
|
760
|
+
* Optional configuration for commit hierarchy access control
|
|
761
|
+
*/
|
|
762
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
501
763
|
|
|
502
764
|
/**
|
|
503
|
-
*
|
|
504
|
-
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
505
|
-
* regardless of prior state.
|
|
765
|
+
* The contract that this commit will be billed on.
|
|
506
766
|
*/
|
|
507
|
-
|
|
767
|
+
invoice_contract?: Commit.InvoiceContract;
|
|
508
768
|
|
|
509
|
-
|
|
769
|
+
/**
|
|
770
|
+
* The schedule that the customer will be invoiced for this commit.
|
|
771
|
+
*/
|
|
772
|
+
invoice_schedule?: Shared.SchedulePointInTime;
|
|
510
773
|
|
|
511
774
|
/**
|
|
512
|
-
*
|
|
775
|
+
* A list of ordered events that impact the balance of a commit. For example, an
|
|
776
|
+
* invoice deduction or a rollover.
|
|
513
777
|
*/
|
|
514
|
-
|
|
778
|
+
ledger?: Array<
|
|
779
|
+
| Commit.PrepaidCommitSegmentStartLedgerEntry
|
|
780
|
+
| Commit.PrepaidCommitAutomatedInvoiceDeductionLedgerEntry
|
|
781
|
+
| Commit.PrepaidCommitRolloverLedgerEntry
|
|
782
|
+
| Commit.PrepaidCommitExpirationLedgerEntry
|
|
783
|
+
| Commit.PrepaidCommitCanceledLedgerEntry
|
|
784
|
+
| Commit.PrepaidCommitCreditedLedgerEntry
|
|
785
|
+
| Commit.PrepaidCommitSeatBasedAdjustmentLedgerEntry
|
|
786
|
+
| Commit.PostpaidCommitInitialBalanceLedgerEntry
|
|
787
|
+
| Commit.PostpaidCommitAutomatedInvoiceDeductionLedgerEntry
|
|
788
|
+
| Commit.PostpaidCommitRolloverLedgerEntry
|
|
789
|
+
| Commit.PostpaidCommitTrueupLedgerEntry
|
|
790
|
+
| Commit.PrepaidCommitManualLedgerEntry
|
|
791
|
+
| Commit.PostpaidCommitManualLedgerEntry
|
|
792
|
+
| Commit.PostpaidCommitExpirationLedgerEntry
|
|
793
|
+
>;
|
|
794
|
+
|
|
795
|
+
name?: string;
|
|
515
796
|
|
|
516
797
|
/**
|
|
517
|
-
*
|
|
518
|
-
* balance lowers to this amount, a threshold charge will be initiated.
|
|
798
|
+
* This field's availability is dependent on your client's configuration.
|
|
519
799
|
*/
|
|
520
|
-
|
|
800
|
+
netsuite_sales_order_id?: string;
|
|
521
801
|
|
|
522
802
|
/**
|
|
523
|
-
* If
|
|
524
|
-
*
|
|
803
|
+
* If multiple credits or commits are applicable, the one with the lower priority
|
|
804
|
+
* will apply first.
|
|
525
805
|
*/
|
|
526
|
-
|
|
527
|
-
}
|
|
806
|
+
priority?: number;
|
|
528
807
|
|
|
529
|
-
|
|
530
|
-
export interface Commit {
|
|
531
|
-
/**
|
|
532
|
-
* The commit product that will be used to generate the line item for commit
|
|
533
|
-
* payment.
|
|
534
|
-
*/
|
|
535
|
-
product_id: string;
|
|
808
|
+
rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
536
809
|
|
|
537
|
-
|
|
538
|
-
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
539
|
-
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
540
|
-
* all products.
|
|
541
|
-
*/
|
|
542
|
-
applicable_product_ids?: Array<string>;
|
|
810
|
+
rolled_over_from?: Commit.RolledOverFrom;
|
|
543
811
|
|
|
544
|
-
|
|
545
|
-
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
546
|
-
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
547
|
-
* all products.
|
|
548
|
-
*/
|
|
549
|
-
applicable_product_tags?: Array<string>;
|
|
812
|
+
rollover_fraction?: number;
|
|
550
813
|
|
|
551
|
-
|
|
814
|
+
/**
|
|
815
|
+
* This field's availability is dependent on your client's configuration.
|
|
816
|
+
*/
|
|
817
|
+
salesforce_opportunity_id?: string;
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
821
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
822
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
823
|
+
*/
|
|
824
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
export namespace Commit {
|
|
828
|
+
export interface Product {
|
|
829
|
+
id: string;
|
|
830
|
+
|
|
831
|
+
name: string;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
export interface Contract {
|
|
835
|
+
id: string;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* The contract that this commit will be billed on.
|
|
840
|
+
*/
|
|
841
|
+
export interface InvoiceContract {
|
|
842
|
+
id: string;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
export interface PrepaidCommitSegmentStartLedgerEntry {
|
|
846
|
+
amount: number;
|
|
847
|
+
|
|
848
|
+
segment_id: string;
|
|
849
|
+
|
|
850
|
+
timestamp: string;
|
|
851
|
+
|
|
852
|
+
type: 'PREPAID_COMMIT_SEGMENT_START';
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
export interface PrepaidCommitAutomatedInvoiceDeductionLedgerEntry {
|
|
856
|
+
amount: number;
|
|
857
|
+
|
|
858
|
+
invoice_id: string;
|
|
859
|
+
|
|
860
|
+
segment_id: string;
|
|
861
|
+
|
|
862
|
+
timestamp: string;
|
|
863
|
+
|
|
864
|
+
type: 'PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
865
|
+
|
|
866
|
+
contract_id?: string;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
export interface PrepaidCommitRolloverLedgerEntry {
|
|
870
|
+
amount: number;
|
|
871
|
+
|
|
872
|
+
new_contract_id: string;
|
|
873
|
+
|
|
874
|
+
segment_id: string;
|
|
875
|
+
|
|
876
|
+
timestamp: string;
|
|
877
|
+
|
|
878
|
+
type: 'PREPAID_COMMIT_ROLLOVER';
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
export interface PrepaidCommitExpirationLedgerEntry {
|
|
882
|
+
amount: number;
|
|
883
|
+
|
|
884
|
+
segment_id: string;
|
|
885
|
+
|
|
886
|
+
timestamp: string;
|
|
887
|
+
|
|
888
|
+
type: 'PREPAID_COMMIT_EXPIRATION';
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
export interface PrepaidCommitCanceledLedgerEntry {
|
|
892
|
+
amount: number;
|
|
893
|
+
|
|
894
|
+
invoice_id: string;
|
|
895
|
+
|
|
896
|
+
segment_id: string;
|
|
897
|
+
|
|
898
|
+
timestamp: string;
|
|
899
|
+
|
|
900
|
+
type: 'PREPAID_COMMIT_CANCELED';
|
|
901
|
+
|
|
902
|
+
contract_id?: string;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
export interface PrepaidCommitCreditedLedgerEntry {
|
|
906
|
+
amount: number;
|
|
907
|
+
|
|
908
|
+
invoice_id: string;
|
|
909
|
+
|
|
910
|
+
segment_id: string;
|
|
911
|
+
|
|
912
|
+
timestamp: string;
|
|
913
|
+
|
|
914
|
+
type: 'PREPAID_COMMIT_CREDITED';
|
|
915
|
+
|
|
916
|
+
contract_id?: string;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
export interface PrepaidCommitSeatBasedAdjustmentLedgerEntry {
|
|
920
|
+
amount: number;
|
|
921
|
+
|
|
922
|
+
segment_id: string;
|
|
923
|
+
|
|
924
|
+
timestamp: string;
|
|
925
|
+
|
|
926
|
+
type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT';
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
export interface PostpaidCommitInitialBalanceLedgerEntry {
|
|
930
|
+
amount: number;
|
|
931
|
+
|
|
932
|
+
timestamp: string;
|
|
933
|
+
|
|
934
|
+
type: 'POSTPAID_COMMIT_INITIAL_BALANCE';
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
export interface PostpaidCommitAutomatedInvoiceDeductionLedgerEntry {
|
|
938
|
+
amount: number;
|
|
939
|
+
|
|
940
|
+
invoice_id: string;
|
|
941
|
+
|
|
942
|
+
segment_id: string;
|
|
943
|
+
|
|
944
|
+
timestamp: string;
|
|
945
|
+
|
|
946
|
+
type: 'POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
947
|
+
|
|
948
|
+
contract_id?: string;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
export interface PostpaidCommitRolloverLedgerEntry {
|
|
952
|
+
amount: number;
|
|
953
|
+
|
|
954
|
+
new_contract_id: string;
|
|
955
|
+
|
|
956
|
+
segment_id: string;
|
|
957
|
+
|
|
958
|
+
timestamp: string;
|
|
959
|
+
|
|
960
|
+
type: 'POSTPAID_COMMIT_ROLLOVER';
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
export interface PostpaidCommitTrueupLedgerEntry {
|
|
964
|
+
amount: number;
|
|
965
|
+
|
|
966
|
+
invoice_id: string;
|
|
967
|
+
|
|
968
|
+
timestamp: string;
|
|
969
|
+
|
|
970
|
+
type: 'POSTPAID_COMMIT_TRUEUP';
|
|
971
|
+
|
|
972
|
+
contract_id?: string;
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
export interface PrepaidCommitManualLedgerEntry {
|
|
976
|
+
amount: number;
|
|
977
|
+
|
|
978
|
+
reason: string;
|
|
979
|
+
|
|
980
|
+
timestamp: string;
|
|
981
|
+
|
|
982
|
+
type: 'PREPAID_COMMIT_MANUAL';
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
export interface PostpaidCommitManualLedgerEntry {
|
|
986
|
+
amount: number;
|
|
987
|
+
|
|
988
|
+
reason: string;
|
|
989
|
+
|
|
990
|
+
timestamp: string;
|
|
991
|
+
|
|
992
|
+
type: 'POSTPAID_COMMIT_MANUAL';
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
export interface PostpaidCommitExpirationLedgerEntry {
|
|
996
|
+
amount: number;
|
|
997
|
+
|
|
998
|
+
timestamp: string;
|
|
999
|
+
|
|
1000
|
+
type: 'POSTPAID_COMMIT_EXPIRATION';
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
export interface RolledOverFrom {
|
|
1004
|
+
commit_id: string;
|
|
1005
|
+
|
|
1006
|
+
contract_id: string;
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
export interface Override {
|
|
1011
|
+
id: string;
|
|
1012
|
+
|
|
1013
|
+
starting_at: string;
|
|
1014
|
+
|
|
1015
|
+
applicable_product_tags?: Array<string>;
|
|
1016
|
+
|
|
1017
|
+
ending_before?: string;
|
|
1018
|
+
|
|
1019
|
+
entitled?: boolean;
|
|
1020
|
+
|
|
1021
|
+
is_commit_specific?: boolean;
|
|
1022
|
+
|
|
1023
|
+
multiplier?: number;
|
|
1024
|
+
|
|
1025
|
+
override_specifiers?: Array<Override.OverrideSpecifier>;
|
|
1026
|
+
|
|
1027
|
+
override_tiers?: Array<Shared.OverrideTier>;
|
|
1028
|
+
|
|
1029
|
+
overwrite_rate?: Override.OverwriteRate;
|
|
1030
|
+
|
|
1031
|
+
priority?: number;
|
|
1032
|
+
|
|
1033
|
+
product?: Override.Product;
|
|
1034
|
+
|
|
1035
|
+
target?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
1036
|
+
|
|
1037
|
+
type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED';
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
export namespace Override {
|
|
1041
|
+
export interface OverrideSpecifier {
|
|
1042
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1043
|
+
|
|
1044
|
+
commit_ids?: Array<string>;
|
|
1045
|
+
|
|
1046
|
+
presentation_group_values?: { [key: string]: string | null };
|
|
1047
|
+
|
|
1048
|
+
pricing_group_values?: { [key: string]: string };
|
|
1049
|
+
|
|
1050
|
+
product_id?: string;
|
|
1051
|
+
|
|
1052
|
+
product_tags?: Array<string>;
|
|
1053
|
+
|
|
1054
|
+
recurring_commit_ids?: Array<string>;
|
|
1055
|
+
|
|
1056
|
+
recurring_credit_ids?: Array<string>;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
export interface OverwriteRate {
|
|
1060
|
+
rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
|
|
1061
|
+
|
|
1062
|
+
credit_type?: Shared.CreditTypeData;
|
|
1063
|
+
|
|
1064
|
+
/**
|
|
1065
|
+
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
1066
|
+
* processors.
|
|
1067
|
+
*/
|
|
1068
|
+
custom_rate?: { [key: string]: unknown };
|
|
1069
|
+
|
|
1070
|
+
/**
|
|
1071
|
+
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
1072
|
+
* set to true.
|
|
1073
|
+
*/
|
|
1074
|
+
is_prorated?: boolean;
|
|
1075
|
+
|
|
1076
|
+
/**
|
|
1077
|
+
* Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
|
|
1078
|
+
* this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
|
|
1079
|
+
*/
|
|
1080
|
+
price?: number;
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
|
|
1084
|
+
*/
|
|
1085
|
+
quantity?: number;
|
|
1086
|
+
|
|
1087
|
+
/**
|
|
1088
|
+
* Only set for TIERED rate_type.
|
|
1089
|
+
*/
|
|
1090
|
+
tiers?: Array<Shared.Tier>;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
export interface Product {
|
|
1094
|
+
id: string;
|
|
1095
|
+
|
|
1096
|
+
name: string;
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
export interface Transition {
|
|
1101
|
+
from_contract_id: string;
|
|
1102
|
+
|
|
1103
|
+
to_contract_id: string;
|
|
1104
|
+
|
|
1105
|
+
type: 'SUPERSEDE' | 'RENEWAL';
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
export interface UsageFilter {
|
|
1109
|
+
group_key: string;
|
|
1110
|
+
|
|
1111
|
+
group_values: Array<string>;
|
|
1112
|
+
|
|
1113
|
+
/**
|
|
1114
|
+
* This will match contract starting_at value if usage filter is active from the
|
|
1115
|
+
* beginning of the contract.
|
|
1116
|
+
*/
|
|
1117
|
+
starting_at: string;
|
|
1118
|
+
|
|
1119
|
+
/**
|
|
1120
|
+
* This will match contract ending_before value if usage filter is active until the
|
|
1121
|
+
* end of the contract. It will be undefined if the contract is open-ended.
|
|
1122
|
+
*/
|
|
1123
|
+
ending_before?: string;
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
export interface UsageStatementSchedule {
|
|
1127
|
+
/**
|
|
1128
|
+
* Contract usage statements follow a selected cadence based on this date.
|
|
1129
|
+
*/
|
|
1130
|
+
billing_anchor_date: string;
|
|
1131
|
+
|
|
1132
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
export interface Credit {
|
|
1136
|
+
id: string;
|
|
1137
|
+
|
|
1138
|
+
product: Credit.Product;
|
|
1139
|
+
|
|
1140
|
+
type: 'CREDIT';
|
|
1141
|
+
|
|
1142
|
+
/**
|
|
1143
|
+
* The schedule that the customer will gain access to the credits.
|
|
1144
|
+
*/
|
|
1145
|
+
access_schedule?: Shared.ScheduleDuration;
|
|
1146
|
+
|
|
1147
|
+
applicable_contract_ids?: Array<string>;
|
|
1148
|
+
|
|
1149
|
+
applicable_product_ids?: Array<string>;
|
|
1150
|
+
|
|
1151
|
+
applicable_product_tags?: Array<string>;
|
|
1152
|
+
|
|
1153
|
+
/**
|
|
1154
|
+
* The current balance of the credit or commit. This balance reflects the amount of
|
|
1155
|
+
* credit or commit that the customer has access to use at this moment - thus,
|
|
1156
|
+
* expired and upcoming credit or commit segments contribute 0 to the balance. The
|
|
1157
|
+
* balance will match the sum of all ledger entries with the exception of the case
|
|
1158
|
+
* where the sum of negative manual ledger entries exceeds the positive amount
|
|
1159
|
+
* remaining on the credit or commit - in that case, the balance will be 0. All
|
|
1160
|
+
* manual ledger entries associated with active credit or commit segments are
|
|
1161
|
+
* included in the balance, including future-dated manual ledger entries.
|
|
1162
|
+
*/
|
|
1163
|
+
balance?: number;
|
|
1164
|
+
|
|
1165
|
+
contract?: Credit.Contract;
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1169
|
+
*/
|
|
1170
|
+
custom_fields?: { [key: string]: string };
|
|
1171
|
+
|
|
1172
|
+
description?: string;
|
|
1173
|
+
|
|
1174
|
+
/**
|
|
1175
|
+
* Optional configuration for credit hierarchy access control
|
|
1176
|
+
*/
|
|
1177
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* A list of ordered events that impact the balance of a credit. For example, an
|
|
1181
|
+
* invoice deduction or an expiration.
|
|
1182
|
+
*/
|
|
1183
|
+
ledger?: Array<
|
|
1184
|
+
| Credit.CreditSegmentStartLedgerEntry
|
|
1185
|
+
| Credit.CreditAutomatedInvoiceDeductionLedgerEntry
|
|
1186
|
+
| Credit.CreditExpirationLedgerEntry
|
|
1187
|
+
| Credit.CreditCanceledLedgerEntry
|
|
1188
|
+
| Credit.CreditCreditedLedgerEntry
|
|
1189
|
+
| Credit.CreditManualLedgerEntry
|
|
1190
|
+
| Credit.CreditSeatBasedAdjustmentLedgerEntry
|
|
1191
|
+
>;
|
|
1192
|
+
|
|
1193
|
+
name?: string;
|
|
1194
|
+
|
|
1195
|
+
/**
|
|
1196
|
+
* This field's availability is dependent on your client's configuration.
|
|
1197
|
+
*/
|
|
1198
|
+
netsuite_sales_order_id?: string;
|
|
1199
|
+
|
|
1200
|
+
/**
|
|
1201
|
+
* If multiple credits or commits are applicable, the one with the lower priority
|
|
1202
|
+
* will apply first.
|
|
1203
|
+
*/
|
|
1204
|
+
priority?: number;
|
|
1205
|
+
|
|
1206
|
+
/**
|
|
1207
|
+
* This field's availability is dependent on your client's configuration.
|
|
1208
|
+
*/
|
|
1209
|
+
salesforce_opportunity_id?: string;
|
|
1210
|
+
|
|
1211
|
+
/**
|
|
1212
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1213
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1214
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1215
|
+
*/
|
|
1216
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
export namespace Credit {
|
|
1220
|
+
export interface Product {
|
|
1221
|
+
id: string;
|
|
1222
|
+
|
|
1223
|
+
name: string;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
export interface Contract {
|
|
1227
|
+
id: string;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
export interface CreditSegmentStartLedgerEntry {
|
|
1231
|
+
amount: number;
|
|
1232
|
+
|
|
1233
|
+
segment_id: string;
|
|
1234
|
+
|
|
1235
|
+
timestamp: string;
|
|
1236
|
+
|
|
1237
|
+
type: 'CREDIT_SEGMENT_START';
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
export interface CreditAutomatedInvoiceDeductionLedgerEntry {
|
|
1241
|
+
amount: number;
|
|
1242
|
+
|
|
1243
|
+
invoice_id: string;
|
|
1244
|
+
|
|
1245
|
+
segment_id: string;
|
|
1246
|
+
|
|
1247
|
+
timestamp: string;
|
|
1248
|
+
|
|
1249
|
+
type: 'CREDIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
1250
|
+
|
|
1251
|
+
contract_id?: string;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
export interface CreditExpirationLedgerEntry {
|
|
1255
|
+
amount: number;
|
|
1256
|
+
|
|
1257
|
+
segment_id: string;
|
|
1258
|
+
|
|
1259
|
+
timestamp: string;
|
|
1260
|
+
|
|
1261
|
+
type: 'CREDIT_EXPIRATION';
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
export interface CreditCanceledLedgerEntry {
|
|
1265
|
+
amount: number;
|
|
1266
|
+
|
|
1267
|
+
invoice_id: string;
|
|
1268
|
+
|
|
1269
|
+
segment_id: string;
|
|
1270
|
+
|
|
1271
|
+
timestamp: string;
|
|
1272
|
+
|
|
1273
|
+
type: 'CREDIT_CANCELED';
|
|
1274
|
+
|
|
1275
|
+
contract_id?: string;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
export interface CreditCreditedLedgerEntry {
|
|
1279
|
+
amount: number;
|
|
1280
|
+
|
|
1281
|
+
invoice_id: string;
|
|
1282
|
+
|
|
1283
|
+
segment_id: string;
|
|
1284
|
+
|
|
1285
|
+
timestamp: string;
|
|
1286
|
+
|
|
1287
|
+
type: 'CREDIT_CREDITED';
|
|
1288
|
+
|
|
1289
|
+
contract_id?: string;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
export interface CreditManualLedgerEntry {
|
|
1293
|
+
amount: number;
|
|
1294
|
+
|
|
1295
|
+
reason: string;
|
|
1296
|
+
|
|
1297
|
+
timestamp: string;
|
|
1298
|
+
|
|
1299
|
+
type: 'CREDIT_MANUAL';
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
export interface CreditSeatBasedAdjustmentLedgerEntry {
|
|
1303
|
+
amount: number;
|
|
1304
|
+
|
|
1305
|
+
segment_id: string;
|
|
1306
|
+
|
|
1307
|
+
timestamp: string;
|
|
1308
|
+
|
|
1309
|
+
type: 'CREDIT_SEAT_BASED_ADJUSTMENT';
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* This field's availability is dependent on your client's configuration.
|
|
1315
|
+
*/
|
|
1316
|
+
export interface CustomerBillingProviderConfiguration {
|
|
1317
|
+
/**
|
|
1318
|
+
* ID of Customer's billing provider configuration.
|
|
1319
|
+
*/
|
|
1320
|
+
id: string;
|
|
1321
|
+
|
|
1322
|
+
billing_provider:
|
|
1323
|
+
| 'aws_marketplace'
|
|
1324
|
+
| 'stripe'
|
|
1325
|
+
| 'netsuite'
|
|
1326
|
+
| 'custom'
|
|
1327
|
+
| 'azure_marketplace'
|
|
1328
|
+
| 'quickbooks_online'
|
|
1329
|
+
| 'workday'
|
|
1330
|
+
| 'gcp_marketplace';
|
|
1331
|
+
|
|
1332
|
+
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* Indicates whether there are more items than the limit for this endpoint. Use the
|
|
1337
|
+
* respective list endpoints to get the full lists.
|
|
1338
|
+
*/
|
|
1339
|
+
export interface HasMore {
|
|
1340
|
+
/**
|
|
1341
|
+
* Whether there are more commits on this contract than the limit for this
|
|
1342
|
+
* endpoint. Use the /contracts/customerCommits/list endpoint to get the full list
|
|
1343
|
+
* of commits.
|
|
1344
|
+
*/
|
|
1345
|
+
commits: boolean;
|
|
1346
|
+
|
|
1347
|
+
/**
|
|
1348
|
+
* Whether there are more credits on this contract than the limit for this
|
|
1349
|
+
* endpoint. Use the /contracts/customerCredits/list endpoint to get the full list
|
|
1350
|
+
* of credits.
|
|
1351
|
+
*/
|
|
1352
|
+
credits: boolean;
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
export interface ParentHierarchyConfiguration {
|
|
1356
|
+
/**
|
|
1357
|
+
* List of contracts that belong to this parent.
|
|
1358
|
+
*/
|
|
1359
|
+
children: Array<ParentHierarchyConfiguration.Child>;
|
|
1360
|
+
|
|
1361
|
+
parent_behavior?: ParentHierarchyConfiguration.ParentBehavior;
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
export namespace ParentHierarchyConfiguration {
|
|
1365
|
+
export interface Child {
|
|
1366
|
+
contract_id: string;
|
|
1367
|
+
|
|
1368
|
+
customer_id: string;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
export interface ParentBehavior {
|
|
1372
|
+
/**
|
|
1373
|
+
* Indicates the desired behavior of consolidated invoices generated by the parent
|
|
1374
|
+
* in a customer hierarchy **CONCATENATE**: Statements on the invoices of child
|
|
1375
|
+
* customers will be appended to the consolidated invoice **NONE**: Do not generate
|
|
1376
|
+
* consolidated invoices
|
|
1377
|
+
*/
|
|
1378
|
+
invoice_consolidation_type?: 'CONCATENATE' | 'NONE';
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
export interface ChildHierarchyConfigurationV2 {
|
|
1383
|
+
/**
|
|
1384
|
+
* The single parent contract/customer for this child.
|
|
1385
|
+
*/
|
|
1386
|
+
parent: ChildHierarchyConfigurationV2.Parent;
|
|
1387
|
+
|
|
1388
|
+
/**
|
|
1389
|
+
* Indicates whether the child or parent should pay for the child's invoice charges
|
|
1390
|
+
*/
|
|
1391
|
+
payer?: 'SELF' | 'PARENT';
|
|
1392
|
+
|
|
1393
|
+
/**
|
|
1394
|
+
* Indicates the behavior of the child's invoice statements on the parent's
|
|
1395
|
+
* invoices **CONSOLIDATE**: Child's invoice statements will be added to parent's
|
|
1396
|
+
* consolidated invoices **SEPARATE**: Child's invoice statements will appear not
|
|
1397
|
+
* appear on parent's consolidated invoices
|
|
1398
|
+
*/
|
|
1399
|
+
usage_statement_behavior?: 'CONSOLIDATE' | 'SEPARATE';
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
export namespace ChildHierarchyConfigurationV2 {
|
|
1403
|
+
/**
|
|
1404
|
+
* The single parent contract/customer for this child.
|
|
1405
|
+
*/
|
|
1406
|
+
export interface Parent {
|
|
1407
|
+
contract_id: string;
|
|
1408
|
+
|
|
1409
|
+
customer_id: string;
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
export interface RecurringCommit {
|
|
1414
|
+
id: string;
|
|
1415
|
+
|
|
1416
|
+
/**
|
|
1417
|
+
* The amount of commit to grant.
|
|
1418
|
+
*/
|
|
1419
|
+
access_amount: RecurringCommit.AccessAmount;
|
|
1420
|
+
|
|
1421
|
+
/**
|
|
1422
|
+
* The amount of time the created commits will be valid for
|
|
1423
|
+
*/
|
|
1424
|
+
commit_duration: RecurringCommit.CommitDuration;
|
|
1425
|
+
|
|
1426
|
+
/**
|
|
1427
|
+
* Will be passed down to the individual commits
|
|
1428
|
+
*/
|
|
1429
|
+
priority: number;
|
|
1430
|
+
|
|
1431
|
+
product: RecurringCommit.Product;
|
|
1432
|
+
|
|
1433
|
+
/**
|
|
1434
|
+
* Whether the created commits will use the commit rate or list rate
|
|
1435
|
+
*/
|
|
1436
|
+
rate_type: 'COMMIT_RATE' | 'LIST_RATE';
|
|
1437
|
+
|
|
1438
|
+
/**
|
|
1439
|
+
* Determines the start time for the first commit
|
|
1440
|
+
*/
|
|
1441
|
+
starting_at: string;
|
|
1442
|
+
|
|
1443
|
+
/**
|
|
1444
|
+
* Will be passed down to the individual commits
|
|
1445
|
+
*/
|
|
1446
|
+
applicable_product_ids?: Array<string>;
|
|
1447
|
+
|
|
1448
|
+
/**
|
|
1449
|
+
* Will be passed down to the individual commits
|
|
1450
|
+
*/
|
|
1451
|
+
applicable_product_tags?: Array<string>;
|
|
1452
|
+
|
|
1453
|
+
contract?: RecurringCommit.Contract;
|
|
1454
|
+
|
|
1455
|
+
/**
|
|
1456
|
+
* Will be passed down to the individual commits
|
|
1457
|
+
*/
|
|
1458
|
+
description?: string;
|
|
1459
|
+
|
|
1460
|
+
/**
|
|
1461
|
+
* Determines when the contract will stop creating recurring commits. Optional
|
|
1462
|
+
*/
|
|
1463
|
+
ending_before?: string;
|
|
1464
|
+
|
|
1465
|
+
/**
|
|
1466
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
1467
|
+
*/
|
|
1468
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
1469
|
+
|
|
1470
|
+
/**
|
|
1471
|
+
* The amount the customer should be billed for the commit. Not required.
|
|
1472
|
+
*/
|
|
1473
|
+
invoice_amount?: RecurringCommit.InvoiceAmount;
|
|
1474
|
+
|
|
1475
|
+
/**
|
|
1476
|
+
* Displayed on invoices. Will be passed through to the individual commits
|
|
1477
|
+
*/
|
|
1478
|
+
name?: string;
|
|
1479
|
+
|
|
1480
|
+
/**
|
|
1481
|
+
* Will be passed down to the individual commits
|
|
1482
|
+
*/
|
|
1483
|
+
netsuite_sales_order_id?: string;
|
|
1484
|
+
|
|
1485
|
+
/**
|
|
1486
|
+
* Determines whether the first and last commit will be prorated. If not provided,
|
|
1487
|
+
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1488
|
+
*/
|
|
1489
|
+
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1490
|
+
|
|
1491
|
+
/**
|
|
1492
|
+
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1493
|
+
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1494
|
+
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1495
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1496
|
+
* invoice dates.
|
|
1497
|
+
*/
|
|
1498
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1499
|
+
|
|
1500
|
+
/**
|
|
1501
|
+
* Will be passed down to the individual commits. This controls how much of an
|
|
1502
|
+
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1503
|
+
* between 0 and 1.
|
|
1504
|
+
*/
|
|
1505
|
+
rollover_fraction?: number;
|
|
1506
|
+
|
|
1507
|
+
/**
|
|
1508
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1509
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1510
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1511
|
+
*/
|
|
1512
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
1513
|
+
|
|
1514
|
+
/**
|
|
1515
|
+
* Attach a subscription to the recurring commit/credit.
|
|
1516
|
+
*/
|
|
1517
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
export namespace RecurringCommit {
|
|
1521
|
+
/**
|
|
1522
|
+
* The amount of commit to grant.
|
|
1523
|
+
*/
|
|
1524
|
+
export interface AccessAmount {
|
|
1525
|
+
credit_type_id: string;
|
|
1526
|
+
|
|
1527
|
+
unit_price: number;
|
|
1528
|
+
|
|
1529
|
+
quantity?: number;
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
/**
|
|
1533
|
+
* The amount of time the created commits will be valid for
|
|
1534
|
+
*/
|
|
1535
|
+
export interface CommitDuration {
|
|
1536
|
+
value: number;
|
|
1537
|
+
|
|
1538
|
+
unit?: 'PERIODS';
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
export interface Product {
|
|
1542
|
+
id: string;
|
|
1543
|
+
|
|
1544
|
+
name: string;
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
export interface Contract {
|
|
1548
|
+
id: string;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
/**
|
|
1552
|
+
* The amount the customer should be billed for the commit. Not required.
|
|
1553
|
+
*/
|
|
1554
|
+
export interface InvoiceAmount {
|
|
1555
|
+
credit_type_id: string;
|
|
1556
|
+
|
|
1557
|
+
quantity: number;
|
|
1558
|
+
|
|
1559
|
+
unit_price: number;
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
export interface RecurringCredit {
|
|
1564
|
+
id: string;
|
|
1565
|
+
|
|
1566
|
+
/**
|
|
1567
|
+
* The amount of commit to grant.
|
|
1568
|
+
*/
|
|
1569
|
+
access_amount: RecurringCredit.AccessAmount;
|
|
1570
|
+
|
|
1571
|
+
/**
|
|
1572
|
+
* The amount of time the created commits will be valid for
|
|
1573
|
+
*/
|
|
1574
|
+
commit_duration: RecurringCredit.CommitDuration;
|
|
1575
|
+
|
|
1576
|
+
/**
|
|
1577
|
+
* Will be passed down to the individual commits
|
|
1578
|
+
*/
|
|
1579
|
+
priority: number;
|
|
1580
|
+
|
|
1581
|
+
product: RecurringCredit.Product;
|
|
1582
|
+
|
|
1583
|
+
/**
|
|
1584
|
+
* Whether the created commits will use the commit rate or list rate
|
|
1585
|
+
*/
|
|
1586
|
+
rate_type: 'COMMIT_RATE' | 'LIST_RATE';
|
|
1587
|
+
|
|
1588
|
+
/**
|
|
1589
|
+
* Determines the start time for the first commit
|
|
1590
|
+
*/
|
|
1591
|
+
starting_at: string;
|
|
1592
|
+
|
|
1593
|
+
/**
|
|
1594
|
+
* Will be passed down to the individual commits
|
|
1595
|
+
*/
|
|
1596
|
+
applicable_product_ids?: Array<string>;
|
|
1597
|
+
|
|
1598
|
+
/**
|
|
1599
|
+
* Will be passed down to the individual commits
|
|
1600
|
+
*/
|
|
1601
|
+
applicable_product_tags?: Array<string>;
|
|
1602
|
+
|
|
1603
|
+
contract?: RecurringCredit.Contract;
|
|
1604
|
+
|
|
1605
|
+
/**
|
|
1606
|
+
* Will be passed down to the individual commits
|
|
1607
|
+
*/
|
|
1608
|
+
description?: string;
|
|
1609
|
+
|
|
1610
|
+
/**
|
|
1611
|
+
* Determines when the contract will stop creating recurring commits. Optional
|
|
1612
|
+
*/
|
|
1613
|
+
ending_before?: string;
|
|
1614
|
+
|
|
1615
|
+
/**
|
|
1616
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
1617
|
+
*/
|
|
1618
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
1619
|
+
|
|
1620
|
+
/**
|
|
1621
|
+
* Displayed on invoices. Will be passed through to the individual commits
|
|
1622
|
+
*/
|
|
1623
|
+
name?: string;
|
|
1624
|
+
|
|
1625
|
+
/**
|
|
1626
|
+
* Will be passed down to the individual commits
|
|
1627
|
+
*/
|
|
1628
|
+
netsuite_sales_order_id?: string;
|
|
1629
|
+
|
|
1630
|
+
/**
|
|
1631
|
+
* Determines whether the first and last commit will be prorated. If not provided,
|
|
1632
|
+
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1633
|
+
*/
|
|
1634
|
+
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1635
|
+
|
|
1636
|
+
/**
|
|
1637
|
+
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1638
|
+
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1639
|
+
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1640
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1641
|
+
* invoice dates.
|
|
1642
|
+
*/
|
|
1643
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1644
|
+
|
|
1645
|
+
/**
|
|
1646
|
+
* Will be passed down to the individual commits. This controls how much of an
|
|
1647
|
+
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1648
|
+
* between 0 and 1.
|
|
1649
|
+
*/
|
|
1650
|
+
rollover_fraction?: number;
|
|
1651
|
+
|
|
1652
|
+
/**
|
|
1653
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1654
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1655
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1656
|
+
*/
|
|
1657
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
1658
|
+
|
|
1659
|
+
/**
|
|
1660
|
+
* Attach a subscription to the recurring commit/credit.
|
|
1661
|
+
*/
|
|
1662
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
export namespace RecurringCredit {
|
|
1666
|
+
/**
|
|
1667
|
+
* The amount of commit to grant.
|
|
1668
|
+
*/
|
|
1669
|
+
export interface AccessAmount {
|
|
1670
|
+
credit_type_id: string;
|
|
1671
|
+
|
|
1672
|
+
unit_price: number;
|
|
1673
|
+
|
|
1674
|
+
quantity?: number;
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
/**
|
|
1678
|
+
* The amount of time the created commits will be valid for
|
|
1679
|
+
*/
|
|
1680
|
+
export interface CommitDuration {
|
|
1681
|
+
value: number;
|
|
1682
|
+
|
|
1683
|
+
unit?: 'PERIODS';
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
export interface Product {
|
|
1687
|
+
id: string;
|
|
1688
|
+
|
|
1689
|
+
name: string;
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
export interface Contract {
|
|
1693
|
+
id: string;
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
export interface ResellerRoyalty {
|
|
1698
|
+
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
1699
|
+
|
|
1700
|
+
segments: Array<ResellerRoyalty.Segment>;
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
export namespace ResellerRoyalty {
|
|
1704
|
+
export interface Segment {
|
|
1705
|
+
fraction: number;
|
|
1706
|
+
|
|
1707
|
+
netsuite_reseller_id: string;
|
|
1708
|
+
|
|
1709
|
+
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
1710
|
+
|
|
1711
|
+
starting_at: string;
|
|
1712
|
+
|
|
1713
|
+
applicable_product_ids?: Array<string>;
|
|
1714
|
+
|
|
1715
|
+
applicable_product_tags?: Array<string>;
|
|
1716
|
+
|
|
1717
|
+
aws_account_number?: string;
|
|
1718
|
+
|
|
1719
|
+
aws_offer_id?: string;
|
|
1720
|
+
|
|
1721
|
+
aws_payer_reference_id?: string;
|
|
1722
|
+
|
|
1723
|
+
ending_before?: string;
|
|
1724
|
+
|
|
1725
|
+
gcp_account_id?: string;
|
|
1726
|
+
|
|
1727
|
+
gcp_offer_id?: string;
|
|
1728
|
+
|
|
1729
|
+
reseller_contract_value?: number;
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
export interface ContractWithoutAmendments {
|
|
1735
|
+
commits: Array<Commit>;
|
|
1736
|
+
|
|
1737
|
+
created_at: string;
|
|
1738
|
+
|
|
1739
|
+
created_by: string;
|
|
1740
|
+
|
|
1741
|
+
overrides: Array<Override>;
|
|
1742
|
+
|
|
1743
|
+
scheduled_charges: Array<ScheduledCharge>;
|
|
1744
|
+
|
|
1745
|
+
starting_at: string;
|
|
1746
|
+
|
|
1747
|
+
transitions: Array<ContractWithoutAmendments.Transition>;
|
|
1748
|
+
|
|
1749
|
+
usage_statement_schedule: ContractWithoutAmendments.UsageStatementSchedule;
|
|
1750
|
+
|
|
1751
|
+
credits?: Array<Credit>;
|
|
1752
|
+
|
|
1753
|
+
/**
|
|
1754
|
+
* This field's availability is dependent on your client's
|
|
1755
|
+
*/
|
|
1756
|
+
discounts?: Array<Discount>;
|
|
1757
|
+
|
|
1758
|
+
ending_before?: string;
|
|
552
1759
|
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
1760
|
+
/**
|
|
1761
|
+
* Either a **parent** configuration with a list of children or a **child**
|
|
1762
|
+
* configuration with a single parent.
|
|
1763
|
+
*/
|
|
1764
|
+
hierarchy_configuration?: HierarchyConfiguration;
|
|
558
1765
|
|
|
559
|
-
|
|
560
|
-
* List of filters that determine what kind of customer usage draws down a commit
|
|
561
|
-
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
562
|
-
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
563
|
-
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
564
|
-
*/
|
|
565
|
-
specifiers?: Array<Commit.Specifier>;
|
|
566
|
-
}
|
|
1766
|
+
name?: string;
|
|
567
1767
|
|
|
568
|
-
|
|
569
|
-
export interface Specifier {
|
|
570
|
-
presentation_group_values?: { [key: string]: string };
|
|
1768
|
+
net_payment_terms_days?: number;
|
|
571
1769
|
|
|
572
|
-
|
|
1770
|
+
/**
|
|
1771
|
+
* This field's availability is dependent on your client's configuration.
|
|
1772
|
+
*/
|
|
1773
|
+
netsuite_sales_order_id?: string;
|
|
573
1774
|
|
|
574
|
-
|
|
575
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
576
|
-
*/
|
|
577
|
-
product_id?: string;
|
|
1775
|
+
prepaid_balance_threshold_configuration?: PrepaidBalanceThresholdConfiguration;
|
|
578
1776
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
product_tags?: Array<string>;
|
|
584
|
-
}
|
|
585
|
-
}
|
|
1777
|
+
/**
|
|
1778
|
+
* This field's availability is dependent on your client's configuration.
|
|
1779
|
+
*/
|
|
1780
|
+
professional_services?: Array<ProService>;
|
|
586
1781
|
|
|
587
|
-
|
|
588
|
-
/**
|
|
589
|
-
* Gate access to the commit balance based on successful collection of payment.
|
|
590
|
-
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
591
|
-
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
592
|
-
* wish to payment gate the commit balance.
|
|
593
|
-
*/
|
|
594
|
-
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
1782
|
+
rate_card_id?: string;
|
|
595
1783
|
|
|
596
|
-
|
|
597
|
-
* Only applicable if using PRECALCULATED as your tax type.
|
|
598
|
-
*/
|
|
599
|
-
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
1784
|
+
recurring_commits?: Array<ContractWithoutAmendments.RecurringCommit>;
|
|
600
1785
|
|
|
601
|
-
|
|
602
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
603
|
-
*/
|
|
604
|
-
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
1786
|
+
recurring_credits?: Array<ContractWithoutAmendments.RecurringCredit>;
|
|
605
1787
|
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
*/
|
|
611
|
-
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
612
|
-
}
|
|
1788
|
+
/**
|
|
1789
|
+
* This field's availability is dependent on your client's configuration.
|
|
1790
|
+
*/
|
|
1791
|
+
reseller_royalties?: Array<ContractWithoutAmendments.ResellerRoyalty>;
|
|
613
1792
|
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
export interface PrecalculatedTaxConfig {
|
|
619
|
-
/**
|
|
620
|
-
* Amount of tax to be applied. This should be in the same currency and
|
|
621
|
-
* denomination as the commit's invoice schedule
|
|
622
|
-
*/
|
|
623
|
-
tax_amount: number;
|
|
624
|
-
|
|
625
|
-
/**
|
|
626
|
-
* Name of the tax to be applied. This may be used in an invoice line item
|
|
627
|
-
* description.
|
|
628
|
-
*/
|
|
629
|
-
tax_name?: string;
|
|
630
|
-
}
|
|
1793
|
+
/**
|
|
1794
|
+
* This field's availability is dependent on your client's configuration.
|
|
1795
|
+
*/
|
|
1796
|
+
salesforce_opportunity_id?: string;
|
|
631
1797
|
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
1798
|
+
/**
|
|
1799
|
+
* Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
1800
|
+
* usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
1801
|
+
* `ending_before` date for consolidation to occur. This field cannot be modified
|
|
1802
|
+
* after a Contract has been created. If this field is omitted, charges will appear
|
|
1803
|
+
* on a separate invoice from usage charges.
|
|
1804
|
+
*/
|
|
1805
|
+
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
1806
|
+
|
|
1807
|
+
spend_threshold_configuration?: SpendThresholdConfiguration;
|
|
1808
|
+
|
|
1809
|
+
/**
|
|
1810
|
+
* This field's availability is dependent on your client's configuration.
|
|
1811
|
+
*/
|
|
1812
|
+
total_contract_value?: number;
|
|
1813
|
+
|
|
1814
|
+
usage_filter?: ContractWithoutAmendments.UsageFilter;
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1817
|
+
export namespace ContractWithoutAmendments {
|
|
1818
|
+
export interface Transition {
|
|
1819
|
+
from_contract_id: string;
|
|
1820
|
+
|
|
1821
|
+
to_contract_id: string;
|
|
1822
|
+
|
|
1823
|
+
type: 'SUPERSEDE' | 'RENEWAL';
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
export interface UsageStatementSchedule {
|
|
1827
|
+
/**
|
|
1828
|
+
* Contract usage statements follow a selected cadence based on this date.
|
|
1829
|
+
*/
|
|
1830
|
+
billing_anchor_date: string;
|
|
1831
|
+
|
|
1832
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
648
1833
|
}
|
|
649
1834
|
|
|
650
1835
|
export interface RecurringCommit {
|
|
@@ -702,7 +1887,7 @@ export namespace ContractWithoutAmendments {
|
|
|
702
1887
|
/**
|
|
703
1888
|
* Optional configuration for recurring commit/credit hierarchy access control
|
|
704
1889
|
*/
|
|
705
|
-
hierarchy_configuration?:
|
|
1890
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
706
1891
|
|
|
707
1892
|
/**
|
|
708
1893
|
* The amount the customer should be billed for the commit. Not required.
|
|
@@ -746,12 +1931,12 @@ export namespace ContractWithoutAmendments {
|
|
|
746
1931
|
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
747
1932
|
* specifiers to contribute to a commit's or credit's drawdown.
|
|
748
1933
|
*/
|
|
749
|
-
specifiers?: Array<
|
|
1934
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
750
1935
|
|
|
751
1936
|
/**
|
|
752
1937
|
* Attach a subscription to the recurring commit/credit.
|
|
753
1938
|
*/
|
|
754
|
-
subscription_config?:
|
|
1939
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
755
1940
|
}
|
|
756
1941
|
|
|
757
1942
|
export namespace RecurringCommit {
|
|
@@ -785,32 +1970,6 @@ export namespace ContractWithoutAmendments {
|
|
|
785
1970
|
id: string;
|
|
786
1971
|
}
|
|
787
1972
|
|
|
788
|
-
/**
|
|
789
|
-
* Optional configuration for recurring commit/credit hierarchy access control
|
|
790
|
-
*/
|
|
791
|
-
export interface HierarchyConfiguration {
|
|
792
|
-
child_access:
|
|
793
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessAll
|
|
794
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessNone
|
|
795
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
export namespace HierarchyConfiguration {
|
|
799
|
-
export interface CommitHierarchyChildAccessAll {
|
|
800
|
-
type: 'ALL';
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
export interface CommitHierarchyChildAccessNone {
|
|
804
|
-
type: 'NONE';
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
export interface CommitHierarchyChildAccessContractIDs {
|
|
808
|
-
contract_ids: Array<string>;
|
|
809
|
-
|
|
810
|
-
type: 'CONTRACT_IDS';
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
|
|
814
1973
|
/**
|
|
815
1974
|
* The amount the customer should be billed for the commit. Not required.
|
|
816
1975
|
*/
|
|
@@ -821,43 +1980,6 @@ export namespace ContractWithoutAmendments {
|
|
|
821
1980
|
|
|
822
1981
|
unit_price: number;
|
|
823
1982
|
}
|
|
824
|
-
|
|
825
|
-
export interface Specifier {
|
|
826
|
-
presentation_group_values?: { [key: string]: string };
|
|
827
|
-
|
|
828
|
-
pricing_group_values?: { [key: string]: string };
|
|
829
|
-
|
|
830
|
-
/**
|
|
831
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
832
|
-
*/
|
|
833
|
-
product_id?: string;
|
|
834
|
-
|
|
835
|
-
/**
|
|
836
|
-
* If provided, the specifier will only apply to products with all the specified
|
|
837
|
-
* tags.
|
|
838
|
-
*/
|
|
839
|
-
product_tags?: Array<string>;
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
/**
|
|
843
|
-
* Attach a subscription to the recurring commit/credit.
|
|
844
|
-
*/
|
|
845
|
-
export interface SubscriptionConfig {
|
|
846
|
-
allocation: 'INDIVIDUAL' | 'POOLED';
|
|
847
|
-
|
|
848
|
-
apply_seat_increase_config: SubscriptionConfig.ApplySeatIncreaseConfig;
|
|
849
|
-
|
|
850
|
-
subscription_id: string;
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
export namespace SubscriptionConfig {
|
|
854
|
-
export interface ApplySeatIncreaseConfig {
|
|
855
|
-
/**
|
|
856
|
-
* Indicates whether a mid-period seat increase should be prorated.
|
|
857
|
-
*/
|
|
858
|
-
is_prorated: boolean;
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
1983
|
}
|
|
862
1984
|
|
|
863
1985
|
export interface RecurringCredit {
|
|
@@ -915,7 +2037,7 @@ export namespace ContractWithoutAmendments {
|
|
|
915
2037
|
/**
|
|
916
2038
|
* Optional configuration for recurring commit/credit hierarchy access control
|
|
917
2039
|
*/
|
|
918
|
-
hierarchy_configuration?:
|
|
2040
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
919
2041
|
|
|
920
2042
|
/**
|
|
921
2043
|
* Displayed on invoices. Will be passed through to the individual commits
|
|
@@ -954,12 +2076,12 @@ export namespace ContractWithoutAmendments {
|
|
|
954
2076
|
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
955
2077
|
* specifiers to contribute to a commit's or credit's drawdown.
|
|
956
2078
|
*/
|
|
957
|
-
specifiers?: Array<
|
|
2079
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
958
2080
|
|
|
959
2081
|
/**
|
|
960
2082
|
* Attach a subscription to the recurring commit/credit.
|
|
961
2083
|
*/
|
|
962
|
-
subscription_config?:
|
|
2084
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
963
2085
|
}
|
|
964
2086
|
|
|
965
2087
|
export namespace RecurringCredit {
|
|
@@ -992,69 +2114,6 @@ export namespace ContractWithoutAmendments {
|
|
|
992
2114
|
export interface Contract {
|
|
993
2115
|
id: string;
|
|
994
2116
|
}
|
|
995
|
-
|
|
996
|
-
/**
|
|
997
|
-
* Optional configuration for recurring commit/credit hierarchy access control
|
|
998
|
-
*/
|
|
999
|
-
export interface HierarchyConfiguration {
|
|
1000
|
-
child_access:
|
|
1001
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessAll
|
|
1002
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessNone
|
|
1003
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
export namespace HierarchyConfiguration {
|
|
1007
|
-
export interface CommitHierarchyChildAccessAll {
|
|
1008
|
-
type: 'ALL';
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
export interface CommitHierarchyChildAccessNone {
|
|
1012
|
-
type: 'NONE';
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
export interface CommitHierarchyChildAccessContractIDs {
|
|
1016
|
-
contract_ids: Array<string>;
|
|
1017
|
-
|
|
1018
|
-
type: 'CONTRACT_IDS';
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
export interface Specifier {
|
|
1023
|
-
presentation_group_values?: { [key: string]: string };
|
|
1024
|
-
|
|
1025
|
-
pricing_group_values?: { [key: string]: string };
|
|
1026
|
-
|
|
1027
|
-
/**
|
|
1028
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1029
|
-
*/
|
|
1030
|
-
product_id?: string;
|
|
1031
|
-
|
|
1032
|
-
/**
|
|
1033
|
-
* If provided, the specifier will only apply to products with all the specified
|
|
1034
|
-
* tags.
|
|
1035
|
-
*/
|
|
1036
|
-
product_tags?: Array<string>;
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
/**
|
|
1040
|
-
* Attach a subscription to the recurring commit/credit.
|
|
1041
|
-
*/
|
|
1042
|
-
export interface SubscriptionConfig {
|
|
1043
|
-
allocation: 'INDIVIDUAL' | 'POOLED';
|
|
1044
|
-
|
|
1045
|
-
apply_seat_increase_config: SubscriptionConfig.ApplySeatIncreaseConfig;
|
|
1046
|
-
|
|
1047
|
-
subscription_id: string;
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
export namespace SubscriptionConfig {
|
|
1051
|
-
export interface ApplySeatIncreaseConfig {
|
|
1052
|
-
/**
|
|
1053
|
-
* Indicates whether a mid-period seat increase should be prorated.
|
|
1054
|
-
*/
|
|
1055
|
-
is_prorated: boolean;
|
|
1056
|
-
}
|
|
1057
|
-
}
|
|
1058
2117
|
}
|
|
1059
2118
|
|
|
1060
2119
|
export interface ResellerRoyalty {
|
|
@@ -1085,105 +2144,6 @@ export namespace ContractWithoutAmendments {
|
|
|
1085
2144
|
reseller_contract_value?: number;
|
|
1086
2145
|
}
|
|
1087
2146
|
|
|
1088
|
-
export interface SpendThresholdConfiguration {
|
|
1089
|
-
commit: SpendThresholdConfiguration.Commit;
|
|
1090
|
-
|
|
1091
|
-
/**
|
|
1092
|
-
* When set to false, the contract will not be evaluated against the
|
|
1093
|
-
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
1094
|
-
* regardless of prior state.
|
|
1095
|
-
*/
|
|
1096
|
-
is_enabled: boolean;
|
|
1097
|
-
|
|
1098
|
-
payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
|
|
1099
|
-
|
|
1100
|
-
/**
|
|
1101
|
-
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
1102
|
-
* hits this amount, a threshold charge will be initiated.
|
|
1103
|
-
*/
|
|
1104
|
-
threshold_amount: number;
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
export namespace SpendThresholdConfiguration {
|
|
1108
|
-
export interface Commit {
|
|
1109
|
-
/**
|
|
1110
|
-
* The commit product that will be used to generate the line item for commit
|
|
1111
|
-
* payment.
|
|
1112
|
-
*/
|
|
1113
|
-
product_id: string;
|
|
1114
|
-
|
|
1115
|
-
description?: string;
|
|
1116
|
-
|
|
1117
|
-
/**
|
|
1118
|
-
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
1119
|
-
* will default to the commit product name.
|
|
1120
|
-
*/
|
|
1121
|
-
name?: string;
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
export interface PaymentGateConfig {
|
|
1125
|
-
/**
|
|
1126
|
-
* Gate access to the commit balance based on successful collection of payment.
|
|
1127
|
-
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
1128
|
-
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
1129
|
-
* wish to payment gate the commit balance.
|
|
1130
|
-
*/
|
|
1131
|
-
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
1132
|
-
|
|
1133
|
-
/**
|
|
1134
|
-
* Only applicable if using PRECALCULATED as your tax type.
|
|
1135
|
-
*/
|
|
1136
|
-
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
1137
|
-
|
|
1138
|
-
/**
|
|
1139
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
1140
|
-
*/
|
|
1141
|
-
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
1142
|
-
|
|
1143
|
-
/**
|
|
1144
|
-
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
1145
|
-
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
1146
|
-
* will default to NONE.
|
|
1147
|
-
*/
|
|
1148
|
-
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
export namespace PaymentGateConfig {
|
|
1152
|
-
/**
|
|
1153
|
-
* Only applicable if using PRECALCULATED as your tax type.
|
|
1154
|
-
*/
|
|
1155
|
-
export interface PrecalculatedTaxConfig {
|
|
1156
|
-
/**
|
|
1157
|
-
* Amount of tax to be applied. This should be in the same currency and
|
|
1158
|
-
* denomination as the commit's invoice schedule
|
|
1159
|
-
*/
|
|
1160
|
-
tax_amount: number;
|
|
1161
|
-
|
|
1162
|
-
/**
|
|
1163
|
-
* Name of the tax to be applied. This may be used in an invoice line item
|
|
1164
|
-
* description.
|
|
1165
|
-
*/
|
|
1166
|
-
tax_name?: string;
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1169
|
-
/**
|
|
1170
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
1171
|
-
*/
|
|
1172
|
-
export interface StripeConfig {
|
|
1173
|
-
/**
|
|
1174
|
-
* If left blank, will default to INVOICE
|
|
1175
|
-
*/
|
|
1176
|
-
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
1177
|
-
|
|
1178
|
-
/**
|
|
1179
|
-
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
1180
|
-
* your payment type.
|
|
1181
|
-
*/
|
|
1182
|
-
invoice_metadata?: { [key: string]: string };
|
|
1183
|
-
}
|
|
1184
|
-
}
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
2147
|
export interface UsageFilter {
|
|
1188
2148
|
current: Shared.BaseUsageFilter | null;
|
|
1189
2149
|
|
|
@@ -1235,6 +2195,9 @@ export interface Credit {
|
|
|
1235
2195
|
|
|
1236
2196
|
contract?: Credit.Contract;
|
|
1237
2197
|
|
|
2198
|
+
/**
|
|
2199
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2200
|
+
*/
|
|
1238
2201
|
custom_fields?: { [key: string]: string };
|
|
1239
2202
|
|
|
1240
2203
|
description?: string;
|
|
@@ -1242,7 +2205,7 @@ export interface Credit {
|
|
|
1242
2205
|
/**
|
|
1243
2206
|
* Optional configuration for credit hierarchy access control
|
|
1244
2207
|
*/
|
|
1245
|
-
hierarchy_configuration?:
|
|
2208
|
+
hierarchy_configuration?: CommitHierarchyConfiguration;
|
|
1246
2209
|
|
|
1247
2210
|
/**
|
|
1248
2211
|
* A list of ordered events that impact the balance of a credit. For example, an
|
|
@@ -1283,7 +2246,7 @@ export interface Credit {
|
|
|
1283
2246
|
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1284
2247
|
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1285
2248
|
*/
|
|
1286
|
-
specifiers?: Array<
|
|
2249
|
+
specifiers?: Array<CommitSpecifier>;
|
|
1287
2250
|
|
|
1288
2251
|
/**
|
|
1289
2252
|
* Prevents the creation of duplicates. If a request to create a commit or credit
|
|
@@ -1305,32 +2268,6 @@ export namespace Credit {
|
|
|
1305
2268
|
id: string;
|
|
1306
2269
|
}
|
|
1307
2270
|
|
|
1308
|
-
/**
|
|
1309
|
-
* Optional configuration for credit hierarchy access control
|
|
1310
|
-
*/
|
|
1311
|
-
export interface HierarchyConfiguration {
|
|
1312
|
-
child_access:
|
|
1313
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessAll
|
|
1314
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessNone
|
|
1315
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
export namespace HierarchyConfiguration {
|
|
1319
|
-
export interface CommitHierarchyChildAccessAll {
|
|
1320
|
-
type: 'ALL';
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
|
-
export interface CommitHierarchyChildAccessNone {
|
|
1324
|
-
type: 'NONE';
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
export interface CommitHierarchyChildAccessContractIDs {
|
|
1328
|
-
contract_ids: Array<string>;
|
|
1329
|
-
|
|
1330
|
-
type: 'CONTRACT_IDS';
|
|
1331
|
-
}
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
2271
|
export interface CreditSegmentStartLedgerEntry {
|
|
1335
2272
|
amount: number;
|
|
1336
2273
|
|
|
@@ -1412,23 +2349,6 @@ export namespace Credit {
|
|
|
1412
2349
|
|
|
1413
2350
|
type: 'CREDIT_SEAT_BASED_ADJUSTMENT';
|
|
1414
2351
|
}
|
|
1415
|
-
|
|
1416
|
-
export interface Specifier {
|
|
1417
|
-
presentation_group_values?: { [key: string]: string };
|
|
1418
|
-
|
|
1419
|
-
pricing_group_values?: { [key: string]: string };
|
|
1420
|
-
|
|
1421
|
-
/**
|
|
1422
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1423
|
-
*/
|
|
1424
|
-
product_id?: string;
|
|
1425
|
-
|
|
1426
|
-
/**
|
|
1427
|
-
* If provided, the specifier will only apply to products with all the specified
|
|
1428
|
-
* tags.
|
|
1429
|
-
*/
|
|
1430
|
-
product_tags?: Array<string>;
|
|
1431
|
-
}
|
|
1432
2352
|
}
|
|
1433
2353
|
|
|
1434
2354
|
export interface CreditTypeData {
|
|
@@ -1444,6 +2364,9 @@ export interface Discount {
|
|
|
1444
2364
|
|
|
1445
2365
|
schedule: SchedulePointInTime;
|
|
1446
2366
|
|
|
2367
|
+
/**
|
|
2368
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2369
|
+
*/
|
|
1447
2370
|
custom_fields?: { [key: string]: string };
|
|
1448
2371
|
|
|
1449
2372
|
name?: string;
|
|
@@ -1481,6 +2404,74 @@ export interface EventTypeFilter {
|
|
|
1481
2404
|
not_in_values?: Array<string>;
|
|
1482
2405
|
}
|
|
1483
2406
|
|
|
2407
|
+
/**
|
|
2408
|
+
* Either a **parent** configuration with a list of children or a **child**
|
|
2409
|
+
* configuration with a single parent.
|
|
2410
|
+
*/
|
|
2411
|
+
export type HierarchyConfiguration =
|
|
2412
|
+
| HierarchyConfiguration.ParentHierarchyConfiguration
|
|
2413
|
+
| HierarchyConfiguration.ChildHierarchyConfiguration;
|
|
2414
|
+
|
|
2415
|
+
export namespace HierarchyConfiguration {
|
|
2416
|
+
export interface ParentHierarchyConfiguration {
|
|
2417
|
+
/**
|
|
2418
|
+
* List of contracts that belong to this parent.
|
|
2419
|
+
*/
|
|
2420
|
+
children: Array<ParentHierarchyConfiguration.Child>;
|
|
2421
|
+
|
|
2422
|
+
parent_behavior?: ParentHierarchyConfiguration.ParentBehavior;
|
|
2423
|
+
}
|
|
2424
|
+
|
|
2425
|
+
export namespace ParentHierarchyConfiguration {
|
|
2426
|
+
export interface Child {
|
|
2427
|
+
contract_id: string;
|
|
2428
|
+
|
|
2429
|
+
customer_id: string;
|
|
2430
|
+
}
|
|
2431
|
+
|
|
2432
|
+
export interface ParentBehavior {
|
|
2433
|
+
/**
|
|
2434
|
+
* Indicates the desired behavior of consolidated invoices generated by the parent
|
|
2435
|
+
* in a customer hierarchy **CONCATENATE**: Statements on the invoices of child
|
|
2436
|
+
* customers will be appended to the consolidated invoice **NONE**: Do not generate
|
|
2437
|
+
* consolidated invoices
|
|
2438
|
+
*/
|
|
2439
|
+
invoice_consolidation_type?: 'CONCATENATE' | 'NONE';
|
|
2440
|
+
}
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
export interface ChildHierarchyConfiguration {
|
|
2444
|
+
/**
|
|
2445
|
+
* The single parent contract/customer for this child.
|
|
2446
|
+
*/
|
|
2447
|
+
parent: ChildHierarchyConfiguration.Parent;
|
|
2448
|
+
|
|
2449
|
+
/**
|
|
2450
|
+
* Indicates whether the parent should pay for the child's invoice charges
|
|
2451
|
+
*/
|
|
2452
|
+
payer?: 'SELF' | 'PARENT';
|
|
2453
|
+
|
|
2454
|
+
/**
|
|
2455
|
+
* Indicates the behavior of the child's invoice statements on the parent's
|
|
2456
|
+
* invoices **CONSOLIDATE**: Child's invoice statements will be added to parent's
|
|
2457
|
+
* consolidated invoices **SEPARATE**: Child's invoice statements will appear not
|
|
2458
|
+
* appear on parent's consolidated invoices
|
|
2459
|
+
*/
|
|
2460
|
+
usage_statement_behavior?: 'CONSOLIDATE' | 'SEPARATE';
|
|
2461
|
+
}
|
|
2462
|
+
|
|
2463
|
+
export namespace ChildHierarchyConfiguration {
|
|
2464
|
+
/**
|
|
2465
|
+
* The single parent contract/customer for this child.
|
|
2466
|
+
*/
|
|
2467
|
+
export interface Parent {
|
|
2468
|
+
contract_id: string;
|
|
2469
|
+
|
|
2470
|
+
customer_id: string;
|
|
2471
|
+
}
|
|
2472
|
+
}
|
|
2473
|
+
}
|
|
2474
|
+
|
|
1484
2475
|
export interface ID {
|
|
1485
2476
|
id: string;
|
|
1486
2477
|
}
|
|
@@ -1510,9 +2501,9 @@ export interface Override {
|
|
|
1510
2501
|
|
|
1511
2502
|
override_specifiers?: Array<Override.OverrideSpecifier>;
|
|
1512
2503
|
|
|
1513
|
-
override_tiers?: Array<
|
|
2504
|
+
override_tiers?: Array<OverrideTier>;
|
|
1514
2505
|
|
|
1515
|
-
overwrite_rate?:
|
|
2506
|
+
overwrite_rate?: OverwriteRate;
|
|
1516
2507
|
|
|
1517
2508
|
/**
|
|
1518
2509
|
* Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
|
|
@@ -1566,50 +2557,288 @@ export namespace Override {
|
|
|
1566
2557
|
recurring_credit_ids?: Array<string>;
|
|
1567
2558
|
}
|
|
1568
2559
|
|
|
1569
|
-
export interface
|
|
1570
|
-
|
|
2560
|
+
export interface Product {
|
|
2561
|
+
id: string;
|
|
2562
|
+
|
|
2563
|
+
name: string;
|
|
2564
|
+
}
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
export interface OverrideTier {
|
|
2568
|
+
multiplier: number;
|
|
2569
|
+
|
|
2570
|
+
size?: number;
|
|
2571
|
+
}
|
|
2572
|
+
|
|
2573
|
+
export interface OverwriteRate {
|
|
2574
|
+
rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
|
|
2575
|
+
|
|
2576
|
+
credit_type?: CreditTypeData;
|
|
2577
|
+
|
|
2578
|
+
/**
|
|
2579
|
+
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
2580
|
+
* processors.
|
|
2581
|
+
*/
|
|
2582
|
+
custom_rate?: { [key: string]: unknown };
|
|
2583
|
+
|
|
2584
|
+
/**
|
|
2585
|
+
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
2586
|
+
* set to true.
|
|
2587
|
+
*/
|
|
2588
|
+
is_prorated?: boolean;
|
|
2589
|
+
|
|
2590
|
+
/**
|
|
2591
|
+
* Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
|
|
2592
|
+
* this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
|
|
2593
|
+
*/
|
|
2594
|
+
price?: number;
|
|
2595
|
+
|
|
2596
|
+
/**
|
|
2597
|
+
* Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
|
|
2598
|
+
*/
|
|
2599
|
+
quantity?: number;
|
|
2600
|
+
|
|
2601
|
+
/**
|
|
2602
|
+
* Only set for TIERED rate_type.
|
|
2603
|
+
*/
|
|
2604
|
+
tiers?: Array<Tier>;
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
export interface PaymentGateConfig {
|
|
2608
|
+
/**
|
|
2609
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
2610
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
2611
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
2612
|
+
* wish to payment gate the commit balance.
|
|
2613
|
+
*/
|
|
2614
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
2615
|
+
|
|
2616
|
+
/**
|
|
2617
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2618
|
+
*/
|
|
2619
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
2620
|
+
|
|
2621
|
+
/**
|
|
2622
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
2623
|
+
*/
|
|
2624
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
2625
|
+
|
|
2626
|
+
/**
|
|
2627
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
2628
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
2629
|
+
* will default to NONE.
|
|
2630
|
+
*/
|
|
2631
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'AVALARA' | 'PRECALCULATED';
|
|
2632
|
+
}
|
|
2633
|
+
|
|
2634
|
+
export namespace PaymentGateConfig {
|
|
2635
|
+
/**
|
|
2636
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2637
|
+
*/
|
|
2638
|
+
export interface PrecalculatedTaxConfig {
|
|
2639
|
+
/**
|
|
2640
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
2641
|
+
* denomination as the commit's invoice schedule
|
|
2642
|
+
*/
|
|
2643
|
+
tax_amount: number;
|
|
2644
|
+
|
|
2645
|
+
/**
|
|
2646
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
2647
|
+
* description.
|
|
2648
|
+
*/
|
|
2649
|
+
tax_name?: string;
|
|
2650
|
+
}
|
|
2651
|
+
|
|
2652
|
+
/**
|
|
2653
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
2654
|
+
*/
|
|
2655
|
+
export interface StripeConfig {
|
|
2656
|
+
/**
|
|
2657
|
+
* If left blank, will default to INVOICE
|
|
2658
|
+
*/
|
|
2659
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
1571
2660
|
|
|
1572
|
-
|
|
2661
|
+
/**
|
|
2662
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
2663
|
+
* your payment type.
|
|
2664
|
+
*/
|
|
2665
|
+
invoice_metadata?: { [key: string]: string };
|
|
1573
2666
|
}
|
|
2667
|
+
}
|
|
2668
|
+
|
|
2669
|
+
export interface PaymentGateConfigV2 {
|
|
2670
|
+
/**
|
|
2671
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
2672
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
2673
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
2674
|
+
* wish to payment gate the commit balance.
|
|
2675
|
+
*/
|
|
2676
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
2677
|
+
|
|
2678
|
+
/**
|
|
2679
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2680
|
+
*/
|
|
2681
|
+
precalculated_tax_config?: PaymentGateConfigV2.PrecalculatedTaxConfig;
|
|
2682
|
+
|
|
2683
|
+
/**
|
|
2684
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
2685
|
+
*/
|
|
2686
|
+
stripe_config?: PaymentGateConfigV2.StripeConfig;
|
|
2687
|
+
|
|
2688
|
+
/**
|
|
2689
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
2690
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
2691
|
+
* will default to NONE.
|
|
2692
|
+
*/
|
|
2693
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'AVALARA' | 'PRECALCULATED';
|
|
2694
|
+
}
|
|
1574
2695
|
|
|
1575
|
-
|
|
1576
|
-
|
|
2696
|
+
export namespace PaymentGateConfigV2 {
|
|
2697
|
+
/**
|
|
2698
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2699
|
+
*/
|
|
2700
|
+
export interface PrecalculatedTaxConfig {
|
|
2701
|
+
/**
|
|
2702
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
2703
|
+
* denomination as the commit's invoice schedule
|
|
2704
|
+
*/
|
|
2705
|
+
tax_amount: number;
|
|
1577
2706
|
|
|
1578
|
-
|
|
2707
|
+
/**
|
|
2708
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
2709
|
+
* description.
|
|
2710
|
+
*/
|
|
2711
|
+
tax_name?: string;
|
|
2712
|
+
}
|
|
1579
2713
|
|
|
2714
|
+
/**
|
|
2715
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
2716
|
+
*/
|
|
2717
|
+
export interface StripeConfig {
|
|
1580
2718
|
/**
|
|
1581
|
-
*
|
|
1582
|
-
* processors.
|
|
2719
|
+
* If left blank, will default to INVOICE
|
|
1583
2720
|
*/
|
|
1584
|
-
|
|
2721
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
1585
2722
|
|
|
1586
2723
|
/**
|
|
1587
|
-
*
|
|
1588
|
-
*
|
|
2724
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
2725
|
+
* your payment type.
|
|
1589
2726
|
*/
|
|
1590
|
-
|
|
2727
|
+
invoice_metadata?: { [key: string]: string };
|
|
2728
|
+
}
|
|
2729
|
+
}
|
|
2730
|
+
|
|
2731
|
+
export interface PrepaidBalanceThresholdConfiguration {
|
|
2732
|
+
commit: PrepaidBalanceThresholdConfiguration.Commit;
|
|
2733
|
+
|
|
2734
|
+
/**
|
|
2735
|
+
* When set to false, the contract will not be evaluated against the
|
|
2736
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
2737
|
+
* regardless of prior state.
|
|
2738
|
+
*/
|
|
2739
|
+
is_enabled: boolean;
|
|
2740
|
+
|
|
2741
|
+
payment_gate_config: PaymentGateConfig;
|
|
2742
|
+
|
|
2743
|
+
/**
|
|
2744
|
+
* Specify the amount the balance should be recharged to.
|
|
2745
|
+
*/
|
|
2746
|
+
recharge_to_amount: number;
|
|
2747
|
+
|
|
2748
|
+
/**
|
|
2749
|
+
* Specify the threshold amount for the contract. Each time the contract's prepaid
|
|
2750
|
+
* balance lowers to this amount, a threshold charge will be initiated.
|
|
2751
|
+
*/
|
|
2752
|
+
threshold_amount: number;
|
|
2753
|
+
|
|
2754
|
+
/**
|
|
2755
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
2756
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
2757
|
+
*/
|
|
2758
|
+
custom_credit_type_id?: string;
|
|
2759
|
+
}
|
|
1591
2760
|
|
|
2761
|
+
export namespace PrepaidBalanceThresholdConfiguration {
|
|
2762
|
+
export interface Commit extends Shared.BaseThresholdCommit {
|
|
1592
2763
|
/**
|
|
1593
|
-
*
|
|
1594
|
-
*
|
|
2764
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
2765
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
2766
|
+
* all products.
|
|
1595
2767
|
*/
|
|
1596
|
-
|
|
2768
|
+
applicable_product_ids?: Array<string>;
|
|
1597
2769
|
|
|
1598
2770
|
/**
|
|
1599
|
-
*
|
|
2771
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
2772
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
2773
|
+
* all products.
|
|
1600
2774
|
*/
|
|
1601
|
-
|
|
2775
|
+
applicable_product_tags?: Array<string>;
|
|
1602
2776
|
|
|
1603
2777
|
/**
|
|
1604
|
-
*
|
|
2778
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2779
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2780
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
2781
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
1605
2782
|
*/
|
|
1606
|
-
|
|
2783
|
+
specifiers?: Array<Shared.CommitSpecifierInput>;
|
|
1607
2784
|
}
|
|
2785
|
+
}
|
|
1608
2786
|
|
|
1609
|
-
|
|
1610
|
-
|
|
2787
|
+
export interface PrepaidBalanceThresholdConfigurationV2 {
|
|
2788
|
+
commit: PrepaidBalanceThresholdConfigurationV2.Commit;
|
|
1611
2789
|
|
|
1612
|
-
|
|
2790
|
+
/**
|
|
2791
|
+
* When set to false, the contract will not be evaluated against the
|
|
2792
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
2793
|
+
* regardless of prior state.
|
|
2794
|
+
*/
|
|
2795
|
+
is_enabled: boolean;
|
|
2796
|
+
|
|
2797
|
+
payment_gate_config: PaymentGateConfigV2;
|
|
2798
|
+
|
|
2799
|
+
/**
|
|
2800
|
+
* Specify the amount the balance should be recharged to.
|
|
2801
|
+
*/
|
|
2802
|
+
recharge_to_amount: number;
|
|
2803
|
+
|
|
2804
|
+
/**
|
|
2805
|
+
* Specify the threshold amount for the contract. Each time the contract's balance
|
|
2806
|
+
* lowers to this amount, a threshold charge will be initiated.
|
|
2807
|
+
*/
|
|
2808
|
+
threshold_amount: number;
|
|
2809
|
+
|
|
2810
|
+
/**
|
|
2811
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
2812
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
2813
|
+
*/
|
|
2814
|
+
custom_credit_type_id?: string;
|
|
2815
|
+
}
|
|
2816
|
+
|
|
2817
|
+
export namespace PrepaidBalanceThresholdConfigurationV2 {
|
|
2818
|
+
export interface Commit extends Shared.UpdateBaseThresholdCommit {
|
|
2819
|
+
/**
|
|
2820
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
2821
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
2822
|
+
* all products.
|
|
2823
|
+
*/
|
|
2824
|
+
applicable_product_ids?: Array<string>;
|
|
2825
|
+
|
|
2826
|
+
/**
|
|
2827
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
2828
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
2829
|
+
* all products.
|
|
2830
|
+
*/
|
|
2831
|
+
applicable_product_tags?: Array<string>;
|
|
2832
|
+
|
|
2833
|
+
/**
|
|
2834
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2835
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2836
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
2837
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
2838
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
2839
|
+
* body of `specifiers`.
|
|
2840
|
+
*/
|
|
2841
|
+
specifiers?: Array<Shared.CommitSpecifierInput>;
|
|
1613
2842
|
}
|
|
1614
2843
|
}
|
|
1615
2844
|
|
|
@@ -1666,6 +2895,9 @@ export interface ProService {
|
|
|
1666
2895
|
*/
|
|
1667
2896
|
unit_price: number;
|
|
1668
2897
|
|
|
2898
|
+
/**
|
|
2899
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2900
|
+
*/
|
|
1669
2901
|
custom_fields?: { [key: string]: string };
|
|
1670
2902
|
|
|
1671
2903
|
description?: string;
|
|
@@ -1723,6 +2955,23 @@ export interface Rate {
|
|
|
1723
2955
|
use_list_prices?: boolean;
|
|
1724
2956
|
}
|
|
1725
2957
|
|
|
2958
|
+
export interface RecurringCommitSubscriptionConfig {
|
|
2959
|
+
allocation: 'INDIVIDUAL' | 'POOLED';
|
|
2960
|
+
|
|
2961
|
+
apply_seat_increase_config: RecurringCommitSubscriptionConfig.ApplySeatIncreaseConfig;
|
|
2962
|
+
|
|
2963
|
+
subscription_id: string;
|
|
2964
|
+
}
|
|
2965
|
+
|
|
2966
|
+
export namespace RecurringCommitSubscriptionConfig {
|
|
2967
|
+
export interface ApplySeatIncreaseConfig {
|
|
2968
|
+
/**
|
|
2969
|
+
* Indicates whether a mid-period seat increase should be prorated.
|
|
2970
|
+
*/
|
|
2971
|
+
is_prorated: boolean;
|
|
2972
|
+
}
|
|
2973
|
+
}
|
|
2974
|
+
|
|
1726
2975
|
export interface ScheduledCharge {
|
|
1727
2976
|
id: string;
|
|
1728
2977
|
|
|
@@ -1732,6 +2981,9 @@ export interface ScheduledCharge {
|
|
|
1732
2981
|
|
|
1733
2982
|
archived_at?: string;
|
|
1734
2983
|
|
|
2984
|
+
/**
|
|
2985
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2986
|
+
*/
|
|
1735
2987
|
custom_fields?: { [key: string]: string };
|
|
1736
2988
|
|
|
1737
2989
|
/**
|
|
@@ -1799,8 +3051,171 @@ export namespace SchedulePointInTime {
|
|
|
1799
3051
|
}
|
|
1800
3052
|
}
|
|
1801
3053
|
|
|
3054
|
+
export interface SpendThresholdConfiguration {
|
|
3055
|
+
commit: BaseThresholdCommit;
|
|
3056
|
+
|
|
3057
|
+
/**
|
|
3058
|
+
* When set to false, the contract will not be evaluated against the
|
|
3059
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
3060
|
+
* regardless of prior state.
|
|
3061
|
+
*/
|
|
3062
|
+
is_enabled: boolean;
|
|
3063
|
+
|
|
3064
|
+
payment_gate_config: PaymentGateConfig;
|
|
3065
|
+
|
|
3066
|
+
/**
|
|
3067
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
3068
|
+
* hits this amount, a threshold charge will be initiated.
|
|
3069
|
+
*/
|
|
3070
|
+
threshold_amount: number;
|
|
3071
|
+
}
|
|
3072
|
+
|
|
3073
|
+
export interface SpendThresholdConfigurationV2 {
|
|
3074
|
+
commit: UpdateBaseThresholdCommit;
|
|
3075
|
+
|
|
3076
|
+
/**
|
|
3077
|
+
* When set to false, the contract will not be evaluated against the
|
|
3078
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
3079
|
+
* regardless of prior state.
|
|
3080
|
+
*/
|
|
3081
|
+
is_enabled: boolean;
|
|
3082
|
+
|
|
3083
|
+
payment_gate_config: PaymentGateConfigV2;
|
|
3084
|
+
|
|
3085
|
+
/**
|
|
3086
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
3087
|
+
* hits this amount, a threshold charge will be initiated.
|
|
3088
|
+
*/
|
|
3089
|
+
threshold_amount: number;
|
|
3090
|
+
}
|
|
3091
|
+
|
|
3092
|
+
export interface Subscription {
|
|
3093
|
+
/**
|
|
3094
|
+
* Previous, current, and next billing periods for the subscription.
|
|
3095
|
+
*/
|
|
3096
|
+
billing_periods: Subscription.BillingPeriods;
|
|
3097
|
+
|
|
3098
|
+
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
3099
|
+
|
|
3100
|
+
proration: Subscription.Proration;
|
|
3101
|
+
|
|
3102
|
+
/**
|
|
3103
|
+
* Determines how the subscription's quantity is controlled. Defaults to
|
|
3104
|
+
* QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
|
|
3105
|
+
* directly on the subscription. `initial_quantity` must be provided with this
|
|
3106
|
+
* option. Compatible with recurring commits/credits that use POOLED allocation.
|
|
3107
|
+
*/
|
|
3108
|
+
quantity_management_mode: 'SEAT_BASED' | 'QUANTITY_ONLY';
|
|
3109
|
+
|
|
3110
|
+
/**
|
|
3111
|
+
* List of quantity schedule items for the subscription. Only includes the current
|
|
3112
|
+
* quantity and future quantity changes.
|
|
3113
|
+
*/
|
|
3114
|
+
quantity_schedule: Array<Subscription.QuantitySchedule>;
|
|
3115
|
+
|
|
3116
|
+
starting_at: string;
|
|
3117
|
+
|
|
3118
|
+
subscription_rate: Subscription.SubscriptionRate;
|
|
3119
|
+
|
|
3120
|
+
id?: string;
|
|
3121
|
+
|
|
3122
|
+
/**
|
|
3123
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
3124
|
+
*/
|
|
3125
|
+
custom_fields?: { [key: string]: string };
|
|
3126
|
+
|
|
3127
|
+
description?: string;
|
|
3128
|
+
|
|
3129
|
+
ending_before?: string;
|
|
3130
|
+
|
|
3131
|
+
fiat_credit_type_id?: string;
|
|
3132
|
+
|
|
3133
|
+
name?: string;
|
|
3134
|
+
}
|
|
3135
|
+
|
|
3136
|
+
export namespace Subscription {
|
|
3137
|
+
/**
|
|
3138
|
+
* Previous, current, and next billing periods for the subscription.
|
|
3139
|
+
*/
|
|
3140
|
+
export interface BillingPeriods {
|
|
3141
|
+
current?: BillingPeriods.Current;
|
|
3142
|
+
|
|
3143
|
+
next?: BillingPeriods.Next;
|
|
3144
|
+
|
|
3145
|
+
previous?: BillingPeriods.Previous;
|
|
3146
|
+
}
|
|
3147
|
+
|
|
3148
|
+
export namespace BillingPeriods {
|
|
3149
|
+
export interface Current {
|
|
3150
|
+
ending_before: string;
|
|
3151
|
+
|
|
3152
|
+
starting_at: string;
|
|
3153
|
+
}
|
|
3154
|
+
|
|
3155
|
+
export interface Next {
|
|
3156
|
+
ending_before: string;
|
|
3157
|
+
|
|
3158
|
+
starting_at: string;
|
|
3159
|
+
}
|
|
3160
|
+
|
|
3161
|
+
export interface Previous {
|
|
3162
|
+
ending_before: string;
|
|
3163
|
+
|
|
3164
|
+
starting_at: string;
|
|
3165
|
+
}
|
|
3166
|
+
}
|
|
3167
|
+
|
|
3168
|
+
export interface Proration {
|
|
3169
|
+
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
3170
|
+
|
|
3171
|
+
is_prorated: boolean;
|
|
3172
|
+
}
|
|
3173
|
+
|
|
3174
|
+
export interface QuantitySchedule {
|
|
3175
|
+
quantity: number;
|
|
3176
|
+
|
|
3177
|
+
starting_at: string;
|
|
3178
|
+
|
|
3179
|
+
ending_before?: string;
|
|
3180
|
+
}
|
|
3181
|
+
|
|
3182
|
+
export interface SubscriptionRate {
|
|
3183
|
+
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
3184
|
+
|
|
3185
|
+
product: SubscriptionRate.Product;
|
|
3186
|
+
}
|
|
3187
|
+
|
|
3188
|
+
export namespace SubscriptionRate {
|
|
3189
|
+
export interface Product {
|
|
3190
|
+
id: string;
|
|
3191
|
+
|
|
3192
|
+
name: string;
|
|
3193
|
+
}
|
|
3194
|
+
}
|
|
3195
|
+
}
|
|
3196
|
+
|
|
1802
3197
|
export interface Tier {
|
|
1803
3198
|
price: number;
|
|
1804
3199
|
|
|
1805
3200
|
size?: number;
|
|
1806
3201
|
}
|
|
3202
|
+
|
|
3203
|
+
export interface UpdateBaseThresholdCommit {
|
|
3204
|
+
description?: string;
|
|
3205
|
+
|
|
3206
|
+
/**
|
|
3207
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
3208
|
+
* will default to the commit product name.
|
|
3209
|
+
*/
|
|
3210
|
+
name?: string;
|
|
3211
|
+
|
|
3212
|
+
/**
|
|
3213
|
+
* The commit product that will be used to generate the line item for commit
|
|
3214
|
+
* payment.
|
|
3215
|
+
*/
|
|
3216
|
+
product_id?: string;
|
|
3217
|
+
}
|
|
3218
|
+
|
|
3219
|
+
export type CommitsBodyCursorPage = BodyCursorPage<Commit>;
|
|
3220
|
+
|
|
3221
|
+
export type CreditsBodyCursorPage = BodyCursorPage<Credit>;
|