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
-
#account_key ⇒ Object
readonly
Returns the value of attribute account_key.
-
#bid ⇒ Object
readonly
Returns the value of attribute bid.
-
#character_id ⇒ Object
readonly
Returns the value of attribute character_id.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#duration ⇒ Object
readonly
Returns the value of attribute duration.
-
#escrow ⇒ Object
readonly
Returns the value of attribute escrow.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#minimum_volume ⇒ Object
readonly
Returns the value of attribute minimum_volume.
-
#order_state ⇒ Object
readonly
Returns the value of attribute order_state.
-
#price ⇒ Object
readonly
Returns the value of attribute price.
-
#range ⇒ Object
readonly
Returns the value of attribute range.
-
#station_id ⇒ Object
readonly
Returns the value of attribute station_id.
-
#type_id ⇒ Object
readonly
Returns the value of attribute type_id.
-
#volume_entered ⇒ Object
readonly
Returns the value of attribute volume_entered.
-
#volume_remaining ⇒ Object
readonly
Returns the value of attribute volume_remaining.
Instance Method Summary collapse
-
#initialize(elem) ⇒ MarketOrder
constructor
:nodoc:.
Constructor Details
#initialize(elem) ⇒ MarketOrder
:nodoc:
958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 |
# File 'lib/reve/classes.rb', line 958 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
#account_key ⇒ Object (readonly)
Returns the value of attribute account_key.
956 957 958 |
# File 'lib/reve/classes.rb', line 956 def account_key @account_key end |
#bid ⇒ Object (readonly)
Returns the value of attribute bid.
956 957 958 |
# File 'lib/reve/classes.rb', line 956 def bid @bid end |
#character_id ⇒ Object (readonly)
Returns the value of attribute character_id.
956 957 958 |
# File 'lib/reve/classes.rb', line 956 def character_id @character_id end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
956 957 958 |
# File 'lib/reve/classes.rb', line 956 def created_at @created_at end |
#duration ⇒ Object (readonly)
Returns the value of attribute duration.
956 957 958 |
# File 'lib/reve/classes.rb', line 956 def duration @duration end |
#escrow ⇒ Object (readonly)
Returns the value of attribute escrow.
956 957 958 |
# File 'lib/reve/classes.rb', line 956 def escrow @escrow end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
956 957 958 |
# File 'lib/reve/classes.rb', line 956 def id @id end |
#minimum_volume ⇒ Object (readonly)
Returns the value of attribute minimum_volume.
956 957 958 |
# File 'lib/reve/classes.rb', line 956 def minimum_volume @minimum_volume end |
#order_state ⇒ Object (readonly)
Returns the value of attribute order_state.
956 957 958 |
# File 'lib/reve/classes.rb', line 956 def order_state @order_state end |
#price ⇒ Object (readonly)
Returns the value of attribute price.
956 957 958 |
# File 'lib/reve/classes.rb', line 956 def price @price end |
#range ⇒ Object (readonly)
Returns the value of attribute range.
956 957 958 |
# File 'lib/reve/classes.rb', line 956 def range @range end |
#station_id ⇒ Object (readonly)
Returns the value of attribute station_id.
956 957 958 |
# File 'lib/reve/classes.rb', line 956 def station_id @station_id end |
#type_id ⇒ Object (readonly)
Returns the value of attribute type_id.
956 957 958 |
# File 'lib/reve/classes.rb', line 956 def type_id @type_id end |
#volume_entered ⇒ Object (readonly)
Returns the value of attribute volume_entered.
956 957 958 |
# File 'lib/reve/classes.rb', line 956 def volume_entered @volume_entered end |
#volume_remaining ⇒ Object (readonly)
Returns the value of attribute volume_remaining.
956 957 958 |
# File 'lib/reve/classes.rb', line 956 def volume_remaining @volume_remaining end |