Class: Intercom::Message

Inherits:
Object
  • Object
show all
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)

Methods included from UnixTimestampUnwrapper

#set_time_at, #time_at

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

Returns:

  • (Time)

    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

Returns:

  • (MessageAuthor)

    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

Returns:

  • (String)

    html markup for the message



135
136
137
# File 'lib/intercom/message_thread.rb', line 135

def html
  @attributes["html"]
end