Class: PayoneerCsv::Transaction
- Inherits:
-
Object
- Object
- PayoneerCsv::Transaction
- Defined in:
- lib/payoneer_csv/transaction.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Transaction
constructor
A new instance of Transaction.
Constructor Details
#initialize(attributes) ⇒ Transaction
Returns a new instance of Transaction.
8 9 10 11 12 |
# File 'lib/payoneer_csv/transaction.rb', line 8 def initialize(attributes) @created_at = attributes[:created_at] @description = attributes[:description].strip @amount = attributes[:amount].gsub(',', '').to_f end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
5 6 7 |
# File 'lib/payoneer_csv/transaction.rb', line 5 def amount @amount end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
6 7 8 |
# File 'lib/payoneer_csv/transaction.rb', line 6 def created_at @created_at end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/payoneer_csv/transaction.rb', line 4 def description @description end |