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

Overview

Defined Under Namespace

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(id:) ⇒ Object

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

Parameters:

  • id (String)

    The ID of an existing file object.



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

Instance Attribute Details

#billing_periodInteger?

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

Returns:

  • (Integer, nil)


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

optional :billing_period, Integer, nil?: true

#checkout_stylingWhopSDK::Models::PlanUpdateParams::CheckoutStyling?

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



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

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

#currencySymbol, ...

The available currencies on the platform

Returns:



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

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

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

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



39
40
41
# File 'lib/whop_sdk/models/plan_update_params.rb', line 39

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.

Returns:

  • (String, nil)


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

optional :description, String, nil?: true

#expiration_daysInteger?

The number of days until the membership expires and access is revoked. For example, 365 for one-year access.

Returns:

  • (Integer, nil)


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

optional :expiration_days, Integer, nil?: true

#idString

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.



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

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

#initial_priceFloat?

The amount charged on the first purchase. Provided in the plan’s currency (e.g., 10.43 for $10.43).

Returns:

  • (Float, nil)


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

optional :initial_price, Float, nil?: true

#internal_notesString?

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

Returns:

  • (String, nil)


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

optional :internal_notes, String, nil?: true

#legacy_payment_method_controlsBoolean?

Whether this plan uses legacy payment method controls.

Returns:

  • (Boolean, nil)


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

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

#offer_cancel_discountBoolean?

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

Returns:

  • (Boolean, nil)


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

optional :offer_cancel_discount, WhopSDK::Internal::Type::Boolean, 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:



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

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

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

Explicit payment method configuration for the plan. Sending null removes any custom configuration.



99
100
101
# File 'lib/whop_sdk/models/plan_update_params.rb', line 99

optional :payment_method_configuration,
-> { WhopSDK::PlanUpdateParams::PaymentMethodConfiguration },
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)


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

optional :renewal_price, Float, nil?: true

#stockInteger?

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

Returns:

  • (Integer, nil)


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

optional :stock, Integer, nil?: true

#strike_through_initial_priceFloat?

A comparison price displayed with a strikethrough for the initial price. Provided in the plan’s currency (e.g., 19.99 for $19.99).

Returns:

  • (Float, nil)


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

optional :strike_through_initial_price, Float, nil?: true

#strike_through_renewal_priceFloat?

A comparison price displayed with a strikethrough for the renewal price. Provided in the plan’s currency (e.g., 19.99 for $19.99).

Returns:

  • (Float, nil)


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

optional :strike_through_renewal_price, Float, nil?: true

#titleString?

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

Returns:

  • (String, nil)


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

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)


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

optional :trial_period_days, Integer, nil?: true

#unlimited_stockBoolean?

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

Returns:

  • (Boolean, nil)


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

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

#visibilitySymbol, ...

Visibility of a resource

Returns:



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

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