Module: GogoKit::Client::Currency
Overview
GogoKit::Client methods for getting currencies
Instance Method Summary collapse
-
#get_currencies(options = {}) ⇒ GogoKit::PagedResource
Retrieves all currencies supported by viagogo.
-
#get_currency(code, options = {}) ⇒ GogoKit::Country
Retrieves a currency by currency code.
Methods included from Utils
Instance Method Details
#get_currencies(options = {}) ⇒ GogoKit::PagedResource
Retrieves all currencies supported by viagogo
29 30 31 32 33 34 35 |
# File 'lib/gogokit/client/currency.rb', line 29 def get_currencies( = {}) object_from_response(GogoKit::PagedResource, GogoKit::CurrenciesRepresenter, :get, get_root.links['viagogo:currencies'].href, ) end |
#get_currency(code, options = {}) ⇒ GogoKit::Country
Retrieves a currency by currency code
15 16 17 18 19 20 21 22 |
# File 'lib/gogokit/client/currency.rb', line 15 def get_currency(code, = {}) root = get_root object_from_response(GogoKit::Currency, GogoKit::CurrencyRepresenter, :get, "#{root.links['self'].href}/currencies/#{code}", ) end |