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.



5401
5402
5403
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5401

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

Instance Method Details

#get_all(channel_id) ⇒ Object



5405
5406
5407
5408
5409
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5405

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