@metronome/sdk 0.1.0-beta.8 → 0.1.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 +227 -0
- package/README.md +37 -52
- package/_shims/index.d.ts +2 -0
- package/_shims/index.js +5 -1
- package/_shims/index.mjs +5 -1
- package/core.d.ts +19 -5
- package/core.d.ts.map +1 -1
- package/core.js +25 -15
- package/core.js.map +1 -1
- package/core.mjs +26 -16
- package/core.mjs.map +1 -1
- package/index.d.mts +10 -42
- package/index.d.ts +10 -42
- package/index.d.ts.map +1 -1
- package/index.js +14 -55
- package/index.js.map +1 -1
- package/index.mjs +14 -55
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.js +3 -0
- package/pagination.js.map +1 -1
- package/pagination.mjs +3 -0
- package/pagination.mjs.map +1 -1
- package/resource.d.ts +1 -1
- package/resource.d.ts.map +1 -1
- package/resource.js.map +1 -1
- package/resource.mjs.map +1 -1
- package/resources/index.d.ts +2 -13
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -38
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -13
- package/resources/index.mjs.map +1 -1
- package/resources/shared.d.ts +512 -24
- package/resources/shared.d.ts.map +1 -1
- package/resources/{alerts.d.ts → v1/alerts.d.ts} +29 -5
- package/resources/v1/alerts.d.ts.map +1 -0
- package/resources/v1/alerts.js +40 -0
- package/resources/v1/alerts.js.map +1 -0
- package/resources/v1/alerts.mjs +36 -0
- package/resources/v1/alerts.mjs.map +1 -0
- package/resources/{audit-logs.d.ts → v1/audit-logs.d.ts} +11 -3
- package/resources/v1/audit-logs.d.ts.map +1 -0
- package/resources/{audit-logs.js → v1/audit-logs.js} +4 -4
- package/resources/v1/audit-logs.js.map +1 -0
- package/resources/{audit-logs.mjs → v1/audit-logs.mjs} +4 -4
- package/resources/v1/audit-logs.mjs.map +1 -0
- package/resources/{billable-metrics.d.ts → v1/billable-metrics.d.ts} +62 -7
- package/resources/v1/billable-metrics.d.ts.map +1 -0
- package/resources/v1/billable-metrics.js +84 -0
- package/resources/v1/billable-metrics.js.map +1 -0
- package/resources/v1/billable-metrics.mjs +79 -0
- package/resources/v1/billable-metrics.mjs.map +1 -0
- package/resources/{contracts → v1/contracts}/contracts.d.ts +1618 -62
- package/resources/v1/contracts/contracts.d.ts.map +1 -0
- package/resources/v1/contracts/contracts.js +312 -0
- package/resources/v1/contracts/contracts.js.map +1 -0
- package/resources/v1/contracts/contracts.mjs +285 -0
- package/resources/v1/contracts/contracts.mjs.map +1 -0
- package/resources/v1/contracts/index.d.ts +5 -0
- package/resources/v1/contracts/index.d.ts.map +1 -0
- package/resources/v1/contracts/index.js.map +1 -0
- package/resources/v1/contracts/index.mjs.map +1 -0
- package/resources/{contracts → v1/contracts}/named-schedules.d.ts +23 -2
- package/resources/v1/contracts/named-schedules.d.ts.map +1 -0
- package/resources/v1/contracts/named-schedules.js +48 -0
- package/resources/v1/contracts/named-schedules.js.map +1 -0
- package/resources/v1/contracts/named-schedules.mjs +44 -0
- package/resources/v1/contracts/named-schedules.mjs.map +1 -0
- package/resources/{contracts → v1/contracts}/products.d.ts +55 -7
- package/resources/v1/contracts/products.d.ts.map +1 -0
- package/resources/v1/contracts/products.js +84 -0
- package/resources/v1/contracts/products.js.map +1 -0
- package/resources/v1/contracts/products.mjs +79 -0
- package/resources/v1/contracts/products.mjs.map +1 -0
- package/resources/{contracts → v1/contracts}/rate-cards/index.d.ts +1 -1
- package/resources/v1/contracts/rate-cards/index.d.ts.map +1 -0
- package/resources/v1/contracts/rate-cards/index.js.map +1 -0
- package/resources/v1/contracts/rate-cards/index.mjs.map +1 -0
- package/resources/{contracts → v1/contracts}/rate-cards/named-schedules.d.ts +27 -2
- package/resources/v1/contracts/rate-cards/named-schedules.d.ts.map +1 -0
- package/resources/v1/contracts/rate-cards/named-schedules.js +52 -0
- package/resources/v1/contracts/rate-cards/named-schedules.js.map +1 -0
- package/resources/v1/contracts/rate-cards/named-schedules.mjs +48 -0
- package/resources/v1/contracts/rate-cards/named-schedules.mjs.map +1 -0
- package/resources/{contracts → v1/contracts}/rate-cards/product-orders.d.ts +33 -3
- package/resources/v1/contracts/rate-cards/product-orders.d.ts.map +1 -0
- package/resources/v1/contracts/rate-cards/product-orders.js +54 -0
- package/resources/v1/contracts/rate-cards/product-orders.js.map +1 -0
- package/resources/v1/contracts/rate-cards/product-orders.mjs +50 -0
- package/resources/v1/contracts/rate-cards/product-orders.mjs.map +1 -0
- package/resources/{contracts → v1/contracts}/rate-cards/rate-cards.d.ts +118 -14
- package/resources/v1/contracts/rate-cards/rate-cards.d.ts.map +1 -0
- package/resources/{contracts → v1/contracts}/rate-cards/rate-cards.js +83 -12
- package/resources/v1/contracts/rate-cards/rate-cards.js.map +1 -0
- package/resources/v1/contracts/rate-cards/rate-cards.mjs +140 -0
- package/resources/v1/contracts/rate-cards/rate-cards.mjs.map +1 -0
- package/resources/{contracts → v1/contracts}/rate-cards/rates.d.ts +118 -14
- package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -0
- package/resources/v1/contracts/rate-cards/rates.js +106 -0
- package/resources/v1/contracts/rate-cards/rates.js.map +1 -0
- package/resources/v1/contracts/rate-cards/rates.mjs +101 -0
- package/resources/v1/contracts/rate-cards/rates.mjs.map +1 -0
- package/resources/v1/contracts/rate-cards.d.ts +2 -0
- package/resources/v1/contracts/rate-cards.d.ts.map +1 -0
- package/resources/v1/contracts/rate-cards.js +19 -0
- package/resources/v1/contracts/rate-cards.js.map +1 -0
- package/resources/v1/contracts/rate-cards.mjs +3 -0
- package/resources/v1/contracts/rate-cards.mjs.map +1 -0
- package/resources/v1/contracts.d.ts +2 -0
- package/resources/v1/contracts.d.ts.map +1 -0
- package/resources/v1/contracts.js +19 -0
- package/resources/v1/contracts.js.map +1 -0
- package/resources/v1/contracts.mjs +3 -0
- package/resources/v1/contracts.mjs.map +1 -0
- package/resources/{credit-grants.d.ts → v1/credit-grants.d.ts} +81 -6
- package/resources/v1/credit-grants.d.ts.map +1 -0
- package/resources/v1/credit-grants.js +89 -0
- package/resources/v1/credit-grants.js.map +1 -0
- package/resources/v1/credit-grants.mjs +84 -0
- package/resources/v1/credit-grants.mjs.map +1 -0
- package/resources/{custom-fields.d.ts → v1/custom-fields.d.ts} +53 -9
- package/resources/v1/custom-fields.d.ts.map +1 -0
- package/resources/{custom-fields.js → v1/custom-fields.js} +42 -7
- package/resources/v1/custom-fields.js.map +1 -0
- package/resources/{custom-fields.mjs → v1/custom-fields.mjs} +42 -7
- package/resources/v1/custom-fields.mjs.map +1 -0
- package/resources/{customers → v1/customers}/alerts.d.ts +31 -3
- package/resources/v1/customers/alerts.d.ts.map +1 -0
- package/resources/v1/customers/alerts.js +56 -0
- package/resources/v1/customers/alerts.js.map +1 -0
- package/resources/v1/customers/alerts.mjs +52 -0
- package/resources/v1/customers/alerts.mjs.map +1 -0
- package/resources/{customers → v1/customers}/billing-config.d.ts +33 -2
- package/resources/v1/customers/billing-config.d.ts.map +1 -0
- package/resources/v1/customers/billing-config.js +65 -0
- package/resources/v1/customers/billing-config.js.map +1 -0
- package/resources/v1/customers/billing-config.mjs +61 -0
- package/resources/v1/customers/billing-config.mjs.map +1 -0
- package/resources/{customers → v1/customers}/commits.d.ts +97 -10
- package/resources/v1/customers/commits.d.ts.map +1 -0
- package/resources/v1/customers/commits.js +82 -0
- package/resources/v1/customers/commits.js.map +1 -0
- package/resources/v1/customers/commits.mjs +78 -0
- package/resources/v1/customers/commits.mjs.map +1 -0
- package/resources/{customers → v1/customers}/credits.d.ts +76 -6
- package/resources/v1/customers/credits.d.ts.map +1 -0
- package/resources/v1/customers/credits.js +67 -0
- package/resources/v1/customers/credits.js.map +1 -0
- package/resources/v1/customers/credits.mjs +63 -0
- package/resources/v1/customers/credits.mjs.map +1 -0
- package/resources/{customers → v1/customers}/customers.d.ts +197 -14
- package/resources/v1/customers/customers.d.ts.map +1 -0
- package/resources/{customers → v1/customers}/customers.js +118 -16
- package/resources/v1/customers/customers.js.map +1 -0
- package/resources/v1/customers/customers.mjs +228 -0
- package/resources/v1/customers/customers.mjs.map +1 -0
- package/resources/{customers → v1/customers}/index.d.ts +1 -1
- package/resources/v1/customers/index.d.ts.map +1 -0
- package/resources/v1/customers/index.js.map +1 -0
- package/resources/v1/customers/index.mjs.map +1 -0
- package/resources/{customers → v1/customers}/invoices.d.ts +152 -57
- package/resources/v1/customers/invoices.d.ts.map +1 -0
- package/resources/v1/customers/invoices.js +103 -0
- package/resources/v1/customers/invoices.js.map +1 -0
- package/resources/v1/customers/invoices.mjs +97 -0
- package/resources/v1/customers/invoices.mjs.map +1 -0
- package/resources/{customers → v1/customers}/named-schedules.d.ts +23 -2
- package/resources/v1/customers/named-schedules.d.ts.map +1 -0
- package/resources/v1/customers/named-schedules.js +48 -0
- package/resources/v1/customers/named-schedules.js.map +1 -0
- package/resources/v1/customers/named-schedules.mjs +44 -0
- package/resources/v1/customers/named-schedules.mjs.map +1 -0
- package/resources/{customers → v1/customers}/plans.d.ts +50 -5
- package/resources/v1/customers/plans.d.ts.map +1 -0
- package/resources/v1/customers/plans.js +99 -0
- package/resources/v1/customers/plans.js.map +1 -0
- package/resources/v1/customers/plans.mjs +93 -0
- package/resources/v1/customers/plans.mjs.map +1 -0
- package/resources/v1/customers.d.ts +2 -0
- package/resources/v1/customers.d.ts.map +1 -0
- package/resources/v1/customers.js +19 -0
- package/resources/v1/customers.js.map +1 -0
- package/resources/v1/customers.mjs +3 -0
- package/resources/v1/customers.mjs.map +1 -0
- package/resources/{dashboards.d.ts → v1/dashboards.d.ts} +32 -4
- package/resources/v1/dashboards.d.ts.map +1 -0
- package/resources/v1/dashboards.js +43 -0
- package/resources/v1/dashboards.js.map +1 -0
- package/resources/v1/dashboards.mjs +39 -0
- package/resources/v1/dashboards.mjs.map +1 -0
- package/resources/v1/index.d.ts +15 -0
- package/resources/v1/index.d.ts.map +1 -0
- package/resources/v1/index.js +44 -0
- package/resources/v1/index.js.map +1 -0
- package/resources/v1/index.mjs +16 -0
- package/resources/v1/index.mjs.map +1 -0
- package/resources/{invoices.d.ts → v1/invoices.d.ts} +16 -2
- package/resources/v1/invoices.d.ts.map +1 -0
- package/resources/v1/invoices.js +35 -0
- package/resources/v1/invoices.js.map +1 -0
- package/resources/v1/invoices.mjs +31 -0
- package/resources/v1/invoices.mjs.map +1 -0
- package/resources/{plans.d.ts → v1/plans.d.ts} +51 -8
- package/resources/v1/plans.d.ts.map +1 -0
- package/resources/{plans.js → v1/plans.js} +34 -7
- package/resources/v1/plans.js.map +1 -0
- package/resources/v1/plans.mjs +74 -0
- package/resources/v1/plans.mjs.map +1 -0
- package/resources/{pricing-units.d.ts → v1/pricing-units.d.ts} +11 -3
- package/resources/v1/pricing-units.d.ts.map +1 -0
- package/resources/{pricing-units.js → v1/pricing-units.js} +4 -4
- package/resources/v1/pricing-units.js.map +1 -0
- package/resources/{pricing-units.mjs → v1/pricing-units.mjs} +4 -4
- package/resources/v1/pricing-units.mjs.map +1 -0
- package/resources/{services.d.ts → v1/services.d.ts} +7 -2
- package/resources/v1/services.d.ts.map +1 -0
- package/resources/{services.js → v1/services.js} +7 -2
- package/resources/v1/services.js.map +1 -0
- package/resources/{services.mjs → v1/services.mjs} +7 -2
- package/resources/v1/services.mjs.map +1 -0
- package/resources/v1/usage.d.ts +325 -0
- package/resources/v1/usage.d.ts.map +1 -0
- package/resources/v1/usage.js +92 -0
- package/resources/v1/usage.js.map +1 -0
- package/resources/v1/usage.mjs +87 -0
- package/resources/v1/usage.mjs.map +1 -0
- package/resources/v1/v1.d.ts +58 -0
- package/resources/v1/v1.d.ts.map +1 -0
- package/resources/v1/v1.js +98 -0
- package/resources/v1/v1.js.map +1 -0
- package/resources/v1/v1.mjs +71 -0
- package/resources/v1/v1.mjs.map +1 -0
- package/resources/v1.d.ts +2 -0
- package/resources/v1.d.ts.map +1 -0
- package/resources/v1.js +19 -0
- package/resources/v1.js.map +1 -0
- package/resources/v1.mjs +3 -0
- package/resources/v1.mjs.map +1 -0
- package/resources/v2/contracts.d.ts +5955 -0
- package/resources/v2/contracts.d.ts.map +1 -0
- package/resources/v2/contracts.js +136 -0
- package/resources/v2/contracts.js.map +1 -0
- package/resources/v2/contracts.mjs +132 -0
- package/resources/v2/contracts.mjs.map +1 -0
- package/resources/v2/index.d.ts +3 -0
- package/resources/v2/index.d.ts.map +1 -0
- package/resources/v2/index.js +9 -0
- package/resources/v2/index.js.map +1 -0
- package/resources/v2/index.mjs +4 -0
- package/resources/v2/index.mjs.map +1 -0
- package/resources/v2/v2.d.ts +10 -0
- package/resources/v2/v2.d.ts.map +1 -0
- package/resources/v2/v2.js +39 -0
- package/resources/v2/v2.js.map +1 -0
- package/resources/v2/v2.mjs +12 -0
- package/resources/v2/v2.mjs.map +1 -0
- package/resources/v2.d.ts +2 -0
- package/resources/v2.d.ts.map +1 -0
- package/resources/v2.js +19 -0
- package/resources/v2.js.map +1 -0
- package/resources/v2.mjs +3 -0
- package/resources/v2.mjs.map +1 -0
- package/resources/webhooks.js +5 -5
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +5 -5
- package/resources/webhooks.mjs.map +1 -1
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +18 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/_shims/auto/runtime-bun.ts +1 -1
- package/src/_shims/auto/runtime-node.ts +1 -1
- package/src/_shims/auto/runtime.ts +1 -1
- package/src/_shims/auto/types-node.ts +1 -1
- package/src/_shims/bun-runtime.ts +2 -2
- package/src/_shims/index.d.ts +5 -3
- package/src/_shims/index.js +5 -1
- package/src/_shims/index.mjs +6 -2
- package/src/_shims/node-runtime.ts +3 -3
- package/src/_shims/registry.ts +1 -1
- package/src/_shims/web-runtime.ts +3 -3
- package/src/core.ts +49 -21
- package/src/error.ts +1 -1
- package/src/index.ts +31 -349
- package/src/internal/qs/formats.ts +1 -1
- package/src/internal/qs/index.ts +3 -3
- package/src/internal/qs/stringify.ts +3 -3
- package/src/internal/qs/utils.ts +2 -2
- package/src/pagination.ts +5 -1
- package/src/resource.ts +2 -2
- package/src/resources/index.ts +4 -144
- package/src/resources/shared.ts +587 -26
- package/src/resources/{alerts.ts → v1/alerts.ts} +31 -7
- package/src/resources/{audit-logs.ts → v1/audit-logs.ts} +13 -5
- package/src/resources/{billable-metrics.ts → v1/billable-metrics.ts} +61 -12
- package/src/resources/{contracts → v1/contracts}/contracts.ts +1848 -83
- package/src/resources/{contracts → v1/contracts}/index.ts +8 -4
- package/src/resources/{contracts → v1/contracts}/named-schedules.ts +25 -4
- package/src/resources/{contracts → v1/contracts}/products.ts +58 -14
- package/src/resources/{contracts → v1/contracts}/rate-cards/index.ts +6 -4
- package/src/resources/{contracts → v1/contracts}/rate-cards/named-schedules.ts +29 -4
- package/src/resources/{contracts → v1/contracts}/rate-cards/product-orders.ts +38 -5
- package/src/resources/{contracts → v1/contracts}/rate-cards/rate-cards.ts +137 -25
- package/src/resources/{contracts → v1/contracts}/rate-cards/rates.ts +105 -17
- package/src/resources/v1/contracts/rate-cards.ts +3 -0
- package/src/resources/v1/contracts.ts +3 -0
- package/src/resources/{credit-grants.ts → v1/credit-grants.ts} +86 -14
- package/src/resources/{custom-fields.ts → v1/custom-fields.ts} +62 -14
- package/src/resources/{customers → v1/customers}/alerts.ts +35 -6
- package/src/resources/{customers → v1/customers}/billing-config.ts +37 -5
- package/src/resources/{customers → v1/customers}/commits.ts +100 -13
- package/src/resources/{customers → v1/customers}/credits.ts +79 -9
- package/src/resources/{customers → v1/customers}/customers.ts +229 -40
- package/src/resources/{customers → v1/customers}/index.ts +10 -8
- package/src/resources/{customers → v1/customers}/invoices.ts +131 -62
- package/src/resources/{customers → v1/customers}/named-schedules.ts +25 -4
- package/src/resources/{customers → v1/customers}/plans.ts +55 -9
- package/src/resources/v1/customers.ts +3 -0
- package/src/resources/{dashboards.ts → v1/dashboards.ts} +31 -5
- package/src/resources/v1/index.ts +151 -0
- package/src/resources/{invoices.ts → v1/invoices.ts} +18 -4
- package/src/resources/{plans.ts → v1/plans.ts} +49 -14
- package/src/resources/{pricing-units.ts → v1/pricing-units.ts} +13 -5
- package/src/resources/{services.ts → v1/services.ts} +8 -3
- package/src/resources/v1/usage.ts +429 -0
- package/src/resources/v1/v1.ts +364 -0
- package/src/resources/v1.ts +3 -0
- package/src/resources/v2/contracts.ts +7677 -0
- package/src/resources/v2/index.ts +18 -0
- package/src/resources/v2/v2.ts +43 -0
- package/src/resources/v2.ts +3 -0
- package/src/resources/webhooks.ts +7 -7
- package/src/resources.ts +1 -0
- package/src/shims/node.ts +3 -3
- package/src/shims/web.ts +3 -3
- package/src/uploads.ts +4 -4
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/alerts.d.ts.map +0 -1
- package/resources/alerts.js +0 -21
- package/resources/alerts.js.map +0 -1
- package/resources/alerts.mjs +0 -17
- package/resources/alerts.mjs.map +0 -1
- package/resources/audit-logs.d.ts.map +0 -1
- package/resources/audit-logs.js.map +0 -1
- package/resources/audit-logs.mjs.map +0 -1
- package/resources/billable-metrics.d.ts.map +0 -1
- package/resources/billable-metrics.js +0 -43
- package/resources/billable-metrics.js.map +0 -1
- package/resources/billable-metrics.mjs +0 -38
- package/resources/billable-metrics.mjs.map +0 -1
- package/resources/contracts/contracts.d.ts.map +0 -1
- package/resources/contracts/contracts.js +0 -135
- package/resources/contracts/contracts.js.map +0 -1
- package/resources/contracts/contracts.mjs +0 -108
- package/resources/contracts/contracts.mjs.map +0 -1
- package/resources/contracts/index.d.ts +0 -5
- package/resources/contracts/index.d.ts.map +0 -1
- package/resources/contracts/index.js.map +0 -1
- package/resources/contracts/index.mjs.map +0 -1
- package/resources/contracts/named-schedules.d.ts.map +0 -1
- package/resources/contracts/named-schedules.js +0 -27
- package/resources/contracts/named-schedules.js.map +0 -1
- package/resources/contracts/named-schedules.mjs +0 -23
- package/resources/contracts/named-schedules.mjs.map +0 -1
- package/resources/contracts/products.d.ts.map +0 -1
- package/resources/contracts/products.js +0 -51
- package/resources/contracts/products.js.map +0 -1
- package/resources/contracts/products.mjs +0 -46
- package/resources/contracts/products.mjs.map +0 -1
- package/resources/contracts/rate-cards/index.d.ts.map +0 -1
- package/resources/contracts/rate-cards/index.js.map +0 -1
- package/resources/contracts/rate-cards/index.mjs.map +0 -1
- package/resources/contracts/rate-cards/named-schedules.d.ts.map +0 -1
- package/resources/contracts/rate-cards/named-schedules.js +0 -27
- package/resources/contracts/rate-cards/named-schedules.js.map +0 -1
- package/resources/contracts/rate-cards/named-schedules.mjs +0 -23
- package/resources/contracts/rate-cards/named-schedules.mjs.map +0 -1
- package/resources/contracts/rate-cards/product-orders.d.ts.map +0 -1
- package/resources/contracts/rate-cards/product-orders.js +0 -21
- package/resources/contracts/rate-cards/product-orders.js.map +0 -1
- package/resources/contracts/rate-cards/product-orders.mjs +0 -17
- package/resources/contracts/rate-cards/product-orders.mjs.map +0 -1
- package/resources/contracts/rate-cards/rate-cards.d.ts.map +0 -1
- package/resources/contracts/rate-cards/rate-cards.js.map +0 -1
- package/resources/contracts/rate-cards/rate-cards.mjs +0 -69
- package/resources/contracts/rate-cards/rate-cards.mjs.map +0 -1
- package/resources/contracts/rate-cards/rates.d.ts.map +0 -1
- package/resources/contracts/rate-cards/rates.js +0 -38
- package/resources/contracts/rate-cards/rates.js.map +0 -1
- package/resources/contracts/rate-cards/rates.mjs +0 -33
- package/resources/contracts/rate-cards/rates.mjs.map +0 -1
- package/resources/credit-grants.d.ts.map +0 -1
- package/resources/credit-grants.js +0 -52
- package/resources/credit-grants.js.map +0 -1
- package/resources/credit-grants.mjs +0 -47
- package/resources/credit-grants.mjs.map +0 -1
- package/resources/custom-fields.d.ts.map +0 -1
- package/resources/custom-fields.js.map +0 -1
- package/resources/custom-fields.mjs.map +0 -1
- package/resources/customers/alerts.d.ts.map +0 -1
- package/resources/customers/alerts.js +0 -33
- package/resources/customers/alerts.js.map +0 -1
- package/resources/customers/alerts.mjs +0 -29
- package/resources/customers/alerts.mjs.map +0 -1
- package/resources/customers/billing-config.d.ts.map +0 -1
- package/resources/customers/billing-config.js +0 -38
- package/resources/customers/billing-config.js.map +0 -1
- package/resources/customers/billing-config.mjs +0 -34
- package/resources/customers/billing-config.mjs.map +0 -1
- package/resources/customers/commits.d.ts.map +0 -1
- package/resources/customers/commits.js +0 -27
- package/resources/customers/commits.js.map +0 -1
- package/resources/customers/commits.mjs +0 -23
- package/resources/customers/commits.mjs.map +0 -1
- package/resources/customers/credits.d.ts.map +0 -1
- package/resources/customers/credits.js +0 -27
- package/resources/customers/credits.js.map +0 -1
- package/resources/customers/credits.mjs +0 -23
- package/resources/customers/credits.mjs.map +0 -1
- package/resources/customers/customers.d.ts.map +0 -1
- package/resources/customers/customers.js.map +0 -1
- package/resources/customers/customers.mjs +0 -126
- package/resources/customers/customers.mjs.map +0 -1
- package/resources/customers/index.d.ts.map +0 -1
- package/resources/customers/index.js.map +0 -1
- package/resources/customers/index.mjs.map +0 -1
- package/resources/customers/invoices.d.ts.map +0 -1
- package/resources/customers/invoices.js +0 -51
- package/resources/customers/invoices.js.map +0 -1
- package/resources/customers/invoices.mjs +0 -45
- package/resources/customers/invoices.mjs.map +0 -1
- package/resources/customers/named-schedules.d.ts.map +0 -1
- package/resources/customers/named-schedules.js +0 -27
- package/resources/customers/named-schedules.js.map +0 -1
- package/resources/customers/named-schedules.mjs +0 -23
- package/resources/customers/named-schedules.mjs.map +0 -1
- package/resources/customers/plans.d.ts.map +0 -1
- package/resources/customers/plans.js +0 -53
- package/resources/customers/plans.js.map +0 -1
- package/resources/customers/plans.mjs +0 -47
- package/resources/customers/plans.mjs.map +0 -1
- package/resources/dashboards.d.ts.map +0 -1
- package/resources/dashboards.js +0 -17
- package/resources/dashboards.js.map +0 -1
- package/resources/dashboards.mjs +0 -13
- package/resources/dashboards.mjs.map +0 -1
- package/resources/invoices.d.ts.map +0 -1
- package/resources/invoices.js +0 -21
- package/resources/invoices.js.map +0 -1
- package/resources/invoices.mjs +0 -17
- package/resources/invoices.mjs.map +0 -1
- package/resources/plans.d.ts.map +0 -1
- package/resources/plans.js.map +0 -1
- package/resources/plans.mjs +0 -47
- package/resources/plans.mjs.map +0 -1
- package/resources/pricing-units.d.ts.map +0 -1
- package/resources/pricing-units.js.map +0 -1
- package/resources/pricing-units.mjs.map +0 -1
- package/resources/services.d.ts.map +0 -1
- package/resources/services.js.map +0 -1
- package/resources/services.mjs.map +0 -1
- package/resources/usage.d.ts +0 -166
- package/resources/usage.d.ts.map +0 -1
- package/resources/usage.js +0 -49
- package/resources/usage.js.map +0 -1
- package/resources/usage.mjs +0 -44
- package/resources/usage.mjs.map +0 -1
- package/src/resources/usage.ts +0 -239
- /package/resources/{contracts → v1/contracts}/index.js +0 -0
- /package/resources/{contracts → v1/contracts}/index.mjs +0 -0
- /package/resources/{contracts → v1/contracts}/rate-cards/index.js +0 -0
- /package/resources/{contracts → v1/contracts}/rate-cards/index.mjs +0 -0
- /package/resources/{customers → v1/customers}/index.js +0 -0
- /package/resources/{customers → v1/customers}/index.mjs +0 -0
|
@@ -1,18 +1,41 @@
|
|
|
1
|
-
import { APIResource } from "
|
|
2
|
-
import * as Core from "
|
|
3
|
-
import * as Shared from "
|
|
1
|
+
import { APIResource } from "../../../resource.js";
|
|
2
|
+
import * as Core from "../../../core.js";
|
|
3
|
+
import * as Shared from "../../shared.js";
|
|
4
4
|
export declare class Alerts extends APIResource {
|
|
5
5
|
/**
|
|
6
6
|
* Get the customer alert status and alert information for the specified customer
|
|
7
7
|
* and alert
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const alert = await client.v1.customers.alerts.retrieve({
|
|
12
|
+
* alert_id: '8deed800-1b7a-495d-a207-6c52bac54dc9',
|
|
13
|
+
* customer_id: '9b85c1c1-5238-4f2a-a409-61412905e1e1',
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
8
16
|
*/
|
|
9
17
|
retrieve(body: AlertRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<AlertRetrieveResponse>;
|
|
10
18
|
/**
|
|
11
19
|
* Fetch all customer alert statuses and alert information for a customer
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const alerts = await client.v1.customers.alerts.list({
|
|
24
|
+
* customer_id: '9b85c1c1-5238-4f2a-a409-61412905e1e1',
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
12
27
|
*/
|
|
13
28
|
list(params: AlertListParams, options?: Core.RequestOptions): Core.APIPromise<AlertListResponse>;
|
|
14
29
|
/**
|
|
15
30
|
* Reset state for an alert by customer id and force re-evaluation
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* await client.v1.customers.alerts.reset({
|
|
35
|
+
* alert_id: '5e8691bf-b22a-4672-922d-f80eee940f01',
|
|
36
|
+
* customer_id: '4c83caf3-8af4-44e2-9aeb-e290531726d9',
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
16
39
|
*/
|
|
17
40
|
reset(body: AlertResetParams, options?: Core.RequestOptions): Core.APIPromise<void>;
|
|
18
41
|
}
|
|
@@ -114,6 +137,11 @@ export interface AlertRetrieveParams {
|
|
|
114
137
|
* The Metronome ID of the customer
|
|
115
138
|
*/
|
|
116
139
|
customer_id: string;
|
|
140
|
+
/**
|
|
141
|
+
* When parallel alerts are enabled during migration, this flag denotes whether to
|
|
142
|
+
* fetch alerts for plans or contracts.
|
|
143
|
+
*/
|
|
144
|
+
plans_or_contracts?: 'PLANS' | 'CONTRACTS';
|
|
117
145
|
}
|
|
118
146
|
export interface AlertListParams {
|
|
119
147
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"al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CAC5C;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC,CAAC;CAC7D;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Alerts = void 0;
|
|
5
|
+
const resource_1 = require("../../../resource.js");
|
|
6
|
+
class Alerts extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Get the customer alert status and alert information for the specified customer
|
|
9
|
+
* and alert
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const alert = await client.v1.customers.alerts.retrieve({
|
|
14
|
+
* alert_id: '8deed800-1b7a-495d-a207-6c52bac54dc9',
|
|
15
|
+
* customer_id: '9b85c1c1-5238-4f2a-a409-61412905e1e1',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
retrieve(body, options) {
|
|
20
|
+
return this._client.post('/v1/customer-alerts/get', { body, ...options });
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Fetch all customer alert statuses and alert information for a customer
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const alerts = await client.v1.customers.alerts.list({
|
|
28
|
+
* customer_id: '9b85c1c1-5238-4f2a-a409-61412905e1e1',
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
list(params, options) {
|
|
33
|
+
const { next_page, ...body } = params;
|
|
34
|
+
return this._client.post('/v1/customer-alerts/list', { query: { next_page }, body, ...options });
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Reset state for an alert by customer id and force re-evaluation
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* await client.v1.customers.alerts.reset({
|
|
42
|
+
* alert_id: '5e8691bf-b22a-4672-922d-f80eee940f01',
|
|
43
|
+
* customer_id: '4c83caf3-8af4-44e2-9aeb-e290531726d9',
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
reset(body, options) {
|
|
48
|
+
return this._client.post('/v1/customer-alerts/reset', {
|
|
49
|
+
body,
|
|
50
|
+
...options,
|
|
51
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.Alerts = Alerts;
|
|
56
|
+
//# sourceMappingURL=alerts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alerts.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/alerts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,mDAAgD;AAIhD,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,IAAyB,EAAE,OAA6B;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CAAC,MAAuB,EAAE,OAA6B;QACzD,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnG,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,IAAsB,EAAE,OAA6B;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE;YACpD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;CACF;AAlDD,wBAkDC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../resource.mjs";
|
|
3
|
+
export class Alerts extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Get the customer alert status and alert information for the specified customer
|
|
6
|
+
* and alert
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const alert = await client.v1.customers.alerts.retrieve({
|
|
11
|
+
* alert_id: '8deed800-1b7a-495d-a207-6c52bac54dc9',
|
|
12
|
+
* customer_id: '9b85c1c1-5238-4f2a-a409-61412905e1e1',
|
|
13
|
+
* });
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
retrieve(body, options) {
|
|
17
|
+
return this._client.post('/v1/customer-alerts/get', { body, ...options });
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Fetch all customer alert statuses and alert information for a customer
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const alerts = await client.v1.customers.alerts.list({
|
|
25
|
+
* customer_id: '9b85c1c1-5238-4f2a-a409-61412905e1e1',
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
list(params, options) {
|
|
30
|
+
const { next_page, ...body } = params;
|
|
31
|
+
return this._client.post('/v1/customer-alerts/list', { query: { next_page }, body, ...options });
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Reset state for an alert by customer id and force re-evaluation
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* await client.v1.customers.alerts.reset({
|
|
39
|
+
* alert_id: '5e8691bf-b22a-4672-922d-f80eee940f01',
|
|
40
|
+
* customer_id: '4c83caf3-8af4-44e2-9aeb-e290531726d9',
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
reset(body, options) {
|
|
45
|
+
return this._client.post('/v1/customer-alerts/reset', {
|
|
46
|
+
body,
|
|
47
|
+
...options,
|
|
48
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=alerts.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alerts.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/alerts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,IAAyB,EAAE,OAA6B;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CAAC,MAAuB,EAAE,OAA6B;QACzD,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnG,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,IAAsB,EAAE,OAA6B;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE;YACpD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,17 +1,44 @@
|
|
|
1
|
-
import { APIResource } from "
|
|
2
|
-
import * as Core from "
|
|
1
|
+
import { APIResource } from "../../../resource.js";
|
|
2
|
+
import * as Core from "../../../core.js";
|
|
3
3
|
export declare class BillingConfig extends APIResource {
|
|
4
4
|
/**
|
|
5
5
|
* Set the billing configuration for a given customer.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* await client.v1.customers.billingConfig.create({
|
|
10
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
11
|
+
* billing_provider_type: 'stripe',
|
|
12
|
+
* billing_provider_customer_id: 'cus_AJ6y20bjkOOayM',
|
|
13
|
+
* stripe_collection_method: 'charge_automatically',
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
6
16
|
*/
|
|
7
17
|
create(params: BillingConfigCreateParams, options?: Core.RequestOptions): Core.APIPromise<void>;
|
|
8
18
|
/**
|
|
9
19
|
* Fetch the billing configuration for the given customer.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const billingConfig =
|
|
24
|
+
* await client.v1.customers.billingConfig.retrieve({
|
|
25
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
26
|
+
* billing_provider_type: 'stripe',
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
10
29
|
*/
|
|
11
30
|
retrieve(params: BillingConfigRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<BillingConfigRetrieveResponse>;
|
|
12
31
|
/**
|
|
13
32
|
* Delete the billing configuration for a given customer. Note: this is unsupported
|
|
14
33
|
* for Azure and AWS Marketplace customers.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* await client.v1.customers.billingConfig.delete({
|
|
38
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
39
|
+
* billing_provider_type: 'stripe',
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
15
42
|
*/
|
|
16
43
|
delete(params: BillingConfigDeleteParams, options?: Core.RequestOptions): Core.APIPromise<void>;
|
|
17
44
|
}
|
|
@@ -26,6 +53,10 @@ export declare namespace BillingConfigRetrieveResponse {
|
|
|
26
53
|
* [AWS's GetEntitlements API](https://docs.aws.amazon.com/marketplaceentitlement/latest/APIReference/API_GetEntitlements.html).
|
|
27
54
|
*/
|
|
28
55
|
aws_expiration_date?: string;
|
|
56
|
+
/**
|
|
57
|
+
* True if the aws_product_code is a SAAS subscription product, false otherwise.
|
|
58
|
+
*/
|
|
59
|
+
aws_is_subscription_product?: boolean;
|
|
29
60
|
aws_product_code?: string;
|
|
30
61
|
aws_region?: 'af-south-1' | 'ap-east-1' | 'ap-northeast-1' | 'ap-northeast-2' | 'ap-northeast-3' | 'ap-south-1' | 'ap-southeast-1' | 'ap-southeast-2' | 'ca-central-1' | 'cn-north-1' | 'cn-northwest-1' | 'eu-central-1' | 'eu-north-1' | 'eu-south-1' | 'eu-west-1' | 'eu-west-2' | 'eu-west-3' | 'me-south-1' | 'sa-east-1' | 'us-east-1' | 'us-east-2' | 'us-gov-east-1' | 'us-gov-west-1' | 'us-west-1' | 'us-west-2';
|
|
31
62
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-config.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/billing-config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AAEtC,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;IAS/F;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,MAAM,EAAE,2BAA2B,EACnC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,6BAA6B,CAAC;IAKjD;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;CAOhG;AAED,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,6BAA6B,CAAC,IAAI,CAAC;CAC1C;AAED,yBAAiB,6BAA6B,CAAC;IAC7C,UAAiB,IAAI;QACnB;;;;WAIG;QACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAE7B;;WAEG;QACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;QAEtC,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAE1B,UAAU,CAAC,EACP,YAAY,GACZ,WAAW,GACX,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,YAAY,GACZ,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,GACd,YAAY,GACZ,gBAAgB,GAChB,cAAc,GACd,YAAY,GACZ,YAA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;;OAEG;IACH,qBAAqB,EACjB,iBAAiB,GACjB,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,mBAAmB,GACnB,mBAAmB,GACnB,SAAS,GACT,iBAAiB,CAAC;CACvB;AAED,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,qBAAqB,EACjB,iBAAiB,GACjB,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,mBAAmB,GACnB,mBAAmB,GACnB,SAAS,GACT,iBAAiB,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.BillingConfig = void 0;
|
|
5
|
+
const resource_1 = require("../../../resource.js");
|
|
6
|
+
class BillingConfig extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Set the billing configuration for a given customer.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* await client.v1.customers.billingConfig.create({
|
|
13
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
14
|
+
* billing_provider_type: 'stripe',
|
|
15
|
+
* billing_provider_customer_id: 'cus_AJ6y20bjkOOayM',
|
|
16
|
+
* stripe_collection_method: 'charge_automatically',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
create(params, options) {
|
|
21
|
+
const { customer_id, billing_provider_type, ...body } = params;
|
|
22
|
+
return this._client.post(`/v1/customers/${customer_id}/billing-config/${billing_provider_type}`, {
|
|
23
|
+
body,
|
|
24
|
+
...options,
|
|
25
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Fetch the billing configuration for the given customer.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const billingConfig =
|
|
34
|
+
* await client.v1.customers.billingConfig.retrieve({
|
|
35
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
36
|
+
* billing_provider_type: 'stripe',
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
retrieve(params, options) {
|
|
41
|
+
const { customer_id, billing_provider_type } = params;
|
|
42
|
+
return this._client.get(`/v1/customers/${customer_id}/billing-config/${billing_provider_type}`, options);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Delete the billing configuration for a given customer. Note: this is unsupported
|
|
46
|
+
* for Azure and AWS Marketplace customers.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* await client.v1.customers.billingConfig.delete({
|
|
51
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
52
|
+
* billing_provider_type: 'stripe',
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
delete(params, options) {
|
|
57
|
+
const { customer_id, billing_provider_type } = params;
|
|
58
|
+
return this._client.delete(`/v1/customers/${customer_id}/billing-config/${billing_provider_type}`, {
|
|
59
|
+
...options,
|
|
60
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.BillingConfig = BillingConfig;
|
|
65
|
+
//# sourceMappingURL=billing-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-config.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/billing-config.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,mDAAgD;AAGhD,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,MAAiC,EAAE,OAA6B;QACrE,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,WAAW,mBAAmB,qBAAqB,EAAE,EAAE;YAC/F,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,MAAmC,EACnC,OAA6B;QAE7B,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,GAAG,MAAM,CAAC;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,WAAW,mBAAmB,qBAAqB,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3G,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,MAAiC,EAAE,OAA6B;QACrE,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,GAAG,MAAM,CAAC;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,iBAAiB,WAAW,mBAAmB,qBAAqB,EAAE,EAAE;YACjG,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;CACF;AA9DD,sCA8DC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../resource.mjs";
|
|
3
|
+
export class BillingConfig extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Set the billing configuration for a given customer.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* await client.v1.customers.billingConfig.create({
|
|
10
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
11
|
+
* billing_provider_type: 'stripe',
|
|
12
|
+
* billing_provider_customer_id: 'cus_AJ6y20bjkOOayM',
|
|
13
|
+
* stripe_collection_method: 'charge_automatically',
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
create(params, options) {
|
|
18
|
+
const { customer_id, billing_provider_type, ...body } = params;
|
|
19
|
+
return this._client.post(`/v1/customers/${customer_id}/billing-config/${billing_provider_type}`, {
|
|
20
|
+
body,
|
|
21
|
+
...options,
|
|
22
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Fetch the billing configuration for the given customer.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const billingConfig =
|
|
31
|
+
* await client.v1.customers.billingConfig.retrieve({
|
|
32
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
33
|
+
* billing_provider_type: 'stripe',
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
retrieve(params, options) {
|
|
38
|
+
const { customer_id, billing_provider_type } = params;
|
|
39
|
+
return this._client.get(`/v1/customers/${customer_id}/billing-config/${billing_provider_type}`, options);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Delete the billing configuration for a given customer. Note: this is unsupported
|
|
43
|
+
* for Azure and AWS Marketplace customers.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* await client.v1.customers.billingConfig.delete({
|
|
48
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
49
|
+
* billing_provider_type: 'stripe',
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
delete(params, options) {
|
|
54
|
+
const { customer_id, billing_provider_type } = params;
|
|
55
|
+
return this._client.delete(`/v1/customers/${customer_id}/billing-config/${billing_provider_type}`, {
|
|
56
|
+
...options,
|
|
57
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=billing-config.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-config.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/billing-config.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,MAAiC,EAAE,OAA6B;QACrE,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,WAAW,mBAAmB,qBAAqB,EAAE,EAAE;YAC/F,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,MAAmC,EACnC,OAA6B;QAE7B,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,GAAG,MAAM,CAAC;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,WAAW,mBAAmB,qBAAqB,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3G,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,MAAiC,EAAE,OAA6B;QACrE,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,GAAG,MAAM,CAAC;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,iBAAiB,WAAW,mBAAmB,qBAAqB,EAAE,EAAE;YACjG,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,17 +1,72 @@
|
|
|
1
|
-
import { APIResource } from "
|
|
2
|
-
import * as Core from "
|
|
3
|
-
import * as Shared from "
|
|
1
|
+
import { APIResource } from "../../../resource.js";
|
|
2
|
+
import * as Core from "../../../core.js";
|
|
3
|
+
import * as Shared from "../../shared.js";
|
|
4
4
|
export declare class Commits extends APIResource {
|
|
5
5
|
/**
|
|
6
6
|
* Create a new commit at the customer level.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const commit = await client.v1.customers.commits.create({
|
|
11
|
+
* access_schedule: {
|
|
12
|
+
* credit_type_id: '2714e483-4ff1-48e4-9e25-ac732e8f24f2',
|
|
13
|
+
* schedule_items: [
|
|
14
|
+
* {
|
|
15
|
+
* amount: 1000,
|
|
16
|
+
* starting_at: '2020-01-01T00:00:00.000Z',
|
|
17
|
+
* ending_before: '2020-02-01T00:00:00.000Z',
|
|
18
|
+
* },
|
|
19
|
+
* ],
|
|
20
|
+
* },
|
|
21
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
22
|
+
* priority: 100,
|
|
23
|
+
* product_id: 'f14d6729-6a44-4b13-9908-9387f1918790',
|
|
24
|
+
* type: 'prepaid',
|
|
25
|
+
* invoice_contract_id:
|
|
26
|
+
* 'e57d6929-c2f1-4796-a9a8-63cedefe848d',
|
|
27
|
+
* invoice_schedule: {
|
|
28
|
+
* credit_type_id: '2714e483-4ff1-48e4-9e25-ac732e8f24f2',
|
|
29
|
+
* schedule_items: [
|
|
30
|
+
* {
|
|
31
|
+
* unit_price: 10000000,
|
|
32
|
+
* quantity: 1,
|
|
33
|
+
* timestamp: '2020-03-01T00:00:00.000Z',
|
|
34
|
+
* },
|
|
35
|
+
* ],
|
|
36
|
+
* },
|
|
37
|
+
* name: 'My Commit',
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
7
40
|
*/
|
|
8
41
|
create(body: CommitCreateParams, options?: Core.RequestOptions): Core.APIPromise<CommitCreateResponse>;
|
|
9
42
|
/**
|
|
10
43
|
* List commits.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const commits = await client.v1.customers.commits.list({
|
|
48
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
49
|
+
* commit_id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85',
|
|
50
|
+
* include_ledgers: true,
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
11
53
|
*/
|
|
12
54
|
list(body: CommitListParams, options?: Core.RequestOptions): Core.APIPromise<CommitListResponse>;
|
|
13
55
|
/**
|
|
14
|
-
*
|
|
56
|
+
* Pull forward the end date of a prepaid commit. Use the "edit a commit" endpoint
|
|
57
|
+
* to extend the end date of a prepaid commit, or to make other edits to the
|
|
58
|
+
* commit.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const response =
|
|
63
|
+
* await client.v1.customers.commits.updateEndDate({
|
|
64
|
+
* commit_id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85',
|
|
65
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
66
|
+
* access_ending_before: '2020-01-01T00:00:00.000Z',
|
|
67
|
+
* invoices_ending_before: '2020-01-01T00:00:00.000Z',
|
|
68
|
+
* });
|
|
69
|
+
* ```
|
|
15
70
|
*/
|
|
16
71
|
updateEndDate(body: CommitUpdateEndDateParams, options?: Core.RequestOptions): Core.APIPromise<CommitUpdateEndDateResponse>;
|
|
17
72
|
}
|
|
@@ -49,16 +104,20 @@ export interface CommitCreateParams {
|
|
|
49
104
|
*/
|
|
50
105
|
applicable_contract_ids?: Array<string>;
|
|
51
106
|
/**
|
|
52
|
-
* Which products the commit applies to. If
|
|
53
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
107
|
+
* Which products the commit applies to. If applicable_product_ids,
|
|
108
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
109
|
+
* all products.
|
|
54
110
|
*/
|
|
55
111
|
applicable_product_ids?: Array<string>;
|
|
56
112
|
/**
|
|
57
|
-
* Which tags the commit applies to. If
|
|
58
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
113
|
+
* Which tags the commit applies to. If applicable_product_ids,
|
|
114
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
115
|
+
* all products.
|
|
59
116
|
*/
|
|
60
117
|
applicable_product_tags?: Array<string>;
|
|
61
|
-
custom_fields?:
|
|
118
|
+
custom_fields?: {
|
|
119
|
+
[key: string]: string;
|
|
120
|
+
};
|
|
62
121
|
/**
|
|
63
122
|
* Used only in UI/API. It is not exposed to end customers.
|
|
64
123
|
*/
|
|
@@ -89,6 +148,13 @@ export interface CommitCreateParams {
|
|
|
89
148
|
* This field's availability is dependent on your client's configuration.
|
|
90
149
|
*/
|
|
91
150
|
salesforce_opportunity_id?: string;
|
|
151
|
+
/**
|
|
152
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
153
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
154
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
155
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
156
|
+
*/
|
|
157
|
+
specifiers?: Array<CommitCreateParams.Specifier>;
|
|
92
158
|
/**
|
|
93
159
|
* Prevents the creation of duplicates. If a request to create a commit or credit
|
|
94
160
|
* is made with a uniqueness key that was previously used to create a commit or
|
|
@@ -205,6 +271,23 @@ export declare namespace CommitCreateParams {
|
|
|
205
271
|
unit_price?: number;
|
|
206
272
|
}
|
|
207
273
|
}
|
|
274
|
+
interface Specifier {
|
|
275
|
+
presentation_group_values?: {
|
|
276
|
+
[key: string]: string;
|
|
277
|
+
};
|
|
278
|
+
pricing_group_values?: {
|
|
279
|
+
[key: string]: string;
|
|
280
|
+
};
|
|
281
|
+
/**
|
|
282
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
283
|
+
*/
|
|
284
|
+
product_id?: string;
|
|
285
|
+
/**
|
|
286
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
287
|
+
* tags.
|
|
288
|
+
*/
|
|
289
|
+
product_tags?: Array<string>;
|
|
290
|
+
}
|
|
208
291
|
}
|
|
209
292
|
export interface CommitListParams {
|
|
210
293
|
customer_id: string;
|
|
@@ -218,7 +301,7 @@ export interface CommitListParams {
|
|
|
218
301
|
*/
|
|
219
302
|
effective_before?: string;
|
|
220
303
|
/**
|
|
221
|
-
* Include commits from archived contracts.
|
|
304
|
+
* Include archived commits and commits from archived contracts.
|
|
222
305
|
*/
|
|
223
306
|
include_archived?: boolean;
|
|
224
307
|
/**
|
|
@@ -235,6 +318,10 @@ export interface CommitListParams {
|
|
|
235
318
|
* be slower.
|
|
236
319
|
*/
|
|
237
320
|
include_ledgers?: boolean;
|
|
321
|
+
/**
|
|
322
|
+
* The maximum number of commits to return. Defaults to 25.
|
|
323
|
+
*/
|
|
324
|
+
limit?: number;
|
|
238
325
|
/**
|
|
239
326
|
* The next page token from a previous response.
|
|
240
327
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commits.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/commits.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AACtC,OAAO,KAAK,MAAM,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O,CAAC;IAE3B;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Commits = void 0;
|
|
5
|
+
const resource_1 = require("../../../resource.js");
|
|
6
|
+
class Commits extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create a new commit at the customer level.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const commit = await client.v1.customers.commits.create({
|
|
13
|
+
* access_schedule: {
|
|
14
|
+
* credit_type_id: '2714e483-4ff1-48e4-9e25-ac732e8f24f2',
|
|
15
|
+
* schedule_items: [
|
|
16
|
+
* {
|
|
17
|
+
* amount: 1000,
|
|
18
|
+
* starting_at: '2020-01-01T00:00:00.000Z',
|
|
19
|
+
* ending_before: '2020-02-01T00:00:00.000Z',
|
|
20
|
+
* },
|
|
21
|
+
* ],
|
|
22
|
+
* },
|
|
23
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
24
|
+
* priority: 100,
|
|
25
|
+
* product_id: 'f14d6729-6a44-4b13-9908-9387f1918790',
|
|
26
|
+
* type: 'prepaid',
|
|
27
|
+
* invoice_contract_id:
|
|
28
|
+
* 'e57d6929-c2f1-4796-a9a8-63cedefe848d',
|
|
29
|
+
* invoice_schedule: {
|
|
30
|
+
* credit_type_id: '2714e483-4ff1-48e4-9e25-ac732e8f24f2',
|
|
31
|
+
* schedule_items: [
|
|
32
|
+
* {
|
|
33
|
+
* unit_price: 10000000,
|
|
34
|
+
* quantity: 1,
|
|
35
|
+
* timestamp: '2020-03-01T00:00:00.000Z',
|
|
36
|
+
* },
|
|
37
|
+
* ],
|
|
38
|
+
* },
|
|
39
|
+
* name: 'My Commit',
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
create(body, options) {
|
|
44
|
+
return this._client.post('/v1/contracts/customerCommits/create', { body, ...options });
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* List commits.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const commits = await client.v1.customers.commits.list({
|
|
52
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
53
|
+
* commit_id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85',
|
|
54
|
+
* include_ledgers: true,
|
|
55
|
+
* });
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
list(body, options) {
|
|
59
|
+
return this._client.post('/v1/contracts/customerCommits/list', { body, ...options });
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Pull forward the end date of a prepaid commit. Use the "edit a commit" endpoint
|
|
63
|
+
* to extend the end date of a prepaid commit, or to make other edits to the
|
|
64
|
+
* commit.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* const response =
|
|
69
|
+
* await client.v1.customers.commits.updateEndDate({
|
|
70
|
+
* commit_id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85',
|
|
71
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
72
|
+
* access_ending_before: '2020-01-01T00:00:00.000Z',
|
|
73
|
+
* invoices_ending_before: '2020-01-01T00:00:00.000Z',
|
|
74
|
+
* });
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
updateEndDate(body, options) {
|
|
78
|
+
return this._client.post('/v1/contracts/customerCommits/updateEndDate', { body, ...options });
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.Commits = Commits;
|
|
82
|
+
//# sourceMappingURL=commits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commits.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/commits.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,mDAAgD;AAIhD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,MAAM,CAAC,IAAwB,EAAE,OAA6B;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sCAAsC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,IAAsB,EAAE,OAA6B;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oCAAoC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,aAAa,CACX,IAA+B,EAC/B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,6CAA6C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChG,CAAC;CACF;AA/ED,0BA+EC"}
|