checkr-official 1.5.4 → 1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Changelog.md +7 -2
- data/lib/checkr.rb +2 -0
- data/lib/checkr/employment_verification.rb +18 -0
- data/lib/checkr/report.rb +6 -0
- data/lib/checkr/state_criminal_search.rb +22 -0
- data/lib/checkr/version.rb +1 -1
- data/samples/{country_criminal_search.md → county_criminal_search.md} +0 -0
- data/samples/state_criminal_search.md +59 -0
- data/test/checkr/employment_verification_test.rb +80 -0
- data/test/checkr/state_criminal_search_test.rb +82 -0
- data/test/test_data.rb +27 -0
- metadata +11 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2bb95db1be17c9c05e0f7eb6d0b5c59aa55364d2
|
4
|
+
data.tar.gz: 325812ecf94da8c71d312ed9e69c68f6cb831cd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e42cb13af6da89f838ba1266ed3bdd1676e65ee818b84f3083e9818ae8071e0ffb3f66f9fde795b5366c505772c6f9f3d2f71a48c592a8aa1f465d13b074094b
|
7
|
+
data.tar.gz: 2a99458a7b72b23f518923d5307333c63ca34c51b375c42ee9d11d14b6b6e419476fb47f9f04cc1c2a64d4cbca5b78d239a0add2f7d6afc8c3b9d5b39222e2e2
|
data/Changelog.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## 1.6 (2019-05-20)
|
2
|
+
|
3
|
+
- Add State CriminalSearch
|
4
|
+
- Add Employment Verification
|
5
|
+
|
1
6
|
## v1.5.4 (2018-12-10)
|
2
7
|
|
3
8
|
- Add ability to pass api key to individual API method calls
|
@@ -20,8 +25,8 @@ Fixes:
|
|
20
25
|
|
21
26
|
Features:
|
22
27
|
|
23
|
-
- Add
|
24
|
-
- Add
|
28
|
+
- Add Federal Civil Search
|
29
|
+
- Add Federal Criminal Search
|
25
30
|
|
26
31
|
## v1.5.0 (2018-02-2)
|
27
32
|
|
data/lib/checkr.rb
CHANGED
@@ -23,6 +23,7 @@ require 'checkr/county_criminal_search'
|
|
23
23
|
require 'checkr/document'
|
24
24
|
require 'checkr/document_list'
|
25
25
|
require 'checkr/education_verification'
|
26
|
+
require 'checkr/employment_verification'
|
26
27
|
require 'checkr/eviction_search'
|
27
28
|
require 'checkr/federal_civil_search'
|
28
29
|
require 'checkr/federal_criminal_search'
|
@@ -37,6 +38,7 @@ require 'checkr/report'
|
|
37
38
|
require 'checkr/report_list'
|
38
39
|
require 'checkr/sex_offender_search'
|
39
40
|
require 'checkr/ssn_trace'
|
41
|
+
require 'checkr/state_criminal_search'
|
40
42
|
require 'checkr/subscription'
|
41
43
|
require 'checkr/verification'
|
42
44
|
require 'checkr/verification_list'
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Checkr
|
2
|
+
class EmploymentVerification < APIResource
|
3
|
+
|
4
|
+
attribute :status
|
5
|
+
attribute :completed_at
|
6
|
+
attribute :turnaround_time
|
7
|
+
attribute :records
|
8
|
+
|
9
|
+
api_class_method :retrieve, :get, ':path/:id', arguments: [:id]
|
10
|
+
|
11
|
+
def self.path
|
12
|
+
'/v1/employment_verifications'
|
13
|
+
end
|
14
|
+
|
15
|
+
APIClass.register_subclass(self, 'employment_verification')
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
data/lib/checkr/report.rb
CHANGED
@@ -29,6 +29,9 @@ module Checkr
|
|
29
29
|
attribute :county_criminal_searches, APIList.constructor(:CountyCriminalSearch)
|
30
30
|
attribute_writer_alias :county_criminal_search_ids, :county_criminal_searches
|
31
31
|
|
32
|
+
attribute :state_criminal_searches, APIList.constructor(:StateCriminalSearch)
|
33
|
+
attribute_writer_alias :state_criminal_search_ids, :state_criminal_searches
|
34
|
+
|
32
35
|
attribute :federal_criminal_search, :FederalCriminalSearch
|
33
36
|
attribute_writer_alias :federal_criminal_search_ids, :federal_criminal_search
|
34
37
|
|
@@ -50,6 +53,9 @@ module Checkr
|
|
50
53
|
attribute :education_verification, :EducationVerification
|
51
54
|
attribute_writer_alias :education_verification_id, :education_verification
|
52
55
|
|
56
|
+
attribute :employment_verification, :EmploymentVerification
|
57
|
+
attribute_writer_alias :employment_verification_id, :employment_verification
|
58
|
+
|
53
59
|
api_class_method :retrieve, :get, ":path/:id", :arguments => [:id]
|
54
60
|
api_class_method :create, :post
|
55
61
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Checkr
|
2
|
+
class StateCriminalSearch < APIResource
|
3
|
+
|
4
|
+
attribute :status
|
5
|
+
attribute :completed_at
|
6
|
+
attribute :turnaround_time
|
7
|
+
attribute :state
|
8
|
+
attribute :records
|
9
|
+
attribute :filtered_by_positive_adjudication_records
|
10
|
+
attribute :estimated_completion_date
|
11
|
+
attribute :estimated_completion_time
|
12
|
+
|
13
|
+
api_class_method :retrieve, :get, ':path/:id', arguments: [:id]
|
14
|
+
|
15
|
+
def self.path
|
16
|
+
'/v1/state_criminal_searches'
|
17
|
+
end
|
18
|
+
|
19
|
+
APIClass.register_subclass(self, 'state_criminal_search')
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
data/lib/checkr/version.rb
CHANGED
File without changes
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# State Criminal Search
|
2
|
+
|
3
|
+
## The State Criminal Search Object
|
4
|
+
|
5
|
+
### Example Response
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
#<Checkr::StateCriminalSearch:0x3fd909bcd974 id=539fdcf335644a0ef4000001> JSON: {
|
9
|
+
"status": "pending",
|
10
|
+
"completed_at": "2019-05-14T19:43:32Z",
|
11
|
+
"turnaround_time": 455685,
|
12
|
+
"state": "CA",
|
13
|
+
"records": [],
|
14
|
+
"id": "539fdcf335644a0ef4000001",
|
15
|
+
"object": "test_state_criminal_search",
|
16
|
+
"uri": "/v1/state_criminal_searches/539fdcf335644a0ef4000001",
|
17
|
+
"created_at": "2014-06-17T06:15:47Z",
|
18
|
+
"estimated_completion_time": "2019-05-09T21:40:45Z",
|
19
|
+
"estimated_completion_date": "2019-05-10",
|
20
|
+
"filtered_by_positive_adjudication_records": []
|
21
|
+
}
|
22
|
+
```
|
23
|
+
|
24
|
+
|
25
|
+
## Retrieve an existing State Criminal Search
|
26
|
+
|
27
|
+
### Definition
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
Checkr::StateCriminalSearch.retrieve({STATE_CRIMINAL_SEARCH_ID})
|
31
|
+
```
|
32
|
+
|
33
|
+
### Example Request
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
require 'checkr' # Note the gem is named checkr-official
|
37
|
+
Checkr.api_key = "83ebeabdec09f6670863766f792ead24d61fe3f9"
|
38
|
+
|
39
|
+
ccs = Checkr::StateCriminalSearch.retrieve("539fdcf335644a0ef4000001")
|
40
|
+
```
|
41
|
+
|
42
|
+
### Example Response
|
43
|
+
|
44
|
+
```ruby
|
45
|
+
#<Checkr::StateCriminalSearch:0x3fd909bcd974 id=539fdcf335644a0ef4000001> JSON: {
|
46
|
+
"status": "pending",
|
47
|
+
"completed_at": "2019-05-14T19:43:32Z",
|
48
|
+
"turnaround_time": 455685,
|
49
|
+
"state": "CA",
|
50
|
+
"records": [],
|
51
|
+
"id": "539fdcf335644a0ef4000001",
|
52
|
+
"object": "test_state_criminal_search",
|
53
|
+
"uri": "/v1/state_criminal_searches/539fdcf335644a0ef4000001",
|
54
|
+
"created_at": "2014-06-17T06:15:47Z",
|
55
|
+
"estimated_completion_time": "2019-05-09T21:40:45Z",
|
56
|
+
"estimated_completion_date": "2019-05-10",
|
57
|
+
"filtered_by_positive_adjudication_records": []
|
58
|
+
}
|
59
|
+
```
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require File.expand_path('../test_helper', __dir__)
|
2
|
+
|
3
|
+
module Checkr
|
4
|
+
class EmploymentVerificationTest < Test::Unit::TestCase
|
5
|
+
|
6
|
+
setup do
|
7
|
+
@employment_verification_url = "#{Checkr.api_base}/v1/employment_verifications"
|
8
|
+
end
|
9
|
+
|
10
|
+
context 'EmploymentVerification class' do
|
11
|
+
should 'be retrieveable' do
|
12
|
+
id = 'employment_verification_id'
|
13
|
+
@mock.expects(:get).once.with("#{@employment_verification_url}/#{id}", anything, anything)
|
14
|
+
.returns(test_response(test_employment_verification))
|
15
|
+
employment_verification = EmploymentVerification.retrieve(id)
|
16
|
+
assert(employment_verification.is_a?(EmploymentVerification))
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
context 'EmploymentVerification instance' do
|
21
|
+
should 'be refreshable' do
|
22
|
+
@mock.expects(:get).once
|
23
|
+
.with("#{@employment_verification_url}/#{test_employment_verification[:id]}",
|
24
|
+
anything, anything)
|
25
|
+
.returns(test_response(test_employment_verification))
|
26
|
+
employment_verification = EmploymentVerification.new(test_employment_verification[:id])
|
27
|
+
employment_verification.refresh
|
28
|
+
assert_equal(test_employment_verification[:status], employment_verification.status)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
context 'Retrieved EmploymentVerification instance' do
|
33
|
+
setup do
|
34
|
+
@mock.expects(:get).once.returns(test_response(test_employment_verification))
|
35
|
+
@employment_verification = EmploymentVerification.retrieve('employment_verification_id')
|
36
|
+
end
|
37
|
+
|
38
|
+
should 'have the id attribute' do
|
39
|
+
assert_equal(test_employment_verification[:id], @employment_verification.id)
|
40
|
+
end
|
41
|
+
|
42
|
+
should 'have the object attribute' do
|
43
|
+
assert_equal(test_employment_verification[:object], @employment_verification.object)
|
44
|
+
end
|
45
|
+
|
46
|
+
should 'have the uri attribute' do
|
47
|
+
assert_equal(test_employment_verification[:uri], @employment_verification.uri)
|
48
|
+
end
|
49
|
+
|
50
|
+
should 'have the status attribute' do
|
51
|
+
assert_equal(test_employment_verification[:status], @employment_verification.status)
|
52
|
+
end
|
53
|
+
|
54
|
+
should 'have the created_at attribute' do
|
55
|
+
assert_equal(test_employment_verification[:created_at],
|
56
|
+
@employment_verification.created_at)
|
57
|
+
end
|
58
|
+
|
59
|
+
should 'have the completed_at attribute' do
|
60
|
+
assert_equal(test_employment_verification[:completed_at],
|
61
|
+
@employment_verification.completed_at)
|
62
|
+
end
|
63
|
+
|
64
|
+
should 'have the turnaround_time attribute' do
|
65
|
+
assert_equal(test_employment_verification[:turnaround_time],
|
66
|
+
@employment_verification.turnaround_time)
|
67
|
+
end
|
68
|
+
|
69
|
+
should 'have the records attribute' do
|
70
|
+
assert_equal(test_employment_verification[:records], @employment_verification.records)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
should 'be registered' do
|
75
|
+
assert(APIClass.subclasses.include?(EmploymentVerification))
|
76
|
+
assert_equal(EmploymentVerification, APIClass.subclass_fetch('employment_verification'))
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
require File.expand_path('../test_helper', __dir__)
|
2
|
+
|
3
|
+
module Checkr
|
4
|
+
class StateCriminalSearchTest < Test::Unit::TestCase
|
5
|
+
|
6
|
+
setup do
|
7
|
+
@state_criminal_search_url = "#{Checkr.api_base}/v1/state_criminal_searches"
|
8
|
+
end
|
9
|
+
|
10
|
+
context 'StateCriminalSearch class' do
|
11
|
+
should 'be retrieveable' do
|
12
|
+
id = 'state_criminal_search_id'
|
13
|
+
@mock.expects(:get).once.with("#{@state_criminal_search_url}/#{id}", anything, anything)
|
14
|
+
.returns(test_response(test_state_criminal_search))
|
15
|
+
state_criminal_search = StateCriminalSearch.retrieve(id)
|
16
|
+
assert(state_criminal_search.is_a?(StateCriminalSearch))
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
context 'StateCriminalSearch instance' do
|
21
|
+
should 'be refreshable' do
|
22
|
+
@mock.expects(:get).once
|
23
|
+
.with("#{@state_criminal_search_url}/#{test_state_criminal_search[:id]}",
|
24
|
+
anything, anything)
|
25
|
+
.returns(test_response(test_state_criminal_search))
|
26
|
+
state_criminal_search = StateCriminalSearch.new(test_state_criminal_search[:id])
|
27
|
+
state_criminal_search.refresh
|
28
|
+
assert_equal(test_state_criminal_search[:status], state_criminal_search.status)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
context 'Retrieved StateCriminalSearch instance' do
|
33
|
+
setup do
|
34
|
+
@mock.expects(:get).once.returns(test_response(test_state_criminal_search))
|
35
|
+
@state_criminal_search = StateCriminalSearch.retrieve('state_criminal_search_id')
|
36
|
+
end
|
37
|
+
|
38
|
+
should 'have the id attribute' do
|
39
|
+
assert_equal(test_state_criminal_search[:id], @state_criminal_search.id)
|
40
|
+
end
|
41
|
+
|
42
|
+
should 'have the object attribute' do
|
43
|
+
assert_equal(test_state_criminal_search[:object], @state_criminal_search.object)
|
44
|
+
end
|
45
|
+
|
46
|
+
should 'have the uri attribute' do
|
47
|
+
assert_equal(test_state_criminal_search[:uri], @state_criminal_search.uri)
|
48
|
+
end
|
49
|
+
|
50
|
+
should 'have the status attribute' do
|
51
|
+
assert_equal(test_state_criminal_search[:status], @state_criminal_search.status)
|
52
|
+
end
|
53
|
+
|
54
|
+
should 'have the created_at attribute' do
|
55
|
+
assert_equal(test_state_criminal_search[:created_at], @state_criminal_search.created_at)
|
56
|
+
end
|
57
|
+
|
58
|
+
should 'have the completed_at attribute' do
|
59
|
+
assert_equal(test_state_criminal_search[:completed_at], @state_criminal_search.completed_at)
|
60
|
+
end
|
61
|
+
|
62
|
+
should 'have the turnaround_time attribute' do
|
63
|
+
assert_equal(test_state_criminal_search[:turnaround_time],
|
64
|
+
@state_criminal_search.turnaround_time)
|
65
|
+
end
|
66
|
+
|
67
|
+
should 'have the state attribute' do
|
68
|
+
assert_equal(test_state_criminal_search[:state], @state_criminal_search.state)
|
69
|
+
end
|
70
|
+
|
71
|
+
should 'have the records attribute' do
|
72
|
+
assert_equal(test_state_criminal_search[:records], @state_criminal_search.records)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
should 'be registered' do
|
77
|
+
assert(APIClass.subclasses.include?(StateCriminalSearch))
|
78
|
+
assert_equal(StateCriminalSearch, APIClass.subclass_fetch('state_criminal_search'))
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
end
|
data/test/test_data.rb
CHANGED
@@ -380,6 +380,22 @@ module Checkr
|
|
380
380
|
:disposition_date=>"2011-06-02"}]}]}
|
381
381
|
end
|
382
382
|
|
383
|
+
def test_state_criminal_search
|
384
|
+
{ id: "5cd4265fd46fcf0001c6b8f3",
|
385
|
+
object: "state_criminal_search",
|
386
|
+
uri: "/v1/state_criminal_searches/5cd4265fd46fcf0001c6b8f3",
|
387
|
+
status: "clear",
|
388
|
+
state: "NY",
|
389
|
+
created_at: "2019-05-09T13:08:47Z",
|
390
|
+
completed_at: "2019-05-14T19:43:32Z",
|
391
|
+
turnaround_time: 455685,
|
392
|
+
estimated_completion_time: "2019-05-09T21:40:45Z",
|
393
|
+
estimated_completion_date: "2019-05-10",
|
394
|
+
records: [],
|
395
|
+
filtered_by_positive_adjudication_records: []
|
396
|
+
}
|
397
|
+
end
|
398
|
+
|
383
399
|
def test_invitation
|
384
400
|
{ id: '2c8447d8c35761ad8f70d9d3',
|
385
401
|
status: 'pending',
|
@@ -530,6 +546,17 @@ module Checkr
|
|
530
546
|
:records => []}
|
531
547
|
end
|
532
548
|
|
549
|
+
def test_employment_verification
|
550
|
+
{ id: "5cd42657682ee80028cece4c",
|
551
|
+
object: "employment_verification",
|
552
|
+
uri: "/v1/employment_verifications/5cd42657682ee80028cece4c",
|
553
|
+
status: "clear",
|
554
|
+
created_at: "2019-05-09T13:08:39Z",
|
555
|
+
completed_at: "2019-05-13T12:50:47Z",
|
556
|
+
turnaround_time: 344528,
|
557
|
+
records: [] }
|
558
|
+
end
|
559
|
+
|
533
560
|
# Errors
|
534
561
|
def test_api_error
|
535
562
|
{
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: checkr-official
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: '1.6'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Checkr Engineering Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -151,6 +151,7 @@ files:
|
|
151
151
|
- lib/checkr/document.rb
|
152
152
|
- lib/checkr/document_list.rb
|
153
153
|
- lib/checkr/education_verification.rb
|
154
|
+
- lib/checkr/employment_verification.rb
|
154
155
|
- lib/checkr/errors/api_connection_error.rb
|
155
156
|
- lib/checkr/errors/api_error.rb
|
156
157
|
- lib/checkr/errors/authentication_error.rb
|
@@ -171,6 +172,7 @@ files:
|
|
171
172
|
- lib/checkr/screening.rb
|
172
173
|
- lib/checkr/sex_offender_search.rb
|
173
174
|
- lib/checkr/ssn_trace.rb
|
175
|
+
- lib/checkr/state_criminal_search.rb
|
174
176
|
- lib/checkr/subscription.rb
|
175
177
|
- lib/checkr/util.rb
|
176
178
|
- lib/checkr/verification.rb
|
@@ -178,7 +180,7 @@ files:
|
|
178
180
|
- lib/checkr/version.rb
|
179
181
|
- mclovin.jpg
|
180
182
|
- samples/candidate.md
|
181
|
-
- samples/
|
183
|
+
- samples/county_criminal_search.md
|
182
184
|
- samples/document.md
|
183
185
|
- samples/geo.md
|
184
186
|
- samples/global_watchlist_search.md
|
@@ -188,6 +190,7 @@ files:
|
|
188
190
|
- samples/report.md
|
189
191
|
- samples/sex_offender_search.md
|
190
192
|
- samples/ssn_trace.md
|
193
|
+
- samples/state_criminal_search.md
|
191
194
|
- samples/subscription.md
|
192
195
|
- tasks/api_test.rb
|
193
196
|
- test/checkr/api_class_test.rb
|
@@ -200,6 +203,7 @@ files:
|
|
200
203
|
- test/checkr/document_list_test.rb
|
201
204
|
- test/checkr/document_test.rb
|
202
205
|
- test/checkr/education_verification_test.rb
|
206
|
+
- test/checkr/employment_verification_test.rb
|
203
207
|
- test/checkr/eviction_search_test.rb
|
204
208
|
- test/checkr/federal_civil_search_test.rb
|
205
209
|
- test/checkr/federal_criminal_search_test.rb
|
@@ -213,6 +217,7 @@ files:
|
|
213
217
|
- test/checkr/report_test.rb
|
214
218
|
- test/checkr/sex_offender_search_test.rb
|
215
219
|
- test/checkr/ssn_trace_test.rb
|
220
|
+
- test/checkr/state_criminal_search_test.rb
|
216
221
|
- test/checkr/status_codes_test.rb
|
217
222
|
- test/checkr/subscription_test.rb
|
218
223
|
- test/checkr/util_test.rb
|
@@ -241,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
241
246
|
version: '0'
|
242
247
|
requirements: []
|
243
248
|
rubyforge_project:
|
244
|
-
rubygems_version: 2.
|
249
|
+
rubygems_version: 2.6.14.3
|
245
250
|
signing_key:
|
246
251
|
specification_version: 4
|
247
252
|
summary: Ruby bindings for Checkr API
|
@@ -256,6 +261,7 @@ test_files:
|
|
256
261
|
- test/checkr/document_list_test.rb
|
257
262
|
- test/checkr/document_test.rb
|
258
263
|
- test/checkr/education_verification_test.rb
|
264
|
+
- test/checkr/employment_verification_test.rb
|
259
265
|
- test/checkr/eviction_search_test.rb
|
260
266
|
- test/checkr/federal_civil_search_test.rb
|
261
267
|
- test/checkr/federal_criminal_search_test.rb
|
@@ -269,6 +275,7 @@ test_files:
|
|
269
275
|
- test/checkr/report_test.rb
|
270
276
|
- test/checkr/sex_offender_search_test.rb
|
271
277
|
- test/checkr/ssn_trace_test.rb
|
278
|
+
- test/checkr/state_criminal_search_test.rb
|
272
279
|
- test/checkr/status_codes_test.rb
|
273
280
|
- test/checkr/subscription_test.rb
|
274
281
|
- test/checkr/util_test.rb
|