Class: WhopSDK::Models::UserBalance::Business

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

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(businesses:, businesses_total_usd:, cash:, cash_usd:, crypto:, crypto_usd:, pending_usd:, total_usd:, treasury_pending_usd:) ⇒ Object

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

Parameters:

  • businesses (Array<WhopSDK::Models::UserBalance::Business>)
  • businesses_total_usd (String)

    Combined USD balance across every account the user owns.

  • cash (Array<WhopSDK::Models::UserBalance::Cash>)
  • cash_usd (String)

    Fiat cash in USD, including pending and reserve.

  • crypto (Array<WhopSDK::Models::UserBalance::Crypto>)
  • crypto_usd (String)

    Crypto holdings in USD.

  • pending_usd (String)

    Pending funds in USD: fiat pending + in-flight treasury deposits.

  • total_usd (String)

    The user's personal balance in USD: cash (available + pending + reserve) + crypt

  • treasury_pending_usd (String)

    Balance-to-wallet USDT0 withdrawals still in flight, in USD.



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/whop_sdk/models/user_balance.rb', line 81

class Business < WhopSDK::Internal::Type::BaseModel
  # @!attribute id
  #   The account ID, which looks like biz\_******\*******.
  #
  #   @return [String]
  required :id, String

  # @!attribute balance_usd
  #   The account's total balance in USD.
  #
  #   @return [String]
  required :balance_usd, String

  # @!attribute logo_url
  #   The account's logo URL.
  #
  #   @return [String, nil]
  required :logo_url, String, nil?: true

  # @!attribute name
  #   The account's display name.
  #
  #   @return [String, nil]
  required :name, String, nil?: true

  # @!method initialize(id:, balance_usd:, logo_url:, name:)
  #   Account balances for accounts the user owns, highest balance first. Excludes
  #   accounts with no balance.
  #
  #   @param id [String] The account ID, which looks like biz\_******\*******.
  #
  #   @param balance_usd [String] The account's total balance in USD.
  #
  #   @param logo_url [String, nil] The account's logo URL.
  #
  #   @param name [String, nil] The account's display name.
end

Instance Attribute Details

#balance_usdString

The account's total balance in USD.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :balance_usd, String

#idString

The account ID, which looks like biz_*.

Parameters:

  • value (String)

Returns:

  • (String)


86
# File 'lib/whop_sdk/models/user_balance.rb', line 86

required :id, String

#logo_urlString?

The account's logo URL.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :logo_url, String, nil?: true

#nameString?

The account's display name.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :name, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


78
# File 'sig/whop_sdk/models/user_balance.rbs', line 78

def to_hash: -> {