@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
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { APIResource } from "../../../resource.js";
|
|
2
|
-
import * as Core from "../../../core.js";
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
3
2
|
import * as Shared from "../../shared.js";
|
|
4
3
|
import * as NamedSchedulesAPI from "./named-schedules.js";
|
|
5
4
|
import { NamedScheduleRetrieveParams, NamedScheduleRetrieveResponse, NamedScheduleUpdateParams, NamedSchedules } from "./named-schedules.js";
|
|
@@ -8,12 +7,137 @@ import { ProductArchiveParams, ProductArchiveResponse, ProductCreateParams, Prod
|
|
|
8
7
|
import * as InvoicesAPI from "../customers/invoices.js";
|
|
9
8
|
import * as RateCardsAPI from "./rate-cards/rate-cards.js";
|
|
10
9
|
import { RateCardArchiveParams, RateCardArchiveResponse, RateCardCreateParams, RateCardCreateResponse, RateCardListParams, RateCardListResponse, RateCardListResponsesCursorPage, RateCardRetrieveParams, RateCardRetrieveRateScheduleParams, RateCardRetrieveRateScheduleResponse, RateCardRetrieveResponse, RateCardUpdateParams, RateCardUpdateResponse, RateCards } from "./rate-cards/rate-cards.js";
|
|
10
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
11
|
+
import { BodyCursorPage, type BodyCursorPageParams, PagePromise } from "../../../core/pagination.js";
|
|
12
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
11
13
|
export declare class Contracts extends APIResource {
|
|
12
14
|
products: ProductsAPI.Products;
|
|
13
15
|
rateCards: RateCardsAPI.RateCards;
|
|
14
16
|
namedSchedules: NamedSchedulesAPI.NamedSchedules;
|
|
15
17
|
/**
|
|
16
|
-
*
|
|
18
|
+
* Contracts define a customer's products, pricing, discounts, access duration, and
|
|
19
|
+
* billing configuration. Contracts serve as the central billing agreement for both
|
|
20
|
+
* PLG and Enterprise customers, you can automatically customers access to your
|
|
21
|
+
* products and services directly from your product or CRM.
|
|
22
|
+
*
|
|
23
|
+
* ### Use this endpoint to:
|
|
24
|
+
*
|
|
25
|
+
* - PLG onboarding: Automatically provision new self-serve customers with
|
|
26
|
+
* contracts when they sign up.
|
|
27
|
+
* - Enterprise sales: Push negotiated contracts from Salesforce with custom
|
|
28
|
+
* pricing and commitments
|
|
29
|
+
* - Promotional pricing: Implement time-limited discounts and free trials through
|
|
30
|
+
* overrides
|
|
31
|
+
*
|
|
32
|
+
* ### Key components:
|
|
33
|
+
*
|
|
34
|
+
* #### Contract Term and Billing Schedule
|
|
35
|
+
*
|
|
36
|
+
* - Set contract duration using `starting_at` and `ending_before` fields. PLG
|
|
37
|
+
* contracts typically use perpetual agreements (no end date), while Enterprise
|
|
38
|
+
* contracts have fixed end dates which can be edited over time in the case of
|
|
39
|
+
* co-term upsells.
|
|
40
|
+
*
|
|
41
|
+
* #### Rate Card
|
|
42
|
+
*
|
|
43
|
+
* If you are offering usage based pricing, you can set a rate card for the
|
|
44
|
+
* contract to reference through `rate_card_id` or `rate_card_alias`. The rate card
|
|
45
|
+
* is a store of all of your usage based products and their centralized pricing.
|
|
46
|
+
* Any new products or price changes on the rate card can be set to automatically
|
|
47
|
+
* propagate to all associated contracts - this ensures consistent pricing and
|
|
48
|
+
* product launches flow to contracts without manual updates and migrations. The
|
|
49
|
+
* `usage_statement_schedule` determines the cadence on which Metronome will
|
|
50
|
+
* finalize a usage invoice for the customer. This defaults to monthly on the 1st,
|
|
51
|
+
* with options for custom dates, quarterly, or annual cadences. Note: Most usage
|
|
52
|
+
* based billing companies align usage statements to be evaluated aligned to the
|
|
53
|
+
* first of the month. Read more about
|
|
54
|
+
* [Rate Cards](https://docs.metronome.com/pricing-packaging/create-manage-rate-cards/).
|
|
55
|
+
*
|
|
56
|
+
* #### Overrides and discounts
|
|
57
|
+
*
|
|
58
|
+
* Customize pricing on the contract through time-bounded overrides that can target
|
|
59
|
+
* specific products, product families, or complex usage scenarios. Overrides
|
|
60
|
+
* enable two key capabilities:
|
|
61
|
+
*
|
|
62
|
+
* - Discounts: Apply percentage discounts, fixed rate reductions, or
|
|
63
|
+
* quantity-based pricing tiers
|
|
64
|
+
* - Entitlements: Provide special pricing or access to specific products for
|
|
65
|
+
* negotiated deals
|
|
66
|
+
*
|
|
67
|
+
* Read more about
|
|
68
|
+
* [Contract Overrides](https://docs.metronome.com/manage-product-access/add-contract-override/).
|
|
69
|
+
*
|
|
70
|
+
* #### Commits and Credits
|
|
71
|
+
*
|
|
72
|
+
* Using commits, configure prepaid or postpaid spending commitments where
|
|
73
|
+
* customers promise to spend a certain amount over the contract period paid in
|
|
74
|
+
* advance or in arrears. Use credits to provide free spending allowances. Under
|
|
75
|
+
* the hood these are the same mechanisms, however, credits are typically offered
|
|
76
|
+
* for free (SLA or promotional) or as a part of an allotment associated with a
|
|
77
|
+
* Subscription.
|
|
78
|
+
*
|
|
79
|
+
* In Metronome, you can set commits and credits to only be applicable for a subset
|
|
80
|
+
* of usage. Use `applicable_product_ids` or `applicable_product_tags` to create
|
|
81
|
+
* product or product-family specific commits or credits, or you can build complex
|
|
82
|
+
* boolean logic specifiers to target usage based on pricing and presentation group
|
|
83
|
+
* values using `override_specifiers`.
|
|
84
|
+
*
|
|
85
|
+
* These objects can also also be configured to have a recurrence schedule to
|
|
86
|
+
* easily model customer packaging which includes recurring monthly or quarterly
|
|
87
|
+
* allotments.
|
|
88
|
+
*
|
|
89
|
+
* Commits support rollover settings (`rollover_fraction`) to transfer unused
|
|
90
|
+
* balances between contract periods, either entirely or as a percentage.
|
|
91
|
+
*
|
|
92
|
+
* Read more about
|
|
93
|
+
* [Credits and Commits](https://docs.metronome.com/pricing-packaging/apply-credits-commits/).
|
|
94
|
+
*
|
|
95
|
+
* #### Subscriptions
|
|
96
|
+
*
|
|
97
|
+
* You can add a fixed recurring charge to a contract, like monthly licenses or
|
|
98
|
+
* seat-based fees, using the subscription charge. Subscription charges are defined
|
|
99
|
+
* on your rate card and you can select which subscription is applicable to add to
|
|
100
|
+
* each contract. When you add a subscription to a contract you need to:
|
|
101
|
+
*
|
|
102
|
+
* - Define whether the subscription is paid for in-advance or in-arrears
|
|
103
|
+
* (`collection_schedule`)
|
|
104
|
+
* - Define the proration behavior (`proration`)
|
|
105
|
+
* - Specify an initial quantity (`initial_quantity`)
|
|
106
|
+
* - Define which subscription rate on the rate card should be used
|
|
107
|
+
* (`subscription_rate`)
|
|
108
|
+
*
|
|
109
|
+
* Read more about
|
|
110
|
+
* [Subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/).
|
|
111
|
+
*
|
|
112
|
+
* #### Scheduled Charges
|
|
113
|
+
*
|
|
114
|
+
* Set up one-time, recurring, or entirely custom charges that occur on specific
|
|
115
|
+
* dates, separate from usage-based billing or commitments. These can be used to
|
|
116
|
+
* model non-recurring platform charges or professional services.
|
|
117
|
+
*
|
|
118
|
+
* #### Threshold Billing
|
|
119
|
+
*
|
|
120
|
+
* Metronome allows you to configure automatic billing triggers when customers
|
|
121
|
+
* reach spending thresholds to prevent fraud and manage risk. You can use
|
|
122
|
+
* `spend_threshold_configuration` to trigger an invoice to cover current charges
|
|
123
|
+
* whenever the threshold is reached or you can ensure the customer maintains a
|
|
124
|
+
* minimum prepaid balance using the `prepaid_balance_configuration`.
|
|
125
|
+
*
|
|
126
|
+
* Read more about
|
|
127
|
+
* [Spend Threshold](https://docs.metronome.com/manage-product-access/spend-thresholds/)
|
|
128
|
+
* and
|
|
129
|
+
* [Prepaid Balance Thresholds](https://docs.metronome.com/manage-product-access/prepaid-balance-thresholds/).
|
|
130
|
+
*
|
|
131
|
+
* ### Usage guidelines:
|
|
132
|
+
*
|
|
133
|
+
* - You can always
|
|
134
|
+
* [Edit Contracts](https://docs.metronome.com/manage-product-access/edit-contract/)
|
|
135
|
+
* after it has been created, using the `editContract` endpoint. Metronome keeps
|
|
136
|
+
* track of all edits, both in the audit log and over the `getEditHistory`
|
|
137
|
+
* endpoint.
|
|
138
|
+
* - Customers in Metronome can have multiple concurrent contracts at one time. Use
|
|
139
|
+
* `usage_filters` to route the correct usage to each contract.
|
|
140
|
+
* [Read more about usage filters](https://docs.metronome.com/manage-product-access/provision-customer/#create-a-usage-filter).
|
|
17
141
|
*
|
|
18
142
|
* @example
|
|
19
143
|
* ```ts
|
|
@@ -28,7 +152,7 @@ export declare class Contracts extends APIResource {
|
|
|
28
152
|
* });
|
|
29
153
|
* ```
|
|
30
154
|
*/
|
|
31
|
-
create(body: ContractCreateParams, options?:
|
|
155
|
+
create(body: ContractCreateParams, options?: RequestOptions): APIPromise<ContractCreateResponse>;
|
|
32
156
|
/**
|
|
33
157
|
* This is the v1 endpoint to get a contract. New clients should implement using
|
|
34
158
|
* the v2 endpoint.
|
|
@@ -41,10 +165,15 @@ export declare class Contracts extends APIResource {
|
|
|
41
165
|
* });
|
|
42
166
|
* ```
|
|
43
167
|
*/
|
|
44
|
-
retrieve(body: ContractRetrieveParams, options?:
|
|
168
|
+
retrieve(body: ContractRetrieveParams, options?: RequestOptions): APIPromise<ContractRetrieveResponse>;
|
|
45
169
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
170
|
+
* Retrieves all contracts for a specific customer, including pricing, terms,
|
|
171
|
+
* credits, and commitments. Use this to view a customer's contract history and
|
|
172
|
+
* current agreements for billing management. Returns contract details with
|
|
173
|
+
* optional ledgers and balance information.
|
|
174
|
+
*
|
|
175
|
+
* ⚠️ Note: This is the legacy v1 endpoint - new integrations should use the v2
|
|
176
|
+
* endpoint for enhanced features.
|
|
48
177
|
*
|
|
49
178
|
* @example
|
|
50
179
|
* ```ts
|
|
@@ -53,9 +182,26 @@ export declare class Contracts extends APIResource {
|
|
|
53
182
|
* });
|
|
54
183
|
* ```
|
|
55
184
|
*/
|
|
56
|
-
list(body: ContractListParams, options?:
|
|
185
|
+
list(body: ContractListParams, options?: RequestOptions): APIPromise<ContractListResponse>;
|
|
57
186
|
/**
|
|
58
|
-
*
|
|
187
|
+
* Manually adjust the available balance on a commit or credit. This entry is
|
|
188
|
+
* appended to the commit ledger as a new event. Optionally include a description
|
|
189
|
+
* that provides the reasoning for the entry.
|
|
190
|
+
*
|
|
191
|
+
* ### Use this endpoint to:
|
|
192
|
+
*
|
|
193
|
+
* - Address incorrect usage burn-down caused by malformed usage or invalid config
|
|
194
|
+
* - Decrease available balance to account for outages where usage may have not
|
|
195
|
+
* been tracked or sent to Metronome
|
|
196
|
+
* - Issue credits to customers in the form of increased balance on existing commit
|
|
197
|
+
* or credit
|
|
198
|
+
*
|
|
199
|
+
* ### Usage guidelines:
|
|
200
|
+
*
|
|
201
|
+
* Manual ledger entries can be extremely useful for resolving discrepancies in
|
|
202
|
+
* Metronome. However, most corrections to inaccurate billings can be modified
|
|
203
|
+
* upstream of the commit, whether that is via contract editing, rate editing, or
|
|
204
|
+
* other actions that cause an invoice to be recalculated.
|
|
59
205
|
*
|
|
60
206
|
* @example
|
|
61
207
|
* ```ts
|
|
@@ -69,10 +215,10 @@ export declare class Contracts extends APIResource {
|
|
|
69
215
|
* });
|
|
70
216
|
* ```
|
|
71
217
|
*/
|
|
72
|
-
addManualBalanceEntry(body: ContractAddManualBalanceEntryParams, options?:
|
|
218
|
+
addManualBalanceEntry(body: ContractAddManualBalanceEntryParams, options?: RequestOptions): APIPromise<void>;
|
|
73
219
|
/**
|
|
74
220
|
* Amendments will be replaced by Contract editing. New clients should implement
|
|
75
|
-
* using the editContract endpoint. Read more about the migration to contract
|
|
221
|
+
* using the `editContract` endpoint. Read more about the migration to contract
|
|
76
222
|
* editing [here](https://docs.metronome.com/migrate-amendments-to-edits/) and
|
|
77
223
|
* reach out to your Metronome representative for more details. Once contract
|
|
78
224
|
* editing is enabled, access to this endpoint will be removed.
|
|
@@ -86,9 +232,28 @@ export declare class Contracts extends APIResource {
|
|
|
86
232
|
* });
|
|
87
233
|
* ```
|
|
88
234
|
*/
|
|
89
|
-
amend(body: ContractAmendParams, options?:
|
|
235
|
+
amend(body: ContractAmendParams, options?: RequestOptions): APIPromise<ContractAmendResponse>;
|
|
90
236
|
/**
|
|
91
|
-
*
|
|
237
|
+
* Permanently end and archive a contract along with all its terms. Any draft
|
|
238
|
+
* invoices will be canceled, and all upcoming scheduled invoices will be
|
|
239
|
+
* voided–also all finalized invoices can optionally be voided. Use this in the
|
|
240
|
+
* event a contract was incorrectly created and needed to be removed from a
|
|
241
|
+
* customer.
|
|
242
|
+
*
|
|
243
|
+
* #### Impact on commits and credits:
|
|
244
|
+
*
|
|
245
|
+
* When archiving a contract, all associated commits and credits are also archived.
|
|
246
|
+
* For prepaid commits with active segments, Metronome automatically generates
|
|
247
|
+
* expiration ledger entries to close out any remaining balances, ensuring accurate
|
|
248
|
+
* accounting of unused prepaid amounts. These ledger entries will appear in the
|
|
249
|
+
* commit's transaction history with type `PREPAID_COMMIT_EXPIRATION`.
|
|
250
|
+
*
|
|
251
|
+
* #### Archived contract visibility:
|
|
252
|
+
*
|
|
253
|
+
* Archived contracts remain accessible for historical reporting and audit
|
|
254
|
+
* purposes. They can be retrieved using the `ListContracts` endpoint by setting
|
|
255
|
+
* the `include_archived` parameter to `true` or in the Metronome UI when the "Show
|
|
256
|
+
* archived" option is enabled.
|
|
92
257
|
*
|
|
93
258
|
* @example
|
|
94
259
|
* ```ts
|
|
@@ -99,9 +264,13 @@ export declare class Contracts extends APIResource {
|
|
|
99
264
|
* });
|
|
100
265
|
* ```
|
|
101
266
|
*/
|
|
102
|
-
archive(body: ContractArchiveParams, options?:
|
|
267
|
+
archive(body: ContractArchiveParams, options?: RequestOptions): APIPromise<ContractArchiveResponse>;
|
|
103
268
|
/**
|
|
104
|
-
*
|
|
269
|
+
* Create historical usage invoices for past billing periods on specific contracts.
|
|
270
|
+
* Use this endpoint to generate retroactive invoices with custom usage line items,
|
|
271
|
+
* quantities, and date ranges. Supports preview mode to validate invoice data
|
|
272
|
+
* before creation. Ideal for billing migrations or correcting past billing
|
|
273
|
+
* periods.
|
|
105
274
|
*
|
|
106
275
|
* @example
|
|
107
276
|
* ```ts
|
|
@@ -132,22 +301,66 @@ export declare class Contracts extends APIResource {
|
|
|
132
301
|
* });
|
|
133
302
|
* ```
|
|
134
303
|
*/
|
|
135
|
-
createHistoricalInvoices(body: ContractCreateHistoricalInvoicesParams, options?:
|
|
304
|
+
createHistoricalInvoices(body: ContractCreateHistoricalInvoicesParams, options?: RequestOptions): APIPromise<ContractCreateHistoricalInvoicesResponse>;
|
|
136
305
|
/**
|
|
137
|
-
*
|
|
306
|
+
* Retrieve a comprehensive view of all available balances (commits and credits)
|
|
307
|
+
* for a customer. This endpoint provides real-time visibility into prepaid funds,
|
|
308
|
+
* postpaid commitments, promotional credits, and other balance types that can
|
|
309
|
+
* offset usage charges, helping you build transparent billing experiences.
|
|
310
|
+
*
|
|
311
|
+
* ### Use this endpoint to:
|
|
312
|
+
*
|
|
313
|
+
* - Display current available balances in customer dashboards
|
|
314
|
+
* - Verify available funds before approving high-usage operations
|
|
315
|
+
* - Generate balance reports for finance teams
|
|
316
|
+
* - Filter balances by contract or date ranges
|
|
317
|
+
*
|
|
318
|
+
* ### Key response fields:
|
|
319
|
+
*
|
|
320
|
+
* An array of balance objects (all credits and commits) containing:
|
|
321
|
+
*
|
|
322
|
+
* - Balance details: Current available amount for each commit or credit
|
|
323
|
+
* - Metadata: Product associations, priorities, applicable date ranges
|
|
324
|
+
* - Optional ledger entries: Detailed transaction history (if
|
|
325
|
+
* `include_ledgers=true`)
|
|
326
|
+
* - Balance calculations: Including pending transactions and future-dated entries
|
|
327
|
+
* - Custom fields: Any additional metadata attached to balances
|
|
328
|
+
*
|
|
329
|
+
* ### Usage guidelines:
|
|
330
|
+
*
|
|
331
|
+
* - Date filtering: Use `effective_before` to include only balances with access
|
|
332
|
+
* before a specific date (exclusive)
|
|
333
|
+
* - Set `include_balance=true` for calculated balance amounts on each commit or
|
|
334
|
+
* credit
|
|
335
|
+
* - Set `include_ledgers=true` for full transaction history
|
|
336
|
+
* - Set `include_contract_balances = true` to see contract level balances
|
|
337
|
+
* - Balance logic: Reflects currently accessible amounts, excluding expired/future
|
|
338
|
+
* segments
|
|
339
|
+
* - Manual adjustments: Includes all manual ledger entries, even future-dated ones
|
|
138
340
|
*
|
|
139
341
|
* @example
|
|
140
342
|
* ```ts
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
343
|
+
* // Automatically fetches more pages as needed.
|
|
344
|
+
* for await (const contractListBalancesResponse of client.v1.contracts.listBalances(
|
|
345
|
+
* {
|
|
346
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
347
|
+
* id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85',
|
|
348
|
+
* include_ledgers: true,
|
|
349
|
+
* },
|
|
350
|
+
* )) {
|
|
351
|
+
* // ...
|
|
352
|
+
* }
|
|
146
353
|
* ```
|
|
147
354
|
*/
|
|
148
|
-
listBalances(body: ContractListBalancesParams, options?:
|
|
355
|
+
listBalances(body: ContractListBalancesParams, options?: RequestOptions): PagePromise<ContractListBalancesResponsesBodyCursorPage, ContractListBalancesResponse>;
|
|
149
356
|
/**
|
|
150
|
-
*
|
|
357
|
+
* For a specific customer and contract, get the rates at a specific point in time.
|
|
358
|
+
* This endpoint takes the contract's rate card into consideration, including
|
|
359
|
+
* scheduled changes. It also takes into account overrides on the contract.
|
|
360
|
+
*
|
|
361
|
+
* For example, if you want to show your customer a summary of the prices they are
|
|
362
|
+
* paying, inclusive of any negotiated discounts or promotions, use this endpoint.
|
|
363
|
+
* This endpoint only returns rates that are entitled.
|
|
151
364
|
*
|
|
152
365
|
* @example
|
|
153
366
|
* ```ts
|
|
@@ -168,10 +381,18 @@ export declare class Contracts extends APIResource {
|
|
|
168
381
|
* });
|
|
169
382
|
* ```
|
|
170
383
|
*/
|
|
171
|
-
retrieveRateSchedule(params: ContractRetrieveRateScheduleParams, options?:
|
|
384
|
+
retrieveRateSchedule(params: ContractRetrieveRateScheduleParams, options?: RequestOptions): APIPromise<ContractRetrieveRateScheduleResponse>;
|
|
172
385
|
/**
|
|
173
|
-
*
|
|
174
|
-
*
|
|
386
|
+
* Get the history of subscription quantities and prices over time for a given
|
|
387
|
+
* `subscription_id`. This endpoint can be used to power an in-product experience
|
|
388
|
+
* where you show a customer their historical changes to seat count. Future changes
|
|
389
|
+
* are not included in this endpoint - use the `getContract` endpoint to view the
|
|
390
|
+
* future scheduled changes to a subscription's quantity.
|
|
391
|
+
*
|
|
392
|
+
* Subscriptions are used to model fixed recurring fees as well as seat-based
|
|
393
|
+
* recurring fees. To model changes to the number of seats in Metronome, you can
|
|
394
|
+
* increment or decrement the quantity on a subscription at any point in the past
|
|
395
|
+
* or future.
|
|
175
396
|
*
|
|
176
397
|
* @example
|
|
177
398
|
* ```ts
|
|
@@ -186,7 +407,7 @@ export declare class Contracts extends APIResource {
|
|
|
186
407
|
* );
|
|
187
408
|
* ```
|
|
188
409
|
*/
|
|
189
|
-
retrieveSubscriptionQuantityHistory(body: ContractRetrieveSubscriptionQuantityHistoryParams, options?:
|
|
410
|
+
retrieveSubscriptionQuantityHistory(body: ContractRetrieveSubscriptionQuantityHistoryParams, options?: RequestOptions): APIPromise<ContractRetrieveSubscriptionQuantityHistoryResponse>;
|
|
190
411
|
/**
|
|
191
412
|
* Create a new scheduled invoice for Professional Services terms on a contract.
|
|
192
413
|
* This endpoint's availability is dependent on your client's configuration.
|
|
@@ -207,9 +428,26 @@ export declare class Contracts extends APIResource {
|
|
|
207
428
|
* });
|
|
208
429
|
* ```
|
|
209
430
|
*/
|
|
210
|
-
scheduleProServicesInvoice(body: ContractScheduleProServicesInvoiceParams, options?:
|
|
431
|
+
scheduleProServicesInvoice(body: ContractScheduleProServicesInvoiceParams, options?: RequestOptions): APIPromise<ContractScheduleProServicesInvoiceResponse>;
|
|
211
432
|
/**
|
|
212
|
-
*
|
|
433
|
+
* If a customer has multiple contracts with overlapping rates, the usage filter
|
|
434
|
+
* routes usage to the appropriate contract based on a predefined group key.
|
|
435
|
+
*
|
|
436
|
+
* As an example, imagine you have a customer associated with two projects. Each
|
|
437
|
+
* project is associated with its own contract. You can create a usage filter with
|
|
438
|
+
* group key `project_id` on each contract, and route usage for `project_1` to the
|
|
439
|
+
* first contract and `project_2` to the second contract.
|
|
440
|
+
*
|
|
441
|
+
* ### Use this endpoint to:
|
|
442
|
+
*
|
|
443
|
+
* - Support enterprise contracting scenarios where multiple contracts are
|
|
444
|
+
* associated to the same customer with the same rates.
|
|
445
|
+
* - Update the usage filter associated with the contract over time.
|
|
446
|
+
*
|
|
447
|
+
* ### Usage guidelines:
|
|
448
|
+
*
|
|
449
|
+
* To use usage filters, the `group_key` must be defined on the billable metrics
|
|
450
|
+
* underlying the rate card on the contracts.
|
|
213
451
|
*
|
|
214
452
|
* @example
|
|
215
453
|
* ```ts
|
|
@@ -222,9 +460,14 @@ export declare class Contracts extends APIResource {
|
|
|
222
460
|
* });
|
|
223
461
|
* ```
|
|
224
462
|
*/
|
|
225
|
-
setUsageFilter(body: ContractSetUsageFilterParams, options?:
|
|
463
|
+
setUsageFilter(body: ContractSetUsageFilterParams, options?: RequestOptions): APIPromise<void>;
|
|
226
464
|
/**
|
|
227
|
-
* Update
|
|
465
|
+
* Update or add an end date to a contract. Ending a contract early will impact
|
|
466
|
+
* draft usage statements, truncate any terms, and remove upcoming scheduled
|
|
467
|
+
* invoices. Moving the date into the future will only extend the contract length.
|
|
468
|
+
* Terms and scheduled invoices are not extended. In-advance subscriptions will not
|
|
469
|
+
* be extended. Use this if a contract's end date has changed or if a perpetual
|
|
470
|
+
* contract ends.
|
|
228
471
|
*
|
|
229
472
|
* @example
|
|
230
473
|
* ```ts
|
|
@@ -235,748 +478,17 @@ export declare class Contracts extends APIResource {
|
|
|
235
478
|
* });
|
|
236
479
|
* ```
|
|
237
480
|
*/
|
|
238
|
-
updateEndDate(body: ContractUpdateEndDateParams, options?:
|
|
481
|
+
updateEndDate(body: ContractUpdateEndDateParams, options?: RequestOptions): APIPromise<ContractUpdateEndDateResponse>;
|
|
239
482
|
}
|
|
483
|
+
export type ContractListBalancesResponsesBodyCursorPage = BodyCursorPage<ContractListBalancesResponse>;
|
|
240
484
|
export interface ContractCreateResponse {
|
|
241
485
|
data: Shared.ID;
|
|
242
486
|
}
|
|
243
487
|
export interface ContractRetrieveResponse {
|
|
244
|
-
data:
|
|
245
|
-
}
|
|
246
|
-
export declare namespace ContractRetrieveResponse {
|
|
247
|
-
interface Data {
|
|
248
|
-
id: string;
|
|
249
|
-
amendments: Array<Data.Amendment>;
|
|
250
|
-
current: Shared.ContractWithoutAmendments;
|
|
251
|
-
customer_id: string;
|
|
252
|
-
initial: Shared.ContractWithoutAmendments;
|
|
253
|
-
/**
|
|
254
|
-
* RFC 3339 timestamp indicating when the contract was archived. If not returned,
|
|
255
|
-
* the contract is not archived.
|
|
256
|
-
*/
|
|
257
|
-
archived_at?: string;
|
|
258
|
-
custom_fields?: {
|
|
259
|
-
[key: string]: string;
|
|
260
|
-
};
|
|
261
|
-
/**
|
|
262
|
-
* The billing provider configuration associated with a contract.
|
|
263
|
-
*/
|
|
264
|
-
customer_billing_provider_configuration?: Data.CustomerBillingProviderConfiguration;
|
|
265
|
-
prepaid_balance_threshold_configuration?: Data.PrepaidBalanceThresholdConfiguration;
|
|
266
|
-
/**
|
|
267
|
-
* Priority of the contract.
|
|
268
|
-
*/
|
|
269
|
-
priority?: number;
|
|
270
|
-
/**
|
|
271
|
-
* Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
272
|
-
* usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
273
|
-
* `ending_before` date for consolidation to occur. This field cannot be modified
|
|
274
|
-
* after a Contract has been created. If this field is omitted, charges will appear
|
|
275
|
-
* on a separate invoice from usage charges.
|
|
276
|
-
*/
|
|
277
|
-
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
278
|
-
spend_threshold_configuration?: Data.SpendThresholdConfiguration;
|
|
279
|
-
/**
|
|
280
|
-
* List of subscriptions on the contract.
|
|
281
|
-
*/
|
|
282
|
-
subscriptions?: Array<Data.Subscription>;
|
|
283
|
-
/**
|
|
284
|
-
* Prevents the creation of duplicates. If a request to create a record is made
|
|
285
|
-
* with a previously used uniqueness key, a new record will not be created and the
|
|
286
|
-
* request will fail with a 409 error.
|
|
287
|
-
*/
|
|
288
|
-
uniqueness_key?: string;
|
|
289
|
-
}
|
|
290
|
-
namespace Data {
|
|
291
|
-
interface Amendment {
|
|
292
|
-
id: string;
|
|
293
|
-
commits: Array<Shared.Commit>;
|
|
294
|
-
created_at: string;
|
|
295
|
-
created_by: string;
|
|
296
|
-
overrides: Array<Shared.Override>;
|
|
297
|
-
scheduled_charges: Array<Shared.ScheduledCharge>;
|
|
298
|
-
starting_at: string;
|
|
299
|
-
credits?: Array<Shared.Credit>;
|
|
300
|
-
/**
|
|
301
|
-
* This field's availability is dependent on your client's configuration.
|
|
302
|
-
*/
|
|
303
|
-
discounts?: Array<Shared.Discount>;
|
|
304
|
-
/**
|
|
305
|
-
* This field's availability is dependent on your client's configuration.
|
|
306
|
-
*/
|
|
307
|
-
netsuite_sales_order_id?: string;
|
|
308
|
-
/**
|
|
309
|
-
* This field's availability is dependent on your client's configuration.
|
|
310
|
-
*/
|
|
311
|
-
professional_services?: Array<Shared.ProService>;
|
|
312
|
-
/**
|
|
313
|
-
* This field's availability is dependent on your client's configuration.
|
|
314
|
-
*/
|
|
315
|
-
reseller_royalties?: Array<Amendment.ResellerRoyalty>;
|
|
316
|
-
/**
|
|
317
|
-
* This field's availability is dependent on your client's configuration.
|
|
318
|
-
*/
|
|
319
|
-
salesforce_opportunity_id?: string;
|
|
320
|
-
}
|
|
321
|
-
namespace Amendment {
|
|
322
|
-
interface ResellerRoyalty {
|
|
323
|
-
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
324
|
-
aws_account_number?: string;
|
|
325
|
-
aws_offer_id?: string;
|
|
326
|
-
aws_payer_reference_id?: string;
|
|
327
|
-
ending_before?: string | null;
|
|
328
|
-
fraction?: number;
|
|
329
|
-
gcp_account_id?: string;
|
|
330
|
-
gcp_offer_id?: string;
|
|
331
|
-
netsuite_reseller_id?: string;
|
|
332
|
-
reseller_contract_value?: number;
|
|
333
|
-
starting_at?: string;
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
/**
|
|
337
|
-
* The billing provider configuration associated with a contract.
|
|
338
|
-
*/
|
|
339
|
-
interface CustomerBillingProviderConfiguration {
|
|
340
|
-
billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
|
|
341
|
-
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
342
|
-
id?: string;
|
|
343
|
-
/**
|
|
344
|
-
* Configuration for the billing provider. The structure of this object is specific
|
|
345
|
-
* to the billing provider.
|
|
346
|
-
*/
|
|
347
|
-
configuration?: {
|
|
348
|
-
[key: string]: unknown;
|
|
349
|
-
};
|
|
350
|
-
}
|
|
351
|
-
interface PrepaidBalanceThresholdConfiguration {
|
|
352
|
-
commit: PrepaidBalanceThresholdConfiguration.Commit;
|
|
353
|
-
/**
|
|
354
|
-
* When set to false, the contract will not be evaluated against the
|
|
355
|
-
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
356
|
-
* regardless of prior state.
|
|
357
|
-
*/
|
|
358
|
-
is_enabled: boolean;
|
|
359
|
-
payment_gate_config: PrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
360
|
-
/**
|
|
361
|
-
* Specify the amount the balance should be recharged to.
|
|
362
|
-
*/
|
|
363
|
-
recharge_to_amount: number;
|
|
364
|
-
/**
|
|
365
|
-
* Specify the threshold amount for the contract. Each time the contract's prepaid
|
|
366
|
-
* balance lowers to this amount, a threshold charge will be initiated.
|
|
367
|
-
*/
|
|
368
|
-
threshold_amount: number;
|
|
369
|
-
/**
|
|
370
|
-
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
371
|
-
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
372
|
-
*/
|
|
373
|
-
custom_credit_type_id?: string;
|
|
374
|
-
}
|
|
375
|
-
namespace PrepaidBalanceThresholdConfiguration {
|
|
376
|
-
interface Commit {
|
|
377
|
-
/**
|
|
378
|
-
* The commit product that will be used to generate the line item for commit
|
|
379
|
-
* payment.
|
|
380
|
-
*/
|
|
381
|
-
product_id: string;
|
|
382
|
-
/**
|
|
383
|
-
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
384
|
-
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
385
|
-
* all products.
|
|
386
|
-
*/
|
|
387
|
-
applicable_product_ids?: Array<string>;
|
|
388
|
-
/**
|
|
389
|
-
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
390
|
-
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
391
|
-
* all products.
|
|
392
|
-
*/
|
|
393
|
-
applicable_product_tags?: Array<string>;
|
|
394
|
-
description?: string;
|
|
395
|
-
/**
|
|
396
|
-
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
397
|
-
* will default to the commit product name.
|
|
398
|
-
*/
|
|
399
|
-
name?: string;
|
|
400
|
-
/**
|
|
401
|
-
* List of filters that determine what kind of customer usage draws down a commit
|
|
402
|
-
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
403
|
-
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
404
|
-
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
405
|
-
*/
|
|
406
|
-
specifiers?: Array<Commit.Specifier>;
|
|
407
|
-
}
|
|
408
|
-
namespace Commit {
|
|
409
|
-
interface Specifier {
|
|
410
|
-
presentation_group_values?: {
|
|
411
|
-
[key: string]: string;
|
|
412
|
-
};
|
|
413
|
-
pricing_group_values?: {
|
|
414
|
-
[key: string]: string;
|
|
415
|
-
};
|
|
416
|
-
/**
|
|
417
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
418
|
-
*/
|
|
419
|
-
product_id?: string;
|
|
420
|
-
/**
|
|
421
|
-
* If provided, the specifier will only apply to products with all the specified
|
|
422
|
-
* tags.
|
|
423
|
-
*/
|
|
424
|
-
product_tags?: Array<string>;
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
interface PaymentGateConfig {
|
|
428
|
-
/**
|
|
429
|
-
* Gate access to the commit balance based on successful collection of payment.
|
|
430
|
-
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
431
|
-
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
432
|
-
* wish to payment gate the commit balance.
|
|
433
|
-
*/
|
|
434
|
-
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
435
|
-
/**
|
|
436
|
-
* Only applicable if using PRECALCULATED as your tax type.
|
|
437
|
-
*/
|
|
438
|
-
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
439
|
-
/**
|
|
440
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
441
|
-
*/
|
|
442
|
-
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
443
|
-
/**
|
|
444
|
-
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
445
|
-
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
446
|
-
* will default to NONE.
|
|
447
|
-
*/
|
|
448
|
-
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
449
|
-
}
|
|
450
|
-
namespace PaymentGateConfig {
|
|
451
|
-
/**
|
|
452
|
-
* Only applicable if using PRECALCULATED as your tax type.
|
|
453
|
-
*/
|
|
454
|
-
interface PrecalculatedTaxConfig {
|
|
455
|
-
/**
|
|
456
|
-
* Amount of tax to be applied. This should be in the same currency and
|
|
457
|
-
* denomination as the commit's invoice schedule
|
|
458
|
-
*/
|
|
459
|
-
tax_amount: number;
|
|
460
|
-
/**
|
|
461
|
-
* Name of the tax to be applied. This may be used in an invoice line item
|
|
462
|
-
* description.
|
|
463
|
-
*/
|
|
464
|
-
tax_name?: string;
|
|
465
|
-
}
|
|
466
|
-
/**
|
|
467
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
468
|
-
*/
|
|
469
|
-
interface StripeConfig {
|
|
470
|
-
/**
|
|
471
|
-
* If left blank, will default to INVOICE
|
|
472
|
-
*/
|
|
473
|
-
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
474
|
-
/**
|
|
475
|
-
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
476
|
-
* your payment type.
|
|
477
|
-
*/
|
|
478
|
-
invoice_metadata?: {
|
|
479
|
-
[key: string]: string;
|
|
480
|
-
};
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
interface SpendThresholdConfiguration {
|
|
485
|
-
commit: SpendThresholdConfiguration.Commit;
|
|
486
|
-
/**
|
|
487
|
-
* When set to false, the contract will not be evaluated against the
|
|
488
|
-
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
489
|
-
* regardless of prior state.
|
|
490
|
-
*/
|
|
491
|
-
is_enabled: boolean;
|
|
492
|
-
payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
|
|
493
|
-
/**
|
|
494
|
-
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
495
|
-
* hits this amount, a threshold charge will be initiated.
|
|
496
|
-
*/
|
|
497
|
-
threshold_amount: number;
|
|
498
|
-
}
|
|
499
|
-
namespace SpendThresholdConfiguration {
|
|
500
|
-
interface Commit {
|
|
501
|
-
/**
|
|
502
|
-
* The commit product that will be used to generate the line item for commit
|
|
503
|
-
* payment.
|
|
504
|
-
*/
|
|
505
|
-
product_id: string;
|
|
506
|
-
description?: string;
|
|
507
|
-
/**
|
|
508
|
-
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
509
|
-
* will default to the commit product name.
|
|
510
|
-
*/
|
|
511
|
-
name?: string;
|
|
512
|
-
}
|
|
513
|
-
interface PaymentGateConfig {
|
|
514
|
-
/**
|
|
515
|
-
* Gate access to the commit balance based on successful collection of payment.
|
|
516
|
-
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
517
|
-
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
518
|
-
* wish to payment gate the commit balance.
|
|
519
|
-
*/
|
|
520
|
-
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
521
|
-
/**
|
|
522
|
-
* Only applicable if using PRECALCULATED as your tax type.
|
|
523
|
-
*/
|
|
524
|
-
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
525
|
-
/**
|
|
526
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
527
|
-
*/
|
|
528
|
-
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
529
|
-
/**
|
|
530
|
-
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
531
|
-
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
532
|
-
* will default to NONE.
|
|
533
|
-
*/
|
|
534
|
-
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
535
|
-
}
|
|
536
|
-
namespace PaymentGateConfig {
|
|
537
|
-
/**
|
|
538
|
-
* Only applicable if using PRECALCULATED as your tax type.
|
|
539
|
-
*/
|
|
540
|
-
interface PrecalculatedTaxConfig {
|
|
541
|
-
/**
|
|
542
|
-
* Amount of tax to be applied. This should be in the same currency and
|
|
543
|
-
* denomination as the commit's invoice schedule
|
|
544
|
-
*/
|
|
545
|
-
tax_amount: number;
|
|
546
|
-
/**
|
|
547
|
-
* Name of the tax to be applied. This may be used in an invoice line item
|
|
548
|
-
* description.
|
|
549
|
-
*/
|
|
550
|
-
tax_name?: string;
|
|
551
|
-
}
|
|
552
|
-
/**
|
|
553
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
554
|
-
*/
|
|
555
|
-
interface StripeConfig {
|
|
556
|
-
/**
|
|
557
|
-
* If left blank, will default to INVOICE
|
|
558
|
-
*/
|
|
559
|
-
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
560
|
-
/**
|
|
561
|
-
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
562
|
-
* your payment type.
|
|
563
|
-
*/
|
|
564
|
-
invoice_metadata?: {
|
|
565
|
-
[key: string]: string;
|
|
566
|
-
};
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
interface Subscription {
|
|
571
|
-
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
572
|
-
proration: Subscription.Proration;
|
|
573
|
-
/**
|
|
574
|
-
* List of quantity schedule items for the subscription. Only includes the current
|
|
575
|
-
* quantity and future quantity changes.
|
|
576
|
-
*/
|
|
577
|
-
quantity_schedule: Array<Subscription.QuantitySchedule>;
|
|
578
|
-
starting_at: string;
|
|
579
|
-
subscription_rate: Subscription.SubscriptionRate;
|
|
580
|
-
id?: string;
|
|
581
|
-
custom_fields?: {
|
|
582
|
-
[key: string]: string;
|
|
583
|
-
};
|
|
584
|
-
description?: string;
|
|
585
|
-
ending_before?: string;
|
|
586
|
-
fiat_credit_type_id?: string;
|
|
587
|
-
name?: string;
|
|
588
|
-
}
|
|
589
|
-
namespace Subscription {
|
|
590
|
-
interface Proration {
|
|
591
|
-
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
592
|
-
is_prorated: boolean;
|
|
593
|
-
}
|
|
594
|
-
interface QuantitySchedule {
|
|
595
|
-
quantity: number;
|
|
596
|
-
starting_at: string;
|
|
597
|
-
ending_before?: string;
|
|
598
|
-
}
|
|
599
|
-
interface SubscriptionRate {
|
|
600
|
-
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
601
|
-
product: SubscriptionRate.Product;
|
|
602
|
-
}
|
|
603
|
-
namespace SubscriptionRate {
|
|
604
|
-
interface Product {
|
|
605
|
-
id: string;
|
|
606
|
-
name: string;
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
}
|
|
488
|
+
data: Shared.Contract;
|
|
611
489
|
}
|
|
612
490
|
export interface ContractListResponse {
|
|
613
|
-
data: Array<
|
|
614
|
-
}
|
|
615
|
-
export declare namespace ContractListResponse {
|
|
616
|
-
interface Data {
|
|
617
|
-
id: string;
|
|
618
|
-
amendments: Array<Data.Amendment>;
|
|
619
|
-
current: Shared.ContractWithoutAmendments;
|
|
620
|
-
customer_id: string;
|
|
621
|
-
initial: Shared.ContractWithoutAmendments;
|
|
622
|
-
/**
|
|
623
|
-
* RFC 3339 timestamp indicating when the contract was archived. If not returned,
|
|
624
|
-
* the contract is not archived.
|
|
625
|
-
*/
|
|
626
|
-
archived_at?: string;
|
|
627
|
-
custom_fields?: {
|
|
628
|
-
[key: string]: string;
|
|
629
|
-
};
|
|
630
|
-
/**
|
|
631
|
-
* The billing provider configuration associated with a contract.
|
|
632
|
-
*/
|
|
633
|
-
customer_billing_provider_configuration?: Data.CustomerBillingProviderConfiguration;
|
|
634
|
-
prepaid_balance_threshold_configuration?: Data.PrepaidBalanceThresholdConfiguration;
|
|
635
|
-
/**
|
|
636
|
-
* Priority of the contract.
|
|
637
|
-
*/
|
|
638
|
-
priority?: number;
|
|
639
|
-
/**
|
|
640
|
-
* Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
641
|
-
* usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
642
|
-
* `ending_before` date for consolidation to occur. This field cannot be modified
|
|
643
|
-
* after a Contract has been created. If this field is omitted, charges will appear
|
|
644
|
-
* on a separate invoice from usage charges.
|
|
645
|
-
*/
|
|
646
|
-
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
647
|
-
spend_threshold_configuration?: Data.SpendThresholdConfiguration;
|
|
648
|
-
/**
|
|
649
|
-
* List of subscriptions on the contract.
|
|
650
|
-
*/
|
|
651
|
-
subscriptions?: Array<Data.Subscription>;
|
|
652
|
-
/**
|
|
653
|
-
* Prevents the creation of duplicates. If a request to create a record is made
|
|
654
|
-
* with a previously used uniqueness key, a new record will not be created and the
|
|
655
|
-
* request will fail with a 409 error.
|
|
656
|
-
*/
|
|
657
|
-
uniqueness_key?: string;
|
|
658
|
-
}
|
|
659
|
-
namespace Data {
|
|
660
|
-
interface Amendment {
|
|
661
|
-
id: string;
|
|
662
|
-
commits: Array<Shared.Commit>;
|
|
663
|
-
created_at: string;
|
|
664
|
-
created_by: string;
|
|
665
|
-
overrides: Array<Shared.Override>;
|
|
666
|
-
scheduled_charges: Array<Shared.ScheduledCharge>;
|
|
667
|
-
starting_at: string;
|
|
668
|
-
credits?: Array<Shared.Credit>;
|
|
669
|
-
/**
|
|
670
|
-
* This field's availability is dependent on your client's configuration.
|
|
671
|
-
*/
|
|
672
|
-
discounts?: Array<Shared.Discount>;
|
|
673
|
-
/**
|
|
674
|
-
* This field's availability is dependent on your client's configuration.
|
|
675
|
-
*/
|
|
676
|
-
netsuite_sales_order_id?: string;
|
|
677
|
-
/**
|
|
678
|
-
* This field's availability is dependent on your client's configuration.
|
|
679
|
-
*/
|
|
680
|
-
professional_services?: Array<Shared.ProService>;
|
|
681
|
-
/**
|
|
682
|
-
* This field's availability is dependent on your client's configuration.
|
|
683
|
-
*/
|
|
684
|
-
reseller_royalties?: Array<Amendment.ResellerRoyalty>;
|
|
685
|
-
/**
|
|
686
|
-
* This field's availability is dependent on your client's configuration.
|
|
687
|
-
*/
|
|
688
|
-
salesforce_opportunity_id?: string;
|
|
689
|
-
}
|
|
690
|
-
namespace Amendment {
|
|
691
|
-
interface ResellerRoyalty {
|
|
692
|
-
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
693
|
-
aws_account_number?: string;
|
|
694
|
-
aws_offer_id?: string;
|
|
695
|
-
aws_payer_reference_id?: string;
|
|
696
|
-
ending_before?: string | null;
|
|
697
|
-
fraction?: number;
|
|
698
|
-
gcp_account_id?: string;
|
|
699
|
-
gcp_offer_id?: string;
|
|
700
|
-
netsuite_reseller_id?: string;
|
|
701
|
-
reseller_contract_value?: number;
|
|
702
|
-
starting_at?: string;
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
/**
|
|
706
|
-
* The billing provider configuration associated with a contract.
|
|
707
|
-
*/
|
|
708
|
-
interface CustomerBillingProviderConfiguration {
|
|
709
|
-
billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
|
|
710
|
-
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
711
|
-
id?: string;
|
|
712
|
-
/**
|
|
713
|
-
* Configuration for the billing provider. The structure of this object is specific
|
|
714
|
-
* to the billing provider.
|
|
715
|
-
*/
|
|
716
|
-
configuration?: {
|
|
717
|
-
[key: string]: unknown;
|
|
718
|
-
};
|
|
719
|
-
}
|
|
720
|
-
interface PrepaidBalanceThresholdConfiguration {
|
|
721
|
-
commit: PrepaidBalanceThresholdConfiguration.Commit;
|
|
722
|
-
/**
|
|
723
|
-
* When set to false, the contract will not be evaluated against the
|
|
724
|
-
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
725
|
-
* regardless of prior state.
|
|
726
|
-
*/
|
|
727
|
-
is_enabled: boolean;
|
|
728
|
-
payment_gate_config: PrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
729
|
-
/**
|
|
730
|
-
* Specify the amount the balance should be recharged to.
|
|
731
|
-
*/
|
|
732
|
-
recharge_to_amount: number;
|
|
733
|
-
/**
|
|
734
|
-
* Specify the threshold amount for the contract. Each time the contract's prepaid
|
|
735
|
-
* balance lowers to this amount, a threshold charge will be initiated.
|
|
736
|
-
*/
|
|
737
|
-
threshold_amount: number;
|
|
738
|
-
/**
|
|
739
|
-
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
740
|
-
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
741
|
-
*/
|
|
742
|
-
custom_credit_type_id?: string;
|
|
743
|
-
}
|
|
744
|
-
namespace PrepaidBalanceThresholdConfiguration {
|
|
745
|
-
interface Commit {
|
|
746
|
-
/**
|
|
747
|
-
* The commit product that will be used to generate the line item for commit
|
|
748
|
-
* payment.
|
|
749
|
-
*/
|
|
750
|
-
product_id: string;
|
|
751
|
-
/**
|
|
752
|
-
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
753
|
-
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
754
|
-
* all products.
|
|
755
|
-
*/
|
|
756
|
-
applicable_product_ids?: Array<string>;
|
|
757
|
-
/**
|
|
758
|
-
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
759
|
-
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
760
|
-
* all products.
|
|
761
|
-
*/
|
|
762
|
-
applicable_product_tags?: Array<string>;
|
|
763
|
-
description?: string;
|
|
764
|
-
/**
|
|
765
|
-
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
766
|
-
* will default to the commit product name.
|
|
767
|
-
*/
|
|
768
|
-
name?: string;
|
|
769
|
-
/**
|
|
770
|
-
* List of filters that determine what kind of customer usage draws down a commit
|
|
771
|
-
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
772
|
-
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
773
|
-
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
774
|
-
*/
|
|
775
|
-
specifiers?: Array<Commit.Specifier>;
|
|
776
|
-
}
|
|
777
|
-
namespace Commit {
|
|
778
|
-
interface Specifier {
|
|
779
|
-
presentation_group_values?: {
|
|
780
|
-
[key: string]: string;
|
|
781
|
-
};
|
|
782
|
-
pricing_group_values?: {
|
|
783
|
-
[key: string]: string;
|
|
784
|
-
};
|
|
785
|
-
/**
|
|
786
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
787
|
-
*/
|
|
788
|
-
product_id?: string;
|
|
789
|
-
/**
|
|
790
|
-
* If provided, the specifier will only apply to products with all the specified
|
|
791
|
-
* tags.
|
|
792
|
-
*/
|
|
793
|
-
product_tags?: Array<string>;
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
interface PaymentGateConfig {
|
|
797
|
-
/**
|
|
798
|
-
* Gate access to the commit balance based on successful collection of payment.
|
|
799
|
-
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
800
|
-
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
801
|
-
* wish to payment gate the commit balance.
|
|
802
|
-
*/
|
|
803
|
-
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
804
|
-
/**
|
|
805
|
-
* Only applicable if using PRECALCULATED as your tax type.
|
|
806
|
-
*/
|
|
807
|
-
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
808
|
-
/**
|
|
809
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
810
|
-
*/
|
|
811
|
-
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
812
|
-
/**
|
|
813
|
-
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
814
|
-
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
815
|
-
* will default to NONE.
|
|
816
|
-
*/
|
|
817
|
-
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
818
|
-
}
|
|
819
|
-
namespace PaymentGateConfig {
|
|
820
|
-
/**
|
|
821
|
-
* Only applicable if using PRECALCULATED as your tax type.
|
|
822
|
-
*/
|
|
823
|
-
interface PrecalculatedTaxConfig {
|
|
824
|
-
/**
|
|
825
|
-
* Amount of tax to be applied. This should be in the same currency and
|
|
826
|
-
* denomination as the commit's invoice schedule
|
|
827
|
-
*/
|
|
828
|
-
tax_amount: number;
|
|
829
|
-
/**
|
|
830
|
-
* Name of the tax to be applied. This may be used in an invoice line item
|
|
831
|
-
* description.
|
|
832
|
-
*/
|
|
833
|
-
tax_name?: string;
|
|
834
|
-
}
|
|
835
|
-
/**
|
|
836
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
837
|
-
*/
|
|
838
|
-
interface StripeConfig {
|
|
839
|
-
/**
|
|
840
|
-
* If left blank, will default to INVOICE
|
|
841
|
-
*/
|
|
842
|
-
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
843
|
-
/**
|
|
844
|
-
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
845
|
-
* your payment type.
|
|
846
|
-
*/
|
|
847
|
-
invoice_metadata?: {
|
|
848
|
-
[key: string]: string;
|
|
849
|
-
};
|
|
850
|
-
}
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
interface SpendThresholdConfiguration {
|
|
854
|
-
commit: SpendThresholdConfiguration.Commit;
|
|
855
|
-
/**
|
|
856
|
-
* When set to false, the contract will not be evaluated against the
|
|
857
|
-
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
858
|
-
* regardless of prior state.
|
|
859
|
-
*/
|
|
860
|
-
is_enabled: boolean;
|
|
861
|
-
payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
|
|
862
|
-
/**
|
|
863
|
-
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
864
|
-
* hits this amount, a threshold charge will be initiated.
|
|
865
|
-
*/
|
|
866
|
-
threshold_amount: number;
|
|
867
|
-
}
|
|
868
|
-
namespace SpendThresholdConfiguration {
|
|
869
|
-
interface Commit {
|
|
870
|
-
/**
|
|
871
|
-
* The commit product that will be used to generate the line item for commit
|
|
872
|
-
* payment.
|
|
873
|
-
*/
|
|
874
|
-
product_id: string;
|
|
875
|
-
description?: string;
|
|
876
|
-
/**
|
|
877
|
-
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
878
|
-
* will default to the commit product name.
|
|
879
|
-
*/
|
|
880
|
-
name?: string;
|
|
881
|
-
}
|
|
882
|
-
interface PaymentGateConfig {
|
|
883
|
-
/**
|
|
884
|
-
* Gate access to the commit balance based on successful collection of payment.
|
|
885
|
-
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
886
|
-
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
887
|
-
* wish to payment gate the commit balance.
|
|
888
|
-
*/
|
|
889
|
-
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
890
|
-
/**
|
|
891
|
-
* Only applicable if using PRECALCULATED as your tax type.
|
|
892
|
-
*/
|
|
893
|
-
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
894
|
-
/**
|
|
895
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
896
|
-
*/
|
|
897
|
-
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
898
|
-
/**
|
|
899
|
-
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
900
|
-
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
901
|
-
* will default to NONE.
|
|
902
|
-
*/
|
|
903
|
-
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
904
|
-
}
|
|
905
|
-
namespace PaymentGateConfig {
|
|
906
|
-
/**
|
|
907
|
-
* Only applicable if using PRECALCULATED as your tax type.
|
|
908
|
-
*/
|
|
909
|
-
interface PrecalculatedTaxConfig {
|
|
910
|
-
/**
|
|
911
|
-
* Amount of tax to be applied. This should be in the same currency and
|
|
912
|
-
* denomination as the commit's invoice schedule
|
|
913
|
-
*/
|
|
914
|
-
tax_amount: number;
|
|
915
|
-
/**
|
|
916
|
-
* Name of the tax to be applied. This may be used in an invoice line item
|
|
917
|
-
* description.
|
|
918
|
-
*/
|
|
919
|
-
tax_name?: string;
|
|
920
|
-
}
|
|
921
|
-
/**
|
|
922
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
923
|
-
*/
|
|
924
|
-
interface StripeConfig {
|
|
925
|
-
/**
|
|
926
|
-
* If left blank, will default to INVOICE
|
|
927
|
-
*/
|
|
928
|
-
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
929
|
-
/**
|
|
930
|
-
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
931
|
-
* your payment type.
|
|
932
|
-
*/
|
|
933
|
-
invoice_metadata?: {
|
|
934
|
-
[key: string]: string;
|
|
935
|
-
};
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
interface Subscription {
|
|
940
|
-
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
941
|
-
proration: Subscription.Proration;
|
|
942
|
-
/**
|
|
943
|
-
* List of quantity schedule items for the subscription. Only includes the current
|
|
944
|
-
* quantity and future quantity changes.
|
|
945
|
-
*/
|
|
946
|
-
quantity_schedule: Array<Subscription.QuantitySchedule>;
|
|
947
|
-
starting_at: string;
|
|
948
|
-
subscription_rate: Subscription.SubscriptionRate;
|
|
949
|
-
id?: string;
|
|
950
|
-
custom_fields?: {
|
|
951
|
-
[key: string]: string;
|
|
952
|
-
};
|
|
953
|
-
description?: string;
|
|
954
|
-
ending_before?: string;
|
|
955
|
-
fiat_credit_type_id?: string;
|
|
956
|
-
name?: string;
|
|
957
|
-
}
|
|
958
|
-
namespace Subscription {
|
|
959
|
-
interface Proration {
|
|
960
|
-
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
961
|
-
is_prorated: boolean;
|
|
962
|
-
}
|
|
963
|
-
interface QuantitySchedule {
|
|
964
|
-
quantity: number;
|
|
965
|
-
starting_at: string;
|
|
966
|
-
ending_before?: string;
|
|
967
|
-
}
|
|
968
|
-
interface SubscriptionRate {
|
|
969
|
-
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
970
|
-
product: SubscriptionRate.Product;
|
|
971
|
-
}
|
|
972
|
-
namespace SubscriptionRate {
|
|
973
|
-
interface Product {
|
|
974
|
-
id: string;
|
|
975
|
-
name: string;
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
}
|
|
491
|
+
data: Array<Shared.Contract>;
|
|
980
492
|
}
|
|
981
493
|
export interface ContractAmendResponse {
|
|
982
494
|
data: Shared.ID;
|
|
@@ -987,10 +499,7 @@ export interface ContractArchiveResponse {
|
|
|
987
499
|
export interface ContractCreateHistoricalInvoicesResponse {
|
|
988
500
|
data: Array<InvoicesAPI.Invoice>;
|
|
989
501
|
}
|
|
990
|
-
export
|
|
991
|
-
data: Array<Shared.Commit | Shared.Credit>;
|
|
992
|
-
next_page: string | null;
|
|
993
|
-
}
|
|
502
|
+
export type ContractListBalancesResponse = Shared.Commit | Shared.Credit;
|
|
994
503
|
export interface ContractRetrieveRateScheduleResponse {
|
|
995
504
|
data: Array<ContractRetrieveRateScheduleResponse.Data>;
|
|
996
505
|
next_page?: string | null;
|
|
@@ -999,6 +508,9 @@ export declare namespace ContractRetrieveRateScheduleResponse {
|
|
|
999
508
|
interface Data {
|
|
1000
509
|
entitled: boolean;
|
|
1001
510
|
list_rate: Shared.Rate;
|
|
511
|
+
/**
|
|
512
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
513
|
+
*/
|
|
1002
514
|
product_custom_fields: {
|
|
1003
515
|
[key: string]: string;
|
|
1004
516
|
};
|
|
@@ -1012,30 +524,13 @@ export declare namespace ContractRetrieveRateScheduleResponse {
|
|
|
1012
524
|
* A distinct rate on the rate card. You can choose to use this rate rather than
|
|
1013
525
|
* list rate when consuming a credit or commit.
|
|
1014
526
|
*/
|
|
1015
|
-
commit_rate?:
|
|
527
|
+
commit_rate?: Shared.CommitRate;
|
|
1016
528
|
ending_before?: string;
|
|
1017
529
|
override_rate?: Shared.Rate;
|
|
1018
530
|
pricing_group_values?: {
|
|
1019
531
|
[key: string]: string;
|
|
1020
532
|
};
|
|
1021
533
|
}
|
|
1022
|
-
namespace Data {
|
|
1023
|
-
/**
|
|
1024
|
-
* A distinct rate on the rate card. You can choose to use this rate rather than
|
|
1025
|
-
* list rate when consuming a credit or commit.
|
|
1026
|
-
*/
|
|
1027
|
-
interface CommitRate {
|
|
1028
|
-
rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
|
|
1029
|
-
/**
|
|
1030
|
-
* Commit rate price. For FLAT rate_type, this must be >=0.
|
|
1031
|
-
*/
|
|
1032
|
-
price?: number;
|
|
1033
|
-
/**
|
|
1034
|
-
* Only set for TIERED rate_type.
|
|
1035
|
-
*/
|
|
1036
|
-
tiers?: Array<Shared.Tier>;
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
534
|
}
|
|
1040
535
|
export interface ContractRetrieveSubscriptionQuantityHistoryResponse {
|
|
1041
536
|
data: ContractRetrieveSubscriptionQuantityHistoryResponse.Data;
|
|
@@ -1079,6 +574,9 @@ export interface ContractCreateParams {
|
|
|
1079
574
|
billing_provider_configuration?: ContractCreateParams.BillingProviderConfiguration;
|
|
1080
575
|
commits?: Array<ContractCreateParams.Commit>;
|
|
1081
576
|
credits?: Array<ContractCreateParams.Credit>;
|
|
577
|
+
/**
|
|
578
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
579
|
+
*/
|
|
1082
580
|
custom_fields?: {
|
|
1083
581
|
[key: string]: string;
|
|
1084
582
|
};
|
|
@@ -1105,7 +603,7 @@ export interface ContractCreateParams {
|
|
|
1105
603
|
*/
|
|
1106
604
|
netsuite_sales_order_id?: string;
|
|
1107
605
|
overrides?: Array<ContractCreateParams.Override>;
|
|
1108
|
-
prepaid_balance_threshold_configuration?:
|
|
606
|
+
prepaid_balance_threshold_configuration?: Shared.PrepaidBalanceThresholdConfiguration;
|
|
1109
607
|
/**
|
|
1110
608
|
* Priority of the contract.
|
|
1111
609
|
*/
|
|
@@ -1139,7 +637,7 @@ export interface ContractCreateParams {
|
|
|
1139
637
|
* on a separate invoice from usage charges.
|
|
1140
638
|
*/
|
|
1141
639
|
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
1142
|
-
spend_threshold_configuration?:
|
|
640
|
+
spend_threshold_configuration?: Shared.SpendThresholdConfiguration;
|
|
1143
641
|
/**
|
|
1144
642
|
* Optional list of
|
|
1145
643
|
* [subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/)
|
|
@@ -1206,6 +704,9 @@ export declare namespace ContractCreateParams {
|
|
|
1206
704
|
* all products.
|
|
1207
705
|
*/
|
|
1208
706
|
applicable_product_tags?: Array<string>;
|
|
707
|
+
/**
|
|
708
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
709
|
+
*/
|
|
1209
710
|
custom_fields?: {
|
|
1210
711
|
[key: string]: string;
|
|
1211
712
|
};
|
|
@@ -1216,7 +717,7 @@ export declare namespace ContractCreateParams {
|
|
|
1216
717
|
/**
|
|
1217
718
|
* Optional configuration for commit hierarchy access control
|
|
1218
719
|
*/
|
|
1219
|
-
hierarchy_configuration?:
|
|
720
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
1220
721
|
/**
|
|
1221
722
|
* Required for "POSTPAID" commits: the true up invoice will be generated at this
|
|
1222
723
|
* time and only one schedule item is allowed; the total must match access_schedule
|
|
@@ -1252,7 +753,7 @@ export declare namespace ContractCreateParams {
|
|
|
1252
753
|
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
1253
754
|
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
1254
755
|
*/
|
|
1255
|
-
specifiers?: Array<
|
|
756
|
+
specifiers?: Array<Shared.CommitSpecifierInput>;
|
|
1256
757
|
/**
|
|
1257
758
|
* A temporary ID for the commit that can be used to reference the commit for
|
|
1258
759
|
* commit specific overrides.
|
|
@@ -1285,24 +786,6 @@ export declare namespace ContractCreateParams {
|
|
|
1285
786
|
starting_at: string;
|
|
1286
787
|
}
|
|
1287
788
|
}
|
|
1288
|
-
/**
|
|
1289
|
-
* Optional configuration for commit hierarchy access control
|
|
1290
|
-
*/
|
|
1291
|
-
interface HierarchyConfiguration {
|
|
1292
|
-
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
1293
|
-
}
|
|
1294
|
-
namespace HierarchyConfiguration {
|
|
1295
|
-
interface CommitHierarchyChildAccessAll {
|
|
1296
|
-
type: 'ALL';
|
|
1297
|
-
}
|
|
1298
|
-
interface CommitHierarchyChildAccessNone {
|
|
1299
|
-
type: 'NONE';
|
|
1300
|
-
}
|
|
1301
|
-
interface CommitHierarchyChildAccessContractIDs {
|
|
1302
|
-
contract_ids: Array<string>;
|
|
1303
|
-
type: 'CONTRACT_IDS';
|
|
1304
|
-
}
|
|
1305
|
-
}
|
|
1306
789
|
/**
|
|
1307
790
|
* Required for "POSTPAID" commits: the true up invoice will be generated at this
|
|
1308
791
|
* time and only one schedule item is allowed; the total must match access_schedule
|
|
@@ -1415,7 +898,7 @@ export declare namespace ContractCreateParams {
|
|
|
1415
898
|
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
1416
899
|
* will default to NONE.
|
|
1417
900
|
*/
|
|
1418
|
-
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
901
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'AVALARA' | 'PRECALCULATED';
|
|
1419
902
|
}
|
|
1420
903
|
namespace PaymentGateConfig {
|
|
1421
904
|
/**
|
|
@@ -1461,23 +944,6 @@ export declare namespace ContractCreateParams {
|
|
|
1461
944
|
on_session_payment?: boolean;
|
|
1462
945
|
}
|
|
1463
946
|
}
|
|
1464
|
-
interface Specifier {
|
|
1465
|
-
presentation_group_values?: {
|
|
1466
|
-
[key: string]: string;
|
|
1467
|
-
};
|
|
1468
|
-
pricing_group_values?: {
|
|
1469
|
-
[key: string]: string;
|
|
1470
|
-
};
|
|
1471
|
-
/**
|
|
1472
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1473
|
-
*/
|
|
1474
|
-
product_id?: string;
|
|
1475
|
-
/**
|
|
1476
|
-
* If provided, the specifier will only apply to products with all the specified
|
|
1477
|
-
* tags.
|
|
1478
|
-
*/
|
|
1479
|
-
product_tags?: Array<string>;
|
|
1480
|
-
}
|
|
1481
947
|
}
|
|
1482
948
|
interface Credit {
|
|
1483
949
|
/**
|
|
@@ -1495,6 +961,9 @@ export declare namespace ContractCreateParams {
|
|
|
1495
961
|
* applicable_product_tags are not provided, the credit applies to all products.
|
|
1496
962
|
*/
|
|
1497
963
|
applicable_product_tags?: Array<string>;
|
|
964
|
+
/**
|
|
965
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
966
|
+
*/
|
|
1498
967
|
custom_fields?: {
|
|
1499
968
|
[key: string]: string;
|
|
1500
969
|
};
|
|
@@ -1505,7 +974,7 @@ export declare namespace ContractCreateParams {
|
|
|
1505
974
|
/**
|
|
1506
975
|
* Optional configuration for credit hierarchy access control
|
|
1507
976
|
*/
|
|
1508
|
-
hierarchy_configuration?:
|
|
977
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
1509
978
|
/**
|
|
1510
979
|
* displayed on invoices
|
|
1511
980
|
*/
|
|
@@ -1526,7 +995,7 @@ export declare namespace ContractCreateParams {
|
|
|
1526
995
|
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
1527
996
|
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
1528
997
|
*/
|
|
1529
|
-
specifiers?: Array<
|
|
998
|
+
specifiers?: Array<Shared.CommitSpecifierInput>;
|
|
1530
999
|
}
|
|
1531
1000
|
namespace Credit {
|
|
1532
1001
|
/**
|
|
@@ -1552,41 +1021,6 @@ export declare namespace ContractCreateParams {
|
|
|
1552
1021
|
starting_at: string;
|
|
1553
1022
|
}
|
|
1554
1023
|
}
|
|
1555
|
-
/**
|
|
1556
|
-
* Optional configuration for credit hierarchy access control
|
|
1557
|
-
*/
|
|
1558
|
-
interface HierarchyConfiguration {
|
|
1559
|
-
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
1560
|
-
}
|
|
1561
|
-
namespace HierarchyConfiguration {
|
|
1562
|
-
interface CommitHierarchyChildAccessAll {
|
|
1563
|
-
type: 'ALL';
|
|
1564
|
-
}
|
|
1565
|
-
interface CommitHierarchyChildAccessNone {
|
|
1566
|
-
type: 'NONE';
|
|
1567
|
-
}
|
|
1568
|
-
interface CommitHierarchyChildAccessContractIDs {
|
|
1569
|
-
contract_ids: Array<string>;
|
|
1570
|
-
type: 'CONTRACT_IDS';
|
|
1571
|
-
}
|
|
1572
|
-
}
|
|
1573
|
-
interface Specifier {
|
|
1574
|
-
presentation_group_values?: {
|
|
1575
|
-
[key: string]: string;
|
|
1576
|
-
};
|
|
1577
|
-
pricing_group_values?: {
|
|
1578
|
-
[key: string]: string;
|
|
1579
|
-
};
|
|
1580
|
-
/**
|
|
1581
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1582
|
-
*/
|
|
1583
|
-
product_id?: string;
|
|
1584
|
-
/**
|
|
1585
|
-
* If provided, the specifier will only apply to products with all the specified
|
|
1586
|
-
* tags.
|
|
1587
|
-
*/
|
|
1588
|
-
product_tags?: Array<string>;
|
|
1589
|
-
}
|
|
1590
1024
|
}
|
|
1591
1025
|
interface Discount {
|
|
1592
1026
|
product_id: string;
|
|
@@ -1594,6 +1028,9 @@ export declare namespace ContractCreateParams {
|
|
|
1594
1028
|
* Must provide either schedule_items or recurring_schedule.
|
|
1595
1029
|
*/
|
|
1596
1030
|
schedule: Discount.Schedule;
|
|
1031
|
+
/**
|
|
1032
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1033
|
+
*/
|
|
1597
1034
|
custom_fields?: {
|
|
1598
1035
|
[key: string]: string;
|
|
1599
1036
|
};
|
|
@@ -1694,13 +1131,34 @@ export declare namespace ContractCreateParams {
|
|
|
1694
1131
|
}
|
|
1695
1132
|
}
|
|
1696
1133
|
interface HierarchyConfiguration {
|
|
1697
|
-
parent
|
|
1134
|
+
parent?: HierarchyConfiguration.Parent;
|
|
1135
|
+
parent_behavior?: HierarchyConfiguration.ParentBehavior;
|
|
1136
|
+
/**
|
|
1137
|
+
* Indicates whether the parent should pay for the child's invoice charges
|
|
1138
|
+
*/
|
|
1139
|
+
payer?: 'SELF' | 'PARENT';
|
|
1140
|
+
/**
|
|
1141
|
+
* Indicates the behavior of the child's invoice statements on the parent's
|
|
1142
|
+
* invoices **CONSOLIDATE**: Child's invoice statements will be added to parent's
|
|
1143
|
+
* consolidated invoices **SEPARATE**: Child's invoice statements will appear not
|
|
1144
|
+
* appear on parent's consolidated invoices
|
|
1145
|
+
*/
|
|
1146
|
+
usage_statement_behavior?: 'CONSOLIDATE' | 'SEPARATE';
|
|
1698
1147
|
}
|
|
1699
1148
|
namespace HierarchyConfiguration {
|
|
1700
1149
|
interface Parent {
|
|
1701
1150
|
contract_id: string;
|
|
1702
1151
|
customer_id: string;
|
|
1703
1152
|
}
|
|
1153
|
+
interface ParentBehavior {
|
|
1154
|
+
/**
|
|
1155
|
+
* Indicates the desired behavior of consolidated invoices generated by the parent
|
|
1156
|
+
* in a customer hierarchy **CONCATENATE**: Statements on the invoices of child
|
|
1157
|
+
* customers will be appended to the consolidated invoice **NONE**: Do not generate
|
|
1158
|
+
* consolidated invoices
|
|
1159
|
+
*/
|
|
1160
|
+
invoice_consolidation_type?: 'CONCATENATE' | 'NONE';
|
|
1161
|
+
}
|
|
1704
1162
|
}
|
|
1705
1163
|
interface Override {
|
|
1706
1164
|
/**
|
|
@@ -1769,8 +1227,8 @@ export declare namespace ContractCreateParams {
|
|
|
1769
1227
|
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1770
1228
|
/**
|
|
1771
1229
|
* Can only be used for commit specific overrides. Must be used in conjunction with
|
|
1772
|
-
* one of product_id
|
|
1773
|
-
* presentation_group_values
|
|
1230
|
+
* one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
1231
|
+
* `presentation_group_values`. If provided, the override will only apply to the
|
|
1774
1232
|
* specified commits. If not provided, the override will apply to all commits.
|
|
1775
1233
|
*/
|
|
1776
1234
|
commit_ids?: Array<string>;
|
|
@@ -1799,187 +1257,54 @@ export declare namespace ContractCreateParams {
|
|
|
1799
1257
|
product_tags?: Array<string>;
|
|
1800
1258
|
/**
|
|
1801
1259
|
* Can only be used for commit specific overrides. Must be used in conjunction with
|
|
1802
|
-
* one of product_id
|
|
1803
|
-
* presentation_group_values
|
|
1804
|
-
* created by the specified recurring commit ids.
|
|
1805
|
-
*/
|
|
1806
|
-
recurring_commit_ids?: Array<string>;
|
|
1807
|
-
/**
|
|
1808
|
-
* Can only be used for commit specific overrides. Must be used in conjunction with
|
|
1809
|
-
* one of product_id, product_tags, pricing_group_values, or
|
|
1810
|
-
* presentation_group_values. If provided, the override will only apply to credits
|
|
1811
|
-
* created by the specified recurring credit ids.
|
|
1812
|
-
*/
|
|
1813
|
-
recurring_credit_ids?: Array<string>;
|
|
1814
|
-
}
|
|
1815
|
-
/**
|
|
1816
|
-
* Required for OVERWRITE type.
|
|
1817
|
-
*/
|
|
1818
|
-
interface OverwriteRate {
|
|
1819
|
-
rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
|
|
1820
|
-
credit_type_id?: string;
|
|
1821
|
-
/**
|
|
1822
|
-
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
1823
|
-
* processors.
|
|
1824
|
-
*/
|
|
1825
|
-
custom_rate?: {
|
|
1826
|
-
[key: string]: unknown;
|
|
1827
|
-
};
|
|
1828
|
-
/**
|
|
1829
|
-
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
1830
|
-
* set to true.
|
|
1831
|
-
*/
|
|
1832
|
-
is_prorated?: boolean;
|
|
1833
|
-
/**
|
|
1834
|
-
* Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
|
|
1835
|
-
* this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
|
|
1836
|
-
*/
|
|
1837
|
-
price?: number;
|
|
1838
|
-
/**
|
|
1839
|
-
* Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
|
|
1840
|
-
*/
|
|
1841
|
-
quantity?: number;
|
|
1842
|
-
/**
|
|
1843
|
-
* Only set for TIERED rate_type.
|
|
1844
|
-
*/
|
|
1845
|
-
tiers?: Array<Shared.Tier>;
|
|
1846
|
-
}
|
|
1847
|
-
interface Tier {
|
|
1848
|
-
multiplier: number;
|
|
1849
|
-
size?: number;
|
|
1850
|
-
}
|
|
1851
|
-
}
|
|
1852
|
-
interface PrepaidBalanceThresholdConfiguration {
|
|
1853
|
-
commit: PrepaidBalanceThresholdConfiguration.Commit;
|
|
1854
|
-
/**
|
|
1855
|
-
* When set to false, the contract will not be evaluated against the
|
|
1856
|
-
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
1857
|
-
* regardless of prior state.
|
|
1858
|
-
*/
|
|
1859
|
-
is_enabled: boolean;
|
|
1860
|
-
payment_gate_config: PrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
1861
|
-
/**
|
|
1862
|
-
* Specify the amount the balance should be recharged to.
|
|
1863
|
-
*/
|
|
1864
|
-
recharge_to_amount: number;
|
|
1865
|
-
/**
|
|
1866
|
-
* Specify the threshold amount for the contract. Each time the contract's prepaid
|
|
1867
|
-
* balance lowers to this amount, a threshold charge will be initiated.
|
|
1868
|
-
*/
|
|
1869
|
-
threshold_amount: number;
|
|
1870
|
-
/**
|
|
1871
|
-
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
1872
|
-
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
1873
|
-
*/
|
|
1874
|
-
custom_credit_type_id?: string;
|
|
1875
|
-
}
|
|
1876
|
-
namespace PrepaidBalanceThresholdConfiguration {
|
|
1877
|
-
interface Commit {
|
|
1878
|
-
/**
|
|
1879
|
-
* The commit product that will be used to generate the line item for commit
|
|
1880
|
-
* payment.
|
|
1881
|
-
*/
|
|
1882
|
-
product_id: string;
|
|
1883
|
-
/**
|
|
1884
|
-
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
1885
|
-
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
1886
|
-
* all products.
|
|
1887
|
-
*/
|
|
1888
|
-
applicable_product_ids?: Array<string>;
|
|
1889
|
-
/**
|
|
1890
|
-
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
1891
|
-
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
1892
|
-
* all products.
|
|
1893
|
-
*/
|
|
1894
|
-
applicable_product_tags?: Array<string>;
|
|
1895
|
-
description?: string;
|
|
1896
|
-
/**
|
|
1897
|
-
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
1898
|
-
* will default to the commit product name.
|
|
1899
|
-
*/
|
|
1900
|
-
name?: string;
|
|
1901
|
-
/**
|
|
1902
|
-
* List of filters that determine what kind of customer usage draws down a commit
|
|
1903
|
-
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1904
|
-
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
1905
|
-
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
1260
|
+
* one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
1261
|
+
* `presentation_group_values`. If provided, the override will only apply to
|
|
1262
|
+
* commits created by the specified recurring commit ids.
|
|
1906
1263
|
*/
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
};
|
|
1914
|
-
pricing_group_values?: {
|
|
1915
|
-
[key: string]: string;
|
|
1916
|
-
};
|
|
1917
|
-
/**
|
|
1918
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1919
|
-
*/
|
|
1920
|
-
product_id?: string;
|
|
1921
|
-
/**
|
|
1922
|
-
* If provided, the specifier will only apply to products with all the specified
|
|
1923
|
-
* tags.
|
|
1924
|
-
*/
|
|
1925
|
-
product_tags?: Array<string>;
|
|
1926
|
-
}
|
|
1927
|
-
}
|
|
1928
|
-
interface PaymentGateConfig {
|
|
1929
|
-
/**
|
|
1930
|
-
* Gate access to the commit balance based on successful collection of payment.
|
|
1931
|
-
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
1932
|
-
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
1933
|
-
* wish to payment gate the commit balance.
|
|
1264
|
+
recurring_commit_ids?: Array<string>;
|
|
1265
|
+
/**
|
|
1266
|
+
* Can only be used for commit specific overrides. Must be used in conjunction with
|
|
1267
|
+
* one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
1268
|
+
* `presentation_group_values`. If provided, the override will only apply to
|
|
1269
|
+
* credits created by the specified recurring credit ids.
|
|
1934
1270
|
*/
|
|
1935
|
-
|
|
1271
|
+
recurring_credit_ids?: Array<string>;
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Required for OVERWRITE type.
|
|
1275
|
+
*/
|
|
1276
|
+
interface OverwriteRate {
|
|
1277
|
+
rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
|
|
1278
|
+
credit_type_id?: string;
|
|
1936
1279
|
/**
|
|
1937
|
-
* Only
|
|
1280
|
+
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
1281
|
+
* processors.
|
|
1938
1282
|
*/
|
|
1939
|
-
|
|
1283
|
+
custom_rate?: {
|
|
1284
|
+
[key: string]: unknown;
|
|
1285
|
+
};
|
|
1940
1286
|
/**
|
|
1941
|
-
*
|
|
1287
|
+
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
1288
|
+
* set to true.
|
|
1942
1289
|
*/
|
|
1943
|
-
|
|
1290
|
+
is_prorated?: boolean;
|
|
1944
1291
|
/**
|
|
1945
|
-
*
|
|
1946
|
-
*
|
|
1947
|
-
* will default to NONE.
|
|
1292
|
+
* Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
|
|
1293
|
+
* this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
|
|
1948
1294
|
*/
|
|
1949
|
-
|
|
1950
|
-
}
|
|
1951
|
-
namespace PaymentGateConfig {
|
|
1295
|
+
price?: number;
|
|
1952
1296
|
/**
|
|
1953
|
-
*
|
|
1297
|
+
* Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
|
|
1954
1298
|
*/
|
|
1955
|
-
|
|
1956
|
-
/**
|
|
1957
|
-
* Amount of tax to be applied. This should be in the same currency and
|
|
1958
|
-
* denomination as the commit's invoice schedule
|
|
1959
|
-
*/
|
|
1960
|
-
tax_amount: number;
|
|
1961
|
-
/**
|
|
1962
|
-
* Name of the tax to be applied. This may be used in an invoice line item
|
|
1963
|
-
* description.
|
|
1964
|
-
*/
|
|
1965
|
-
tax_name?: string;
|
|
1966
|
-
}
|
|
1299
|
+
quantity?: number;
|
|
1967
1300
|
/**
|
|
1968
|
-
* Only
|
|
1301
|
+
* Only set for TIERED rate_type.
|
|
1969
1302
|
*/
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
/**
|
|
1976
|
-
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
1977
|
-
* your payment type.
|
|
1978
|
-
*/
|
|
1979
|
-
invoice_metadata?: {
|
|
1980
|
-
[key: string]: string;
|
|
1981
|
-
};
|
|
1982
|
-
}
|
|
1303
|
+
tiers?: Array<Shared.Tier>;
|
|
1304
|
+
}
|
|
1305
|
+
interface Tier {
|
|
1306
|
+
multiplier: number;
|
|
1307
|
+
size?: number;
|
|
1983
1308
|
}
|
|
1984
1309
|
}
|
|
1985
1310
|
interface ProfessionalService {
|
|
@@ -1998,6 +1323,9 @@ export declare namespace ContractCreateParams {
|
|
|
1998
1323
|
* amount and must be specified.
|
|
1999
1324
|
*/
|
|
2000
1325
|
unit_price: number;
|
|
1326
|
+
/**
|
|
1327
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1328
|
+
*/
|
|
2001
1329
|
custom_fields?: {
|
|
2002
1330
|
[key: string]: string;
|
|
2003
1331
|
};
|
|
@@ -2046,7 +1374,7 @@ export declare namespace ContractCreateParams {
|
|
|
2046
1374
|
/**
|
|
2047
1375
|
* Optional configuration for recurring commit/credit hierarchy access control
|
|
2048
1376
|
*/
|
|
2049
|
-
hierarchy_configuration?:
|
|
1377
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
2050
1378
|
/**
|
|
2051
1379
|
* The amount the customer should be billed for the commit. Not required.
|
|
2052
1380
|
*/
|
|
@@ -2088,7 +1416,7 @@ export declare namespace ContractCreateParams {
|
|
|
2088
1416
|
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
2089
1417
|
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
2090
1418
|
*/
|
|
2091
|
-
specifiers?: Array<
|
|
1419
|
+
specifiers?: Array<Shared.CommitSpecifierInput>;
|
|
2092
1420
|
/**
|
|
2093
1421
|
* Attach a subscription to the recurring commit/credit.
|
|
2094
1422
|
*/
|
|
@@ -2121,24 +1449,6 @@ export declare namespace ContractCreateParams {
|
|
|
2121
1449
|
value: number;
|
|
2122
1450
|
unit?: 'PERIODS';
|
|
2123
1451
|
}
|
|
2124
|
-
/**
|
|
2125
|
-
* Optional configuration for recurring commit/credit hierarchy access control
|
|
2126
|
-
*/
|
|
2127
|
-
interface HierarchyConfiguration {
|
|
2128
|
-
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
2129
|
-
}
|
|
2130
|
-
namespace HierarchyConfiguration {
|
|
2131
|
-
interface CommitHierarchyChildAccessAll {
|
|
2132
|
-
type: 'ALL';
|
|
2133
|
-
}
|
|
2134
|
-
interface CommitHierarchyChildAccessNone {
|
|
2135
|
-
type: 'NONE';
|
|
2136
|
-
}
|
|
2137
|
-
interface CommitHierarchyChildAccessContractIDs {
|
|
2138
|
-
contract_ids: Array<string>;
|
|
2139
|
-
type: 'CONTRACT_IDS';
|
|
2140
|
-
}
|
|
2141
|
-
}
|
|
2142
1452
|
/**
|
|
2143
1453
|
* The amount the customer should be billed for the commit. Not required.
|
|
2144
1454
|
*/
|
|
@@ -2147,23 +1457,6 @@ export declare namespace ContractCreateParams {
|
|
|
2147
1457
|
quantity: number;
|
|
2148
1458
|
unit_price: number;
|
|
2149
1459
|
}
|
|
2150
|
-
interface Specifier {
|
|
2151
|
-
presentation_group_values?: {
|
|
2152
|
-
[key: string]: string;
|
|
2153
|
-
};
|
|
2154
|
-
pricing_group_values?: {
|
|
2155
|
-
[key: string]: string;
|
|
2156
|
-
};
|
|
2157
|
-
/**
|
|
2158
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
2159
|
-
*/
|
|
2160
|
-
product_id?: string;
|
|
2161
|
-
/**
|
|
2162
|
-
* If provided, the specifier will only apply to products with all the specified
|
|
2163
|
-
* tags.
|
|
2164
|
-
*/
|
|
2165
|
-
product_tags?: Array<string>;
|
|
2166
|
-
}
|
|
2167
1460
|
/**
|
|
2168
1461
|
* Attach a subscription to the recurring commit/credit.
|
|
2169
1462
|
*/
|
|
@@ -2176,7 +1469,7 @@ export declare namespace ContractCreateParams {
|
|
|
2176
1469
|
/**
|
|
2177
1470
|
* If set to POOLED, allocation added per seat is pooled across the account.
|
|
2178
1471
|
*/
|
|
2179
|
-
allocation?: 'POOLED';
|
|
1472
|
+
allocation?: 'INDIVIDUAL' | 'POOLED';
|
|
2180
1473
|
}
|
|
2181
1474
|
namespace SubscriptionConfig {
|
|
2182
1475
|
interface ApplySeatIncreaseConfig {
|
|
@@ -2226,7 +1519,7 @@ export declare namespace ContractCreateParams {
|
|
|
2226
1519
|
/**
|
|
2227
1520
|
* Optional configuration for recurring commit/credit hierarchy access control
|
|
2228
1521
|
*/
|
|
2229
|
-
hierarchy_configuration?:
|
|
1522
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
2230
1523
|
/**
|
|
2231
1524
|
* displayed on invoices. will be passed through to the individual commits
|
|
2232
1525
|
*/
|
|
@@ -2264,7 +1557,7 @@ export declare namespace ContractCreateParams {
|
|
|
2264
1557
|
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
2265
1558
|
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
2266
1559
|
*/
|
|
2267
|
-
specifiers?: Array<
|
|
1560
|
+
specifiers?: Array<Shared.CommitSpecifierInput>;
|
|
2268
1561
|
/**
|
|
2269
1562
|
* Attach a subscription to the recurring commit/credit.
|
|
2270
1563
|
*/
|
|
@@ -2297,41 +1590,6 @@ export declare namespace ContractCreateParams {
|
|
|
2297
1590
|
value: number;
|
|
2298
1591
|
unit?: 'PERIODS';
|
|
2299
1592
|
}
|
|
2300
|
-
/**
|
|
2301
|
-
* Optional configuration for recurring commit/credit hierarchy access control
|
|
2302
|
-
*/
|
|
2303
|
-
interface HierarchyConfiguration {
|
|
2304
|
-
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
2305
|
-
}
|
|
2306
|
-
namespace HierarchyConfiguration {
|
|
2307
|
-
interface CommitHierarchyChildAccessAll {
|
|
2308
|
-
type: 'ALL';
|
|
2309
|
-
}
|
|
2310
|
-
interface CommitHierarchyChildAccessNone {
|
|
2311
|
-
type: 'NONE';
|
|
2312
|
-
}
|
|
2313
|
-
interface CommitHierarchyChildAccessContractIDs {
|
|
2314
|
-
contract_ids: Array<string>;
|
|
2315
|
-
type: 'CONTRACT_IDS';
|
|
2316
|
-
}
|
|
2317
|
-
}
|
|
2318
|
-
interface Specifier {
|
|
2319
|
-
presentation_group_values?: {
|
|
2320
|
-
[key: string]: string;
|
|
2321
|
-
};
|
|
2322
|
-
pricing_group_values?: {
|
|
2323
|
-
[key: string]: string;
|
|
2324
|
-
};
|
|
2325
|
-
/**
|
|
2326
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
2327
|
-
*/
|
|
2328
|
-
product_id?: string;
|
|
2329
|
-
/**
|
|
2330
|
-
* If provided, the specifier will only apply to products with all the specified
|
|
2331
|
-
* tags.
|
|
2332
|
-
*/
|
|
2333
|
-
product_tags?: Array<string>;
|
|
2334
|
-
}
|
|
2335
1593
|
/**
|
|
2336
1594
|
* Attach a subscription to the recurring commit/credit.
|
|
2337
1595
|
*/
|
|
@@ -2344,7 +1602,7 @@ export declare namespace ContractCreateParams {
|
|
|
2344
1602
|
/**
|
|
2345
1603
|
* If set to POOLED, allocation added per seat is pooled across the account.
|
|
2346
1604
|
*/
|
|
2347
|
-
allocation?: 'POOLED';
|
|
1605
|
+
allocation?: 'INDIVIDUAL' | 'POOLED';
|
|
2348
1606
|
}
|
|
2349
1607
|
namespace SubscriptionConfig {
|
|
2350
1608
|
interface ApplySeatIncreaseConfig {
|
|
@@ -2390,6 +1648,9 @@ export declare namespace ContractCreateParams {
|
|
|
2390
1648
|
* Must provide either schedule_items or recurring_schedule.
|
|
2391
1649
|
*/
|
|
2392
1650
|
schedule: ScheduledCharge.Schedule;
|
|
1651
|
+
/**
|
|
1652
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1653
|
+
*/
|
|
2393
1654
|
custom_fields?: {
|
|
2394
1655
|
[key: string]: string;
|
|
2395
1656
|
};
|
|
@@ -2489,100 +1750,13 @@ export declare namespace ContractCreateParams {
|
|
|
2489
1750
|
}
|
|
2490
1751
|
}
|
|
2491
1752
|
}
|
|
2492
|
-
interface SpendThresholdConfiguration {
|
|
2493
|
-
commit: SpendThresholdConfiguration.Commit;
|
|
2494
|
-
/**
|
|
2495
|
-
* When set to false, the contract will not be evaluated against the
|
|
2496
|
-
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
2497
|
-
* regardless of prior state.
|
|
2498
|
-
*/
|
|
2499
|
-
is_enabled: boolean;
|
|
2500
|
-
payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
|
|
2501
|
-
/**
|
|
2502
|
-
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
2503
|
-
* hits this amount, a threshold charge will be initiated.
|
|
2504
|
-
*/
|
|
2505
|
-
threshold_amount: number;
|
|
2506
|
-
}
|
|
2507
|
-
namespace SpendThresholdConfiguration {
|
|
2508
|
-
interface Commit {
|
|
2509
|
-
/**
|
|
2510
|
-
* The commit product that will be used to generate the line item for commit
|
|
2511
|
-
* payment.
|
|
2512
|
-
*/
|
|
2513
|
-
product_id: string;
|
|
2514
|
-
description?: string;
|
|
2515
|
-
/**
|
|
2516
|
-
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
2517
|
-
* will default to the commit product name.
|
|
2518
|
-
*/
|
|
2519
|
-
name?: string;
|
|
2520
|
-
}
|
|
2521
|
-
interface PaymentGateConfig {
|
|
2522
|
-
/**
|
|
2523
|
-
* Gate access to the commit balance based on successful collection of payment.
|
|
2524
|
-
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
2525
|
-
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
2526
|
-
* wish to payment gate the commit balance.
|
|
2527
|
-
*/
|
|
2528
|
-
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
2529
|
-
/**
|
|
2530
|
-
* Only applicable if using PRECALCULATED as your tax type.
|
|
2531
|
-
*/
|
|
2532
|
-
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
2533
|
-
/**
|
|
2534
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
2535
|
-
*/
|
|
2536
|
-
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
2537
|
-
/**
|
|
2538
|
-
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
2539
|
-
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
2540
|
-
* will default to NONE.
|
|
2541
|
-
*/
|
|
2542
|
-
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
2543
|
-
}
|
|
2544
|
-
namespace PaymentGateConfig {
|
|
2545
|
-
/**
|
|
2546
|
-
* Only applicable if using PRECALCULATED as your tax type.
|
|
2547
|
-
*/
|
|
2548
|
-
interface PrecalculatedTaxConfig {
|
|
2549
|
-
/**
|
|
2550
|
-
* Amount of tax to be applied. This should be in the same currency and
|
|
2551
|
-
* denomination as the commit's invoice schedule
|
|
2552
|
-
*/
|
|
2553
|
-
tax_amount: number;
|
|
2554
|
-
/**
|
|
2555
|
-
* Name of the tax to be applied. This may be used in an invoice line item
|
|
2556
|
-
* description.
|
|
2557
|
-
*/
|
|
2558
|
-
tax_name?: string;
|
|
2559
|
-
}
|
|
2560
|
-
/**
|
|
2561
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
2562
|
-
*/
|
|
2563
|
-
interface StripeConfig {
|
|
2564
|
-
/**
|
|
2565
|
-
* If left blank, will default to INVOICE
|
|
2566
|
-
*/
|
|
2567
|
-
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
2568
|
-
/**
|
|
2569
|
-
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
2570
|
-
* your payment type.
|
|
2571
|
-
*/
|
|
2572
|
-
invoice_metadata?: {
|
|
2573
|
-
[key: string]: string;
|
|
2574
|
-
};
|
|
2575
|
-
}
|
|
2576
|
-
}
|
|
2577
|
-
}
|
|
2578
1753
|
interface Subscription {
|
|
2579
1754
|
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
2580
|
-
/**
|
|
2581
|
-
* The initial quantity for the subscription. It must be non-negative value.
|
|
2582
|
-
*/
|
|
2583
|
-
initial_quantity: number;
|
|
2584
1755
|
proration: Subscription.Proration;
|
|
2585
1756
|
subscription_rate: Subscription.SubscriptionRate;
|
|
1757
|
+
/**
|
|
1758
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1759
|
+
*/
|
|
2586
1760
|
custom_fields?: {
|
|
2587
1761
|
[key: string]: string;
|
|
2588
1762
|
};
|
|
@@ -2592,7 +1766,19 @@ export declare namespace ContractCreateParams {
|
|
|
2592
1766
|
* contract end date.
|
|
2593
1767
|
*/
|
|
2594
1768
|
ending_before?: string;
|
|
1769
|
+
/**
|
|
1770
|
+
* The initial quantity for the subscription. It must be non-negative value.
|
|
1771
|
+
* Required if quantity_management_mode is QUANTITY_ONLY.
|
|
1772
|
+
*/
|
|
1773
|
+
initial_quantity?: number;
|
|
2595
1774
|
name?: string;
|
|
1775
|
+
/**
|
|
1776
|
+
* Determines how the subscription's quantity is controlled. Defaults to
|
|
1777
|
+
* QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
|
|
1778
|
+
* directly on the subscription. `initial_quantity` must be provided with this
|
|
1779
|
+
* option. Compatible with recurring commits/credits that use POOLED allocation.
|
|
1780
|
+
*/
|
|
1781
|
+
quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY';
|
|
2596
1782
|
/**
|
|
2597
1783
|
* Inclusive start time for the subscription. If not provided, defaults to contract
|
|
2598
1784
|
* start date
|
|
@@ -2760,6 +1946,9 @@ export interface ContractAmendParams {
|
|
|
2760
1946
|
starting_at: string;
|
|
2761
1947
|
commits?: Array<ContractAmendParams.Commit>;
|
|
2762
1948
|
credits?: Array<ContractAmendParams.Credit>;
|
|
1949
|
+
/**
|
|
1950
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1951
|
+
*/
|
|
2763
1952
|
custom_fields?: {
|
|
2764
1953
|
[key: string]: string;
|
|
2765
1954
|
};
|
|
@@ -2816,6 +2005,9 @@ export declare namespace ContractAmendParams {
|
|
|
2816
2005
|
* all products.
|
|
2817
2006
|
*/
|
|
2818
2007
|
applicable_product_tags?: Array<string>;
|
|
2008
|
+
/**
|
|
2009
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2010
|
+
*/
|
|
2819
2011
|
custom_fields?: {
|
|
2820
2012
|
[key: string]: string;
|
|
2821
2013
|
};
|
|
@@ -2826,7 +2018,7 @@ export declare namespace ContractAmendParams {
|
|
|
2826
2018
|
/**
|
|
2827
2019
|
* Optional configuration for commit hierarchy access control
|
|
2828
2020
|
*/
|
|
2829
|
-
hierarchy_configuration?:
|
|
2021
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
2830
2022
|
/**
|
|
2831
2023
|
* Required for "POSTPAID" commits: the true up invoice will be generated at this
|
|
2832
2024
|
* time and only one schedule item is allowed; the total must match access_schedule
|
|
@@ -2862,7 +2054,7 @@ export declare namespace ContractAmendParams {
|
|
|
2862
2054
|
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
2863
2055
|
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
2864
2056
|
*/
|
|
2865
|
-
specifiers?: Array<
|
|
2057
|
+
specifiers?: Array<Shared.CommitSpecifierInput>;
|
|
2866
2058
|
/**
|
|
2867
2059
|
* A temporary ID for the commit that can be used to reference the commit for
|
|
2868
2060
|
* commit specific overrides.
|
|
@@ -2895,24 +2087,6 @@ export declare namespace ContractAmendParams {
|
|
|
2895
2087
|
starting_at: string;
|
|
2896
2088
|
}
|
|
2897
2089
|
}
|
|
2898
|
-
/**
|
|
2899
|
-
* Optional configuration for commit hierarchy access control
|
|
2900
|
-
*/
|
|
2901
|
-
interface HierarchyConfiguration {
|
|
2902
|
-
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
2903
|
-
}
|
|
2904
|
-
namespace HierarchyConfiguration {
|
|
2905
|
-
interface CommitHierarchyChildAccessAll {
|
|
2906
|
-
type: 'ALL';
|
|
2907
|
-
}
|
|
2908
|
-
interface CommitHierarchyChildAccessNone {
|
|
2909
|
-
type: 'NONE';
|
|
2910
|
-
}
|
|
2911
|
-
interface CommitHierarchyChildAccessContractIDs {
|
|
2912
|
-
contract_ids: Array<string>;
|
|
2913
|
-
type: 'CONTRACT_IDS';
|
|
2914
|
-
}
|
|
2915
|
-
}
|
|
2916
2090
|
/**
|
|
2917
2091
|
* Required for "POSTPAID" commits: the true up invoice will be generated at this
|
|
2918
2092
|
* time and only one schedule item is allowed; the total must match access_schedule
|
|
@@ -3025,7 +2199,7 @@ export declare namespace ContractAmendParams {
|
|
|
3025
2199
|
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
3026
2200
|
* will default to NONE.
|
|
3027
2201
|
*/
|
|
3028
|
-
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
2202
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'AVALARA' | 'PRECALCULATED';
|
|
3029
2203
|
}
|
|
3030
2204
|
namespace PaymentGateConfig {
|
|
3031
2205
|
/**
|
|
@@ -3071,23 +2245,6 @@ export declare namespace ContractAmendParams {
|
|
|
3071
2245
|
on_session_payment?: boolean;
|
|
3072
2246
|
}
|
|
3073
2247
|
}
|
|
3074
|
-
interface Specifier {
|
|
3075
|
-
presentation_group_values?: {
|
|
3076
|
-
[key: string]: string;
|
|
3077
|
-
};
|
|
3078
|
-
pricing_group_values?: {
|
|
3079
|
-
[key: string]: string;
|
|
3080
|
-
};
|
|
3081
|
-
/**
|
|
3082
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
3083
|
-
*/
|
|
3084
|
-
product_id?: string;
|
|
3085
|
-
/**
|
|
3086
|
-
* If provided, the specifier will only apply to products with all the specified
|
|
3087
|
-
* tags.
|
|
3088
|
-
*/
|
|
3089
|
-
product_tags?: Array<string>;
|
|
3090
|
-
}
|
|
3091
2248
|
}
|
|
3092
2249
|
interface Credit {
|
|
3093
2250
|
/**
|
|
@@ -3105,6 +2262,9 @@ export declare namespace ContractAmendParams {
|
|
|
3105
2262
|
* applicable_product_tags are not provided, the credit applies to all products.
|
|
3106
2263
|
*/
|
|
3107
2264
|
applicable_product_tags?: Array<string>;
|
|
2265
|
+
/**
|
|
2266
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2267
|
+
*/
|
|
3108
2268
|
custom_fields?: {
|
|
3109
2269
|
[key: string]: string;
|
|
3110
2270
|
};
|
|
@@ -3115,7 +2275,7 @@ export declare namespace ContractAmendParams {
|
|
|
3115
2275
|
/**
|
|
3116
2276
|
* Optional configuration for credit hierarchy access control
|
|
3117
2277
|
*/
|
|
3118
|
-
hierarchy_configuration?:
|
|
2278
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
3119
2279
|
/**
|
|
3120
2280
|
* displayed on invoices
|
|
3121
2281
|
*/
|
|
@@ -3136,7 +2296,7 @@ export declare namespace ContractAmendParams {
|
|
|
3136
2296
|
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
3137
2297
|
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
3138
2298
|
*/
|
|
3139
|
-
specifiers?: Array<
|
|
2299
|
+
specifiers?: Array<Shared.CommitSpecifierInput>;
|
|
3140
2300
|
}
|
|
3141
2301
|
namespace Credit {
|
|
3142
2302
|
/**
|
|
@@ -3162,41 +2322,6 @@ export declare namespace ContractAmendParams {
|
|
|
3162
2322
|
starting_at: string;
|
|
3163
2323
|
}
|
|
3164
2324
|
}
|
|
3165
|
-
/**
|
|
3166
|
-
* Optional configuration for credit hierarchy access control
|
|
3167
|
-
*/
|
|
3168
|
-
interface HierarchyConfiguration {
|
|
3169
|
-
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
3170
|
-
}
|
|
3171
|
-
namespace HierarchyConfiguration {
|
|
3172
|
-
interface CommitHierarchyChildAccessAll {
|
|
3173
|
-
type: 'ALL';
|
|
3174
|
-
}
|
|
3175
|
-
interface CommitHierarchyChildAccessNone {
|
|
3176
|
-
type: 'NONE';
|
|
3177
|
-
}
|
|
3178
|
-
interface CommitHierarchyChildAccessContractIDs {
|
|
3179
|
-
contract_ids: Array<string>;
|
|
3180
|
-
type: 'CONTRACT_IDS';
|
|
3181
|
-
}
|
|
3182
|
-
}
|
|
3183
|
-
interface Specifier {
|
|
3184
|
-
presentation_group_values?: {
|
|
3185
|
-
[key: string]: string;
|
|
3186
|
-
};
|
|
3187
|
-
pricing_group_values?: {
|
|
3188
|
-
[key: string]: string;
|
|
3189
|
-
};
|
|
3190
|
-
/**
|
|
3191
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
3192
|
-
*/
|
|
3193
|
-
product_id?: string;
|
|
3194
|
-
/**
|
|
3195
|
-
* If provided, the specifier will only apply to products with all the specified
|
|
3196
|
-
* tags.
|
|
3197
|
-
*/
|
|
3198
|
-
product_tags?: Array<string>;
|
|
3199
|
-
}
|
|
3200
2325
|
}
|
|
3201
2326
|
interface Discount {
|
|
3202
2327
|
product_id: string;
|
|
@@ -3204,6 +2329,9 @@ export declare namespace ContractAmendParams {
|
|
|
3204
2329
|
* Must provide either schedule_items or recurring_schedule.
|
|
3205
2330
|
*/
|
|
3206
2331
|
schedule: Discount.Schedule;
|
|
2332
|
+
/**
|
|
2333
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2334
|
+
*/
|
|
3207
2335
|
custom_fields?: {
|
|
3208
2336
|
[key: string]: string;
|
|
3209
2337
|
};
|
|
@@ -3370,8 +2498,8 @@ export declare namespace ContractAmendParams {
|
|
|
3370
2498
|
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
3371
2499
|
/**
|
|
3372
2500
|
* Can only be used for commit specific overrides. Must be used in conjunction with
|
|
3373
|
-
* one of product_id
|
|
3374
|
-
* presentation_group_values
|
|
2501
|
+
* one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
2502
|
+
* `presentation_group_values`. If provided, the override will only apply to the
|
|
3375
2503
|
* specified commits. If not provided, the override will apply to all commits.
|
|
3376
2504
|
*/
|
|
3377
2505
|
commit_ids?: Array<string>;
|
|
@@ -3400,16 +2528,16 @@ export declare namespace ContractAmendParams {
|
|
|
3400
2528
|
product_tags?: Array<string>;
|
|
3401
2529
|
/**
|
|
3402
2530
|
* Can only be used for commit specific overrides. Must be used in conjunction with
|
|
3403
|
-
* one of product_id
|
|
3404
|
-
* presentation_group_values
|
|
3405
|
-
* created by the specified recurring commit ids.
|
|
2531
|
+
* one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
2532
|
+
* `presentation_group_values`. If provided, the override will only apply to
|
|
2533
|
+
* commits created by the specified recurring commit ids.
|
|
3406
2534
|
*/
|
|
3407
2535
|
recurring_commit_ids?: Array<string>;
|
|
3408
2536
|
/**
|
|
3409
2537
|
* Can only be used for commit specific overrides. Must be used in conjunction with
|
|
3410
|
-
* one of product_id
|
|
3411
|
-
* presentation_group_values
|
|
3412
|
-
* created by the specified recurring credit ids.
|
|
2538
|
+
* one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
2539
|
+
* `presentation_group_values`. If provided, the override will only apply to
|
|
2540
|
+
* credits created by the specified recurring credit ids.
|
|
3413
2541
|
*/
|
|
3414
2542
|
recurring_credit_ids?: Array<string>;
|
|
3415
2543
|
}
|
|
@@ -3466,6 +2594,9 @@ export declare namespace ContractAmendParams {
|
|
|
3466
2594
|
* amount and must be specified.
|
|
3467
2595
|
*/
|
|
3468
2596
|
unit_price: number;
|
|
2597
|
+
/**
|
|
2598
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2599
|
+
*/
|
|
3469
2600
|
custom_fields?: {
|
|
3470
2601
|
[key: string]: string;
|
|
3471
2602
|
};
|
|
@@ -3513,6 +2644,9 @@ export declare namespace ContractAmendParams {
|
|
|
3513
2644
|
* Must provide either schedule_items or recurring_schedule.
|
|
3514
2645
|
*/
|
|
3515
2646
|
schedule: ScheduledCharge.Schedule;
|
|
2647
|
+
/**
|
|
2648
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2649
|
+
*/
|
|
3516
2650
|
custom_fields?: {
|
|
3517
2651
|
[key: string]: string;
|
|
3518
2652
|
};
|
|
@@ -3646,6 +2780,9 @@ export declare namespace ContractCreateHistoricalInvoicesParams {
|
|
|
3646
2780
|
*/
|
|
3647
2781
|
billable_status?: 'billable' | 'unbillable';
|
|
3648
2782
|
breakdown_granularity?: 'HOUR' | 'DAY';
|
|
2783
|
+
/**
|
|
2784
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2785
|
+
*/
|
|
3649
2786
|
custom_fields?: {
|
|
3650
2787
|
[key: string]: string;
|
|
3651
2788
|
};
|
|
@@ -3673,7 +2810,7 @@ export declare namespace ContractCreateHistoricalInvoicesParams {
|
|
|
3673
2810
|
}
|
|
3674
2811
|
}
|
|
3675
2812
|
}
|
|
3676
|
-
export interface ContractListBalancesParams {
|
|
2813
|
+
export interface ContractListBalancesParams extends BodyCursorPageParams {
|
|
3677
2814
|
customer_id: string;
|
|
3678
2815
|
id?: string;
|
|
3679
2816
|
/**
|
|
@@ -3702,14 +2839,6 @@ export interface ContractListBalancesParams {
|
|
|
3702
2839
|
* slower.
|
|
3703
2840
|
*/
|
|
3704
2841
|
include_ledgers?: boolean;
|
|
3705
|
-
/**
|
|
3706
|
-
* The maximum number of commits to return. Defaults to 25.
|
|
3707
|
-
*/
|
|
3708
|
-
limit?: number;
|
|
3709
|
-
/**
|
|
3710
|
-
* The next page token from a previous response.
|
|
3711
|
-
*/
|
|
3712
|
-
next_page?: string;
|
|
3713
2842
|
/**
|
|
3714
2843
|
* Include only balances that have any access on or after the provided date
|
|
3715
2844
|
*/
|
|
@@ -3869,9 +2998,9 @@ export interface ContractUpdateEndDateParams {
|
|
|
3869
2998
|
ending_before?: string;
|
|
3870
2999
|
}
|
|
3871
3000
|
export declare namespace Contracts {
|
|
3872
|
-
export { type ContractCreateResponse as ContractCreateResponse, type ContractRetrieveResponse as ContractRetrieveResponse, type ContractListResponse as ContractListResponse, type ContractAmendResponse as ContractAmendResponse, type ContractArchiveResponse as ContractArchiveResponse, type ContractCreateHistoricalInvoicesResponse as ContractCreateHistoricalInvoicesResponse, type ContractListBalancesResponse as ContractListBalancesResponse, type ContractRetrieveRateScheduleResponse as ContractRetrieveRateScheduleResponse, type ContractRetrieveSubscriptionQuantityHistoryResponse as ContractRetrieveSubscriptionQuantityHistoryResponse, type ContractScheduleProServicesInvoiceResponse as ContractScheduleProServicesInvoiceResponse, type ContractUpdateEndDateResponse as ContractUpdateEndDateResponse, type ContractCreateParams as ContractCreateParams, type ContractRetrieveParams as ContractRetrieveParams, type ContractListParams as ContractListParams, type ContractAddManualBalanceEntryParams as ContractAddManualBalanceEntryParams, type ContractAmendParams as ContractAmendParams, type ContractArchiveParams as ContractArchiveParams, type ContractCreateHistoricalInvoicesParams as ContractCreateHistoricalInvoicesParams, type ContractListBalancesParams as ContractListBalancesParams, type ContractRetrieveRateScheduleParams as ContractRetrieveRateScheduleParams, type ContractRetrieveSubscriptionQuantityHistoryParams as ContractRetrieveSubscriptionQuantityHistoryParams, type ContractScheduleProServicesInvoiceParams as ContractScheduleProServicesInvoiceParams, type ContractSetUsageFilterParams as ContractSetUsageFilterParams, type ContractUpdateEndDateParams as ContractUpdateEndDateParams, };
|
|
3873
|
-
export { Products as Products, type ProductListItemState as ProductListItemState, type QuantityConversion as QuantityConversion, type QuantityRounding as QuantityRounding, type ProductCreateResponse as ProductCreateResponse, type ProductRetrieveResponse as ProductRetrieveResponse, type ProductUpdateResponse as ProductUpdateResponse, type ProductListResponse as ProductListResponse, type ProductArchiveResponse as ProductArchiveResponse, ProductListResponsesCursorPage as ProductListResponsesCursorPage, type ProductCreateParams as ProductCreateParams, type ProductRetrieveParams as ProductRetrieveParams, type ProductUpdateParams as ProductUpdateParams, type ProductListParams as ProductListParams, type ProductArchiveParams as ProductArchiveParams, };
|
|
3874
|
-
export { RateCards as RateCards, type RateCardCreateResponse as RateCardCreateResponse, type RateCardRetrieveResponse as RateCardRetrieveResponse, type RateCardUpdateResponse as RateCardUpdateResponse, type RateCardListResponse as RateCardListResponse, type RateCardArchiveResponse as RateCardArchiveResponse, type RateCardRetrieveRateScheduleResponse as RateCardRetrieveRateScheduleResponse, RateCardListResponsesCursorPage as RateCardListResponsesCursorPage, type RateCardCreateParams as RateCardCreateParams, type RateCardRetrieveParams as RateCardRetrieveParams, type RateCardUpdateParams as RateCardUpdateParams, type RateCardListParams as RateCardListParams, type RateCardArchiveParams as RateCardArchiveParams, type RateCardRetrieveRateScheduleParams as RateCardRetrieveRateScheduleParams, };
|
|
3001
|
+
export { type ContractCreateResponse as ContractCreateResponse, type ContractRetrieveResponse as ContractRetrieveResponse, type ContractListResponse as ContractListResponse, type ContractAmendResponse as ContractAmendResponse, type ContractArchiveResponse as ContractArchiveResponse, type ContractCreateHistoricalInvoicesResponse as ContractCreateHistoricalInvoicesResponse, type ContractListBalancesResponse as ContractListBalancesResponse, type ContractRetrieveRateScheduleResponse as ContractRetrieveRateScheduleResponse, type ContractRetrieveSubscriptionQuantityHistoryResponse as ContractRetrieveSubscriptionQuantityHistoryResponse, type ContractScheduleProServicesInvoiceResponse as ContractScheduleProServicesInvoiceResponse, type ContractUpdateEndDateResponse as ContractUpdateEndDateResponse, type ContractListBalancesResponsesBodyCursorPage as ContractListBalancesResponsesBodyCursorPage, type ContractCreateParams as ContractCreateParams, type ContractRetrieveParams as ContractRetrieveParams, type ContractListParams as ContractListParams, type ContractAddManualBalanceEntryParams as ContractAddManualBalanceEntryParams, type ContractAmendParams as ContractAmendParams, type ContractArchiveParams as ContractArchiveParams, type ContractCreateHistoricalInvoicesParams as ContractCreateHistoricalInvoicesParams, type ContractListBalancesParams as ContractListBalancesParams, type ContractRetrieveRateScheduleParams as ContractRetrieveRateScheduleParams, type ContractRetrieveSubscriptionQuantityHistoryParams as ContractRetrieveSubscriptionQuantityHistoryParams, type ContractScheduleProServicesInvoiceParams as ContractScheduleProServicesInvoiceParams, type ContractSetUsageFilterParams as ContractSetUsageFilterParams, type ContractUpdateEndDateParams as ContractUpdateEndDateParams, };
|
|
3002
|
+
export { Products as Products, type ProductListItemState as ProductListItemState, type QuantityConversion as QuantityConversion, type QuantityRounding as QuantityRounding, type ProductCreateResponse as ProductCreateResponse, type ProductRetrieveResponse as ProductRetrieveResponse, type ProductUpdateResponse as ProductUpdateResponse, type ProductListResponse as ProductListResponse, type ProductArchiveResponse as ProductArchiveResponse, type ProductListResponsesCursorPage as ProductListResponsesCursorPage, type ProductCreateParams as ProductCreateParams, type ProductRetrieveParams as ProductRetrieveParams, type ProductUpdateParams as ProductUpdateParams, type ProductListParams as ProductListParams, type ProductArchiveParams as ProductArchiveParams, };
|
|
3003
|
+
export { RateCards as RateCards, type RateCardCreateResponse as RateCardCreateResponse, type RateCardRetrieveResponse as RateCardRetrieveResponse, type RateCardUpdateResponse as RateCardUpdateResponse, type RateCardListResponse as RateCardListResponse, type RateCardArchiveResponse as RateCardArchiveResponse, type RateCardRetrieveRateScheduleResponse as RateCardRetrieveRateScheduleResponse, type RateCardListResponsesCursorPage as RateCardListResponsesCursorPage, type RateCardCreateParams as RateCardCreateParams, type RateCardRetrieveParams as RateCardRetrieveParams, type RateCardUpdateParams as RateCardUpdateParams, type RateCardListParams as RateCardListParams, type RateCardArchiveParams as RateCardArchiveParams, type RateCardRetrieveRateScheduleParams as RateCardRetrieveRateScheduleParams, };
|
|
3875
3004
|
export { NamedSchedules as NamedSchedules, type NamedScheduleRetrieveResponse as NamedScheduleRetrieveResponse, type NamedScheduleRetrieveParams as NamedScheduleRetrieveParams, type NamedScheduleUpdateParams as NamedScheduleUpdateParams, };
|
|
3876
3005
|
}
|
|
3877
3006
|
//# sourceMappingURL=contracts.d.ts.map
|