Class: Intercom::Message
- Inherits:
-
Object
- Object
- Intercom::Message
- Includes:
- UnixTimestampUnwrapper
- Defined in:
- lib/intercom/message_thread.rb
Overview
a MessageThread contains multiple Message's
Message's are a read only part of a MessageThread
Instance Method Summary (collapse)
-
- (Time) created_at
When this message was posted.
-
- (MessageAuthor) from
Author, which can be either an end user, or an Admin for your application.
-
- (String) html
Html markup for the message.
-
- (Message) initialize(params)
constructor
Used to create a Message from part of the response from the API.
Methods included from UnixTimestampUnwrapper
Constructor Details
- (Message) initialize(params)
Used to create a Intercom::Message from part of the response from the API
125 126 127 |
# File 'lib/intercom/message_thread.rb', line 125 def initialize(params) @attributes = params end |
Instance Method Details
- (Time) created_at
When this message was posted
140 141 142 |
# File 'lib/intercom/message_thread.rb', line 140 def created_at time_at("created_at") end |
- (MessageAuthor) from
Author, which can be either an end user, or an Admin for your application
130 131 132 |
# File 'lib/intercom/message_thread.rb', line 130 def from MessageAuthor.new(@attributes["from"]) end |
- (String) html
Html markup for the message
135 136 137 |
# File 'lib/intercom/message_thread.rb', line 135 def html @attributes["html"] end |