Class: AvmClient::FloorLevel

Inherits:
Object
  • Object
show all
Defined in:
lib/avm_client/models/floor_level.rb

Constant Summary collapse

BASEMENT =
"basement".freeze
GROUND =
"ground".freeze
MIDDLE =
"middle".freeze
TOP =
"top".freeze
FLOOR_1 =
"floor_1".freeze
FLOOR_2 =
"floor_2".freeze
FLOOR_3 =
"floor_3".freeze
FLOOR_4 =
"floor_4".freeze
FLOOR_5 =
"floor_5".freeze
FLOOR_6 =
"floor_6".freeze
FLOOR_7 =
"floor_7".freeze
FLOOR_8 =
"floor_8".freeze
FLOOR_9 =
"floor_9".freeze
FLOOR_10 =
"floor_10".freeze
FLOOR_11 =
"floor_11".freeze
FLOOR_12 =
"floor_12".freeze
FLOOR_13 =
"floor_13".freeze
FLOOR_14 =
"floor_14".freeze
FLOOR_15 =
"floor_15".freeze
FLOOR_16 =
"floor_16".freeze
FLOOR_17 =
"floor_17".freeze
FLOOR_18 =
"floor_18".freeze
FLOOR_19 =
"floor_19".freeze
FLOOR_20 =
"floor_20".freeze
FLOOR_21_OR_ABOVE =
"floor_21_or_above".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class 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



46
47
48
# File 'lib/avm_client/models/floor_level.rb', line 46

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



53
54
55
56
57
# File 'lib/avm_client/models/floor_level.rb', line 53

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