Class: WhopSDK::Models::User::BalanceHistory::Data
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::User::BalanceHistory::Data
- Defined in:
- lib/whop_sdk/models/user.rb,
sig/whop_sdk/models/user.rbs
Instance Attribute Summary collapse
-
#t ⇒ Integer
Point timestamp, in Unix seconds.
-
#v ⇒ Float
Cumulative wallet balance at this point, in USD.
Instance Method Summary collapse
-
#initialize(data:, last:, max:, min:) ⇒ Data
constructor
The user's cumulative wallet balance over time (USD
{ t, v }points plus last/min/max), for the balance chart. - #to_hash ⇒ { t: Integer, v: Float }
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(data:, last:, max:, min:) ⇒ Data
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.
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/whop_sdk/models/user.rb', line 147 class Data < WhopSDK::Internal::Type::BaseModel # @!attribute t # Point timestamp, in Unix seconds. # # @return [Integer] required :t, Integer # @!attribute v # Cumulative wallet balance at this point, in USD. # # @return [Float] required :v, Float # @!method initialize(t:, v:) # Cumulative balance points over the requested window, oldest first. # # @param t [Integer] Point timestamp, in Unix seconds. # # @param v [Float] Cumulative wallet balance at this point, in USD. end |
Instance Attribute Details
#t ⇒ Integer
Point timestamp, in Unix seconds.
152 |
# File 'lib/whop_sdk/models/user.rb', line 152 required :t, Integer |
#v ⇒ Float
Cumulative wallet balance at this point, in USD.
158 |
# File 'lib/whop_sdk/models/user.rb', line 158 required :v, Float |
Instance Method Details
#to_hash ⇒ { t: Integer, v: Float }
109 |
# File 'sig/whop_sdk/models/user.rbs', line 109
def to_hash: -> { t: Integer, v: Float }
|