Class: Greeve::Character::ContractItems
- Defined in:
- lib/greeve/character/contract_items.rb
Overview
Note:
Items and details of a particular contract.
Attributes collapse
Instance Method Summary collapse
-
#initialize(character_id, contract_id, opts = {}) ⇒ ContractItems
constructor
A new instance of ContractItems.
Methods inherited from BaseItem
attribute, #cache_expired?, #cached_until, endpoint, #inspect, namespace, #refresh, rowset, #to_s
Methods included from Helpers::AttributeToHash
Constructor Details
#initialize(character_id, contract_id, opts = {}) ⇒ ContractItems
Returns a new instance of ContractItems
22 23 24 25 26 27 28 29 |
# File 'lib/greeve/character/contract_items.rb', line 22 def initialize(character_id, contract_id, opts = {}) opts[:query_params] = { "characterID" => character_id, "contractID" => contract_id, } super(opts) end |
Instance Method Details
#item_list ⇒ Greeve::Rowset
11 12 13 14 15 16 17 18 |
# File 'lib/greeve/character/contract_items.rb', line 11 rowset :item_list, xpath: "eveapi/result/rowset[@name='itemList']" do attribute :record_id, xpath: "@recordID", type: :integer attribute :type_id, xpath: "@typeID", type: :integer attribute :quantity, xpath: "@quantity", type: :integer attribute :raw_quantity, xpath: "@rawQuantity", type: :integer attribute :singleton, xpath: "@singleton", type: :boolean attribute :included, xpath: "@included", type: :boolean end |