orb-billing 5.76.0 → 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 +23 -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 +6 -5
- 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 +11 -15
- 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 +10 -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 +12 -12
- 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 +26 -52
- 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 +16 -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,6 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../../resource.mjs";
|
|
3
|
-
import {
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
4
4
|
/**
|
|
5
5
|
* A customer is a buyer of your products, and the other party to the billing relationship.
|
|
6
6
|
*
|
|
@@ -18,17 +18,249 @@ import { isRequestOptions } from "../../core.mjs";
|
|
|
18
18
|
* information on what this timezone parameter influences within Orb.
|
|
19
19
|
*/
|
|
20
20
|
export class Costs extends APIResource {
|
|
21
|
+
/**
|
|
22
|
+
* This endpoint is used to fetch a day-by-day snapshot of a customer's costs in
|
|
23
|
+
* Orb, calculated by applying pricing information to the underlying usage (see the
|
|
24
|
+
* [subscription usage endpoint](/api-reference/subscription/fetch-subscription-usage)
|
|
25
|
+
* to fetch usage per metric, in usage units rather than a currency).
|
|
26
|
+
*
|
|
27
|
+
* This endpoint can be leveraged for internal tooling and to provide a more
|
|
28
|
+
* transparent billing experience for your end users:
|
|
29
|
+
*
|
|
30
|
+
* 1. Understand the cost breakdown per line item historically and in real-time for
|
|
31
|
+
* the current billing period.
|
|
32
|
+
* 2. Provide customer visibility into how different services are contributing to
|
|
33
|
+
* the overall invoice with a per-day timeseries (as compared to the
|
|
34
|
+
* [upcoming invoice](/api-reference/invoice/fetch-upcoming-invoice) resource,
|
|
35
|
+
* which represents a snapshot for the current period).
|
|
36
|
+
* 3. Assess how minimums and discounts affect your customers by teasing apart
|
|
37
|
+
* costs directly as a result of usage, as opposed to minimums and discounts at
|
|
38
|
+
* the plan and price level.
|
|
39
|
+
* 4. Gain insight into key customer health metrics, such as the percent
|
|
40
|
+
* utilization of the minimum committed spend.
|
|
41
|
+
*
|
|
42
|
+
* ## Fetching subscriptions
|
|
43
|
+
*
|
|
44
|
+
* By default, this endpoint fetches the currently active subscription for the
|
|
45
|
+
* customer, and returns cost information for the subscription's current billing
|
|
46
|
+
* period, broken down by each participating price. If there are no currently
|
|
47
|
+
* active subscriptions, this will instead default to the most recently active
|
|
48
|
+
* subscription or return an empty series if none are found. For example, if your
|
|
49
|
+
* plan charges for compute hours, job runs, and data syncs, then this endpoint
|
|
50
|
+
* would provide a daily breakdown of your customer's cost for each of those axes.
|
|
51
|
+
*
|
|
52
|
+
* If timeframe bounds are specified, Orb fetches all subscriptions that were
|
|
53
|
+
* active in that timeframe. If two subscriptions overlap on a single day, costs
|
|
54
|
+
* from each price will be summed, and prices for both subscriptions will be
|
|
55
|
+
* included in the breakdown.
|
|
56
|
+
*
|
|
57
|
+
* ## Prepaid plans
|
|
58
|
+
*
|
|
59
|
+
* For plans that include prices which deduct credits rather than accrue in-arrears
|
|
60
|
+
* charges in a billable currency, this endpoint will return the total deduction
|
|
61
|
+
* amount, in credits, for the specified timeframe.
|
|
62
|
+
*
|
|
63
|
+
* ## Cumulative subtotals and totals
|
|
64
|
+
*
|
|
65
|
+
* Since the subtotal and total must factor in any billing-period level discounts
|
|
66
|
+
* and minimums, it's most meaningful to consider costs relative to the start of
|
|
67
|
+
* the subscription's billing period. As a result, by default this endpoint returns
|
|
68
|
+
* cumulative totals since the beginning of the billing period. In particular, the
|
|
69
|
+
* `timeframe_start` of a returned timeframe window is _always_ the beginning of
|
|
70
|
+
* the billing period and `timeframe_end` is incremented one day at a time to build
|
|
71
|
+
* the result.
|
|
72
|
+
*
|
|
73
|
+
* A customer that uses a few API calls a day but has a minimum commitment might
|
|
74
|
+
* exhibit the following pattern for their subtotal and total in the first few days
|
|
75
|
+
* of the month. Here, we assume that each API call is \$2.50, the customer's plan
|
|
76
|
+
* has a monthly minimum of \$50 for this price, and that the subscription's
|
|
77
|
+
* billing period bounds are aligned to the first of the month:
|
|
78
|
+
*
|
|
79
|
+
* | timeframe_start | timeframe_end | Cumulative usage | Subtotal | Total (incl. commitment) |
|
|
80
|
+
* | --------------- | ------------- | ---------------- | -------- | ------------------------ |
|
|
81
|
+
* | 2023-02-01 | 2023-02-02 | 9 | \$22.50 | \$50.00 |
|
|
82
|
+
* | 2023-02-01 | 2023-02-03 | 19 | \$47.50 | \$50.00 |
|
|
83
|
+
* | 2023-02-01 | 2023-02-04 | 20 | \$50.00 | \$50.00 |
|
|
84
|
+
* | 2023-02-01 | 2023-02-05 | 28 | \$70.00 | \$70.00 |
|
|
85
|
+
* | 2023-02-01 | 2023-02-06 | 36 | \$90.00 | \$90.00 |
|
|
86
|
+
*
|
|
87
|
+
* ### Periodic values
|
|
88
|
+
*
|
|
89
|
+
* When the query parameter `view_mode=periodic` is specified, Orb will return an
|
|
90
|
+
* incremental day-by-day view of costs. In this case, there will always be a
|
|
91
|
+
* one-day difference between `timeframe_start` and `timeframe_end` for the
|
|
92
|
+
* timeframes returned. This is a transform on top of the cumulative costs,
|
|
93
|
+
* calculated by taking the difference of each timeframe with the last. Note that
|
|
94
|
+
* in the above example, the `Total` value would be 0 for the second two data
|
|
95
|
+
* points, since the minimum commitment has not yet been hit and each day is not
|
|
96
|
+
* contributing anything to the total cost.
|
|
97
|
+
*
|
|
98
|
+
* ## Timeframe bounds
|
|
99
|
+
*
|
|
100
|
+
* For an active subscription, both timeframes should be specified in the request.
|
|
101
|
+
* If a subscription starts or ends within the timeframe, the response will only
|
|
102
|
+
* include windows where the subscription is active. If a subscription has ended,
|
|
103
|
+
* no timeframe bounds need to be specified and the response will default to the
|
|
104
|
+
* billing period when the subscription was last active.
|
|
105
|
+
*
|
|
106
|
+
* As noted above, `timeframe_start` for a given cumulative datapoint is always the
|
|
107
|
+
* beginning of the billing period, and `timeframe_end` is incremented one day at a
|
|
108
|
+
* time to construct the response. When a timeframe is passed in that is not
|
|
109
|
+
* aligned to the current subscription's billing period, the response will contain
|
|
110
|
+
* cumulative totals from multiple billing periods.
|
|
111
|
+
*
|
|
112
|
+
* Suppose the queried customer has a subscription aligned to the 15th of every
|
|
113
|
+
* month. If this endpoint is queried with the date range `2023-06-01` -
|
|
114
|
+
* `2023-07-01`, the first data point will represent about half a billing period's
|
|
115
|
+
* worth of costs, accounting for accruals from the start of the billing period and
|
|
116
|
+
* inclusive of the first day of the timeframe
|
|
117
|
+
* (`timeframe_start = 2023-05-15 00:00:00`, `timeframe_end = 2023-06-02 00:00:00`)
|
|
118
|
+
*
|
|
119
|
+
* | datapoint index | timeframe_start | timeframe_end |
|
|
120
|
+
* | --------------- | --------------- | ------------- |
|
|
121
|
+
* | 0 | 2023-05-15 | 2023-06-02 |
|
|
122
|
+
* | 1 | 2023-05-15 | 2023-06-03 |
|
|
123
|
+
* | 2 | ... | ... |
|
|
124
|
+
* | 3 | 2023-05-15 | 2023-06-14 |
|
|
125
|
+
* | 4 | 2023-06-15 | 2023-06-16 |
|
|
126
|
+
* | 5 | 2023-06-15 | 2023-06-17 |
|
|
127
|
+
* | 6 | ... | ... |
|
|
128
|
+
* | 7 | 2023-06-15 | 2023-07-01 |
|
|
129
|
+
*
|
|
130
|
+
* You can see this sliced timeframe visualized
|
|
131
|
+
* [here](https://i.imgur.com/TXhYgme.png).
|
|
132
|
+
*
|
|
133
|
+
* ### Matrix prices
|
|
134
|
+
*
|
|
135
|
+
* When a price uses matrix pricing, it's important to view costs grouped by those
|
|
136
|
+
* matrix dimensions. Orb will return `price_groups` with the `grouping_key` and
|
|
137
|
+
* `secondary_grouping_key` based on the matrix price definition, for each
|
|
138
|
+
* `grouping_value` and `secondary_grouping_value` available.
|
|
139
|
+
*/
|
|
21
140
|
list(customerId, query = {}, options) {
|
|
22
|
-
|
|
23
|
-
return this.list(customerId, {}, query);
|
|
24
|
-
}
|
|
25
|
-
return this._client.get(`/customers/${customerId}/costs`, { query, ...options });
|
|
141
|
+
return this._client.get(path `/customers/${customerId}/costs`, { query, ...options });
|
|
26
142
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
143
|
+
/**
|
|
144
|
+
* This endpoint is used to fetch a day-by-day snapshot of a customer's costs in
|
|
145
|
+
* Orb, calculated by applying pricing information to the underlying usage (see the
|
|
146
|
+
* [subscription usage endpoint](/api-reference/subscription/fetch-subscription-usage)
|
|
147
|
+
* to fetch usage per metric, in usage units rather than a currency).
|
|
148
|
+
*
|
|
149
|
+
* This endpoint can be leveraged for internal tooling and to provide a more
|
|
150
|
+
* transparent billing experience for your end users:
|
|
151
|
+
*
|
|
152
|
+
* 1. Understand the cost breakdown per line item historically and in real-time for
|
|
153
|
+
* the current billing period.
|
|
154
|
+
* 2. Provide customer visibility into how different services are contributing to
|
|
155
|
+
* the overall invoice with a per-day timeseries (as compared to the
|
|
156
|
+
* [upcoming invoice](/api-reference/invoice/fetch-upcoming-invoice) resource,
|
|
157
|
+
* which represents a snapshot for the current period).
|
|
158
|
+
* 3. Assess how minimums and discounts affect your customers by teasing apart
|
|
159
|
+
* costs directly as a result of usage, as opposed to minimums and discounts at
|
|
160
|
+
* the plan and price level.
|
|
161
|
+
* 4. Gain insight into key customer health metrics, such as the percent
|
|
162
|
+
* utilization of the minimum committed spend.
|
|
163
|
+
*
|
|
164
|
+
* ## Fetching subscriptions
|
|
165
|
+
*
|
|
166
|
+
* By default, this endpoint fetches the currently active subscription for the
|
|
167
|
+
* customer, and returns cost information for the subscription's current billing
|
|
168
|
+
* period, broken down by each participating price. If there are no currently
|
|
169
|
+
* active subscriptions, this will instead default to the most recently active
|
|
170
|
+
* subscription or return an empty series if none are found. For example, if your
|
|
171
|
+
* plan charges for compute hours, job runs, and data syncs, then this endpoint
|
|
172
|
+
* would provide a daily breakdown of your customer's cost for each of those axes.
|
|
173
|
+
*
|
|
174
|
+
* If timeframe bounds are specified, Orb fetches all subscriptions that were
|
|
175
|
+
* active in that timeframe. If two subscriptions overlap on a single day, costs
|
|
176
|
+
* from each price will be summed, and prices for both subscriptions will be
|
|
177
|
+
* included in the breakdown.
|
|
178
|
+
*
|
|
179
|
+
* ## Prepaid plans
|
|
180
|
+
*
|
|
181
|
+
* For plans that include prices which deduct credits rather than accrue in-arrears
|
|
182
|
+
* charges in a billable currency, this endpoint will return the total deduction
|
|
183
|
+
* amount, in credits, for the specified timeframe.
|
|
184
|
+
*
|
|
185
|
+
* ## Cumulative subtotals and totals
|
|
186
|
+
*
|
|
187
|
+
* Since the subtotal and total must factor in any billing-period level discounts
|
|
188
|
+
* and minimums, it's most meaningful to consider costs relative to the start of
|
|
189
|
+
* the subscription's billing period. As a result, by default this endpoint returns
|
|
190
|
+
* cumulative totals since the beginning of the billing period. In particular, the
|
|
191
|
+
* `timeframe_start` of a returned timeframe window is _always_ the beginning of
|
|
192
|
+
* the billing period and `timeframe_end` is incremented one day at a time to build
|
|
193
|
+
* the result.
|
|
194
|
+
*
|
|
195
|
+
* A customer that uses a few API calls a day but has a minimum commitment might
|
|
196
|
+
* exhibit the following pattern for their subtotal and total in the first few days
|
|
197
|
+
* of the month. Here, we assume that each API call is \$2.50, the customer's plan
|
|
198
|
+
* has a monthly minimum of \$50 for this price, and that the subscription's
|
|
199
|
+
* billing period bounds are aligned to the first of the month:
|
|
200
|
+
*
|
|
201
|
+
* | timeframe_start | timeframe_end | Cumulative usage | Subtotal | Total (incl. commitment) |
|
|
202
|
+
* | --------------- | ------------- | ---------------- | -------- | ------------------------ |
|
|
203
|
+
* | 2023-02-01 | 2023-02-02 | 9 | \$22.50 | \$50.00 |
|
|
204
|
+
* | 2023-02-01 | 2023-02-03 | 19 | \$47.50 | \$50.00 |
|
|
205
|
+
* | 2023-02-01 | 2023-02-04 | 20 | \$50.00 | \$50.00 |
|
|
206
|
+
* | 2023-02-01 | 2023-02-05 | 28 | \$70.00 | \$70.00 |
|
|
207
|
+
* | 2023-02-01 | 2023-02-06 | 36 | \$90.00 | \$90.00 |
|
|
208
|
+
*
|
|
209
|
+
* ### Periodic values
|
|
210
|
+
*
|
|
211
|
+
* When the query parameter `view_mode=periodic` is specified, Orb will return an
|
|
212
|
+
* incremental day-by-day view of costs. In this case, there will always be a
|
|
213
|
+
* one-day difference between `timeframe_start` and `timeframe_end` for the
|
|
214
|
+
* timeframes returned. This is a transform on top of the cumulative costs,
|
|
215
|
+
* calculated by taking the difference of each timeframe with the last. Note that
|
|
216
|
+
* in the above example, the `Total` value would be 0 for the second two data
|
|
217
|
+
* points, since the minimum commitment has not yet been hit and each day is not
|
|
218
|
+
* contributing anything to the total cost.
|
|
219
|
+
*
|
|
220
|
+
* ## Timeframe bounds
|
|
221
|
+
*
|
|
222
|
+
* For an active subscription, both timeframes should be specified in the request.
|
|
223
|
+
* If a subscription starts or ends within the timeframe, the response will only
|
|
224
|
+
* include windows where the subscription is active. If a subscription has ended,
|
|
225
|
+
* no timeframe bounds need to be specified and the response will default to the
|
|
226
|
+
* billing period when the subscription was last active.
|
|
227
|
+
*
|
|
228
|
+
* As noted above, `timeframe_start` for a given cumulative datapoint is always the
|
|
229
|
+
* beginning of the billing period, and `timeframe_end` is incremented one day at a
|
|
230
|
+
* time to construct the response. When a timeframe is passed in that is not
|
|
231
|
+
* aligned to the current subscription's billing period, the response will contain
|
|
232
|
+
* cumulative totals from multiple billing periods.
|
|
233
|
+
*
|
|
234
|
+
* Suppose the queried customer has a subscription aligned to the 15th of every
|
|
235
|
+
* month. If this endpoint is queried with the date range `2023-06-01` -
|
|
236
|
+
* `2023-07-01`, the first data point will represent about half a billing period's
|
|
237
|
+
* worth of costs, accounting for accruals from the start of the billing period and
|
|
238
|
+
* inclusive of the first day of the timeframe
|
|
239
|
+
* (`timeframe_start = 2023-05-15 00:00:00`, `timeframe_end = 2023-06-02 00:00:00`)
|
|
240
|
+
*
|
|
241
|
+
* | datapoint index | timeframe_start | timeframe_end |
|
|
242
|
+
* | --------------- | --------------- | ------------- |
|
|
243
|
+
* | 0 | 2023-05-15 | 2023-06-02 |
|
|
244
|
+
* | 1 | 2023-05-15 | 2023-06-03 |
|
|
245
|
+
* | 2 | ... | ... |
|
|
246
|
+
* | 3 | 2023-05-15 | 2023-06-14 |
|
|
247
|
+
* | 4 | 2023-06-15 | 2023-06-16 |
|
|
248
|
+
* | 5 | 2023-06-15 | 2023-06-17 |
|
|
249
|
+
* | 6 | ... | ... |
|
|
250
|
+
* | 7 | 2023-06-15 | 2023-07-01 |
|
|
251
|
+
*
|
|
252
|
+
* You can see this sliced timeframe visualized
|
|
253
|
+
* [here](https://i.imgur.com/TXhYgme.png).
|
|
254
|
+
*
|
|
255
|
+
* ### Matrix prices
|
|
256
|
+
*
|
|
257
|
+
* When a price uses matrix pricing, it's important to view costs grouped by those
|
|
258
|
+
* matrix dimensions. Orb will return `price_groups` with the `grouping_key` and
|
|
259
|
+
* `secondary_grouping_key` based on the matrix price definition, for each
|
|
260
|
+
* `grouping_value` and `secondary_grouping_value` available.
|
|
261
|
+
*/
|
|
262
|
+
listByExternalID(externalCustomerId, query = {}, options) {
|
|
263
|
+
return this._client.get(path `/customers/external_customer_id/${externalCustomerId}/costs`, {
|
|
32
264
|
query,
|
|
33
265
|
...options,
|
|
34
266
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"costs.mjs","sourceRoot":"","sources":["../../src/resources/customers/costs.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"costs.mjs","sourceRoot":"","sources":["../../src/resources/customers/costs.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsHG;IACH,IAAI,CACF,UAAkB,EAClB,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,cAAc,UAAU,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsHG;IACH,gBAAgB,CACd,kBAA0B,EAC1B,QAAuD,EAAE,EACzD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,mCAAmC,kBAAkB,QAAQ,EAAE;YACzF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import * as Shared from "../../shared.mjs";
|
|
3
|
+
import * as LedgerAPI from "./ledger.mjs";
|
|
4
|
+
import { AffectedBlock, AmendmentLedgerEntry, CreditBlockExpiryLedgerEntry, DecrementLedgerEntry, ExpirationChangeLedgerEntry, IncrementLedgerEntry, Ledger, LedgerCreateEntryByExternalIDParams, LedgerCreateEntryByExternalIDResponse, LedgerCreateEntryParams, LedgerCreateEntryResponse, LedgerListByExternalIDParams, LedgerListByExternalIDResponse, LedgerListByExternalIDResponsesPage, LedgerListParams, LedgerListResponse, LedgerListResponsesPage, VoidInitiatedLedgerEntry, VoidLedgerEntry } from "./ledger.mjs";
|
|
5
|
+
import * as TopUpsAPI from "./top-ups.mjs";
|
|
6
|
+
import { TopUpCreateByExternalIDParams, TopUpCreateByExternalIDResponse, TopUpCreateParams, TopUpCreateResponse, TopUpDeleteByExternalIDParams, TopUpDeleteParams, TopUpInvoiceSettings, TopUpListByExternalIDParams, TopUpListByExternalIDResponse, TopUpListByExternalIDResponsesPage, TopUpListParams, TopUpListResponse, TopUpListResponsesPage, TopUps } from "./top-ups.mjs";
|
|
7
|
+
import { Page, type PageParams, PagePromise } from "../../../core/pagination.mjs";
|
|
8
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
9
|
+
/**
|
|
10
|
+
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.
|
|
11
|
+
*/
|
|
12
|
+
export declare class Credits extends APIResource {
|
|
13
|
+
ledger: LedgerAPI.Ledger;
|
|
14
|
+
topUps: TopUpsAPI.TopUps;
|
|
15
|
+
/**
|
|
16
|
+
* Returns a paginated list of unexpired, non-zero credit blocks for a customer.
|
|
17
|
+
*
|
|
18
|
+
* If `include_all_blocks` is set to `true`, all credit blocks (including expired
|
|
19
|
+
* and depleted blocks) will be included in the response.
|
|
20
|
+
*
|
|
21
|
+
* Note that `currency` defaults to credits if not specified. To use a real world
|
|
22
|
+
* currency, set `currency` to an ISO 4217 string.
|
|
23
|
+
*
|
|
24
|
+
* Results can be filtered by the block's `effective_date` using the
|
|
25
|
+
* `effective_date[gte]`, `effective_date[gt]`, `effective_date[lt]`, and
|
|
26
|
+
* `effective_date[lte]` query parameters. This filters on when the credit block
|
|
27
|
+
* becomes effective, which may differ from creation time for backdated credits.
|
|
28
|
+
*/
|
|
29
|
+
list(customerId: string, query?: CreditListParams | null | undefined, options?: RequestOptions): PagePromise<CreditListResponsesPage, CreditListResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Returns a paginated list of unexpired, non-zero credit blocks for a customer.
|
|
32
|
+
*
|
|
33
|
+
* If `include_all_blocks` is set to `true`, all credit blocks (including expired
|
|
34
|
+
* and depleted blocks) will be included in the response.
|
|
35
|
+
*
|
|
36
|
+
* Note that `currency` defaults to credits if not specified. To use a real world
|
|
37
|
+
* currency, set `currency` to an ISO 4217 string.
|
|
38
|
+
*
|
|
39
|
+
* Results can be filtered by the block's `effective_date` using the
|
|
40
|
+
* `effective_date[gte]`, `effective_date[gt]`, `effective_date[lt]`, and
|
|
41
|
+
* `effective_date[lte]` query parameters. This filters on when the credit block
|
|
42
|
+
* becomes effective, which may differ from creation time for backdated credits.
|
|
43
|
+
*/
|
|
44
|
+
listByExternalID(externalCustomerId: string, query?: CreditListByExternalIDParams | null | undefined, options?: RequestOptions): PagePromise<CreditListByExternalIDResponsesPage, CreditListByExternalIDResponse>;
|
|
45
|
+
}
|
|
46
|
+
export type CreditListResponsesPage = Page<CreditListResponse>;
|
|
47
|
+
export type CreditListByExternalIDResponsesPage = Page<CreditListByExternalIDResponse>;
|
|
48
|
+
export interface CreditListResponse {
|
|
49
|
+
id: string;
|
|
50
|
+
balance: number;
|
|
51
|
+
/**
|
|
52
|
+
* How this credit block was created: `allocation` (a subscription's recurring
|
|
53
|
+
* credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
54
|
+
* `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
55
|
+
* `manual` (a manual credit ledger increment, including credits voided or expired
|
|
56
|
+
* off another block).
|
|
57
|
+
*/
|
|
58
|
+
credit_block_source: 'allocation' | 'top_up' | 'commitment' | 'manual';
|
|
59
|
+
effective_date: string | null;
|
|
60
|
+
expiry_date: string | null;
|
|
61
|
+
filters: Array<CreditListResponse.Filter>;
|
|
62
|
+
maximum_initial_balance: number | null;
|
|
63
|
+
/**
|
|
64
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
65
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
66
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
67
|
+
* `null`.
|
|
68
|
+
*/
|
|
69
|
+
metadata: {
|
|
70
|
+
[key: string]: string;
|
|
71
|
+
};
|
|
72
|
+
per_unit_cost_basis: string | null;
|
|
73
|
+
status: 'active' | 'pending_payment';
|
|
74
|
+
/**
|
|
75
|
+
* The credit allocation that funded a block. Extends the allocation resource
|
|
76
|
+
* serialized on prices with the catalog-item attribution of the funding price.
|
|
77
|
+
*/
|
|
78
|
+
credit_allocation?: CreditListResponse.CreditAllocation | null;
|
|
79
|
+
/**
|
|
80
|
+
* The subscription commitment whose true-up rolled forward into this credit block.
|
|
81
|
+
* Present only when `credit_block_source` is `commitment`.
|
|
82
|
+
*/
|
|
83
|
+
credit_commitment?: CreditListResponse.CreditCommitment | null;
|
|
84
|
+
}
|
|
85
|
+
export declare namespace CreditListResponse {
|
|
86
|
+
/**
|
|
87
|
+
* A PriceFilter that only allows item_id field for block filters.
|
|
88
|
+
*/
|
|
89
|
+
interface Filter {
|
|
90
|
+
/**
|
|
91
|
+
* The property of the price the block applies to. Only item_id is supported.
|
|
92
|
+
*/
|
|
93
|
+
field: 'item_id';
|
|
94
|
+
/**
|
|
95
|
+
* Should prices that match the filter be included or excluded.
|
|
96
|
+
*/
|
|
97
|
+
operator: 'includes' | 'excludes';
|
|
98
|
+
/**
|
|
99
|
+
* The IDs or values that match this filter.
|
|
100
|
+
*/
|
|
101
|
+
values: Array<string>;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* The credit allocation that funded a block. Extends the allocation resource
|
|
105
|
+
* serialized on prices with the catalog-item attribution of the funding price.
|
|
106
|
+
*/
|
|
107
|
+
interface CreditAllocation {
|
|
108
|
+
allows_rollover: boolean;
|
|
109
|
+
currency: string;
|
|
110
|
+
custom_expiration: Shared.CustomExpiration | null;
|
|
111
|
+
/**
|
|
112
|
+
* The ID of the catalog item this block was allocated from, derived from the
|
|
113
|
+
* allocation's price.
|
|
114
|
+
*/
|
|
115
|
+
item_id: string;
|
|
116
|
+
filters?: Array<CreditAllocation.Filter>;
|
|
117
|
+
license_type_id?: string | null;
|
|
118
|
+
}
|
|
119
|
+
namespace CreditAllocation {
|
|
120
|
+
interface Filter {
|
|
121
|
+
/**
|
|
122
|
+
* The property of the price to filter on.
|
|
123
|
+
*/
|
|
124
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
125
|
+
/**
|
|
126
|
+
* Should prices that match the filter be included or excluded.
|
|
127
|
+
*/
|
|
128
|
+
operator: 'includes' | 'excludes';
|
|
129
|
+
/**
|
|
130
|
+
* The IDs or values that match this filter.
|
|
131
|
+
*/
|
|
132
|
+
values: Array<string>;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* The subscription commitment whose true-up rolled forward into this credit block.
|
|
137
|
+
* Present only when `credit_block_source` is `commitment`.
|
|
138
|
+
*/
|
|
139
|
+
interface CreditCommitment {
|
|
140
|
+
/**
|
|
141
|
+
* The ID of the subscription commitment this block was rolled forward from.
|
|
142
|
+
*/
|
|
143
|
+
id: string;
|
|
144
|
+
/**
|
|
145
|
+
* The subscription the commitment belongs to.
|
|
146
|
+
*/
|
|
147
|
+
subscription_id?: string | null;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
export interface CreditListByExternalIDResponse {
|
|
151
|
+
id: string;
|
|
152
|
+
balance: number;
|
|
153
|
+
/**
|
|
154
|
+
* How this credit block was created: `allocation` (a subscription's recurring
|
|
155
|
+
* credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
156
|
+
* `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
157
|
+
* `manual` (a manual credit ledger increment, including credits voided or expired
|
|
158
|
+
* off another block).
|
|
159
|
+
*/
|
|
160
|
+
credit_block_source: 'allocation' | 'top_up' | 'commitment' | 'manual';
|
|
161
|
+
effective_date: string | null;
|
|
162
|
+
expiry_date: string | null;
|
|
163
|
+
filters: Array<CreditListByExternalIDResponse.Filter>;
|
|
164
|
+
maximum_initial_balance: number | null;
|
|
165
|
+
/**
|
|
166
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
167
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
168
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
169
|
+
* `null`.
|
|
170
|
+
*/
|
|
171
|
+
metadata: {
|
|
172
|
+
[key: string]: string;
|
|
173
|
+
};
|
|
174
|
+
per_unit_cost_basis: string | null;
|
|
175
|
+
status: 'active' | 'pending_payment';
|
|
176
|
+
/**
|
|
177
|
+
* The credit allocation that funded a block. Extends the allocation resource
|
|
178
|
+
* serialized on prices with the catalog-item attribution of the funding price.
|
|
179
|
+
*/
|
|
180
|
+
credit_allocation?: CreditListByExternalIDResponse.CreditAllocation | null;
|
|
181
|
+
/**
|
|
182
|
+
* The subscription commitment whose true-up rolled forward into this credit block.
|
|
183
|
+
* Present only when `credit_block_source` is `commitment`.
|
|
184
|
+
*/
|
|
185
|
+
credit_commitment?: CreditListByExternalIDResponse.CreditCommitment | null;
|
|
186
|
+
}
|
|
187
|
+
export declare namespace CreditListByExternalIDResponse {
|
|
188
|
+
/**
|
|
189
|
+
* A PriceFilter that only allows item_id field for block filters.
|
|
190
|
+
*/
|
|
191
|
+
interface Filter {
|
|
192
|
+
/**
|
|
193
|
+
* The property of the price the block applies to. Only item_id is supported.
|
|
194
|
+
*/
|
|
195
|
+
field: 'item_id';
|
|
196
|
+
/**
|
|
197
|
+
* Should prices that match the filter be included or excluded.
|
|
198
|
+
*/
|
|
199
|
+
operator: 'includes' | 'excludes';
|
|
200
|
+
/**
|
|
201
|
+
* The IDs or values that match this filter.
|
|
202
|
+
*/
|
|
203
|
+
values: Array<string>;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* The credit allocation that funded a block. Extends the allocation resource
|
|
207
|
+
* serialized on prices with the catalog-item attribution of the funding price.
|
|
208
|
+
*/
|
|
209
|
+
interface CreditAllocation {
|
|
210
|
+
allows_rollover: boolean;
|
|
211
|
+
currency: string;
|
|
212
|
+
custom_expiration: Shared.CustomExpiration | null;
|
|
213
|
+
/**
|
|
214
|
+
* The ID of the catalog item this block was allocated from, derived from the
|
|
215
|
+
* allocation's price.
|
|
216
|
+
*/
|
|
217
|
+
item_id: string;
|
|
218
|
+
filters?: Array<CreditAllocation.Filter>;
|
|
219
|
+
license_type_id?: string | null;
|
|
220
|
+
}
|
|
221
|
+
namespace CreditAllocation {
|
|
222
|
+
interface Filter {
|
|
223
|
+
/**
|
|
224
|
+
* The property of the price to filter on.
|
|
225
|
+
*/
|
|
226
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
227
|
+
/**
|
|
228
|
+
* Should prices that match the filter be included or excluded.
|
|
229
|
+
*/
|
|
230
|
+
operator: 'includes' | 'excludes';
|
|
231
|
+
/**
|
|
232
|
+
* The IDs or values that match this filter.
|
|
233
|
+
*/
|
|
234
|
+
values: Array<string>;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* The subscription commitment whose true-up rolled forward into this credit block.
|
|
239
|
+
* Present only when `credit_block_source` is `commitment`.
|
|
240
|
+
*/
|
|
241
|
+
interface CreditCommitment {
|
|
242
|
+
/**
|
|
243
|
+
* The ID of the subscription commitment this block was rolled forward from.
|
|
244
|
+
*/
|
|
245
|
+
id: string;
|
|
246
|
+
/**
|
|
247
|
+
* The subscription the commitment belongs to.
|
|
248
|
+
*/
|
|
249
|
+
subscription_id?: string | null;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
export interface CreditListParams extends PageParams {
|
|
253
|
+
/**
|
|
254
|
+
* The ledger currency or custom pricing unit to use.
|
|
255
|
+
*/
|
|
256
|
+
currency?: string | null;
|
|
257
|
+
'effective_date[gt]'?: string | null;
|
|
258
|
+
'effective_date[gte]'?: string | null;
|
|
259
|
+
'effective_date[lt]'?: string | null;
|
|
260
|
+
'effective_date[lte]'?: string | null;
|
|
261
|
+
/**
|
|
262
|
+
* If set to True, all expired and depleted blocks, as well as active block will be
|
|
263
|
+
* returned.
|
|
264
|
+
*/
|
|
265
|
+
include_all_blocks?: boolean;
|
|
266
|
+
}
|
|
267
|
+
export interface CreditListByExternalIDParams extends PageParams {
|
|
268
|
+
/**
|
|
269
|
+
* The ledger currency or custom pricing unit to use.
|
|
270
|
+
*/
|
|
271
|
+
currency?: string | null;
|
|
272
|
+
'effective_date[gt]'?: string | null;
|
|
273
|
+
'effective_date[gte]'?: string | null;
|
|
274
|
+
'effective_date[lt]'?: string | null;
|
|
275
|
+
'effective_date[lte]'?: string | null;
|
|
276
|
+
/**
|
|
277
|
+
* If set to True, all expired and depleted blocks, as well as active block will be
|
|
278
|
+
* returned.
|
|
279
|
+
*/
|
|
280
|
+
include_all_blocks?: boolean;
|
|
281
|
+
}
|
|
282
|
+
export declare namespace Credits {
|
|
283
|
+
export { type CreditListResponse as CreditListResponse, type CreditListByExternalIDResponse as CreditListByExternalIDResponse, type CreditListResponsesPage as CreditListResponsesPage, type CreditListByExternalIDResponsesPage as CreditListByExternalIDResponsesPage, type CreditListParams as CreditListParams, type CreditListByExternalIDParams as CreditListByExternalIDParams, };
|
|
284
|
+
export { Ledger as Ledger, type AffectedBlock as AffectedBlock, type AmendmentLedgerEntry as AmendmentLedgerEntry, type CreditBlockExpiryLedgerEntry as CreditBlockExpiryLedgerEntry, type DecrementLedgerEntry as DecrementLedgerEntry, type ExpirationChangeLedgerEntry as ExpirationChangeLedgerEntry, type IncrementLedgerEntry as IncrementLedgerEntry, type VoidInitiatedLedgerEntry as VoidInitiatedLedgerEntry, type VoidLedgerEntry as VoidLedgerEntry, type LedgerListResponse as LedgerListResponse, type LedgerCreateEntryResponse as LedgerCreateEntryResponse, type LedgerCreateEntryByExternalIDResponse as LedgerCreateEntryByExternalIDResponse, type LedgerListByExternalIDResponse as LedgerListByExternalIDResponse, type LedgerListResponsesPage as LedgerListResponsesPage, type LedgerListByExternalIDResponsesPage as LedgerListByExternalIDResponsesPage, type LedgerListParams as LedgerListParams, type LedgerCreateEntryParams as LedgerCreateEntryParams, type LedgerCreateEntryByExternalIDParams as LedgerCreateEntryByExternalIDParams, type LedgerListByExternalIDParams as LedgerListByExternalIDParams, };
|
|
285
|
+
export { TopUps as TopUps, type TopUpInvoiceSettings as TopUpInvoiceSettings, type TopUpCreateResponse as TopUpCreateResponse, type TopUpListResponse as TopUpListResponse, type TopUpCreateByExternalIDResponse as TopUpCreateByExternalIDResponse, type TopUpListByExternalIDResponse as TopUpListByExternalIDResponse, type TopUpListResponsesPage as TopUpListResponsesPage, type TopUpListByExternalIDResponsesPage as TopUpListByExternalIDResponsesPage, type TopUpCreateParams as TopUpCreateParams, type TopUpListParams as TopUpListParams, type TopUpDeleteParams as TopUpDeleteParams, type TopUpCreateByExternalIDParams as TopUpCreateByExternalIDParams, type TopUpDeleteByExternalIDParams as TopUpDeleteByExternalIDParams, type TopUpListByExternalIDParams as TopUpListByExternalIDParams, };
|
|
286
|
+
}
|
|
287
|
+
//# sourceMappingURL=credits.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credits.d.mts","sourceRoot":"","sources":["../../../src/resources/customers/credits/credits.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,MAAM,yBAAqB;AACvC,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,4BAA4B,EAC5B,oBAAoB,EACpB,2BAA2B,EAC3B,oBAAoB,EACpB,MAAM,EACN,mCAAmC,EACnC,qCAAqC,EACrC,uBAAuB,EACvB,yBAAyB,EACzB,4BAA4B,EAC5B,8BAA8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,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { APIResource } from "../../../resource.js";
|
|
2
|
-
import * as Core from "../../../core.js";
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
3
2
|
import * as Shared from "../../shared.js";
|
|
4
3
|
import * as LedgerAPI from "./ledger.js";
|
|
5
4
|
import { AffectedBlock, AmendmentLedgerEntry, CreditBlockExpiryLedgerEntry, DecrementLedgerEntry, ExpirationChangeLedgerEntry, IncrementLedgerEntry, Ledger, LedgerCreateEntryByExternalIDParams, LedgerCreateEntryByExternalIDResponse, LedgerCreateEntryParams, LedgerCreateEntryResponse, LedgerListByExternalIDParams, LedgerListByExternalIDResponse, LedgerListByExternalIDResponsesPage, LedgerListParams, LedgerListResponse, LedgerListResponsesPage, VoidInitiatedLedgerEntry, VoidLedgerEntry } from "./ledger.js";
|
|
6
5
|
import * as TopUpsAPI from "./top-ups.js";
|
|
7
|
-
import { TopUpCreateByExternalIDParams, TopUpCreateByExternalIDResponse, TopUpCreateParams, TopUpCreateResponse, TopUpInvoiceSettings, TopUpListByExternalIDParams, TopUpListByExternalIDResponse, TopUpListByExternalIDResponsesPage, TopUpListParams, TopUpListResponse, TopUpListResponsesPage, TopUps } from "./top-ups.js";
|
|
8
|
-
import { Page, type PageParams } from "../../../pagination.js";
|
|
6
|
+
import { TopUpCreateByExternalIDParams, TopUpCreateByExternalIDResponse, TopUpCreateParams, TopUpCreateResponse, TopUpDeleteByExternalIDParams, TopUpDeleteParams, TopUpInvoiceSettings, TopUpListByExternalIDParams, TopUpListByExternalIDResponse, TopUpListByExternalIDResponsesPage, TopUpListParams, TopUpListResponse, TopUpListResponsesPage, TopUps } from "./top-ups.js";
|
|
7
|
+
import { Page, type PageParams, PagePromise } from "../../../core/pagination.js";
|
|
8
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
9
9
|
/**
|
|
10
10
|
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.
|
|
11
11
|
*/
|
|
@@ -26,8 +26,7 @@ export declare class Credits extends APIResource {
|
|
|
26
26
|
* `effective_date[lte]` query parameters. This filters on when the credit block
|
|
27
27
|
* becomes effective, which may differ from creation time for backdated credits.
|
|
28
28
|
*/
|
|
29
|
-
list(customerId: string, query?: CreditListParams, options?:
|
|
30
|
-
list(customerId: string, options?: Core.RequestOptions): Core.PagePromise<CreditListResponsesPage, CreditListResponse>;
|
|
29
|
+
list(customerId: string, query?: CreditListParams | null | undefined, options?: RequestOptions): PagePromise<CreditListResponsesPage, CreditListResponse>;
|
|
31
30
|
/**
|
|
32
31
|
* Returns a paginated list of unexpired, non-zero credit blocks for a customer.
|
|
33
32
|
*
|
|
@@ -42,13 +41,10 @@ export declare class Credits extends APIResource {
|
|
|
42
41
|
* `effective_date[lte]` query parameters. This filters on when the credit block
|
|
43
42
|
* becomes effective, which may differ from creation time for backdated credits.
|
|
44
43
|
*/
|
|
45
|
-
|
|
46
|
-
listByExternalId(externalCustomerId: string, options?: Core.RequestOptions): Core.PagePromise<CreditListByExternalIDResponsesPage, CreditListByExternalIDResponse>;
|
|
47
|
-
}
|
|
48
|
-
export declare class CreditListResponsesPage extends Page<CreditListResponse> {
|
|
49
|
-
}
|
|
50
|
-
export declare class CreditListByExternalIDResponsesPage extends Page<CreditListByExternalIDResponse> {
|
|
44
|
+
listByExternalID(externalCustomerId: string, query?: CreditListByExternalIDParams | null | undefined, options?: RequestOptions): PagePromise<CreditListByExternalIDResponsesPage, CreditListByExternalIDResponse>;
|
|
51
45
|
}
|
|
46
|
+
export type CreditListResponsesPage = Page<CreditListResponse>;
|
|
47
|
+
export type CreditListByExternalIDResponsesPage = Page<CreditListByExternalIDResponse>;
|
|
52
48
|
export interface CreditListResponse {
|
|
53
49
|
id: string;
|
|
54
50
|
balance: number;
|
|
@@ -284,8 +280,8 @@ export interface CreditListByExternalIDParams extends PageParams {
|
|
|
284
280
|
include_all_blocks?: boolean;
|
|
285
281
|
}
|
|
286
282
|
export declare namespace Credits {
|
|
287
|
-
export { type CreditListResponse as CreditListResponse, type CreditListByExternalIDResponse as CreditListByExternalIDResponse, CreditListResponsesPage as CreditListResponsesPage, CreditListByExternalIDResponsesPage as CreditListByExternalIDResponsesPage, type CreditListParams as CreditListParams, type CreditListByExternalIDParams as CreditListByExternalIDParams, };
|
|
288
|
-
export { Ledger as Ledger, type AffectedBlock as AffectedBlock, type AmendmentLedgerEntry as AmendmentLedgerEntry, type CreditBlockExpiryLedgerEntry as CreditBlockExpiryLedgerEntry, type DecrementLedgerEntry as DecrementLedgerEntry, type ExpirationChangeLedgerEntry as ExpirationChangeLedgerEntry, type IncrementLedgerEntry as IncrementLedgerEntry, type VoidInitiatedLedgerEntry as VoidInitiatedLedgerEntry, type VoidLedgerEntry as VoidLedgerEntry, type LedgerListResponse as LedgerListResponse, type LedgerCreateEntryResponse as LedgerCreateEntryResponse, type LedgerCreateEntryByExternalIDResponse as LedgerCreateEntryByExternalIDResponse, type LedgerListByExternalIDResponse as LedgerListByExternalIDResponse, LedgerListResponsesPage as LedgerListResponsesPage, LedgerListByExternalIDResponsesPage as LedgerListByExternalIDResponsesPage, type LedgerListParams as LedgerListParams, type LedgerCreateEntryParams as LedgerCreateEntryParams, type LedgerCreateEntryByExternalIDParams as LedgerCreateEntryByExternalIDParams, type LedgerListByExternalIDParams as LedgerListByExternalIDParams, };
|
|
289
|
-
export { TopUps as TopUps, type TopUpInvoiceSettings as TopUpInvoiceSettings, type TopUpCreateResponse as TopUpCreateResponse, type TopUpListResponse as TopUpListResponse, type TopUpCreateByExternalIDResponse as TopUpCreateByExternalIDResponse, type TopUpListByExternalIDResponse as TopUpListByExternalIDResponse, TopUpListResponsesPage as TopUpListResponsesPage, TopUpListByExternalIDResponsesPage as TopUpListByExternalIDResponsesPage, type TopUpCreateParams as TopUpCreateParams, type TopUpListParams as TopUpListParams, type TopUpCreateByExternalIDParams as TopUpCreateByExternalIDParams, type TopUpListByExternalIDParams as TopUpListByExternalIDParams, };
|
|
283
|
+
export { type CreditListResponse as CreditListResponse, type CreditListByExternalIDResponse as CreditListByExternalIDResponse, type CreditListResponsesPage as CreditListResponsesPage, type CreditListByExternalIDResponsesPage as CreditListByExternalIDResponsesPage, type CreditListParams as CreditListParams, type CreditListByExternalIDParams as CreditListByExternalIDParams, };
|
|
284
|
+
export { Ledger as Ledger, type AffectedBlock as AffectedBlock, type AmendmentLedgerEntry as AmendmentLedgerEntry, type CreditBlockExpiryLedgerEntry as CreditBlockExpiryLedgerEntry, type DecrementLedgerEntry as DecrementLedgerEntry, type ExpirationChangeLedgerEntry as ExpirationChangeLedgerEntry, type IncrementLedgerEntry as IncrementLedgerEntry, type VoidInitiatedLedgerEntry as VoidInitiatedLedgerEntry, type VoidLedgerEntry as VoidLedgerEntry, type LedgerListResponse as LedgerListResponse, type LedgerCreateEntryResponse as LedgerCreateEntryResponse, type LedgerCreateEntryByExternalIDResponse as LedgerCreateEntryByExternalIDResponse, type LedgerListByExternalIDResponse as LedgerListByExternalIDResponse, type LedgerListResponsesPage as LedgerListResponsesPage, type LedgerListByExternalIDResponsesPage as LedgerListByExternalIDResponsesPage, type LedgerListParams as LedgerListParams, type LedgerCreateEntryParams as LedgerCreateEntryParams, type LedgerCreateEntryByExternalIDParams as LedgerCreateEntryByExternalIDParams, type LedgerListByExternalIDParams as LedgerListByExternalIDParams, };
|
|
285
|
+
export { TopUps as TopUps, type TopUpInvoiceSettings as TopUpInvoiceSettings, type TopUpCreateResponse as TopUpCreateResponse, type TopUpListResponse as TopUpListResponse, type TopUpCreateByExternalIDResponse as TopUpCreateByExternalIDResponse, type TopUpListByExternalIDResponse as TopUpListByExternalIDResponse, type TopUpListResponsesPage as TopUpListResponsesPage, type TopUpListByExternalIDResponsesPage as TopUpListByExternalIDResponsesPage, type TopUpCreateParams as TopUpCreateParams, type TopUpListParams as TopUpListParams, type TopUpDeleteParams as TopUpDeleteParams, type TopUpCreateByExternalIDParams as TopUpCreateByExternalIDParams, type TopUpDeleteByExternalIDParams as TopUpDeleteByExternalIDParams, type TopUpListByExternalIDParams as TopUpListByExternalIDParams, };
|
|
290
286
|
}
|
|
291
287
|
//# sourceMappingURL=credits.d.ts.map
|