Class: PostFinanceCheckout::UserType

Inherits:
Object
  • Object
show all
Defined in:
lib/postfinancecheckout-ruby-sdk/models/user_type.rb

Constant Summary collapse

HUMAN_USER =
'HUMAN_USER'.freeze
SINGLE_SIGNON_USER =
'SINGLE_SIGNON_USER'.freeze
APPLICATION_USER =
'APPLICATION_USER'.freeze
ANONYMOUS_USER =
'ANONYMOUS_USER'.freeze
SERVER_USER =
'SERVER_USER'.freeze

Instance Method Summary collapse

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



32
33
34
35
36
# File 'lib/postfinancecheckout-ruby-sdk/models/user_type.rb', line 32

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