orb-billing 5.75.1 → 6.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 +31 -0
- package/README.md +118 -45
- package/api-promise.d.mts +3 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +3 -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 +3 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +474 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +474 -0
- package/client.d.ts.map +1 -0
- package/client.js +650 -0
- package/client.js.map +1 -0
- package/client.mjs +645 -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 +131 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +131 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +294 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +266 -0
- package/core/error.mjs.map +1 -0
- package/core/pagination.d.mts +67 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +67 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +101 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +95 -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 +3 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -131
- package/error.d.ts.map +1 -1
- package/error.js +3 -291
- package/error.js.map +1 -1
- package/error.mjs +2 -265
- package/error.mjs.map +1 -1
- package/index.d.mts +7 -401
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -400
- package/index.d.ts.map +1 -1
- package/index.js +15 -286
- package/index.js.map +1 -1
- package/index.mjs +6 -259
- 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 +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -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 +40 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +37 -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 +2 -2
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/index.mjs.map +1 -1
- package/internal/qs/stringify.d.mts +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 +26 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +26 -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 +87 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +81 -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/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.js +3 -26
- package/internal/utils/query.js.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- 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 +8 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +8 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +12 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +9 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +122 -65
- package/pagination.d.mts +3 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -30
- package/pagination.d.ts.map +1 -1
- package/pagination.js +3 -37
- package/pagination.js.map +1 -1
- package/pagination.mjs +2 -35
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +3 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -5
- package/resource.d.ts.map +1 -1
- package/resource.js +3 -8
- package/resource.js.map +1 -1
- package/resource.mjs +2 -6
- package/resource.mjs.map +1 -1
- package/resources/alerts.d.mts +430 -0
- package/resources/alerts.d.mts.map +1 -0
- package/resources/alerts.d.ts +14 -17
- package/resources/alerts.d.ts.map +1 -1
- package/resources/alerts.js +37 -27
- package/resources/alerts.js.map +1 -1
- package/resources/alerts.mjs +36 -25
- package/resources/alerts.mjs.map +1 -1
- package/resources/beta/beta.d.mts +2826 -0
- package/resources/beta/beta.d.mts.map +1 -0
- package/resources/beta/beta.d.ts +13 -9
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +10 -30
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +8 -6
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/external-plan-id.d.mts +2713 -0
- package/resources/beta/external-plan-id.d.mts.map +1 -0
- package/resources/beta/external-plan-id.d.ts +10 -6
- package/resources/beta/external-plan-id.d.ts.map +1 -1
- package/resources/beta/external-plan-id.js +7 -5
- package/resources/beta/external-plan-id.js.map +1 -1
- package/resources/beta/external-plan-id.mjs +7 -5
- package/resources/beta/external-plan-id.mjs.map +1 -1
- package/resources/beta/index.d.mts +3 -0
- package/resources/beta/index.d.mts.map +1 -0
- package/resources/beta/index.d.ts +2 -2
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta.d.mts +2 -0
- package/resources/beta.d.mts.map +1 -0
- package/resources/beta.d.ts.map +1 -1
- package/resources/beta.js +2 -15
- package/resources/beta.js.map +1 -1
- package/resources/beta.mjs.map +1 -1
- package/resources/coupons/coupons.d.mts +148 -0
- package/resources/coupons/coupons.d.mts.map +1 -0
- package/resources/coupons/coupons.d.ts +10 -11
- package/resources/coupons/coupons.d.ts.map +1 -1
- package/resources/coupons/coupons.js +24 -38
- package/resources/coupons/coupons.js.map +1 -1
- package/resources/coupons/coupons.mjs +21 -12
- package/resources/coupons/coupons.mjs.map +1 -1
- package/resources/coupons/index.d.mts +3 -0
- package/resources/coupons/index.d.mts.map +1 -0
- package/resources/coupons/index.d.ts +1 -1
- package/resources/coupons/index.d.ts.map +1 -1
- package/resources/coupons/index.js +1 -2
- package/resources/coupons/index.js.map +1 -1
- package/resources/coupons/index.mjs +1 -1
- package/resources/coupons/index.mjs.map +1 -1
- package/resources/coupons/subscriptions.d.mts +34 -0
- package/resources/coupons/subscriptions.d.mts.map +1 -0
- package/resources/coupons/subscriptions.d.ts +5 -6
- package/resources/coupons/subscriptions.d.ts.map +1 -1
- package/resources/coupons/subscriptions.js +21 -12
- package/resources/coupons/subscriptions.js.map +1 -1
- package/resources/coupons/subscriptions.mjs +20 -11
- package/resources/coupons/subscriptions.mjs.map +1 -1
- package/resources/coupons.d.mts +2 -0
- package/resources/coupons.d.mts.map +1 -0
- package/resources/coupons.d.ts.map +1 -1
- package/resources/coupons.js +2 -15
- package/resources/coupons.js.map +1 -1
- package/resources/coupons.mjs.map +1 -1
- package/resources/credit-blocks.d.mts +275 -0
- package/resources/credit-blocks.d.mts.map +1 -0
- package/resources/credit-blocks.d.ts +50 -9
- package/resources/credit-blocks.d.ts.map +1 -1
- package/resources/credit-blocks.js +7 -5
- package/resources/credit-blocks.js.map +1 -1
- package/resources/credit-blocks.mjs +7 -5
- package/resources/credit-blocks.mjs.map +1 -1
- package/resources/credit-notes.d.mts +144 -0
- package/resources/credit-notes.d.mts.map +1 -0
- package/resources/credit-notes.d.ts +8 -8
- package/resources/credit-notes.d.ts.map +1 -1
- package/resources/credit-notes.js +19 -10
- package/resources/credit-notes.js.map +1 -1
- package/resources/credit-notes.mjs +18 -9
- package/resources/credit-notes.mjs.map +1 -1
- package/resources/customers/balance-transactions.d.mts +135 -0
- package/resources/customers/balance-transactions.d.mts.map +1 -0
- package/resources/customers/balance-transactions.d.ts +8 -9
- package/resources/customers/balance-transactions.d.ts.map +1 -1
- package/resources/customers/balance-transactions.js +29 -13
- package/resources/customers/balance-transactions.js.map +1 -1
- package/resources/customers/balance-transactions.mjs +28 -11
- package/resources/customers/balance-transactions.mjs.map +1 -1
- package/resources/customers/costs.d.mts +314 -0
- package/resources/customers/costs.d.mts.map +1 -0
- package/resources/customers/costs.d.ts +5 -6
- package/resources/customers/costs.d.ts.map +1 -1
- package/resources/customers/costs.js +243 -11
- package/resources/customers/costs.js.map +1 -1
- package/resources/customers/costs.mjs +243 -11
- package/resources/customers/costs.mjs.map +1 -1
- package/resources/customers/credits/credits.d.mts +287 -0
- package/resources/customers/credits/credits.d.mts.map +1 -0
- package/resources/customers/credits/credits.d.ts +55 -19
- package/resources/customers/credits/credits.d.ts.map +1 -1
- package/resources/customers/credits/credits.js +38 -50
- package/resources/customers/credits/credits.js.map +1 -1
- package/resources/customers/credits/credits.mjs +36 -24
- package/resources/customers/credits/credits.mjs.map +1 -1
- package/resources/customers/credits/index.d.mts +4 -0
- package/resources/customers/credits/index.d.mts.map +1 -0
- package/resources/customers/credits/index.d.ts +3 -3
- package/resources/customers/credits/index.d.ts.map +1 -1
- package/resources/customers/credits/index.js +1 -7
- package/resources/customers/credits/index.js.map +1 -1
- package/resources/customers/credits/index.mjs +3 -3
- package/resources/customers/credits/index.mjs.map +1 -1
- package/resources/customers/credits/ledger.d.mts +1202 -0
- package/resources/customers/credits/ledger.d.mts.map +1 -0
- package/resources/customers/credits/ledger.d.ts +11 -14
- package/resources/customers/credits/ledger.d.ts.map +1 -1
- package/resources/customers/credits/ledger.js +172 -27
- package/resources/customers/credits/ledger.js.map +1 -1
- package/resources/customers/credits/ledger.mjs +171 -24
- package/resources/customers/credits/ledger.mjs.map +1 -1
- package/resources/customers/credits/top-ups.d.mts +357 -0
- package/resources/customers/credits/top-ups.d.mts.map +1 -0
- package/resources/customers/credits/top-ups.d.ts +19 -16
- package/resources/customers/credits/top-ups.d.ts.map +1 -1
- package/resources/customers/credits/top-ups.js +24 -29
- package/resources/customers/credits/top-ups.js.map +1 -1
- package/resources/customers/credits/top-ups.mjs +23 -26
- package/resources/customers/credits/top-ups.mjs.map +1 -1
- package/resources/customers/credits.d.mts +2 -0
- package/resources/customers/credits.d.mts.map +1 -0
- package/resources/customers/credits.d.ts.map +1 -1
- package/resources/customers/credits.js +2 -15
- package/resources/customers/credits.js.map +1 -1
- package/resources/customers/credits.mjs.map +1 -1
- package/resources/customers/customers.d.mts +1453 -0
- package/resources/customers/customers.d.mts.map +1 -0
- package/resources/customers/customers.d.ts +17 -18
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +30 -53
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +27 -27
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/index.d.mts +5 -0
- package/resources/customers/index.d.mts.map +1 -0
- package/resources/customers/index.d.ts +3 -3
- package/resources/customers/index.d.ts.map +1 -1
- package/resources/customers/index.js +1 -5
- package/resources/customers/index.js.map +1 -1
- package/resources/customers/index.mjs +3 -3
- package/resources/customers/index.mjs.map +1 -1
- package/resources/customers.d.mts +2 -0
- package/resources/customers.d.mts.map +1 -0
- package/resources/customers.d.ts.map +1 -1
- package/resources/customers.js +2 -15
- package/resources/customers.js.map +1 -1
- package/resources/customers.mjs.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.d.mts +150 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.d.mts.map +1 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +11 -12
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.js +21 -39
- package/resources/dimensional-price-groups/dimensional-price-groups.js.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs +18 -13
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs.map +1 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.mts +53 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.mts.map +1 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +7 -6
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts.map +1 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.js +6 -5
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.js.map +1 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs +6 -5
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs.map +1 -1
- package/resources/dimensional-price-groups/index.d.mts +3 -0
- package/resources/dimensional-price-groups/index.d.mts.map +1 -0
- package/resources/dimensional-price-groups/index.d.ts +1 -1
- package/resources/dimensional-price-groups/index.d.ts.map +1 -1
- package/resources/dimensional-price-groups/index.js +1 -2
- package/resources/dimensional-price-groups/index.js.map +1 -1
- package/resources/dimensional-price-groups/index.mjs +1 -1
- package/resources/dimensional-price-groups/index.mjs.map +1 -1
- package/resources/dimensional-price-groups.d.mts +2 -0
- package/resources/dimensional-price-groups.d.mts.map +1 -0
- package/resources/dimensional-price-groups.d.ts.map +1 -1
- package/resources/dimensional-price-groups.js +2 -15
- package/resources/dimensional-price-groups.js.map +1 -1
- package/resources/dimensional-price-groups.mjs.map +1 -1
- package/resources/events/backfills.d.mts +389 -0
- package/resources/events/backfills.d.mts.map +1 -0
- package/resources/events/backfills.d.ts +11 -12
- package/resources/events/backfills.d.ts.map +1 -1
- package/resources/events/backfills.js +24 -15
- package/resources/events/backfills.js.map +1 -1
- package/resources/events/backfills.mjs +23 -13
- package/resources/events/backfills.mjs.map +1 -1
- package/resources/events/events.d.mts +536 -0
- package/resources/events/events.d.mts.map +1 -0
- package/resources/events/events.d.ts +10 -11
- package/resources/events/events.d.ts.map +1 -1
- package/resources/events/events.js +7 -29
- package/resources/events/events.js.map +1 -1
- package/resources/events/events.mjs +5 -5
- package/resources/events/events.mjs.map +1 -1
- package/resources/events/index.d.mts +4 -0
- package/resources/events/index.d.mts.map +1 -0
- package/resources/events/index.d.ts +1 -1
- package/resources/events/index.d.ts.map +1 -1
- package/resources/events/index.js +1 -2
- package/resources/events/index.js.map +1 -1
- package/resources/events/index.mjs +1 -1
- package/resources/events/index.mjs.map +1 -1
- package/resources/events/volume.d.mts +79 -0
- package/resources/events/volume.d.mts.map +1 -0
- package/resources/events/volume.d.ts +4 -3
- package/resources/events/volume.d.ts.map +1 -1
- package/resources/events/volume.js +1 -1
- package/resources/events/volume.js.map +1 -1
- package/resources/events/volume.mjs +1 -1
- package/resources/events/volume.mjs.map +1 -1
- package/resources/events.d.mts +2 -0
- package/resources/events.d.mts.map +1 -0
- package/resources/events.d.ts.map +1 -1
- package/resources/events.js +2 -15
- package/resources/events.js.map +1 -1
- package/resources/events.mjs.map +1 -1
- package/resources/index.d.mts +22 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +13 -13
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -33
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +12 -12
- package/resources/index.mjs.map +1 -1
- package/resources/invoice-line-items.d.mts +245 -0
- package/resources/invoice-line-items.d.mts.map +1 -0
- package/resources/invoice-line-items.d.ts +4 -3
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoice-line-items.js +1 -1
- package/resources/invoice-line-items.js.map +1 -1
- package/resources/invoice-line-items.mjs +1 -1
- package/resources/invoice-line-items.mjs.map +1 -1
- package/resources/invoices.d.mts +1795 -0
- package/resources/invoices.d.mts.map +1 -0
- package/resources/invoices.d.ts +25 -27
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +105 -38
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +104 -36
- package/resources/invoices.mjs.map +1 -1
- package/resources/items.d.mts +163 -0
- package/resources/items.d.mts.map +1 -0
- package/resources/items.d.ts +11 -12
- package/resources/items.d.ts.map +1 -1
- package/resources/items.js +20 -15
- package/resources/items.js.map +1 -1
- package/resources/items.mjs +19 -13
- package/resources/items.mjs.map +1 -1
- package/resources/license-types.d.mts +112 -0
- package/resources/license-types.d.mts.map +1 -0
- package/resources/license-types.d.ts +9 -10
- package/resources/license-types.d.ts.map +1 -1
- package/resources/license-types.js +14 -13
- package/resources/license-types.js.map +1 -1
- package/resources/license-types.mjs +13 -11
- package/resources/license-types.mjs.map +1 -1
- package/resources/licenses/external-licenses.d.mts +127 -0
- package/resources/licenses/external-licenses.d.mts.map +1 -0
- package/resources/licenses/external-licenses.d.ts +4 -3
- package/resources/licenses/external-licenses.d.ts.map +1 -1
- package/resources/licenses/external-licenses.js +6 -2
- package/resources/licenses/external-licenses.js.map +1 -1
- package/resources/licenses/external-licenses.mjs +6 -2
- package/resources/licenses/external-licenses.mjs.map +1 -1
- package/resources/licenses/index.d.mts +4 -0
- package/resources/licenses/index.d.mts.map +1 -0
- package/resources/licenses/index.d.ts +1 -1
- package/resources/licenses/index.d.ts.map +1 -1
- package/resources/licenses/index.js +1 -2
- package/resources/licenses/index.js.map +1 -1
- package/resources/licenses/index.mjs +1 -1
- package/resources/licenses/index.mjs.map +1 -1
- package/resources/licenses/licenses.d.mts +177 -0
- package/resources/licenses/licenses.d.mts.map +1 -0
- package/resources/licenses/licenses.d.ts +12 -12
- package/resources/licenses/licenses.d.ts.map +1 -1
- package/resources/licenses/licenses.js +13 -38
- package/resources/licenses/licenses.js.map +1 -1
- package/resources/licenses/licenses.mjs +9 -11
- package/resources/licenses/licenses.mjs.map +1 -1
- package/resources/licenses/usage.d.mts +226 -0
- package/resources/licenses/usage.d.mts.map +1 -0
- package/resources/licenses/usage.d.ts +5 -5
- package/resources/licenses/usage.d.ts.map +1 -1
- package/resources/licenses/usage.js +15 -6
- package/resources/licenses/usage.js.map +1 -1
- package/resources/licenses/usage.mjs +15 -6
- package/resources/licenses/usage.mjs.map +1 -1
- package/resources/licenses.d.mts +2 -0
- package/resources/licenses.d.mts.map +1 -0
- package/resources/licenses.d.ts.map +1 -1
- package/resources/licenses.js +2 -15
- package/resources/licenses.js.map +1 -1
- package/resources/licenses.mjs.map +1 -1
- package/resources/metrics.d.mts +147 -0
- package/resources/metrics.d.mts.map +1 -0
- package/resources/metrics.d.ts +15 -11
- package/resources/metrics.d.ts.map +1 -1
- package/resources/metrics.js +19 -14
- package/resources/metrics.js.map +1 -1
- package/resources/metrics.mjs +18 -12
- package/resources/metrics.mjs.map +1 -1
- package/resources/plans/external-plan-id.d.mts +61 -0
- package/resources/plans/external-plan-id.d.mts.map +1 -0
- package/resources/plans/external-plan-id.d.ts +5 -4
- package/resources/plans/external-plan-id.d.ts.map +1 -1
- package/resources/plans/external-plan-id.js +4 -3
- package/resources/plans/external-plan-id.js.map +1 -1
- package/resources/plans/external-plan-id.mjs +4 -3
- package/resources/plans/external-plan-id.mjs.map +1 -1
- package/resources/plans/index.d.mts +4 -0
- package/resources/plans/index.d.mts.map +1 -0
- package/resources/plans/index.d.ts +2 -2
- package/resources/plans/index.d.ts.map +1 -1
- package/resources/plans/index.js +1 -3
- package/resources/plans/index.js.map +1 -1
- package/resources/plans/index.mjs +2 -2
- package/resources/plans/index.mjs.map +1 -1
- package/resources/plans/migrations.d.mts +99 -0
- package/resources/plans/migrations.d.mts.map +1 -0
- package/resources/plans/migrations.d.ts +15 -10
- package/resources/plans/migrations.d.ts.map +1 -1
- package/resources/plans/migrations.js +17 -16
- package/resources/plans/migrations.js.map +1 -1
- package/resources/plans/migrations.mjs +16 -14
- package/resources/plans/migrations.mjs.map +1 -1
- package/resources/plans/plans.d.mts +1682 -0
- package/resources/plans/plans.d.mts.map +1 -0
- package/resources/plans/plans.d.ts +13 -14
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js +18 -41
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs +15 -15
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/plans.d.mts +2 -0
- package/resources/plans.d.mts.map +1 -0
- package/resources/plans.d.ts.map +1 -1
- package/resources/plans.js +2 -15
- package/resources/plans.js.map +1 -1
- package/resources/plans.mjs.map +1 -1
- package/resources/prices/external-price-id.d.mts +55 -0
- package/resources/prices/external-price-id.d.mts.map +1 -0
- package/resources/prices/external-price-id.d.ts +7 -6
- package/resources/prices/external-price-id.d.ts.map +1 -1
- package/resources/prices/external-price-id.js +6 -5
- package/resources/prices/external-price-id.js.map +1 -1
- package/resources/prices/external-price-id.mjs +6 -5
- package/resources/prices/external-price-id.mjs.map +1 -1
- package/resources/prices/index.d.mts +3 -0
- package/resources/prices/index.d.mts.map +1 -0
- package/resources/prices/index.d.ts.map +1 -1
- package/resources/prices/index.mjs.map +1 -1
- package/resources/prices/prices.d.mts +5950 -0
- package/resources/prices/prices.d.mts.map +1 -0
- package/resources/prices/prices.d.ts +13 -13
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js +23 -37
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs +20 -12
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/prices.d.mts +2 -0
- package/resources/prices.d.mts.map +1 -0
- package/resources/prices.d.ts.map +1 -1
- package/resources/prices.js +2 -15
- package/resources/prices.js.map +1 -1
- package/resources/prices.mjs.map +1 -1
- package/resources/shared.d.mts +13354 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +4 -7
- package/resources/shared.d.ts.map +1 -1
- package/resources/shared.js +0 -11
- package/resources/shared.js.map +1 -1
- package/resources/shared.mjs +1 -7
- package/resources/shared.mjs.map +1 -1
- package/resources/subscription-changes.d.mts +434 -0
- package/resources/subscription-changes.d.mts.map +1 -0
- package/resources/subscription-changes.d.ts +10 -12
- package/resources/subscription-changes.d.ts.map +1 -1
- package/resources/subscription-changes.js +18 -18
- package/resources/subscription-changes.js.map +1 -1
- package/resources/subscription-changes.mjs +17 -16
- package/resources/subscription-changes.mjs.map +1 -1
- package/resources/subscriptions.d.mts +10821 -0
- package/resources/subscriptions.d.mts.map +1 -0
- package/resources/subscriptions.d.ts +24 -29
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +284 -40
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +283 -37
- package/resources/subscriptions.mjs.map +1 -1
- package/resources/top-level.d.mts +21 -0
- package/resources/top-level.d.mts.map +1 -0
- package/resources/top-level.d.ts +4 -3
- package/resources/top-level.d.ts.map +1 -1
- package/resources/top-level.js +1 -1
- package/resources/top-level.js.map +1 -1
- package/resources/top-level.mjs +1 -1
- package/resources/top-level.mjs.map +1 -1
- package/resources/webhooks.d.mts +24 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +2 -2
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +18 -5
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +16 -3
- 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/resources.mjs.map +1 -1
- package/src/api-promise.ts +2 -0
- package/src/client.ts +1499 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +456 -0
- package/src/core/pagination.ts +167 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -456
- package/src/index.ts +6 -923
- 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 +97 -0
- package/src/internal/parse.ts +56 -0
- package/src/internal/qs/formats.ts +2 -1
- package/src/internal/qs/stringify.ts +17 -20
- package/src/internal/qs/utils.ts +14 -14
- 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 +93 -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 +128 -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 +9 -0
- package/src/pagination.ts +2 -70
- package/src/resource.ts +2 -11
- package/src/resources/alerts.ts +34 -62
- package/src/resources/beta/beta.ts +23 -13
- package/src/resources/beta/external-plan-id.ts +20 -12
- package/src/resources/beta/index.ts +2 -0
- package/src/resources/coupons/coupons.ts +16 -21
- package/src/resources/coupons/index.ts +7 -1
- package/src/resources/coupons/subscriptions.ts +13 -24
- package/src/resources/credit-blocks.ts +62 -16
- package/src/resources/credit-notes.ts +13 -20
- package/src/resources/customers/balance-transactions.ts +15 -28
- package/src/resources/customers/costs.ts +13 -33
- package/src/resources/customers/credits/credits.ts +76 -56
- package/src/resources/customers/credits/index.ts +8 -6
- package/src/resources/customers/credits/ledger.ts +29 -55
- package/src/resources/customers/credits/top-ups.ts +48 -61
- package/src/resources/customers/customers.ts +37 -48
- package/src/resources/customers/index.ts +4 -4
- package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +19 -30
- package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +12 -10
- package/src/resources/dimensional-price-groups/index.ts +1 -1
- package/src/resources/events/backfills.ts +18 -27
- package/src/resources/events/events.ts +14 -15
- package/src/resources/events/index.ts +1 -1
- package/src/resources/events/volume.ts +4 -3
- package/src/resources/index.ts +29 -28
- package/src/resources/invoice-line-items.ts +5 -4
- package/src/resources/invoices.ts +53 -95
- package/src/resources/items.ts +18 -24
- package/src/resources/license-types.ts +14 -31
- package/src/resources/licenses/external-licenses.ts +10 -5
- package/src/resources/licenses/index.ts +1 -1
- package/src/resources/licenses/licenses.ts +21 -20
- package/src/resources/licenses/usage.ts +9 -20
- package/src/resources/metrics.ts +22 -29
- package/src/resources/plans/external-plan-id.ts +9 -7
- package/src/resources/plans/index.ts +4 -2
- package/src/resources/plans/migrations.ts +30 -31
- package/src/resources/plans/plans.ts +22 -24
- package/src/resources/prices/external-price-id.ts +11 -9
- package/src/resources/prices/prices.ts +23 -31
- package/src/resources/shared.ts +4 -4
- package/src/resources/subscription-changes.ts +21 -44
- package/src/resources/subscriptions.ts +66 -106
- package/src/resources/top-level.ts +4 -3
- package/src/resources/webhooks.ts +17 -3
- package/src/tsconfig.json +2 -2
- package/src/uploads.ts +2 -255
- package/src/version.ts +1 -1
- package/uploads.d.mts +3 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -74
- package/uploads.d.ts.map +1 -1
- package/uploads.js +3 -168
- package/uploads.js.map +1 -1
- package/uploads.mjs +2 -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.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/_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 -920
- package/core.js.map +0 -1
- package/core.mjs +0 -888
- 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 -1231
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '../resource';
|
|
4
|
-
import * as Core from '../core';
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
5
4
|
import * as Shared from './shared';
|
|
5
|
+
import { APIPromise } from '../core/api-promise';
|
|
6
|
+
import { buildHeaders } from '../internal/headers';
|
|
7
|
+
import { RequestOptions } from '../internal/request-options';
|
|
8
|
+
import { path } from '../internal/utils/path';
|
|
6
9
|
|
|
7
10
|
/**
|
|
8
11
|
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.
|
|
@@ -11,8 +14,8 @@ export class CreditBlocks extends APIResource {
|
|
|
11
14
|
/**
|
|
12
15
|
* This endpoint returns a credit block identified by its block_id.
|
|
13
16
|
*/
|
|
14
|
-
retrieve(blockId: string, options?:
|
|
15
|
-
return this._client.get(`/credit_blocks/${blockId}`, options);
|
|
17
|
+
retrieve(blockId: string, options?: RequestOptions): APIPromise<CreditBlockRetrieveResponse> {
|
|
18
|
+
return this._client.get(path`/credit_blocks/${blockId}`, options);
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
/**
|
|
@@ -32,10 +35,10 @@ export class CreditBlocks extends APIResource {
|
|
|
32
35
|
* reflect the state as if credits from the deleted block were never applied.
|
|
33
36
|
* </Note>
|
|
34
37
|
*/
|
|
35
|
-
delete(blockId: string, options?:
|
|
36
|
-
return this._client.delete(`/credit_blocks/${blockId}`, {
|
|
38
|
+
delete(blockId: string, options?: RequestOptions): APIPromise<void> {
|
|
39
|
+
return this._client.delete(path`/credit_blocks/${blockId}`, {
|
|
37
40
|
...options,
|
|
38
|
-
headers: { Accept: '*/*',
|
|
41
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
39
42
|
});
|
|
40
43
|
}
|
|
41
44
|
|
|
@@ -58,11 +61,8 @@ export class CreditBlocks extends APIResource {
|
|
|
58
61
|
* future releases. Please contact support before building production integrations
|
|
59
62
|
* against this endpoint.**
|
|
60
63
|
*/
|
|
61
|
-
listInvoices(
|
|
62
|
-
blockId
|
|
63
|
-
options?: Core.RequestOptions,
|
|
64
|
-
): Core.APIPromise<CreditBlockListInvoicesResponse> {
|
|
65
|
-
return this._client.get(`/credit_blocks/${blockId}/invoices`, options);
|
|
64
|
+
listInvoices(blockId: string, options?: RequestOptions): APIPromise<CreditBlockListInvoicesResponse> {
|
|
65
|
+
return this._client.get(path`/credit_blocks/${blockId}/invoices`, options);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -76,11 +76,12 @@ export interface CreditBlockRetrieveResponse {
|
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* How this credit block was created: `allocation` (a subscription's recurring
|
|
79
|
-
* credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
79
|
+
* credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
80
|
+
* `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
80
81
|
* `manual` (a manual credit ledger increment, including credits voided or expired
|
|
81
82
|
* off another block).
|
|
82
83
|
*/
|
|
83
|
-
credit_block_source: 'allocation' | 'top_up' | 'manual';
|
|
84
|
+
credit_block_source: 'allocation' | 'top_up' | 'commitment' | 'manual';
|
|
84
85
|
|
|
85
86
|
effective_date: string | null;
|
|
86
87
|
|
|
@@ -107,6 +108,12 @@ export interface CreditBlockRetrieveResponse {
|
|
|
107
108
|
* serialized on prices with the catalog-item attribution of the funding price.
|
|
108
109
|
*/
|
|
109
110
|
credit_allocation?: CreditBlockRetrieveResponse.CreditAllocation | null;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* The subscription commitment whose true-up rolled forward into this credit block.
|
|
114
|
+
* Present only when `credit_block_source` is `commitment`.
|
|
115
|
+
*/
|
|
116
|
+
credit_commitment?: CreditBlockRetrieveResponse.CreditCommitment | null;
|
|
110
117
|
}
|
|
111
118
|
|
|
112
119
|
export namespace CreditBlockRetrieveResponse {
|
|
@@ -167,6 +174,22 @@ export namespace CreditBlockRetrieveResponse {
|
|
|
167
174
|
values: Array<string>;
|
|
168
175
|
}
|
|
169
176
|
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The subscription commitment whose true-up rolled forward into this credit block.
|
|
180
|
+
* Present only when `credit_block_source` is `commitment`.
|
|
181
|
+
*/
|
|
182
|
+
export interface CreditCommitment {
|
|
183
|
+
/**
|
|
184
|
+
* The ID of the subscription commitment this block was rolled forward from.
|
|
185
|
+
*/
|
|
186
|
+
id: string;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* The subscription the commitment belongs to.
|
|
190
|
+
*/
|
|
191
|
+
subscription_id?: string | null;
|
|
192
|
+
}
|
|
170
193
|
}
|
|
171
194
|
|
|
172
195
|
export interface CreditBlockListInvoicesResponse {
|
|
@@ -189,11 +212,12 @@ export namespace CreditBlockListInvoicesResponse {
|
|
|
189
212
|
|
|
190
213
|
/**
|
|
191
214
|
* How this credit block was created: `allocation` (a subscription's recurring
|
|
192
|
-
* credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
215
|
+
* credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
216
|
+
* `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
193
217
|
* `manual` (a manual credit ledger increment, including credits voided or expired
|
|
194
218
|
* off another block).
|
|
195
219
|
*/
|
|
196
|
-
credit_block_source: 'allocation' | 'top_up' | 'manual';
|
|
220
|
+
credit_block_source: 'allocation' | 'top_up' | 'commitment' | 'manual';
|
|
197
221
|
|
|
198
222
|
effective_date: string | null;
|
|
199
223
|
|
|
@@ -220,6 +244,12 @@ export namespace CreditBlockListInvoicesResponse {
|
|
|
220
244
|
* serialized on prices with the catalog-item attribution of the funding price.
|
|
221
245
|
*/
|
|
222
246
|
credit_allocation?: Block.CreditAllocation | null;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* The subscription commitment whose true-up rolled forward into this credit block.
|
|
250
|
+
* Present only when `credit_block_source` is `commitment`.
|
|
251
|
+
*/
|
|
252
|
+
credit_commitment?: Block.CreditCommitment | null;
|
|
223
253
|
}
|
|
224
254
|
|
|
225
255
|
export namespace Block {
|
|
@@ -280,6 +310,22 @@ export namespace CreditBlockListInvoicesResponse {
|
|
|
280
310
|
values: Array<string>;
|
|
281
311
|
}
|
|
282
312
|
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* The subscription commitment whose true-up rolled forward into this credit block.
|
|
316
|
+
* Present only when `credit_block_source` is `commitment`.
|
|
317
|
+
*/
|
|
318
|
+
export interface CreditCommitment {
|
|
319
|
+
/**
|
|
320
|
+
* The ID of the subscription commitment this block was rolled forward from.
|
|
321
|
+
*/
|
|
322
|
+
id: string;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* The subscription the commitment belongs to.
|
|
326
|
+
*/
|
|
327
|
+
subscription_id?: string | null;
|
|
328
|
+
}
|
|
283
329
|
}
|
|
284
330
|
|
|
285
331
|
export interface Invoice {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '../resource';
|
|
4
|
-
import { isRequestOptions } from '../core';
|
|
5
|
-
import * as Core from '../core';
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
6
4
|
import * as Shared from './shared';
|
|
7
5
|
import { CreditNotesPage } from './shared';
|
|
8
|
-
import {
|
|
6
|
+
import { APIPromise } from '../core/api-promise';
|
|
7
|
+
import { Page, type PageParams, PagePromise } from '../core/pagination';
|
|
8
|
+
import { RequestOptions } from '../internal/request-options';
|
|
9
|
+
import { path } from '../internal/utils/path';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a
|
|
@@ -54,7 +55,7 @@ export class CreditNotes extends APIResource {
|
|
|
54
55
|
* });
|
|
55
56
|
* ```
|
|
56
57
|
*/
|
|
57
|
-
create(body: CreditNoteCreateParams, options?:
|
|
58
|
+
create(body: CreditNoteCreateParams, options?: RequestOptions): APIPromise<Shared.CreditNote> {
|
|
58
59
|
return this._client.post('/credit_notes', { body, ...options });
|
|
59
60
|
}
|
|
60
61
|
|
|
@@ -72,18 +73,10 @@ export class CreditNotes extends APIResource {
|
|
|
72
73
|
* ```
|
|
73
74
|
*/
|
|
74
75
|
list(
|
|
75
|
-
query
|
|
76
|
-
options?:
|
|
77
|
-
):
|
|
78
|
-
|
|
79
|
-
list(
|
|
80
|
-
query: CreditNoteListParams | Core.RequestOptions = {},
|
|
81
|
-
options?: Core.RequestOptions,
|
|
82
|
-
): Core.PagePromise<CreditNotesPage, Shared.CreditNote> {
|
|
83
|
-
if (isRequestOptions(query)) {
|
|
84
|
-
return this.list({}, query);
|
|
85
|
-
}
|
|
86
|
-
return this._client.getAPIList('/credit_notes', CreditNotesPage, { query, ...options });
|
|
76
|
+
query: CreditNoteListParams | null | undefined = {},
|
|
77
|
+
options?: RequestOptions,
|
|
78
|
+
): PagePromise<CreditNotesPage, Shared.CreditNote> {
|
|
79
|
+
return this._client.getAPIList('/credit_notes', Page<Shared.CreditNote>, { query, ...options });
|
|
87
80
|
}
|
|
88
81
|
|
|
89
82
|
/**
|
|
@@ -97,8 +90,8 @@ export class CreditNotes extends APIResource {
|
|
|
97
90
|
* );
|
|
98
91
|
* ```
|
|
99
92
|
*/
|
|
100
|
-
fetch(creditNoteId: string, options?:
|
|
101
|
-
return this._client.get(`/credit_notes/${creditNoteId}`, options);
|
|
93
|
+
fetch(creditNoteId: string, options?: RequestOptions): APIPromise<Shared.CreditNote> {
|
|
94
|
+
return this._client.get(path`/credit_notes/${creditNoteId}`, options);
|
|
102
95
|
}
|
|
103
96
|
}
|
|
104
97
|
|
|
@@ -180,4 +173,4 @@ export declare namespace CreditNotes {
|
|
|
180
173
|
};
|
|
181
174
|
}
|
|
182
175
|
|
|
183
|
-
export { CreditNotesPage };
|
|
176
|
+
export { type CreditNotesPage };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '../../resource';
|
|
4
|
-
import { isRequestOptions } from '../../core';
|
|
5
|
-
import * as Core from '../../core';
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
6
4
|
import * as Shared from '../shared';
|
|
7
|
-
import {
|
|
5
|
+
import { APIPromise } from '../../core/api-promise';
|
|
6
|
+
import { Page, type PageParams, PagePromise } from '../../core/pagination';
|
|
7
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
8
|
+
import { path } from '../../internal/utils/path';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* A customer is a buyer of your products, and the other party to the billing relationship.
|
|
@@ -30,9 +31,9 @@ export class BalanceTransactions extends APIResource {
|
|
|
30
31
|
create(
|
|
31
32
|
customerId: string,
|
|
32
33
|
body: BalanceTransactionCreateParams,
|
|
33
|
-
options?:
|
|
34
|
-
):
|
|
35
|
-
return this._client.post(`/customers/${customerId}/balance_transactions`, { body, ...options });
|
|
34
|
+
options?: RequestOptions,
|
|
35
|
+
): APIPromise<BalanceTransactionCreateResponse> {
|
|
36
|
+
return this._client.post(path`/customers/${customerId}/balance_transactions`, { body, ...options });
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
/**
|
|
@@ -60,30 +61,18 @@ export class BalanceTransactions extends APIResource {
|
|
|
60
61
|
*/
|
|
61
62
|
list(
|
|
62
63
|
customerId: string,
|
|
63
|
-
query
|
|
64
|
-
options?:
|
|
65
|
-
):
|
|
66
|
-
list(
|
|
67
|
-
customerId: string,
|
|
68
|
-
options?: Core.RequestOptions,
|
|
69
|
-
): Core.PagePromise<BalanceTransactionListResponsesPage, BalanceTransactionListResponse>;
|
|
70
|
-
list(
|
|
71
|
-
customerId: string,
|
|
72
|
-
query: BalanceTransactionListParams | Core.RequestOptions = {},
|
|
73
|
-
options?: Core.RequestOptions,
|
|
74
|
-
): Core.PagePromise<BalanceTransactionListResponsesPage, BalanceTransactionListResponse> {
|
|
75
|
-
if (isRequestOptions(query)) {
|
|
76
|
-
return this.list(customerId, {}, query);
|
|
77
|
-
}
|
|
64
|
+
query: BalanceTransactionListParams | null | undefined = {},
|
|
65
|
+
options?: RequestOptions,
|
|
66
|
+
): PagePromise<BalanceTransactionListResponsesPage, BalanceTransactionListResponse> {
|
|
78
67
|
return this._client.getAPIList(
|
|
79
|
-
`/customers/${customerId}/balance_transactions`,
|
|
80
|
-
|
|
68
|
+
path`/customers/${customerId}/balance_transactions`,
|
|
69
|
+
Page<BalanceTransactionListResponse>,
|
|
81
70
|
{ query, ...options },
|
|
82
71
|
);
|
|
83
72
|
}
|
|
84
73
|
}
|
|
85
74
|
|
|
86
|
-
export
|
|
75
|
+
export type BalanceTransactionListResponsesPage = Page<BalanceTransactionListResponse>;
|
|
87
76
|
|
|
88
77
|
export interface BalanceTransactionCreateResponse {
|
|
89
78
|
/**
|
|
@@ -210,13 +199,11 @@ export interface BalanceTransactionListParams extends PageParams {
|
|
|
210
199
|
'operation_time[lte]'?: string | null;
|
|
211
200
|
}
|
|
212
201
|
|
|
213
|
-
BalanceTransactions.BalanceTransactionListResponsesPage = BalanceTransactionListResponsesPage;
|
|
214
|
-
|
|
215
202
|
export declare namespace BalanceTransactions {
|
|
216
203
|
export {
|
|
217
204
|
type BalanceTransactionCreateResponse as BalanceTransactionCreateResponse,
|
|
218
205
|
type BalanceTransactionListResponse as BalanceTransactionListResponse,
|
|
219
|
-
BalanceTransactionListResponsesPage as BalanceTransactionListResponsesPage,
|
|
206
|
+
type BalanceTransactionListResponsesPage as BalanceTransactionListResponsesPage,
|
|
220
207
|
type BalanceTransactionCreateParams as BalanceTransactionCreateParams,
|
|
221
208
|
type BalanceTransactionListParams as BalanceTransactionListParams,
|
|
222
209
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '../../resource';
|
|
4
|
-
import { isRequestOptions } from '../../core';
|
|
5
|
-
import * as Core from '../../core';
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
6
4
|
import * as Shared from '../shared';
|
|
5
|
+
import { APIPromise } from '../../core/api-promise';
|
|
6
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
+
import { path } from '../../internal/utils/path';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* A customer is a buyer of your products, and the other party to the billing relationship.
|
|
@@ -143,19 +144,10 @@ export class Costs extends APIResource {
|
|
|
143
144
|
*/
|
|
144
145
|
list(
|
|
145
146
|
customerId: string,
|
|
146
|
-
query
|
|
147
|
-
options?:
|
|
148
|
-
):
|
|
149
|
-
|
|
150
|
-
list(
|
|
151
|
-
customerId: string,
|
|
152
|
-
query: CostListParams | Core.RequestOptions = {},
|
|
153
|
-
options?: Core.RequestOptions,
|
|
154
|
-
): Core.APIPromise<CostListResponse> {
|
|
155
|
-
if (isRequestOptions(query)) {
|
|
156
|
-
return this.list(customerId, {}, query);
|
|
157
|
-
}
|
|
158
|
-
return this._client.get(`/customers/${customerId}/costs`, { query, ...options });
|
|
147
|
+
query: CostListParams | null | undefined = {},
|
|
148
|
+
options?: RequestOptions,
|
|
149
|
+
): APIPromise<CostListResponse> {
|
|
150
|
+
return this._client.get(path`/customers/${customerId}/costs`, { query, ...options });
|
|
159
151
|
}
|
|
160
152
|
|
|
161
153
|
/**
|
|
@@ -277,24 +269,12 @@ export class Costs extends APIResource {
|
|
|
277
269
|
* `secondary_grouping_key` based on the matrix price definition, for each
|
|
278
270
|
* `grouping_value` and `secondary_grouping_value` available.
|
|
279
271
|
*/
|
|
280
|
-
|
|
281
|
-
externalCustomerId: string,
|
|
282
|
-
query?: CostListByExternalIDParams,
|
|
283
|
-
options?: Core.RequestOptions,
|
|
284
|
-
): Core.APIPromise<CostListByExternalIDResponse>;
|
|
285
|
-
listByExternalId(
|
|
286
|
-
externalCustomerId: string,
|
|
287
|
-
options?: Core.RequestOptions,
|
|
288
|
-
): Core.APIPromise<CostListByExternalIDResponse>;
|
|
289
|
-
listByExternalId(
|
|
272
|
+
listByExternalID(
|
|
290
273
|
externalCustomerId: string,
|
|
291
|
-
query: CostListByExternalIDParams |
|
|
292
|
-
options?:
|
|
293
|
-
):
|
|
294
|
-
|
|
295
|
-
return this.listByExternalId(externalCustomerId, {}, query);
|
|
296
|
-
}
|
|
297
|
-
return this._client.get(`/customers/external_customer_id/${externalCustomerId}/costs`, {
|
|
274
|
+
query: CostListByExternalIDParams | null | undefined = {},
|
|
275
|
+
options?: RequestOptions,
|
|
276
|
+
): APIPromise<CostListByExternalIDResponse> {
|
|
277
|
+
return this._client.get(path`/customers/external_customer_id/${externalCustomerId}/costs`, {
|
|
298
278
|
query,
|
|
299
279
|
...options,
|
|
300
280
|
});
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '../../../resource';
|
|
4
|
-
import { isRequestOptions } from '../../../core';
|
|
5
|
-
import * as Core from '../../../core';
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
6
4
|
import * as Shared from '../../shared';
|
|
7
5
|
import * as LedgerAPI from './ledger';
|
|
8
6
|
import {
|
|
@@ -32,6 +30,8 @@ import {
|
|
|
32
30
|
TopUpCreateByExternalIDResponse,
|
|
33
31
|
TopUpCreateParams,
|
|
34
32
|
TopUpCreateResponse,
|
|
33
|
+
TopUpDeleteByExternalIDParams,
|
|
34
|
+
TopUpDeleteParams,
|
|
35
35
|
TopUpInvoiceSettings,
|
|
36
36
|
TopUpListByExternalIDParams,
|
|
37
37
|
TopUpListByExternalIDResponse,
|
|
@@ -41,7 +41,9 @@ import {
|
|
|
41
41
|
TopUpListResponsesPage,
|
|
42
42
|
TopUps,
|
|
43
43
|
} from './top-ups';
|
|
44
|
-
import { Page, type PageParams } from '../../../pagination';
|
|
44
|
+
import { Page, type PageParams, PagePromise } from '../../../core/pagination';
|
|
45
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
46
|
+
import { path } from '../../../internal/utils/path';
|
|
45
47
|
|
|
46
48
|
/**
|
|
47
49
|
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.
|
|
@@ -66,22 +68,10 @@ export class Credits extends APIResource {
|
|
|
66
68
|
*/
|
|
67
69
|
list(
|
|
68
70
|
customerId: string,
|
|
69
|
-
query
|
|
70
|
-
options?:
|
|
71
|
-
):
|
|
72
|
-
|
|
73
|
-
customerId: string,
|
|
74
|
-
options?: Core.RequestOptions,
|
|
75
|
-
): Core.PagePromise<CreditListResponsesPage, CreditListResponse>;
|
|
76
|
-
list(
|
|
77
|
-
customerId: string,
|
|
78
|
-
query: CreditListParams | Core.RequestOptions = {},
|
|
79
|
-
options?: Core.RequestOptions,
|
|
80
|
-
): Core.PagePromise<CreditListResponsesPage, CreditListResponse> {
|
|
81
|
-
if (isRequestOptions(query)) {
|
|
82
|
-
return this.list(customerId, {}, query);
|
|
83
|
-
}
|
|
84
|
-
return this._client.getAPIList(`/customers/${customerId}/credits`, CreditListResponsesPage, {
|
|
71
|
+
query: CreditListParams | null | undefined = {},
|
|
72
|
+
options?: RequestOptions,
|
|
73
|
+
): PagePromise<CreditListResponsesPage, CreditListResponse> {
|
|
74
|
+
return this._client.getAPIList(path`/customers/${customerId}/credits`, Page<CreditListResponse>, {
|
|
85
75
|
query,
|
|
86
76
|
...options,
|
|
87
77
|
});
|
|
@@ -101,34 +91,22 @@ export class Credits extends APIResource {
|
|
|
101
91
|
* `effective_date[lte]` query parameters. This filters on when the credit block
|
|
102
92
|
* becomes effective, which may differ from creation time for backdated credits.
|
|
103
93
|
*/
|
|
104
|
-
|
|
105
|
-
externalCustomerId: string,
|
|
106
|
-
query?: CreditListByExternalIDParams,
|
|
107
|
-
options?: Core.RequestOptions,
|
|
108
|
-
): Core.PagePromise<CreditListByExternalIDResponsesPage, CreditListByExternalIDResponse>;
|
|
109
|
-
listByExternalId(
|
|
94
|
+
listByExternalID(
|
|
110
95
|
externalCustomerId: string,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
externalCustomerId: string,
|
|
115
|
-
query: CreditListByExternalIDParams | Core.RequestOptions = {},
|
|
116
|
-
options?: Core.RequestOptions,
|
|
117
|
-
): Core.PagePromise<CreditListByExternalIDResponsesPage, CreditListByExternalIDResponse> {
|
|
118
|
-
if (isRequestOptions(query)) {
|
|
119
|
-
return this.listByExternalId(externalCustomerId, {}, query);
|
|
120
|
-
}
|
|
96
|
+
query: CreditListByExternalIDParams | null | undefined = {},
|
|
97
|
+
options?: RequestOptions,
|
|
98
|
+
): PagePromise<CreditListByExternalIDResponsesPage, CreditListByExternalIDResponse> {
|
|
121
99
|
return this._client.getAPIList(
|
|
122
|
-
`/customers/external_customer_id/${externalCustomerId}/credits`,
|
|
123
|
-
|
|
100
|
+
path`/customers/external_customer_id/${externalCustomerId}/credits`,
|
|
101
|
+
Page<CreditListByExternalIDResponse>,
|
|
124
102
|
{ query, ...options },
|
|
125
103
|
);
|
|
126
104
|
}
|
|
127
105
|
}
|
|
128
106
|
|
|
129
|
-
export
|
|
107
|
+
export type CreditListResponsesPage = Page<CreditListResponse>;
|
|
130
108
|
|
|
131
|
-
export
|
|
109
|
+
export type CreditListByExternalIDResponsesPage = Page<CreditListByExternalIDResponse>;
|
|
132
110
|
|
|
133
111
|
export interface CreditListResponse {
|
|
134
112
|
id: string;
|
|
@@ -137,11 +115,12 @@ export interface CreditListResponse {
|
|
|
137
115
|
|
|
138
116
|
/**
|
|
139
117
|
* How this credit block was created: `allocation` (a subscription's recurring
|
|
140
|
-
* credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
118
|
+
* credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
119
|
+
* `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
141
120
|
* `manual` (a manual credit ledger increment, including credits voided or expired
|
|
142
121
|
* off another block).
|
|
143
122
|
*/
|
|
144
|
-
credit_block_source: 'allocation' | 'top_up' | 'manual';
|
|
123
|
+
credit_block_source: 'allocation' | 'top_up' | 'commitment' | 'manual';
|
|
145
124
|
|
|
146
125
|
effective_date: string | null;
|
|
147
126
|
|
|
@@ -168,6 +147,12 @@ export interface CreditListResponse {
|
|
|
168
147
|
* serialized on prices with the catalog-item attribution of the funding price.
|
|
169
148
|
*/
|
|
170
149
|
credit_allocation?: CreditListResponse.CreditAllocation | null;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* The subscription commitment whose true-up rolled forward into this credit block.
|
|
153
|
+
* Present only when `credit_block_source` is `commitment`.
|
|
154
|
+
*/
|
|
155
|
+
credit_commitment?: CreditListResponse.CreditCommitment | null;
|
|
171
156
|
}
|
|
172
157
|
|
|
173
158
|
export namespace CreditListResponse {
|
|
@@ -231,6 +216,22 @@ export namespace CreditListResponse {
|
|
|
231
216
|
values: Array<string>;
|
|
232
217
|
}
|
|
233
218
|
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* The subscription commitment whose true-up rolled forward into this credit block.
|
|
222
|
+
* Present only when `credit_block_source` is `commitment`.
|
|
223
|
+
*/
|
|
224
|
+
export interface CreditCommitment {
|
|
225
|
+
/**
|
|
226
|
+
* The ID of the subscription commitment this block was rolled forward from.
|
|
227
|
+
*/
|
|
228
|
+
id: string;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* The subscription the commitment belongs to.
|
|
232
|
+
*/
|
|
233
|
+
subscription_id?: string | null;
|
|
234
|
+
}
|
|
234
235
|
}
|
|
235
236
|
|
|
236
237
|
export interface CreditListByExternalIDResponse {
|
|
@@ -240,11 +241,12 @@ export interface CreditListByExternalIDResponse {
|
|
|
240
241
|
|
|
241
242
|
/**
|
|
242
243
|
* How this credit block was created: `allocation` (a subscription's recurring
|
|
243
|
-
* credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
244
|
+
* credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
245
|
+
* `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
244
246
|
* `manual` (a manual credit ledger increment, including credits voided or expired
|
|
245
247
|
* off another block).
|
|
246
248
|
*/
|
|
247
|
-
credit_block_source: 'allocation' | 'top_up' | 'manual';
|
|
249
|
+
credit_block_source: 'allocation' | 'top_up' | 'commitment' | 'manual';
|
|
248
250
|
|
|
249
251
|
effective_date: string | null;
|
|
250
252
|
|
|
@@ -271,6 +273,12 @@ export interface CreditListByExternalIDResponse {
|
|
|
271
273
|
* serialized on prices with the catalog-item attribution of the funding price.
|
|
272
274
|
*/
|
|
273
275
|
credit_allocation?: CreditListByExternalIDResponse.CreditAllocation | null;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* The subscription commitment whose true-up rolled forward into this credit block.
|
|
279
|
+
* Present only when `credit_block_source` is `commitment`.
|
|
280
|
+
*/
|
|
281
|
+
credit_commitment?: CreditListByExternalIDResponse.CreditCommitment | null;
|
|
274
282
|
}
|
|
275
283
|
|
|
276
284
|
export namespace CreditListByExternalIDResponse {
|
|
@@ -334,6 +342,22 @@ export namespace CreditListByExternalIDResponse {
|
|
|
334
342
|
values: Array<string>;
|
|
335
343
|
}
|
|
336
344
|
}
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* The subscription commitment whose true-up rolled forward into this credit block.
|
|
348
|
+
* Present only when `credit_block_source` is `commitment`.
|
|
349
|
+
*/
|
|
350
|
+
export interface CreditCommitment {
|
|
351
|
+
/**
|
|
352
|
+
* The ID of the subscription commitment this block was rolled forward from.
|
|
353
|
+
*/
|
|
354
|
+
id: string;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* The subscription the commitment belongs to.
|
|
358
|
+
*/
|
|
359
|
+
subscription_id?: string | null;
|
|
360
|
+
}
|
|
337
361
|
}
|
|
338
362
|
|
|
339
363
|
export interface CreditListParams extends PageParams {
|
|
@@ -378,21 +402,15 @@ export interface CreditListByExternalIDParams extends PageParams {
|
|
|
378
402
|
include_all_blocks?: boolean;
|
|
379
403
|
}
|
|
380
404
|
|
|
381
|
-
Credits.CreditListResponsesPage = CreditListResponsesPage;
|
|
382
|
-
Credits.CreditListByExternalIDResponsesPage = CreditListByExternalIDResponsesPage;
|
|
383
405
|
Credits.Ledger = Ledger;
|
|
384
|
-
Credits.LedgerListResponsesPage = LedgerListResponsesPage;
|
|
385
|
-
Credits.LedgerListByExternalIDResponsesPage = LedgerListByExternalIDResponsesPage;
|
|
386
406
|
Credits.TopUps = TopUps;
|
|
387
|
-
Credits.TopUpListResponsesPage = TopUpListResponsesPage;
|
|
388
|
-
Credits.TopUpListByExternalIDResponsesPage = TopUpListByExternalIDResponsesPage;
|
|
389
407
|
|
|
390
408
|
export declare namespace Credits {
|
|
391
409
|
export {
|
|
392
410
|
type CreditListResponse as CreditListResponse,
|
|
393
411
|
type CreditListByExternalIDResponse as CreditListByExternalIDResponse,
|
|
394
|
-
CreditListResponsesPage as CreditListResponsesPage,
|
|
395
|
-
CreditListByExternalIDResponsesPage as CreditListByExternalIDResponsesPage,
|
|
412
|
+
type CreditListResponsesPage as CreditListResponsesPage,
|
|
413
|
+
type CreditListByExternalIDResponsesPage as CreditListByExternalIDResponsesPage,
|
|
396
414
|
type CreditListParams as CreditListParams,
|
|
397
415
|
type CreditListByExternalIDParams as CreditListByExternalIDParams,
|
|
398
416
|
};
|
|
@@ -411,8 +429,8 @@ export declare namespace Credits {
|
|
|
411
429
|
type LedgerCreateEntryResponse as LedgerCreateEntryResponse,
|
|
412
430
|
type LedgerCreateEntryByExternalIDResponse as LedgerCreateEntryByExternalIDResponse,
|
|
413
431
|
type LedgerListByExternalIDResponse as LedgerListByExternalIDResponse,
|
|
414
|
-
LedgerListResponsesPage as LedgerListResponsesPage,
|
|
415
|
-
LedgerListByExternalIDResponsesPage as LedgerListByExternalIDResponsesPage,
|
|
432
|
+
type LedgerListResponsesPage as LedgerListResponsesPage,
|
|
433
|
+
type LedgerListByExternalIDResponsesPage as LedgerListByExternalIDResponsesPage,
|
|
416
434
|
type LedgerListParams as LedgerListParams,
|
|
417
435
|
type LedgerCreateEntryParams as LedgerCreateEntryParams,
|
|
418
436
|
type LedgerCreateEntryByExternalIDParams as LedgerCreateEntryByExternalIDParams,
|
|
@@ -426,11 +444,13 @@ export declare namespace Credits {
|
|
|
426
444
|
type TopUpListResponse as TopUpListResponse,
|
|
427
445
|
type TopUpCreateByExternalIDResponse as TopUpCreateByExternalIDResponse,
|
|
428
446
|
type TopUpListByExternalIDResponse as TopUpListByExternalIDResponse,
|
|
429
|
-
TopUpListResponsesPage as TopUpListResponsesPage,
|
|
430
|
-
TopUpListByExternalIDResponsesPage as TopUpListByExternalIDResponsesPage,
|
|
447
|
+
type TopUpListResponsesPage as TopUpListResponsesPage,
|
|
448
|
+
type TopUpListByExternalIDResponsesPage as TopUpListByExternalIDResponsesPage,
|
|
431
449
|
type TopUpCreateParams as TopUpCreateParams,
|
|
432
450
|
type TopUpListParams as TopUpListParams,
|
|
451
|
+
type TopUpDeleteParams as TopUpDeleteParams,
|
|
433
452
|
type TopUpCreateByExternalIDParams as TopUpCreateByExternalIDParams,
|
|
453
|
+
type TopUpDeleteByExternalIDParams as TopUpDeleteByExternalIDParams,
|
|
434
454
|
type TopUpListByExternalIDParams as TopUpListByExternalIDParams,
|
|
435
455
|
};
|
|
436
456
|
}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
|
-
CreditListResponsesPage,
|
|
5
|
-
CreditListByExternalIDResponsesPage,
|
|
6
4
|
Credits,
|
|
7
5
|
type CreditListResponse,
|
|
8
6
|
type CreditListByExternalIDResponse,
|
|
9
7
|
type CreditListParams,
|
|
10
8
|
type CreditListByExternalIDParams,
|
|
9
|
+
type CreditListResponsesPage,
|
|
10
|
+
type CreditListByExternalIDResponsesPage,
|
|
11
11
|
} from './credits';
|
|
12
12
|
export {
|
|
13
|
-
LedgerListResponsesPage,
|
|
14
|
-
LedgerListByExternalIDResponsesPage,
|
|
15
13
|
Ledger,
|
|
16
14
|
type AffectedBlock,
|
|
17
15
|
type AmendmentLedgerEntry,
|
|
@@ -29,10 +27,10 @@ export {
|
|
|
29
27
|
type LedgerCreateEntryParams,
|
|
30
28
|
type LedgerCreateEntryByExternalIDParams,
|
|
31
29
|
type LedgerListByExternalIDParams,
|
|
30
|
+
type LedgerListResponsesPage,
|
|
31
|
+
type LedgerListByExternalIDResponsesPage,
|
|
32
32
|
} from './ledger';
|
|
33
33
|
export {
|
|
34
|
-
TopUpListResponsesPage,
|
|
35
|
-
TopUpListByExternalIDResponsesPage,
|
|
36
34
|
TopUps,
|
|
37
35
|
type TopUpInvoiceSettings,
|
|
38
36
|
type TopUpCreateResponse,
|
|
@@ -41,6 +39,10 @@ export {
|
|
|
41
39
|
type TopUpListByExternalIDResponse,
|
|
42
40
|
type TopUpCreateParams,
|
|
43
41
|
type TopUpListParams,
|
|
42
|
+
type TopUpDeleteParams,
|
|
44
43
|
type TopUpCreateByExternalIDParams,
|
|
44
|
+
type TopUpDeleteByExternalIDParams,
|
|
45
45
|
type TopUpListByExternalIDParams,
|
|
46
|
+
type TopUpListResponsesPage,
|
|
47
|
+
type TopUpListByExternalIDResponsesPage,
|
|
46
48
|
} from './top-ups';
|