Class: WhopSDK::Models::UserBalance::Crypto
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::UserBalance::Crypto
- Defined in:
- lib/whop_sdk/models/user_balance.rb,
sig/whop_sdk/models/user_balance.rbs
Instance Attribute Summary collapse
-
#balance ⇒ String
Amount held in native token units, as a decimal string.
-
#icon_url ⇒ String?
Token icon URL.
-
#name ⇒ String?
The token's display name.
-
#price_usd ⇒ Float?
USD price per token, or
nullwhen unknown. -
#symbol ⇒ String
Token display symbol, such as
USDT,XAUT, orcbBTC. -
#value_usd ⇒ Float
Holding USD value.
Instance Method Summary collapse
-
#initialize(balance:, icon_url:, name:, price_usd:, symbol:, value_usd:) ⇒ Object
constructor
Per-token crypto holdings in the ledger's own wallet.
- #to_hash ⇒ {
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(balance:, icon_url:, name:, price_usd:, symbol:, value_usd:) ⇒ Object
Per-token crypto holdings in the ledger's own wallet.
|
|
# File 'lib/whop_sdk/models/user_balance.rb', line 209
|
Instance Attribute Details
#balance ⇒ String
Amount held in native token units, as a decimal string.
177 |
# File 'lib/whop_sdk/models/user_balance.rb', line 177 required :balance, String |
#icon_url ⇒ String?
Token icon URL.
183 |
# File 'lib/whop_sdk/models/user_balance.rb', line 183 required :icon_url, String, nil?: true |
#name ⇒ String?
The token's display name.
189 |
# File 'lib/whop_sdk/models/user_balance.rb', line 189 required :name, String, nil?: true |
#price_usd ⇒ Float?
USD price per token, or null when unknown.
195 |
# File 'lib/whop_sdk/models/user_balance.rb', line 195 required :price_usd, Float, nil?: true |
#symbol ⇒ String
Token display symbol, such as USDT, XAUT, or cbBTC.
201 |
# File 'lib/whop_sdk/models/user_balance.rb', line 201 required :symbol, String |
#value_usd ⇒ Float
Holding USD value.
207 |
# File 'lib/whop_sdk/models/user_balance.rb', line 207 required :value_usd, Float |
Instance Method Details
#to_hash ⇒ {
160 |
# File 'sig/whop_sdk/models/user_balance.rbs', line 160
def to_hash: -> {
|