Git Product home page Git Product logo

checkr's Introduction

Checkr

Ruby wrapper for checkr.io API (https://checkr.io/docs)

Installation

Add this line to your application's Gemfile:

gem 'checkr'

And then execute:

$ bundle

Or install it yourself as:

$ gem install checkr

Usage

Configure authentication keys

Checkr.configure do |c|
  c.api_key   = "83ebeabdec09f6670863766f792ead24d61fe3f9" #Test token from checkr api document
end

Create subaccount

subaccount = Checkr::Subaccount.create(:name => 'Checkr', :entity_name => 'My Company', :tax_id => 'XXXXX', :representative_title => 'CEO', :representative_name => 'John Smith', :representative_email => '[email protected]', :phone => '3101111111',
:incorporation_date => '2010-02-02', :incorporation_type => 'llc', :incorporation_state => 'DE', 'address[street]' => '3230 3rd street', 'address[city]' => 'San Francisco',
'address[state]' => 'CA', 'address[zipcode]'=> '94110')

#Subaccount attributes
subaccount_id = subaccount.id

Create candidate for subaccount

candidate = Checkr::Candidate.create(:subaccount_id => '8168372aac5a952b90eb9acb', :first_name => 'John', :last_name => 'Smith', :dob => '1970-01-22', :ssn => '111-11-2000', :phone => '5555555555', :email => '[email protected]')

#candidate attributes
candidate_id = candidate.id

Create candidate

candidate = Checkr::Candidate.create(:first_name => 'John', :last_name => 'Smith', :dob => '1970-01-22', :ssn => '111-11-2000', :phone => '5555555555', :email => '[email protected]')

#candidate attributes
candidate_id = candidate.id

Find candidate

candidate = Checkr::Candidate.find('e44aa283528e6fde7d542194')
candidate.id #Returns checkr id of the candidate
candidate.first_name #Returns first_name of the candidate

Get all reports belongs to candidate, if exists

candidate = Checkr::Subaccount.find('e44aa283528e6fde7d542194')
candidate.reports #Returns array of Checkr::Report objects

Create report

report = Checkr::Report.create(:package => 'driver_plus', :candidate_id => 'e44aa283528e6fde7d542194')
report.id #Returns the checkr id of the created report

Find report

report = Checkr::Report.find("5878551b3ee1eacae5a2c558")
report.id #Returns the checkr id of the created report
report.status #Returns the status of the report

Find individual reports

report = Checkr::MotorVehicleReport.find("5878551b3ee1eacae5a2c558")
report = Checkr::CountryCriminalSearch.find("5878551b3ee1eacae5a2c558")
report = Checkr::NationalCriminalSearch.find("5878551b3ee1eacae5a2c558")
report = Checkr::SexOffenderSearch.find("5878551b3ee1eacae5a2c558")
report = Checkr::SsnTrace.find("5878551b3ee1eacae5a2c558")
report = Checkr::TerroristWatchlistSearch.find("5878551b3ee1eacae5a2c558")

report.status #Returns the status of the report
report.records #Returns array of ReportRecord objects, if report has records
report.records.first.charges #Returns array of ReportCharge objects, if report has charges
report.accidents #In case of motor vehicle report
report.voilations #In case of motor vehicle report

Contributing

  1. Fork it ( https://github.com/[my-github-username]/checkr/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

checkr's People

Contributors

amalkumars avatar vijendra avatar nzk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.