Class: Io::Flow::V0::Clients::ChannelRates

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ ChannelRates

Returns a new instance of ChannelRates.



6037
6038
6039
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6037

def initialize(client)
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
end

Instance Method Details

#get_all(channel_id) ⇒ Object



6041
6042
6043
6044
6045
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6041

def get_all(channel_id)
  HttpClient::Preconditions.assert_class('channel_id', channel_id, String)
  r = @client.request("/channel/#{CGI.escape(channel_id)}/currency/rates/all").get
  r.map { |x| ::Io::Flow::V0::Models::Rate.new(x) }
end