Class: PrismPay::BankAccount

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(checkinfo = {}) ⇒ BankAccount

Returns a new instance of BankAccount.



526
527
528
529
530
531
532
533
534
535
# File 'lib/prismpay/prismpay.rb', line 526

def initialize(checkinfo = {})
  if checkinfo.respond_to?("has_key?")
    @account_number = checkinfo[:account_number] if checkinfo.has_key?(:account_number)
    @name = checkinfo[:name] if checkinfo.has_key?(:name)
    @routing_number = checkinfo[:routing_number] if checkinfo.has_key?(:routing_number)
    @cknumber = checkinfo[:number] if checkinfo.has_key?(:number)
    @account_type = checkinfo[:account_type] if checkinfo.has_key?(:account_type)
    @account_holder_type = checkinfo[:account_holder_type] if checkinfo.has_key?(:account_holder_type)
  end
end

Instance Attribute Details

#account_holder_typeObject

mimic ActiveMerchant check object for compatibility, tesing, and stand alone purposes



497
498
499
# File 'lib/prismpay/prismpay.rb', line 497

def 
  @account_holder_type
end

#account_numberObject

mimic ActiveMerchant check object for compatibility, tesing, and stand alone purposes



497
498
499
# File 'lib/prismpay/prismpay.rb', line 497

def 
  @account_number
end

#account_typeObject

mimic ActiveMerchant check object for compatibility, tesing, and stand alone purposes



497
498
499
# File 'lib/prismpay/prismpay.rb', line 497

def 
  @account_type
end

#cknumberObject

mimic ActiveMerchant check object for compatibility, tesing, and stand alone purposes



497
498
499
# File 'lib/prismpay/prismpay.rb', line 497

def cknumber
  @cknumber
end

#first_nameObject

mimic ActiveMerchant check object for compatibility, tesing, and stand alone purposes



497
498
499
# File 'lib/prismpay/prismpay.rb', line 497

def first_name
  @first_name
end

#last_nameObject

mimic ActiveMerchant check object for compatibility, tesing, and stand alone purposes



497
498
499
# File 'lib/prismpay/prismpay.rb', line 497

def last_name
  @last_name
end

#routing_numberObject

mimic ActiveMerchant check object for compatibility, tesing, and stand alone purposes



497
498
499
# File 'lib/prismpay/prismpay.rb', line 497

def routing_number
  @routing_number
end

Instance Method Details

#[](method) ⇒ Object



508
509
510
# File 'lib/prismpay/prismpay.rb', line 508

def [](method)
  eval ("self.#{method}")
end

#[]=(method, rval) ⇒ Object



512
513
514
# File 'lib/prismpay/prismpay.rb', line 512

def []=(method, rval)
  eval ("self.#{method} = rval")
end

#nameObject



516
517
518
# File 'lib/prismpay/prismpay.rb', line 516

def name
  [@first_name, @last_name].join(' ')
end

#name=(n) ⇒ Object



520
521
522
523
524
# File 'lib/prismpay/prismpay.rb', line 520

def name=(n)
  names = n.split(' ')
  @first_name = names[0]
  @last_name = names[1]
end

#numberObject



504
505
506
# File 'lib/prismpay/prismpay.rb', line 504

def number
  @cknumber
end

#number=(n) ⇒ Object



500
501
502
# File 'lib/prismpay/prismpay.rb', line 500

def number=(n)
  @cknumber = n
end