class ShipEngine::AddressValidationCode

Constants

A1000
A1001
A1002
A1003
A1004
A1005
A1006
A1007
A1008
R1000
R1001
R1002
R1003

Public Class Methods

build_from_hash(value) click to toggle source

Builds the enum from string @param [String] The enum value in the form of the string @return [String] The enum value

# File lib/ship_engine/models/address_validation_code.rb, line 34
def self.build_from_hash(value)
  new.build_from_hash(value)
end

Public Instance Methods

build_from_hash(value) click to toggle source

Builds the enum from string @param [String] The enum value in the form of the string @return [String] The enum value

# File lib/ship_engine/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