Class: WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/whop_sdk/models/checkout_configuration_create_params.rb

Overview

See Also:

Defined Under Namespace

Classes: CustomField, Image, 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(disabled:, enabled:, include_platform_defaults: nil) ⇒ Object

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

The explicit payment method configuration for the plan. If not provided, the platform or company’s defaults will apply.

Parameters:

  • disabled (Array<Symbol, WhopSDK::Models::PaymentMethodTypes>)

    An array of payment method identifiers that are explicitly disabled. Only applie

  • enabled (Array<Symbol, WhopSDK::Models::PaymentMethodTypes>)

    An array of payment method identifiers that are explicitly enabled. This means t

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

    Whether Whop’s platform default payment method enablement settings are included



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

Instance Attribute Details

#adaptive_pricing_enabledBoolean?

Whether this plan accepts local currency payments via adaptive pricing.

Returns:

  • (Boolean, nil)


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

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

#application_fee_amountFloat?

The application fee amount collected by the platform from this connected account. Provided as a number in dollars (e.g., 5.00 for $5.00). Must be less than the total payment amount. Only valid for connected accounts with a parent company.

Returns:

  • (Float, nil)


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

optional :application_fee_amount, Float, nil?: true

#billing_periodInteger?

The interval in days at which the plan charges (renewal plans). For example, 30 for monthly billing.

Returns:

  • (Integer, nil)


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

optional :billing_period, Integer, nil?: true

#company_idString

The company the plan should be created for.

Returns:

  • (String)


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

required :company_id, String

#currencySymbol, WhopSDK::Models::Currency

The respective currency identifier for the plan.

Returns:



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

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

#custom_fieldsArray<WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan::CustomField>?

An array of custom field objects.



174
175
176
177
178
179
180
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 174

optional :custom_fields,
-> do
  WhopSDK::Internal::Type::ArrayOf[
    WhopSDK::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan::CustomField
  ]
end,
nil?: true

#descriptionString?

The description of the plan.

Returns:

  • (String, nil)


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

optional :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)


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

optional :expiration_days, Integer, nil?: true

#force_create_new_planBoolean?

Whether to force the creation of a new plan even if one with the same attributes already exists.

Returns:

  • (Boolean, nil)


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

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

#imageWhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan::Image?

An image for the plan. This will be visible on the product page to customers.



206
207
208
209
210
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 206

optional :image,
-> {
  WhopSDK::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan::Image
},
nil?: true

#initial_priceFloat?

An additional amount charged upon first purchase. Provided as a number in dollars (e.g., 10.00 for $10.00).

Returns:

  • (Float, nil)


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

optional :initial_price, Float, nil?: true

#internal_notesString?

A personal description or notes section for the business.

Returns:

  • (String, nil)


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

optional :internal_notes, String, nil?: true

#override_tax_typeSymbol, ...

Whether or not the tax is included in a plan’s price (or if it hasn’t been set up)

Returns:



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

optional :override_tax_type, enum: -> { WhopSDK::TaxType }, nil?: true

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

The explicit payment method configuration for the plan. If not provided, the platform or company’s defaults will apply.



237
238
239
240
241
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 237

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

#plan_typeSymbol, ...

The type of plan that can be attached to a product

Returns:



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

optional :plan_type, enum: -> { WhopSDK::PlanType }, nil?: true

#productWhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan::Product?

Pass this object to create a new product for this plan. We will use the product external identifier to find or create an existing product.



254
255
256
257
258
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 254

optional :product,
-> {
  WhopSDK::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan::Product
},
nil?: true

#product_idString?

The product the plan is related to. Either this or product is required.

Returns:

  • (String, nil)


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

optional :product_id, String, nil?: true

#release_methodSymbol, ...

The methods of how a plan can be released.

Returns:



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

optional :release_method, enum: -> { WhopSDK::ReleaseMethod }, nil?: true

#renewal_priceFloat?

The amount the customer is charged every billing period. Provided as a number in dollars (e.g., 9.99 for $9.99/period).

Returns:

  • (Float, nil)


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

optional :renewal_price, Float, nil?: true

#split_pay_required_paymentsInteger?

The number of payments required before pausing the subscription.

Returns:

  • (Integer, nil)


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

optional :split_pay_required_payments, Integer, nil?: true

#stockInteger?

The number of units available for purchase. If not provided, stock is unlimited.

Returns:

  • (Integer, nil)


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

optional :stock, Integer, nil?: true

#titleString?

The title of the plan. This will be visible on the product page to customers.

Returns:

  • (String, nil)


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

optional :title, String, nil?: true

#trial_period_daysInteger?

The number of free trial days added before a renewal plan.

Returns:

  • (Integer, nil)


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

optional :trial_period_days, Integer, nil?: true

#visibilitySymbol, ...

Visibility of a resource

Returns:



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

optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true