class Experian::ConnectCheck::Request
Public Instance Methods
add_account_type(xml)
click to toggle source
# File lib/experian/connect_check/request.rb, line 84 def add_account_type(xml) xml.tag!('AccountType') do xml.tag!('Type', @options[:account_type]) xml.tag!('Terms', @options[:account_terms]) xml.tag!('FullAmount', @options[:account_full_amount]) xml.tag!('AbbreviatedAmount', @options[:account_abbreviated_amount]) end if @options[:account_type] end
add_applicant(xml)
click to toggle source
# File lib/experian/connect_check/request.rb, line 36 def add_applicant(xml) xml.tag!('PrimaryApplicant') do xml.tag!('Name') do xml.tag!('Surname', @options[:last_name]) xml.tag!('First', @options[:first_name]) xml.tag!('Middle', @options[:middle_name]) if @options[:middle_name] xml.tag!('Gen', @options[:generation_code]) if @options[:generation_code] end xml.tag!('SSN', @options[:ssn]) if @options[:ssn] add_current_address(xml) add_previous_address(xml) add_driver_license(xml) add_employment(xml) xml.tag!('Age', @options[:age]) if @options[:age] xml.tag!('DOB', @options[:dob]) if @options[:dob] xml.tag!('YOB', @options[:yob]) if @options[:yob] end end
add_current_address(xml)
click to toggle source
# File lib/experian/connect_check/request.rb, line 55 def add_current_address(xml) xml.tag!('CurrentAddress') do xml.tag!('Street', @options[:street]) xml.tag!('City', @options[:city]) xml.tag!('State', @options[:state]) xml.tag!('Zip', @options[:zip]) end if @options[:zip] end
add_driver_license(xml)
click to toggle source
# File lib/experian/connect_check/request.rb, line 73 def add_driver_license(xml) xml.tag!('DriverLicense') do xml.tag!('State', @options[:driver_license_state]) xml.tag!('Number', @options[:driver_license_number]) end if @options[:driver_license_number] end
add_employment(xml)
click to toggle source
# File lib/experian/connect_check/request.rb, line 80 def add_employment(xml) # Not Implemented end
add_options(xml)
click to toggle source
# File lib/experian/connect_check/request.rb, line 107 def add_options(xml) xml.tag!('Options') do xml.tag!('ReferenceNumber', @options[:reference_number]) xml.tag!('EndUser', @options[:end_user]) end if @options[:reference_number] end
add_output_type(xml)
click to toggle source
# File lib/experian/connect_check/request.rb, line 93 def add_output_type(xml) xml.tag!('OutputType') do xml.tag!('ARF') do xml.tag!('ARFVersion', Experian::ARF_VERSION) end end end
add_previous_address(xml)
click to toggle source
# File lib/experian/connect_check/request.rb, line 64 def add_previous_address(xml) xml.tag!('PreviousAddress') do xml.tag!('Street', @options[:previous_street]) xml.tag!('City', @options[:previous_city]) xml.tag!('State', @options[:previous_state]) xml.tag!('Zip', @options[:previous_zip]) end if @options[:previous_zip] end
add_reference_id(xml)
click to toggle source
# File lib/experian/connect_check/request.rb, line 24 def add_reference_id(xml) xml.tag!('ReferenceId', @options[:reference_id]) if @options[:reference_id] end
add_subscriber(xml)
click to toggle source
# File lib/experian/connect_check/request.rb, line 28 def add_subscriber(xml) xml.tag!('Subscriber') do xml.tag!('Preamble', Experian.preamble) xml.tag!('OpInitials', Experian.op_initials) xml.tag!('SubCode', Experian.subcode) end end
add_vendor(xml)
click to toggle source
# File lib/experian/connect_check/request.rb, line 101 def add_vendor(xml) xml.tag!('Vendor') do xml.tag!('VendorNumber', Experian.vendor_number) end end
build_request()
click to toggle source
Calls superclass method
Experian::Request#build_request
# File lib/experian/connect_check/request.rb, line 5 def build_request super do |xml| xml.tag!('EAI', Experian.eai) xml.tag!('DBHost', ConnectCheck.db_host) add_reference_id(xml) xml.tag!('Request', :xmlns => Experian::XML_REQUEST_NAMESPACE, :version => '1.0') do xml.tag!('Products') do xml.tag!('ConnectCheck') do add_subscriber(xml) add_applicant(xml) add_output_type(xml) add_vendor(xml) add_options(xml) end end end end end