Class: EveOnline::ESI::Models::Mail
- Inherits:
-
Base
- Object
- Base
- EveOnline::ESI::Models::Mail
show all
- Defined in:
- lib/eve_online/esi/models/mail.rb
Instance Attribute Summary
Attributes inherited from Base
#options
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#as_json ⇒ Object
7
8
9
10
11
12
13
14
15
|
# File 'lib/eve_online/esi/models/mail.rb', line 7
def as_json
{
body: body,
from_id: from_id,
read: read,
subject: subject,
timestamp: timestamp
}
end
|
#body ⇒ Object
17
18
19
|
# File 'lib/eve_online/esi/models/mail.rb', line 17
def body
options["body"]
end
|
#from_id ⇒ Object
21
22
23
|
# File 'lib/eve_online/esi/models/mail.rb', line 21
def from_id
options["from"]
end
|
#label_ids ⇒ Object
39
40
41
|
# File 'lib/eve_online/esi/models/mail.rb', line 39
def label_ids
options["labels"]
end
|
#read ⇒ Object
25
26
27
|
# File 'lib/eve_online/esi/models/mail.rb', line 25
def read
options["read"]
end
|
#recipients ⇒ Object
43
44
45
|
# File 'lib/eve_online/esi/models/mail.rb', line 43
def recipients
@recipients ||= MailRecipients.new(options["recipients"]).mail_recipients
end
|
#subject ⇒ Object
29
30
31
|
# File 'lib/eve_online/esi/models/mail.rb', line 29
def subject
options["subject"]
end
|
#timestamp ⇒ Object
33
34
35
36
37
|
# File 'lib/eve_online/esi/models/mail.rb', line 33
def timestamp
timestamp = options["timestamp"]
parse_datetime_with_timezone(timestamp) if timestamp
end
|