Class: Inbox::Message

Inherits:
RestfulModel show all
Defined in:
lib/message.rb

Direct Known Subclasses

Draft

Instance Attribute Summary collapse

Attributes inherited from RestfulModel

#created_at, #id, #namespace_id

Instance Method Summary collapse

Methods inherited from RestfulModel

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

Constructor Details

This class inherits a constructor from Inbox::RestfulModel

Instance Attribute Details

#bccObject

Returns the value of attribute bcc.



11
12
13
# File 'lib/message.rb', line 11

def bcc
  @bcc
end

#bodyObject

Returns the value of attribute body.



15
16
17
# File 'lib/message.rb', line 15

def body
  @body
end

#ccObject

Returns the value of attribute cc.



10
11
12
# File 'lib/message.rb', line 10

def cc
  @cc
end

#dateObject

Returns the value of attribute date.



12
13
14
# File 'lib/message.rb', line 12

def date
  @date
end

#file_idsObject

Returns the value of attribute file_ids.



14
15
16
# File 'lib/message.rb', line 14

def file_ids
  @file_ids
end

#fromObject

Returns the value of attribute from.



8
9
10
# File 'lib/message.rb', line 8

def from
  @from
end

#subjectObject

Returns the value of attribute subject.



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

def subject
  @subject
end

#thread_idObject

Returns the value of attribute thread_id.



13
14
15
# File 'lib/message.rb', line 13

def thread_id
  @thread_id
end

#toObject

Returns the value of attribute to.



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

def to
  @to
end

Instance Method Details

#filesObject



25
26
27
# File 'lib/message.rb', line 25

def files
  @files ||= RestfulModelCollection.new(File, @_api, @namespace_id, {:message_id=>@id})
end

#inflate(json) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/message.rb', line 17

def inflate(json)
  super
  @file_ids ||= []
  @to ||= []
  @cc ||= []
  @bcc ||= []
end