class Straight::ExchangeRate::BitpayAdapter

Constants

FETCH_URL

Public Instance Methods

rate_for(currency_code) click to toggle source
# File lib/straight/exchange_rate_adapters/bitpay_adapter.rb, line 8
def rate_for(currency_code)
  super
  @rates.each do |rt|
    if rt['code'] == currency_code
      rate = get_rate_value_from_hash(rt, 'rate')
      return rate_to_f(rate)
    end
  end
  raise CurrencyNotSupported 
end