Class: GMoney::Transaction
- Inherits:
-
Object
- Object
- GMoney::Transaction
- Defined in:
- lib/gmoney/transaction.rb
Defined Under Namespace
Classes: 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 Attribute Details
#commission ⇒ Object
Returns the value of attribute commission.
7 8 9 |
# File 'lib/gmoney/transaction.rb', line 7 def commission @commission end |
#date ⇒ Object
Returns the value of attribute date.
7 8 9 |
# File 'lib/gmoney/transaction.rb', line 7 def date @date end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/gmoney/transaction.rb', line 5 def id @id end |
#notes ⇒ Object
Returns the value of attribute notes.
7 8 9 |
# File 'lib/gmoney/transaction.rb', line 7 def notes @notes end |
#price ⇒ Object
Returns the value of attribute price.
7 8 9 |
# File 'lib/gmoney/transaction.rb', line 7 def price @price end |
#shares ⇒ Object
Returns the value of attribute shares.
7 8 9 |
# File 'lib/gmoney/transaction.rb', line 7 def shares @shares end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
5 6 7 |
# File 'lib/gmoney/transaction.rb', line 5 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
7 8 9 |
# File 'lib/gmoney/transaction.rb', line 7 def type @type end |
#updated ⇒ Object (readonly)
Returns the value of attribute updated.
5 6 7 |
# File 'lib/gmoney/transaction.rb', line 5 def updated @updated end |
Class Method Details
.find_by_url(url) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/gmoney/transaction.rb', line 9 def self.find_by_url(url) transactions = [] response = GFService.send_request(GFRequest.new(url, :headers => {"Authorization" => "GoogleLogin auth=#{GFSession.auth_token}"})) if response.status_code == HTTPOK TransactionFeedParser.parse_transaction_feed(response.body) else raise TransactionRequestError end end |