Class: VoiceML::ConversationsV1UserConversation

Inherits:
Object
  • Object
show all
Defined in:
lib/voiceml/models/conversations_v1.rb

Overview

ConversationsV1UserConversation — a user's view of a conversation they belong to.

Constant Summary collapse

ATTRIBUTES =
%w[
  account_sid chat_service_sid conversation_sid unread_messages_count
  last_read_message_index participant_sid user_sid friendly_name conversation_state
  timers attributes date_created date_updated created_by notification_level
  unique_name url links
].freeze

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ ConversationsV1UserConversation

Returns a new instance of ConversationsV1UserConversation.



287
288
289
# File 'lib/voiceml/models/conversations_v1.rb', line 287

def initialize(attrs = {})
  ATTRIBUTES.each { |f| instance_variable_set("@#{f}", attrs[f] || attrs[f.to_sym]) }
end

Class Method Details

.from_hash(h) ⇒ Object



290
# File 'lib/voiceml/models/conversations_v1.rb', line 290

def self.from_hash(h); h.nil? ? nil : new(h); end