Class: Greeve::Character::WalletTransactions
- Defined in:
- lib/greeve/character/wallet_transactions.rb
Overview
Note:
Character wallet transactions.
Attributes collapse
Instance Method Summary collapse
-
#initialize(character_id, opts = {}) ⇒ WalletTransactions
constructor
A new instance of WalletTransactions.
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, opts = {}) ⇒ WalletTransactions
Returns a new instance of WalletTransactions
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/greeve/character/wallet_transactions.rb', line 35 def initialize(character_id, opts = {}) from_id = opts.delete(:from_id) row_count = opts.delete(:row_count) opts[:query_params] = { "characterID" => character_id } opts[:query_params]["fromID"] = from_id if from_id opts[:query_params]["rowCount"] = row_count if row_count super(opts) end |
Instance Method Details
#transactions ⇒ Greeve::Rowset
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/greeve/character/wallet_transactions.rb', line 11 rowset :transactions, xpath: "eveapi/result/rowset[@name='transactions']" do attribute :transaction_date_time, xpath: "@transactionDateTime", type: :datetime attribute :transaction_id, xpath: "@transactionID", type: :integer attribute :quantity, xpath: "@quantity", type: :integer attribute :type_name, xpath: "@typeName", type: :string attribute :type_id, xpath: "@typeID", type: :integer attribute :price, xpath: "@price", type: :numeric attribute :client_id, xpath: "@clientID", type: :integer attribute :client_name, xpath: "@clientName", type: :string attribute :station_id, xpath: "@stationID", type: :integer attribute :station_name, xpath: "@stationName", type: :string attribute :transaction_type, xpath: "@transactionType", type: :string attribute :transaction_for, xpath: "@transactionFor", type: :string attribute :journal_transaction_id, xpath: "@journalTransactionID", type: :integer attribute :client_type_id, xpath: "@clientTypeID", type: :integer end |