Class: WhopSDK::Models::Membership
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::Membership
- Defined in:
- lib/whop_sdk/models/membership.rb
Defined Under Namespace
Classes: Company, CustomFieldResponse, Member, Plan, Product, PromoCode, User
Instance Attribute Summary collapse
-
#cancel_at_period_end ⇒ Boolean
Whether this membership is set to cancel at the end of the current billing cycle.
-
#cancel_option ⇒ Symbol, ...
The different reasons a user can choose for why they are canceling their membership.
-
#canceled_at ⇒ Time?
The time the customer initiated cancellation of this membership.
-
#cancellation_reason ⇒ String?
Free-text explanation provided by the customer when canceling.
-
#company ⇒ WhopSDK::Models::Membership::Company
The company this membership belongs to.
-
#created_at ⇒ Time
The datetime the membership was created.
-
#currency ⇒ Symbol, ...
The available currencies on the platform.
-
#custom_field_responses ⇒ Array<WhopSDK::Models::Membership::CustomFieldResponse>
The customer’s responses to custom checkout questions configured on the product at the time of purchase.
-
#id ⇒ String
The unique identifier for the membership.
-
#joined_at ⇒ Time?
The time the user first joined the company associated with this membership.
-
#license_key ⇒ String?
The software license key associated with this membership.
-
#manage_url ⇒ String?
The URL where the customer can view and manage this membership, including cancellation and plan changes.
-
#member ⇒ WhopSDK::Models::Membership::Member?
The member record linking the user to the company for this membership.
-
#metadata ⇒ Hash{Symbol=>Object}?
Custom key-value pairs for the membership (commonly used for software licensing, e.g., HWID).
-
#payment_collection_paused ⇒ Boolean
Whether recurring payment collection for this membership is temporarily paused by the company.
-
#plan ⇒ WhopSDK::Models::Membership::Plan
The plan the customer purchased to create this membership.
-
#product ⇒ WhopSDK::Models::Membership::Product
The product this membership grants access to.
-
#promo_code ⇒ WhopSDK::Models::Membership::PromoCode?
The promotional code currently applied to this membership’s billing.
-
#renewal_period_end ⇒ Time?
The end of the current billing period for this recurring membership.
-
#renewal_period_start ⇒ Time?
The start of the current billing period for this recurring membership.
-
#status ⇒ Symbol, WhopSDK::Models::MembershipStatus
The current lifecycle status of the membership (e.g., active, trialing, past_due, canceled, expired, completed).
-
#updated_at ⇒ Time
The datetime the membership was last updated.
-
#user ⇒ WhopSDK::Models::Membership::User?
The user who owns this membership.
Instance Method Summary collapse
-
#initialize(id:) ⇒ Object
constructor
The promotional code currently applied to this membership’s billing.
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
The promotional code currently applied to this membership’s billing. Null if no promo code is active.
|
|
# File 'lib/whop_sdk/models/membership.rb', line 160
|
Instance Attribute Details
#cancel_at_period_end ⇒ Boolean
Whether this membership is set to cancel at the end of the current billing cycle. Only applies to memberships with a recurring plan.
17 |
# File 'lib/whop_sdk/models/membership.rb', line 17 required :cancel_at_period_end, WhopSDK::Internal::Type::Boolean |
#cancel_option ⇒ Symbol, ...
The different reasons a user can choose for why they are canceling their membership.
24 |
# File 'lib/whop_sdk/models/membership.rb', line 24 required :cancel_option, enum: -> { WhopSDK::CancelOptions }, nil?: true |
#canceled_at ⇒ Time?
The time the customer initiated cancellation of this membership. As a Unix timestamp. Null if the membership has not been canceled.
31 |
# File 'lib/whop_sdk/models/membership.rb', line 31 required :canceled_at, Time, nil?: true |
#cancellation_reason ⇒ String?
Free-text explanation provided by the customer when canceling. Null if the customer did not provide a reason.
38 |
# File 'lib/whop_sdk/models/membership.rb', line 38 required :cancellation_reason, String, nil?: true |
#company ⇒ WhopSDK::Models::Membership::Company
The company this membership belongs to.
44 |
# File 'lib/whop_sdk/models/membership.rb', line 44 required :company, -> { WhopSDK::Membership::Company } |
#created_at ⇒ Time
The datetime the membership was created.
50 |
# File 'lib/whop_sdk/models/membership.rb', line 50 required :created_at, Time |
#currency ⇒ Symbol, ...
The available currencies on the platform
56 |
# File 'lib/whop_sdk/models/membership.rb', line 56 required :currency, enum: -> { WhopSDK::Currency }, nil?: true |
#custom_field_responses ⇒ Array<WhopSDK::Models::Membership::CustomFieldResponse>
The customer’s responses to custom checkout questions configured on the product at the time of purchase.
63 64 |
# File 'lib/whop_sdk/models/membership.rb', line 63 required :custom_field_responses, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Membership::CustomFieldResponse] } |
#id ⇒ String
The unique identifier for the membership.
10 |
# File 'lib/whop_sdk/models/membership.rb', line 10 required :id, String |
#joined_at ⇒ Time?
The time the user first joined the company associated with this membership. As a Unix timestamp. Null if the member record does not exist.
71 |
# File 'lib/whop_sdk/models/membership.rb', line 71 required :joined_at, Time, nil?: true |
#license_key ⇒ String?
The software license key associated with this membership. Only present if the product includes a Whop Software Licensing experience. Null otherwise.
78 |
# File 'lib/whop_sdk/models/membership.rb', line 78 required :license_key, String, nil?: true |
#manage_url ⇒ String?
The URL where the customer can view and manage this membership, including cancellation and plan changes. Null if no member record exists.
85 |
# File 'lib/whop_sdk/models/membership.rb', line 85 required :manage_url, String, nil?: true |
#member ⇒ WhopSDK::Models::Membership::Member?
The member record linking the user to the company for this membership. Null if the member record has not been created yet.
92 |
# File 'lib/whop_sdk/models/membership.rb', line 92 required :member, -> { WhopSDK::Membership::Member }, nil?: true |
#metadata ⇒ Hash{Symbol=>Object}?
Custom key-value pairs for the membership (commonly used for software licensing, e.g., HWID). Max 50 keys, 500 chars per key, 5000 chars per value.
99 |
# File 'lib/whop_sdk/models/membership.rb', line 99 required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true |
#payment_collection_paused ⇒ Boolean
Whether recurring payment collection for this membership is temporarily paused by the company.
106 |
# File 'lib/whop_sdk/models/membership.rb', line 106 required :payment_collection_paused, WhopSDK::Internal::Type::Boolean |
#plan ⇒ WhopSDK::Models::Membership::Plan
The plan the customer purchased to create this membership.
112 |
# File 'lib/whop_sdk/models/membership.rb', line 112 required :plan, -> { WhopSDK::Membership::Plan } |
#product ⇒ WhopSDK::Models::Membership::Product
The product this membership grants access to.
118 |
# File 'lib/whop_sdk/models/membership.rb', line 118 required :product, -> { WhopSDK::Membership::Product } |
#promo_code ⇒ WhopSDK::Models::Membership::PromoCode?
The promotional code currently applied to this membership’s billing. Null if no promo code is active.
125 |
# File 'lib/whop_sdk/models/membership.rb', line 125 required :promo_code, -> { WhopSDK::Membership::PromoCode }, nil?: true |
#renewal_period_end ⇒ Time?
The end of the current billing period for this recurring membership. As a Unix timestamp. Null if the membership is not recurring.
132 |
# File 'lib/whop_sdk/models/membership.rb', line 132 required :renewal_period_end, Time, nil?: true |
#renewal_period_start ⇒ Time?
The start of the current billing period for this recurring membership. As a Unix timestamp. Null if the membership is not recurring.
139 |
# File 'lib/whop_sdk/models/membership.rb', line 139 required :renewal_period_start, Time, nil?: true |
#status ⇒ Symbol, WhopSDK::Models::MembershipStatus
The current lifecycle status of the membership (e.g., active, trialing, past_due, canceled, expired, completed).
146 |
# File 'lib/whop_sdk/models/membership.rb', line 146 required :status, enum: -> { WhopSDK::MembershipStatus } |
#updated_at ⇒ Time
The datetime the membership was last updated.
152 |
# File 'lib/whop_sdk/models/membership.rb', line 152 required :updated_at, Time |
#user ⇒ WhopSDK::Models::Membership::User?
The user who owns this membership. Null if the user account has been deleted.
158 |
# File 'lib/whop_sdk/models/membership.rb', line 158 required :user, -> { WhopSDK::Membership::User }, nil?: true |