Class: WhopSDK::Models::PlanCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/whop_sdk/models/plan_create_params.rb

Overview

Defined Under Namespace

Modules: ThreeDSLevel Classes: CheckoutStyling, CustomField, Image, PaymentMethodConfiguration

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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.

Explicit payment method configuration for the plan. When not provided, the company’s defaults 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/plan_create_params.rb', line 266

Instance Attribute Details

#adaptive_pricing_enabledBoolean?

Whether this plan accepts local currency payments via adaptive pricing.

Returns:

  • (Boolean, nil)


26
# File 'lib/whop_sdk/models/plan_create_params.rb', line 26

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

#billing_periodInteger?

The number of days between recurring charges. For example, 30 for monthly or 365 for yearly.

Returns:

  • (Integer, nil)


33
# File 'lib/whop_sdk/models/plan_create_params.rb', line 33

optional :billing_period, Integer, nil?: true

#checkout_stylingWhopSDK::Models::PlanCreateParams::CheckoutStyling?

Checkout styling overrides for this plan. Pass null to inherit from the company default.



40
# File 'lib/whop_sdk/models/plan_create_params.rb', line 40

optional :checkout_styling, -> { WhopSDK::PlanCreateParams::CheckoutStyling }, nil?: true

#company_idString

The unique identifier of the company to create this plan for.

Returns:

  • (String)


14
# File 'lib/whop_sdk/models/plan_create_params.rb', line 14

required :company_id, String

#currencySymbol, ...

The available currencies on the platform

Returns:



46
# File 'lib/whop_sdk/models/plan_create_params.rb', line 46

optional :currency, enum: -> { WhopSDK::Currency }, nil?: true

#custom_fieldsArray<WhopSDK::Models::PlanCreateParams::CustomField>?

An array of custom field definitions to collect from customers at checkout.



52
53
54
# File 'lib/whop_sdk/models/plan_create_params.rb', line 52

optional :custom_fields,
-> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::PlanCreateParams::CustomField] },
nil?: true

#descriptionString?

A text description of the plan displayed to customers on the product page.

Returns:

  • (String, nil)


60
# File 'lib/whop_sdk/models/plan_create_params.rb', line 60

optional :description, String, nil?: true

#expiration_daysInteger?

The number of days until the membership expires and access is revoked. Used for expiration-based plans.

Returns:

  • (Integer, nil)


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

optional :expiration_days, Integer, nil?: true

#imageWhopSDK::Models::PlanCreateParams::Image?

An image displayed on the product page to represent this plan.



73
# File 'lib/whop_sdk/models/plan_create_params.rb', line 73

optional :image, -> { WhopSDK::PlanCreateParams::Image }, nil?: true

#initial_priceFloat?

The amount charged on the first purchase. For one-time plans, this is the full price. For recurring plans, this is an additional charge on top of the renewal price. Provided in the plan’s currency (e.g., 10.43 for $10.43).

Returns:

  • (Float, nil)


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

optional :initial_price, Float, nil?: true

#internal_notesString?

Private notes visible only to the business owner. Not shown to customers.

Returns:

  • (String, nil)


87
# File 'lib/whop_sdk/models/plan_create_params.rb', line 87

optional :internal_notes, String, nil?: true

#legacy_payment_method_controlsBoolean?

Whether this plan uses legacy payment method controls.

Returns:

  • (Boolean, nil)


93
# File 'lib/whop_sdk/models/plan_create_params.rb', line 93

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

#metadataHash{Symbol=>Object}?

Custom key-value pairs to store on the plan. Included in webhook payloads for payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per value.

Returns:

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


101
# File 'lib/whop_sdk/models/plan_create_params.rb', line 101

optional :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], 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:



108
# File 'lib/whop_sdk/models/plan_create_params.rb', line 108

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

#payment_method_configurationWhopSDK::Models::PlanCreateParams::PaymentMethodConfiguration?

Explicit payment method configuration for the plan. When not provided, the company’s defaults apply.



115
116
117
# File 'lib/whop_sdk/models/plan_create_params.rb', line 115

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

#plan_typeSymbol, ...

The type of plan that can be attached to a product

Returns:



123
# File 'lib/whop_sdk/models/plan_create_params.rb', line 123

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

#product_idString

The unique identifier of the product to attach this plan to.

Returns:

  • (String)


20
# File 'lib/whop_sdk/models/plan_create_params.rb', line 20

required :product_id, String

#release_methodSymbol, ...

The methods of how a plan can be released.

Returns:



129
# File 'lib/whop_sdk/models/plan_create_params.rb', line 129

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

#renewal_priceFloat?

The amount charged each billing period for recurring plans. Provided in the plan’s currency (e.g., 10.43 for $10.43).

Returns:

  • (Float, nil)


136
# File 'lib/whop_sdk/models/plan_create_params.rb', line 136

optional :renewal_price, Float, nil?: true

#split_pay_required_paymentsInteger?

The number of installment payments required before the subscription pauses.

Returns:

  • (Integer, nil)


142
# File 'lib/whop_sdk/models/plan_create_params.rb', line 142

optional :split_pay_required_payments, Integer, nil?: true

#stockInteger?

The maximum number of units available for purchase. Ignored when unlimited_stock is true.

Returns:

  • (Integer, nil)


149
# File 'lib/whop_sdk/models/plan_create_params.rb', line 149

optional :stock, Integer, nil?: true

#three_ds_levelSymbol, ...

The 3D Secure behavior for a plan.



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

optional :three_ds_level, enum: -> { WhopSDK::PlanCreateParams::ThreeDSLevel }, nil?: true

#titleString?

The display name of the plan shown to customers on the product page.

Returns:

  • (String, nil)


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

optional :title, String, nil?: true

#trial_period_daysInteger?

The number of free trial days before the first charge on a recurring plan.

Returns:

  • (Integer, nil)


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

optional :trial_period_days, Integer, nil?: true

#unlimited_stockBoolean?

Whether the plan has unlimited stock. When true, the stock field is ignored. Defaults to true.

Returns:

  • (Boolean, nil)


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

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

#visibilitySymbol, ...

Visibility of a resource

Returns:



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

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