Module: SmartHR::Client::JobTitleMethods
- Included in:
- SmartHR::Client
- Defined in:
- lib/smarthr/client/job_title_methods.rb
Instance Method Summary collapse
-
#create_job_title(body:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Create a new job title.
-
#destroy_job_title(id:) {|response_body, response_header| ... } ⇒ Object
Delete the job title.
-
#find_job_title(id:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Get the job title.
-
#get_job_titles(page: 1, per_page: 10) {|response_body, response_header| ... } ⇒ Array<Hashie::Mash>
Get the list of job titles.
-
#update_job_title(id:, body:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Change the data of the specified job title.
Instance Method Details
#create_job_title(body:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Create a new job title
77 78 79 |
# File 'lib/smarthr/client/job_title_methods.rb', line 77 def create_job_title(body:, &block) post("/job_titles", body, &block) end |
#destroy_job_title(id:) {|response_body, response_header| ... } ⇒ Object
Delete the job title
11 12 13 |
# File 'lib/smarthr/client/job_title_methods.rb', line 11 def destroy_job_title(id:, &block) delete("/job_titles/#{id}", &block) end |
#find_job_title(id:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Get the job title
26 27 28 |
# File 'lib/smarthr/client/job_title_methods.rb', line 26 def find_job_title(id:, &block) get("/job_titles/#{id}", &block) end |
#get_job_titles(page: 1, per_page: 10) {|response_body, response_header| ... } ⇒ Array<Hashie::Mash>
Get the list of job titles
58 59 60 61 62 63 64 |
# File 'lib/smarthr/client/job_title_methods.rb', line 58 def get_job_titles(page: 1, per_page: 10, &block) get("/job_titles", page: page, per_page: per_page, &block ) end |
#update_job_title(id:, body:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Change the data of the specified job title
42 43 44 |
# File 'lib/smarthr/client/job_title_methods.rb', line 42 def update_job_title(id:, body:, &block) patch("/job_titles/#{id}", body, &block) end |