Class: Banker::Transaction

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

Instance Attribute Summary collapse

Attributes inherited from Base

#agent, #keys

Instance Method Summary collapse

Methods inherited from Base

#class_name, #cleaner, #get, #get_letter, #memorable_required, #params, #parse_ofx

Constructor Details

#initialize(args = {}) ⇒ Transaction

Returns a new instance of Transaction.



5
6
7
8
9
10
11
12
# File 'lib/banker/transaction.rb', line 5

def initialize(args={})
  @keys = %w{amount transacted_at}
  params(args)

  args.each do |attribute, value|
    send(:"#{attribute}=", value)
  end
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



3
4
5
# File 'lib/banker/transaction.rb', line 3

def amount
  @amount
end

#descriptionObject

Returns the value of attribute description.



3
4
5
# File 'lib/banker/transaction.rb', line 3

def description
  @description
end

#transacted_atObject

Returns the value of attribute transacted_at.



3
4
5
# File 'lib/banker/transaction.rb', line 3

def transacted_at
  @transacted_at
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/banker/transaction.rb', line 3

def type
  @type
end

#uidObject

Returns the value of attribute uid.



3
4
5
# File 'lib/banker/transaction.rb', line 3

def uid
  @uid
end