@whop/sdk 0.0.27 → 0.0.28
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 +41 -0
- package/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js +7 -0
- package/client.js.map +1 -1
- package/client.mjs +7 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/access-tokens.d.mts +19 -20
- package/resources/access-tokens.d.mts.map +1 -1
- package/resources/access-tokens.d.ts +19 -20
- package/resources/access-tokens.d.ts.map +1 -1
- package/resources/access-tokens.js +4 -4
- package/resources/access-tokens.mjs +4 -4
- package/resources/account-links.d.mts +15 -13
- package/resources/account-links.d.mts.map +1 -1
- package/resources/account-links.d.ts +15 -13
- package/resources/account-links.d.ts.map +1 -1
- package/resources/account-links.js +2 -3
- package/resources/account-links.js.map +1 -1
- package/resources/account-links.mjs +2 -3
- package/resources/account-links.mjs.map +1 -1
- package/resources/ai-chats.d.mts +38 -26
- package/resources/ai-chats.d.mts.map +1 -1
- package/resources/ai-chats.d.ts +38 -26
- package/resources/ai-chats.d.ts.map +1 -1
- package/resources/ai-chats.js +5 -5
- package/resources/ai-chats.mjs +5 -5
- package/resources/app-builds.d.mts +35 -33
- package/resources/app-builds.d.mts.map +1 -1
- package/resources/app-builds.d.ts +35 -33
- package/resources/app-builds.d.ts.map +1 -1
- package/resources/app-builds.js +7 -4
- package/resources/app-builds.js.map +1 -1
- package/resources/app-builds.mjs +7 -4
- package/resources/app-builds.mjs.map +1 -1
- package/resources/apps.d.mts +81 -56
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +81 -56
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +7 -4
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +7 -4
- package/resources/apps.mjs.map +1 -1
- package/resources/authorized-users.d.mts +32 -26
- package/resources/authorized-users.d.mts.map +1 -1
- package/resources/authorized-users.d.ts +32 -26
- package/resources/authorized-users.d.ts.map +1 -1
- package/resources/authorized-users.js +3 -2
- package/resources/authorized-users.js.map +1 -1
- package/resources/authorized-users.mjs +3 -2
- package/resources/authorized-users.mjs.map +1 -1
- package/resources/chat-channels.d.mts +27 -19
- package/resources/chat-channels.d.mts.map +1 -1
- package/resources/chat-channels.d.ts +27 -19
- package/resources/chat-channels.d.ts.map +1 -1
- package/resources/chat-channels.js +5 -3
- package/resources/chat-channels.js.map +1 -1
- package/resources/chat-channels.mjs +5 -3
- package/resources/chat-channels.mjs.map +1 -1
- package/resources/checkout-configurations.d.mts +55 -46
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +55 -46
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/checkout-configurations.js +3 -2
- package/resources/checkout-configurations.js.map +1 -1
- package/resources/checkout-configurations.mjs +3 -2
- package/resources/checkout-configurations.mjs.map +1 -1
- package/resources/companies.d.mts +65 -46
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts +65 -46
- package/resources/companies.d.ts.map +1 -1
- package/resources/companies.js +7 -8
- package/resources/companies.js.map +1 -1
- package/resources/companies.mjs +7 -8
- package/resources/companies.mjs.map +1 -1
- package/resources/company-token-transactions.d.mts +80 -57
- package/resources/company-token-transactions.d.mts.map +1 -1
- package/resources/company-token-transactions.d.ts +80 -57
- package/resources/company-token-transactions.d.ts.map +1 -1
- package/resources/company-token-transactions.js +6 -3
- package/resources/company-token-transactions.js.map +1 -1
- package/resources/company-token-transactions.mjs +6 -3
- package/resources/company-token-transactions.mjs.map +1 -1
- package/resources/course-chapters.d.mts +24 -19
- package/resources/course-chapters.d.mts.map +1 -1
- package/resources/course-chapters.d.ts +24 -19
- package/resources/course-chapters.d.ts.map +1 -1
- package/resources/course-chapters.js +5 -5
- package/resources/course-chapters.mjs +5 -5
- package/resources/course-lesson-interactions.d.mts +7 -6
- package/resources/course-lesson-interactions.d.mts.map +1 -1
- package/resources/course-lesson-interactions.d.ts +7 -6
- package/resources/course-lesson-interactions.d.ts.map +1 -1
- package/resources/course-lesson-interactions.js +3 -2
- package/resources/course-lesson-interactions.js.map +1 -1
- package/resources/course-lesson-interactions.mjs +3 -2
- package/resources/course-lesson-interactions.mjs.map +1 -1
- package/resources/course-lessons.d.mts +126 -84
- package/resources/course-lessons.d.mts.map +1 -1
- package/resources/course-lessons.d.ts +126 -84
- package/resources/course-lessons.d.ts.map +1 -1
- package/resources/course-lessons.js +12 -8
- package/resources/course-lessons.js.map +1 -1
- package/resources/course-lessons.mjs +12 -8
- package/resources/course-lessons.mjs.map +1 -1
- package/resources/course-students.d.mts +38 -29
- package/resources/course-students.d.mts.map +1 -1
- package/resources/course-students.d.ts +38 -29
- package/resources/course-students.d.ts.map +1 -1
- package/resources/course-students.js +3 -2
- package/resources/course-students.js.map +1 -1
- package/resources/course-students.mjs +3 -2
- package/resources/course-students.mjs.map +1 -1
- package/resources/courses.d.mts +132 -91
- package/resources/courses.d.mts.map +1 -1
- package/resources/courses.d.ts +132 -91
- package/resources/courses.d.ts.map +1 -1
- package/resources/courses.js +9 -5
- package/resources/courses.js.map +1 -1
- package/resources/courses.mjs +9 -5
- package/resources/courses.mjs.map +1 -1
- package/resources/disputes.d.mts +156 -102
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +156 -102
- package/resources/disputes.d.ts.map +1 -1
- package/resources/disputes.js +4 -2
- package/resources/disputes.js.map +1 -1
- package/resources/disputes.mjs +4 -2
- package/resources/disputes.mjs.map +1 -1
- package/resources/dm-channels.d.mts +29 -16
- package/resources/dm-channels.d.mts.map +1 -1
- package/resources/dm-channels.d.ts +29 -16
- package/resources/dm-channels.d.ts.map +1 -1
- package/resources/dm-channels.js +9 -5
- package/resources/dm-channels.js.map +1 -1
- package/resources/dm-channels.mjs +9 -5
- package/resources/dm-channels.mjs.map +1 -1
- package/resources/dm-members.d.mts +30 -21
- package/resources/dm-members.d.mts.map +1 -1
- package/resources/dm-members.d.ts +30 -21
- package/resources/dm-members.d.ts.map +1 -1
- package/resources/dm-members.js +9 -5
- package/resources/dm-members.js.map +1 -1
- package/resources/dm-members.mjs +9 -5
- package/resources/dm-members.mjs.map +1 -1
- package/resources/entries.d.mts +29 -21
- package/resources/entries.d.mts.map +1 -1
- package/resources/entries.d.ts +29 -21
- package/resources/entries.d.ts.map +1 -1
- package/resources/entries.js +7 -4
- package/resources/entries.js.map +1 -1
- package/resources/entries.mjs +7 -4
- package/resources/entries.mjs.map +1 -1
- package/resources/experiences.d.mts +53 -45
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +53 -45
- package/resources/experiences.d.ts.map +1 -1
- package/resources/experiences.js +6 -5
- package/resources/experiences.js.map +1 -1
- package/resources/experiences.mjs +6 -5
- package/resources/experiences.mjs.map +1 -1
- package/resources/fee-markups.d.mts +32 -21
- package/resources/fee-markups.d.mts.map +1 -1
- package/resources/fee-markups.d.ts +32 -21
- package/resources/fee-markups.d.ts.map +1 -1
- package/resources/fee-markups.js +6 -3
- package/resources/fee-markups.js.map +1 -1
- package/resources/fee-markups.mjs +6 -3
- package/resources/fee-markups.mjs.map +1 -1
- package/resources/files.d.mts +21 -17
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +21 -17
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +3 -2
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +3 -2
- package/resources/files.mjs.map +1 -1
- package/resources/forum-posts.d.mts +62 -43
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +62 -43
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/forum-posts.js +8 -4
- package/resources/forum-posts.js.map +1 -1
- package/resources/forum-posts.mjs +8 -4
- package/resources/forum-posts.mjs.map +1 -1
- package/resources/forums.d.mts +20 -12
- package/resources/forums.d.mts.map +1 -1
- package/resources/forums.d.ts +20 -12
- package/resources/forums.d.ts.map +1 -1
- package/resources/forums.js +5 -3
- package/resources/forums.js.map +1 -1
- package/resources/forums.mjs +5 -3
- package/resources/forums.mjs.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +108 -80
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +108 -80
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +7 -4
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +7 -4
- package/resources/invoices.mjs.map +1 -1
- package/resources/leads.d.mts +64 -42
- package/resources/leads.d.mts.map +1 -1
- package/resources/leads.d.ts +64 -42
- package/resources/leads.d.ts.map +1 -1
- package/resources/leads.js +6 -4
- package/resources/leads.js.map +1 -1
- package/resources/leads.mjs +6 -4
- package/resources/leads.mjs.map +1 -1
- package/resources/ledger-accounts.d.mts +10 -8
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +10 -8
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-accounts.js +1 -1
- package/resources/ledger-accounts.mjs +1 -1
- package/resources/members.d.mts +18 -19
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +18 -19
- package/resources/members.d.ts.map +1 -1
- package/resources/members.js +3 -2
- package/resources/members.js.map +1 -1
- package/resources/members.mjs +3 -2
- package/resources/members.mjs.map +1 -1
- package/resources/memberships.d.mts +69 -51
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +69 -51
- package/resources/memberships.d.ts.map +1 -1
- package/resources/memberships.js +12 -8
- package/resources/memberships.js.map +1 -1
- package/resources/memberships.mjs +12 -8
- package/resources/memberships.mjs.map +1 -1
- package/resources/messages.d.mts +46 -32
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +46 -32
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +9 -5
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +9 -5
- package/resources/messages.mjs.map +1 -1
- package/resources/notifications.d.mts +33 -25
- package/resources/notifications.d.mts.map +1 -1
- package/resources/notifications.d.ts +33 -25
- package/resources/notifications.d.ts.map +1 -1
- package/resources/notifications.js +2 -1
- package/resources/notifications.js.map +1 -1
- package/resources/notifications.mjs +2 -1
- package/resources/notifications.mjs.map +1 -1
- package/resources/payment-methods.d.mts +212 -114
- package/resources/payment-methods.d.mts.map +1 -1
- package/resources/payment-methods.d.ts +212 -114
- package/resources/payment-methods.d.ts.map +1 -1
- package/resources/payment-methods.js +5 -10
- package/resources/payment-methods.js.map +1 -1
- package/resources/payment-methods.mjs +5 -10
- package/resources/payment-methods.mjs.map +1 -1
- package/resources/payments.d.mts +73 -40
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +73 -40
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +23 -10
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +23 -10
- package/resources/payments.mjs.map +1 -1
- package/resources/payout-methods.d.mts +44 -29
- package/resources/payout-methods.d.mts.map +1 -1
- package/resources/payout-methods.d.ts +44 -29
- package/resources/payout-methods.d.ts.map +1 -1
- package/resources/payout-methods.js +3 -2
- package/resources/payout-methods.js.map +1 -1
- package/resources/payout-methods.mjs +3 -2
- package/resources/payout-methods.mjs.map +1 -1
- package/resources/plans.d.mts +121 -90
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +121 -90
- package/resources/plans.d.ts.map +1 -1
- package/resources/plans.js +9 -5
- package/resources/plans.js.map +1 -1
- package/resources/plans.mjs +9 -5
- package/resources/plans.mjs.map +1 -1
- package/resources/products.d.mts +76 -65
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +76 -65
- package/resources/products.d.ts.map +1 -1
- package/resources/products.js +7 -5
- package/resources/products.js.map +1 -1
- package/resources/products.mjs +7 -5
- package/resources/products.mjs.map +1 -1
- package/resources/promo-codes.d.mts +41 -31
- package/resources/promo-codes.d.mts.map +1 -1
- package/resources/promo-codes.d.ts +41 -31
- package/resources/promo-codes.d.ts.map +1 -1
- package/resources/promo-codes.js +7 -4
- package/resources/promo-codes.js.map +1 -1
- package/resources/promo-codes.mjs +7 -4
- package/resources/promo-codes.mjs.map +1 -1
- package/resources/reactions.d.mts +24 -18
- package/resources/reactions.d.mts.map +1 -1
- package/resources/reactions.d.ts +24 -18
- package/resources/reactions.d.ts.map +1 -1
- package/resources/reactions.js +7 -4
- package/resources/reactions.js.map +1 -1
- package/resources/reactions.mjs +7 -4
- package/resources/reactions.mjs.map +1 -1
- package/resources/refunds.d.mts +43 -29
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +43 -29
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.js +3 -2
- package/resources/refunds.js.map +1 -1
- package/resources/refunds.mjs +3 -2
- package/resources/refunds.mjs.map +1 -1
- package/resources/reviews.d.mts +66 -50
- package/resources/reviews.d.mts.map +1 -1
- package/resources/reviews.d.ts +66 -50
- package/resources/reviews.d.ts.map +1 -1
- package/resources/reviews.js +3 -2
- package/resources/reviews.js.map +1 -1
- package/resources/reviews.mjs +3 -2
- package/resources/reviews.mjs.map +1 -1
- package/resources/setup-intents.d.mts +61 -43
- package/resources/setup-intents.d.mts.map +1 -1
- package/resources/setup-intents.d.ts +61 -43
- package/resources/setup-intents.d.ts.map +1 -1
- package/resources/setup-intents.js +4 -10
- package/resources/setup-intents.js.map +1 -1
- package/resources/setup-intents.mjs +4 -10
- package/resources/setup-intents.mjs.map +1 -1
- package/resources/shared.d.mts +695 -388
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +695 -388
- package/resources/shared.d.ts.map +1 -1
- package/resources/shipments.d.mts +26 -17
- package/resources/shipments.d.mts.map +1 -1
- package/resources/shipments.d.ts +26 -17
- package/resources/shipments.d.ts.map +1 -1
- package/resources/shipments.js +5 -3
- package/resources/shipments.js.map +1 -1
- package/resources/shipments.mjs +5 -3
- package/resources/shipments.mjs.map +1 -1
- package/resources/support-channels.d.mts +27 -19
- package/resources/support-channels.d.mts.map +1 -1
- package/resources/support-channels.d.ts +27 -19
- package/resources/support-channels.d.ts.map +1 -1
- package/resources/support-channels.js +5 -4
- package/resources/support-channels.js.map +1 -1
- package/resources/support-channels.mjs +5 -4
- package/resources/support-channels.mjs.map +1 -1
- package/resources/topups.d.mts +11 -9
- package/resources/topups.d.mts.map +1 -1
- package/resources/topups.d.ts +11 -9
- package/resources/topups.d.ts.map +1 -1
- package/resources/topups.js +2 -1
- package/resources/topups.js.map +1 -1
- package/resources/topups.mjs +2 -1
- package/resources/topups.mjs.map +1 -1
- package/resources/transfers.d.mts +35 -29
- package/resources/transfers.d.mts.map +1 -1
- package/resources/transfers.d.ts +35 -29
- package/resources/transfers.d.ts.map +1 -1
- package/resources/transfers.js +5 -3
- package/resources/transfers.js.map +1 -1
- package/resources/transfers.mjs +5 -3
- package/resources/transfers.mjs.map +1 -1
- package/resources/users.d.mts +20 -16
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +20 -16
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +4 -3
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +4 -3
- package/resources/users.mjs.map +1 -1
- package/resources/verifications.d.mts +6 -4
- package/resources/verifications.d.mts.map +1 -1
- package/resources/verifications.d.ts +6 -4
- package/resources/verifications.d.ts.map +1 -1
- package/resources/verifications.js +1 -1
- package/resources/verifications.mjs +1 -1
- package/resources/webhooks.d.mts +136 -95
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +136 -95
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +3 -2
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +3 -2
- package/resources/webhooks.mjs.map +1 -1
- package/resources/withdrawals.d.mts +53 -44
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +53 -44
- package/resources/withdrawals.d.ts.map +1 -1
- package/resources/withdrawals.js +3 -2
- package/resources/withdrawals.js.map +1 -1
- package/resources/withdrawals.mjs +3 -2
- package/resources/withdrawals.mjs.map +1 -1
- package/src/client.ts +13 -3
- package/src/resources/access-tokens.ts +19 -20
- package/src/resources/account-links.ts +15 -13
- package/src/resources/ai-chats.ts +39 -26
- package/src/resources/app-builds.ts +35 -33
- package/src/resources/apps.ts +84 -56
- package/src/resources/authorized-users.ts +32 -26
- package/src/resources/chat-channels.ts +27 -19
- package/src/resources/checkout-configurations.ts +56 -46
- package/src/resources/companies.ts +68 -46
- package/src/resources/company-token-transactions.ts +81 -58
- package/src/resources/course-chapters.ts +24 -19
- package/src/resources/course-lesson-interactions.ts +7 -6
- package/src/resources/course-lessons.ts +126 -84
- package/src/resources/course-students.ts +38 -29
- package/src/resources/courses.ts +132 -91
- package/src/resources/disputes.ts +156 -102
- package/src/resources/dm-channels.ts +29 -16
- package/src/resources/dm-members.ts +30 -21
- package/src/resources/entries.ts +29 -21
- package/src/resources/experiences.ts +53 -45
- package/src/resources/fee-markups.ts +32 -21
- package/src/resources/files.ts +21 -17
- package/src/resources/forum-posts.ts +63 -43
- package/src/resources/forums.ts +20 -12
- package/src/resources/index.ts +2 -1
- package/src/resources/invoices.ts +112 -80
- package/src/resources/leads.ts +64 -42
- package/src/resources/ledger-accounts.ts +10 -8
- package/src/resources/members.ts +18 -19
- package/src/resources/memberships.ts +69 -51
- package/src/resources/messages.ts +46 -32
- package/src/resources/notifications.ts +33 -25
- package/src/resources/payment-methods.ts +212 -114
- package/src/resources/payments.ts +77 -39
- package/src/resources/payout-methods.ts +44 -29
- package/src/resources/plans.ts +121 -90
- package/src/resources/products.ts +215 -68
- package/src/resources/promo-codes.ts +41 -31
- package/src/resources/reactions.ts +24 -18
- package/src/resources/refunds.ts +44 -29
- package/src/resources/reviews.ts +66 -50
- package/src/resources/setup-intents.ts +61 -43
- package/src/resources/shared.ts +2637 -387
- package/src/resources/shipments.ts +26 -17
- package/src/resources/support-channels.ts +27 -19
- package/src/resources/topups.ts +11 -9
- package/src/resources/transfers.ts +35 -29
- package/src/resources/users.ts +20 -16
- package/src/resources/verifications.ts +6 -4
- package/src/resources/webhooks.ts +136 -95
- package/src/resources/withdrawals.ts +53 -43
- 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
package/resources/plans.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ import { CursorPage, type CursorPageParams, PagePromise } from "../core/paginati
|
|
|
6
6
|
import { RequestOptions } from "../internal/request-options.js";
|
|
7
7
|
export declare class Plans extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
* Create a new
|
|
9
|
+
* Create a new pricing plan for a product. The plan defines the billing interval,
|
|
10
|
+
* price, and availability for customers.
|
|
10
11
|
*
|
|
11
12
|
* Required permissions:
|
|
12
13
|
*
|
|
@@ -24,7 +25,7 @@ export declare class Plans extends APIResource {
|
|
|
24
25
|
*/
|
|
25
26
|
create(body: PlanCreateParams, options?: RequestOptions): APIPromise<Shared.Plan>;
|
|
26
27
|
/**
|
|
27
|
-
* Retrieves
|
|
28
|
+
* Retrieves the details of an existing plan.
|
|
28
29
|
*
|
|
29
30
|
* Required permissions:
|
|
30
31
|
*
|
|
@@ -39,7 +40,8 @@ export declare class Plans extends APIResource {
|
|
|
39
40
|
*/
|
|
40
41
|
retrieve(id: string, options?: RequestOptions): APIPromise<Shared.Plan>;
|
|
41
42
|
/**
|
|
42
|
-
* Update
|
|
43
|
+
* Update a plan's pricing, billing interval, visibility, stock, and other
|
|
44
|
+
* settings.
|
|
43
45
|
*
|
|
44
46
|
* Required permissions:
|
|
45
47
|
*
|
|
@@ -56,7 +58,8 @@ export declare class Plans extends APIResource {
|
|
|
56
58
|
*/
|
|
57
59
|
update(id: string, body?: PlanUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Shared.Plan>;
|
|
58
60
|
/**
|
|
59
|
-
*
|
|
61
|
+
* Returns a paginated list of plans belonging to a company, with optional
|
|
62
|
+
* filtering by visibility, type, release method, and product.
|
|
60
63
|
*
|
|
61
64
|
* Required permissions:
|
|
62
65
|
*
|
|
@@ -74,7 +77,8 @@ export declare class Plans extends APIResource {
|
|
|
74
77
|
*/
|
|
75
78
|
list(query: PlanListParams, options?: RequestOptions): PagePromise<PlanListResponsesCursorPage, PlanListResponse>;
|
|
76
79
|
/**
|
|
77
|
-
*
|
|
80
|
+
* Permanently delete a plan from a product. Existing memberships on this plan will
|
|
81
|
+
* not be affected.
|
|
78
82
|
*
|
|
79
83
|
* Required permissions:
|
|
80
84
|
*
|
|
@@ -91,9 +95,9 @@ export declare class Plans extends APIResource {
|
|
|
91
95
|
}
|
|
92
96
|
export type PlanListResponsesCursorPage = CursorPage<PlanListResponse>;
|
|
93
97
|
/**
|
|
94
|
-
* A plan defines pricing and billing terms for a
|
|
95
|
-
*
|
|
96
|
-
* payments, recurring subscriptions, or free trials.
|
|
98
|
+
* A plan defines pricing and billing terms for a checkout. Plans can optionally
|
|
99
|
+
* belong to a product, where they represent different pricing options such as
|
|
100
|
+
* one-time payments, recurring subscriptions, or free trials.
|
|
97
101
|
*/
|
|
98
102
|
export interface PlanListResponse {
|
|
99
103
|
/**
|
|
@@ -101,11 +105,13 @@ export interface PlanListResponse {
|
|
|
101
105
|
*/
|
|
102
106
|
id: string;
|
|
103
107
|
/**
|
|
104
|
-
* The
|
|
108
|
+
* The number of days between each recurring charge. Null for one-time plans. For
|
|
109
|
+
* example, 30 for monthly or 365 for annual billing.
|
|
105
110
|
*/
|
|
106
111
|
billing_period: number | null;
|
|
107
112
|
/**
|
|
108
|
-
* The company
|
|
113
|
+
* The company that sells this plan. Null for standalone invoice plans not linked
|
|
114
|
+
* to a company.
|
|
109
115
|
*/
|
|
110
116
|
company: PlanListResponse.Company | null;
|
|
111
117
|
/**
|
|
@@ -113,11 +119,13 @@ export interface PlanListResponse {
|
|
|
113
119
|
*/
|
|
114
120
|
created_at: string;
|
|
115
121
|
/**
|
|
116
|
-
* The
|
|
122
|
+
* The currency used for all prices on this plan (e.g., 'usd', 'eur'). All monetary
|
|
123
|
+
* amounts on the plan are denominated in this currency.
|
|
117
124
|
*/
|
|
118
125
|
currency: Shared.Currency;
|
|
119
126
|
/**
|
|
120
|
-
*
|
|
127
|
+
* A text description of the plan visible to customers. Maximum 500 characters.
|
|
128
|
+
* Null if no description is set.
|
|
121
129
|
*/
|
|
122
130
|
description: string | null;
|
|
123
131
|
/**
|
|
@@ -132,35 +140,43 @@ export interface PlanListResponse {
|
|
|
132
140
|
*/
|
|
133
141
|
initial_price: number;
|
|
134
142
|
/**
|
|
135
|
-
*
|
|
143
|
+
* Private notes visible only to the company owner and team members. Not shown to
|
|
144
|
+
* customers. Null if no notes have been added.
|
|
136
145
|
*/
|
|
137
146
|
internal_notes: string | null;
|
|
138
147
|
/**
|
|
139
|
-
* The invoice
|
|
148
|
+
* The invoice this plan was generated for. Null if the plan was not created for a
|
|
149
|
+
* specific invoice.
|
|
140
150
|
*/
|
|
141
151
|
invoice: PlanListResponse.Invoice | null;
|
|
142
152
|
/**
|
|
143
|
-
* The number of
|
|
153
|
+
* The number of users who currently hold an active membership through this plan.
|
|
154
|
+
* Only visible to authorized team members.
|
|
144
155
|
*/
|
|
145
156
|
member_count: number | null;
|
|
146
157
|
/**
|
|
147
|
-
* The explicit payment method configuration
|
|
158
|
+
* The explicit payment method configuration specifying which payment methods are
|
|
159
|
+
* enabled or disabled for this plan. Null if the plan uses default settings.
|
|
148
160
|
*/
|
|
149
161
|
payment_method_configuration: PlanListResponse.PaymentMethodConfiguration | null;
|
|
150
162
|
/**
|
|
151
|
-
*
|
|
163
|
+
* The billing model for this plan: 'renewal' for recurring subscriptions or
|
|
164
|
+
* 'one_time' for single payments.
|
|
152
165
|
*/
|
|
153
166
|
plan_type: Shared.PlanType;
|
|
154
167
|
/**
|
|
155
|
-
* The product that this plan belongs to.
|
|
168
|
+
* The product that this plan belongs to. Null for standalone one-off purchases not
|
|
169
|
+
* linked to a product.
|
|
156
170
|
*/
|
|
157
171
|
product: PlanListResponse.Product | null;
|
|
158
172
|
/**
|
|
159
|
-
* The
|
|
173
|
+
* The full URL where customers can purchase this plan directly, bypassing the
|
|
174
|
+
* product page.
|
|
160
175
|
*/
|
|
161
176
|
purchase_url: string;
|
|
162
177
|
/**
|
|
163
|
-
*
|
|
178
|
+
* The method used to sell this plan: 'buy_now' for immediate purchase or
|
|
179
|
+
* 'waitlist' for waitlist-based access.
|
|
164
180
|
*/
|
|
165
181
|
release_method: Shared.ReleaseMethod;
|
|
166
182
|
/**
|
|
@@ -169,19 +185,24 @@ export interface PlanListResponse {
|
|
|
169
185
|
*/
|
|
170
186
|
renewal_price: number;
|
|
171
187
|
/**
|
|
172
|
-
* The number of payments required before
|
|
188
|
+
* The total number of installment payments required before the subscription
|
|
189
|
+
* pauses. Null if split pay is not configured. Must be greater than 1.
|
|
173
190
|
*/
|
|
174
191
|
split_pay_required_payments: number | null;
|
|
175
192
|
/**
|
|
176
|
-
* The number of units available for purchase. Only
|
|
193
|
+
* The number of units available for purchase. Only visible to authorized team
|
|
194
|
+
* members. Null if the requester lacks permission.
|
|
177
195
|
*/
|
|
178
196
|
stock: number | null;
|
|
179
197
|
/**
|
|
180
|
-
* The
|
|
198
|
+
* The display name of the plan shown to customers on the product page and at
|
|
199
|
+
* checkout. Maximum 30 characters. Null if no title has been set.
|
|
181
200
|
*/
|
|
182
201
|
title: string | null;
|
|
183
202
|
/**
|
|
184
|
-
* The number of free trial days
|
|
203
|
+
* The number of free trial days before the first charge on a renewal plan. Null if
|
|
204
|
+
* no trial is configured or the current user has already used a trial for this
|
|
205
|
+
* plan.
|
|
185
206
|
*/
|
|
186
207
|
trial_period_days: number | null;
|
|
187
208
|
/**
|
|
@@ -194,13 +215,15 @@ export interface PlanListResponse {
|
|
|
194
215
|
*/
|
|
195
216
|
updated_at: string;
|
|
196
217
|
/**
|
|
197
|
-
*
|
|
218
|
+
* Controls whether the plan is visible to customers. When set to 'hidden', the
|
|
219
|
+
* plan is only accessible via direct link.
|
|
198
220
|
*/
|
|
199
221
|
visibility: Shared.Visibility;
|
|
200
222
|
}
|
|
201
223
|
export declare namespace PlanListResponse {
|
|
202
224
|
/**
|
|
203
|
-
* The company
|
|
225
|
+
* The company that sells this plan. Null for standalone invoice plans not linked
|
|
226
|
+
* to a company.
|
|
204
227
|
*/
|
|
205
228
|
interface Company {
|
|
206
229
|
/**
|
|
@@ -208,12 +231,13 @@ export declare namespace PlanListResponse {
|
|
|
208
231
|
*/
|
|
209
232
|
id: string;
|
|
210
233
|
/**
|
|
211
|
-
* The
|
|
234
|
+
* The display name of the company shown to customers.
|
|
212
235
|
*/
|
|
213
236
|
title: string;
|
|
214
237
|
}
|
|
215
238
|
/**
|
|
216
|
-
* The invoice
|
|
239
|
+
* The invoice this plan was generated for. Null if the plan was not created for a
|
|
240
|
+
* specific invoice.
|
|
217
241
|
*/
|
|
218
242
|
interface Invoice {
|
|
219
243
|
/**
|
|
@@ -222,7 +246,8 @@ export declare namespace PlanListResponse {
|
|
|
222
246
|
id: string;
|
|
223
247
|
}
|
|
224
248
|
/**
|
|
225
|
-
* The explicit payment method configuration
|
|
249
|
+
* The explicit payment method configuration specifying which payment methods are
|
|
250
|
+
* enabled or disabled for this plan. Null if the plan uses default settings.
|
|
226
251
|
*/
|
|
227
252
|
interface PaymentMethodConfiguration {
|
|
228
253
|
/**
|
|
@@ -245,7 +270,8 @@ export declare namespace PlanListResponse {
|
|
|
245
270
|
include_platform_defaults: boolean;
|
|
246
271
|
}
|
|
247
272
|
/**
|
|
248
|
-
* The product that this plan belongs to.
|
|
273
|
+
* The product that this plan belongs to. Null for standalone one-off purchases not
|
|
274
|
+
* linked to a product.
|
|
249
275
|
*/
|
|
250
276
|
interface Product {
|
|
251
277
|
/**
|
|
@@ -253,7 +279,8 @@ export declare namespace PlanListResponse {
|
|
|
253
279
|
*/
|
|
254
280
|
id: string;
|
|
255
281
|
/**
|
|
256
|
-
* The
|
|
282
|
+
* The display name of the product shown to customers on the product page and in
|
|
283
|
+
* search results.
|
|
257
284
|
*/
|
|
258
285
|
title: string;
|
|
259
286
|
}
|
|
@@ -264,15 +291,16 @@ export declare namespace PlanListResponse {
|
|
|
264
291
|
export type PlanDeleteResponse = boolean;
|
|
265
292
|
export interface PlanCreateParams {
|
|
266
293
|
/**
|
|
267
|
-
* The
|
|
294
|
+
* The unique identifier of the company to create this plan for.
|
|
268
295
|
*/
|
|
269
296
|
company_id: string;
|
|
270
297
|
/**
|
|
271
|
-
* The
|
|
298
|
+
* The unique identifier of the product to attach this plan to.
|
|
272
299
|
*/
|
|
273
300
|
product_id: string;
|
|
274
301
|
/**
|
|
275
|
-
* The
|
|
302
|
+
* The number of days between recurring charges. For example, 30 for monthly or 365
|
|
303
|
+
* for yearly.
|
|
276
304
|
*/
|
|
277
305
|
billing_period?: number | null;
|
|
278
306
|
/**
|
|
@@ -280,33 +308,34 @@ export interface PlanCreateParams {
|
|
|
280
308
|
*/
|
|
281
309
|
currency?: Shared.Currency | null;
|
|
282
310
|
/**
|
|
283
|
-
* An array of custom field
|
|
311
|
+
* An array of custom field definitions to collect from customers at checkout.
|
|
284
312
|
*/
|
|
285
313
|
custom_fields?: Array<PlanCreateParams.CustomField> | null;
|
|
286
314
|
/**
|
|
287
|
-
*
|
|
315
|
+
* A text description of the plan displayed to customers on the product page.
|
|
288
316
|
*/
|
|
289
317
|
description?: string | null;
|
|
290
318
|
/**
|
|
291
|
-
* The
|
|
319
|
+
* The number of days until the membership expires and access is revoked. Used for
|
|
320
|
+
* expiration-based plans.
|
|
292
321
|
*/
|
|
293
322
|
expiration_days?: number | null;
|
|
294
323
|
/**
|
|
295
|
-
* An image
|
|
324
|
+
* An image displayed on the product page to represent this plan.
|
|
296
325
|
*/
|
|
297
326
|
image?: PlanCreateParams.Image | null;
|
|
298
327
|
/**
|
|
299
|
-
*
|
|
300
|
-
*
|
|
301
|
-
*
|
|
328
|
+
* The amount charged on the first purchase. For one-time plans, this is the full
|
|
329
|
+
* price. For recurring plans, this is an additional charge on top of the renewal
|
|
330
|
+
* price. Provided in the plan's currency (e.g., 10.43 for $10.43).
|
|
302
331
|
*/
|
|
303
332
|
initial_price?: number | null;
|
|
304
333
|
/**
|
|
305
|
-
*
|
|
334
|
+
* Private notes visible only to the business owner. Not shown to customers.
|
|
306
335
|
*/
|
|
307
336
|
internal_notes?: string | null;
|
|
308
337
|
/**
|
|
309
|
-
* Whether this plan uses legacy payment method controls
|
|
338
|
+
* Whether this plan uses legacy payment method controls.
|
|
310
339
|
*/
|
|
311
340
|
legacy_payment_method_controls?: boolean | null;
|
|
312
341
|
/**
|
|
@@ -315,8 +344,8 @@ export interface PlanCreateParams {
|
|
|
315
344
|
*/
|
|
316
345
|
override_tax_type?: Shared.TaxType | null;
|
|
317
346
|
/**
|
|
318
|
-
*
|
|
319
|
-
*
|
|
347
|
+
* Explicit payment method configuration for the plan. When not provided, the
|
|
348
|
+
* company's defaults apply.
|
|
320
349
|
*/
|
|
321
350
|
payment_method_configuration?: PlanCreateParams.PaymentMethodConfiguration | null;
|
|
322
351
|
/**
|
|
@@ -328,29 +357,30 @@ export interface PlanCreateParams {
|
|
|
328
357
|
*/
|
|
329
358
|
release_method?: Shared.ReleaseMethod | null;
|
|
330
359
|
/**
|
|
331
|
-
* The amount
|
|
332
|
-
*
|
|
360
|
+
* The amount charged each billing period for recurring plans. Provided in the
|
|
361
|
+
* plan's currency (e.g., 10.43 for $10.43).
|
|
333
362
|
*/
|
|
334
363
|
renewal_price?: number | null;
|
|
335
364
|
/**
|
|
336
|
-
* The number of payments required before
|
|
365
|
+
* The number of installment payments required before the subscription pauses.
|
|
337
366
|
*/
|
|
338
367
|
split_pay_required_payments?: number | null;
|
|
339
368
|
/**
|
|
340
|
-
* The number of units available for purchase.
|
|
369
|
+
* The maximum number of units available for purchase. Ignored when unlimited_stock
|
|
370
|
+
* is true.
|
|
341
371
|
*/
|
|
342
372
|
stock?: number | null;
|
|
343
373
|
/**
|
|
344
|
-
* The
|
|
374
|
+
* The display name of the plan shown to customers on the product page.
|
|
345
375
|
*/
|
|
346
376
|
title?: string | null;
|
|
347
377
|
/**
|
|
348
|
-
* The number of free trial days
|
|
378
|
+
* The number of free trial days before the first charge on a recurring plan.
|
|
349
379
|
*/
|
|
350
380
|
trial_period_days?: number | null;
|
|
351
381
|
/**
|
|
352
|
-
*
|
|
353
|
-
*
|
|
382
|
+
* Whether the plan has unlimited stock. When true, the stock field is ignored.
|
|
383
|
+
* Defaults to true.
|
|
354
384
|
*/
|
|
355
385
|
unlimited_stock?: boolean | null;
|
|
356
386
|
/**
|
|
@@ -386,7 +416,7 @@ export declare namespace PlanCreateParams {
|
|
|
386
416
|
required?: boolean | null;
|
|
387
417
|
}
|
|
388
418
|
/**
|
|
389
|
-
* An image
|
|
419
|
+
* An image displayed on the product page to represent this plan.
|
|
390
420
|
*/
|
|
391
421
|
interface Image {
|
|
392
422
|
/**
|
|
@@ -395,8 +425,8 @@ export declare namespace PlanCreateParams {
|
|
|
395
425
|
id: string;
|
|
396
426
|
}
|
|
397
427
|
/**
|
|
398
|
-
*
|
|
399
|
-
*
|
|
428
|
+
* Explicit payment method configuration for the plan. When not provided, the
|
|
429
|
+
* company's defaults apply.
|
|
400
430
|
*/
|
|
401
431
|
interface PaymentMethodConfiguration {
|
|
402
432
|
/**
|
|
@@ -421,7 +451,8 @@ export declare namespace PlanCreateParams {
|
|
|
421
451
|
}
|
|
422
452
|
export interface PlanUpdateParams {
|
|
423
453
|
/**
|
|
424
|
-
* The
|
|
454
|
+
* The number of days between recurring charges. For example, 30 for monthly or 365
|
|
455
|
+
* for yearly.
|
|
425
456
|
*/
|
|
426
457
|
billing_period?: number | null;
|
|
427
458
|
/**
|
|
@@ -429,37 +460,37 @@ export interface PlanUpdateParams {
|
|
|
429
460
|
*/
|
|
430
461
|
currency?: Shared.Currency | null;
|
|
431
462
|
/**
|
|
432
|
-
* An array of custom field
|
|
463
|
+
* An array of custom field definitions to collect from customers at checkout.
|
|
433
464
|
*/
|
|
434
465
|
custom_fields?: Array<PlanUpdateParams.CustomField> | null;
|
|
435
466
|
/**
|
|
436
|
-
*
|
|
467
|
+
* A text description of the plan displayed to customers on the product page.
|
|
437
468
|
*/
|
|
438
469
|
description?: string | null;
|
|
439
470
|
/**
|
|
440
|
-
* The number of days until the membership expires
|
|
441
|
-
*
|
|
471
|
+
* The number of days until the membership expires and access is revoked. For
|
|
472
|
+
* example, 365 for one-year access.
|
|
442
473
|
*/
|
|
443
474
|
expiration_days?: number | null;
|
|
444
475
|
/**
|
|
445
|
-
* An image
|
|
476
|
+
* An image displayed on the product page to represent this plan.
|
|
446
477
|
*/
|
|
447
478
|
image?: PlanUpdateParams.Image | null;
|
|
448
479
|
/**
|
|
449
|
-
*
|
|
450
|
-
*
|
|
480
|
+
* The amount charged on the first purchase. Provided in the plan's currency (e.g.,
|
|
481
|
+
* 10.43 for $10.43).
|
|
451
482
|
*/
|
|
452
483
|
initial_price?: number | null;
|
|
453
484
|
/**
|
|
454
|
-
*
|
|
485
|
+
* Private notes visible only to the business owner. Not shown to customers.
|
|
455
486
|
*/
|
|
456
487
|
internal_notes?: string | null;
|
|
457
488
|
/**
|
|
458
|
-
* Whether this plan uses legacy payment method controls
|
|
489
|
+
* Whether this plan uses legacy payment method controls.
|
|
459
490
|
*/
|
|
460
491
|
legacy_payment_method_controls?: boolean | null;
|
|
461
492
|
/**
|
|
462
|
-
* Whether
|
|
493
|
+
* Whether to offer a retention discount when a customer attempts to cancel.
|
|
463
494
|
*/
|
|
464
495
|
offer_cancel_discount?: boolean | null;
|
|
465
496
|
/**
|
|
@@ -468,40 +499,40 @@ export interface PlanUpdateParams {
|
|
|
468
499
|
*/
|
|
469
500
|
override_tax_type?: Shared.TaxType | null;
|
|
470
501
|
/**
|
|
471
|
-
*
|
|
472
|
-
* custom configuration
|
|
502
|
+
* Explicit payment method configuration for the plan. Sending null removes any
|
|
503
|
+
* custom configuration.
|
|
473
504
|
*/
|
|
474
505
|
payment_method_configuration?: PlanUpdateParams.PaymentMethodConfiguration | null;
|
|
475
506
|
/**
|
|
476
|
-
* The amount
|
|
477
|
-
*
|
|
507
|
+
* The amount charged each billing period for recurring plans. Provided in the
|
|
508
|
+
* plan's currency (e.g., 10.43 for $10.43).
|
|
478
509
|
*/
|
|
479
510
|
renewal_price?: number | null;
|
|
480
511
|
/**
|
|
481
|
-
* The number of units available for purchase.
|
|
512
|
+
* The maximum number of units available for purchase. Ignored when unlimited_stock
|
|
513
|
+
* is true.
|
|
482
514
|
*/
|
|
483
515
|
stock?: number | null;
|
|
484
516
|
/**
|
|
485
|
-
*
|
|
486
|
-
*
|
|
517
|
+
* A comparison price displayed with a strikethrough for the initial price.
|
|
518
|
+
* Provided in the plan's currency (e.g., 19.99 for $19.99).
|
|
487
519
|
*/
|
|
488
520
|
strike_through_initial_price?: number | null;
|
|
489
521
|
/**
|
|
490
|
-
*
|
|
491
|
-
*
|
|
522
|
+
* A comparison price displayed with a strikethrough for the renewal price.
|
|
523
|
+
* Provided in the plan's currency (e.g., 19.99 for $19.99).
|
|
492
524
|
*/
|
|
493
525
|
strike_through_renewal_price?: number | null;
|
|
494
526
|
/**
|
|
495
|
-
* The
|
|
527
|
+
* The display name of the plan shown to customers on the product page.
|
|
496
528
|
*/
|
|
497
529
|
title?: string | null;
|
|
498
530
|
/**
|
|
499
|
-
* The number of free trial days
|
|
531
|
+
* The number of free trial days before the first charge on a recurring plan.
|
|
500
532
|
*/
|
|
501
533
|
trial_period_days?: number | null;
|
|
502
534
|
/**
|
|
503
|
-
*
|
|
504
|
-
* purchases are limited by the stock field.
|
|
535
|
+
* Whether the plan has unlimited stock. When true, the stock field is ignored.
|
|
505
536
|
*/
|
|
506
537
|
unlimited_stock?: boolean | null;
|
|
507
538
|
/**
|
|
@@ -537,7 +568,7 @@ export declare namespace PlanUpdateParams {
|
|
|
537
568
|
required?: boolean | null;
|
|
538
569
|
}
|
|
539
570
|
/**
|
|
540
|
-
* An image
|
|
571
|
+
* An image displayed on the product page to represent this plan.
|
|
541
572
|
*/
|
|
542
573
|
interface Image {
|
|
543
574
|
/**
|
|
@@ -546,8 +577,8 @@ export declare namespace PlanUpdateParams {
|
|
|
546
577
|
id: string;
|
|
547
578
|
}
|
|
548
579
|
/**
|
|
549
|
-
*
|
|
550
|
-
* custom configuration
|
|
580
|
+
* Explicit payment method configuration for the plan. Sending null removes any
|
|
581
|
+
* custom configuration.
|
|
551
582
|
*/
|
|
552
583
|
interface PaymentMethodConfiguration {
|
|
553
584
|
/**
|
|
@@ -572,7 +603,7 @@ export declare namespace PlanUpdateParams {
|
|
|
572
603
|
}
|
|
573
604
|
export interface PlanListParams extends CursorPageParams {
|
|
574
605
|
/**
|
|
575
|
-
* The
|
|
606
|
+
* The unique identifier of the company to list plans for.
|
|
576
607
|
*/
|
|
577
608
|
company_id: string;
|
|
578
609
|
/**
|
|
@@ -580,11 +611,11 @@ export interface PlanListParams extends CursorPageParams {
|
|
|
580
611
|
*/
|
|
581
612
|
before?: string | null;
|
|
582
613
|
/**
|
|
583
|
-
*
|
|
614
|
+
* Only return plans created after this timestamp.
|
|
584
615
|
*/
|
|
585
616
|
created_after?: string | null;
|
|
586
617
|
/**
|
|
587
|
-
*
|
|
618
|
+
* Only return plans created before this timestamp.
|
|
588
619
|
*/
|
|
589
620
|
created_before?: string | null;
|
|
590
621
|
/**
|
|
@@ -604,19 +635,19 @@ export interface PlanListParams extends CursorPageParams {
|
|
|
604
635
|
*/
|
|
605
636
|
order?: 'id' | 'active_members_count' | 'created_at' | 'internal_notes' | 'expires_at' | null;
|
|
606
637
|
/**
|
|
607
|
-
*
|
|
638
|
+
* Filter to only plans matching these billing types.
|
|
608
639
|
*/
|
|
609
640
|
plan_types?: Array<Shared.PlanType> | null;
|
|
610
641
|
/**
|
|
611
|
-
*
|
|
642
|
+
* Filter to only plans belonging to these product identifiers.
|
|
612
643
|
*/
|
|
613
644
|
product_ids?: Array<string> | null;
|
|
614
645
|
/**
|
|
615
|
-
*
|
|
646
|
+
* Filter to only plans matching these release methods.
|
|
616
647
|
*/
|
|
617
648
|
release_methods?: Array<Shared.ReleaseMethod> | null;
|
|
618
649
|
/**
|
|
619
|
-
*
|
|
650
|
+
* Filter to only plans matching these visibility states.
|
|
620
651
|
*/
|
|
621
652
|
visibilities?: Array<Shared.VisibilityFilter> | null;
|
|
622
653
|
}
|
package/resources/plans.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../src/resources/plans.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC
|
|
1
|
+
{"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../src/resources/plans.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC;IAIjF;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC;IAIvE;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,GAAE,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,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IAE3C;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAEnC;;OAEG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;IAErD;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;CACtD;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
|
package/resources/plans.js
CHANGED
|
@@ -7,7 +7,8 @@ const pagination_1 = require("../core/pagination.js");
|
|
|
7
7
|
const path_1 = require("../internal/utils/path.js");
|
|
8
8
|
class Plans extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
|
-
* Create a new
|
|
10
|
+
* Create a new pricing plan for a product. The plan defines the billing interval,
|
|
11
|
+
* price, and availability for customers.
|
|
11
12
|
*
|
|
12
13
|
* Required permissions:
|
|
13
14
|
*
|
|
@@ -27,7 +28,7 @@ class Plans extends resource_1.APIResource {
|
|
|
27
28
|
return this._client.post('/plans', { body, ...options });
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
|
-
* Retrieves
|
|
31
|
+
* Retrieves the details of an existing plan.
|
|
31
32
|
*
|
|
32
33
|
* Required permissions:
|
|
33
34
|
*
|
|
@@ -44,7 +45,8 @@ class Plans extends resource_1.APIResource {
|
|
|
44
45
|
return this._client.get((0, path_1.path) `/plans/${id}`, options);
|
|
45
46
|
}
|
|
46
47
|
/**
|
|
47
|
-
* Update
|
|
48
|
+
* Update a plan's pricing, billing interval, visibility, stock, and other
|
|
49
|
+
* settings.
|
|
48
50
|
*
|
|
49
51
|
* Required permissions:
|
|
50
52
|
*
|
|
@@ -63,7 +65,8 @@ class Plans extends resource_1.APIResource {
|
|
|
63
65
|
return this._client.patch((0, path_1.path) `/plans/${id}`, { body, ...options });
|
|
64
66
|
}
|
|
65
67
|
/**
|
|
66
|
-
*
|
|
68
|
+
* Returns a paginated list of plans belonging to a company, with optional
|
|
69
|
+
* filtering by visibility, type, release method, and product.
|
|
67
70
|
*
|
|
68
71
|
* Required permissions:
|
|
69
72
|
*
|
|
@@ -83,7 +86,8 @@ class Plans extends resource_1.APIResource {
|
|
|
83
86
|
return this._client.getAPIList('/plans', (pagination_1.CursorPage), { query, ...options });
|
|
84
87
|
}
|
|
85
88
|
/**
|
|
86
|
-
*
|
|
89
|
+
* Permanently delete a plan from a product. Existing memberships on this plan will
|
|
90
|
+
* not be affected.
|
|
87
91
|
*
|
|
88
92
|
* Required permissions:
|
|
89
93
|
*
|
package/resources/plans.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plans.js","sourceRoot":"","sources":["../src/resources/plans.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,KAAM,SAAQ,sBAAW;IACpC
|
|
1
|
+
{"version":3,"file":"plans.js","sourceRoot":"","sources":["../src/resources/plans.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE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