Class: PayoneerCsv::Transaction

Inherits:
Object
  • Object
show all
Defined in:
lib/payoneer_csv/transaction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#amountObject (readonly)

Returns the value of attribute amount.



5
6
7
# File 'lib/payoneer_csv/transaction.rb', line 5

def amount
  @amount
end

#created_atObject (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

#descriptionObject (readonly)

Returns the value of attribute description.



4
5
6
# File 'lib/payoneer_csv/transaction.rb', line 4

def description
  @description
end