Class: Reve::Classes::WalletTransaction

Inherits:
Object
  • Object
show all
Defined in:
lib/reve/classes.rb

Overview

Corporation or Character WalletTransaction for Reve::API#personal_wallet_transactions and Reve::API#corporate_wallet_transactions Attributes

  • created_at ( Time ) - When was the WalletTransaction created?

  • id ( Fixnum ) - CCP’s ID of the WalletTransaction. Note: This is not guaranteed to be unique. It may be best to create your own unique ID

  • quantity ( Fixnum ) - Number of type_id transacted

  • type_name ( String ) - Name of the transacted thing

  • price ( Float) - Price of the transacted thing

  • client_id ( Fixnum ) - ID of the client

  • client_name ( String ) - Name of the client

  • character_id ( Fixnum ) - ID of the Character

  • station_id ( Fixnum ) - ID of the Station where the WalletTransaction took place

  • station_name ( String ) - Name of the Station where the WalletTransaction took place

  • type ( String ) - Not sure?

  • transaction_for ( String ) - This is corporate or personal, mirrors the subclasses.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ WalletTransaction

:nodoc:



1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
# File 'lib/reve/classes.rb', line 1444

def initialize(elem) #:nodoc:
  @created_at       = elem['transactionDateTime'].to_time
  @id               = elem['transactionID'].to_i
  @quantity         = elem['quantity'].to_i
  @type_name        = elem['typeName']
  @type_id          = elem['typeID'].to_i
  @price            = elem['price'].to_f
  @client_id        = elem['clientID'].to_i if elem['clientID']
  @client_name      = elem['clientName']
  @station_id       = elem['stationID'].to_i
  @station_name     = elem['stationName']
  @character_id     = elem['characterID'].to_i if elem['characterID'] && elem['characterID'] != '0'
  @type             = elem['transactionType']
  @transaction_for  = elem['transactionFor'] # This is corporate or personal, mirrors the subclasses.
end

Instance Attribute Details

#character_idObject (readonly)

Returns the value of attribute character_id.



1441
1442
1443
# File 'lib/reve/classes.rb', line 1441

def character_id
  @character_id
end

#client_idObject (readonly)

Returns the value of attribute client_id.



1441
1442
1443
# File 'lib/reve/classes.rb', line 1441

def client_id
  @client_id
end

#client_nameObject (readonly)

Returns the value of attribute client_name.



1441
1442
1443
# File 'lib/reve/classes.rb', line 1441

def client_name
  @client_name
end

#created_atObject (readonly)

Returns the value of attribute created_at.



1441
1442
1443
# File 'lib/reve/classes.rb', line 1441

def created_at
  @created_at
end

#idObject (readonly)

Returns the value of attribute id.



1441
1442
1443
# File 'lib/reve/classes.rb', line 1441

def id
  @id
end

#priceObject (readonly)

Returns the value of attribute price.



1441
1442
1443
# File 'lib/reve/classes.rb', line 1441

def price
  @price
end

#quantityObject (readonly)

Returns the value of attribute quantity.



1441
1442
1443
# File 'lib/reve/classes.rb', line 1441

def quantity
  @quantity
end

#station_idObject (readonly)

Returns the value of attribute station_id.



1441
1442
1443
# File 'lib/reve/classes.rb', line 1441

def station_id
  @station_id
end

#station_nameObject (readonly)

Returns the value of attribute station_name.



1441
1442
1443
# File 'lib/reve/classes.rb', line 1441

def station_name
  @station_name
end

#transaction_forObject (readonly)

Returns the value of attribute transaction_for.



1441
1442
1443
# File 'lib/reve/classes.rb', line 1441

def transaction_for
  @transaction_for
end

#typeObject (readonly)

Returns the value of attribute type.



1441
1442
1443
# File 'lib/reve/classes.rb', line 1441

def type
  @type
end

#type_idObject (readonly)

Returns the value of attribute type_id.



1441
1442
1443
# File 'lib/reve/classes.rb', line 1441

def type_id
  @type_id
end

#type_nameObject (readonly)

Returns the value of attribute type_name.



1441
1442
1443
# File 'lib/reve/classes.rb', line 1441

def type_name
  @type_name
end