Class: WhopSDK::Models::CheckoutConfiguration::Plan

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/checkout_configuration.rb,
sig/whop_sdk/models/checkout_configuration.rbs

Overview

See Also:

  • WhopSDK::Models::CheckoutConfiguration#plan

Defined Under Namespace

Modules: ThreeDSLevel

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:, adaptive_pricing_enabled:, billing_period:, currency:, expiration_days:, initial_price:, plan_type:, release_method:, renewal_price:, three_ds_level:, trial_period_days:, visibility:) ⇒ Object

Some parameter documentations has been truncated, see WhopSDK::Models::CheckoutConfiguration::Plan for more details.

The plan to use for the checkout configuration

Parameters:

  • id (String)

    The unique identifier for the plan.

  • adaptive_pricing_enabled (Boolean)

    Whether the creator has turned on adaptive pricing for this plan. Raw setting —

  • billing_period (Integer, nil)

    Number of days between recurring charges, such as 30 for monthly or 365 for annu

  • currency (Symbol, WhopSDK::Models::Currency)

    The currency used for all prices on this plan (e.g., 'usd', 'eur'). All monetary

  • expiration_days (Integer, nil)

    Access duration in days for expiration-based plans, such as 365 for a one-year p

  • initial_price (Float)

    The initial purchase price in the plan's base_currency (e.g., 49.99 for $49.99).

  • plan_type (Symbol, WhopSDK::Models::PlanType)

    The billing model for this plan: 'renewal' for recurring subscriptions or 'one_t

  • release_method (Symbol, WhopSDK::Models::ReleaseMethod)

    Sales method for this plan: buy_now for immediate purchase or waitlist for w

  • renewal_price (Float)

    The recurring price charged every billing_period in the plan's base_currency (e.

  • three_ds_level (Symbol, WhopSDK::Models::CheckoutConfiguration::Plan::ThreeDSLevel, nil)

    The 3D Secure behavior for a plan.

  • trial_period_days (Integer, nil)

    Free trial days before first renewal charge. null if no trial is configured or

  • visibility (Symbol, WhopSDK::Models::Visibility)

    Controls whether the plan is visible to customers. When set to 'hidden', the pla



# File 'lib/whop_sdk/models/checkout_configuration.rb', line 226

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.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


154
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 154

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

#billing_periodInteger?

Number of days between recurring charges, such as 30 for monthly or 365 for annual. null for one-time plans.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


161
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 161

required :billing_period, Integer, nil?: true

#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.

Parameters:

  • value (WhopSDK::Models::currency)

Returns:



168
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 168

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

#expiration_daysInteger?

Access duration in days for expiration-based plans, such as 365 for a one-year pass.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


175
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 175

required :expiration_days, Integer, nil?: true

#idString

The unique identifier for the plan.

Parameters:

  • value (String)

Returns:

  • (String)


147
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 147

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.

Parameters:

  • value (Float)

Returns:

  • (Float)


183
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 183

required :initial_price, Float

#plan_typeSymbol, WhopSDK::Models::PlanType

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

Parameters:

  • value (WhopSDK::Models::plan_type)

Returns:



190
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 190

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

#release_methodSymbol, WhopSDK::Models::ReleaseMethod

Sales method for this plan: buy_now for immediate purchase or waitlist for waitlist-based access.

Parameters:

  • value (WhopSDK::Models::release_method)

Returns:



197
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 197

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.

Parameters:

  • value (Float)

Returns:

  • (Float)


204
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 204

required :renewal_price, Float

#three_ds_levelSymbol, ...

The 3D Secure behavior for a plan.

Parameters:

  • value (WhopSDK::Models::CheckoutConfiguration::Plan::three_ds_level, nil)

Returns:



210
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 210

required :three_ds_level, enum: -> { WhopSDK::CheckoutConfiguration::Plan::ThreeDSLevel }, nil?: true

#trial_period_daysInteger?

Free trial days before first renewal charge. null if no trial is configured or the user has already used a trial for this plan.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


217
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 217

required :trial_period_days, Integer, nil?: true

#visibilitySymbol, WhopSDK::Models::Visibility

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

Parameters:

  • value (WhopSDK::Models::visibility)

Returns:



224
# File 'lib/whop_sdk/models/checkout_configuration.rb', line 224

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

Instance Method Details

#to_hash{

Returns:

  • ({)


147
# File 'sig/whop_sdk/models/checkout_configuration.rbs', line 147

def to_hash: -> {