Class: WhopSDK::Models::PlanListResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/plan_list_response.rb,
sig/whop_sdk/models/plan_list_response.rbs

Overview

See Also:

  • WhopSDK::Resources::Plans#list

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(id:, account:, adaptive_pricing_enabled:, billing_period:, created_at:, currency:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, metadata:, payment_method_configuration:, plan_type:, product:, purchase_url:, release_method:, renewal_price:, split_pay_required_payments:, stock:, three_ds_level:, title:, trial_period_days:, unlimited_stock:, updated_at:, visibility:) ⇒ Object

Some parameter documentations has been truncated, see WhopSDK::Models::PlanListResponse for more details.

Parameters:

  • id (String)

    Plan ID, prefixed plan_.

  • account (Object, nil)

    Account that sells this plan; null for standalone invoice plans.

  • adaptive_pricing_enabled (Boolean)

    Whether this plan accepts local currency payments via adaptive pricing.

  • billing_period (Float, nil)

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

  • created_at (String)

    When the plan was created, as an ISO 8601 timestamp.

  • currency (String)

    Three-letter ISO currency code for this plan's prices.

  • description (String, nil)

    Customer-visible plan description.

  • expiration_days (Float, nil)

    Access duration in days for expiration-based plans.

  • initial_price (Float)

    Initial purchase price in plan currency.

  • internal_notes (String, nil)

    Private notes visible only to authorized team members.

  • invoice (Object, nil)

    Invoice this plan was generated for; null unless created for an invoice.

  • member_count (Float, nil)

    Active memberships through this plan, when visible to the requester.

  • metadata (Object, nil)

    Custom key-value pairs stored on the plan.

  • payment_method_configuration (Object, nil)

    Payment method configuration (enabled, disabled, include_platform_defaults

  • plan_type (String)

    Billing model for this plan: renewal (recurring) or one_time (single payment

  • product (Object, nil)

    Product this plan belongs to; null for standalone plans.

  • purchase_url (String)

    URL where customers can purchase this plan directly.

  • release_method (String)

    Sales method for this plan, such as buy_now or waitlist.

  • renewal_price (Float)

    Recurring price charged every billing period.

  • split_pay_required_payments (Float, nil)

    Installment payments required before the subscription pauses.

  • stock (Float, nil)

    Units available for purchase, when visible to the requester.

  • three_ds_level (String, nil)

    3D Secure behavior for this plan; null inherits account default.

  • title (String, nil)

    Plan display name shown to customers.

  • trial_period_days (Float, nil)

    Free trial days before the first renewal charge. null if no trial is configure

  • unlimited_stock (Boolean)

    Whether the plan has unlimited stock.

  • updated_at (String)

    When the plan was last updated, as an ISO 8601 timestamp.

  • visibility (String)

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



# File 'lib/whop_sdk/models/plan_list_response.rb', line 173

Instance Attribute Details

#accountObject?

Account that sells this plan; null for standalone invoice plans.

Parameters:

  • value (top, nil)

Returns:

  • (Object, nil)


17
# File 'lib/whop_sdk/models/plan_list_response.rb', line 17

required :account, WhopSDK::Internal::Type::Unknown, nil?: true

#adaptive_pricing_enabledBoolean

Whether this plan accepts local currency payments via adaptive pricing.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


23
# File 'lib/whop_sdk/models/plan_list_response.rb', line 23

required :adaptive_pricing_enabled, WhopSDK::Internal::Type::Boolean

#billing_periodFloat?

Recurring billing interval in days, such as 30 for monthly or 365 for annual. null for one-time plans.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


30
# File 'lib/whop_sdk/models/plan_list_response.rb', line 30

required :billing_period, Float, nil?: true

#created_atString

When the plan was created, as an ISO 8601 timestamp.

Parameters:

  • value (String)

Returns:

  • (String)


36
# File 'lib/whop_sdk/models/plan_list_response.rb', line 36

required :created_at, String

#currencyString

Three-letter ISO currency code for this plan's prices.

Parameters:

  • value (String)

Returns:

  • (String)


42
# File 'lib/whop_sdk/models/plan_list_response.rb', line 42

required :currency, String

#descriptionString?

Customer-visible plan description.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


48
# File 'lib/whop_sdk/models/plan_list_response.rb', line 48

required :description, String, nil?: true

#expiration_daysFloat?

Access duration in days for expiration-based plans.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


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

required :expiration_days, Float, nil?: true

#idString

Plan ID, prefixed plan_.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/whop_sdk/models/plan_list_response.rb', line 11

required :id, String

#initial_priceFloat

Initial purchase price in plan currency.

Parameters:

  • value (Float)

Returns:

  • (Float)


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

required :initial_price, Float

#internal_notesString?

Private notes visible only to authorized team members.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


66
# File 'lib/whop_sdk/models/plan_list_response.rb', line 66

required :internal_notes, String, nil?: true

#invoiceObject?

Invoice this plan was generated for; null unless created for an invoice.

Parameters:

  • value (top, nil)

Returns:

  • (Object, nil)


72
# File 'lib/whop_sdk/models/plan_list_response.rb', line 72

required :invoice, WhopSDK::Internal::Type::Unknown, nil?: true

#member_countFloat?

Active memberships through this plan, when visible to the requester.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


78
# File 'lib/whop_sdk/models/plan_list_response.rb', line 78

required :member_count, Float, nil?: true

#metadataObject?

Custom key-value pairs stored on the plan.

Parameters:

  • value (top, nil)

Returns:

  • (Object, nil)


84
# File 'lib/whop_sdk/models/plan_list_response.rb', line 84

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

#payment_method_configurationObject?

Payment method configuration (enabled, disabled, include_platform_defaults); null when plan uses default settings.

Parameters:

  • value (top, nil)

Returns:

  • (Object, nil)


91
# File 'lib/whop_sdk/models/plan_list_response.rb', line 91

required :payment_method_configuration, WhopSDK::Internal::Type::Unknown, nil?: true

#plan_typeString

Billing model for this plan: renewal (recurring) or one_time (single payment).

Parameters:

  • value (String)

Returns:

  • (String)


98
# File 'lib/whop_sdk/models/plan_list_response.rb', line 98

required :plan_type, String

#productObject?

Product this plan belongs to; null for standalone plans.

Parameters:

  • value (top, nil)

Returns:

  • (Object, nil)


104
# File 'lib/whop_sdk/models/plan_list_response.rb', line 104

required :product, WhopSDK::Internal::Type::Unknown, nil?: true

#purchase_urlString

URL where customers can purchase this plan directly.

Parameters:

  • value (String)

Returns:

  • (String)


110
# File 'lib/whop_sdk/models/plan_list_response.rb', line 110

required :purchase_url, String

#release_methodString

Sales method for this plan, such as buy_now or waitlist.

Parameters:

  • value (String)

Returns:

  • (String)


116
# File 'lib/whop_sdk/models/plan_list_response.rb', line 116

required :release_method, String

#renewal_priceFloat

Recurring price charged every billing period.

Parameters:

  • value (Float)

Returns:

  • (Float)


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

required :renewal_price, Float

#split_pay_required_paymentsFloat?

Installment payments required before the subscription pauses.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


128
# File 'lib/whop_sdk/models/plan_list_response.rb', line 128

required :split_pay_required_payments, Float, nil?: true

#stockFloat?

Units available for purchase, when visible to the requester.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


134
# File 'lib/whop_sdk/models/plan_list_response.rb', line 134

required :stock, Float, nil?: true

#three_ds_levelString?

3D Secure behavior for this plan; null inherits account default.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


140
# File 'lib/whop_sdk/models/plan_list_response.rb', line 140

required :three_ds_level, String, nil?: true

#titleString?

Plan display name shown to customers.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


146
# File 'lib/whop_sdk/models/plan_list_response.rb', line 146

required :title, String, nil?: true

#trial_period_daysFloat?

Free trial days before the first renewal charge. null if no trial is configured or the user has already used a trial for this plan.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


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

required :trial_period_days, Float, nil?: true

#unlimited_stockBoolean

Whether the plan has unlimited stock.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


159
# File 'lib/whop_sdk/models/plan_list_response.rb', line 159

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

#updated_atString

When the plan was last updated, as an ISO 8601 timestamp.

Parameters:

  • value (String)

Returns:

  • (String)


165
# File 'lib/whop_sdk/models/plan_list_response.rb', line 165

required :updated_at, String

#visibilityString

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

Parameters:

  • value (String)

Returns:

  • (String)


171
# File 'lib/whop_sdk/models/plan_list_response.rb', line 171

required :visibility, String

Instance Method Details

#to_hash{

Returns:

  • ({)


119
# File 'sig/whop_sdk/models/plan_list_response.rbs', line 119

def to_hash: -> {