Class: WhopSDK::Models::PlanListResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/plan_list_response.rb

Overview

Defined Under Namespace

Modules: ThreeDSLevel Classes: Company, Invoice, PaymentMethodConfiguration, Product

Instance Attribute Summary collapse

Instance Method Summary collapse

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:, title:) ⇒ Object

Some parameter documentations has been truncated, see Product for more details.

The product that this plan belongs to. Null for standalone one-off purchases not linked to a product.

Parameters:

  • id (String)

    The unique identifier for the product.

  • title (String)

    The display name of the product shown to customers on the product page and in se



# File 'lib/whop_sdk/models/plan_list_response.rb', line 196

Instance Attribute Details

#adaptive_pricing_enabledBoolean

Whether the creator has turned on adaptive pricing for this plan. Raw setting —does not check processor compatibility or feature flags.

Returns:

  • (Boolean)


18
# File 'lib/whop_sdk/models/plan_list_response.rb', line 18

required :adaptive_pricing_enabled, WhopSDK::Internal::Type::Boolean

#billing_periodInteger?

The number of days between each recurring charge. Null for one-time plans. For example, 30 for monthly or 365 for annual billing.

Returns:

  • (Integer, nil)


25
# File 'lib/whop_sdk/models/plan_list_response.rb', line 25

required :billing_period, Integer, nil?: true

#companyWhopSDK::Models::PlanListResponse::Company?

The company that sells this plan. Null for standalone invoice plans not linked to a company.



32
# File 'lib/whop_sdk/models/plan_list_response.rb', line 32

required :company, -> { WhopSDK::Models::PlanListResponse::Company }, nil?: true

#created_atTime

The datetime the plan was created.

Returns:

  • (Time)


38
# File 'lib/whop_sdk/models/plan_list_response.rb', line 38

required :created_at, Time

#currencySymbol, WhopSDK::Models::Currency

The currency used for all prices on this plan (e.g., ‘usd’, ‘eur’). All monetary amounts on the plan are denominated in this currency.

Returns:



45
# File 'lib/whop_sdk/models/plan_list_response.rb', line 45

required :currency, enum: -> { WhopSDK::Currency }

#descriptionString?

A text description of the plan visible to customers. Maximum 1000 characters. Null if no description is set.

Returns:

  • (String, nil)


52
# File 'lib/whop_sdk/models/plan_list_response.rb', line 52

required :description, String, nil?: true

#expiration_daysInteger?

The number of days until the membership expires (for expiration-based plans). For example, 365 for a one-year access pass.

Returns:

  • (Integer, nil)


59
# File 'lib/whop_sdk/models/plan_list_response.rb', line 59

required :expiration_days, Integer, nil?: true

#idString

The unique identifier for the plan.

Returns:

  • (String)


11
# File 'lib/whop_sdk/models/plan_list_response.rb', line 11

required :id, String

#initial_priceFloat

The initial purchase price in the plan’s base_currency (e.g., 49.99 for $49.99). For one-time plans, this is the full price. For renewal plans, this is charged on top of the first renewal_price.

Returns:

  • (Float)


67
# File 'lib/whop_sdk/models/plan_list_response.rb', line 67

required :initial_price, Float

#internal_notesString?

Private notes visible only to the company owner and team members. Not shown to customers. Null if no notes have been added.

Returns:

  • (String, nil)


74
# File 'lib/whop_sdk/models/plan_list_response.rb', line 74

required :internal_notes, String, nil?: true

#invoiceWhopSDK::Models::PlanListResponse::Invoice?

The invoice this plan was generated for. Null if the plan was not created for a specific invoice.



81
# File 'lib/whop_sdk/models/plan_list_response.rb', line 81

required :invoice, -> { WhopSDK::Models::PlanListResponse::Invoice }, nil?: true

#member_countInteger?

The number of users who currently hold an active membership through this plan. Only visible to authorized team members.

Returns:

  • (Integer, nil)


88
# File 'lib/whop_sdk/models/plan_list_response.rb', line 88

required :member_count, Integer, nil?: true

#metadataHash{Symbol=>Object}?

Custom key-value pairs stored on the plan. Included in webhook payloads for payment and membership events.

Returns:

  • (Hash{Symbol=>Object}, nil)


