Class: OpenapiClient::AddressValidationCode

Inherits:
Object
  • Object
show all
Defined in:
lib/openapi_client/models/address_validation_code.rb

Constant Summary collapse

A1000 =
"a1000".freeze
A1001 =
"a1001".freeze
A1002 =
"a1002".freeze
A1003 =
"a1003".freeze
A1004 =
"a1004".freeze
A1005 =
"a1005".freeze
A1006 =
"a1006".freeze
A1007 =
"a1007".freeze
A1008 =
"a1008".freeze
R1000 =
"r1000".freeze
R1001 =
"r1001".freeze
R1002 =
"r1002".freeze
R1003 =
"r1003".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



34
35
36
# File 'lib/openapi_client/models/address_validation_code.rb', line 34

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



41
42
43
44
45
# File 'lib/openapi_client/models/address_validation_code.rb', line 41

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