Class: WhopSDK::Models::Membership

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

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 Promo Code that is currently applied to this Membership.

Parameters:

  • id (String) (defaults to: )

    The ID of the promo.



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

Instance Attribute Details

#cancel_at_period_endBoolean

Whether this Membership is set to cancel at the end of the current billing cycle. Only applies for memberships that have a renewal plan.

Returns:

  • (Boolean)


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

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

#canceled_atTime?

The epoch timestamp of when the customer initiated a cancellation.

Returns:

  • (Time, nil)


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

required :canceled_at, Time, nil?: true

#cancellation_reasonString?

The reason that the member canceled the membership (filled out by the member).

Returns:

  • (String, nil)


29
# File 'lib/whop_sdk/models/membership.rb', line 29

required :cancellation_reason, String, nil?: true

#companyWhopSDK::Models::Membership::Company

The Company this Membership belongs to.



35
# File 'lib/whop_sdk/models/membership.rb', line 35

required :company, -> { WhopSDK::Membership::Company }

#created_atTime

The timestamp, in seconds, that this Membership was created at.

Returns:

  • (Time)


41
# File 'lib/whop_sdk/models/membership.rb', line 41

required :created_at, Time

#currencySymbol, ...

The available currencies on the platform

Returns:



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

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

#idString

The ID of the membership

Returns:

  • (String)


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

required :id, String

#license_keyString?

The license key for this Membership. This is only present if the membership grants access to an instance of the Whop Software app.

Returns:

  • (String, nil)


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

required :license_key, String, nil?: true

#manage_urlString?

The URL for the customer to manage their membership.

Returns:

  • (String, nil)


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

required :manage_url, String, nil?: true

#memberWhopSDK::Models::Membership::Member?

The Member that this Membership belongs to.



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

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

#metadataHash{Symbol=>Object}

A JSON object used to store software licensing information. Ex. HWID

Returns:

  • (Hash{Symbol=>Object})


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

required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]

#payment_collection_pausedBoolean

Whether the membership’s payments are currently paused.

Returns:

  • (Boolean)


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

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

#planWhopSDK::Models::Membership::Plan

The Plan this Membership is for.



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

required :plan, -> { WhopSDK::Membership::Plan }

#productWhopSDK::Models::Membership::Product

The Product this Membership grants access to.



90
# File 'lib/whop_sdk/models/membership.rb', line 90

required :product, -> { WhopSDK::Membership::Product }

#promo_codeWhopSDK::Models::Membership::PromoCode?

The Promo Code that is currently applied to this Membership.



96
# File 'lib/whop_sdk/models/membership.rb', line 96

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

#renewal_period_endTime?

The timestamp in seconds at which the current billing cycle for this subscription ends. Only applies for memberships that have a renewal plan.

Returns:

  • (Time, nil)


103
# File 'lib/whop_sdk/models/membership.rb', line 103

required :renewal_period_end, Time, nil?: true

#renewal_period_startTime?

The timestamp in seconds at which the current billing cycle for this subscription start. Only applies for memberships that have a renewal plan.

Returns:

  • (Time, nil)


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

required :renewal_period_start, Time, nil?: true

#statusSymbol, WhopSDK::Models::MembershipStatus

The status of the membership.



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

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

#updated_atTime

A timestamp of when the membership was last updated

Returns:

  • (Time)


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

required :updated_at, Time

#userWhopSDK::Models::Membership::User?

The user this membership belongs to



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

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