95
# File 'lib/whop_sdk/models/plan_list_response.rb', line 95

required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true

#payment_method_configurationWhopSDK::Models::PlanListResponse::PaymentMethodConfiguration?

The explicit payment method configuration specifying which payment methods are enabled or disabled for this plan. Null if the plan uses default settings.



102
103
104
# File 'lib/whop_sdk/models/plan_list_response.rb', line 102

required :payment_method_configuration,
-> { WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration },
nil?: true

#plan_typeSymbol, WhopSDK::Models::PlanType

The billing model for this plan: ‘renewal’ for recurring subscriptions or ‘one_time’ for single payments.

Returns:



111
# File 'lib/whop_sdk/models/plan_list_response.rb', line 111

required :plan_type, enum: -> { WhopSDK::PlanType }

#productWhopSDK::Models::PlanListResponse::Product?

The product that this plan belongs to. Null for standalone one-off purchases not linked to a product.



118
# File 'lib/whop_sdk/models/plan_list_response.rb', line 118

required :product, -> { WhopSDK::Models::PlanListResponse::Product }, nil?: true

#purchase_urlString

The full URL where customers can purchase this plan directly, bypassing the product page.

Returns:

  • (String)


125
# File 'lib/whop_sdk/models/plan_list_response.rb', line 125

required :purchase_url, String

#release_methodSymbol, WhopSDK::Models::ReleaseMethod

The method used to sell this plan: ‘buy_now’ for immediate purchase or ‘waitlist’ for waitlist-based access.

Returns:



132
# File 'lib/whop_sdk/models/plan_list_response.rb', line 132

required :release_method, enum: -> { WhopSDK::ReleaseMethod }

#renewal_priceFloat

The recurring price charged every billing_period in the plan’s base_currency (e.g., 9.99 for $9.99/period). Zero for one-time plans.

Returns:

  • (Float)


139
# File 'lib/whop_sdk/models/plan_list_response.rb', line 139

required :renewal_price, Float

#split_pay_required_paymentsInteger?

The total number of installment payments required before the subscription pauses. Null if split pay is not configured. Must be greater than 1.

Returns:

  • (Integer, nil)


146
# File 'lib/whop_sdk/models/plan_list_response.rb', line 146

required :split_pay_required_payments, Integer, nil?: true

#stockInteger?

The number of units available for purchase. Only visible to authorized team members. Null if the requester lacks permission.

Returns:

  • (Integer, nil)


153
# File 'lib/whop_sdk/models/plan_list_response.rb', line 153

required :stock, Integer, nil?: true

#three_ds_levelSymbol, ...

The 3D Secure behavior for a plan.



159
# File 'lib/whop_sdk/models/plan_list_response.rb', line 159

required :three_ds_level, enum: -> { WhopSDK::Models::PlanListResponse::ThreeDSLevel }, nil?: true

#titleString?

The display name of the plan shown to customers on the product page and at checkout. Maximum 30 characters. Null if no title has been set.

Returns:

  • (String, nil)


166
# File 'lib/whop_sdk/models/plan_list_response.rb', line 166

required :title, String, nil?: true

#trial_period_daysInteger?

The number of free trial days before the first charge on a renewal plan. Null if no trial is configured or the current user has already used a trial for this plan.

Returns:

  • (Integer, nil)


174
# File 'lib/whop_sdk/models/plan_list_response.rb', line 174

required :trial_period_days, Integer, nil?: true

#unlimited_stockBoolean

When true, the plan has unlimited stock (stock field is ignored). When false, purchases are limited by the stock field.

Returns:

  • (Boolean)


181
# File 'lib/whop_sdk/models/plan_list_response.rb', line 181

required :unlimited_stock, WhopSDK::Internal::Type::Boolean

#updated_atTime

The datetime the plan was last updated.

Returns:

  • (Time)


187
# File 'lib/whop_sdk/models/plan_list_response.rb', line 187

required :updated_at, Time

#visibilitySymbol, WhopSDK::Models::Visibility

Controls whether the plan is visible to customers. When set to ‘hidden’, the plan is only accessible via direct link.

Returns:



194
# File 'lib/whop_sdk/models/plan_list_response.rb', line 194

required :visibility, enum: -> { WhopSDK::Visibility }