Class: OFX::Transaction

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ffi_transaction) ⇒ Transaction

Returns a new instance of Transaction.



7
8
9
10
11
12
13
14
# File 'lib/ofx/transaction.rb', line 7

def initialize(ffi_transaction)
  @number = ffi_transaction.fi_id.to_s
  @date = Time.at ffi_transaction.date_posted
  @memo = ffi_transaction.memo.to_s
  @name = ffi_transaction.name.to_s
  @type = ffi_transaction.transaction_type
  @amount = ffi_transaction.amount
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



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

def amount
  @amount
end

#dateObject (readonly)

Returns the value of attribute date.



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

def date
  @date
end

#memoObject (readonly)

Returns the value of attribute memo.



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

def memo
  @memo
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#numberObject (readonly)

Returns the value of attribute number.



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

def number
  @number
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end