Class: Nylas::ExpandedMessage

Inherits:
Message show all
Defined in:
lib/expanded_message.rb

Instance Attribute Summary collapse

Attributes inherited from RestfulModel

#raw_json

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Message

#as_json, #expanded, #files, #files?, #raw

Methods included from ReadUnreadMethods

#mark_as_read!, #mark_as_unread!, #star!, #unstar!, #update_param!

Methods inherited from RestfulModel

#==, #as_json, #destroy, #initialize, #save!, #update, #url

Methods included from TimeAttrAccessor

#time_attr_accessor

Methods included from Parameters

included, #parameters

Constructor Details

This class inherits a constructor from Nylas::RestfulModel

Instance Attribute Details

#in_reply_toObject (readonly)

Returns the value of attribute in_reply_to.



6
7
8
# File 'lib/expanded_message.rb', line 6

def in_reply_to
  @in_reply_to
end

#message_idObject (readonly)

override inflate because expanded messages have some special parameters like In-Reply-To and Message-Id.



5
6
7
# File 'lib/expanded_message.rb', line 5

def message_id
  @message_id
end

#referencesObject (readonly)

Returns the value of attribute references.



7
8
9
# File 'lib/expanded_message.rb', line 7

def references
  @references
end

Class Method Details

.collection_nameObject



9
10
11
# File 'lib/expanded_message.rb', line 9

def self.collection_name
  'messages'
end

Instance Method Details

#inflate(json) ⇒ Object



13
14
15
16
17
18
# File 'lib/expanded_message.rb', line 13

def inflate(json)
  super
  @message_id = json['headers']['Message-Id']
  @in_reply_to = json['headers']['In-Reply-To']
  @references = json['headers']['References']
end