Class: Callcredit::Checks::BankEnhanced

Inherits:
Object
  • Object
show all
Defined in:
lib/callcredit/checks/bank_enhanced.rb

Constant Summary collapse

REQUIRED_INPUTS =
[:first_name, :last_name, :postcode, :account_number,
:sort_code, :account_number, :sort_code]
PERSONAL_DATA_KEYS =
[:first_name, :last_name, :postcode,
:building_name, :building_number]
BANK_DATA_KEYS =
[:account_number, :sort_code]

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ BankEnhanced

Returns a new instance of BankEnhanced.



12
13
14
# File 'lib/callcredit/checks/bank_enhanced.rb', line 12

def initialize(client)
  @client = client
end

Instance Method Details

#perform(data = {}) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/callcredit/checks/bank_enhanced.rb', line 16

def perform(data = {})
  check_params(data)
  response = @client.perform_check([:bank_standard, :bank_enhanced],
                                   build_params(data))

  @client.config[:raw] ? response : Response.new(response)
end