Class: CapitalOneStatement::Transaction
- Inherits:
-
Struct
- Object
- Struct
- CapitalOneStatement::Transaction
- Defined in:
- lib/parse_capitalone_pdf_statement.rb
Overview
CapitalOneStatement::Transaction represents a single credit transaction
Instance Attribute Summary collapse
-
#amount ⇒ Float
The dollar amount parsed into a Float, negative for payments.
-
#amount_str ⇒ String
The dollar amount string of the transaction.
-
#card_number ⇒ Fixnum
The last four digits of the account number.
-
#date ⇒ Date
The date of the transaction.
-
#description ⇒ String
The description of the transaction.
-
#id ⇒ Fixnum
Transaction id.
Instance Method Summary collapse
-
#to_json(*args) ⇒ String
JSON representation of Transaction.
Instance Attribute Details
#amount ⇒ Float
Returns the dollar amount parsed into a Float, negative for payments.
243 244 245 |
# File 'lib/parse_capitalone_pdf_statement.rb', line 243 def amount @amount end |
#amount_str ⇒ String
Returns the dollar amount string of the transaction.
243 244 245 |
# File 'lib/parse_capitalone_pdf_statement.rb', line 243 def amount_str @amount_str end |
#card_number ⇒ Fixnum
Returns the last four digits of the account number.
243 244 245 |
# File 'lib/parse_capitalone_pdf_statement.rb', line 243 def card_number @card_number end |
#date ⇒ Date
Returns the date of the transaction.
243 244 245 |
# File 'lib/parse_capitalone_pdf_statement.rb', line 243 def date @date end |
#description ⇒ String
Returns the description of the transaction.
243 244 245 |
# File 'lib/parse_capitalone_pdf_statement.rb', line 243 def description @description end |
#id ⇒ Fixnum
Returns transaction id.
243 244 245 |
# File 'lib/parse_capitalone_pdf_statement.rb', line 243 def id @id end |
Instance Method Details
#to_json(*args) ⇒ String
Returns JSON representation of Transaction.
270 271 272 |
# File 'lib/parse_capitalone_pdf_statement.rb', line 270 def to_json(*args) to_h.to_json(*args) end |