Class: CurrencyConversion::CurrenciesEndpoint

Inherits:
Resource
  • Object
show all
Defined in:
lib/currency-conversion/endpoints/currencies.rb

Overview

Currencies Endpoint

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from CurrencyConversion::Resource

Instance Method Details

#retrieve(currencies: nil) ⇒ Currencies

Returns all supported currencies

Parameters:

  • currencies (Array<String>) (defaults to: nil)

    The currency codes which you want to get. By default all available currencies will be shown.

Returns:



14
15
16
17
18
# File 'lib/currency-conversion/endpoints/currencies.rb', line 14

def retrieve(currencies: nil)
  params = {}
  params[:currencies] = currencies.join(',') if currencies.present?
  Currencies.new get_request('currencies', params: params)
end