Class: Experian::ConnectCheck::Client

Inherits:
Experian::Client show all
Defined in:
lib/experian/connect_check/client.rb

Instance Attribute Summary

Attributes inherited from Experian::Client

#request, #response

Instance Method Summary collapse

Methods inherited from Experian::Client

#invalid_login?, #request_body, #request_headers, #submit_request

Instance Method Details

#assert_check_credit_options(options) ⇒ Object



11
12
13
14
15
# File 'lib/experian/connect_check/client.rb', line 11

def assert_check_credit_options(options)
  return if options[:first_name] && options[:last_name] && options[:ssn]
  return if options[:first_name] && options[:last_name] && options[:street] && options[:zip]
  raise Experian::ArgumentError, "Required options missing: first_name, last_name, ssn OR first_name, last_name, street, zip"
end

#check_credit(options = {}) ⇒ Object



5
6
7
8
9
# File 'lib/experian/connect_check/client.rb', line 5

def check_credit(options = {})
  assert_check_credit_options(options)
  @request = Request.new(options)
  @response = Response.new(submit_request)
end