Class: Greeve::Corporation::Contracts
- Defined in:
- lib/greeve/corporation/contracts.rb
Overview
Note:
Availabile contracts for a corporation.
Attributes collapse
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Contracts
constructor
A new instance of Contracts.
Methods inherited from BaseItem
attribute, #cache_expired?, #cached_until, endpoint, #inspect, namespace, #refresh, rowset, #to_s
Methods included from Helpers::AttributeToHash
Constructor Details
#initialize(opts = {}) ⇒ Contracts
Returns a new instance of Contracts
37 38 39 40 41 42 43 |
# File 'lib/greeve/corporation/contracts.rb', line 37 def initialize(opts = {}) contract_id = opts.delete(:contract_id) opts[:query_params] = { "contractID" => contract_id } if contract_id super(opts) end |
Instance Method Details
#contract_list ⇒ Greeve::Rowset
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/greeve/corporation/contracts.rb', line 11 rowset :contract_list, xpath: "eveapi/result/rowset[@name='contractList']" do attribute :contract_id, xpath: "@contractID", type: :integer attribute :issuer_id, xpath: "@issuerID", type: :integer attribute :issuer_corp_id, xpath: "@issuerCorpID", type: :integer attribute :assignee_id, xpath: "@assigneeID", type: :integer attribute :acceptor_id, xpath: "@acceptorID", type: :integer attribute :start_station_id, xpath: "@startStationID", type: :integer attribute :end_station_id, xpath: "@endStationID", type: :integer attribute :type, xpath: "@type", type: :string attribute :status, xpath: "@status", type: :string attribute :title, xpath: "@title", type: :string attribute :for_corp, xpath: "@forCorp", type: :boolean attribute :availability, xpath: "@availability", type: :string attribute :date_issued, xpath: "@dateIssued", type: :datetime attribute :date_expired, xpath: "@dateExpired", type: :datetime attribute :date_accepted, xpath: "@dateAccepted", type: :datetime attribute :date_completed, xpath: "@dateCompleted", type: :datetime attribute :num_days, xpath: "@numDays", type: :integer attribute :price, xpath: "@price", type: :numeric attribute :reward, xpath: "@reward", type: :numeric attribute :colalteral, xpath: "@collateral", type: :numeric attribute :buyout, xpath: "@buyout", type: :numeric attribute :volume, xpath: "@volume", type: :numeric end |