class Privatbank::P24::ExchangeRates

Public Class Methods

card() click to toggle source
# File lib/privatbank/p24/exchange_rates.rb, line 16
def card
  parse get('/pubinfo?cardExchange')
end
cash() click to toggle source
# File lib/privatbank/p24/exchange_rates.rb, line 12
def cash
  parse get('/pubinfo?exchange&coursid=5')
end
nbu() click to toggle source
# File lib/privatbank/p24/exchange_rates.rb, line 20
def nbu
  parse get('/pubinfo?exchange&coursid=3')
end

Private Class Methods

parse(resp) click to toggle source
# File lib/privatbank/p24/exchange_rates.rb, line 26
def parse resp
  resp.parsed_response['exchangerates']['row'].map do |rate|
    Items::Exchanges.new rate['exchangerate']
  end
end