Sha256: 28ee771963e314bb5817f241245eeabc663c86b510f3523afc3caeb578ae7609

Contents?: true

Size: 1.05 KB

Versions: 2

Compression:

Stored size: 1.05 KB

Contents

# frozen_string_literal: true

module EveOnline
  module ESI
    module Models
      class Alliance < Base
        def as_json
          {
            creator_corporation_id: creator_corporation_id,
            creator_id: creator_id,
            date_founded: date_founded,
            executor_corporation_id: executor_corporation_id,
            faction_id: faction_id,
            name: name,
            ticker: ticker,
          }
        end

        def creator_corporation_id
          options["creator_corporation_id"]
        end

        def creator_id
          options["creator_id"]
        end

        def date_founded
          date_founded = options["date_founded"]

          parse_datetime_with_timezone(date_founded) if date_founded
        end

        def executor_corporation_id
          options["executor_corporation_id"]
        end

        def faction_id
          options["faction_id"]
        end

        def name
          options["name"]
        end

        def ticker
          options["ticker"]
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
eve_online-0.31.0 lib/eve_online/esi/models/alliance.rb
eve_online-0.30.0 lib/eve_online/esi/models/alliance.rb