Class: WhopSDK::Models::PlanUpdateParams

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

Overview

See Also:

  • WhopSDK::Resources::Plans#update

Defined Under Namespace

Modules: ThreeDSLevel Classes: CustomField, Image, PaymentMethodConfiguration

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

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: nil, enabled: nil, include_platform_defaults: nil) ⇒ Object

Explicit payment method configuration for the plan. When not provided, the account's defaults apply.

Parameters:

  • disabled (Array<String>) (defaults to: nil)
  • enabled (Array<String>) (defaults to: nil)
  • include_platform_defaults (Boolean) (defaults to: nil)


# File 'lib/whop_sdk/models/plan_update_params.rb', line 299

Instance Attribute Details

#adaptive_pricing_enabledBoolean?

Whether this plan accepts local currency payments via adaptive pricing.

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


19
# File 'lib/whop_sdk/models/plan_update_params.rb', line 19

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

#billing_periodInteger?

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

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


25
# File 'lib/whop_sdk/models/plan_update_params.rb', line 25

optional :billing_period, Integer, nil?: true

#checkout_stylingObject?

Checkout styling overrides for this plan.

Parameters:

  • value (top, nil)

Returns:

  • (Object, nil)


31
# File 'lib/whop_sdk/models/plan_update_params.rb', line 31

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

#currencyString?

The three-letter ISO currency code for the plan's pricing. Defaults to USD.

Parameters:

  • (String)

Returns:

  • (String, nil)


37
# File 'lib/whop_sdk/models/plan_update_params.rb', line 37

optional :currency, String

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

An array of custom field definitions to collect from customers at checkout. Omitting this field clears existing custom fields.

Parameters:

  • value (::Array[WhopSDK::PlanUpdateParams::CustomField], nil)

Returns:



44
45
46
# File 'lib/whop_sdk/models/plan_update_params.rb', line 44

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

#descriptionString?

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

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


52
# File 'lib/whop_sdk/models/plan_update_params.rb', line 52

optional :description, String, nil?: true

#expiration_daysInteger?

Access duration in days before the membership expires.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


58
# File 'lib/whop_sdk/models/plan_update_params.rb', line 58

optional :expiration_days, Integer, nil?: true

#idString

Parameters:

  • value (String)

Returns:

  • (String)


13
# File 'lib/whop_sdk/models/plan_update_params.rb', line 13

required :id, String

#imageWhopSDK::Models::PlanUpdateParams::Image?

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

Parameters:

  • value (WhopSDK::PlanUpdateParams::Image, nil)

Returns:



64
# File 'lib/whop_sdk/models/plan_update_params.rb', line 64

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

#initial_priceFloat?

Initial amount charged in the plan's currency, e.g. 10.43 for $10.43.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


70
# File 'lib/whop_sdk/models/plan_update_params.rb', line 70

optional :initial_price, Float, nil?: true

#internal_notesString?

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

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


76
# File 'lib/whop_sdk/models/plan_update_params.rb', line 76

optional :internal_notes, String, nil?: true

#legacy_payment_method_controlsBoolean?

Whether this plan uses legacy payment method controls.

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


82
# File 'lib/whop_sdk/models/plan_update_params.rb', line 82

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

#metadataObject?

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.

Parameters:

  • value (top, nil)

Returns:

  • (Object, nil)


90
# File 'lib/whop_sdk/models/plan_update_params.rb', line 90

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

#offer_cancel_discountBoolean?

Whether to offer a retention discount when a customer attempts to cancel.

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


96
# File 'lib/whop_sdk/models/plan_update_params.rb', line 96

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

#override_tax_typeString?

Override the default tax classification for this specific plan.

Parameters:

  • (String)

Returns:

  • (String, nil)


102
# File 'lib/whop_sdk/models/plan_update_params.rb', line 102

optional :override_tax_type, String

#payment_method_configurationWhopSDK::Models::PlanUpdateParams::PaymentMethodConfiguration?

Explicit payment method configuration for the plan. When not provided, the account's defaults apply.

Parameters:

  • value (WhopSDK::PlanUpdateParams::PaymentMethodConfiguration, nil)

Returns:



109
110
111
# File 'lib/whop_sdk/models/plan_update_params.rb', line 109

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

#renewal_priceFloat?

The amount charged each billing period for recurring plans, in the plan's currency.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


118
# File 'lib/whop_sdk/models/plan_update_params.rb', line 118

optional :renewal_price, Float, nil?: true

#stockInteger?

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

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


125
# File 'lib/whop_sdk/models/plan_update_params.rb', line 125

optional :stock, Integer, nil?: true

#strike_through_initial_priceFloat?

A comparison price displayed with a strikethrough for the initial price.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


131
# File 'lib/whop_sdk/models/plan_update_params.rb', line 131

optional :strike_through_initial_price, Float, nil?: true

#strike_through_renewal_priceFloat?

A comparison price displayed with a strikethrough for the renewal price.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


137
# File 'lib/whop_sdk/models/plan_update_params.rb', line 137

optional :strike_through_renewal_price, Float, nil?: true

#three_ds_levelSymbol, ...

3D Secure behavior for this plan. Send null to inherit the account default.



143
# File 'lib/whop_sdk/models/plan_update_params.rb', line 143

optional :three_ds_level, enum: -> { WhopSDK::PlanUpdateParams::ThreeDSLevel }

#titleString?

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

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :title, String, nil?: true

#trial_period_daysInteger?

Free trial duration before the first recurring charge.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


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

optional :trial_period_days, Integer, nil?: true

#unlimited_stockBoolean?

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

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


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

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

#visibilityString?

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

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :visibility, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash{

Returns:

  • ({)


126
# File 'sig/whop_sdk/models/plan_update_params.rbs', line 126

def to_hash: -> {