Class: WhopSDK::Models::CheckoutConfigurationCreateParams::Plan

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

Defined Under Namespace

Classes: PaymentMethodConfiguration

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(billing_period: nil, company_id: nil, currency: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, initial_price: nil, metadata: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, product_id: nil, release_method: nil, renewal_price: nil, stock: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil) ⇒ Object

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

Plan attributes used to create or find a plan for this checkout configuration. Mutually exclusive with plan_id.

Parameters:

  • billing_period (Integer, nil) (defaults to: nil)

    Recurring billing interval in days, such as 30 for monthly or 365 for annual.

  • company_id (String, nil) (defaults to: nil)

    Account ID for the inline plan, prefixed biz_. Defaults to the account resolve

  • currency (String, nil) (defaults to: nil)

    Three-letter ISO currency code for the plan's prices.

  • description (String, nil) (defaults to: nil)

    Customer-visible plan description.

  • expiration_days (Integer, nil) (defaults to: nil)

    Access duration in days for expiration-based plans.

  • force_create_new_plan (Boolean, nil) (defaults to: nil)

    Whether to create a new plan instead of reusing a matching one.

  • initial_price (Float, nil) (defaults to: nil)

    Initial purchase price in the plan currency.

  • metadata (Object, nil) (defaults to: nil)

    Custom key-value metadata stored on the plan.

  • override_tax_type (String, nil) (defaults to: nil)

    Tax classification override for this plan.

  • payment_method_configuration (WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::PaymentMethodConfiguration, nil) (defaults to: nil)

    Payment method overrides for the inline plan. null uses platform defaults.

  • plan_type (String, nil) (defaults to: nil)

    Billing model for the plan: renewal (recurring) or one_time (single payment)

  • product_id (String, nil) (defaults to: nil)

    Product ID the inline plan should belong to, prefixed prod_.

  • release_method (String, nil) (defaults to: nil)

    Sales method for the plan, such as buy_now or waitlist.

  • renewal_price (Float, nil) (defaults to: nil)

    Recurring price charged each billing period.

  • stock (Integer, nil) (defaults to: nil)

    Units available for purchase.

  • title (String, nil) (defaults to: nil)

    Plan display name shown to customers.

  • trial_period_days (Integer, nil) (defaults to: nil)

    Free trial days before the first renewal charge.

  • unlimited_stock (Boolean, nil) (defaults to: nil)

    Whether the plan has unlimited stock.

  • visibility (String, nil) (defaults to: nil)

    Whether the plan is visible to customers or hidden from public view.



# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 262

Instance Attribute Details

#billing_periodInteger?

Recurring billing interval in days, such as 30 for monthly or 365 for annual.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


148
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 148

optional :billing_period, Integer, nil?: true

#company_idString?

Account ID for the inline plan, prefixed biz_. Defaults to the account resolved from the request.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


155
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 155

optional :company_id, String, nil?: true

#currencyString?

Three-letter ISO currency code for the plan's prices.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :currency, String, nil?: true

#descriptionString?

Customer-visible plan description.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


167
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 167

optional :description, String, nil?: true

#expiration_daysInteger?

Access duration in days for expiration-based plans.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


173
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 173

optional :expiration_days, Integer, nil?: true

#force_create_new_planBoolean?

Whether to create a new plan instead of reusing a matching one.

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


179
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 179

optional :force_create_new_plan, WhopSDK::Internal::Type::Boolean, nil?: true

#initial_priceFloat?

Initial purchase price in the plan currency.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


185
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 185

optional :initial_price, Float, nil?: true

#metadataObject?

Custom key-value metadata stored on the plan.

Parameters:

  • value (top, nil)

Returns:

  • (Object, nil)


191
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 191

optional :metadata, WhopSDK::Internal::Type::Unknown, nil?: true

#override_tax_typeString?

Tax classification override for this plan.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :override_tax_type, String, nil?: true

#payment_method_configurationWhopSDK::Models::CheckoutConfigurationCreateParams::Plan::PaymentMethodConfiguration?

Payment method overrides for the inline plan. null uses platform defaults.

Parameters:

  • value (WhopSDK::CheckoutConfigurationCreateParams::Plan::PaymentMethodConfiguration, nil)

Returns:



203
204
205
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 203

optional :payment_method_configuration,
-> { WhopSDK::CheckoutConfigurationCreateParams::Plan::PaymentMethodConfiguration },
nil?: true

#plan_typeString?

Billing model for the plan: renewal (recurring) or one_time (single payment).

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


212
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 212

optional :plan_type, String, nil?: true

#product_idString?

Product ID the inline plan should belong to, prefixed prod_.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


218
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 218

optional :product_id, String, nil?: true

#release_methodString?

Sales method for the plan, such as buy_now or waitlist.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :release_method, String, nil?: true

#renewal_priceFloat?

Recurring price charged each billing period.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


230
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 230

optional :renewal_price, Float, nil?: true

#stockInteger?

Units available for purchase.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


236
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 236

optional :stock, Integer, nil?: true

#titleString?

Plan display name shown to customers.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


242
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 242

optional :title, String, nil?: true

#trial_period_daysInteger?

Free trial days before the first renewal charge.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


248
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 248

optional :trial_period_days, Integer, nil?: true

#unlimited_stockBoolean?

Whether the plan has unlimited stock.

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


254
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 254

optional :unlimited_stock, WhopSDK::Internal::Type::Boolean, nil?: true

#visibilityString?

Whether the plan is visible to customers or hidden from public view.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


260
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 260

optional :visibility, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


204
# File 'sig/whop_sdk/models/checkout_configuration_create_params.rbs', line 204

def to_hash: -> {