Sha256: 8699919663022f8ee95f8404b68f507283aa12ebbb06f2aaa2f1bf2e85f07a29

Contents?: true

Size: 954 Bytes

Versions: 13

Compression:

Stored size: 954 Bytes

Contents

# frozen_string_literal: true

module EveOnline
  module ESI
    module Models
      class Notification < Base
        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

        def is_read
          options['is_read']
        end

        def notification_id
          options['notification_id']
        end

        def sender_id
          options['sender_id']
        end

        def sender_type
          options['sender_type']
        end

        def text
          options['text']
        end

        def timestamp
          timestamp = options['timestamp']

          parse_datetime_with_timezone(timestamp) if timestamp
        end

        def type
          options['type']
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
eve_online-0.29.0 lib/eve_online/esi/models/notification.rb
eve_online-0.28.0 lib/eve_online/esi/models/notification.rb
eve_online-0.27.0 lib/eve_online/esi/models/notification.rb
eve_online-0.26.0 lib/eve_online/esi/models/notification.rb
eve_online-0.25.0 lib/eve_online/esi/models/notification.rb
eve_online-0.24.0 lib/eve_online/esi/models/notification.rb
eve_online-0.23.0 lib/eve_online/esi/models/notification.rb
eve_online-0.22.0 lib/eve_online/esi/models/notification.rb
eve_online-0.21.0 lib/eve_online/esi/models/notification.rb
eve_online-0.20.0 lib/eve_online/esi/models/notification.rb
eve_online-0.19.0 lib/eve_online/esi/models/notification.rb
eve_online-0.18.0 lib/eve_online/esi/models/notification.rb
eve_online-0.17.0 lib/eve_online/esi/models/notification.rb