ssci_inc 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ssci_inc/configuration.rb +1 -1
- data/lib/ssci_inc/dsl.rb +1 -2
- data/lib/ssci_inc/request.rb +29 -19
- data/lib/ssci_inc/screening/credit.rb +2 -3
- data/lib/ssci_inc/screening/{criminal_county.rb → criminal.rb} +3 -3
- data/lib/ssci_inc/version.rb +1 -1
- data/lib/ssci_inc.rb +2 -6
- data/test/unit/request_test.rb +0 -3
- metadata +3 -7
- data/lib/ssci_inc/screening/civil_county.rb +0 -17
- data/lib/ssci_inc/screening/criminal_federal.rb +0 -18
- data/lib/ssci_inc/screening/criminal_security.rb +0 -12
- data/lib/ssci_inc/screening/criminal_state.rb +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dd22f95c75a4e78fb120b6da699024c9c580b2a
|
4
|
+
data.tar.gz: cfce60e1350cd3df8a4271cc36d130f4ca9cfb85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe3709e6eff9637a2f882880383fcb9e07ab07841d329f3a5f2d53e0150f397ce9939d9937bef0e8bbe5ec2483f100112a7db6de5c2e6f39b16d6762e5442421
|
7
|
+
data.tar.gz: 4a0c45942db93fc2d7a2b63248cdabd53bb6feb1c1dff5877e8868639f470e1db06c9d47ed87854fcf8d4c7ebfe6ab5b469ea09eb8065768c23d9b7fb5783adf
|
data/lib/ssci_inc/dsl.rb
CHANGED
@@ -7,8 +7,7 @@ module SsciInc
|
|
7
7
|
@screenings << s
|
8
8
|
end
|
9
9
|
|
10
|
-
%w[
|
11
|
-
CriminalState PersonSearch].each do |class_name|
|
10
|
+
%w[Credit Criminal PersonSearch].each do |class_name|
|
12
11
|
class_eval <<-eoruby, __FILE__, __LINE__ + 1
|
13
12
|
def #{class_name.underscore}_screen(*args, &block)
|
14
13
|
screen(Screening::#{class_name}, *args, &block)
|
data/lib/ssci_inc/request.rb
CHANGED
@@ -6,6 +6,18 @@ module SsciInc
|
|
6
6
|
:postback_password, :embed_credentials, :ordernotes,
|
7
7
|
:interface, :monthly_income, :monthly_rent]
|
8
8
|
|
9
|
+
COURT_TYPES = {
|
10
|
+
bankruptcy: "Bankruptcy",
|
11
|
+
federal: "Federal",
|
12
|
+
felony: "Felony",
|
13
|
+
felony_misdemeanor: "Felony Misdemeanor",
|
14
|
+
lower_civil: "Lower Civil",
|
15
|
+
property_search: "Property Search",
|
16
|
+
upper_civil: "Upper Civil",
|
17
|
+
upper_lower_civil: "Upper and Lower Civil"
|
18
|
+
}
|
19
|
+
|
20
|
+
|
9
21
|
# BackgroundCheck
|
10
22
|
attr_accessor :config,
|
11
23
|
:base_uri,
|
@@ -41,7 +53,8 @@ module SsciInc
|
|
41
53
|
:municipality,
|
42
54
|
:address_line,
|
43
55
|
:street_name,
|
44
|
-
:county
|
56
|
+
:county,
|
57
|
+
:district
|
45
58
|
|
46
59
|
# Screenings
|
47
60
|
attr_reader :screenings
|
@@ -57,13 +70,7 @@ module SsciInc
|
|
57
70
|
h.each do |k,v|
|
58
71
|
send("#{k}=", v) if respond_to?("#{k}=")
|
59
72
|
end
|
60
|
-
|
61
|
-
Screening::Credit.new,
|
62
|
-
Screening::CriminalCounty.new,
|
63
|
-
Screening::CriminalFederal.new,
|
64
|
-
Screening::CriminalSecurity.new,
|
65
|
-
Screening::CriminalState.new,
|
66
|
-
Screening::PersonSearch.new]
|
73
|
+
|
67
74
|
yield self if block_given?
|
68
75
|
end
|
69
76
|
|
@@ -115,29 +122,25 @@ module SsciInc
|
|
115
122
|
}
|
116
123
|
end
|
117
124
|
xml.DemographicDetail {
|
118
|
-
xml.
|
119
|
-
:countryCode => ssn_country_code,
|
120
|
-
:issuingAuthority => issuing_authority)
|
125
|
+
xml.Ssn government_id
|
121
126
|
xml.DateOfBirth date_of_birth
|
122
127
|
} # DemographicDetail
|
123
|
-
xml.
|
128
|
+
xml.AddressSummary {
|
124
129
|
xml.CountryCode country_code == "Canada" ? "CA" : "US"
|
125
130
|
xml.PostalCode postal_code
|
126
131
|
xml.Region region
|
127
132
|
xml.Municipality municipality
|
128
|
-
xml.
|
129
|
-
|
130
|
-
xml.StreetName street_name
|
131
|
-
} # DeliveryAddress
|
132
|
-
} # PostalAddress
|
133
|
+
xml.AddressLine street_name
|
134
|
+
} # AddressSummary
|
133
135
|
} # PersonalData
|
134
136
|
xml.Screenings {
|
135
|
-
|
137
|
+
init_default_screenings if use_defaults
|
138
|
+
@screenings.each do |s|
|
136
139
|
xml.parent << s.as_xml
|
137
140
|
end
|
138
141
|
additional_items.each do |k,v|
|
139
142
|
xml.AdditionalItems(:type => "x:#{k}") {
|
140
|
-
xml.Text v
|
143
|
+
xml.Text type.includes? "url" ? xml.CDATA v : v
|
141
144
|
}
|
142
145
|
end
|
143
146
|
} # Screenings
|
@@ -212,5 +215,12 @@ module SsciInc
|
|
212
215
|
@aliases = []
|
213
216
|
end
|
214
217
|
|
218
|
+
def init_default_screenings
|
219
|
+
@screenings = [Screening::Credit.new,
|
220
|
+
Screening::Criminal.new(qualifier: "county", region: region, county: county, court_type: COURT_TYPES[:upper_lower_civil]),
|
221
|
+
Screening::Criminal.new(qualifier: "county", region: region, county: county, court_type: COURT_TYPES[:felony_misdemeanor]),
|
222
|
+
Screening::Criminal.new(qualifier: "county", region: region, county: "MIDDLE DISTRICT", court_type: COURT_TYPES[:federal])]
|
223
|
+
end
|
224
|
+
|
215
225
|
end
|
216
226
|
end
|
@@ -3,11 +3,10 @@ module SsciInc
|
|
3
3
|
class Credit
|
4
4
|
include Screening::Model
|
5
5
|
|
6
|
-
attr_accessor :score, :fraud, :vendor
|
7
|
-
|
8
6
|
def as_xml
|
9
7
|
builder(:type => "credit") do |xml|
|
10
|
-
xml.
|
8
|
+
xml.OrderCreditReport "YES"
|
9
|
+
xml.PermissiblePurpose "Employment"
|
11
10
|
end
|
12
11
|
end
|
13
12
|
|
@@ -3,13 +3,13 @@ module SsciInc
|
|
3
3
|
class CriminalCounty
|
4
4
|
include Screening::Model
|
5
5
|
|
6
|
-
attr_accessor :region, :county
|
6
|
+
attr_accessor :qualifier, :region, :county, :court_type
|
7
7
|
|
8
8
|
def as_xml
|
9
|
-
builder(:type => "criminal", :qualifier =>
|
10
|
-
xml.CourtType "Felony Misdemeanor"
|
9
|
+
builder(:type => "criminal", :qualifier => qualifier) do |xml|
|
11
10
|
xml.Region region unless region.nil?
|
12
11
|
xml.County county unless county.nil?
|
12
|
+
xml.CourtType court_type
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
data/lib/ssci_inc/version.rb
CHANGED
data/lib/ssci_inc.rb
CHANGED
@@ -8,12 +8,8 @@ require 'ssci_inc/person_name'
|
|
8
8
|
require 'ssci_inc/request'
|
9
9
|
require 'ssci_inc/response'
|
10
10
|
|
11
|
-
require 'ssci_inc/screening/model'
|
12
|
-
require 'ssci_inc/screening/civil_county'
|
13
11
|
require 'ssci_inc/screening/credit'
|
14
|
-
require 'ssci_inc/screening/
|
15
|
-
require 'ssci_inc/screening/criminal_federal'
|
16
|
-
require 'ssci_inc/screening/criminal_security'
|
17
|
-
require 'ssci_inc/screening/criminal_state'
|
12
|
+
require 'ssci_inc/screening/criminal'
|
18
13
|
require 'ssci_inc/screening/eviction'
|
14
|
+
require 'ssci_inc/screening/model'
|
19
15
|
require 'ssci_inc/screening/person_search'
|
data/test/unit/request_test.rb
CHANGED
@@ -23,11 +23,8 @@ module SsciInc
|
|
23
23
|
# the document that matches this name and value
|
24
24
|
assert_xml_attr_equal root_node, :user_name, :userId
|
25
25
|
assert_xml_attr_equal root_node, :password
|
26
|
-
assert_xml_attr_equal root_node, :type
|
27
|
-
assert_xml_attr_equal root_node, :action
|
28
26
|
assert_xml_attr_equal root_node, :ssn_country_code, :countryCode
|
29
27
|
assert_xml_attr_equal root_node, :issuing_authority, :issuingAuthority
|
30
|
-
assert_equal "yes", root_node.at("//@useConfigurationDefaults").value
|
31
28
|
|
32
29
|
assert_xml_text_equal root_node, :reference_id
|
33
30
|
assert_xml_text_equal root_node, :reference
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ssci_inc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Alme
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -166,12 +166,8 @@ files:
|
|
166
166
|
- lib/ssci_inc/person_name.rb
|
167
167
|
- lib/ssci_inc/request.rb
|
168
168
|
- lib/ssci_inc/response.rb
|
169
|
-
- lib/ssci_inc/screening/civil_county.rb
|
170
169
|
- lib/ssci_inc/screening/credit.rb
|
171
|
-
- lib/ssci_inc/screening/
|
172
|
-
- lib/ssci_inc/screening/criminal_federal.rb
|
173
|
-
- lib/ssci_inc/screening/criminal_security.rb
|
174
|
-
- lib/ssci_inc/screening/criminal_state.rb
|
170
|
+
- lib/ssci_inc/screening/criminal.rb
|
175
171
|
- lib/ssci_inc/screening/eviction.rb
|
176
172
|
- lib/ssci_inc/screening/model.rb
|
177
173
|
- lib/ssci_inc/screening/person_search.rb
|
@@ -1,17 +0,0 @@
|
|
1
|
-
module SsciInc
|
2
|
-
module Screening
|
3
|
-
class CivilCounty
|
4
|
-
include Screening::Model
|
5
|
-
|
6
|
-
attr_accessor :region, :county
|
7
|
-
|
8
|
-
def as_xml
|
9
|
-
builder(:type => "civil", :qualifier => "county") do |xml|
|
10
|
-
xml.Region region unless region.nil?
|
11
|
-
xml.County county unless county.nil?
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module SsciInc
|
2
|
-
module Screening
|
3
|
-
class CriminalFederal
|
4
|
-
include Screening::Model
|
5
|
-
|
6
|
-
attr_accessor :region, :district
|
7
|
-
|
8
|
-
def as_xml
|
9
|
-
builder(:type => "criminal", :qualifier => "county") do |xml|
|
10
|
-
xml.CourtType "Federal"
|
11
|
-
xml.Region region unless region.nil?
|
12
|
-
xml.District district unless district.nil?
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
module SsciInc
|
2
|
-
module Screening
|
3
|
-
class CriminalState
|
4
|
-
include Screening::Model
|
5
|
-
|
6
|
-
attr_accessor :region
|
7
|
-
|
8
|
-
def as_xml
|
9
|
-
builder(:type => "criminal", :qualifier => "statewide") do |xml|
|
10
|
-
xml.CourtType "Felony Misdemeanor"
|
11
|
-
xml.Region region unless region.nil?
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|