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

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



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

Instance Attribute Details

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


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

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)


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

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.



168
169
170
171
172
173
174
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 168

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)


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

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)


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

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)


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

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.



200
201
202
203
204
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 200

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)


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

optional :initial_price, Float, nil?: true

#internal_notesString?

A personal description or notes section for the business.

Returns:

  • (String, nil)


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

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:



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

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.



231
232
233
234
235
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 231

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:



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

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.



248
249
250
251
252
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 248

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)


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

optional :product_id, String, nil?: true

#release_methodSymbol, ...

The methods of how a plan can be released.

Returns:



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

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)


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

optional :renewal_price, Float, nil?: true

#split_pay_required_paymentsInteger?

The number of payments required before pausing the subscription.

Returns:

  • (Integer, nil)


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

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)


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

optional :stock, Integer, nil?: true

#titleString?

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

Returns:

  • (String, nil)


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

optional :title, String, nil?: true

#trial_period_daysInteger?

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

Returns:

  • (Integer, nil)


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

optional :trial_period_days, Integer, nil?: true

#visibilitySymbol, ...

Visibility of a resource

Returns:



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

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