Class: GMoney::Transaction
- Inherits:
-
Object
- Object
- GMoney::Transaction
- Defined in:
- lib/gmoney/transaction.rb
Defined Under Namespace
Classes: TransactionDeleteError, TransactionRequestError
Instance Attribute Summary collapse
-
#commission ⇒ Object
Returns the value of attribute commission.
-
#date ⇒ Object
Returns the value of attribute date.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#notes ⇒ Object
Returns the value of attribute notes.
-
#price ⇒ Object
Returns the value of attribute price.
-
#shares ⇒ Object
Returns the value of attribute shares.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
-
#updated ⇒ Object
readonly
Returns the value of attribute updated.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#commission ⇒ Object
Returns the value of attribute commission.
8 9 10 |
# File 'lib/gmoney/transaction.rb', line 8 def commission @commission end |
#date ⇒ Object
Returns the value of attribute date.
8 9 10 |
# File 'lib/gmoney/transaction.rb', line 8 def date @date end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/gmoney/transaction.rb', line 6 def id @id end |
#notes ⇒ Object
Returns the value of attribute notes.
8 9 10 |
# File 'lib/gmoney/transaction.rb', line 8 def notes @notes end |
#price ⇒ Object
Returns the value of attribute price.
8 9 10 |
# File 'lib/gmoney/transaction.rb', line 8 def price @price end |
#shares ⇒ Object
Returns the value of attribute shares.
8 9 10 |
# File 'lib/gmoney/transaction.rb', line 8 def shares @shares end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
6 7 8 |
# File 'lib/gmoney/transaction.rb', line 6 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
8 9 10 |
# File 'lib/gmoney/transaction.rb', line 8 def type @type end |
#updated ⇒ Object (readonly)
Returns the value of attribute updated.
6 7 8 |
# File 'lib/gmoney/transaction.rb', line 6 def updated @updated end |
Class Method Details
.delete(id) ⇒ Object
14 15 16 |
# File 'lib/gmoney/transaction.rb', line 14 def self.delete(id) delete_transaction(id) end |
.find(id, options = {}) ⇒ Object
10 11 12 |
# File 'lib/gmoney/transaction.rb', line 10 def self.find(id, ={}) find_by_url("#{GF_PORTFOLIO_FEED_URL}/#{id.portfolio_id}/positions/#{id.position_id}/transactions/#{id.transaction_id}", ) end |
Instance Method Details
#delete ⇒ Object
18 19 20 21 |
# File 'lib/gmoney/transaction.rb', line 18 def delete Transaction.delete(@id.transaction_feed_id) freeze end |