Class: WhopSDK::Models::Plan

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/plan.rb

Defined Under Namespace

Classes: Company, CustomField, Invoice, 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 any.

Parameters:

  • disabled (Array<Symbol, WhopSDK::Models::PaymentMethodTypes>) (defaults to: )

    An array of payment method identifiers that are explicitly disabled. Only applie

  • enabled (Array<Symbol, WhopSDK::Models::PaymentMethodTypes>) (defaults to: )

    An array of payment method identifiers that are explicitly enabled. This means t

  • include_platform_defaults (Boolean) (defaults to: )

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



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

Instance Attribute Details

#billing_periodInteger?

The interval at which the plan charges (renewal plans).

Returns:

  • (Integer, nil)


16
# File 'lib/whop_sdk/models/plan.rb', line 16

required :billing_period, Integer, nil?: true

#collect_taxBoolean

Whether or not the plan collects tax.

Returns:

  • (Boolean)


22
# File 'lib/whop_sdk/models/plan.rb', line 22

required :collect_tax, WhopSDK::Internal::Type::Boolean

#companyWhopSDK::Models::Plan::Company?

The company for the plan.



28
# File 'lib/whop_sdk/models/plan.rb', line 28

required :company, -> { WhopSDK::Plan::Company }, nil?: true

#created_atTime

When the plan was created.

Returns:

  • (Time)


34
# File 'lib/whop_sdk/models/plan.rb', line 34

required :created_at, Time

#currencySymbol, WhopSDK::Models::Currency

The respective currency identifier for the plan.

Returns:



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

required :currency, enum: -> { WhopSDK::Currency }

#custom_fieldsArray<WhopSDK::Models::Plan::CustomField>

The custom fields for the plan.



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

required :custom_fields, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Plan::CustomField] }

#descriptionString?

The description of the plan.

Returns:

  • (String, nil)


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

required :description, String, nil?: true

#expiration_daysInteger?

The interval at which the plan charges (expiration plans).

Returns:

  • (Integer, nil)


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

required :expiration_days, Integer, nil?: true

#idString

The internal ID of the plan.

Returns:

  • (String)


10
# File 'lib/whop_sdk/models/plan.rb', line 10

required :id, String

#initial_priceFloat

The price a person has to pay for a plan on the initial purchase.

Returns:

  • (Float)


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

required :initial_price, Float

#internal_notesString?

A personal description or notes section for the business.

Returns:

  • (String, nil)


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

required :internal_notes, String, nil?: true

#invoiceWhopSDK::Models::Plan::Invoice?

The invoice associated with this plan.



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

required :invoice, -> { WhopSDK::Plan::Invoice }, nil?: true

#member_countInteger?

The number of members for the plan.

Returns:

  • (Integer, nil)


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

required :member_count, Integer, nil?: true

#payment_method_configurationWhopSDK::Models::Plan::PaymentMethodConfiguration?

The explicit payment method configuration for the plan, if any.



88
# File 'lib/whop_sdk/models/plan.rb', line 88

required :payment_method_configuration, -> { WhopSDK::Plan::PaymentMethodConfiguration }, nil?: true

#plan_typeSymbol, WhopSDK::Models::PlanType

Indicates if the plan is a one time payment or recurring.

Returns:



94
# File 'lib/whop_sdk/models/plan.rb', line 94

required :plan_type, enum: -> { WhopSDK::PlanType }

#productWhopSDK::Models::Plan::Product?

The product that this plan belongs to.



100
# File 'lib/whop_sdk/models/plan.rb', line 100

required :product, -> { WhopSDK::Plan::Product }, nil?: true

#purchase_urlString

The direct link to purchase the product.

Returns:

  • (String)


106
# File 'lib/whop_sdk/models/plan.rb', line 106

required :purchase_url, String

#release_methodSymbol, WhopSDK::Models::ReleaseMethod

This is the release method the business uses to sell this plan.

Returns:



112
# File 'lib/whop_sdk/models/plan.rb', line 112

required :release_method, enum: -> { WhopSDK::ReleaseMethod }

#renewal_priceFloat

The price a person has to pay for a plan on the renewal purchase.

Returns:

  • (Float)


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

required :renewal_price, Float

#stockInteger?

The number of units available for purchase. Only displayed to authorized actors

Returns:

  • (Integer, nil)


124
# File 'lib/whop_sdk/models/plan.rb', line 124

required :stock, Integer, nil?: true

#tax_typeSymbol, WhopSDK::Models::TaxType

The tax type for the plan.

Returns:



130
# File 'lib/whop_sdk/models/plan.rb', line 130

required :tax_type, enum: -> { WhopSDK::TaxType }

#titleString?

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

Returns:

  • (String, nil)


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

required :title, String, nil?: true

#trial_period_daysInteger?

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

Returns:

  • (Integer, nil)


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

required :trial_period_days, Integer, nil?: true

#unlimited_stockBoolean

Limits/doesn’t limit the number of units available for purchase.

Returns:

  • (Boolean)


148
# File 'lib/whop_sdk/models/plan.rb', line 148

required :unlimited_stock, WhopSDK::Internal::Type::Boolean

#updated_atTime

When the plan was last updated.

Returns:

  • (Time)


154
# File 'lib/whop_sdk/models/plan.rb', line 154

required :updated_at, Time

#visibilitySymbol, WhopSDK::Models::Visibility

Shows or hides the plan from public/business view.

Returns:



160
# File 'lib/whop_sdk/models/plan.rb', line 160

required :visibility, enum: -> { WhopSDK::Visibility }