Class: WhopSDK::Models::MembershipListResponse

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

Overview

Defined Under Namespace

Classes: Company, Member, Plan, Product, PromoCode, User

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

The promotional code currently applied to this membership’s billing. Null if no promo code is active.

Parameters:

  • id (String)

    The unique identifier for the promo code.



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

Instance Attribute Details

#cancel_at_period_endBoolean

Whether this membership is set to cancel at the end of the current billing cycle. Only applies to memberships with a recurring plan.

Returns:

  • (Boolean)


18
# File 'lib/whop_sdk/models/membership_list_response.rb', line 18

required :cancel_at_period_end, WhopSDK::Internal::Type::Boolean

#cancel_optionSymbol, ...

The different reasons a user can choose for why they are canceling their membership.

Returns:



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

required :cancel_option, enum: -> { WhopSDK::CancelOptions }, nil?: true

#canceled_atTime?

The time the customer initiated cancellation of this membership. As a Unix timestamp. Null if the membership has not been canceled.

Returns:

  • (Time, nil)


32
# File 'lib/whop_sdk/models/membership_list_response.rb', line 32

required :canceled_at, Time, nil?: true

#cancellation_reasonString?

Free-text explanation provided by the customer when canceling. Null if the customer did not provide a reason.

Returns:

  • (String, nil)


39
# File 'lib/whop_sdk/models/membership_list_response.rb', line 39

required :cancellation_reason, String, nil?: true

#companyWhopSDK::Models::MembershipListResponse::Company

The company this membership belongs to.



45
# File 'lib/whop_sdk/models/membership_list_response.rb', line 45

required :company, -> { WhopSDK::Models::MembershipListResponse::Company }

#created_atTime

The datetime the membership was created.

Returns:

  • (Time)


51
# File 'lib/whop_sdk/models/membership_list_response.rb', line 51

required :created_at, Time

#currencySymbol, ...

The available currencies on the platform

Returns:



57
# File 'lib/whop_sdk/models/membership_list_response.rb', line 57

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

#idString

The unique identifier for the membership.

Returns:

  • (String)


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

required :id, String

#joined_atTime?

The time the user first joined the company associated with this membership. As a Unix timestamp. Null if the member record does not exist.

Returns:

  • (Time, nil)


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

required :joined_at, Time, nil?: true

#license_keyString?

The software license key associated with this membership. Only present if the product includes a Whop Software Licensing experience. Null otherwise.

Returns:

  • (String, nil)


71
# File 'lib/whop_sdk/models/membership_list_response.rb', line 71

required :license_key, String, nil?: true

#manage_urlString?

The URL where the customer can view and manage this membership, including cancellation and plan changes. Null if no member record exists.

Returns:

  • (String, nil)


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

required :manage_url, String, nil?: true

#memberWhopSDK::Models::MembershipListResponse::Member?

The member record linking the user to the company for this membership. Null if the member record has not been created yet.



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

required :member, -> { WhopSDK::Models::MembershipListResponse::Member }, nil?: true

#metadataHash{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.

Returns:

  • (Hash{Symbol=>Object}, nil)


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

required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true

#payment_collection_pausedBoolean

Whether recurring payment collection for this membership is temporarily paused by the company.

Returns:

  • (Boolean)


99
# File 'lib/whop_sdk/models/membership_list_response.rb', line 99

required :payment_collection_paused, WhopSDK::Internal::Type::Boolean

#planWhopSDK::Models::MembershipListResponse::Plan

The plan the customer purchased to create this membership.



105
# File 'lib/whop_sdk/models/membership_list_response.rb', line 105

required :plan, -> { WhopSDK::Models::MembershipListResponse::Plan }

#productWhopSDK::Models::MembershipListResponse::Product

The product this membership grants access to.



111
# File 'lib/whop_sdk/models/membership_list_response.rb', line 111

required :product, -> { WhopSDK::Models::MembershipListResponse::Product }

#promo_codeWhopSDK::Models::MembershipListResponse::PromoCode?

The promotional code currently applied to this membership’s billing. Null if no promo code is active.



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

required :promo_code, -> { WhopSDK::Models::MembershipListResponse::PromoCode }, nil?: true

#renewal_period_endTime?

The end of the current billing period for this recurring membership. As a Unix timestamp. Null if the membership is not recurring.

Returns:

  • (Time, nil)


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

required :renewal_period_end, Time, nil?: true

#renewal_period_startTime?

The start of the current billing period for this recurring membership. As a Unix timestamp. Null if the membership is not recurring.

Returns:

  • (Time, nil)


132
# File 'lib/whop_sdk/models/membership_list_response.rb', line 132

required :renewal_period_start, Time, nil?: true

#statusSymbol, WhopSDK::Models::MembershipStatus

The current lifecycle status of the membership (e.g., active, trialing, past_due, canceled, expired, completed).



139
# File 'lib/whop_sdk/models/membership_list_response.rb', line 139

required :status, enum: -> { WhopSDK::MembershipStatus }

#updated_atTime

The datetime the membership was last updated.

Returns:

  • (Time)


145
# File 'lib/whop_sdk/models/membership_list_response.rb', line 145

required :updated_at, Time

#userWhopSDK::Models::MembershipListResponse::User?

The user who owns this membership. Null if the user account has been deleted.



151
# File 'lib/whop_sdk/models/membership_list_response.rb', line 151

required :user, -> { WhopSDK::Models::MembershipListResponse::User }, nil?: true