Class: WhopSDK::Models::Plan
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::Plan
- Defined in:
- lib/whop_sdk/models/plan.rb,
sig/whop_sdk/models/plan.rbs
Defined Under Namespace
Modules: Currency, PlanType, ReleaseMethod, TaxType, ThreeDSLevel, Visibility Classes: CustomField
Instance Attribute Summary collapse
-
#account ⇒ Object?
Account that sells this plan;
nullfor standalone invoice plans. -
#adaptive_pricing_enabled ⇒ Boolean
Whether this plan accepts local currency payments via adaptive pricing.
-
#billing_period ⇒ Float?
Recurring billing interval in days, such as 30 for monthly or 365 for annual.
-
#collect_tax ⇒ Boolean
Whether tax is collected on purchases of this plan.
-
#created_at ⇒ String
When the plan was created, as an ISO 8601 timestamp.
-
#currency ⇒ Symbol, WhopSDK::Models::Plan::Currency
Three-letter ISO currency code for this plan's prices.
- #custom_fields ⇒ Array<WhopSDK::Models::Plan::CustomField>
-
#description ⇒ String?
Customer-visible plan description.
-
#expiration_days ⇒ Float?
Access duration in days for expiration-based plans.
-
#id ⇒ String
Plan ID, prefixed
plan_. -
#initial_price ⇒ Float
Initial purchase price in plan currency.
-
#internal_notes ⇒ String?
Private notes visible only to authorized team members.
-
#invoice ⇒ Object?
Invoice this plan was generated for;
nullunless created for an invoice. -
#member_count ⇒ Float?
Active memberships through this plan, when visible to the requester.
-
#metadata ⇒ Object?
Custom key-value pairs stored on the plan.
-
#payment_method_configuration ⇒ Object?
Payment method configuration (
enabled,disabled,include_platform_defaults);nullwhen plan uses default settings. -
#plan_type ⇒ Symbol, WhopSDK::Models::Plan::PlanType
Billing model for this plan:
renewal(recurring) orone_time(single payment). -
#product ⇒ Object?
Product this plan belongs to;
nullfor standalone plans. -
#purchase_url ⇒ String
URL where customers can purchase this plan directly.
-
#release_method ⇒ Symbol, WhopSDK::Models::Plan::ReleaseMethod
Sales method for this plan, such as
buy_noworwaitlist. -
#renewal_price ⇒ Float
Recurring price charged every billing period.
-
#split_pay_required_payments ⇒ Float?
Installment payments required before the subscription pauses.
-
#stock ⇒ Float?
Units available for purchase, when visible to the requester.
-
#tax_type ⇒ Symbol, WhopSDK::Models::Plan::TaxType
How tax is handled for this plan.
-
#three_ds_level ⇒ Symbol, ...
3D Secure behavior for this plan;
nullinherits account default. -
#title ⇒ String?
Plan display name shown to customers.
-
#trial_period_days ⇒ Float?
Free trial days before the first renewal charge.
-
#unlimited_stock ⇒ Boolean
Whether the plan has unlimited stock.
-
#updated_at ⇒ String
When the plan was last updated, as an ISO 8601 timestamp.
-
#visibility ⇒ Symbol, WhopSDK::Models::Plan::Visibility
Whether the plan is visible to customers or hidden from public view.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, account:, adaptive_pricing_enabled:, billing_period:, collect_tax:, created_at:, currency:, custom_fields:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, metadata:, payment_method_configuration:, plan_type:, product:, purchase_url:, release_method:, renewal_price:, split_pay_required_payments:, stock:, tax_type:, three_ds_level:, title:, trial_period_days:, unlimited_stock:, updated_at:, visibility:) ⇒ Object
constructor
Some parameter documentations has been truncated, see Plan for more details.
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(id:, account:, adaptive_pricing_enabled:, billing_period:, collect_tax:, created_at:, currency:, custom_fields:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, metadata:, payment_method_configuration:, plan_type:, product:, purchase_url:, release_method:, renewal_price:, split_pay_required_payments:, stock:, tax_type:, three_ds_level:, title:, trial_period_days:, unlimited_stock:, updated_at:, visibility:) ⇒ Object
Some parameter documentations has been truncated, see WhopSDK::Models::Plan for more details.
|
|
# File 'lib/whop_sdk/models/plan.rb', line 189
|
Instance Attribute Details
#account ⇒ Object?
Account that sells this plan; null for standalone invoice plans.
16 |
# File 'lib/whop_sdk/models/plan.rb', line 16 required :account, WhopSDK::Internal::Type::Unknown, nil?: true |
#adaptive_pricing_enabled ⇒ Boolean
Whether this plan accepts local currency payments via adaptive pricing.
22 |
# File 'lib/whop_sdk/models/plan.rb', line 22 required :adaptive_pricing_enabled, WhopSDK::Internal::Type::Boolean |
#billing_period ⇒ Float?
Recurring billing interval in days, such as 30 for monthly or 365 for annual.
null for one-time plans.
29 |
# File 'lib/whop_sdk/models/plan.rb', line 29 required :billing_period, Float, nil?: true |
#collect_tax ⇒ Boolean
Whether tax is collected on purchases of this plan.
35 |
# File 'lib/whop_sdk/models/plan.rb', line 35 required :collect_tax, WhopSDK::Internal::Type::Boolean |
#created_at ⇒ String
When the plan was created, as an ISO 8601 timestamp.
41 |
# File 'lib/whop_sdk/models/plan.rb', line 41 required :created_at, String |
#currency ⇒ Symbol, WhopSDK::Models::Plan::Currency
Three-letter ISO currency code for this plan's prices.
47 |
# File 'lib/whop_sdk/models/plan.rb', line 47 required :currency, enum: -> { WhopSDK::Plan::Currency } |
#custom_fields ⇒ Array<WhopSDK::Models::Plan::CustomField>
52 |
# File 'lib/whop_sdk/models/plan.rb', line 52 required :custom_fields, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Plan::CustomField] } |
#description ⇒ String?
Customer-visible plan description.
58 |
# File 'lib/whop_sdk/models/plan.rb', line 58 required :description, String, nil?: true |
#expiration_days ⇒ Float?
Access duration in days for expiration-based plans.
64 |
# File 'lib/whop_sdk/models/plan.rb', line 64 required :expiration_days, Float, nil?: true |
#id ⇒ String
Plan ID, prefixed plan_.
10 |
# File 'lib/whop_sdk/models/plan.rb', line 10 required :id, String |
#initial_price ⇒ Float
Initial purchase price in plan currency.
70 |
# File 'lib/whop_sdk/models/plan.rb', line 70 required :initial_price, Float |
#internal_notes ⇒ String?
Private notes visible only to authorized team members.
76 |
# File 'lib/whop_sdk/models/plan.rb', line 76 required :internal_notes, String, nil?: true |
#invoice ⇒ Object?
Invoice this plan was generated for; null unless created for an invoice.
82 |
# File 'lib/whop_sdk/models/plan.rb', line 82 required :invoice, WhopSDK::Internal::Type::Unknown, nil?: true |
#member_count ⇒ Float?
Active memberships through this plan, when visible to the requester.
88 |
# File 'lib/whop_sdk/models/plan.rb', line 88 required :member_count, Float, nil?: true |
#metadata ⇒ Object?
Custom key-value pairs stored on the plan.
94 |
# File 'lib/whop_sdk/models/plan.rb', line 94 required :metadata, WhopSDK::Internal::Type::Unknown, nil?: true |
#payment_method_configuration ⇒ Object?
Payment method configuration (enabled, disabled,
include_platform_defaults); null when plan uses default settings.
101 |
# File 'lib/whop_sdk/models/plan.rb', line 101 required :payment_method_configuration, WhopSDK::Internal::Type::Unknown, nil?: true |
#plan_type ⇒ Symbol, WhopSDK::Models::Plan::PlanType
Billing model for this plan: renewal (recurring) or one_time (single
payment).
108 |
# File 'lib/whop_sdk/models/plan.rb', line 108 required :plan_type, enum: -> { WhopSDK::Plan::PlanType } |
#product ⇒ Object?
Product this plan belongs to; null for standalone plans.
114 |
# File 'lib/whop_sdk/models/plan.rb', line 114 required :product, WhopSDK::Internal::Type::Unknown, nil?: true |
#purchase_url ⇒ String
URL where customers can purchase this plan directly.
120 |
# File 'lib/whop_sdk/models/plan.rb', line 120 required :purchase_url, String |
#release_method ⇒ Symbol, WhopSDK::Models::Plan::ReleaseMethod
Sales method for this plan, such as buy_now or waitlist.
126 |
# File 'lib/whop_sdk/models/plan.rb', line 126 required :release_method, enum: -> { WhopSDK::Plan::ReleaseMethod } |
#renewal_price ⇒ Float
Recurring price charged every billing period.
132 |
# File 'lib/whop_sdk/models/plan.rb', line 132 required :renewal_price, Float |
#split_pay_required_payments ⇒ Float?
Installment payments required before the subscription pauses.
138 |
# File 'lib/whop_sdk/models/plan.rb', line 138 required :split_pay_required_payments, Float, nil?: true |
#stock ⇒ Float?
Units available for purchase, when visible to the requester.
144 |
# File 'lib/whop_sdk/models/plan.rb', line 144 required :stock, Float, nil?: true |
#tax_type ⇒ Symbol, WhopSDK::Models::Plan::TaxType
How tax is handled for this plan.
150 |
# File 'lib/whop_sdk/models/plan.rb', line 150 required :tax_type, enum: -> { WhopSDK::Plan::TaxType } |
#three_ds_level ⇒ Symbol, ...
3D Secure behavior for this plan; null inherits account default.
156 |
# File 'lib/whop_sdk/models/plan.rb', line 156 required :three_ds_level, enum: -> { WhopSDK::Plan::ThreeDSLevel }, nil?: true |
#title ⇒ String?
Plan display name shown to customers.
162 |
# File 'lib/whop_sdk/models/plan.rb', line 162 required :title, String, nil?: true |
#trial_period_days ⇒ Float?
Free trial days before the first renewal charge. null if no trial is
configured or the user has already used a trial for this plan.
169 |
# File 'lib/whop_sdk/models/plan.rb', line 169 required :trial_period_days, Float, nil?: true |
#unlimited_stock ⇒ Boolean
Whether the plan has unlimited stock.
175 |
# File 'lib/whop_sdk/models/plan.rb', line 175 required :unlimited_stock, WhopSDK::Internal::Type::Boolean |
#updated_at ⇒ String
When the plan was last updated, as an ISO 8601 timestamp.
181 |
# File 'lib/whop_sdk/models/plan.rb', line 181 required :updated_at, String |
#visibility ⇒ Symbol, WhopSDK::Models::Plan::Visibility
Whether the plan is visible to customers or hidden from public view.
187 |
# File 'lib/whop_sdk/models/plan.rb', line 187 required :visibility, enum: -> { WhopSDK::Plan::Visibility } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/whop_sdk/models/plan.rb', line 350
|
Instance Method Details
#to_hash ⇒ {
131 |
# File 'sig/whop_sdk/models/plan.rbs', line 131
def to_hash: -> {
|