class JazzHR::Job
Attributes
board_code[RW]
city[RW]
country_id[RW]
department[RW]
description[RW]
hiring_lead[RW]
id[RW]
internal_code[RW]
job_applicants[RW]
maximum_salary[RW]
minimum_salary[RW]
notes[RW]
original_open_date[RW]
questionnaire[RW]
send_to_job_boards[RW]
state[RW]
status[RW]
team_id[RW]
title[RW]
type[RW]
zip[RW]
Public Class Methods
find(client:, id:)
click to toggle source
# File lib/jazz_hr/job.rb, line 14 def self.find(client:, id:) raise Error.new("No job ID supplied") if id.nil? job_attributes = client.get(path: "/jobs/#{id}") return nil if job_attributes["id"] != id new(job_attributes) end
new(attributes)
click to toggle source
# File lib/jazz_hr/job.rb, line 29 def initialize(attributes) attributes.each do |attribute, value| self.send("#{attribute}=", value) end end
search(client:)
click to toggle source
# File lib/jazz_hr/job.rb, line 3 def self.search(client:) response = client.get(path: "/jobs") if response.is_a? Array response.map do |job_attributes| new(job_attributes) end else [new(response)] end end