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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 35f2961747b10cbe23bb2885ff3a72a7e2302b4c
4
- data.tar.gz: 78cec6214a5342ff845719a22f78d7149ae3b2b3
3
+ metadata.gz: 3dd22f95c75a4e78fb120b6da699024c9c580b2a
4
+ data.tar.gz: cfce60e1350cd3df8a4271cc36d130f4ca9cfb85
5
5
  SHA512:
6
- metadata.gz: f2cf6eb26ea5481e3f8db477caedc0959aa77c414379bb13b4b29fb3934ba1bfcf3f0a231e5e94f26b3d5b4a3c8d28522d0004df91fb0b383f78e4df5c66544e
7
- data.tar.gz: e1717bf6043ad209cbaa8ef5090325f8287ad227a3dee96c3b77b970519e2f09c94f76f718572347bfff4905dd33614e240481d37f9077ec5f178d0f5c89f27b
6
+ metadata.gz: fe3709e6eff9637a2f882880383fcb9e07ab07841d329f3a5f2d53e0150f397ce9939d9937bef0e8bbe5ec2483f100112a7db6de5c2e6f39b16d6762e5442421
7
+ data.tar.gz: 4a0c45942db93fc2d7a2b63248cdabd53bb6feb1c1dff5877e8868639f470e1db06c9d47ed87854fcf8d4c7ebfe6ab5b469ea09eb8065768c23d9b7fb5783adf
@@ -15,7 +15,7 @@ module SsciInc
15
15
  @base_uri ||= 'https://linxml.com/bgcheck.asp'
16
16
  end
17
17
 
18
- def report__uri
18
+ def report_uri
19
19
  @report_uri ||= 'https://linxml.com/get_bgreport.asp'
20
20
  end
21
21
 
data/lib/ssci_inc/dsl.rb CHANGED
@@ -7,8 +7,7 @@ module SsciInc
7
7
  @screenings << s
8
8
  end
9
9
 
10
- %w[CivilCounty Credit CriminalCounty CriminalFederal CriminalSecurity
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)
@@ -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
- @screenings = [Screening::CivilCounty.new(region: region, county: county),
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.GovernmentId(government_id,
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.PostalAddress {
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.DeliveryAddress {
129
- xml.AddressLine address_line
130
- xml.StreetName street_name
131
- } # DeliveryAddress
132
- } # PostalAddress
133
+ xml.AddressLine street_name
134
+ } # AddressSummary
133
135
  } # PersonalData
134
136
  xml.Screenings {
135
- screenings.each do |s|
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.Vendor(vendor, :score => score, :fraud => fraud)
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 => "county") do |xml|
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
 
@@ -1,3 +1,3 @@
1
1
  module SsciInc
2
- VERSION = '0.1.9'
2
+ VERSION = '0.1.10'
3
3
  end
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/criminal_county'
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'
@@ -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.9
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-04 00:00:00.000000000 Z
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/criminal_county.rb
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,12 +0,0 @@
1
- module SsciInc
2
- module Screening
3
- class CriminalSecurity
4
- include Screening::Model
5
-
6
- def as_xml
7
- builder(:type => "criminal", :qualifier => "security")
8
- end
9
-
10
- end
11
- end
12
- 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