Class: WhopSDK::Models::User

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

Overview

See Also:

  • WhopSDK::Resources::Users#retrieve

Defined Under Namespace

Classes: BalanceHistory, EarningsUsd

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(t:, v:) ⇒ Object

Cumulative balance points over the requested window, oldest first.

Parameters:

  • t (Integer)

    Point timestamp, in Unix seconds.

  • v (Float)

    Cumulative wallet balance at this point, in USD.



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

Instance Attribute Details

#balanceWhopSDK::Models::UserBalance?

The user's balance: personal cash + crypto + in-flight treasury deposits, plus account balances for accounts they own. Computed only on GET /users/me self-view for callers with balance-read scope; null otherwise.

Parameters:

Returns:



19
# File 'lib/whop_sdk/models/user.rb', line 19

required :balance, -> { WhopSDK::UserBalance }, nil?: true

#balance_historyWhopSDK::Models::User::BalanceHistory?

The user's cumulative wallet balance over time (USD { t, v } points plus last/min/max), for the balance chart. Opt in with include_balance_history=true on GET /users/me; populated only for callers with balance-read scope and null otherwise. A user with no wallet activity returns an empty series.

Parameters:

  • value (WhopSDK::User::BalanceHistory, nil)

Returns:



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

required :balance_history, -> { WhopSDK::User::BalanceHistory }, nil?: true

#bioString?

The user's biography

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :bio, String, nil?: true

#created_atString

When the user was created, as an ISO 8601 timestamp

Parameters:

  • value (String)

Returns:

  • (String)


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

required :created_at, String

#earnings_usdWhopSDK::Models::User::EarningsUsd?

The user's gross USD income over time. Populated only on single-user self reads for callers with balance-read scope; null otherwise.

Parameters:

  • value (WhopSDK::User::EarningsUsd, nil)

Returns:



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

required :earnings_usd, -> { WhopSDK::User::EarningsUsd }, nil?: true

#idString

User ID, prefixed user_.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#nameString?

The user's display name

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


53
# File 'lib/whop_sdk/models/user.rb', line 53

required :name, String, nil?: true

#profile_pictureObject?

The user's profile picture, an object with a url

Parameters:

  • value (top, nil)

Returns:

  • (Object, nil)


59
# File 'lib/whop_sdk/models/user.rb', line 59

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

#usernameString

The user's unique username

Parameters:

  • value (String)

Returns:

  • (String)


65
# File 'lib/whop_sdk/models/user.rb', line 65

required :username, String

#verificationObject

Identity verification status for the user's individual (KYC) and business (KYB) profiles. Each is null until created, otherwise a status of not_started, pending, approved, or rejected.

Parameters:

  • value (top)

Returns:

  • (Object)


73
# File 'lib/whop_sdk/models/user.rb', line 73

required :verification, WhopSDK::Internal::Type::Unknown

#whop_partner_enabled_atString?

When the user became an enrolled Whop Partner, as an ISO 8601 timestamp. null if never enrolled.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


80
# File 'lib/whop_sdk/models/user.rb', line 80

required :whop_partner_enabled_at, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


55
# File 'sig/whop_sdk/models/user.rbs', line 55

def to_hash: -> {