lib/oanda_ruby_client/exchange_rates_client.rb
# Returns the exchanges rates based on the specified request
#
# @param rates_request [OandaRubyClient::RatesRequest] Request criteria
# @return [OpenStruct] An object structured similarly to the response from the Exchange Rate API
Returns the exchanges rates based on the specified request
Returns the exchanges rates based on the specified request
def rates(rates_request)
      rates_uri = "#{oanda_endpoint}#{RATES_BASE_PATH}#{rates_request.base_currency}.json?#{rates_request.query_string}"
      rates_response = HTTParty.get(rates_uri, headers: oanda_headers)
      handle_response(rates_response.response)
      OpenStruct.new(rates_response.parsed_response)
    end
def rates ( rates_request ) rates_uri = "#{oanda_endpoint}#{RATES_BASE_PATH}#{rates_request.base_currency}.json?#{rates_request.query_string}" rates_response = HTTParty . get ( rates_uri , headers : oanda_headers ) handle_response ( rates_response . response ) OpenStruct . new ( rates_response . parsed_response ) end
Returns the exchanges rates based on the specified request
Returns the exchanges rates based on the specified request
An object structured similarly to the response from the Exchange Rate API
An object structured similarly to the response from the Exchange Rate API
OpenStruct
rates_request
None