Sha256: ddca2791bbf2851267d7cb3317745db6dab1bc90af5728c78ad72519688b62a5

Contents?: true

Size: 1.45 KB

Versions: 11

Compression:

Stored size: 1.45 KB

Contents

# frozen_string_literal: true

module EveOnline
  module ESI
    module Models
      class Character < Base
        def as_json
          {
            alliance_id: alliance_id,
            ancestry_id: ancestry_id,
            birthday: birthday,
            bloodline_id: bloodline_id,
            corporation_id: corporation_id,
            description: description,
            faction_id: faction_id,
            gender: gender,
            name: name,
            race_id: race_id,
            security_status: security_status,
            title: title
          }
        end

        def alliance_id
          options["alliance_id"]
        end

        def ancestry_id
          options["ancestry_id"]
        end

        def birthday
          birthday = options["birthday"]

          parse_datetime_with_timezone(birthday) if birthday
        end

        def bloodline_id
          options["bloodline_id"]
        end

        def corporation_id
          options["corporation_id"]
        end

        def description
          options["description"]
        end

        def faction_id
          options["faction_id"]
        end

        def gender
          options["gender"]
        end

        def name
          options["name"]
        end

        def race_id
          options["race_id"]
        end

        def security_status
          options["security_status"]
        end

        def title
          options["title"]
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
eve_online-0.41.0 lib/eve_online/esi/models/character.rb
eve_online-0.40.0 lib/eve_online/esi/models/character.rb
eve_online-0.39.0 lib/eve_online/esi/models/character.rb
eve_online-0.38.0 lib/eve_online/esi/models/character.rb
eve_online-0.37.0 lib/eve_online/esi/models/character.rb
eve_online-0.36.0 lib/eve_online/esi/models/character.rb
eve_online-0.35.1 lib/eve_online/esi/models/character.rb
eve_online-0.35.0 lib/eve_online/esi/models/character.rb
eve_online-0.34.0 lib/eve_online/esi/models/character.rb
eve_online-0.33.0 lib/eve_online/esi/models/character.rb
eve_online-0.32.0 lib/eve_online/esi/models/character.rb