Class: Reve::Classes::MarketOrder
Overview
Used for the Reve::API#personal_market_orders and Reve::API#corporate_market_orders Each of those derrive from this parent class. Attributes
-
id ( Fixnum ) - ID of the MarketOrder. This is a CCP internal ID and is not guaranteed to always be unique! You may want to generate your own globally unique ID for this.
-
character_id ( Fixnum ) - ID of the Character who set this MarketOrder up
-
station_id ( Fixnum ) - ID of the Station where the MarketOrder is
-
volume_entered ( Fixnum ) - How many of type_id was initially entered in the MarketOrder
-
volume_remaining ( Fixnum ) - How many of type_id is left in the MarketOrder
-
minimum_volume ( Fixnum ) - How much of type_id can be transacted (as a minimum) at once
-
order_state ( String ) - String representation of the MarketOrder's current state. Options are: Active, Closed, Expired, Cancelled, Pending, Character Deleted
-
type_id ( Fixnum ) - Type ID of item for which the MarketOrder was created. (Refer to CCP database dump invtypes)
-
range ( Fixnum ) - Range of the MarketOrder. For sell orders it is always 32767 (Entire Region), for sell orders the values are -1 (Station only), 0 (Solar system), 1..40 (Number of jumps away from the Station), 32767 (Region wide)
-
account_key ( Fixnum ) - For a CorporateMarketOrder the account key (see WalletDivision and CorporationSheet) that was used as the source/destination.
-
duration ( Fixnum ) - Duration of the MarketOrder in days from when it was created_at
-
escrow ( Float ) - How much ISK is held in escrow for the MarketOrder
-
price ( Float ) - Unit price of the item in the MarketOrder
-
bid ( Boolean ) - True if this MarketOrder is a sell order, false otherwise
-
created_at ( Time ) - When the MarketOrder was created
See Also: CorporationSheet, WalletDivision, CorporateDivision, Reve::API#personal_market_orders, Reve::API#corporate_market_orders
Direct Known Subclasses
Instance Attribute Summary (collapse)
-
- (Object) account_key
readonly
Returns the value of attribute account_key.
-
- (Object) bid
readonly
Returns the value of attribute bid.
-
- (Object) character_id
readonly
Returns the value of attribute character_id.
-
- (Object) created_at
readonly
Returns the value of attribute created_at.
-
- (Object) duration
readonly
Returns the value of attribute duration.
-
- (Object) escrow
readonly
Returns the value of attribute escrow.
-
- (Object) id
readonly
Returns the value of attribute id.
-
- (Object) minimum_volume
readonly
Returns the value of attribute minimum_volume.
-
- (Object) order_state
readonly
Returns the value of attribute order_state.
-
- (Object) price
readonly
Returns the value of attribute price.
-
- (Object) range
readonly
Returns the value of attribute range.
-
- (Object) station_id
readonly
Returns the value of attribute station_id.
-
- (Object) type_id
readonly
Returns the value of attribute type_id.
-
- (Object) volume_entered
readonly
Returns the value of attribute volume_entered.
-
- (Object) volume_remaining
readonly
Returns the value of attribute volume_remaining.
Instance Method Summary (collapse)
-
- (MarketOrder) initialize(elem)
constructor
:nodoc:.
Constructor Details
- (MarketOrder) initialize(elem)
:nodoc:
1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 |
# File 'lib/reve/classes.rb', line 1001 def initialize(elem) #:nodoc: @id = elem['orderID'].to_i @character_id = elem['charID'].to_i @station_id = elem['stationID'].to_i @volume_entered = elem['volEntered'].to_i @volume_remaining = elem['volRemaining'].to_i @minimum_volume = elem['minVolume'].to_i @order_state = case elem['orderState'].to_i when 0 'Active' when 1 'Closed' when 2 'Expired' when 3 'Cancelled' when 4 'Pending' when 5 'Character Deleted' end @type_id = elem['typeID'].to_i @range = elem['range'].to_i @account_key = elem['accountKey'].to_i @escrow = elem['escrow'].to_f @price = elem['price'].to_f @bid = elem['bid'] == '1' @duration = elem['duration'].to_i @created_at = elem['issued'].to_time end |
Instance Attribute Details
- (Object) account_key (readonly)
Returns the value of attribute account_key
999 1000 1001 |
# File 'lib/reve/classes.rb', line 999 def account_key @account_key end |
- (Object) bid (readonly)
Returns the value of attribute bid
999 1000 1001 |
# File 'lib/reve/classes.rb', line 999 def bid @bid end |
- (Object) character_id (readonly)
Returns the value of attribute character_id
999 1000 1001 |
# File 'lib/reve/classes.rb', line 999 def character_id @character_id end |
- (Object) created_at (readonly)
Returns the value of attribute created_at
999 1000 1001 |
# File 'lib/reve/classes.rb', line 999 def created_at @created_at end |
- (Object) duration (readonly)
Returns the value of attribute duration
999 1000 1001 |
# File 'lib/reve/classes.rb', line 999 def duration @duration end |
- (Object) escrow (readonly)
Returns the value of attribute escrow
999 1000 1001 |
# File 'lib/reve/classes.rb', line 999 def escrow @escrow end |
- (Object) id (readonly)
Returns the value of attribute id
999 1000 1001 |
# File 'lib/reve/classes.rb', line 999 def id @id end |
- (Object) minimum_volume (readonly)
Returns the value of attribute minimum_volume
999 1000 1001 |
# File 'lib/reve/classes.rb', line 999 def minimum_volume @minimum_volume end |
- (Object) order_state (readonly)
Returns the value of attribute order_state
999 1000 1001 |
# File 'lib/reve/classes.rb', line 999 def order_state @order_state end |
- (Object) price (readonly)
Returns the value of attribute price
999 1000 1001 |
# File 'lib/reve/classes.rb', line 999 def price @price end |
- (Object) range (readonly)
Returns the value of attribute range
999 1000 1001 |
# File 'lib/reve/classes.rb', line 999 def range @range end |
- (Object) station_id (readonly)
Returns the value of attribute station_id
999 1000 1001 |
# File 'lib/reve/classes.rb', line 999 def station_id @station_id end |
- (Object) type_id (readonly)
Returns the value of attribute type_id
999 1000 1001 |
# File 'lib/reve/classes.rb', line 999 def type_id @type_id end |
- (Object) volume_entered (readonly)
Returns the value of attribute volume_entered
999 1000 1001 |
# File 'lib/reve/classes.rb', line 999 def volume_entered @volume_entered end |
- (Object) volume_remaining (readonly)
Returns the value of attribute volume_remaining
999 1000 1001 |
# File 'lib/reve/classes.rb', line 999 def volume_remaining @volume_remaining end |