Class: Bitso::Balance
Instance Attribute Summary collapse
-
#btc_available ⇒ Object
Returns the value of attribute btc_available.
-
#btc_balance ⇒ Object
Returns the value of attribute btc_balance.
-
#btc_reserved ⇒ Object
Returns the value of attribute btc_reserved.
-
#fee ⇒ Object
Returns the value of attribute fee.
-
#mxn_available ⇒ Object
Returns the value of attribute mxn_available.
-
#mxn_balance ⇒ Object
Returns the value of attribute mxn_balance.
-
#mxn_reserved ⇒ Object
Returns the value of attribute mxn_reserved.
Attributes inherited from Model
Class Method Summary collapse
Methods inherited from Model
#attributes, #attributes=, #initialize
Constructor Details
This class inherits a constructor from Bitso::Model
Instance Attribute Details
#btc_available ⇒ Object
Returns the value of attribute btc_available.
3 4 5 |
# File 'lib/bitso/balance.rb', line 3 def btc_available @btc_available end |
#btc_balance ⇒ Object
Returns the value of attribute btc_balance.
3 4 5 |
# File 'lib/bitso/balance.rb', line 3 def btc_balance @btc_balance end |
#btc_reserved ⇒ Object
Returns the value of attribute btc_reserved.
3 4 5 |
# File 'lib/bitso/balance.rb', line 3 def btc_reserved @btc_reserved end |
#fee ⇒ Object
Returns the value of attribute fee.
3 4 5 |
# File 'lib/bitso/balance.rb', line 3 def fee @fee end |
#mxn_available ⇒ Object
Returns the value of attribute mxn_available.
3 4 5 |
# File 'lib/bitso/balance.rb', line 3 def mxn_available @mxn_available end |
#mxn_balance ⇒ Object
Returns the value of attribute mxn_balance.
3 4 5 |
# File 'lib/bitso/balance.rb', line 3 def mxn_balance @mxn_balance end |
#mxn_reserved ⇒ Object
Returns the value of attribute mxn_reserved.
3 4 5 |
# File 'lib/bitso/balance.rb', line 3 def mxn_reserved @mxn_reserved end |
Class Method Details
.from_api ⇒ Object
5 6 7 |
# File 'lib/bitso/balance.rb', line 5 def self.from_api Bitso::Helper.parse_object!(Bitso::Net.post('/balance').to_str, self) end |
.method_missing(method, *args) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/bitso/balance.rb', line 9 def self.method_missing method, *args balance = self.from_api return balance.send(method) if balance.respond_to? method super end |