@stigg/typescript 0.1.0-beta.65 → 0.1.0-beta.66
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 +16 -0
- package/package.json +1 -1
- package/resources/v1/addons/addons.d.mts +59 -0
- package/resources/v1/addons/addons.d.mts.map +1 -1
- package/resources/v1/addons/addons.d.ts +59 -0
- package/resources/v1/addons/addons.d.ts.map +1 -1
- package/resources/v1/addons/addons.js +59 -0
- package/resources/v1/addons/addons.js.map +1 -1
- package/resources/v1/addons/addons.mjs +59 -0
- package/resources/v1/addons/addons.mjs.map +1 -1
- package/resources/v1/addons/entitlements.d.mts +31 -0
- package/resources/v1/addons/entitlements.d.mts.map +1 -1
- package/resources/v1/addons/entitlements.d.ts +31 -0
- package/resources/v1/addons/entitlements.d.ts.map +1 -1
- package/resources/v1/addons/entitlements.js +31 -0
- package/resources/v1/addons/entitlements.js.map +1 -1
- package/resources/v1/addons/entitlements.mjs +31 -0
- package/resources/v1/addons/entitlements.mjs.map +1 -1
- package/resources/v1/contracts.d.mts +30 -0
- package/resources/v1/contracts.d.mts.map +1 -1
- package/resources/v1/contracts.d.ts +30 -0
- package/resources/v1/contracts.d.ts.map +1 -1
- package/resources/v1/contracts.js +30 -0
- package/resources/v1/contracts.js.map +1 -1
- package/resources/v1/contracts.mjs +30 -0
- package/resources/v1/contracts.mjs.map +1 -1
- package/resources/v1/coupons.d.mts +36 -0
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +36 -0
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/coupons.js +36 -0
- package/resources/v1/coupons.js.map +1 -1
- package/resources/v1/coupons.mjs +36 -0
- package/resources/v1/coupons.mjs.map +1 -1
- package/resources/v1/credits/consumption.d.mts +26 -0
- package/resources/v1/credits/consumption.d.mts.map +1 -1
- package/resources/v1/credits/consumption.d.ts +26 -0
- package/resources/v1/credits/consumption.d.ts.map +1 -1
- package/resources/v1/credits/consumption.js +26 -0
- package/resources/v1/credits/consumption.js.map +1 -1
- package/resources/v1/credits/consumption.mjs +26 -0
- package/resources/v1/credits/consumption.mjs.map +1 -1
- package/resources/v1/credits/credits.d.mts +25 -0
- package/resources/v1/credits/credits.d.mts.map +1 -1
- package/resources/v1/credits/credits.d.ts +25 -0
- package/resources/v1/credits/credits.d.ts.map +1 -1
- package/resources/v1/credits/credits.js +25 -0
- package/resources/v1/credits/credits.js.map +1 -1
- package/resources/v1/credits/credits.mjs +25 -0
- package/resources/v1/credits/credits.mjs.map +1 -1
- package/resources/v1/credits/custom-currencies.d.mts +49 -0
- package/resources/v1/credits/custom-currencies.d.mts.map +1 -1
- package/resources/v1/credits/custom-currencies.d.ts +49 -0
- package/resources/v1/credits/custom-currencies.d.ts.map +1 -1
- package/resources/v1/credits/custom-currencies.js +49 -0
- package/resources/v1/credits/custom-currencies.js.map +1 -1
- package/resources/v1/credits/custom-currencies.mjs +49 -0
- package/resources/v1/credits/custom-currencies.mjs.map +1 -1
- package/resources/v1/credits/grants.d.mts +28 -0
- package/resources/v1/credits/grants.d.mts.map +1 -1
- package/resources/v1/credits/grants.d.ts +28 -0
- package/resources/v1/credits/grants.d.ts.map +1 -1
- package/resources/v1/credits/grants.js +28 -0
- package/resources/v1/credits/grants.js.map +1 -1
- package/resources/v1/credits/grants.mjs +28 -0
- package/resources/v1/credits/grants.mjs.map +1 -1
- package/resources/v1/credits/reservations.d.mts +10 -0
- package/resources/v1/credits/reservations.d.mts.map +1 -1
- package/resources/v1/credits/reservations.d.ts +10 -0
- package/resources/v1/credits/reservations.d.ts.map +1 -1
- package/resources/v1/credits/reservations.js +10 -0
- package/resources/v1/credits/reservations.js.map +1 -1
- package/resources/v1/credits/reservations.mjs +10 -0
- package/resources/v1/credits/reservations.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +182 -7
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +182 -7
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +106 -6
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +106 -6
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/entities/entities.d.mts +332 -0
- package/resources/v1/customers/entities/entities.d.mts.map +1 -0
- package/resources/v1/customers/entities/entities.d.ts +332 -0
- package/resources/v1/customers/entities/entities.d.ts.map +1 -0
- package/resources/v1/customers/entities/entities.js +139 -0
- package/resources/v1/customers/entities/entities.js.map +1 -0
- package/resources/v1/customers/entities/entities.mjs +134 -0
- package/resources/v1/customers/entities/entities.mjs.map +1 -0
- package/resources/v1/customers/entities/entitlements.d.mts +260 -0
- package/resources/v1/customers/entities/entitlements.d.mts.map +1 -0
- package/resources/v1/customers/entities/entitlements.d.ts +260 -0
- package/resources/v1/customers/entities/entitlements.d.ts.map +1 -0
- package/resources/v1/customers/entities/entitlements.js +87 -0
- package/resources/v1/customers/entities/entitlements.js.map +1 -0
- package/resources/v1/customers/entities/entitlements.mjs +83 -0
- package/resources/v1/customers/entities/entitlements.mjs.map +1 -0
- package/resources/v1/customers/entities/index.d.mts +3 -0
- package/resources/v1/customers/entities/index.d.mts.map +1 -0
- package/resources/v1/customers/entities/index.d.ts +3 -0
- package/resources/v1/customers/entities/index.d.ts.map +1 -0
- package/resources/v1/customers/entities/index.js +9 -0
- package/resources/v1/customers/entities/index.js.map +1 -0
- package/resources/v1/customers/entities/index.mjs +4 -0
- package/resources/v1/customers/entities/index.mjs.map +1 -0
- package/resources/v1/customers/entities.d.mts +2 -0
- package/resources/v1/customers/entities.d.mts.map +1 -0
- package/resources/v1/customers/entities.d.ts +2 -0
- package/resources/v1/customers/entities.d.ts.map +1 -0
- package/resources/v1/customers/entities.js +6 -0
- package/resources/v1/customers/entities.js.map +1 -0
- package/resources/v1/customers/entities.mjs +3 -0
- package/resources/v1/customers/entities.mjs.map +1 -0
- package/resources/v1/customers/index.d.mts +1 -0
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts +1 -0
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js +3 -1
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs +1 -0
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/integrations.d.mts +47 -0
- package/resources/v1/customers/integrations.d.mts.map +1 -1
- package/resources/v1/customers/integrations.d.ts +47 -0
- package/resources/v1/customers/integrations.d.ts.map +1 -1
- package/resources/v1/customers/integrations.js +47 -0
- package/resources/v1/customers/integrations.js.map +1 -1
- package/resources/v1/customers/integrations.mjs +47 -0
- package/resources/v1/customers/integrations.mjs.map +1 -1
- package/resources/v1/customers/payment-method.d.mts +16 -0
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +16 -0
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.js +16 -0
- package/resources/v1/customers/payment-method.js.map +1 -1
- package/resources/v1/customers/payment-method.mjs +16 -0
- package/resources/v1/customers/payment-method.mjs.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +51 -0
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.ts +51 -0
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.js +51 -0
- package/resources/v1/customers/promotional-entitlements.js.map +1 -1
- package/resources/v1/customers/promotional-entitlements.mjs +51 -0
- package/resources/v1/customers/promotional-entitlements.mjs.map +1 -1
- package/resources/v1/entity-types.d.mts +291 -0
- package/resources/v1/entity-types.d.mts.map +1 -0
- package/resources/v1/entity-types.d.ts +291 -0
- package/resources/v1/entity-types.d.ts.map +1 -0
- package/resources/v1/entity-types.js +128 -0
- package/resources/v1/entity-types.js.map +1 -0
- package/resources/v1/entity-types.mjs +124 -0
- package/resources/v1/entity-types.mjs.map +1 -0
- package/resources/v1/events/beta/customers.d.mts +8 -0
- package/resources/v1/events/beta/customers.d.mts.map +1 -1
- package/resources/v1/events/beta/customers.d.ts +8 -0
- package/resources/v1/events/beta/customers.d.ts.map +1 -1
- package/resources/v1/events/beta/customers.js +8 -0
- package/resources/v1/events/beta/customers.js.map +1 -1
- package/resources/v1/events/beta/customers.mjs +8 -0
- package/resources/v1/events/beta/customers.mjs.map +1 -1
- package/resources/v1/events/data-export/data-export.d.mts +12 -0
- package/resources/v1/events/data-export/data-export.d.mts.map +1 -1
- package/resources/v1/events/data-export/data-export.d.ts +12 -0
- package/resources/v1/events/data-export/data-export.d.ts.map +1 -1
- package/resources/v1/events/data-export/data-export.js +12 -0
- package/resources/v1/events/data-export/data-export.js.map +1 -1
- package/resources/v1/events/data-export/data-export.mjs +12 -0
- package/resources/v1/events/data-export/data-export.mjs.map +1 -1
- package/resources/v1/events/data-export/destinations.d.mts +26 -0
- package/resources/v1/events/data-export/destinations.d.mts.map +1 -1
- package/resources/v1/events/data-export/destinations.d.ts +26 -0
- package/resources/v1/events/data-export/destinations.d.ts.map +1 -1
- package/resources/v1/events/data-export/destinations.js +26 -0
- package/resources/v1/events/data-export/destinations.js.map +1 -1
- package/resources/v1/events/data-export/destinations.mjs +26 -0
- package/resources/v1/events/data-export/destinations.mjs.map +1 -1
- package/resources/v1/events/events.d.mts +21 -0
- package/resources/v1/events/events.d.mts.map +1 -1
- package/resources/v1/events/events.d.ts +21 -0
- package/resources/v1/events/events.d.ts.map +1 -1
- package/resources/v1/events/events.js +21 -0
- package/resources/v1/events/events.js.map +1 -1
- package/resources/v1/events/events.mjs +21 -0
- package/resources/v1/events/events.mjs.map +1 -1
- package/resources/v1/features.d.mts +43 -0
- package/resources/v1/features.d.mts.map +1 -1
- package/resources/v1/features.d.ts +43 -0
- package/resources/v1/features.d.ts.map +1 -1
- package/resources/v1/features.js +43 -0
- package/resources/v1/features.js.map +1 -1
- package/resources/v1/features.mjs +43 -0
- package/resources/v1/features.mjs.map +1 -1
- package/resources/v1/index.d.mts +1 -0
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +1 -0
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +3 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +1 -0
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/plans/entitlements.d.mts +31 -0
- package/resources/v1/plans/entitlements.d.mts.map +1 -1
- package/resources/v1/plans/entitlements.d.ts +31 -0
- package/resources/v1/plans/entitlements.d.ts.map +1 -1
- package/resources/v1/plans/entitlements.js +31 -0
- package/resources/v1/plans/entitlements.js.map +1 -1
- package/resources/v1/plans/entitlements.mjs +31 -0
- package/resources/v1/plans/entitlements.mjs.map +1 -1
- package/resources/v1/plans/plans.d.mts +69 -0
- package/resources/v1/plans/plans.d.mts.map +1 -1
- package/resources/v1/plans/plans.d.ts +69 -0
- package/resources/v1/plans/plans.d.ts.map +1 -1
- package/resources/v1/plans/plans.js +69 -0
- package/resources/v1/plans/plans.js.map +1 -1
- package/resources/v1/plans/plans.mjs +69 -0
- package/resources/v1/plans/plans.mjs.map +1 -1
- package/resources/v1/products.d.mts +43 -0
- package/resources/v1/products.d.mts.map +1 -1
- package/resources/v1/products.d.ts +43 -0
- package/resources/v1/products.d.ts.map +1 -1
- package/resources/v1/products.js +43 -0
- package/resources/v1/products.js.map +1 -1
- package/resources/v1/products.mjs +43 -0
- package/resources/v1/products.mjs.map +1 -1
- package/resources/v1/subscriptions/future-update.d.mts +16 -0
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts +16 -0
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.js +16 -0
- package/resources/v1/subscriptions/future-update.js.map +1 -1
- package/resources/v1/subscriptions/future-update.mjs +16 -0
- package/resources/v1/subscriptions/future-update.mjs.map +1 -1
- package/resources/v1/subscriptions/invoice.d.mts +6 -0
- package/resources/v1/subscriptions/invoice.d.mts.map +1 -1
- package/resources/v1/subscriptions/invoice.d.ts +6 -0
- package/resources/v1/subscriptions/invoice.d.ts.map +1 -1
- package/resources/v1/subscriptions/invoice.js +6 -0
- package/resources/v1/subscriptions/invoice.js.map +1 -1
- package/resources/v1/subscriptions/invoice.mjs +6 -0
- package/resources/v1/subscriptions/invoice.mjs.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +81 -0
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +81 -0
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +81 -0
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +81 -0
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/subscriptions/usage.d.mts +13 -0
- package/resources/v1/subscriptions/usage.d.mts.map +1 -1
- package/resources/v1/subscriptions/usage.d.ts +13 -0
- package/resources/v1/subscriptions/usage.d.ts.map +1 -1
- package/resources/v1/subscriptions/usage.js +13 -0
- package/resources/v1/subscriptions/usage.js.map +1 -1
- package/resources/v1/subscriptions/usage.mjs +13 -0
- package/resources/v1/subscriptions/usage.mjs.map +1 -1
- package/resources/v1/usage.d.mts +20 -0
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +20 -0
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +20 -0
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +20 -0
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +4 -0
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +4 -0
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +4 -0
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +4 -0
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v1-beta/customers/assignments.d.mts +12 -33
- package/resources/v1-beta/customers/assignments.d.mts.map +1 -1
- package/resources/v1-beta/customers/assignments.d.ts +12 -33
- package/resources/v1-beta/customers/assignments.d.ts.map +1 -1
- package/resources/v1-beta/customers/assignments.js +7 -33
- package/resources/v1-beta/customers/assignments.js.map +1 -1
- package/resources/v1-beta/customers/assignments.mjs +7 -33
- package/resources/v1-beta/customers/assignments.mjs.map +1 -1
- package/resources/v1-beta/customers/entities.d.mts +17 -50
- package/resources/v1-beta/customers/entities.d.mts.map +1 -1
- package/resources/v1-beta/customers/entities.d.ts +17 -50
- package/resources/v1-beta/customers/entities.d.ts.map +1 -1
- package/resources/v1-beta/customers/entities.js +17 -50
- package/resources/v1-beta/customers/entities.js.map +1 -1
- package/resources/v1-beta/customers/entities.mjs +17 -50
- package/resources/v1-beta/customers/entities.mjs.map +1 -1
- package/resources/v1-beta/customers/entitlements.d.mts +7 -10
- package/resources/v1-beta/customers/entitlements.d.mts.map +1 -1
- package/resources/v1-beta/customers/entitlements.d.ts +7 -10
- package/resources/v1-beta/customers/entitlements.d.ts.map +1 -1
- package/resources/v1-beta/customers/entitlements.js +2 -5
- package/resources/v1-beta/customers/entitlements.js.map +1 -1
- package/resources/v1-beta/customers/entitlements.mjs +2 -5
- package/resources/v1-beta/customers/entitlements.mjs.map +1 -1
- package/resources/v1-beta/entity-types.d.mts +4 -27
- package/resources/v1-beta/entity-types.d.mts.map +1 -1
- package/resources/v1-beta/entity-types.d.ts +4 -27
- package/resources/v1-beta/entity-types.d.ts.map +1 -1
- package/resources/v1-beta/entity-types.js +4 -27
- package/resources/v1-beta/entity-types.js.map +1 -1
- package/resources/v1-beta/entity-types.mjs +4 -27
- package/resources/v1-beta/entity-types.mjs.map +1 -1
- package/src/resources/v1/addons/addons.ts +59 -0
- package/src/resources/v1/addons/entitlements.ts +31 -0
- package/src/resources/v1/contracts.ts +30 -0
- package/src/resources/v1/coupons.ts +36 -0
- package/src/resources/v1/credits/consumption.ts +26 -0
- package/src/resources/v1/credits/credits.ts +25 -0
- package/src/resources/v1/credits/custom-currencies.ts +49 -0
- package/src/resources/v1/credits/grants.ts +28 -0
- package/src/resources/v1/credits/reservations.ts +10 -0
- package/src/resources/v1/customers/customers.ts +217 -7
- package/src/resources/v1/customers/entities/entities.ts +470 -0
- package/src/resources/v1/customers/entities/entitlements.ts +347 -0
- package/src/resources/v1/customers/entities/index.ts +22 -0
- package/src/resources/v1/customers/entities.ts +3 -0
- package/src/resources/v1/customers/index.ts +12 -0
- package/src/resources/v1/customers/integrations.ts +47 -0
- package/src/resources/v1/customers/payment-method.ts +16 -0
- package/src/resources/v1/customers/promotional-entitlements.ts +51 -0
- package/src/resources/v1/entity-types.ts +402 -0
- package/src/resources/v1/events/beta/customers.ts +8 -0
- package/src/resources/v1/events/data-export/data-export.ts +12 -0
- package/src/resources/v1/events/data-export/destinations.ts +26 -0
- package/src/resources/v1/events/events.ts +21 -0
- package/src/resources/v1/features.ts +43 -0
- package/src/resources/v1/index.ts +12 -0
- package/src/resources/v1/plans/entitlements.ts +31 -0
- package/src/resources/v1/plans/plans.ts +69 -0
- package/src/resources/v1/products.ts +43 -0
- package/src/resources/v1/subscriptions/future-update.ts +16 -0
- package/src/resources/v1/subscriptions/invoice.ts +6 -0
- package/src/resources/v1/subscriptions/subscriptions.ts +81 -0
- package/src/resources/v1/subscriptions/usage.ts +13 -0
- package/src/resources/v1/usage.ts +20 -0
- package/src/resources/v1/v1.ts +28 -0
- package/src/resources/v1-beta/customers/assignments.ts +12 -33
- package/src/resources/v1-beta/customers/entities.ts +17 -50
- package/src/resources/v1-beta/customers/entitlements.ts +7 -10
- package/src/resources/v1-beta/entity-types.ts +4 -27
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -10,6 +10,13 @@ export class Products extends APIResource {
|
|
|
10
10
|
/**
|
|
11
11
|
* Archives a product, preventing new subscriptions. All plans and addons are
|
|
12
12
|
* archived.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const product = await client.v1.products.archiveProduct(
|
|
17
|
+
* 'x',
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
13
20
|
*/
|
|
14
21
|
archiveProduct(id, params = {}, options) {
|
|
15
22
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
@@ -26,6 +33,14 @@ export class Products extends APIResource {
|
|
|
26
33
|
}
|
|
27
34
|
/**
|
|
28
35
|
* Creates a new product.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const product = await client.v1.products.createProduct({
|
|
40
|
+
* id: 'id',
|
|
41
|
+
* displayName: 'displayName',
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
29
44
|
*/
|
|
30
45
|
createProduct(params, options) {
|
|
31
46
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -43,6 +58,14 @@ export class Products extends APIResource {
|
|
|
43
58
|
}
|
|
44
59
|
/**
|
|
45
60
|
* Duplicates an existing product, including its plans, addons, and configuration.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* const product = await client.v1.products.duplicateProduct(
|
|
65
|
+
* 'x',
|
|
66
|
+
* { targetId: 'targetId' },
|
|
67
|
+
* );
|
|
68
|
+
* ```
|
|
46
69
|
*/
|
|
47
70
|
duplicateProduct(id, params, options) {
|
|
48
71
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -60,6 +83,14 @@ export class Products extends APIResource {
|
|
|
60
83
|
}
|
|
61
84
|
/**
|
|
62
85
|
* Retrieves a paginated list of products in the environment.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* // Automatically fetches more pages as needed.
|
|
90
|
+
* for await (const productListProductsResponse of client.v1.products.listProducts()) {
|
|
91
|
+
* // ...
|
|
92
|
+
* }
|
|
93
|
+
* ```
|
|
63
94
|
*/
|
|
64
95
|
listProducts(params = {}, options) {
|
|
65
96
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
@@ -77,6 +108,13 @@ export class Products extends APIResource {
|
|
|
77
108
|
}
|
|
78
109
|
/**
|
|
79
110
|
* Restores an archived product, allowing new subscriptions to be created.
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```ts
|
|
114
|
+
* const product = await client.v1.products.unarchiveProduct(
|
|
115
|
+
* 'x',
|
|
116
|
+
* );
|
|
117
|
+
* ```
|
|
80
118
|
*/
|
|
81
119
|
unarchiveProduct(id, params = {}, options) {
|
|
82
120
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
@@ -94,6 +132,11 @@ export class Products extends APIResource {
|
|
|
94
132
|
/**
|
|
95
133
|
* Updates an existing product's properties such as display name, description, and
|
|
96
134
|
* metadata.
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```ts
|
|
138
|
+
* const product = await client.v1.products.updateProduct('x');
|
|
139
|
+
* ```
|
|
97
140
|
*/
|
|
98
141
|
updateProduct(id, params, options) {
|
|
99
142
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.mjs","sourceRoot":"","sources":["../../src/resources/v1/products.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,cAAc,EAA0C,kCAA8B;AAC/F,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"products.mjs","sourceRoot":"","sources":["../../src/resources/v1/products.ts"],"names":[],"mappings":"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"}
|
|
@@ -7,11 +7,27 @@ import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
|
7
7
|
export declare class FutureUpdate extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Cancels a subscription update that is pending payment completion.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const cancelSubscription =
|
|
14
|
+
* await client.v1.subscriptions.futureUpdate.cancelPendingPayment(
|
|
15
|
+
* 'x',
|
|
16
|
+
* );
|
|
17
|
+
* ```
|
|
10
18
|
*/
|
|
11
19
|
cancelPendingPayment(id: string, params?: FutureUpdateCancelPendingPaymentParams | null | undefined, options?: RequestOptions): APIPromise<CancelSubscription>;
|
|
12
20
|
/**
|
|
13
21
|
* Cancels a scheduled subscription update, such as a future downgrade or plan
|
|
14
22
|
* change.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const cancelSubscription =
|
|
27
|
+
* await client.v1.subscriptions.futureUpdate.cancelSchedule(
|
|
28
|
+
* 'x',
|
|
29
|
+
* );
|
|
30
|
+
* ```
|
|
15
31
|
*/
|
|
16
32
|
cancelSchedule(id: string, params?: FutureUpdateCancelScheduleParams | null | undefined, options?: RequestOptions): APIPromise<CancelSubscription>;
|
|
17
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"future-update.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/future-update.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,sCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAGnE;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C
|
|
1
|
+
{"version":3,"file":"future-update.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/future-update.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,sCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAGnE;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;IACH,oBAAoB,CAClB,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,sCAAsC,GAAG,IAAI,GAAG,SAAc,EACtE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;IAcjC;;;;;;;;;;;OAWG;IACH,cAAc,CACZ,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,gCAAgC,GAAG,IAAI,GAAG,SAAc,EAChE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;CAalC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,kBAAkB,CAAC,IAAI,CAAC;CAC/B;AAED,yBAAiB,kBAAkB,CAAC;IAClC,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,WAAW,sCAAsC;IACrD;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,gCAAgC;IAC/C;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,sCAAsC,IAAI,sCAAsC,EACrF,KAAK,gCAAgC,IAAI,gCAAgC,GAC1E,CAAC;CACH"}
|
|
@@ -7,11 +7,27 @@ import { RequestOptions } from "../../../internal/request-options.js";
|
|
|
7
7
|
export declare class FutureUpdate extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Cancels a subscription update that is pending payment completion.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const cancelSubscription =
|
|
14
|
+
* await client.v1.subscriptions.futureUpdate.cancelPendingPayment(
|
|
15
|
+
* 'x',
|
|
16
|
+
* );
|
|
17
|
+
* ```
|
|
10
18
|
*/
|
|
11
19
|
cancelPendingPayment(id: string, params?: FutureUpdateCancelPendingPaymentParams | null | undefined, options?: RequestOptions): APIPromise<CancelSubscription>;
|
|
12
20
|
/**
|
|
13
21
|
* Cancels a scheduled subscription update, such as a future downgrade or plan
|
|
14
22
|
* change.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const cancelSubscription =
|
|
27
|
+
* await client.v1.subscriptions.futureUpdate.cancelSchedule(
|
|
28
|
+
* 'x',
|
|
29
|
+
* );
|
|
30
|
+
* ```
|
|
15
31
|
*/
|
|
16
32
|
cancelSchedule(id: string, params?: FutureUpdateCancelScheduleParams | null | undefined, options?: RequestOptions): APIPromise<CancelSubscription>;
|
|
17
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"future-update.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/future-update.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,qCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAGnE;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C
|
|
1
|
+
{"version":3,"file":"future-update.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/future-update.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,qCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAGnE;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;IACH,oBAAoB,CAClB,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,sCAAsC,GAAG,IAAI,GAAG,SAAc,EACtE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;IAcjC;;;;;;;;;;;OAWG;IACH,cAAc,CACZ,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,gCAAgC,GAAG,IAAI,GAAG,SAAc,EAChE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;CAalC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,kBAAkB,CAAC,IAAI,CAAC;CAC/B;AAED,yBAAiB,kBAAkB,CAAC;IAClC,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,WAAW,sCAAsC;IACrD;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,gCAAgC;IAC/C;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,sCAAsC,IAAI,sCAAsC,EACrF,KAAK,gCAAgC,IAAI,gCAAgC,GAC1E,CAAC;CACH"}
|
|
@@ -11,6 +11,14 @@ const path_1 = require("../../../internal/utils/path.js");
|
|
|
11
11
|
class FutureUpdate extends resource_1.APIResource {
|
|
12
12
|
/**
|
|
13
13
|
* Cancels a subscription update that is pending payment completion.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const cancelSubscription =
|
|
18
|
+
* await client.v1.subscriptions.futureUpdate.cancelPendingPayment(
|
|
19
|
+
* 'x',
|
|
20
|
+
* );
|
|
21
|
+
* ```
|
|
14
22
|
*/
|
|
15
23
|
cancelPendingPayment(id, params = {}, options) {
|
|
16
24
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
@@ -28,6 +36,14 @@ class FutureUpdate extends resource_1.APIResource {
|
|
|
28
36
|
/**
|
|
29
37
|
* Cancels a scheduled subscription update, such as a future downgrade or plan
|
|
30
38
|
* change.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const cancelSubscription =
|
|
43
|
+
* await client.v1.subscriptions.futureUpdate.cancelSchedule(
|
|
44
|
+
* 'x',
|
|
45
|
+
* );
|
|
46
|
+
* ```
|
|
31
47
|
*/
|
|
32
48
|
cancelSchedule(id, params = {}, options) {
|
|
33
49
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"future-update.js","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/future-update.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,0DAAyD;AAEzD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,YAAa,SAAQ,sBAAW;IAC3C
|
|
1
|
+
{"version":3,"file":"future-update.js","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/future-update.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,0DAAyD;AAEzD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;OAUG;IACH,oBAAoB,CAClB,EAAU,EACV,SAAoE,EAAE,EACtE,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,yBAAyB,EAAE,gCAAgC,EAAE;YAC1F,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,cAAc,CACZ,EAAU,EACV,SAA8D,EAAE,EAChE,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,yBAAyB,EAAE,yBAAyB,EAAE;YACnF,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA3DD,oCA2DC"}
|
|
@@ -8,6 +8,14 @@ import { path } from "../../../internal/utils/path.mjs";
|
|
|
8
8
|
export class FutureUpdate extends APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Cancels a subscription update that is pending payment completion.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const cancelSubscription =
|
|
15
|
+
* await client.v1.subscriptions.futureUpdate.cancelPendingPayment(
|
|
16
|
+
* 'x',
|
|
17
|
+
* );
|
|
18
|
+
* ```
|
|
11
19
|
*/
|
|
12
20
|
cancelPendingPayment(id, params = {}, options) {
|
|
13
21
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
@@ -25,6 +33,14 @@ export class FutureUpdate extends APIResource {
|
|
|
25
33
|
/**
|
|
26
34
|
* Cancels a scheduled subscription update, such as a future downgrade or plan
|
|
27
35
|
* change.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const cancelSubscription =
|
|
40
|
+
* await client.v1.subscriptions.futureUpdate.cancelSchedule(
|
|
41
|
+
* 'x',
|
|
42
|
+
* );
|
|
43
|
+
* ```
|
|
28
44
|
*/
|
|
29
45
|
cancelSchedule(id, params = {}, options) {
|
|
30
46
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"future-update.mjs","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/future-update.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAEzD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C
|
|
1
|
+
{"version":3,"file":"future-update.mjs","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/future-update.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAEzD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;IACH,oBAAoB,CAClB,EAAU,EACV,SAAoE,EAAE,EACtE,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,yBAAyB,EAAE,gCAAgC,EAAE;YAC1F,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,cAAc,CACZ,EAAU,EACV,SAA8D,EAAE,EAChE,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,yBAAyB,EAAE,yBAAyB,EAAE;YACnF,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -8,6 +8,12 @@ export declare class Invoice extends APIResource {
|
|
|
8
8
|
/**
|
|
9
9
|
* Marks the latest invoice of a subscription as paid in the billing provider. The
|
|
10
10
|
* invoice must exist and have an OPEN status.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const response =
|
|
15
|
+
* await client.v1.subscriptions.invoice.markAsPaid('x');
|
|
16
|
+
* ```
|
|
11
17
|
*/
|
|
12
18
|
markAsPaid(id: string, params?: InvoiceMarkAsPaidParams | null | undefined, options?: RequestOptions): APIPromise<InvoiceMarkAsPaidResponse>;
|
|
13
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoice.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/invoice.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,sCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAGnE;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"invoice.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/invoice.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,sCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAGnE;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,UAAU,CACR,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,uBAAuB,GAAG,IAAI,GAAG,SAAc,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,yBAAyB,CAAC;CAazC;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,IAAI,EAAE,yBAAyB,CAAC,IAAI,CAAC;CACtC;AAED,yBAAiB,yBAAyB,CAAC;IACzC;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -8,6 +8,12 @@ export declare class Invoice extends APIResource {
|
|
|
8
8
|
/**
|
|
9
9
|
* Marks the latest invoice of a subscription as paid in the billing provider. The
|
|
10
10
|
* invoice must exist and have an OPEN status.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const response =
|
|
15
|
+
* await client.v1.subscriptions.invoice.markAsPaid('x');
|
|
16
|
+
* ```
|
|
11
17
|
*/
|
|
12
18
|
markAsPaid(id: string, params?: InvoiceMarkAsPaidParams | null | undefined, options?: RequestOptions): APIPromise<InvoiceMarkAsPaidResponse>;
|
|
13
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoice.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/invoice.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,qCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAGnE;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"invoice.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/invoice.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,qCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAGnE;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,UAAU,CACR,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,uBAAuB,GAAG,IAAI,GAAG,SAAc,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,yBAAyB,CAAC;CAazC;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,IAAI,EAAE,yBAAyB,CAAC,IAAI,CAAC;CACtC;AAED,yBAAiB,yBAAyB,CAAC;IACzC;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -12,6 +12,12 @@ class Invoice extends resource_1.APIResource {
|
|
|
12
12
|
/**
|
|
13
13
|
* Marks the latest invoice of a subscription as paid in the billing provider. The
|
|
14
14
|
* invoice must exist and have an OPEN status.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const response =
|
|
19
|
+
* await client.v1.subscriptions.invoice.markAsPaid('x');
|
|
20
|
+
* ```
|
|
15
21
|
*/
|
|
16
22
|
markAsPaid(id, params = {}, options) {
|
|
17
23
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoice.js","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/invoice.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,0DAAyD;AAEzD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC
|
|
1
|
+
{"version":3,"file":"invoice.js","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/invoice.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,0DAAyD;AAEzD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;OASG;IACH,UAAU,CACR,EAAU,EACV,SAAqD,EAAE,EACvD,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,yBAAyB,EAAE,eAAe,EAAE;YACvE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA5BD,0BA4BC"}
|
|
@@ -9,6 +9,12 @@ export class Invoice extends APIResource {
|
|
|
9
9
|
/**
|
|
10
10
|
* Marks the latest invoice of a subscription as paid in the billing provider. The
|
|
11
11
|
* invoice must exist and have an OPEN status.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const response =
|
|
16
|
+
* await client.v1.subscriptions.invoice.markAsPaid('x');
|
|
17
|
+
* ```
|
|
12
18
|
*/
|
|
13
19
|
markAsPaid(id, params = {}, options) {
|
|
14
20
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoice.mjs","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/invoice.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAEzD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"invoice.mjs","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/invoice.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAEzD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,UAAU,CACR,EAAU,EACV,SAAqD,EAAE,EACvD,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,yBAAyB,EAAE,eAAe,EAAE;YACvE,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -15,6 +15,13 @@ export declare class Subscriptions extends APIResource {
|
|
|
15
15
|
/**
|
|
16
16
|
* Retrieves a subscription by its unique identifier, including plan details,
|
|
17
17
|
* billing period, status, and add-ons.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const subscription = await client.v1.subscriptions.retrieve(
|
|
22
|
+
* 'x',
|
|
23
|
+
* );
|
|
24
|
+
* ```
|
|
18
25
|
*/
|
|
19
26
|
retrieve(id: string, params?: SubscriptionRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<Subscription>;
|
|
20
27
|
/**
|
|
@@ -26,16 +33,38 @@ export declare class Subscriptions extends APIResource {
|
|
|
26
33
|
* the array is removed from the subscription. Changes classified as a downgrade
|
|
27
34
|
* may be scheduled for the end of the current billing period instead of applying
|
|
28
35
|
* immediately, depending on your update scheduling configuration.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const subscription = await client.v1.subscriptions.update(
|
|
40
|
+
* 'x',
|
|
41
|
+
* );
|
|
42
|
+
* ```
|
|
29
43
|
*/
|
|
30
44
|
update(id: string, params: SubscriptionUpdateParams, options?: RequestOptions): APIPromise<Subscription>;
|
|
31
45
|
/**
|
|
32
46
|
* Retrieves a paginated list of subscriptions, with optional filters for customer,
|
|
33
47
|
* status, and plan.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* // Automatically fetches more pages as needed.
|
|
52
|
+
* for await (const subscriptionListResponse of client.v1.subscriptions.list()) {
|
|
53
|
+
* // ...
|
|
54
|
+
* }
|
|
55
|
+
* ```
|
|
34
56
|
*/
|
|
35
57
|
list(params?: SubscriptionListParams | null | undefined, options?: RequestOptions): PagePromise<SubscriptionListResponsesMyCursorIDPage, SubscriptionListResponse>;
|
|
36
58
|
/**
|
|
37
59
|
* Cancels an active subscription, either immediately or at a specified time such
|
|
38
60
|
* as end of billing period.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* const subscription = await client.v1.subscriptions.cancel(
|
|
65
|
+
* 'x',
|
|
66
|
+
* );
|
|
67
|
+
* ```
|
|
39
68
|
*/
|
|
40
69
|
cancel(id: string, params: SubscriptionCancelParams, options?: RequestOptions): APIPromise<Subscription>;
|
|
41
70
|
/**
|
|
@@ -43,31 +72,83 @@ export declare class Subscriptions extends APIResource {
|
|
|
43
72
|
* managing it. The original customer remains the paying customer for this
|
|
44
73
|
* subscription, unless payment was already delegated to the target customer, in
|
|
45
74
|
* which case the target customer becomes the paying customer as well.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* const subscription = await client.v1.subscriptions.delegate(
|
|
79
|
+
* 'x',
|
|
80
|
+
* { targetCustomerId: 'targetCustomerId' },
|
|
81
|
+
* );
|
|
82
|
+
* ```
|
|
46
83
|
*/
|
|
47
84
|
delegate(id: string, params: SubscriptionDelegateParams, options?: RequestOptions): APIPromise<Subscription>;
|
|
48
85
|
/**
|
|
49
86
|
* Imports multiple subscriptions in bulk. Used for migrating subscription data
|
|
50
87
|
* from external systems.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* const response = await client.v1.subscriptions.import({
|
|
92
|
+
* subscriptions: [
|
|
93
|
+
* {
|
|
94
|
+
* id: 'id',
|
|
95
|
+
* customerId: 'customerId',
|
|
96
|
+
* planId: 'planId',
|
|
97
|
+
* },
|
|
98
|
+
* ],
|
|
99
|
+
* });
|
|
100
|
+
* ```
|
|
51
101
|
*/
|
|
52
102
|
import(params: SubscriptionImportParams, options?: RequestOptions): APIPromise<SubscriptionImportResponse>;
|
|
53
103
|
/**
|
|
54
104
|
* Migrates a subscription to the latest published version of its plan or add-ons.
|
|
55
105
|
* Handles prorated charges or credits automatically.
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```ts
|
|
109
|
+
* const subscription = await client.v1.subscriptions.migrate(
|
|
110
|
+
* 'x',
|
|
111
|
+
* );
|
|
112
|
+
* ```
|
|
56
113
|
*/
|
|
57
114
|
migrate(id: string, params: SubscriptionMigrateParams, options?: RequestOptions): APIPromise<Subscription>;
|
|
58
115
|
/**
|
|
59
116
|
* Previews the pricing impact of creating or updating a subscription without
|
|
60
117
|
* making changes. Returns estimated costs, taxes, and proration details.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```ts
|
|
121
|
+
* const response = await client.v1.subscriptions.preview({
|
|
122
|
+
* customerId: 'customerId',
|
|
123
|
+
* planId: 'planId',
|
|
124
|
+
* });
|
|
125
|
+
* ```
|
|
61
126
|
*/
|
|
62
127
|
preview(params: SubscriptionPreviewParams, options?: RequestOptions): APIPromise<SubscriptionPreviewResponse>;
|
|
63
128
|
/**
|
|
64
129
|
* Creates a new subscription for an existing customer. When payment is required
|
|
65
130
|
* and no payment method exists, returns a checkout URL.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```ts
|
|
134
|
+
* const response = await client.v1.subscriptions.provision({
|
|
135
|
+
* customerId: 'customerId',
|
|
136
|
+
* planId: 'planId',
|
|
137
|
+
* });
|
|
138
|
+
* ```
|
|
66
139
|
*/
|
|
67
140
|
provision(params: SubscriptionProvisionParams, options?: RequestOptions): APIPromise<SubscriptionProvisionResponse>;
|
|
68
141
|
/**
|
|
69
142
|
* Transfers a subscription to a different resource ID. Used for multi-resource
|
|
70
143
|
* products where subscriptions apply to specific entities like websites or apps.
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```ts
|
|
147
|
+
* const subscription = await client.v1.subscriptions.transfer(
|
|
148
|
+
* 'x',
|
|
149
|
+
* { destinationResourceId: 'destinationResourceId' },
|
|
150
|
+
* );
|
|
151
|
+
* ```
|
|
71
152
|
*/
|
|
72
153
|
transfer(id: string, params: SubscriptionTransferParams, options?: RequestOptions): APIPromise<Subscription>;
|
|
73
154
|
}
|