Sha256: 86e66e459f5b8a5487f2ecab307c02607ba6f08b9a380e356d30d85199604466

Contents?: true

Size: 766 Bytes

Versions: 1

Compression:

Stored size: 766 Bytes

Contents

require 'forwardable'

module EveOnline
  module XML
    # https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/account/account_accountstatus.html
    class AccountStatus < Base
      extend Forwardable

      API_ENDPOINT = 'https://api.eveonline.com/account/AccountStatus.xml.aspx'.freeze

      attr_reader :key_id, :v_code, :model

      def_delegators :model, :as_json, :paid_until, :create_date, :logon_count, :logon_minutes

      def initialize(key_id, v_code)
        super()
        @key_id = key_id
        @v_code = v_code
      end

      def model
        Models::AccountStatus.new(result)
      end
      memoize :model

      def url
        "#{ API_ENDPOINT }?keyID=#{ key_id }&vCode=#{ v_code }"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eve_online-0.12.0 lib/eve_online/xml/account_status.rb