Class: Bottle::Conversation
- Inherits:
-
Object
- Object
- Bottle::Conversation
- Defined in:
- lib/api_objects/conversation.rb
Instance Attribute Summary collapse
-
#avatar_color ⇒ Object
Returns the value of attribute avatar_color.
-
#conversation_id ⇒ Object
Returns the value of attribute conversation_id.
-
#conversation_name ⇒ Object
Returns the value of attribute conversation_name.
-
#conversation_status ⇒ Object
Returns the value of attribute conversation_status.
-
#conversation_title ⇒ Object
Returns the value of attribute conversation_title.
-
#conversation_type ⇒ Object
Returns the value of attribute conversation_type.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#favorited ⇒ Object
Returns the value of attribute favorited.
-
#group_identifier ⇒ Object
Returns the value of attribute group_identifier.
-
#handle ⇒ Object
Returns the value of attribute handle.
-
#id ⇒ Object
Returns the value of attribute id.
-
#last_message_is_from_user ⇒ Object
Returns the value of attribute last_message_is_from_user.
-
#last_sent_timestamp ⇒ Object
Returns the value of attribute last_sent_timestamp.
-
#last_viewed_timestamp ⇒ Object
Returns the value of attribute last_viewed_timestamp.
-
#name ⇒ Object
Returns the value of attribute name.
-
#object_key ⇒ Object
Returns the value of attribute object_key.
-
#object_name ⇒ Object
Returns the value of attribute object_name.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#relationship_status ⇒ Object
Returns the value of attribute relationship_status.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#unread_count ⇒ Object
Returns the value of attribute unread_count.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#user_display_identifier ⇒ Object
Returns the value of attribute user_display_identifier.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
-
#user_phone_active ⇒ Object
Returns the value of attribute user_phone_active.
Instance Method Summary collapse
-
#initialize(phone = nil, handle = nil, name = nil, tags = nil) ⇒ Conversation
constructor
A new instance of Conversation.
- #send(client) ⇒ Object
Constructor Details
#initialize(phone = nil, handle = nil, name = nil, tags = nil) ⇒ Conversation
Returns a new instance of Conversation.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/api_objects/conversation.rb', line 7 def initialize(phone=nil, handle=nil, name=nil, =nil) @url_extension = 'conversations' if phone.is_a?(Hash) attributes = phone.convert_keys_to_symbols @phone = attributes[:phone] @handle = attributes[:handle] @tags = attributes[:tags] @name = attributes[:name] @id = attributes[:id] @conversation_id = attributes[:conversation_id] @created_at = attributes[:created_at] @updated_at = attributes[:updated_at] @relationship_status = attributes[:relationship_status] @object_name = attributes[:object_name] @object_key = attributes[:object_key] @user_id = attributes[:user_id] @last_viewed_timestamp = attributes[:last_viewed_timestamp] @conversation_name = attributes[:conversation_name] @conversation_type = attributes[:conversation_type] @conversation_status = attributes[:conversation_status] @user_display_identifier = attributes[:user_display_identifier] @avatar_color = attributes[:avatar_color] @user_phone_active = attributes[:user_phone_active] @favorited = attributes[:favorited] @last_sent_timestamp = attributes[:last_sent_timestamp] @unread_count = attributes[:unread_count] @last_message_is_from_user = attributes[:last_message_is_from_user] @conversation_title = attributes[:conversation_title] @group_identifier = attributes[:group_identifier] else @phone = phone @handle = handle @name = name @tags = end end |
Instance Attribute Details
#avatar_color ⇒ Object
Returns the value of attribute avatar_color.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def avatar_color @avatar_color end |
#conversation_id ⇒ Object
Returns the value of attribute conversation_id.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def conversation_id @conversation_id end |
#conversation_name ⇒ Object
Returns the value of attribute conversation_name.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def conversation_name @conversation_name end |
#conversation_status ⇒ Object
Returns the value of attribute conversation_status.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def conversation_status @conversation_status end |
#conversation_title ⇒ Object
Returns the value of attribute conversation_title.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def conversation_title @conversation_title end |
#conversation_type ⇒ Object
Returns the value of attribute conversation_type.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def conversation_type @conversation_type end |
#created_at ⇒ Object
Returns the value of attribute created_at.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def created_at @created_at end |
#favorited ⇒ Object
Returns the value of attribute favorited.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def favorited @favorited end |
#group_identifier ⇒ Object
Returns the value of attribute group_identifier.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def group_identifier @group_identifier end |
#handle ⇒ Object
Returns the value of attribute handle.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def handle @handle end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def id @id end |
#last_message_is_from_user ⇒ Object
Returns the value of attribute last_message_is_from_user.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def @last_message_is_from_user end |
#last_sent_timestamp ⇒ Object
Returns the value of attribute last_sent_timestamp.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def @last_sent_timestamp end |
#last_viewed_timestamp ⇒ Object
Returns the value of attribute last_viewed_timestamp.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def @last_viewed_timestamp end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def name @name end |
#object_key ⇒ Object
Returns the value of attribute object_key.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def object_key @object_key end |
#object_name ⇒ Object
Returns the value of attribute object_name.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def object_name @object_name end |
#phone ⇒ Object
Returns the value of attribute phone.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def phone @phone end |
#relationship_status ⇒ Object
Returns the value of attribute relationship_status.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def relationship_status @relationship_status end |
#tags ⇒ Object
Returns the value of attribute tags.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def @tags end |
#unread_count ⇒ Object
Returns the value of attribute unread_count.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def unread_count @unread_count end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def updated_at @updated_at end |
#user_display_identifier ⇒ Object
Returns the value of attribute user_display_identifier.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def user_display_identifier @user_display_identifier end |
#user_id ⇒ Object
Returns the value of attribute user_id.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def user_id @user_id end |
#user_phone_active ⇒ Object
Returns the value of attribute user_phone_active.
4 5 6 |
# File 'lib/api_objects/conversation.rb', line 4 def user_phone_active @user_phone_active end |
Instance Method Details
#send(client) ⇒ Object
44 45 46 |
# File 'lib/api_objects/conversation.rb', line 44 def send(client) client.post(@url_extension, {conversation: {phone: self.phone, handle: self.handle, name: self.name, tags: self.}}) end |