Class: VoiceML::ConversationsV1ServiceUserConversation

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

Overview

ConversationsV1ServiceUserConversation — a user's view of a service-scoped conversation.

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 = {}) ⇒ ConversationsV1ServiceUserConversation

Returns a new instance of ConversationsV1ServiceUserConversation.



490
491
492
# File 'lib/voiceml/models/conversations_v1.rb', line 490

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

Class Method Details

.from_hash(h) ⇒ Object



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

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