Class: EveOnline::ESI::Models::Notification

Inherits:
Base
  • Object
show all
Defined in:
lib/eve_online/esi/models/notification.rb

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from EveOnline::ESI::Models::Base

Instance Method Details

#as_jsonObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/eve_online/esi/models/notification.rb', line 7

def as_json
  {
    notification_id: notification_id,
    type: type,
    sender_id: sender_id,
    sender_type: sender_type,
    timestamp: timestamp,
    is_read: is_read,
    text: text
  }
end

#is_readObject



41
42
43
# File 'lib/eve_online/esi/models/notification.rb', line 41

def is_read
  options['is_read']
end

#notification_idObject



19
20
21
# File 'lib/eve_online/esi/models/notification.rb', line 19

def notification_id
  options['notification_id']
end

#sender_idObject



27
28
29
# File 'lib/eve_online/esi/models/notification.rb', line 27

def sender_id
  options['sender_id']
end

#sender_typeObject



31
32
33
# File 'lib/eve_online/esi/models/notification.rb', line 31

def sender_type
  options['sender_type']
end

#textObject



45
46
47
# File 'lib/eve_online/esi/models/notification.rb', line 45

def text
  options['text']
end

#timestampObject



35
36
37
38
39
# File 'lib/eve_online/esi/models/notification.rb', line 35

def timestamp
  timestamp = options['timestamp']

  parse_datetime_with_timezone(timestamp) if timestamp
end

#typeObject



23
24
25
# File 'lib/eve_online/esi/models/notification.rb', line 23

def type
  options['type']
end