experian 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -3
- data/experian.gemspec +2 -2
- data/lib/experian/connect_check/response.rb +0 -8
- data/lib/experian/response.rb +10 -6
- data/lib/experian/version.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30ce8e27351e203d0f67487d239f61db885be897
|
4
|
+
data.tar.gz: c558377917c3ffcff0571557ffb7d810990bd74e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af11ce0110857ca1db3993190339303852f0a5c63388a02b69d3602c9eeb8ded66c73d8addba295f944305c13c083b41378d8d1c113584b26cddddcbf15c468c
|
7
|
+
data.tar.gz: 69d05924c9a8d51213d1dda4719cf2336e032eb347cf2e95ba51a10ab5422bdfe7a0f50cd0d5bfb361a36e58cc51b61cf9e9c992e0bbb27e559ca5003eafeabb
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Ruby Wrapper for portions of the Experian Net Connect API. Experian exposes nearly 30 different services through the Net Connect API.
|
4
4
|
This gem currently only implements the Connect Check product (consumer credit scoring and identity validation), although
|
5
|
-
|
5
|
+
extending it to support the other products should be straightforward.
|
6
6
|
|
7
7
|
*Net Connect is a business-to-business application gateway designed to allow access to Experian legacy systems via the public
|
8
8
|
Internet or Experian’s private TCP/IP extranet transport. It is a secure 168-bit encrypted transaction, using HTTPS.
|
@@ -112,7 +112,7 @@ response.customer_addresses
|
|
112
112
|
|
113
113
|
Alternatively, you can skip the explicit client instantiation and use the module level convenience method instead:
|
114
114
|
```ruby
|
115
|
-
response = Experian::ConnectCheck.check_credit(...)
|
115
|
+
response = Experian::ConnectCheck.check_credit(first_name: "Homer", last_name: "Simpson", ...)
|
116
116
|
```
|
117
117
|
|
118
118
|
|
@@ -129,7 +129,7 @@ response.error_action_indicator_message
|
|
129
129
|
```
|
130
130
|
|
131
131
|
### Examine raw request and response XML
|
132
|
-
If you need to troubleshoot by viewing the raw
|
132
|
+
If you need to troubleshoot by viewing the raw XML, it is accesssible on the request and response objects of the client:
|
133
133
|
```ruby
|
134
134
|
# Inspect the request XML that was sent to Experian
|
135
135
|
client.request.xml
|
@@ -140,6 +140,16 @@ client.response.xml
|
|
140
140
|
# => "<?xml version='1.0' encoding='utf-8'?>..."
|
141
141
|
```
|
142
142
|
|
143
|
+
The meat of the Experian response is contained within the ```HostResponse``` XML element in the Automated Response
|
144
|
+
Format (ARF). The ruby wrapper for the response parses this ARF string into segments to determine the values we actually care about.
|
145
|
+
|
146
|
+
*The Automated Response Format (ARF) is a compressed, and/or abbreviated response in which a numeric value or an abbreviated
|
147
|
+
code is sent rather than the verbiage normally associated with Teletype report.*
|
148
|
+
|
149
|
+
```
|
150
|
+
client.response.host_response
|
151
|
+
# => "1100028100813165523TNJ10600@1110104SC 3XY YXXXXXXX12AMBLE,ROBERT64Fraud alert on account. Deposit required to complete enrollment.@12500220603PRTBPPCTQQ@3220018 666153036@335006212ROBERT AMBLE1955A124ANNA E61212261955@335002814ROBERT K AMBLE @335002511KELLY AMBLE @335003218ROBERT KELLY AMBLE @3360074031308131003276502S 376717 11TH AVE /BROOKLYN NY 112195904@..."
|
152
|
+
```
|
143
153
|
|
144
154
|
## Contributing
|
145
155
|
|
data/experian.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "excon"
|
22
|
-
spec.add_dependency "builder"
|
21
|
+
spec.add_dependency "excon", "~> 0.26"
|
22
|
+
spec.add_dependency "builder", "~> 3.2"
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
24
24
|
end
|
@@ -76,10 +76,6 @@ module Experian
|
|
76
76
|
connect_check_segment[25 + customer_name_length + 2, customer_message_length]
|
77
77
|
end
|
78
78
|
|
79
|
-
def success?
|
80
|
-
super && !header_segment.nil?
|
81
|
-
end
|
82
|
-
|
83
79
|
private
|
84
80
|
|
85
81
|
def consumer_statement_segment
|
@@ -94,10 +90,6 @@ module Experian
|
|
94
90
|
segment(125)
|
95
91
|
end
|
96
92
|
|
97
|
-
def header_segment
|
98
|
-
segment(110)
|
99
|
-
end
|
100
|
-
|
101
93
|
end
|
102
94
|
end
|
103
95
|
end
|
data/lib/experian/response.rb
CHANGED
@@ -44,12 +44,8 @@ module Experian
|
|
44
44
|
segments(segment_id).first
|
45
45
|
end
|
46
46
|
|
47
|
-
def
|
48
|
-
|
49
|
-
end
|
50
|
-
|
51
|
-
def error?
|
52
|
-
completion_code != "0000" || !error_segment.nil?
|
47
|
+
def header_segment
|
48
|
+
segment(110)
|
53
49
|
end
|
54
50
|
|
55
51
|
# error_segment returns the entire host response (segments 100, 200, 900)
|
@@ -58,6 +54,14 @@ module Experian
|
|
58
54
|
segment(100)
|
59
55
|
end
|
60
56
|
|
57
|
+
def success?
|
58
|
+
completion_code == "0000" && !header_segment.nil?
|
59
|
+
end
|
60
|
+
|
61
|
+
def error?
|
62
|
+
completion_code != "0000" || !error_segment.nil?
|
63
|
+
end
|
64
|
+
|
61
65
|
# The error message segment is embedded in the error segment :(
|
62
66
|
def error_message_segment
|
63
67
|
return unless error_segment
|
data/lib/experian/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: experian
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Hutzelman
|
@@ -14,30 +14,30 @@ dependencies:
|
|
14
14
|
name: excon
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
19
|
+
version: '0.26'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
26
|
+
version: '0.26'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: builder
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '3.2'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '3.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|