Sha256: 0ec284ad5303caea2eaf8945f8d8be5eedf005818377ab6d5154db40e06500ea

Contents?: true

Size: 954 Bytes

Versions: 16

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

16 entries across 16 versions & 1 rubygems

Version Path
eve_online-0.46.0 lib/eve_online/esi/models/notification.rb
eve_online-0.45.0 lib/eve_online/esi/models/notification.rb
eve_online-0.44.0 lib/eve_online/esi/models/notification.rb
eve_online-0.43.0 lib/eve_online/esi/models/notification.rb
eve_online-0.42.0 lib/eve_online/esi/models/notification.rb
eve_online-0.41.0 lib/eve_online/esi/models/notification.rb
eve_online-0.40.0 lib/eve_online/esi/models/notification.rb
eve_online-0.39.0 lib/eve_online/esi/models/notification.rb
eve_online-0.38.0 lib/eve_online/esi/models/notification.rb
eve_online-0.37.0 lib/eve_online/esi/models/notification.rb
eve_online-0.36.0 lib/eve_online/esi/models/notification.rb
eve_online-0.35.1 lib/eve_online/esi/models/notification.rb
eve_online-0.35.0 lib/eve_online/esi/models/notification.rb
eve_online-0.34.0 lib/eve_online/esi/models/notification.rb
eve_online-0.33.0 lib/eve_online/esi/models/notification.rb
eve_online-0.32.0 lib/eve_online/esi/models/notification.rb