Class: BitstampClient::BalanceResponse
- Inherits:
-
BaseResponse
- Object
- BaseResponse
- BitstampClient::BalanceResponse
- Defined in:
- lib/bitstamp_client/responses/balance_response.rb
Constant Summary collapse
- KNOWN_FIELDS =
%i[ usd_balance btc_balance eur_balance xrp_balance usd_reserved btc_reserved eur_reserved xrp_reserved usd_available btc_available eur_available xrp_available btcusd_fee btceur_fee eurusd_fee xrpusd_fee xrpeur_fee xrpbtc_fee fee ].freeze
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args) ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'lib/bitstamp_client/responses/balance_response.rb', line 34 def method_missing(method_name, *args) super if !parsed_body.has_key?(method_name.to_s) self.class.define_method(method_name) do BigDecimal.new(parsed_body[method_name.to_s]) end self.send(method_name) end |