Class: TrinsicApi::SessionFailCode

Inherits:
Object
  • Object
show all
Defined in:
lib/trinsic_api/models/session_fail_code.rb

Constant Summary collapse

SESSION_FAIL_NONE =
"SessionFailNone".freeze
SESSION_FAIL_INTERNAL =
"SessionFailInternal".freeze
SESSION_FAIL_VERIFICATION_FAILED =
"SessionFailVerificationFailed".freeze
SESSION_FAIL_AUTHENTICATION =
"SessionFailAuthentication".freeze
SESSION_FAIL_EXPIRED =
"SessionFailExpired".freeze
SESSION_FAIL_USER_CANCELED =
"SessionFailUserCanceled".freeze
SESSION_FAIL_RP_CANCELED =
"SessionFailRpCanceled".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



26
27
28
# File 'lib/trinsic_api/models/session_fail_code.rb', line 26

def self.all_vars
  @all_vars ||= [SESSION_FAIL_NONE, SESSION_FAIL_INTERNAL, SESSION_FAIL_VERIFICATION_FAILED, SESSION_FAIL_AUTHENTICATION, SESSION_FAIL_EXPIRED, SESSION_FAIL_USER_CANCELED, SESSION_FAIL_RP_CANCELED].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



33
34
35
# File 'lib/trinsic_api/models/session_fail_code.rb', line 33

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



40
41
42
43
# File 'lib/trinsic_api/models/session_fail_code.rb', line 40

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