Class: OandaAPI::Resource::Transaction
- Inherits:
-
OandaAPI::ResourceBase
- Object
- OandaAPI::ResourceBase
- OandaAPI::Resource::Transaction
- Defined in:
- lib/oanda_api/resource/transaction.rb
Overview
Transaction value object. See the Oanda Developer Guide for information about Transactions.
Defined Under Namespace
Classes: TradeOpened, TradeReduced
Constant Summary
Constants inherited from OandaAPI::ResourceBase
OandaAPI::ResourceBase::NOT_PLURALIZED
Instance Attribute Summary collapse
-
#account_balance ⇒ Object
Returns the value of attribute account_balance.
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#expiry ⇒ Object
Returns the value of attribute expiry.
-
#id ⇒ Object
Returns the value of attribute id.
-
#instrument ⇒ Object
Returns the value of attribute instrument.
-
#interest ⇒ Object
Returns the value of attribute interest.
-
#lower_bound ⇒ Object
Returns the value of attribute lower_bound.
-
#margin_rate ⇒ Object
Returns the value of attribute margin_rate.
-
#order_id ⇒ Object
Returns the value of attribute order_id.
-
#pl ⇒ Object
Returns the value of attribute pl.
-
#price ⇒ Object
Returns the value of attribute price.
-
#rate ⇒ Object
Returns the value of attribute rate.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#side ⇒ Object
Returns the value of attribute side.
-
#stop_loss_price ⇒ Object
Returns the value of attribute stop_loss_price.
-
#take_profit_price ⇒ Object
Returns the value of attribute take_profit_price.
-
#time ⇒ Object
Returns the value of attribute time.
-
#trade_id ⇒ Object
Returns the value of attribute trade_id.
-
#trade_opened ⇒ Object
Returns the value of attribute trade_opened.
-
#trade_reduced ⇒ Object
Returns the value of attribute trade_reduced.
-
#trailing_stop_loss_distance ⇒ Object
Returns the value of attribute trailing_stop_loss_distance.
-
#type ⇒ Object
Returns the value of attribute type.
-
#units ⇒ Object
Returns the value of attribute units.
-
#upper_bound ⇒ Object
Returns the value of attribute upper_bound.
Attributes inherited from OandaAPI::ResourceBase
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Transaction
constructor
A new instance of Transaction.
Methods inherited from OandaAPI::ResourceBase
class_from_symbol, labs_resource?, pluralize, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ Transaction
Returns a new instance of Transaction.
33 34 35 36 37 |
# File 'lib/oanda_api/resource/transaction.rb', line 33 def initialize(attributes = {}) self.trade_opened = {} self.trade_reduced = {} super end |
Instance Attribute Details
#account_balance ⇒ Object
Returns the value of attribute account_balance.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def account_balance @account_balance end |
#account_id ⇒ Object
Returns the value of attribute account_id.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def account_id @account_id end |
#amount ⇒ Object
Returns the value of attribute amount.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def amount @amount end |
#expiry ⇒ Object
Returns the value of attribute expiry.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def expiry @expiry end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def id @id end |
#instrument ⇒ Object
Returns the value of attribute instrument.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def instrument @instrument end |
#interest ⇒ Object
Returns the value of attribute interest.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def interest @interest end |
#lower_bound ⇒ Object
Returns the value of attribute lower_bound.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def lower_bound @lower_bound end |
#margin_rate ⇒ Object
Returns the value of attribute margin_rate.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def margin_rate @margin_rate end |
#order_id ⇒ Object
Returns the value of attribute order_id.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def order_id @order_id end |
#pl ⇒ Object
Returns the value of attribute pl.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def pl @pl end |
#price ⇒ Object
Returns the value of attribute price.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def price @price end |
#rate ⇒ Object
Returns the value of attribute rate.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def rate @rate end |
#reason ⇒ Object
Returns the value of attribute reason.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def reason @reason end |
#side ⇒ Object
Returns the value of attribute side.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def side @side end |
#stop_loss_price ⇒ Object
Returns the value of attribute stop_loss_price.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def stop_loss_price @stop_loss_price end |
#take_profit_price ⇒ Object
Returns the value of attribute take_profit_price.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def take_profit_price @take_profit_price end |
#time ⇒ Object
Returns the value of attribute time.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def time @time end |
#trade_id ⇒ Object
Returns the value of attribute trade_id.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def trade_id @trade_id end |
#trade_opened ⇒ Object
Returns the value of attribute trade_opened.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def trade_opened @trade_opened end |
#trade_reduced ⇒ Object
Returns the value of attribute trade_reduced.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def trade_reduced @trade_reduced end |
#trailing_stop_loss_distance ⇒ Object
Returns the value of attribute trailing_stop_loss_distance.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def trailing_stop_loss_distance @trailing_stop_loss_distance end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def type @type end |
#units ⇒ Object
Returns the value of attribute units.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def units @units end |
#upper_bound ⇒ Object
Returns the value of attribute upper_bound.
6 7 8 |
# File 'lib/oanda_api/resource/transaction.rb', line 6 def upper_bound @upper_bound end |