Class: WhopSDK::Models::PlanCreateParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::PlanCreateParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/whop_sdk/models/plan_create_params.rb,
sig/whop_sdk/models/plan_create_params.rbs
Overview
Defined Under Namespace
Modules: ThreeDSLevel Classes: CustomField, Image, PaymentMethodConfiguration
Instance Attribute Summary collapse
-
#account_id ⇒ String?
The unique identifier of the account to create this plan for.
-
#adaptive_pricing_enabled ⇒ Boolean?
Whether this plan accepts local currency payments via adaptive pricing.
-
#billing_period ⇒ Integer?
Recurring billing interval in days, such as 30 for monthly or 365 for annual.
-
#checkout_styling ⇒ Object?
Checkout styling overrides for this plan.
-
#currency ⇒ String?
The three-letter ISO currency code for the plan's pricing.
-
#custom_fields ⇒ Array<WhopSDK::Models::PlanCreateParams::CustomField>?
An array of custom field definitions to collect from customers at checkout.
-
#description ⇒ String?
A text description of the plan displayed to customers on the product page.
-
#expiration_days ⇒ Integer?
Access duration in days before the membership expires.
-
#image ⇒ WhopSDK::Models::PlanCreateParams::Image?
An image displayed on the product page to represent this plan.
-
#initial_price ⇒ Float?
Initial amount charged in the plan's currency, e.g.
-
#internal_notes ⇒ String?
Private notes visible only to the account owner.
-
#legacy_payment_method_controls ⇒ Boolean?
Whether this plan uses legacy payment method controls.
-
#metadata ⇒ Object?
Custom key-value pairs to store on the plan.
-
#override_tax_type ⇒ String?
Override the default tax classification for this specific plan.
-
#payment_method_configuration ⇒ WhopSDK::Models::PlanCreateParams::PaymentMethodConfiguration?
Explicit payment method configuration for the plan.
-
#plan_type ⇒ String?
Plan billing type, such as
one_timeorrenewal. -
#product_id ⇒ String?
The unique identifier of the product to attach this plan to.
-
#release_method ⇒ String?
Sales method for this plan, such as
buy_noworwaitlist. -
#renewal_price ⇒ Float?
The amount charged each billing period for recurring plans, in the plan's currency.
-
#split_pay_required_payments ⇒ Integer?
Installment payments required before the subscription pauses.
-
#stock ⇒ Integer?
The maximum number of units available for purchase.
-
#three_ds_level ⇒ Symbol, ...
3D Secure behavior for this plan.
-
#title ⇒ String?
The display name of the plan shown to customers on the product page.
-
#trial_period_days ⇒ Integer?
Free trial duration before the first recurring charge.
-
#unlimited_stock ⇒ Boolean?
Whether the plan has unlimited stock.
-
#visibility ⇒ String?
Whether the plan is visible to customers or hidden from public view.
Attributes included from Internal::Type::RequestParameters
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(disabled: nil, enabled: nil, include_platform_defaults: nil) ⇒ Object
constructor
Explicit payment method configuration for the plan.
- #to_hash ⇒ {
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
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: nil, enabled: nil, include_platform_defaults: nil) ⇒ Object
Explicit payment method configuration for the plan. When not provided, the account's defaults apply.
|
|
# File 'lib/whop_sdk/models/plan_create_params.rb', line 309
|
Instance Attribute Details
#account_id ⇒ String?
The unique identifier of the account to create this plan for. Defaults to the caller's account.
15 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 15 optional :account_id, String |
#adaptive_pricing_enabled ⇒ Boolean?
Whether this plan accepts local currency payments via adaptive pricing.
21 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 21 optional :adaptive_pricing_enabled, WhopSDK::Internal::Type::Boolean, nil?: true |
#billing_period ⇒ Integer?
Recurring billing interval in days, such as 30 for monthly or 365 for annual.
27 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 27 optional :billing_period, Integer, nil?: true |
#checkout_styling ⇒ Object?
Checkout styling overrides for this plan.
33 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 33 optional :checkout_styling, WhopSDK::Internal::Type::Unknown, nil?: true |
#currency ⇒ String?
The three-letter ISO currency code for the plan's pricing. Defaults to USD.
39 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 39 optional :currency, String |
#custom_fields ⇒ Array<WhopSDK::Models::PlanCreateParams::CustomField>?
An array of custom field definitions to collect from customers at checkout. Omitting this field clears existing custom fields.
46 47 48 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 46 optional :custom_fields, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::PlanCreateParams::CustomField] }, nil?: true |
#description ⇒ String?
A text description of the plan displayed to customers on the product page.
54 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 54 optional :description, String, nil?: true |
#expiration_days ⇒ Integer?
Access duration in days before the membership expires.
60 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 60 optional :expiration_days, Integer, nil?: true |
#image ⇒ WhopSDK::Models::PlanCreateParams::Image?
An image displayed on the product page to represent this plan.
66 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 66 optional :image, -> { WhopSDK::PlanCreateParams::Image }, nil?: true |
#initial_price ⇒ Float?
Initial amount charged in the plan's currency, e.g. 10.43 for $10.43.
72 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 72 optional :initial_price, Float, nil?: true |
#internal_notes ⇒ String?
Private notes visible only to the account owner. Not shown to customers.
78 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 78 optional :internal_notes, String, nil?: true |
#legacy_payment_method_controls ⇒ Boolean?
Whether this plan uses legacy payment method controls.
84 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 84 optional :legacy_payment_method_controls, WhopSDK::Internal::Type::Boolean, nil?: true |
#metadata ⇒ Object?
Custom key-value pairs to store on the plan. Included in webhook payloads for payment and membership events. Max 50 keys, 100 chars per key, 500 chars per string value.
92 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 92 optional :metadata, WhopSDK::Internal::Type::Unknown, nil?: true |
#override_tax_type ⇒ String?
Override the default tax classification for this specific plan.
98 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 98 optional :override_tax_type, String |
#payment_method_configuration ⇒ WhopSDK::Models::PlanCreateParams::PaymentMethodConfiguration?
Explicit payment method configuration for the plan. When not provided, the account's defaults apply.
105 106 107 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 105 optional :payment_method_configuration, -> { WhopSDK::PlanCreateParams::PaymentMethodConfiguration }, nil?: true |
#plan_type ⇒ String?
Plan billing type, such as one_time or renewal.
113 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 113 optional :plan_type, String |
#product_id ⇒ String?
The unique identifier of the product to attach this plan to.
119 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 119 optional :product_id, String |
#release_method ⇒ String?
Sales method for this plan, such as buy_now or waitlist.
125 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 125 optional :release_method, String |
#renewal_price ⇒ Float?
The amount charged each billing period for recurring plans, in the plan's currency.
132 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 132 optional :renewal_price, Float, nil?: true |
#split_pay_required_payments ⇒ Integer?
Installment payments required before the subscription pauses.
138 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 138 optional :split_pay_required_payments, Integer, nil?: true |
#stock ⇒ Integer?
The maximum number of units available for purchase. Ignored when unlimited_stock is true.
145 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 145 optional :stock, Integer, nil?: true |
#three_ds_level ⇒ Symbol, ...
3D Secure behavior for this plan. Send null to inherit the account default.
151 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 151 optional :three_ds_level, enum: -> { WhopSDK::PlanCreateParams::ThreeDSLevel } |
#title ⇒ String?
The display name of the plan shown to customers on the product page.
157 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 157 optional :title, String, nil?: true |
#trial_period_days ⇒ Integer?
Free trial duration before the first recurring charge.
163 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 163 optional :trial_period_days, Integer, nil?: true |
#unlimited_stock ⇒ Boolean?
Whether the plan has unlimited stock. When true, the stock field is ignored.
169 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 169 optional :unlimited_stock, WhopSDK::Internal::Type::Boolean, nil?: true |
#visibility ⇒ String?
Whether the plan is visible to customers or hidden from public view.
175 |
# File 'lib/whop_sdk/models/plan_create_params.rb', line 175 optional :visibility, String |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/whop_sdk/models/plan_create_params.rb', line 293
|
Instance Method Details
#to_hash ⇒ {
138 |
# File 'sig/whop_sdk/models/plan_create_params.rbs', line 138
def to_hash: -> {
|