Class: RuBittrex::Balance
- Inherits:
-
Object
- Object
- RuBittrex::Balance
- Extended by:
- ClientHelper
- Includes:
- Helpers
- Defined in:
- lib/ru_bittrex/balance.rb
Instance Attribute Summary collapse
-
#available ⇒ Object
readonly
Returns the value of attribute available.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#total ⇒ Object
readonly
Returns the value of attribute total.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Class Method Summary collapse
- .all(params = {}) ⇒ Object
-
.get(currency, params = {}) ⇒ Object
TODO: check that currency exists.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Balance
constructor
A new instance of Balance.
Methods included from Helpers
Constructor Details
#initialize(attrs = {}) ⇒ Balance
Returns a new instance of Balance.
8 9 10 11 12 13 14 |
# File 'lib/ru_bittrex/balance.rb', line 8 def initialize(attrs = {}) @currency = attrs["currencySymbol"] @total = attrs["total"] @available = attrs["available"] @updated_at = (attrs["updatedAt"]) @raw = attrs end |
Instance Attribute Details
#available ⇒ Object (readonly)
Returns the value of attribute available.
6 7 8 |
# File 'lib/ru_bittrex/balance.rb', line 6 def available @available end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
6 7 8 |
# File 'lib/ru_bittrex/balance.rb', line 6 def currency @currency end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
6 7 8 |
# File 'lib/ru_bittrex/balance.rb', line 6 def raw @raw end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
6 7 8 |
# File 'lib/ru_bittrex/balance.rb', line 6 def total @total end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
6 7 8 |
# File 'lib/ru_bittrex/balance.rb', line 6 def updated_at @updated_at end |
Class Method Details
.all(params = {}) ⇒ Object
16 17 18 |
# File 'lib/ru_bittrex/balance.rb', line 16 def self.all(params = {}) collection _get('balances', params) end |
.get(currency, params = {}) ⇒ Object
TODO: check that currency exists
21 22 23 |
# File 'lib/ru_bittrex/balance.rb', line 21 def self.get(currency, params = {}) new _get("balances/#{currency}", params) end |