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
package/resources/invoices.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../resource.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { Page } from "../core/pagination.mjs";
|
|
4
|
+
import { buildHeaders } from "../internal/headers.mjs";
|
|
5
|
+
import { path } from "../internal/utils/path.mjs";
|
|
6
6
|
/**
|
|
7
7
|
* An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for
|
|
8
8
|
* a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and
|
|
@@ -51,13 +51,37 @@ export class Invoices extends APIResource {
|
|
|
51
51
|
* ```
|
|
52
52
|
*/
|
|
53
53
|
update(invoiceId, body, options) {
|
|
54
|
-
return this._client.put(`/invoices/${invoiceId}`, { body, ...options });
|
|
54
|
+
return this._client.put(path `/invoices/${invoiceId}`, { body, ...options });
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* This endpoint returns a list of all [`Invoice`](/core-concepts#invoice)s for an
|
|
58
|
+
* account in a list format.
|
|
59
|
+
*
|
|
60
|
+
* The list of invoices is ordered starting from the most recently issued invoice
|
|
61
|
+
* date. The response also includes
|
|
62
|
+
* [`pagination_metadata`](/api-reference/pagination), which lets the caller
|
|
63
|
+
* retrieve the next page of results if they exist.
|
|
64
|
+
*
|
|
65
|
+
* By default, this only returns invoices that are `issued`, `paid`, or `synced`.
|
|
66
|
+
*
|
|
67
|
+
* When fetching any `draft` invoices, this returns the last-computed invoice
|
|
68
|
+
* values for each draft invoice, which may not always be up-to-date since Orb
|
|
69
|
+
* regularly refreshes invoices asynchronously.
|
|
70
|
+
*
|
|
71
|
+
* If you don't need line item details, minimums, maximums, or discounts, prefer
|
|
72
|
+
* the [list invoices summary](/api-reference/invoice/list-invoices-summary)
|
|
73
|
+
* endpoint for better performance.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* // Automatically fetches more pages as needed.
|
|
78
|
+
* for await (const invoice of client.invoices.list()) {
|
|
79
|
+
* // ...
|
|
80
|
+
* }
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
56
83
|
list(query = {}, options) {
|
|
57
|
-
|
|
58
|
-
return this.list({}, query);
|
|
59
|
-
}
|
|
60
|
-
return this._client.getAPIList('/invoices', InvoicesPage, { query, ...options });
|
|
84
|
+
return this._client.getAPIList('/invoices', (Page), { query, ...options });
|
|
61
85
|
}
|
|
62
86
|
/**
|
|
63
87
|
* This endpoint deletes an invoice line item from a draft invoice.
|
|
@@ -68,16 +92,16 @@ export class Invoices extends APIResource {
|
|
|
68
92
|
*
|
|
69
93
|
* @example
|
|
70
94
|
* ```ts
|
|
71
|
-
* await client.invoices.deleteLineItem(
|
|
72
|
-
* 'invoice_id',
|
|
73
|
-
*
|
|
74
|
-
* );
|
|
95
|
+
* await client.invoices.deleteLineItem('line_item_id', {
|
|
96
|
+
* invoice_id: 'invoice_id',
|
|
97
|
+
* });
|
|
75
98
|
* ```
|
|
76
99
|
*/
|
|
77
|
-
deleteLineItem(
|
|
78
|
-
|
|
100
|
+
deleteLineItem(lineItemId, params, options) {
|
|
101
|
+
const { invoice_id: invoiceId } = params;
|
|
102
|
+
return this._client.delete(path `/invoices/${invoiceId}/invoice_line_items/${lineItemId}`, {
|
|
79
103
|
...options,
|
|
80
|
-
headers: { Accept: '*/*',
|
|
104
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
81
105
|
});
|
|
82
106
|
}
|
|
83
107
|
/**
|
|
@@ -90,7 +114,7 @@ export class Invoices extends APIResource {
|
|
|
90
114
|
* ```
|
|
91
115
|
*/
|
|
92
116
|
fetch(invoiceId, options) {
|
|
93
|
-
return this._client.get(`/invoices/${invoiceId}`, options);
|
|
117
|
+
return this._client.get(path `/invoices/${invoiceId}`, options);
|
|
94
118
|
}
|
|
95
119
|
/**
|
|
96
120
|
* This endpoint can be used to fetch the upcoming
|
|
@@ -107,23 +131,71 @@ export class Invoices extends APIResource {
|
|
|
107
131
|
fetchUpcoming(query, options) {
|
|
108
132
|
return this._client.get('/invoices/upcoming', { query, ...options });
|
|
109
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* This endpoint allows an eligible invoice to be issued manually. This is only
|
|
136
|
+
* possible with invoices where status is `draft`, `will_auto_issue` is false, and
|
|
137
|
+
* an `eligible_to_issue_at` is a time in the past. Issuing an invoice could
|
|
138
|
+
* possibly trigger side effects, some of which could be customer-visible (e.g.
|
|
139
|
+
* sending emails, auto-collecting payment, syncing the invoice to external
|
|
140
|
+
* providers, etc).
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```ts
|
|
144
|
+
* const invoice = await client.invoices.issue('invoice_id');
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
110
147
|
issue(invoiceId, body = {}, options) {
|
|
111
|
-
|
|
112
|
-
return this.issue(invoiceId, {}, body);
|
|
113
|
-
}
|
|
114
|
-
return this._client.post(`/invoices/${invoiceId}/issue`, { body, ...options });
|
|
148
|
+
return this._client.post(path `/invoices/${invoiceId}/issue`, { body, ...options });
|
|
115
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* This endpoint allows an eligible invoice to be issued manually. This is only
|
|
152
|
+
* possible with invoices where status is `draft`, `will_auto_issue` is false, and
|
|
153
|
+
* an `eligible_to_issue_at` is a time in the past. Issuing an invoice could
|
|
154
|
+
* possibly trigger side effects, some of which could be customer-visible (e.g.
|
|
155
|
+
* sending emails, auto-collecting payment, syncing the invoice to external
|
|
156
|
+
* providers, etc).
|
|
157
|
+
*
|
|
158
|
+
* This is a lighter-weight alternative to the issue invoice endpoint, returning an
|
|
159
|
+
* invoice summary without any line item details.
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* ```ts
|
|
163
|
+
* const response = await client.invoices.issueSummary(
|
|
164
|
+
* 'invoice_id',
|
|
165
|
+
* );
|
|
166
|
+
* ```
|
|
167
|
+
*/
|
|
116
168
|
issueSummary(invoiceId, body = {}, options) {
|
|
117
|
-
|
|
118
|
-
return this.issueSummary(invoiceId, {}, body);
|
|
119
|
-
}
|
|
120
|
-
return this._client.post(`/invoices/summary/${invoiceId}/issue`, { body, ...options });
|
|
169
|
+
return this._client.post(path `/invoices/summary/${invoiceId}/issue`, { body, ...options });
|
|
121
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* This is a lighter-weight endpoint that returns a list of all
|
|
173
|
+
* [`Invoice`](/core-concepts#invoice) summaries for an account in a list format.
|
|
174
|
+
*
|
|
175
|
+
* These invoice summaries do not include line item details, minimums, maximums,
|
|
176
|
+
* and discounts, making this endpoint more efficient.
|
|
177
|
+
*
|
|
178
|
+
* The list of invoices is ordered starting from the most recently issued invoice
|
|
179
|
+
* date. The response also includes
|
|
180
|
+
* [`pagination_metadata`](/api-reference/pagination), which lets the caller
|
|
181
|
+
* retrieve the next page of results if they exist.
|
|
182
|
+
*
|
|
183
|
+
* By default, this only returns invoices that are `issued`, `paid`, or `synced`.
|
|
184
|
+
*
|
|
185
|
+
* When fetching any `draft` invoices, this returns the last-computed invoice
|
|
186
|
+
* values for each draft invoice, which may not always be up-to-date since Orb
|
|
187
|
+
* regularly refreshes invoices asynchronously.
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* ```ts
|
|
191
|
+
* // Automatically fetches more pages as needed.
|
|
192
|
+
* for await (const invoiceListSummaryResponse of client.invoices.listSummary()) {
|
|
193
|
+
* // ...
|
|
194
|
+
* }
|
|
195
|
+
* ```
|
|
196
|
+
*/
|
|
122
197
|
listSummary(query = {}, options) {
|
|
123
|
-
|
|
124
|
-
return this.listSummary({}, query);
|
|
125
|
-
}
|
|
126
|
-
return this._client.getAPIList('/invoices/summary', InvoiceListSummaryResponsesPage, {
|
|
198
|
+
return this._client.getAPIList('/invoices/summary', (Page), {
|
|
127
199
|
query,
|
|
128
200
|
...options,
|
|
129
201
|
});
|
|
@@ -141,7 +213,7 @@ export class Invoices extends APIResource {
|
|
|
141
213
|
* ```
|
|
142
214
|
*/
|
|
143
215
|
markPaid(invoiceId, body, options) {
|
|
144
|
-
return this._client.post(`/invoices/${invoiceId}/mark_paid`, { body, ...options });
|
|
216
|
+
return this._client.post(path `/invoices/${invoiceId}/mark_paid`, { body, ...options });
|
|
145
217
|
}
|
|
146
218
|
/**
|
|
147
219
|
* This endpoint collects payment for an invoice. By default, it uses the
|
|
@@ -157,7 +229,7 @@ export class Invoices extends APIResource {
|
|
|
157
229
|
* ```
|
|
158
230
|
*/
|
|
159
231
|
pay(invoiceId, body, options) {
|
|
160
|
-
return this._client.post(`/invoices/${invoiceId}/pay`, { body, ...options });
|
|
232
|
+
return this._client.post(path `/invoices/${invoiceId}/pay`, { body, ...options });
|
|
161
233
|
}
|
|
162
234
|
/**
|
|
163
235
|
* This endpoint allows an invoice's status to be set to the `void` status. This
|
|
@@ -178,11 +250,7 @@ export class Invoices extends APIResource {
|
|
|
178
250
|
* ```
|
|
179
251
|
*/
|
|
180
252
|
void(invoiceId, options) {
|
|
181
|
-
return this._client.post(`/invoices/${invoiceId}/void`, options);
|
|
253
|
+
return this._client.post(path `/invoices/${invoiceId}/void`, options);
|
|
182
254
|
}
|
|
183
255
|
}
|
|
184
|
-
export class InvoiceListSummaryResponsesPage extends Page {
|
|
185
|
-
}
|
|
186
|
-
Invoices.InvoiceListSummaryResponsesPage = InvoiceListSummaryResponsesPage;
|
|
187
|
-
export { InvoicesPage };
|
|
188
256
|
//# sourceMappingURL=invoices.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.mjs","sourceRoot":"","sources":["../src/resources/invoices.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"invoices.mjs","sourceRoot":"","sources":["../src/resources/invoices.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { Page, type PageParams, PagePromise } from "../core/pagination.mjs";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* The Item resource represents a sellable product or good. Items are associated with all line items, billable metrics,
|
|
7
|
+
* and prices and are used for defining external sync behavior for invoices and tax calculation purposes.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Items extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* This endpoint is used to create an [Item](/core-concepts#item).
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const item = await client.items.create({
|
|
16
|
+
* name: 'API requests',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
create(body: ItemCreateParams, options?: RequestOptions): APIPromise<Item>;
|
|
21
|
+
/**
|
|
22
|
+
* This endpoint can be used to update properties on the Item.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const item = await client.items.update('item_id');
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
update(itemId: string, body: ItemUpdateParams, options?: RequestOptions): APIPromise<Item>;
|
|
30
|
+
/**
|
|
31
|
+
* This endpoint returns a list of all Items, ordered in descending order by
|
|
32
|
+
* creation time.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* // Automatically fetches more pages as needed.
|
|
37
|
+
* for await (const item of client.items.list()) {
|
|
38
|
+
* // ...
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
list(query?: ItemListParams | null | undefined, options?: RequestOptions): PagePromise<ItemsPage, Item>;
|
|
43
|
+
/**
|
|
44
|
+
* Archive item
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const item = await client.items.archive('item_id');
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
archive(itemId: string, options?: RequestOptions): APIPromise<Item>;
|
|
52
|
+
/**
|
|
53
|
+
* This endpoint returns an item identified by its item_id.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const item = await client.items.fetch('item_id');
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
fetch(itemId: string, options?: RequestOptions): APIPromise<Item>;
|
|
61
|
+
}
|
|
62
|
+
export type ItemsPage = Page<Item>;
|
|
63
|
+
/**
|
|
64
|
+
* The Item resource represents a sellable product or good. Items are associated
|
|
65
|
+
* with all line items, billable metrics, and prices and are used for defining
|
|
66
|
+
* external sync behavior for invoices and tax calculation purposes.
|
|
67
|
+
*/
|
|
68
|
+
export interface Item {
|
|
69
|
+
/**
|
|
70
|
+
* The Orb-assigned unique identifier for the item.
|
|
71
|
+
*/
|
|
72
|
+
id: string;
|
|
73
|
+
/**
|
|
74
|
+
* The time at which the item was created.
|
|
75
|
+
*/
|
|
76
|
+
created_at: string;
|
|
77
|
+
/**
|
|
78
|
+
* A list of external connections for this item, used to sync with external
|
|
79
|
+
* invoicing and tax systems.
|
|
80
|
+
*/
|
|
81
|
+
external_connections: Array<Item.ExternalConnection>;
|
|
82
|
+
/**
|
|
83
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
84
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
85
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
86
|
+
* `null`.
|
|
87
|
+
*/
|
|
88
|
+
metadata: {
|
|
89
|
+
[key: string]: string;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* The name of the item.
|
|
93
|
+
*/
|
|
94
|
+
name: string;
|
|
95
|
+
/**
|
|
96
|
+
* The time at which the item was archived. If null, the item is not archived.
|
|
97
|
+
*/
|
|
98
|
+
archived_at?: string | null;
|
|
99
|
+
}
|
|
100
|
+
export declare namespace Item {
|
|
101
|
+
/**
|
|
102
|
+
* Represents a connection between an Item and an external system for invoicing or
|
|
103
|
+
* tax calculation purposes.
|
|
104
|
+
*/
|
|
105
|
+
interface ExternalConnection {
|
|
106
|
+
/**
|
|
107
|
+
* The name of the external system this item is connected to.
|
|
108
|
+
*/
|
|
109
|
+
external_connection_name: 'stripe' | 'quickbooks' | 'bill.com' | 'netsuite' | 'taxjar' | 'avalara' | 'anrok' | 'numeral' | 'stripe_tax';
|
|
110
|
+
/**
|
|
111
|
+
* The identifier of this item in the external system.
|
|
112
|
+
*/
|
|
113
|
+
external_entity_id: string;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
export interface ItemCreateParams {
|
|
117
|
+
/**
|
|
118
|
+
* The name of the item.
|
|
119
|
+
*/
|
|
120
|
+
name: string;
|
|
121
|
+
/**
|
|
122
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
123
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
124
|
+
* by setting `metadata` to `null`.
|
|
125
|
+
*/
|
|
126
|
+
metadata?: {
|
|
127
|
+
[key: string]: string | null;
|
|
128
|
+
} | null;
|
|
129
|
+
}
|
|
130
|
+
export interface ItemUpdateParams {
|
|
131
|
+
external_connections?: Array<ItemUpdateParams.ExternalConnection> | null;
|
|
132
|
+
/**
|
|
133
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
134
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
135
|
+
* by setting `metadata` to `null`.
|
|
136
|
+
*/
|
|
137
|
+
metadata?: {
|
|
138
|
+
[key: string]: string | null;
|
|
139
|
+
} | null;
|
|
140
|
+
name?: string | null;
|
|
141
|
+
}
|
|
142
|
+
export declare namespace ItemUpdateParams {
|
|
143
|
+
/**
|
|
144
|
+
* Represents a connection between an Item and an external system for invoicing or
|
|
145
|
+
* tax calculation purposes.
|
|
146
|
+
*/
|
|
147
|
+
interface ExternalConnection {
|
|
148
|
+
/**
|
|
149
|
+
* The name of the external system this item is connected to.
|
|
150
|
+
*/
|
|
151
|
+
external_connection_name: 'stripe' | 'quickbooks' | 'bill.com' | 'netsuite' | 'taxjar' | 'avalara' | 'anrok' | 'numeral' | 'stripe_tax';
|
|
152
|
+
/**
|
|
153
|
+
* The identifier of this item in the external system.
|
|
154
|
+
*/
|
|
155
|
+
external_entity_id: string;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
export interface ItemListParams extends PageParams {
|
|
159
|
+
}
|
|
160
|
+
export declare namespace Items {
|
|
161
|
+
export { type Item as Item, type ItemsPage as ItemsPage, type ItemCreateParams as ItemCreateParams, type ItemUpdateParams as ItemUpdateParams, type ItemListParams as ItemListParams, };
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=items.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"items.d.mts","sourceRoot":"","sources":["../src/resources/items.ts"],"names":[],"mappings":"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"}
|
package/resources/items.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { APIResource } from "../resource.js";
|
|
2
|
-
import
|
|
3
|
-
import { Page, type PageParams } from "../pagination.js";
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { Page, type PageParams, PagePromise } from "../core/pagination.js";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
5
|
/**
|
|
5
6
|
* The Item resource represents a sellable product or good. Items are associated with all line items, billable metrics,
|
|
6
7
|
* and prices and are used for defining external sync behavior for invoices and tax calculation purposes.
|
|
@@ -16,7 +17,7 @@ export declare class Items extends APIResource {
|
|
|
16
17
|
* });
|
|
17
18
|
* ```
|
|
18
19
|
*/
|
|
19
|
-
create(body: ItemCreateParams, options?:
|
|
20
|
+
create(body: ItemCreateParams, options?: RequestOptions): APIPromise<Item>;
|
|
20
21
|
/**
|
|
21
22
|
* This endpoint can be used to update properties on the Item.
|
|
22
23
|
*
|
|
@@ -25,7 +26,7 @@ export declare class Items extends APIResource {
|
|
|
25
26
|
* const item = await client.items.update('item_id');
|
|
26
27
|
* ```
|
|
27
28
|
*/
|
|
28
|
-
update(itemId: string, body: ItemUpdateParams, options?:
|
|
29
|
+
update(itemId: string, body: ItemUpdateParams, options?: RequestOptions): APIPromise<Item>;
|
|
29
30
|
/**
|
|
30
31
|
* This endpoint returns a list of all Items, ordered in descending order by
|
|
31
32
|
* creation time.
|
|
@@ -38,8 +39,7 @@ export declare class Items extends APIResource {
|
|
|
38
39
|
* }
|
|
39
40
|
* ```
|
|
40
41
|
*/
|
|
41
|
-
list(query?: ItemListParams, options?:
|
|
42
|
-
list(options?: Core.RequestOptions): Core.PagePromise<ItemsPage, Item>;
|
|
42
|
+
list(query?: ItemListParams | null | undefined, options?: RequestOptions): PagePromise<ItemsPage, Item>;
|
|
43
43
|
/**
|
|
44
44
|
* Archive item
|
|
45
45
|
*
|
|
@@ -48,7 +48,7 @@ export declare class Items extends APIResource {
|
|
|
48
48
|
* const item = await client.items.archive('item_id');
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
|
-
archive(itemId: string, options?:
|
|
51
|
+
archive(itemId: string, options?: RequestOptions): APIPromise<Item>;
|
|
52
52
|
/**
|
|
53
53
|
* This endpoint returns an item identified by its item_id.
|
|
54
54
|
*
|
|
@@ -57,10 +57,9 @@ export declare class Items extends APIResource {
|
|
|
57
57
|
* const item = await client.items.fetch('item_id');
|
|
58
58
|
* ```
|
|
59
59
|
*/
|
|
60
|
-
fetch(itemId: string, options?:
|
|
61
|
-
}
|
|
62
|
-
export declare class ItemsPage extends Page<Item> {
|
|
60
|
+
fetch(itemId: string, options?: RequestOptions): APIPromise<Item>;
|
|
63
61
|
}
|
|
62
|
+
export type ItemsPage = Page<Item>;
|
|
64
63
|
/**
|
|
65
64
|
* The Item resource represents a sellable product or good. Items are associated
|
|
66
65
|
* with all line items, billable metrics, and prices and are used for defining
|
|
@@ -159,6 +158,6 @@ export declare namespace ItemUpdateParams {
|
|
|
159
158
|
export interface ItemListParams extends PageParams {
|
|
160
159
|
}
|
|
161
160
|
export declare namespace Items {
|
|
162
|
-
export { type Item as Item, ItemsPage as ItemsPage, type ItemCreateParams as ItemCreateParams, type ItemUpdateParams as ItemUpdateParams, type ItemListParams as ItemListParams, };
|
|
161
|
+
export { type Item as Item, type ItemsPage as ItemsPage, type ItemCreateParams as ItemCreateParams, type ItemUpdateParams as ItemUpdateParams, type ItemListParams as ItemListParams, };
|
|
163
162
|
}
|
|
164
163
|
//# sourceMappingURL=items.d.ts.map
|
package/resources/items.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../src/resources/items.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../src/resources/items.ts"],"names":[],"mappings":"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"}
|
package/resources/items.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
const resource_1 = require("../resource.js");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
4
|
+
exports.Items = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
8
|
/**
|
|
9
9
|
* The Item resource represents a sellable product or good. Items are associated with all line items, billable metrics,
|
|
10
10
|
* and prices and are used for defining external sync behavior for invoices and tax calculation purposes.
|
|
@@ -32,13 +32,22 @@ class Items extends resource_1.APIResource {
|
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
34
|
update(itemId, body, options) {
|
|
35
|
-
return this._client.put(`/items/${itemId}`, { body, ...options });
|
|
35
|
+
return this._client.put((0, path_1.path) `/items/${itemId}`, { body, ...options });
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* This endpoint returns a list of all Items, ordered in descending order by
|
|
39
|
+
* creation time.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* // Automatically fetches more pages as needed.
|
|
44
|
+
* for await (const item of client.items.list()) {
|
|
45
|
+
* // ...
|
|
46
|
+
* }
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
37
49
|
list(query = {}, options) {
|
|
38
|
-
|
|
39
|
-
return this.list({}, query);
|
|
40
|
-
}
|
|
41
|
-
return this._client.getAPIList('/items', ItemsPage, { query, ...options });
|
|
50
|
+
return this._client.getAPIList('/items', (pagination_1.Page), { query, ...options });
|
|
42
51
|
}
|
|
43
52
|
/**
|
|
44
53
|
* Archive item
|
|
@@ -49,7 +58,7 @@ class Items extends resource_1.APIResource {
|
|
|
49
58
|
* ```
|
|
50
59
|
*/
|
|
51
60
|
archive(itemId, options) {
|
|
52
|
-
return this._client.post(`/items/${itemId}/archive`, options);
|
|
61
|
+
return this._client.post((0, path_1.path) `/items/${itemId}/archive`, options);
|
|
53
62
|
}
|
|
54
63
|
/**
|
|
55
64
|
* This endpoint returns an item identified by its item_id.
|
|
@@ -60,12 +69,8 @@ class Items extends resource_1.APIResource {
|
|
|
60
69
|
* ```
|
|
61
70
|
*/
|
|
62
71
|
fetch(itemId, options) {
|
|
63
|
-
return this._client.get(`/items/${itemId}`, options);
|
|
72
|
+
return this._client.get((0, path_1.path) `/items/${itemId}`, options);
|
|
64
73
|
}
|
|
65
74
|
}
|
|
66
75
|
exports.Items = Items;
|
|
67
|
-
class ItemsPage extends pagination_1.Page {
|
|
68
|
-
}
|
|
69
|
-
exports.ItemsPage = ItemsPage;
|
|
70
|
-
Items.ItemsPage = ItemsPage;
|
|
71
76
|
//# sourceMappingURL=items.js.map
|
package/resources/items.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"items.js","sourceRoot":"","sources":["../src/resources/items.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"items.js","sourceRoot":"","sources":["../src/resources/items.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAwE;AAExE,oDAA8C;AAE9C;;;GAGG;AACH,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,MAAc,EAAE,IAAsB,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAA,iBAAU,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,MAAc,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,UAAU,MAAM,UAAU,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,MAAc,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;CACF;AArED,sBAqEC"}
|
package/resources/items.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../resource.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { Page } from "../core/pagination.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
5
|
/**
|
|
6
6
|
* The Item resource represents a sellable product or good. Items are associated with all line items, billable metrics,
|
|
7
7
|
* and prices and are used for defining external sync behavior for invoices and tax calculation purposes.
|
|
@@ -29,13 +29,22 @@ export class Items extends APIResource {
|
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
update(itemId, body, options) {
|
|
32
|
-
return this._client.put(`/items/${itemId}`, { body, ...options });
|
|
32
|
+
return this._client.put(path `/items/${itemId}`, { body, ...options });
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* This endpoint returns a list of all Items, ordered in descending order by
|
|
36
|
+
* creation time.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* // Automatically fetches more pages as needed.
|
|
41
|
+
* for await (const item of client.items.list()) {
|
|
42
|
+
* // ...
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
34
46
|
list(query = {}, options) {
|
|
35
|
-
|
|
36
|
-
return this.list({}, query);
|
|
37
|
-
}
|
|
38
|
-
return this._client.getAPIList('/items', ItemsPage, { query, ...options });
|
|
47
|
+
return this._client.getAPIList('/items', (Page), { query, ...options });
|
|
39
48
|
}
|
|
40
49
|
/**
|
|
41
50
|
* Archive item
|
|
@@ -46,7 +55,7 @@ export class Items extends APIResource {
|
|
|
46
55
|
* ```
|
|
47
56
|
*/
|
|
48
57
|
archive(itemId, options) {
|
|
49
|
-
return this._client.post(`/items/${itemId}/archive`, options);
|
|
58
|
+
return this._client.post(path `/items/${itemId}/archive`, options);
|
|
50
59
|
}
|
|
51
60
|
/**
|
|
52
61
|
* This endpoint returns an item identified by its item_id.
|
|
@@ -57,10 +66,7 @@ export class Items extends APIResource {
|
|
|
57
66
|
* ```
|
|
58
67
|
*/
|
|
59
68
|
fetch(itemId, options) {
|
|
60
|
-
return this._client.get(`/items/${itemId}`, options);
|
|
69
|
+
return this._client.get(path `/items/${itemId}`, options);
|
|
61
70
|
}
|
|
62
71
|
}
|
|
63
|
-
export class ItemsPage extends Page {
|
|
64
|
-
}
|
|
65
|
-
Items.ItemsPage = ItemsPage;
|
|
66
72
|
//# sourceMappingURL=items.mjs.map
|
package/resources/items.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"items.mjs","sourceRoot":"","sources":["../src/resources/items.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"items.mjs","sourceRoot":"","sources":["../src/resources/items.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,IAAI,EAAgC,+BAA2B;AAExE,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;;GAGG;AACH,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,MAAc,EAAE,IAAsB,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAA,IAAU,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,MAAc,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,UAAU,MAAM,UAAU,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,MAAc,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;CACF"}
|