Class: Experian::ConnectCheck::Response
- Inherits:
-
Response
- Object
- Response
- Experian::ConnectCheck::Response
show all
- Defined in:
- lib/experian/connect_check/response.rb
Instance Attribute Summary
Attributes inherited from Response
#xml
Instance Method Summary
collapse
Methods inherited from Response
#completion_code, #completion_message, #error?, #error_action_indicator, #error_action_indicator_message, #error_code, #error_message, #error_message_segment, #error_segment, #header_segment, #host_response, #initialize, #segment, #segments, #success?, #transaction_id
Instance Method Details
#credit_class_code ⇒ Object
19
20
21
22
|
# File 'lib/experian/connect_check/response.rb', line 19
def credit_class_code
return unless connect_check_segment
connect_check_segment[10]
end
|
#credit_fraud_code ⇒ Object
34
35
36
37
38
39
40
|
# File 'lib/experian/connect_check/response.rb', line 34
def credit_fraud_code
case statement_type_code
when 25 then 'X' when 26..31 then 'Y' else 'Z' end if success?
end
|
#credit_match_code ⇒ Object
10
11
12
13
|
# File 'lib/experian/connect_check/response.rb', line 10
def credit_match_code
return unless connect_check_segment
connect_check_segment[8]
end
|
#credit_match_code_message ⇒ Object
15
16
17
|
# File 'lib/experian/connect_check/response.rb', line 15
def credit_match_code_message
MATCH_CODES[credit_match_code]
end
|
#credit_score ⇒ Object
24
25
26
27
|
# File 'lib/experian/connect_check/response.rb', line 24
def credit_score
return unless risk_score_segment
risk_score_segment[7..10].to_i
end
|
#customer_addresses ⇒ Object
63
64
65
66
67
|
# File 'lib/experian/connect_check/response.rb', line 63
def customer_addresses
segments(336).map do |segment|
segment[36, segment[34..35].to_i]
end
end
|
#customer_message ⇒ Object
74
75
76
77
|
# File 'lib/experian/connect_check/response.rb', line 74
def customer_message
return unless connect_check_segment
connect_check_segment[25 + customer_name_length + 2, customer_message_length]
end
|
#customer_message_length ⇒ Object
69
70
71
72
|
# File 'lib/experian/connect_check/response.rb', line 69
def customer_message_length
return unless connect_check_segment
connect_check_segment[25 + customer_name_length, 2].to_i
end
|
#customer_name ⇒ Object
52
53
54
55
|
# File 'lib/experian/connect_check/response.rb', line 52
def customer_name
return unless connect_check_segment
connect_check_segment[25, customer_name_length]
end
|
#customer_name_length ⇒ Object
47
48
49
50
|
# File 'lib/experian/connect_check/response.rb', line 47
def customer_name_length
return unless connect_check_segment
connect_check_segment[23..25].to_i
end
|
#customer_names ⇒ Object
57
58
59
60
61
|
# File 'lib/experian/connect_check/response.rb', line 57
def customer_names
segments(335).map do |segment|
segment[9, segment[7..8].to_i]
end
end
|
#high_risk_address_alert ⇒ Object
29
30
31
32
|
# File 'lib/experian/connect_check/response.rb', line 29
def high_risk_address_alert
return unless connect_check_segment
connect_check_segment[11]
end
|
5
6
7
8
|
# File 'lib/experian/connect_check/response.rb', line 5
def input_type
return unless connect_check_segment
connect_check_segment[7]
end
|
#statement_type_code ⇒ Object
42
43
44
45
|
# File 'lib/experian/connect_check/response.rb', line 42
def statement_type_code
return unless consumer_statement_segment
consumer_statement_segment[7..8].to_i
end
|