Class: Greeve::Character::WalletTransactions

Inherits:
BaseItem
  • Object
show all
Defined in:
lib/greeve/character/wallet_transactions.rb

Overview

Character wallet transactions.

Instance Method Summary collapse

Methods inherited from BaseItem

attribute, #cache_expired?, #cached_until, endpoint, #inspect, namespace, #refresh, rowset, #to_s

Methods included from Helpers::AttributeToHash

#to_h

Constructor Details

#initialize(character_id, opts = {}) ⇒ WalletTransactions

Returns a new instance of WalletTransactions.

Parameters:

  • character_id (Integer)

    EVE character ID

  • opts (Hash) (defaults to: {})

    a customizable set of options

Options Hash (opts):

  • :from_id (Integer)

    Optional upper bound for the transaction ID of returned transactions.

  • :row_count (Integer)

    Optional upper bound for the transaction ID of returned transactions. This argument is normally used to walk to the transaction log backwards.



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