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
|
@@ -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,8BAA8B,EAC9B,mCAAmC,EACnC,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,eAAe,EAChB,qBAAiB;AAClB,OAAO,KAAK,SAAS,sBAAkB;AACvC,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,EAC/B,iBAAiB,EACjB,mBAAmB,EACnB,6BAA6B,EAC7B,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,EAC3B,6BAA6B,EAC7B,kCAAkC,EAClC,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,MAAM,EACP,sBAAkB;AACnB,OAAO,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,WAAW,EAAE,qCAAiC;A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K,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,23 +41,21 @@ 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;
|
|
55
51
|
/**
|
|
56
52
|
* How this credit block was created: `allocation` (a subscription's recurring
|
|
57
|
-
* credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
53
|
+
* credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
54
|
+
* `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
58
55
|
* `manual` (a manual credit ledger increment, including credits voided or expired
|
|
59
56
|
* off another block).
|
|
60
57
|
*/
|
|
61
|
-
credit_block_source: 'allocation' | 'top_up' | 'manual';
|
|
58
|
+
credit_block_source: 'allocation' | 'top_up' | 'commitment' | 'manual';
|
|
62
59
|
effective_date: string | null;
|
|
63
60
|
expiry_date: string | null;
|
|
64
61
|
filters: Array<CreditListResponse.Filter>;
|
|
@@ -79,6 +76,11 @@ export interface CreditListResponse {
|
|
|
79
76
|
* serialized on prices with the catalog-item attribution of the funding price.
|
|
80
77
|
*/
|
|
81
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;
|
|
82
84
|
}
|
|
83
85
|
export declare namespace CreditListResponse {
|
|
84
86
|
/**
|
|
@@ -130,17 +132,32 @@ export declare namespace CreditListResponse {
|
|
|
130
132
|
values: Array<string>;
|
|
131
133
|
}
|
|
132
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
|
+
}
|
|
133
149
|
}
|
|
134
150
|
export interface CreditListByExternalIDResponse {
|
|
135
151
|
id: string;
|
|
136
152
|
balance: number;
|
|
137
153
|
/**
|
|
138
154
|
* How this credit block was created: `allocation` (a subscription's recurring
|
|
139
|
-
* credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
155
|
+
* credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
156
|
+
* `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
140
157
|
* `manual` (a manual credit ledger increment, including credits voided or expired
|
|
141
158
|
* off another block).
|
|
142
159
|
*/
|
|
143
|
-
credit_block_source: 'allocation' | 'top_up' | 'manual';
|
|
160
|
+
credit_block_source: 'allocation' | 'top_up' | 'commitment' | 'manual';
|
|
144
161
|
effective_date: string | null;
|
|
145
162
|
expiry_date: string | null;
|
|
146
163
|
filters: Array<CreditListByExternalIDResponse.Filter>;
|
|
@@ -161,6 +178,11 @@ export interface CreditListByExternalIDResponse {
|
|
|
161
178
|
* serialized on prices with the catalog-item attribution of the funding price.
|
|
162
179
|
*/
|
|
163
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;
|
|
164
186
|
}
|
|
165
187
|
export declare namespace CreditListByExternalIDResponse {
|
|
166
188
|
/**
|
|
@@ -212,6 +234,20 @@ export declare namespace CreditListByExternalIDResponse {
|
|
|
212
234
|
values: Array<string>;
|
|
213
235
|
}
|
|
214
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
|
+
}
|
|
215
251
|
}
|
|
216
252
|
export interface CreditListParams extends PageParams {
|
|
217
253
|
/**
|
|
@@ -244,8 +280,8 @@ export interface CreditListByExternalIDParams extends PageParams {
|
|
|
244
280
|
include_all_blocks?: boolean;
|
|
245
281
|
}
|
|
246
282
|
export declare namespace Credits {
|
|
247
|
-
export { type CreditListResponse as CreditListResponse, type CreditListByExternalIDResponse as CreditListByExternalIDResponse, CreditListResponsesPage as CreditListResponsesPage, CreditListByExternalIDResponsesPage as CreditListByExternalIDResponsesPage, type CreditListParams as CreditListParams, type CreditListByExternalIDParams as CreditListByExternalIDParams, };
|
|
248
|
-
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, };
|
|
249
|
-
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, };
|
|
250
286
|
}
|
|
251
287
|
//# sourceMappingURL=credits.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credits.d.ts","sourceRoot":"","sources":["../../../src/resources/customers/credits/credits.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"credits.d.ts","sourceRoot":"","sources":["../../../src/resources/customers/credits/credits.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,KAAK,MAAM,wBAAqB;AACvC,OAAO,KAAK,SAAS,oBAAiB;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,8BAA8B,EAC9B,mCAAmC,EACnC,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,eAAe,EAChB,oBAAiB;AAClB,OAAO,KAAK,SAAS,qBAAkB;AACvC,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,EAC/B,iBAAiB,EACjB,mBAAmB,EACnB,6BAA6B,EAC7B,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,EAC3B,6BAA6B,EAC7B,kCAAkC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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,37 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
-
if (mod && mod.__esModule) return mod;
|
|
21
|
-
var result = {};
|
|
22
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
-
__setModuleDefault(result, mod);
|
|
24
|
-
return result;
|
|
25
|
-
};
|
|
26
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const LedgerAPI = __importStar(require("./ledger.js"));
|
|
4
|
+
exports.Credits = void 0;
|
|
5
|
+
const tslib_1 = require("../../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../../core/resource.js");
|
|
7
|
+
const LedgerAPI = tslib_1.__importStar(require("./ledger.js"));
|
|
31
8
|
const ledger_1 = require("./ledger.js");
|
|
32
|
-
const TopUpsAPI = __importStar(require("./top-ups.js"));
|
|
9
|
+
const TopUpsAPI = tslib_1.__importStar(require("./top-ups.js"));
|
|
33
10
|
const top_ups_1 = require("./top-ups.js");
|
|
34
|
-
const pagination_1 = require("../../../pagination.js");
|
|
11
|
+
const pagination_1 = require("../../../core/pagination.js");
|
|
12
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
35
13
|
/**
|
|
36
14
|
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.
|
|
37
15
|
*/
|
|
@@ -41,35 +19,45 @@ class Credits extends resource_1.APIResource {
|
|
|
41
19
|
this.ledger = new LedgerAPI.Ledger(this._client);
|
|
42
20
|
this.topUps = new TopUpsAPI.TopUps(this._client);
|
|
43
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Returns a paginated list of unexpired, non-zero credit blocks for a customer.
|
|
24
|
+
*
|
|
25
|
+
* If `include_all_blocks` is set to `true`, all credit blocks (including expired
|
|
26
|
+
* and depleted blocks) will be included in the response.
|
|
27
|
+
*
|
|
28
|
+
* Note that `currency` defaults to credits if not specified. To use a real world
|
|
29
|
+
* currency, set `currency` to an ISO 4217 string.
|
|
30
|
+
*
|
|
31
|
+
* Results can be filtered by the block's `effective_date` using the
|
|
32
|
+
* `effective_date[gte]`, `effective_date[gt]`, `effective_date[lt]`, and
|
|
33
|
+
* `effective_date[lte]` query parameters. This filters on when the credit block
|
|
34
|
+
* becomes effective, which may differ from creation time for backdated credits.
|
|
35
|
+
*/
|
|
44
36
|
list(customerId, query = {}, options) {
|
|
45
|
-
|
|
46
|
-
return this.list(customerId, {}, query);
|
|
47
|
-
}
|
|
48
|
-
return this._client.getAPIList(`/customers/${customerId}/credits`, CreditListResponsesPage, {
|
|
37
|
+
return this._client.getAPIList((0, path_1.path) `/customers/${customerId}/credits`, (pagination_1.Page), {
|
|
49
38
|
query,
|
|
50
39
|
...options,
|
|
51
40
|
});
|
|
52
41
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Returns a paginated list of unexpired, non-zero credit blocks for a customer.
|
|
44
|
+
*
|
|
45
|
+
* If `include_all_blocks` is set to `true`, all credit blocks (including expired
|
|
46
|
+
* and depleted blocks) will be included in the response.
|
|
47
|
+
*
|
|
48
|
+
* Note that `currency` defaults to credits if not specified. To use a real world
|
|
49
|
+
* currency, set `currency` to an ISO 4217 string.
|
|
50
|
+
*
|
|
51
|
+
* Results can be filtered by the block's `effective_date` using the
|
|
52
|
+
* `effective_date[gte]`, `effective_date[gt]`, `effective_date[lt]`, and
|
|
53
|
+
* `effective_date[lte]` query parameters. This filters on when the credit block
|
|
54
|
+
* becomes effective, which may differ from creation time for backdated credits.
|
|
55
|
+
*/
|
|
56
|
+
listByExternalID(externalCustomerId, query = {}, options) {
|
|
57
|
+
return this._client.getAPIList((0, path_1.path) `/customers/external_customer_id/${externalCustomerId}/credits`, (pagination_1.Page), { query, ...options });
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
exports.Credits = Credits;
|
|
61
|
-
class CreditListResponsesPage extends pagination_1.Page {
|
|
62
|
-
}
|
|
63
|
-
exports.CreditListResponsesPage = CreditListResponsesPage;
|
|
64
|
-
class CreditListByExternalIDResponsesPage extends pagination_1.Page {
|
|
65
|
-
}
|
|
66
|
-
exports.CreditListByExternalIDResponsesPage = CreditListByExternalIDResponsesPage;
|
|
67
|
-
Credits.CreditListResponsesPage = CreditListResponsesPage;
|
|
68
|
-
Credits.CreditListByExternalIDResponsesPage = CreditListByExternalIDResponsesPage;
|
|
69
61
|
Credits.Ledger = ledger_1.Ledger;
|
|
70
|
-
Credits.LedgerListResponsesPage = ledger_1.LedgerListResponsesPage;
|
|
71
|
-
Credits.LedgerListByExternalIDResponsesPage = ledger_1.LedgerListByExternalIDResponsesPage;
|
|
72
62
|
Credits.TopUps = top_ups_1.TopUps;
|
|
73
|
-
Credits.TopUpListResponsesPage = top_ups_1.TopUpListResponsesPage;
|
|
74
|
-
Credits.TopUpListByExternalIDResponsesPage = top_ups_1.TopUpListByExternalIDResponsesPage;
|
|
75
63
|
//# sourceMappingURL=credits.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credits.js","sourceRoot":"","sources":["../../../src/resources/customers/credits/credits.ts"],"names":[],"mappings":";AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"credits.js","sourceRoot":"","sources":["../../../src/resources/customers/credits/credits.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AAErD,+DAAsC;AACtC,wCAoBkB;AAClB,gEAAuC;AACvC,0CAemB;AACnB,4DAA8E;AAE9E,0DAAoD;AAEpD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAoDhE,CAAC;IAlDC;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,UAAkB,EAClB,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAA,WAAI,EAAA,cAAc,UAAU,UAAU,EAAE,CAAA,iBAAwB,CAAA,EAAE;YAC/F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,gBAAgB,CACd,kBAA0B,EAC1B,QAAyD,EAAE,EAC3D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,mCAAmC,kBAAkB,UAAU,EACnE,CAAA,iBAAoC,CAAA,EACpC,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;CACF;AAtDD,0BAsDC;AA4SD,OAAO,CAAC,MAAM,GAAG,eAAM,CAAC;AACxB,OAAO,CAAC,MAAM,GAAG,gBAAM,CAAC"}
|