Class: EcfDgii::Generated::ECFType

Inherits:
Object
  • Object
show all
Defined in:
lib/ecf_dgii/generated/models/ecf_type.rb

Constant Summary collapse

ECF31 =
"ECF31".freeze
ECF32 =
"ECF32".freeze
ECF33 =
"ECF33".freeze
ECF34 =
"ECF34".freeze
ECF41 =
"ECF41".freeze
ECF43 =
"ECF43".freeze
ECF44 =
"ECF44".freeze
ECF45 =
"ECF45".freeze
ECF46 =
"ECF46".freeze
ECF47 =
"ECF47".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



29
30
31
# File 'lib/ecf_dgii/generated/models/ecf_type.rb', line 29

def self.all_vars
  @all_vars ||= [ECF31, ECF32, ECF33, ECF34, ECF41, ECF43, ECF44, ECF45, ECF46, ECF47].freeze
end

.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



36
37
38
# File 'lib/ecf_dgii/generated/models/ecf_type.rb', line 36

def self.build_from_hash(value)
  new.build_from_hash(value)
end

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



43
44
45
46
# File 'lib/ecf_dgii/generated/models/ecf_type.rb', line 43

def build_from_hash(value)
  return value if ECFType.all_vars.include?(value)
  raise "Invalid ENUM value #{value} for class #ECFType"
end