Class: AliseeksApi::RealtimeCurrency

Inherits:
Object
  • Object
show all
Defined in:
lib/aliseeks_api/models/realtime_currency.rb

Constant Summary collapse

AUD =
'AUD'.freeze
BRL =
'BRL'.freeze
CAD =
'CAD'.freeze
CHF =
'CHF'.freeze
CLP =
'CLP'.freeze
EUR =
'EUR'.freeze
GBP =
'GBP'.freeze
IDR =
'IDR'.freeze
KRW =
'KRW'.freeze
NZD =
'NZD'.freeze
PLN =
'PLN'.freeze
RUB =
'RUB'.freeze
SEK =
'SEK'.freeze
SGD =
'SGD'.freeze
TRY =
'TRY'.freeze
UAH =
'UAH'.freeze
USD =
'USD'.freeze

Instance Method Summary collapse

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



39
40
41
42
43
# File 'lib/aliseeks_api/models/realtime_currency.rb', line 39

def build_from_hash(value)
  constantValues = RealtimeCurrency.constants.select { |c| RealtimeCurrency::const_get(c) == value }
  raise "Invalid ENUM value #{value} for class #RealtimeCurrency" if constantValues.empty?
  value
end