Class: SunshineConversationsClient::ConversationType

Inherits:
Object
  • Object
show all
Defined in:
lib/sunshine-conversations-client/models/conversation_type.rb

Constant Summary collapse

PERSONAL =
"personal".freeze
SDK_GROUP =
"sdkGroup".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



20
21
22
# File 'lib/sunshine-conversations-client/models/conversation_type.rb', line 20

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



27
28
29
30
31
# File 'lib/sunshine-conversations-client/models/conversation_type.rb', line 27

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