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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.mjs","sourceRoot":"","sources":["../../src/resources/coupons/subscriptions.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"subscriptions.mjs","sourceRoot":"","sources":["../../src/resources/coupons/subscriptions.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAGlD,OAAO,EAAE,IAAI,EAAgC,kCAA8B;AAE3E,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CACF,QAAgB,EAChB,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,YAAY,QAAQ,gBAAgB,EACxC,CAAA,IAAmC,CAAA,EACnC,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coupons.d.mts","sourceRoot":"","sources":["../src/resources/coupons.ts"],"names":[],"mappings":"AAEA,oCAAgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coupons.d.ts","sourceRoot":"","sources":["../src/resources/coupons.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"coupons.d.ts","sourceRoot":"","sources":["../src/resources/coupons.ts"],"names":[],"mappings":"AAEA,mCAAgC"}
|
package/resources/coupons.js
CHANGED
|
@@ -1,19 +1,6 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
-
};
|
|
17
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
|
|
4
|
+
const tslib_1 = require("../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./coupons/index.js"), exports);
|
|
19
6
|
//# sourceMappingURL=coupons.js.map
|
package/resources/coupons.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coupons.js","sourceRoot":"","sources":["../src/resources/coupons.ts"],"names":[],"mappings":";AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"coupons.js","sourceRoot":"","sources":["../src/resources/coupons.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6DAAgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coupons.mjs","sourceRoot":"","sources":["../src/resources/coupons.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
|
1
|
+
{"version":3,"file":"coupons.mjs","sourceRoot":"","sources":["../src/resources/coupons.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,oCAAgC"}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as Shared from "./shared.mjs";
|
|
3
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.
|
|
7
|
+
*/
|
|
8
|
+
export declare class CreditBlocks extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* This endpoint returns a credit block identified by its block_id.
|
|
11
|
+
*/
|
|
12
|
+
retrieve(blockId: string, options?: RequestOptions): APIPromise<CreditBlockRetrieveResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* This endpoint deletes a credit block by its ID.
|
|
15
|
+
*
|
|
16
|
+
* When a credit block is deleted:
|
|
17
|
+
*
|
|
18
|
+
* - The block is removed from the customer's credit ledger.
|
|
19
|
+
* - Any usage of the credit block is reversed, and the ledger is replayed as if
|
|
20
|
+
* the block never existed.
|
|
21
|
+
* - If invoices were generated from the purchase of the credit block, they will be
|
|
22
|
+
* deleted if in draft status, voided if issued, or a credit note will be issued
|
|
23
|
+
* if the invoice is paid.
|
|
24
|
+
*
|
|
25
|
+
* <Note>
|
|
26
|
+
* Issued invoices that had credits applied from this block will not be regenerated, but the ledger will
|
|
27
|
+
* reflect the state as if credits from the deleted block were never applied.
|
|
28
|
+
* </Note>
|
|
29
|
+
*/
|
|
30
|
+
delete(blockId: string, options?: RequestOptions): APIPromise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* This endpoint returns the credit block and its associated purchasing invoices.
|
|
33
|
+
*
|
|
34
|
+
* If a credit block was purchased (as opposed to being manually added), this
|
|
35
|
+
* endpoint returns the invoices that were created to charge the customer for the
|
|
36
|
+
* credit block. For credit blocks with payment schedules spanning multiple periods
|
|
37
|
+
* (e.g., monthly payments over 12 months), multiple invoices will be returned.
|
|
38
|
+
*
|
|
39
|
+
* For credit blocks created by subscription allocation prices, this endpoint
|
|
40
|
+
* returns the subscription invoice containing the allocation line item that
|
|
41
|
+
* created the block.
|
|
42
|
+
*
|
|
43
|
+
* If the credit block was not purchased (e.g., manual increment), an empty
|
|
44
|
+
* invoices list is returned.
|
|
45
|
+
*
|
|
46
|
+
* **Note: This endpoint is currently experimental and its interface may change in
|
|
47
|
+
* future releases. Please contact support before building production integrations
|
|
48
|
+
* against this endpoint.**
|
|
49
|
+
*/
|
|
50
|
+
listInvoices(blockId: string, options?: RequestOptions): APIPromise<CreditBlockListInvoicesResponse>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The Credit Block resource models prepaid credits within Orb.
|
|
54
|
+
*/
|
|
55
|
+
export interface CreditBlockRetrieveResponse {
|
|
56
|
+
id: string;
|
|
57
|
+
balance: number;
|
|
58
|
+
/**
|
|
59
|
+
* How this credit block was created: `allocation` (a subscription's recurring
|
|
60
|
+
* credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
61
|
+
* `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
62
|
+
* `manual` (a manual credit ledger increment, including credits voided or expired
|
|
63
|
+
* off another block).
|
|
64
|
+
*/
|
|
65
|
+
credit_block_source: 'allocation' | 'top_up' | 'commitment' | 'manual';
|
|
66
|
+
effective_date: string | null;
|
|
67
|
+
expiry_date: string | null;
|
|
68
|
+
filters: Array<CreditBlockRetrieveResponse.Filter>;
|
|
69
|
+
maximum_initial_balance: number | null;
|
|
70
|
+
/**
|
|
71
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
72
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
73
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
74
|
+
* `null`.
|
|
75
|
+
*/
|
|
76
|
+
metadata: {
|
|
77
|
+
[key: string]: string;
|
|
78
|
+
};
|
|
79
|
+
per_unit_cost_basis: string | null;
|
|
80
|
+
status: 'active' | 'pending_payment';
|
|
81
|
+
/**
|
|
82
|
+
* The credit allocation that funded a block. Extends the allocation resource
|
|
83
|
+
* serialized on prices with the catalog-item attribution of the funding price.
|
|
84
|
+
*/
|
|
85
|
+
credit_allocation?: CreditBlockRetrieveResponse.CreditAllocation | null;
|
|
86
|
+
/**
|
|
87
|
+
* The subscription commitment whose true-up rolled forward into this credit block.
|
|
88
|
+
* Present only when `credit_block_source` is `commitment`.
|
|
89
|
+
*/
|
|
90
|
+
credit_commitment?: CreditBlockRetrieveResponse.CreditCommitment | null;
|
|
91
|
+
}
|
|
92
|
+
export declare namespace CreditBlockRetrieveResponse {
|
|
93
|
+
interface Filter {
|
|
94
|
+
/**
|
|
95
|
+
* The property of the price to filter on.
|
|
96
|
+
*/
|
|
97
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
98
|
+
/**
|
|
99
|
+
* Should prices that match the filter be included or excluded.
|
|
100
|
+
*/
|
|
101
|
+
operator: 'includes' | 'excludes';
|
|
102
|
+
/**
|
|
103
|
+
* The IDs or values that match this filter.
|
|
104
|
+
*/
|
|
105
|
+
values: Array<string>;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* The credit allocation that funded a block. Extends the allocation resource
|
|
109
|
+
* serialized on prices with the catalog-item attribution of the funding price.
|
|
110
|
+
*/
|
|
111
|
+
interface CreditAllocation {
|
|
112
|
+
allows_rollover: boolean;
|
|
113
|
+
currency: string;
|
|
114
|
+
custom_expiration: Shared.CustomExpiration | null;
|
|
115
|
+
/**
|
|
116
|
+
* The ID of the catalog item this block was allocated from, derived from the
|
|
117
|
+
* allocation's price.
|
|
118
|
+
*/
|
|
119
|
+
item_id: string;
|
|
120
|
+
filters?: Array<CreditAllocation.Filter>;
|
|
121
|
+
license_type_id?: string | null;
|
|
122
|
+
}
|
|
123
|
+
namespace CreditAllocation {
|
|
124
|
+
interface Filter {
|
|
125
|
+
/**
|
|
126
|
+
* The property of the price to filter on.
|
|
127
|
+
*/
|
|
128
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
129
|
+
/**
|
|
130
|
+
* Should prices that match the filter be included or excluded.
|
|
131
|
+
*/
|
|
132
|
+
operator: 'includes' | 'excludes';
|
|
133
|
+
/**
|
|
134
|
+
* The IDs or values that match this filter.
|
|
135
|
+
*/
|
|
136
|
+
values: Array<string>;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* The subscription commitment whose true-up rolled forward into this credit block.
|
|
141
|
+
* Present only when `credit_block_source` is `commitment`.
|
|
142
|
+
*/
|
|
143
|
+
interface CreditCommitment {
|
|
144
|
+
/**
|
|
145
|
+
* The ID of the subscription commitment this block was rolled forward from.
|
|
146
|
+
*/
|
|
147
|
+
id: string;
|
|
148
|
+
/**
|
|
149
|
+
* The subscription the commitment belongs to.
|
|
150
|
+
*/
|
|
151
|
+
subscription_id?: string | null;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
export interface CreditBlockListInvoicesResponse {
|
|
155
|
+
/**
|
|
156
|
+
* The Credit Block resource models prepaid credits within Orb.
|
|
157
|
+
*/
|
|
158
|
+
block: CreditBlockListInvoicesResponse.Block;
|
|
159
|
+
invoices: Array<CreditBlockListInvoicesResponse.Invoice>;
|
|
160
|
+
}
|
|
161
|
+
export declare namespace CreditBlockListInvoicesResponse {
|
|
162
|
+
/**
|
|
163
|
+
* The Credit Block resource models prepaid credits within Orb.
|
|
164
|
+
*/
|
|
165
|
+
interface Block {
|
|
166
|
+
id: string;
|
|
167
|
+
balance: number;
|
|
168
|
+
/**
|
|
169
|
+
* How this credit block was created: `allocation` (a subscription's recurring
|
|
170
|
+
* credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
171
|
+
* `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
172
|
+
* `manual` (a manual credit ledger increment, including credits voided or expired
|
|
173
|
+
* off another block).
|
|
174
|
+
*/
|
|
175
|
+
credit_block_source: 'allocation' | 'top_up' | 'commitment' | 'manual';
|
|
176
|
+
effective_date: string | null;
|
|
177
|
+
expiry_date: string | null;
|
|
178
|
+
filters: Array<Block.Filter>;
|
|
179
|
+
maximum_initial_balance: number | null;
|
|
180
|
+
/**
|
|
181
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
182
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
183
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
184
|
+
* `null`.
|
|
185
|
+
*/
|
|
186
|
+
metadata: {
|
|
187
|
+
[key: string]: string;
|
|
188
|
+
};
|
|
189
|
+
per_unit_cost_basis: string | null;
|
|
190
|
+
status: 'active' | 'pending_payment';
|
|
191
|
+
/**
|
|
192
|
+
* The credit allocation that funded a block. Extends the allocation resource
|
|
193
|
+
* serialized on prices with the catalog-item attribution of the funding price.
|
|
194
|
+
*/
|
|
195
|
+
credit_allocation?: Block.CreditAllocation | null;
|
|
196
|
+
/**
|
|
197
|
+
* The subscription commitment whose true-up rolled forward into this credit block.
|
|
198
|
+
* Present only when `credit_block_source` is `commitment`.
|
|
199
|
+
*/
|
|
200
|
+
credit_commitment?: Block.CreditCommitment | null;
|
|
201
|
+
}
|
|
202
|
+
namespace Block {
|
|
203
|
+
interface Filter {
|
|
204
|
+
/**
|
|
205
|
+
* The property of the price to filter on.
|
|
206
|
+
*/
|
|
207
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
208
|
+
/**
|
|
209
|
+
* Should prices that match the filter be included or excluded.
|
|
210
|
+
*/
|
|
211
|
+
operator: 'includes' | 'excludes';
|
|
212
|
+
/**
|
|
213
|
+
* The IDs or values that match this filter.
|
|
214
|
+
*/
|
|
215
|
+
values: Array<string>;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* The credit allocation that funded a block. Extends the allocation resource
|
|
219
|
+
* serialized on prices with the catalog-item attribution of the funding price.
|
|
220
|
+
*/
|
|
221
|
+
interface CreditAllocation {
|
|
222
|
+
allows_rollover: boolean;
|
|
223
|
+
currency: string;
|
|
224
|
+
custom_expiration: Shared.CustomExpiration | null;
|
|
225
|
+
/**
|
|
226
|
+
* The ID of the catalog item this block was allocated from, derived from the
|
|
227
|
+
* allocation's price.
|
|
228
|
+
*/
|
|
229
|
+
item_id: string;
|
|
230
|
+
filters?: Array<CreditAllocation.Filter>;
|
|
231
|
+
license_type_id?: string | null;
|
|
232
|
+
}
|
|
233
|
+
namespace CreditAllocation {
|
|
234
|
+
interface Filter {
|
|
235
|
+
/**
|
|
236
|
+
* The property of the price to filter on.
|
|
237
|
+
*/
|
|
238
|
+
field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
|
|
239
|
+
/**
|
|
240
|
+
* Should prices that match the filter be included or excluded.
|
|
241
|
+
*/
|
|
242
|
+
operator: 'includes' | 'excludes';
|
|
243
|
+
/**
|
|
244
|
+
* The IDs or values that match this filter.
|
|
245
|
+
*/
|
|
246
|
+
values: Array<string>;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* The subscription commitment whose true-up rolled forward into this credit block.
|
|
251
|
+
* Present only when `credit_block_source` is `commitment`.
|
|
252
|
+
*/
|
|
253
|
+
interface CreditCommitment {
|
|
254
|
+
/**
|
|
255
|
+
* The ID of the subscription commitment this block was rolled forward from.
|
|
256
|
+
*/
|
|
257
|
+
id: string;
|
|
258
|
+
/**
|
|
259
|
+
* The subscription the commitment belongs to.
|
|
260
|
+
*/
|
|
261
|
+
subscription_id?: string | null;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
interface Invoice {
|
|
265
|
+
id: string;
|
|
266
|
+
customer: Shared.CustomerMinified;
|
|
267
|
+
invoice_number: string;
|
|
268
|
+
status: 'issued' | 'paid' | 'synced' | 'void' | 'draft';
|
|
269
|
+
subscription: Shared.SubscriptionMinified | null;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
export declare namespace CreditBlocks {
|
|
273
|
+
export { type CreditBlockRetrieveResponse as CreditBlockRetrieveResponse, type CreditBlockListInvoicesResponse as CreditBlockListInvoicesResponse, };
|
|
274
|
+
}
|
|
275
|
+
//# sourceMappingURL=credit-blocks.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credit-blocks.d.mts","sourceRoot":"","sources":["../src/resources/credit-blocks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,KAAK,MAAM,qBAAiB;AACnC,OAAO,EAAE,UAAU,EAAE,gCAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,2BAA2B,CAAC;IAI5F;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOnE;;;;;;;;;;;;;;;;;;OAkBG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,+BAA+B,CAAC;CAGrG;AAED;;GAEG;AACH,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EX,QAAQ,EAAE,MAAM,CAAC,gBAAgB,CAAC;QAElC,cAAc,EAAE,MAAM,CAAC;QAEvB,MAAM,EAAE,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;QAExD,YAAY,EAAE,MAAM,CAAC,oBAAoB,GAAG,IAAI,CAAC;KAClD;CACF;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
|
@@ -1,6 +1,7 @@
|
|
|
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";
|
|
3
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
5
|
/**
|
|
5
6
|
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.
|
|
6
7
|
*/
|
|
@@ -8,7 +9,7 @@ export declare class CreditBlocks extends APIResource {
|
|
|
8
9
|
/**
|
|
9
10
|
* This endpoint returns a credit block identified by its block_id.
|
|
10
11
|
*/
|
|
11
|
-
retrieve(blockId: string, options?:
|
|
12
|
+
retrieve(blockId: string, options?: RequestOptions): APIPromise<CreditBlockRetrieveResponse>;
|
|
12
13
|
/**
|
|
13
14
|
* This endpoint deletes a credit block by its ID.
|
|
14
15
|
*
|
|
@@ -26,7 +27,7 @@ export declare class CreditBlocks extends APIResource {
|
|
|
26
27
|
* reflect the state as if credits from the deleted block were never applied.
|
|
27
28
|
* </Note>
|
|
28
29
|
*/
|
|
29
|
-
delete(blockId: string, options?:
|
|
30
|
+
delete(blockId: string, options?: RequestOptions): APIPromise<void>;
|
|
30
31
|
/**
|
|
31
32
|
* This endpoint returns the credit block and its associated purchasing invoices.
|
|
32
33
|
*
|
|
@@ -46,7 +47,7 @@ export declare class CreditBlocks extends APIResource {
|
|
|
46
47
|
* future releases. Please contact support before building production integrations
|
|
47
48
|
* against this endpoint.**
|
|
48
49
|
*/
|
|
49
|
-
listInvoices(blockId: string, options?:
|
|
50
|
+
listInvoices(blockId: string, options?: RequestOptions): APIPromise<CreditBlockListInvoicesResponse>;
|
|
50
51
|
}
|
|
51
52
|
/**
|
|
52
53
|
* The Credit Block resource models prepaid credits within Orb.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credit-blocks.d.ts","sourceRoot":"","sources":["../src/resources/credit-blocks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"credit-blocks.d.ts","sourceRoot":"","sources":["../src/resources/credit-blocks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,MAAM,oBAAiB;AACnC,OAAO,EAAE,UAAU,EAAE,+BAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,2BAA2B,CAAC;IAI5F;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOnE;;;;;;;;;;;;;;;;;;OAkBG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,+BAA+B,CAAC;CAGrG;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,EAAE,EAAE,MAAM,CAAC;IAEX,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,mBAAmB,EAAE,YA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,GAAG,MAAM,GAAG,OAAO,CAAC;QAExD,YAAY,EAAE,MAAM,CAAC,oBAAoB,GAAG,IAAI,CAAC;KAClD;CACF;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.CreditBlocks = void 0;
|
|
5
|
-
const resource_1 = require("../resource.js");
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const headers_1 = require("../internal/headers.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
6
8
|
/**
|
|
7
9
|
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.
|
|
8
10
|
*/
|
|
@@ -11,7 +13,7 @@ class CreditBlocks extends resource_1.APIResource {
|
|
|
11
13
|
* This endpoint returns a credit block identified by its block_id.
|
|
12
14
|
*/
|
|
13
15
|
retrieve(blockId, options) {
|
|
14
|
-
return this._client.get(`/credit_blocks/${blockId}`, options);
|
|
16
|
+
return this._client.get((0, path_1.path) `/credit_blocks/${blockId}`, options);
|
|
15
17
|
}
|
|
16
18
|
/**
|
|
17
19
|
* This endpoint deletes a credit block by its ID.
|
|
@@ -31,9 +33,9 @@ class CreditBlocks extends resource_1.APIResource {
|
|
|
31
33
|
* </Note>
|
|
32
34
|
*/
|
|
33
35
|
delete(blockId, options) {
|
|
34
|
-
return this._client.delete(`/credit_blocks/${blockId}`, {
|
|
36
|
+
return this._client.delete((0, path_1.path) `/credit_blocks/${blockId}`, {
|
|
35
37
|
...options,
|
|
36
|
-
headers: { Accept: '*/*',
|
|
38
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
37
39
|
});
|
|
38
40
|
}
|
|
39
41
|
/**
|
|
@@ -56,7 +58,7 @@ class CreditBlocks extends resource_1.APIResource {
|
|
|
56
58
|
* against this endpoint.**
|
|
57
59
|
*/
|
|
58
60
|
listInvoices(blockId, options) {
|
|
59
|
-
return this._client.get(`/credit_blocks/${blockId}/invoices`, options);
|
|
61
|
+
return this._client.get((0, path_1.path) `/credit_blocks/${blockId}/invoices`, options);
|
|
60
62
|
}
|
|
61
63
|
}
|
|
62
64
|
exports.CreditBlocks = CreditBlocks;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credit-blocks.js","sourceRoot":"","sources":["../src/resources/credit-blocks.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"credit-blocks.js","sourceRoot":"","sources":["../src/resources/credit-blocks.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAAmD;AAEnD,oDAA8C;AAE9C;;GAEG;AACH,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;OAEG;IACH,QAAQ,CAAC,OAAe,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,OAAe,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,kBAAkB,OAAO,EAAE,EAAE;YAC1D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,YAAY,CAAC,OAAe,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,OAAO,WAAW,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;CACF;AAtDD,oCAsDC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../resource.mjs";
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
3
5
|
/**
|
|
4
6
|
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.
|
|
5
7
|
*/
|
|
@@ -8,7 +10,7 @@ export class CreditBlocks extends APIResource {
|
|
|
8
10
|
* This endpoint returns a credit block identified by its block_id.
|
|
9
11
|
*/
|
|
10
12
|
retrieve(blockId, options) {
|
|
11
|
-
return this._client.get(`/credit_blocks/${blockId}`, options);
|
|
13
|
+
return this._client.get(path `/credit_blocks/${blockId}`, options);
|
|
12
14
|
}
|
|
13
15
|
/**
|
|
14
16
|
* This endpoint deletes a credit block by its ID.
|
|
@@ -28,9 +30,9 @@ export class CreditBlocks extends APIResource {
|
|
|
28
30
|
* </Note>
|
|
29
31
|
*/
|
|
30
32
|
delete(blockId, options) {
|
|
31
|
-
return this._client.delete(`/credit_blocks/${blockId}`, {
|
|
33
|
+
return this._client.delete(path `/credit_blocks/${blockId}`, {
|
|
32
34
|
...options,
|
|
33
|
-
headers: { Accept: '*/*',
|
|
35
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
34
36
|
});
|
|
35
37
|
}
|
|
36
38
|
/**
|
|
@@ -53,7 +55,7 @@ export class CreditBlocks extends APIResource {
|
|
|
53
55
|
* against this endpoint.**
|
|
54
56
|
*/
|
|
55
57
|
listInvoices(blockId, options) {
|
|
56
|
-
return this._client.get(`/credit_blocks/${blockId}/invoices`, options);
|
|
58
|
+
return this._client.get(path `/credit_blocks/${blockId}/invoices`, options);
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
61
|
//# sourceMappingURL=credit-blocks.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credit-blocks.mjs","sourceRoot":"","sources":["../src/resources/credit-blocks.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"credit-blocks.mjs","sourceRoot":"","sources":["../src/resources/credit-blocks.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,QAAQ,CAAC,OAAe,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,OAAe,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,kBAAkB,OAAO,EAAE,EAAE;YAC1D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,YAAY,CAAC,OAAe,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,OAAO,WAAW,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;CACF"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as Shared from "./shared.mjs";
|
|
3
|
+
import { CreditNotesPage } from "./shared.mjs";
|
|
4
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
5
|
+
import { type PageParams, PagePromise } from "../core/pagination.mjs";
|
|
6
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
7
|
+
/**
|
|
8
|
+
* The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a
|
|
9
|
+
* particular invoice.
|
|
10
|
+
*/
|
|
11
|
+
export declare class CreditNotes extends APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* This endpoint is used to create a single
|
|
14
|
+
* [`Credit Note`](/invoicing/credit-notes).
|
|
15
|
+
*
|
|
16
|
+
* The credit note service period configuration supports two explicit modes:
|
|
17
|
+
*
|
|
18
|
+
* 1. Global service periods: Specify start_date and end_date at the credit note
|
|
19
|
+
* level. These dates will be applied to all line items uniformly.
|
|
20
|
+
*
|
|
21
|
+
* 2. Individual service periods: Specify start_date and end_date for each line
|
|
22
|
+
* item. When using this mode, ALL line items must have individual periods
|
|
23
|
+
* specified.
|
|
24
|
+
*
|
|
25
|
+
* 3. Default behavior: If no service periods are specified (neither global nor
|
|
26
|
+
* individual), the original invoice line item service periods will be used.
|
|
27
|
+
*
|
|
28
|
+
* Note: Mixing global and individual service periods in the same request is not
|
|
29
|
+
* allowed to prevent confusion.
|
|
30
|
+
*
|
|
31
|
+
* Service period dates are normalized to the start of the day in the customer's
|
|
32
|
+
* timezone to ensure consistent handling across different timezones.
|
|
33
|
+
*
|
|
34
|
+
* Date Format: Use start_date and end_date with format "YYYY-MM-DD" (e.g.,
|
|
35
|
+
* "2023-09-22") to match other Orb APIs like /v1/invoice_line_items.
|
|
36
|
+
*
|
|
37
|
+
* Note: Both start_date and end_date are inclusive - the service period will cover
|
|
38
|
+
* both the start date and end date completely (from start of start_date to end of
|
|
39
|
+
* end_date).
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const creditNote = await client.creditNotes.create({
|
|
44
|
+
* line_items: [
|
|
45
|
+
* {
|
|
46
|
+
* amount: 'amount',
|
|
47
|
+
* invoice_line_item_id: '4khy3nwzktxv7',
|
|
48
|
+
* },
|
|
49
|
+
* ],
|
|
50
|
+
* reason: 'duplicate',
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
create(body: CreditNoteCreateParams, options?: RequestOptions): APIPromise<Shared.CreditNote>;
|
|
55
|
+
/**
|
|
56
|
+
* Get a paginated list of CreditNotes. Users can also filter by customer_id,
|
|
57
|
+
* subscription_id, or external_customer_id. The credit notes will be returned in
|
|
58
|
+
* reverse chronological order by `creation_time`.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* // Automatically fetches more pages as needed.
|
|
63
|
+
* for await (const creditNote of client.creditNotes.list()) {
|
|
64
|
+
* // ...
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
list(query?: CreditNoteListParams | null | undefined, options?: RequestOptions): PagePromise<CreditNotesPage, Shared.CreditNote>;
|
|
69
|
+
/**
|
|
70
|
+
* This endpoint is used to fetch a single [`Credit Note`](/invoicing/credit-notes)
|
|
71
|
+
* given an identifier.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* const creditNote = await client.creditNotes.fetch(
|
|
76
|
+
* 'credit_note_id',
|
|
77
|
+
* );
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
fetch(creditNoteId: string, options?: RequestOptions): APIPromise<Shared.CreditNote>;
|
|
81
|
+
}
|
|
82
|
+
export interface CreditNoteCreateParams {
|
|
83
|
+
line_items: Array<CreditNoteCreateParams.LineItem>;
|
|
84
|
+
/**
|
|
85
|
+
* An optional reason for the credit note.
|
|
86
|
+
*/
|
|
87
|
+
reason: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory';
|
|
88
|
+
/**
|
|
89
|
+
* A date string to specify the global credit note service period end date in the
|
|
90
|
+
* customer's timezone. This will be applied to all line items that don't have
|
|
91
|
+
* their own individual service periods specified. If not provided, line items will
|
|
92
|
+
* use their original invoice line item service periods. This date is inclusive.
|
|
93
|
+
*/
|
|
94
|
+
end_date?: string | null;
|
|
95
|
+
/**
|
|
96
|
+
* An optional memo to attach to the credit note.
|
|
97
|
+
*/
|
|
98
|
+
memo?: string | null;
|
|
99
|
+
/**
|
|
100
|
+
* A date string to specify the global credit note service period start date in the
|
|
101
|
+
* customer's timezone. This will be applied to all line items that don't have
|
|
102
|
+
* their own individual service periods specified. If not provided, line items will
|
|
103
|
+
* use their original invoice line item service periods. This date is inclusive.
|
|
104
|
+
*/
|
|
105
|
+
start_date?: string | null;
|
|
106
|
+
}
|
|
107
|
+
export declare namespace CreditNoteCreateParams {
|
|
108
|
+
interface LineItem {
|
|
109
|
+
/**
|
|
110
|
+
* The total amount in the invoice's currency to credit this line item.
|
|
111
|
+
*/
|
|
112
|
+
amount: string;
|
|
113
|
+
/**
|
|
114
|
+
* The ID of the line item to credit.
|
|
115
|
+
*/
|
|
116
|
+
invoice_line_item_id: string;
|
|
117
|
+
/**
|
|
118
|
+
* A date string to specify this line item's credit note service period end date in
|
|
119
|
+
* the customer's timezone. If provided, this will be used for this specific line
|
|
120
|
+
* item. If not provided, will use the global end_date if available, otherwise
|
|
121
|
+
* defaults to the original invoice line item's end date. This date is inclusive.
|
|
122
|
+
*/
|
|
123
|
+
end_date?: string | null;
|
|
124
|
+
/**
|
|
125
|
+
* A date string to specify this line item's credit note service period start date
|
|
126
|
+
* in the customer's timezone. If provided, this will be used for this specific
|
|
127
|
+
* line item. If not provided, will use the global start_date if available,
|
|
128
|
+
* otherwise defaults to the original invoice line item's start date. This date is
|
|
129
|
+
* inclusive.
|
|
130
|
+
*/
|
|
131
|
+
start_date?: string | null;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
export interface CreditNoteListParams extends PageParams {
|
|
135
|
+
'created_at[gt]'?: string | null;
|
|
136
|
+
'created_at[gte]'?: string | null;
|
|
137
|
+
'created_at[lt]'?: string | null;
|
|
138
|
+
'created_at[lte]'?: string | null;
|
|
139
|
+
}
|
|
140
|
+
export declare namespace CreditNotes {
|
|
141
|
+
export { type CreditNoteCreateParams as CreditNoteCreateParams, type CreditNoteListParams as CreditNoteListParams, };
|
|
142
|
+
}
|
|
143
|
+
export { type CreditNotesPage };
|
|
144
|
+
//# sourceMappingURL=credit-notes.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credit-notes.d.mts","sourceRoot":"","sources":["../src/resources/credit-notes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,KAAK,MAAM,qBAAiB;AACnC,OAAO,EAAE,eAAe,EAAE,qBAAiB;AAC3C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAQ,KAAK,UAAU,EAAE,WAAW,EAAE,+BAA2B;AACxE,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;;GAGG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyCG;IACH,MAAM,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC;IAI7F;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,KAAK,GAAE,oBAAoB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,eAAe,EAAE,MAAM,CAAC,UAAU,CAAC;IAIlD;;;;;;;;;;OAUG;IACH,KAAK,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC;CA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