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
  {
    is_read: is_read,
    notification_id: notification_id,
    sender_id: sender_id,
    sender_type: sender_type,
    text: text,
    timestamp: timestamp,
    type: type
  }
end

#is_readObject



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

def is_read
  options["is_read"]
end

#notification_idObject



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

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



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

def text
  options["text"]
end

#timestampObject



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

def timestamp
  timestamp = options["timestamp"]

  parse_datetime_with_timezone(timestamp) if timestamp
end

#typeObject



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

def type
  options["type"]
end