Module: MyVR::API::Rates

Included in:
Client
Defined in:
lib/myvr/api/rates.rb

Instance Method Summary collapse

Instance Method Details

#rate(id) ⇒ Object



15
16
17
18
# File 'lib/myvr/api/rates.rb', line 15

def rate(id)
  data = get_object("/v1/rates/#{ id }/")
  MyVR::Rate.new(data)
end

#ratesObject



11
12
13
# File 'lib/myvr/api/rates.rb', line 11

def rates
  @rates ||= rates!
end

#rates!Object



4
5
6
7
8
9
# File 'lib/myvr/api/rates.rb', line 4

def rates!
  data = get_objects("/v1/rates/")
  data.map do |rate|
    MyVR::Rate.new(rate)
  end
end