module GogoKit::Client::Currency

{GogoKit::Client} methods for getting currencies

Public Instance Methods

get_currencies(options = {}) click to toggle source

Retrieves all currencies supported by viagogo

@see viagogo.github.io/developer.viagogo.net/#viagogocurrencies @param [Hash] options Optional options @return [GogoKit::PagedResource] All currencies

# File lib/gogokit/client/currency.rb, line 29
def get_currencies(options = {})
  object_from_response(GogoKit::PagedResource,
                       GogoKit::CurrenciesRepresenter,
                       :get,
                       get_root.links['viagogo:currencies'].href,
                       options)
end
get_currency(code, options = {}) click to toggle source

Retrieves a currency by currency code

@param [String] code The currency code of the currency to be retrieved @param [Hash] options Optional options @return [GogoKit::Country] The requested currency

# File lib/gogokit/client/currency.rb, line 15
def get_currency(code, options = {})
  root = get_root
  object_from_response(GogoKit::Currency,
                       GogoKit::CurrencyRepresenter,
                       :get,
                       "#{root.links['self'].href}/currencies/#{code}",
                       options)
end