dodopayments 1.53.2 → 2.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 +10 -0
- package/README.md +114 -44
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -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 +2 -0
- package/api-promise.mjs.map +1 -0
- package/bin/cli +53 -0
- package/bin/migration-config.json +6 -0
- package/client.d.mts +259 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +259 -0
- package/client.d.ts.map +1 -0
- package/client.js +536 -0
- package/client.js.map +1 -0
- package/client.mjs +532 -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 +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/pagination.d.mts +70 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +70 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +129 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +122 -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 +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +1 -46
- package/error.d.ts.map +1 -1
- package/error.js +3 -110
- package/error.js.map +1 -1
- package/error.mjs +1 -96
- package/error.mjs.map +1 -1
- package/index.d.mts +7 -190
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -189
- package/index.d.ts.map +1 -1
- package/index.js +14 -195
- package/index.js.map +1 -1
- package/index.mjs +6 -168
- 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 +35 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +32 -0
- package/internal/parse.mjs.map +1 -0
- 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 +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -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 +85 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +79 -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/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 +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +115 -66
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +1 -34
- package/pagination.d.ts.map +1 -1
- package/pagination.js +3 -71
- package/pagination.js.map +1 -1
- package/pagination.mjs +1 -68
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +1 -5
- package/resource.d.ts.map +1 -1
- package/resource.js +3 -8
- package/resource.js.map +1 -1
- package/resource.mjs +1 -6
- package/resource.mjs.map +1 -1
- package/resources/addons.d.mts +113 -0
- package/resources/addons.d.mts.map +1 -0
- package/resources/addons.d.ts +11 -12
- package/resources/addons.d.ts.map +1 -1
- package/resources/addons.js +8 -15
- package/resources/addons.js.map +1 -1
- package/resources/addons.mjs +7 -13
- package/resources/addons.mjs.map +1 -1
- package/resources/brands.d.mts +66 -0
- package/resources/brands.d.mts.map +1 -0
- package/resources/brands.d.ts +8 -7
- package/resources/brands.d.ts.map +1 -1
- package/resources/brands.js +5 -4
- package/resources/brands.js.map +1 -1
- package/resources/brands.mjs +5 -4
- package/resources/brands.mjs.map +1 -1
- package/resources/checkout-sessions.d.mts +349 -0
- package/resources/checkout-sessions.d.mts.map +1 -0
- package/resources/checkout-sessions.d.ts +4 -3
- package/resources/checkout-sessions.d.ts.map +1 -1
- package/resources/checkout-sessions.js +1 -1
- package/resources/checkout-sessions.js.map +1 -1
- package/resources/checkout-sessions.mjs +1 -1
- package/resources/checkout-sessions.mjs.map +1 -1
- package/resources/customers/customer-portal.d.mts +17 -0
- package/resources/customers/customer-portal.d.mts.map +1 -0
- package/resources/customers/customer-portal.d.ts +4 -4
- package/resources/customers/customer-portal.d.ts.map +1 -1
- package/resources/customers/customer-portal.js +5 -8
- package/resources/customers/customer-portal.js.map +1 -1
- package/resources/customers/customer-portal.mjs +5 -8
- package/resources/customers/customer-portal.mjs.map +1 -1
- package/resources/customers/customers.d.mts +49 -0
- package/resources/customers/customers.d.mts.map +1 -0
- package/resources/customers/customers.d.ts +10 -11
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +15 -41
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +11 -14
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/index.d.mts +4 -0
- package/resources/customers/index.d.mts.map +1 -0
- package/resources/customers/index.d.ts +1 -1
- package/resources/customers/index.d.ts.map +1 -1
- package/resources/customers/index.js +1 -2
- package/resources/customers/index.js.map +1 -1
- package/resources/customers/index.mjs +1 -1
- package/resources/customers/index.mjs.map +1 -1
- package/resources/customers/wallets/index.d.mts +3 -0
- package/resources/customers/wallets/index.d.mts.map +1 -0
- package/resources/customers/wallets/index.d.ts +1 -1
- package/resources/customers/wallets/index.d.ts.map +1 -1
- package/resources/customers/wallets/index.js +1 -2
- package/resources/customers/wallets/index.js.map +1 -1
- package/resources/customers/wallets/index.mjs +1 -1
- package/resources/customers/wallets/index.mjs.map +1 -1
- package/resources/customers/wallets/ledger-entries.d.mts +51 -0
- package/resources/customers/wallets/ledger-entries.d.mts.map +1 -0
- package/resources/customers/wallets/ledger-entries.d.ts +8 -9
- package/resources/customers/wallets/ledger-entries.d.ts.map +1 -1
- package/resources/customers/wallets/ledger-entries.js +8 -16
- package/resources/customers/wallets/ledger-entries.js.map +1 -1
- package/resources/customers/wallets/ledger-entries.mjs +7 -14
- package/resources/customers/wallets/ledger-entries.mjs.map +1 -1
- package/resources/customers/wallets/wallets.d.mts +29 -0
- package/resources/customers/wallets/wallets.d.mts.map +1 -0
- package/resources/customers/wallets/wallets.d.ts +5 -4
- package/resources/customers/wallets/wallets.d.ts.map +1 -1
- package/resources/customers/wallets/wallets.js +6 -29
- package/resources/customers/wallets/wallets.js.map +1 -1
- package/resources/customers/wallets/wallets.mjs +5 -6
- package/resources/customers/wallets/wallets.mjs.map +1 -1
- package/resources/customers/wallets.d.mts +2 -0
- package/resources/customers/wallets.d.mts.map +1 -0
- package/resources/customers/wallets.d.ts.map +1 -1
- package/resources/customers/wallets.js +2 -15
- package/resources/customers/wallets.js.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/discounts.d.mts +168 -0
- package/resources/discounts.d.mts.map +1 -0
- package/resources/discounts.d.ts +11 -12
- package/resources/discounts.d.ts.map +1 -1
- package/resources/discounts.js +19 -19
- package/resources/discounts.js.map +1 -1
- package/resources/discounts.mjs +18 -17
- package/resources/discounts.mjs.map +1 -1
- package/resources/disputes.d.mts +159 -0
- package/resources/disputes.d.mts.map +1 -0
- package/resources/disputes.d.ts +8 -9
- package/resources/disputes.d.ts.map +1 -1
- package/resources/disputes.js +7 -14
- package/resources/disputes.js.map +1 -1
- package/resources/disputes.mjs +6 -12
- package/resources/disputes.mjs.map +1 -1
- package/resources/index.d.mts +21 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +14 -14
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -20
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +14 -14
- package/resources/index.mjs.map +1 -1
- package/resources/invoices/index.d.mts +3 -0
- package/resources/invoices/index.d.mts.map +1 -0
- package/resources/invoices/index.d.ts.map +1 -1
- package/resources/invoices/invoices.d.mts +10 -0
- package/resources/invoices/invoices.d.mts.map +1 -0
- package/resources/invoices/invoices.d.ts +1 -1
- package/resources/invoices/invoices.d.ts.map +1 -1
- package/resources/invoices/invoices.js +3 -25
- package/resources/invoices/invoices.js.map +1 -1
- package/resources/invoices/invoices.mjs +1 -1
- package/resources/invoices/payments.d.mts +8 -0
- package/resources/invoices/payments.d.mts.map +1 -0
- package/resources/invoices/payments.d.ts +5 -5
- package/resources/invoices/payments.d.ts.map +1 -1
- package/resources/invoices/payments.js +9 -7
- package/resources/invoices/payments.js.map +1 -1
- package/resources/invoices/payments.mjs +9 -7
- package/resources/invoices/payments.mjs.map +1 -1
- package/resources/invoices.d.mts +2 -0
- package/resources/invoices.d.mts.map +1 -0
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +2 -15
- package/resources/invoices.js.map +1 -1
- package/resources/license-key-instances.d.mts +55 -0
- package/resources/license-key-instances.d.mts.map +1 -0
- package/resources/license-key-instances.d.ts +9 -10
- package/resources/license-key-instances.d.ts.map +1 -1
- package/resources/license-key-instances.js +16 -18
- package/resources/license-key-instances.js.map +1 -1
- package/resources/license-key-instances.mjs +15 -16
- package/resources/license-key-instances.mjs.map +1 -1
- package/resources/license-keys.d.mts +122 -0
- package/resources/license-keys.d.mts.map +1 -0
- package/resources/license-keys.d.ts +9 -10
- package/resources/license-keys.d.ts.map +1 -1
- package/resources/license-keys.js +16 -14
- package/resources/license-keys.js.map +1 -1
- package/resources/license-keys.mjs +15 -12
- package/resources/license-keys.mjs.map +1 -1
- package/resources/licenses.d.mts +99 -0
- package/resources/licenses.d.mts.map +1 -0
- package/resources/licenses.d.ts +6 -5
- package/resources/licenses.d.ts.map +1 -1
- package/resources/licenses.js +3 -2
- package/resources/licenses.js.map +1 -1
- package/resources/licenses.mjs +3 -2
- package/resources/licenses.mjs.map +1 -1
- package/resources/meters.d.mts +191 -0
- package/resources/meters.d.mts.map +1 -0
- package/resources/meters.d.ts +11 -12
- package/resources/meters.d.ts.map +1 -1
- package/resources/meters.js +11 -17
- package/resources/meters.js.map +1 -1
- package/resources/meters.mjs +10 -15
- package/resources/meters.mjs.map +1 -1
- package/resources/misc.d.mts +21 -0
- package/resources/misc.d.mts.map +1 -0
- package/resources/misc.d.ts +4 -3
- package/resources/misc.d.ts.map +1 -1
- package/resources/misc.js +1 -1
- package/resources/misc.js.map +1 -1
- package/resources/misc.mjs +1 -1
- package/resources/misc.mjs.map +1 -1
- package/resources/payments.d.mts +420 -0
- package/resources/payments.d.mts.map +1 -0
- package/resources/payments.d.ts +10 -11
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +9 -16
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +8 -14
- package/resources/payments.mjs.map +1 -1
- package/resources/payouts.d.mts +76 -0
- package/resources/payouts.d.mts.map +1 -0
- package/resources/payouts.d.ts +6 -8
- package/resources/payouts.d.ts.map +1 -1
- package/resources/payouts.js +4 -12
- package/resources/payouts.js.map +1 -1
- package/resources/payouts.mjs +3 -10
- package/resources/payouts.mjs.map +1 -1
- package/resources/products/images.d.mts +17 -0
- package/resources/products/images.d.mts.map +1 -0
- package/resources/products/images.d.ts +4 -4
- package/resources/products/images.d.ts.map +1 -1
- package/resources/products/images.js +4 -7
- package/resources/products/images.js.map +1 -1
- package/resources/products/images.mjs +4 -7
- package/resources/products/images.mjs.map +1 -1
- package/resources/products/index.d.mts +3 -0
- package/resources/products/index.d.mts.map +1 -0
- package/resources/products/index.d.ts +1 -1
- package/resources/products/index.d.ts.map +1 -1
- package/resources/products/index.js +1 -2
- package/resources/products/index.js.map +1 -1
- package/resources/products/index.mjs +1 -1
- package/resources/products/index.mjs.map +1 -1
- package/resources/products/products.d.mts +535 -0
- package/resources/products/products.d.mts.map +1 -0
- package/resources/products/products.d.ts +13 -14
- package/resources/products/products.d.ts.map +1 -1
- package/resources/products/products.js +16 -44
- package/resources/products/products.js.map +1 -1
- package/resources/products/products.mjs +13 -18
- package/resources/products/products.mjs.map +1 -1
- package/resources/products.d.mts +2 -0
- package/resources/products.d.mts.map +1 -0
- package/resources/products.d.ts.map +1 -1
- package/resources/products.js +2 -15
- package/resources/products.js.map +1 -1
- package/resources/refunds.d.mts +145 -0
- package/resources/refunds.d.mts.map +1 -0
- package/resources/refunds.d.ts +9 -10
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.js +7 -14
- package/resources/refunds.js.map +1 -1
- package/resources/refunds.mjs +6 -12
- package/resources/refunds.mjs.map +1 -1
- package/resources/subscriptions.d.mts +626 -0
- package/resources/subscriptions.d.mts.map +1 -0
- package/resources/subscriptions.d.ts +14 -17
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +61 -32
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +60 -29
- package/resources/subscriptions.mjs.map +1 -1
- package/resources/usage-events.d.mts +192 -0
- package/resources/usage-events.d.mts.map +1 -0
- package/resources/usage-events.d.ts +9 -10
- package/resources/usage-events.d.ts.map +1 -1
- package/resources/usage-events.js +42 -14
- package/resources/usage-events.js.map +1 -1
- package/resources/usage-events.mjs +41 -12
- package/resources/usage-events.mjs.map +1 -1
- package/resources/webhook-events.d.mts +52 -0
- package/resources/webhook-events.d.mts.map +1 -0
- package/resources/webhook-events.d.ts +1 -1
- package/resources/webhook-events.d.ts.map +1 -1
- package/resources/webhook-events.js +1 -1
- package/resources/webhook-events.js.map +1 -1
- package/resources/webhook-events.mjs +1 -1
- package/resources/webhooks/headers.d.mts +42 -0
- package/resources/webhooks/headers.d.mts.map +1 -0
- package/resources/webhooks/headers.d.ts +5 -4
- package/resources/webhooks/headers.d.ts.map +1 -1
- package/resources/webhooks/headers.js +8 -6
- package/resources/webhooks/headers.js.map +1 -1
- package/resources/webhooks/headers.mjs +8 -6
- package/resources/webhooks/headers.mjs.map +1 -1
- package/resources/webhooks/index.d.mts +3 -0
- package/resources/webhooks/index.d.mts.map +1 -0
- package/resources/webhooks/index.d.ts +1 -1
- package/resources/webhooks/index.d.ts.map +1 -1
- package/resources/webhooks/index.js +1 -2
- package/resources/webhooks/index.js.map +1 -1
- package/resources/webhooks/index.mjs +1 -1
- package/resources/webhooks/index.mjs.map +1 -1
- package/resources/webhooks/webhooks.d.mts +155 -0
- package/resources/webhooks/webhooks.d.mts.map +1 -0
- package/resources/webhooks/webhooks.d.ts +12 -13
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/resources/webhooks/webhooks.js +20 -45
- package/resources/webhooks/webhooks.js.map +1 -1
- package/resources/webhooks/webhooks.mjs +17 -19
- package/resources/webhooks/webhooks.mjs.map +1 -1
- package/resources/webhooks.d.mts +2 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +2 -15
- package/resources/webhooks.js.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/src/api-promise.ts +2 -0
- package/src/client.ts +1206 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/pagination.ts +218 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -130
- package/src/index.ts +6 -658
- 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 +50 -0
- 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 +95 -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 +126 -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 +8 -0
- package/src/pagination.ts +2 -125
- package/src/resource.ts +2 -11
- package/src/resources/addons.ts +23 -30
- package/src/resources/brands.ts +12 -10
- package/src/resources/checkout-sessions.ts +7 -9
- package/src/resources/customers/customer-portal.ts +11 -22
- package/src/resources/customers/customers.ts +27 -32
- package/src/resources/customers/index.ts +4 -4
- package/src/resources/customers/wallets/index.ts +3 -3
- package/src/resources/customers/wallets/ledger-entries.ts +24 -33
- package/src/resources/customers/wallets/wallets.ts +10 -10
- package/src/resources/customers/wallets.ts +1 -1
- package/src/resources/customers.ts +1 -1
- package/src/resources/discounts.ts +27 -32
- package/src/resources/disputes.ts +19 -25
- package/src/resources/index.ts +42 -42
- package/src/resources/invoices/index.ts +2 -2
- package/src/resources/invoices/invoices.ts +3 -3
- package/src/resources/invoices/payments.ts +11 -9
- package/src/resources/invoices.ts +1 -1
- package/src/resources/license-key-instances.ts +24 -31
- package/src/resources/license-keys.ts +19 -28
- package/src/resources/licenses.ts +9 -13
- package/src/resources/meters.ts +25 -29
- package/src/resources/misc.ts +4 -3
- package/src/resources/payments.ts +26 -32
- package/src/resources/payouts.ts +14 -23
- package/src/resources/products/images.ts +9 -17
- package/src/resources/products/index.ts +3 -3
- package/src/resources/products/products.ts +37 -41
- package/src/resources/products.ts +1 -1
- package/src/resources/refunds.ts +20 -27
- package/src/resources/subscriptions.ts +44 -72
- package/src/resources/usage-events.ts +18 -26
- package/src/resources/webhook-events.ts +6 -6
- package/src/resources/webhooks/headers.ts +10 -7
- package/src/resources/webhooks/index.ts +3 -3
- package/src/resources/webhooks/webhooks.ts +25 -39
- package/src/resources/webhooks.ts +1 -1
- package/src/resources.ts +1 -1
- package/src/tsconfig.json +2 -2
- package/src/uploads.ts +2 -255
- package/src/version.ts +1 -1
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +1 -74
- package/uploads.d.ts.map +1 -1
- package/uploads.js +3 -168
- package/uploads.js.map +1 -1
- package/uploads.mjs +1 -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 -924
- package/core.js.map +0 -1
- package/core.mjs +0 -892
- 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 -1237
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
|
@@ -1,35 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
-
if (mod && mod.__esModule) return mod;
|
|
21
|
-
var result = {};
|
|
22
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
-
__setModuleDefault(result, mod);
|
|
24
|
-
return result;
|
|
25
|
-
};
|
|
26
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const ImagesAPI = __importStar(require("./images.js"));
|
|
4
|
+
exports.Products = void 0;
|
|
5
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../core/resource.js");
|
|
7
|
+
const ImagesAPI = tslib_1.__importStar(require("./images.js"));
|
|
31
8
|
const images_1 = require("./images.js");
|
|
32
|
-
const pagination_1 = require("../../pagination.js");
|
|
9
|
+
const pagination_1 = require("../../core/pagination.js");
|
|
10
|
+
const headers_1 = require("../../internal/headers.js");
|
|
11
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
33
12
|
class Products extends resource_1.APIResource {
|
|
34
13
|
constructor() {
|
|
35
14
|
super(...arguments);
|
|
@@ -39,44 +18,37 @@ class Products extends resource_1.APIResource {
|
|
|
39
18
|
return this._client.post('/products', { body, ...options });
|
|
40
19
|
}
|
|
41
20
|
retrieve(id, options) {
|
|
42
|
-
return this._client.get(`/products/${id}`, options);
|
|
21
|
+
return this._client.get((0, path_1.path) `/products/${id}`, options);
|
|
43
22
|
}
|
|
44
23
|
update(id, body, options) {
|
|
45
|
-
return this._client.patch(`/products/${id}`, {
|
|
24
|
+
return this._client.patch((0, path_1.path) `/products/${id}`, {
|
|
46
25
|
body,
|
|
47
26
|
...options,
|
|
48
|
-
headers: { Accept: '*/*',
|
|
27
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
49
28
|
});
|
|
50
29
|
}
|
|
51
30
|
list(query = {}, options) {
|
|
52
|
-
|
|
53
|
-
return this.list({}, query);
|
|
54
|
-
}
|
|
55
|
-
return this._client.getAPIList('/products', ProductListResponsesDefaultPageNumberPagination, {
|
|
31
|
+
return this._client.getAPIList('/products', (pagination_1.DefaultPageNumberPagination), {
|
|
56
32
|
query,
|
|
57
33
|
...options,
|
|
58
34
|
});
|
|
59
35
|
}
|
|
60
36
|
archive(id, options) {
|
|
61
|
-
return this._client.delete(`/products/${id}`, {
|
|
37
|
+
return this._client.delete((0, path_1.path) `/products/${id}`, {
|
|
62
38
|
...options,
|
|
63
|
-
headers: { Accept: '*/*',
|
|
39
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
64
40
|
});
|
|
65
41
|
}
|
|
66
42
|
unarchive(id, options) {
|
|
67
|
-
return this._client.post(`/products/${id}/unarchive`, {
|
|
43
|
+
return this._client.post((0, path_1.path) `/products/${id}/unarchive`, {
|
|
68
44
|
...options,
|
|
69
|
-
headers: { Accept: '*/*',
|
|
45
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
70
46
|
});
|
|
71
47
|
}
|
|
72
48
|
updateFiles(id, body, options) {
|
|
73
|
-
return this._client.put(`/products/${id}/files`, { body, ...options });
|
|
49
|
+
return this._client.put((0, path_1.path) `/products/${id}/files`, { body, ...options });
|
|
74
50
|
}
|
|
75
51
|
}
|
|
76
52
|
exports.Products = Products;
|
|
77
|
-
class ProductListResponsesDefaultPageNumberPagination extends pagination_1.DefaultPageNumberPagination {
|
|
78
|
-
}
|
|
79
|
-
exports.ProductListResponsesDefaultPageNumberPagination = ProductListResponsesDefaultPageNumberPagination;
|
|
80
|
-
Products.ProductListResponsesDefaultPageNumberPagination = ProductListResponsesDefaultPageNumberPagination;
|
|
81
53
|
Products.Images = images_1.Images;
|
|
82
54
|
//# sourceMappingURL=products.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.js","sourceRoot":"","sources":["../../src/resources/products/products.ts"],"names":[],"mappings":";AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"products.js","sourceRoot":"","sources":["../../src/resources/products/products.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAIlD,+DAAsC;AACtC,wCAA0E;AAE1E,yDAI+B;AAC/B,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiDhE,CAAC;IA/CC,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,EAAE,EA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EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF;AAlDD,4BAkDC;AA4mBD,QAAQ,CAAC,MAAM,GAAG,eAAM,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../../resource.mjs";
|
|
3
|
-
import { isRequestOptions } from "../../core.mjs";
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
4
3
|
import * as ImagesAPI from "./images.mjs";
|
|
5
4
|
import { Images } from "./images.mjs";
|
|
6
|
-
import { DefaultPageNumberPagination } from "../../pagination.mjs";
|
|
5
|
+
import { DefaultPageNumberPagination, } from "../../core/pagination.mjs";
|
|
6
|
+
import { buildHeaders } from "../../internal/headers.mjs";
|
|
7
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
7
8
|
export class Products extends APIResource {
|
|
8
9
|
constructor() {
|
|
9
10
|
super(...arguments);
|
|
@@ -13,42 +14,36 @@ export class Products extends APIResource {
|
|
|
13
14
|
return this._client.post('/products', { body, ...options });
|
|
14
15
|
}
|
|
15
16
|
retrieve(id, options) {
|
|
16
|
-
return this._client.get(`/products/${id}`, options);
|
|
17
|
+
return this._client.get(path `/products/${id}`, options);
|
|
17
18
|
}
|
|
18
19
|
update(id, body, options) {
|
|
19
|
-
return this._client.patch(`/products/${id}`, {
|
|
20
|
+
return this._client.patch(path `/products/${id}`, {
|
|
20
21
|
body,
|
|
21
22
|
...options,
|
|
22
|
-
headers: { Accept: '*/*',
|
|
23
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
23
24
|
});
|
|
24
25
|
}
|
|
25
26
|
list(query = {}, options) {
|
|
26
|
-
|
|
27
|
-
return this.list({}, query);
|
|
28
|
-
}
|
|
29
|
-
return this._client.getAPIList('/products', ProductListResponsesDefaultPageNumberPagination, {
|
|
27
|
+
return this._client.getAPIList('/products', (DefaultPageNumberPagination), {
|
|
30
28
|
query,
|
|
31
29
|
...options,
|
|
32
30
|
});
|
|
33
31
|
}
|
|
34
32
|
archive(id, options) {
|
|
35
|
-
return this._client.delete(`/products/${id}`, {
|
|
33
|
+
return this._client.delete(path `/products/${id}`, {
|
|
36
34
|
...options,
|
|
37
|
-
headers: { Accept: '*/*',
|
|
35
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
38
36
|
});
|
|
39
37
|
}
|
|
40
38
|
unarchive(id, options) {
|
|
41
|
-
return this._client.post(`/products/${id}/unarchive`, {
|
|
39
|
+
return this._client.post(path `/products/${id}/unarchive`, {
|
|
42
40
|
...options,
|
|
43
|
-
headers: { Accept: '*/*',
|
|
41
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
44
42
|
});
|
|
45
43
|
}
|
|
46
44
|
updateFiles(id, body, options) {
|
|
47
|
-
return this._client.put(`/products/${id}/files`, { body, ...options });
|
|
45
|
+
return this._client.put(path `/products/${id}/files`, { body, ...options });
|
|
48
46
|
}
|
|
49
47
|
}
|
|
50
|
-
export class ProductListResponsesDefaultPageNumberPagination extends DefaultPageNumberPagination {
|
|
51
|
-
}
|
|
52
|
-
Products.ProductListResponsesDefaultPageNumberPagination = ProductListResponsesDefaultPageNumberPagination;
|
|
53
48
|
Products.Images = Images;
|
|
54
49
|
//# sourceMappingURL=products.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.mjs","sourceRoot":"","sources":["../../src/resources/products/products.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"products.mjs","sourceRoot":"","sources":["../../src/resources/products/products.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,KAAK,SAAS;OACd,EAA0C,MAAM,EAAE;OAElD,EACL,2BAA2B,GAG5B;OACM,EAAE,YAAY,EAAE;OAEhB,EAAE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AAC,EAAU,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,EAAE,YAAY,EAAE;YACxD,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,WAAW,CACT,EAAU,EACV,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF;AA4mBD,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"products.d.mts","sourceRoot":"","sources":["../src/resources/products.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../src/resources/products.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../src/resources/products.ts"],"names":[],"mappings":""}
|
package/resources/products.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("./products/index.js"), exports);
|
|
19
6
|
//# sourceMappingURL=products.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.js","sourceRoot":"","sources":["../src/resources/products.ts"],"names":[],"mappings":";AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"products.js","sourceRoot":"","sources":["../src/resources/products.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8DAAiC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as MiscAPI from "./misc.mjs";
|
|
3
|
+
import * as PaymentsAPI from "./payments.mjs";
|
|
4
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
5
|
+
import { DefaultPageNumberPagination, type DefaultPageNumberPaginationParams, PagePromise } from "../core/pagination.mjs";
|
|
6
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
7
|
+
export declare class Refunds extends APIResource {
|
|
8
|
+
create(body: RefundCreateParams, options?: RequestOptions): APIPromise<Refund>;
|
|
9
|
+
retrieve(refundID: string, options?: RequestOptions): APIPromise<Refund>;
|
|
10
|
+
list(query?: RefundListParams | null | undefined, options?: RequestOptions): PagePromise<RefundListResponsesDefaultPageNumberPagination, RefundListResponse>;
|
|
11
|
+
}
|
|
12
|
+
export type RefundListResponsesDefaultPageNumberPagination = DefaultPageNumberPagination<RefundListResponse>;
|
|
13
|
+
export interface Refund {
|
|
14
|
+
/**
|
|
15
|
+
* The unique identifier of the business issuing the refund.
|
|
16
|
+
*/
|
|
17
|
+
business_id: string;
|
|
18
|
+
/**
|
|
19
|
+
* The timestamp of when the refund was created in UTC.
|
|
20
|
+
*/
|
|
21
|
+
created_at: string;
|
|
22
|
+
/**
|
|
23
|
+
* Details about the customer for this refund (from the associated payment)
|
|
24
|
+
*/
|
|
25
|
+
customer: PaymentsAPI.CustomerLimitedDetails;
|
|
26
|
+
/**
|
|
27
|
+
* If true the refund is a partial refund
|
|
28
|
+
*/
|
|
29
|
+
is_partial: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* The unique identifier of the payment associated with the refund.
|
|
32
|
+
*/
|
|
33
|
+
payment_id: string;
|
|
34
|
+
/**
|
|
35
|
+
* The unique identifier of the refund.
|
|
36
|
+
*/
|
|
37
|
+
refund_id: string;
|
|
38
|
+
/**
|
|
39
|
+
* The current status of the refund.
|
|
40
|
+
*/
|
|
41
|
+
status: RefundStatus;
|
|
42
|
+
/**
|
|
43
|
+
* The refunded amount.
|
|
44
|
+
*/
|
|
45
|
+
amount?: number | null;
|
|
46
|
+
/**
|
|
47
|
+
* The currency of the refund, represented as an ISO 4217 currency code.
|
|
48
|
+
*/
|
|
49
|
+
currency?: MiscAPI.Currency | null;
|
|
50
|
+
/**
|
|
51
|
+
* The reason provided for the refund, if any. Optional.
|
|
52
|
+
*/
|
|
53
|
+
reason?: string | null;
|
|
54
|
+
}
|
|
55
|
+
export type RefundStatus = 'succeeded' | 'failed' | 'pending' | 'review';
|
|
56
|
+
export interface RefundListResponse {
|
|
57
|
+
/**
|
|
58
|
+
* The unique identifier of the business issuing the refund.
|
|
59
|
+
*/
|
|
60
|
+
business_id: string;
|
|
61
|
+
/**
|
|
62
|
+
* The timestamp of when the refund was created in UTC.
|
|
63
|
+
*/
|
|
64
|
+
created_at: string;
|
|
65
|
+
/**
|
|
66
|
+
* If true the refund is a partial refund
|
|
67
|
+
*/
|
|
68
|
+
is_partial: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* The unique identifier of the payment associated with the refund.
|
|
71
|
+
*/
|
|
72
|
+
payment_id: string;
|
|
73
|
+
/**
|
|
74
|
+
* The unique identifier of the refund.
|
|
75
|
+
*/
|
|
76
|
+
refund_id: string;
|
|
77
|
+
/**
|
|
78
|
+
* The current status of the refund.
|
|
79
|
+
*/
|
|
80
|
+
status: RefundStatus;
|
|
81
|
+
/**
|
|
82
|
+
* The refunded amount.
|
|
83
|
+
*/
|
|
84
|
+
amount?: number | null;
|
|
85
|
+
/**
|
|
86
|
+
* The currency of the refund, represented as an ISO 4217 currency code.
|
|
87
|
+
*/
|
|
88
|
+
currency?: MiscAPI.Currency | null;
|
|
89
|
+
/**
|
|
90
|
+
* The reason provided for the refund, if any. Optional.
|
|
91
|
+
*/
|
|
92
|
+
reason?: string | null;
|
|
93
|
+
}
|
|
94
|
+
export interface RefundCreateParams {
|
|
95
|
+
/**
|
|
96
|
+
* The unique identifier of the payment to be refunded.
|
|
97
|
+
*/
|
|
98
|
+
payment_id: string;
|
|
99
|
+
/**
|
|
100
|
+
* Partially Refund an Individual Item
|
|
101
|
+
*/
|
|
102
|
+
items?: Array<RefundCreateParams.Item> | null;
|
|
103
|
+
/**
|
|
104
|
+
* The reason for the refund, if any. Maximum length is 3000 characters. Optional.
|
|
105
|
+
*/
|
|
106
|
+
reason?: string | null;
|
|
107
|
+
}
|
|
108
|
+
export declare namespace RefundCreateParams {
|
|
109
|
+
interface Item {
|
|
110
|
+
/**
|
|
111
|
+
* The id of the item (i.e. `product_id` or `addon_id`)
|
|
112
|
+
*/
|
|
113
|
+
item_id: string;
|
|
114
|
+
/**
|
|
115
|
+
* The amount to refund. if None the whole item is refunded
|
|
116
|
+
*/
|
|
117
|
+
amount?: number | null;
|
|
118
|
+
/**
|
|
119
|
+
* Specify if tax is inclusive of the refund. Default true.
|
|
120
|
+
*/
|
|
121
|
+
tax_inclusive?: boolean;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
export interface RefundListParams extends DefaultPageNumberPaginationParams {
|
|
125
|
+
/**
|
|
126
|
+
* Get events after this created time
|
|
127
|
+
*/
|
|
128
|
+
created_at_gte?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Get events created before this time
|
|
131
|
+
*/
|
|
132
|
+
created_at_lte?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Filter by customer_id
|
|
135
|
+
*/
|
|
136
|
+
customer_id?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Filter by status
|
|
139
|
+
*/
|
|
140
|
+
status?: 'succeeded' | 'failed' | 'pending' | 'review';
|
|
141
|
+
}
|
|
142
|
+
export declare namespace Refunds {
|
|
143
|
+
export { type Refund as Refund, type RefundStatus as RefundStatus, type RefundListResponse as RefundListResponse, type RefundListResponsesDefaultPageNumberPagination as RefundListResponsesDefaultPageNumberPagination, type RefundCreateParams as RefundCreateParams, type RefundListParams as RefundListParams, };
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=refunds.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refunds.d.mts","sourceRoot":"","sources":["../src/resources/refunds.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EACL,2BAA2B,EAC3B,KAAK,iCAAiC,EACtC,WAAW,EACZ;OACM,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAI9E,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAIxE,IAAI,CACF,KAAK,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,8CAA8C,EAAE,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;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAE9C;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,yBAAiB,kBAAkB,CAAC;IAClC,UAAiB,IAAI;QACnB;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEvB;;WAEG;QACH,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB;CACF;AAED,MAAM,WAAW,gBAAiB,SAAQ,iCAAiC;IACzE;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;CACxD;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,8CAA8C,IAAI,8CAA8C,EACrG,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
package/resources/refunds.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { APIResource } from "../resource.js";
|
|
2
|
-
import * as Core from "../core.js";
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
3
2
|
import * as MiscAPI from "./misc.js";
|
|
4
3
|
import * as PaymentsAPI from "./payments.js";
|
|
5
|
-
import {
|
|
4
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
5
|
+
import { DefaultPageNumberPagination, type DefaultPageNumberPaginationParams, PagePromise } from "../core/pagination.js";
|
|
6
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
6
7
|
export declare class Refunds extends APIResource {
|
|
7
|
-
create(body: RefundCreateParams, options?:
|
|
8
|
-
retrieve(
|
|
9
|
-
list(query?: RefundListParams, options?:
|
|
10
|
-
list(options?: Core.RequestOptions): Core.PagePromise<RefundListResponsesDefaultPageNumberPagination, RefundListResponse>;
|
|
11
|
-
}
|
|
12
|
-
export declare class RefundListResponsesDefaultPageNumberPagination extends DefaultPageNumberPagination<RefundListResponse> {
|
|
8
|
+
create(body: RefundCreateParams, options?: RequestOptions): APIPromise<Refund>;
|
|
9
|
+
retrieve(refundID: string, options?: RequestOptions): APIPromise<Refund>;
|
|
10
|
+
list(query?: RefundListParams | null | undefined, options?: RequestOptions): PagePromise<RefundListResponsesDefaultPageNumberPagination, RefundListResponse>;
|
|
13
11
|
}
|
|
12
|
+
export type RefundListResponsesDefaultPageNumberPagination = DefaultPageNumberPagination<RefundListResponse>;
|
|
14
13
|
export interface Refund {
|
|
15
14
|
/**
|
|
16
15
|
* The unique identifier of the business issuing the refund.
|
|
@@ -141,6 +140,6 @@ export interface RefundListParams extends DefaultPageNumberPaginationParams {
|
|
|
141
140
|
status?: 'succeeded' | 'failed' | 'pending' | 'review';
|
|
142
141
|
}
|
|
143
142
|
export declare namespace Refunds {
|
|
144
|
-
export { type Refund as Refund, type RefundStatus as RefundStatus, type RefundListResponse as RefundListResponse, RefundListResponsesDefaultPageNumberPagination as RefundListResponsesDefaultPageNumberPagination, type RefundCreateParams as RefundCreateParams, type RefundListParams as RefundListParams, };
|
|
143
|
+
export { type Refund as Refund, type RefundStatus as RefundStatus, type RefundListResponse as RefundListResponse, type RefundListResponsesDefaultPageNumberPagination as RefundListResponsesDefaultPageNumberPagination, type RefundCreateParams as RefundCreateParams, type RefundListParams as RefundListParams, };
|
|
145
144
|
}
|
|
146
145
|
//# sourceMappingURL=refunds.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refunds.d.ts","sourceRoot":"","sources":["../src/resources/refunds.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"refunds.d.ts","sourceRoot":"","sources":["../src/resources/refunds.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EACL,2BAA2B,EAC3B,KAAK,iCAAiC,EACtC,WAAW,EACZ;OACM,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAI9E,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAIxE,IAAI,CACF,KAAK,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,8CAA8C,EAAE,kBAAkB,CAAC;CAMnF;AAED,MAAM,MAAM,8CAA8C,GAAG,2BAA2B,CAAC,kBAAkB,CAAC,CAAC;AAE7G,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,WAAW,CAAC,sBAAsB,CAAC;IAE7C;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH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G;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;CACxD;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,8CAA8C,IAAI,8CAA8C,EACrG,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
package/resources/refunds.js
CHANGED
|
@@ -1,30 +1,23 @@
|
|
|
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.Refunds = 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
|
class Refunds extends resource_1.APIResource {
|
|
9
9
|
create(body, options) {
|
|
10
10
|
return this._client.post('/refunds', { body, ...options });
|
|
11
11
|
}
|
|
12
|
-
retrieve(
|
|
13
|
-
return this._client.get(`/refunds/${
|
|
12
|
+
retrieve(refundID, options) {
|
|
13
|
+
return this._client.get((0, path_1.path) `/refunds/${refundID}`, options);
|
|
14
14
|
}
|
|
15
15
|
list(query = {}, options) {
|
|
16
|
-
|
|
17
|
-
return this.list({}, query);
|
|
18
|
-
}
|
|
19
|
-
return this._client.getAPIList('/refunds', RefundListResponsesDefaultPageNumberPagination, {
|
|
16
|
+
return this._client.getAPIList('/refunds', (pagination_1.DefaultPageNumberPagination), {
|
|
20
17
|
query,
|
|
21
18
|
...options,
|
|
22
19
|
});
|
|
23
20
|
}
|
|
24
21
|
}
|
|
25
22
|
exports.Refunds = Refunds;
|
|
26
|
-
class RefundListResponsesDefaultPageNumberPagination extends pagination_1.DefaultPageNumberPagination {
|
|
27
|
-
}
|
|
28
|
-
exports.RefundListResponsesDefaultPageNumberPagination = RefundListResponsesDefaultPageNumberPagination;
|
|
29
|
-
Refunds.RefundListResponsesDefaultPageNumberPagination = RefundListResponsesDefaultPageNumberPagination;
|
|
30
23
|
//# sourceMappingURL=refunds.js.map
|
package/resources/refunds.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refunds.js","sourceRoot":"","sources":["../src/resources/refunds.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"refunds.js","sourceRoot":"","sources":["../src/resources/refunds.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,sDAI4B;AAE5B,oDAA8C;AAE9C,MAAa,OAAQ,SAAQ,sBAAW;IACtC,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,YAAY,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,CAAA,wCAA+C,CAAA,EAAE;YAC1F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAlBD,0BAkBC"}
|
package/resources/refunds.mjs
CHANGED
|
@@ -1,25 +1,19 @@
|
|
|
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 { DefaultPageNumberPagination, } from "../core/pagination.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
5
|
export class Refunds extends APIResource {
|
|
6
6
|
create(body, options) {
|
|
7
7
|
return this._client.post('/refunds', { body, ...options });
|
|
8
8
|
}
|
|
9
|
-
retrieve(
|
|
10
|
-
return this._client.get(`/refunds/${
|
|
9
|
+
retrieve(refundID, options) {
|
|
10
|
+
return this._client.get(path `/refunds/${refundID}`, options);
|
|
11
11
|
}
|
|
12
12
|
list(query = {}, options) {
|
|
13
|
-
|
|
14
|
-
return this.list({}, query);
|
|
15
|
-
}
|
|
16
|
-
return this._client.getAPIList('/refunds', RefundListResponsesDefaultPageNumberPagination, {
|
|
13
|
+
return this._client.getAPIList('/refunds', (DefaultPageNumberPagination), {
|
|
17
14
|
query,
|
|
18
15
|
...options,
|
|
19
16
|
});
|
|
20
17
|
}
|
|
21
18
|
}
|
|
22
|
-
export class RefundListResponsesDefaultPageNumberPagination extends DefaultPageNumberPagination {
|
|
23
|
-
}
|
|
24
|
-
Refunds.RefundListResponsesDefaultPageNumberPagination = RefundListResponsesDefaultPageNumberPagination;
|
|
25
19
|
//# sourceMappingURL=refunds.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refunds.mjs","sourceRoot":"","sources":["../src/resources/refunds.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"refunds.mjs","sourceRoot":"","sources":["../src/resources/refunds.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EACL,2BAA2B,GAG5B;OAEM,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,CAAA,2BAA+C,CAAA,EAAE;YAC1F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|