class OnboardIQ

Constants

DEFAULT_API_VERSION

Attributes

token[RW]
version[RW]

Public Class Methods

new(hash) click to toggle source
# File lib/onboardiq.rb, line 11
def initialize(hash)
  @token = hash[:token]
  @version = DEFAULT_API_VERSION
  self.class.default_params api_token: @token
end

Public Instance Methods

create_applicant(attrs) click to toggle source
# File lib/onboardiq.rb, line 25
def create_applicant(attrs)
  response = self.class.post("/#{@version}/applicants", body: attrs)
  JSON.parse(response.body)
  rescue
    nil
end
get_applicant(applicant_key) click to toggle source
# File lib/onboardiq.rb, line 39
def get_applicant(applicant_key)
  response = self.class.get("/#{@version}/applicants/#{applicant_key}")
  JSON.parse(response.body)
  rescue
    nil
end
list_applicants() click to toggle source
# File lib/onboardiq.rb, line 17
def list_applicants
  response = self.class.get("/#{@version}/applicants")
  JSON.parse(response.body)

  rescue
    nil
end
update_applicant(applicant_key, attrs) click to toggle source
# File lib/onboardiq.rb, line 32
def update_applicant(applicant_key, attrs)
  response = self.class.put("/#{@version}/applicants/#{applicant_key}", body: attrs)
  JSON.parse(response.body)
  rescue
    nil
end