Class: GeminiApi::Balance
- Inherits:
-
Struct
- Object
- Struct
- GeminiApi::Balance
- Defined in:
- lib/gemini_api/balance.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#available ⇒ Object
Returns the value of attribute available.
-
#available_for_withdrawal ⇒ Object
Returns the value of attribute available_for_withdrawal.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#raw_data ⇒ Object
Returns the value of attribute raw_data.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount
4 5 6 |
# File 'lib/gemini_api/balance.rb', line 4 def amount @amount end |
#available ⇒ Object
Returns the value of attribute available
4 5 6 |
# File 'lib/gemini_api/balance.rb', line 4 def available @available end |
#available_for_withdrawal ⇒ Object
Returns the value of attribute available_for_withdrawal
4 5 6 |
# File 'lib/gemini_api/balance.rb', line 4 def available_for_withdrawal @available_for_withdrawal end |
#currency ⇒ Object
Returns the value of attribute currency
4 5 6 |
# File 'lib/gemini_api/balance.rb', line 4 def currency @currency end |
#raw_data ⇒ Object
Returns the value of attribute raw_data
4 5 6 |
# File 'lib/gemini_api/balance.rb', line 4 def raw_data @raw_data end |
#type ⇒ Object
Returns the value of attribute type
4 5 6 |
# File 'lib/gemini_api/balance.rb', line 4 def type @type end |
Class Method Details
.build(raw_data) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/gemini_api/balance.rb', line 13 def self.build(raw_data) new( type: raw_data['type'], currency: raw_data['currency'], amount: BigDecimal(raw_data['amount']), available: BigDecimal(raw_data['available']), available_for_withdrawal: BigDecimal(raw_data['availableForWithdrawal']), raw_data: raw_data ) end |