class CcyConvertor::OpenExchangeRate
Public Class Methods
rate_matrix()
click to toggle source
# File lib/ccy_convertor/rate_providers/open_exchange_rate.rb, line 8 def rate_matrix rate_matrix_response = rate_matrix_response() if rate_matrix_response['error'] raise CcyConvertor::ResponseInvalid, rate_matrix_response['description'] end rate_matrix_response['rates'] end
rest_url_for_rate_matrix(base_ccy = nil)
click to toggle source
# File lib/ccy_convertor/rate_providers/open_exchange_rate.rb, line 4 def rest_url_for_rate_matrix(base_ccy = nil) "https://openexchangerates.org/api/latest.json?app_id=#{api_key}" end