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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 73a404dfa3f7928172bb01a332a7d7acd008963a
4
- data.tar.gz: 1cbe21e733ba63c7be1e096f726b1805a48d44ae
3
+ metadata.gz: 30ce8e27351e203d0f67487d239f61db885be897
4
+ data.tar.gz: c558377917c3ffcff0571557ffb7d810990bd74e
5
5
  SHA512:
6
- metadata.gz: e4c01acf12f4073d200c2c9b8613aa1ad46536dcf9ee44a31fed93d8a52f797f79812bf832210db0b97107f8877581488112bdf15bb1f10fd1d9000ee773b769
7
- data.tar.gz: 4fa06a3a87bbec3a8736d546693c4b20da618d4dd71e4eff41a9e7969617c42051aa8c8154b95aa09ad64c7ddfb05374473d491ba6b8c72a8c73374c3402695a
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
- expanding it to support the other products should be straightforward.
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 xml, it is accesssible on the request and response objects of the client:
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
 
@@ -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
@@ -44,12 +44,8 @@ module Experian
44
44
  segments(segment_id).first
45
45
  end
46
46
 
47
- def success?
48
- completion_code == "0000"
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
@@ -1,3 +1,3 @@
1
1
  module Experian
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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: '0'
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: '0'
40
+ version: '3.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement