module SmartHR::Client::JobTitleMethods

Public Instance Methods

create_job_title(body:, &block) click to toggle source

Create a new job title

@see developer.smarthr.jp/api/index.html#!/%E5%BD%B9%E8%81%B7/postV1JobTitles

@param body [Hash]

@yield [response_body, response_header] if block was given, return response body and response header through block arguments @yieldparam response_body [Hashie::Mash] response body @yieldparam response_header [Hash<String, String>] response header (e.g. X-Rate-Limit-Limit, X-Rate-Limit-Reset, X-Rate-Limit-Remaining)

@return [Hashie::Mash]

# 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:, &block) click to toggle source

Delete the job title

@see developer.smarthr.jp/api/index.html#!/%E5%BD%B9%E8%81%B7/deleteV1JobTitlesId

@param id [String]

@yield [response_body, response_header] if block was given, return response body and response header through block arguments @yieldparam response_body [Hashie::Mash] response body @yieldparam response_header [Hash<String, String>] response header (e.g. X-Rate-Limit-Limit, X-Rate-Limit-Reset, X-Rate-Limit-Remaining)

# 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:, &block) click to toggle source

Get the job title

@see developer.smarthr.jp/api/index.html#!/%E5%BD%B9%E8%81%B7/getV1JobTitlesId

@param id [String]

@yield [response_body, response_header] if block was given, return response body and response header through block arguments @yieldparam response_body [Hashie::Mash] response body @yieldparam response_header [Hash<String, String>] response header (e.g. X-Rate-Limit-Limit, X-Rate-Limit-Reset, X-Rate-Limit-Remaining)

@return [Hashie::Mash]

# 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, &block) click to toggle source

Get the list of job titles

@see developer.smarthr.jp/api/index.html#!/%E5%BD%B9%E8%81%B7/getV1JobTitles

@param page [Integer] @param per_page [Integer]

@yield [response_body, response_header] if block was given, return response body and response header through block arguments @yieldparam response_body [Array<Hashie::Mash>] response body @yieldparam response_header [Hash<String, String>] response header (e.g. X-Rate-Limit-Limit, X-Rate-Limit-Reset, X-Rate-Limit-Remaining)

@return [Array<Hashie::Mash>]

# 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:, &block) click to toggle source

Change the data of the specified job title

@see developer.smarthr.jp/api/index.html#!/%E5%BD%B9%E8%81%B7/patchV1JobTitlesId

@param id [String] @param body [Hash]

@yield [response_body, response_header] if block was given, return response body and response header through block arguments @yieldparam response_body [Hashie::Mash] response body @yieldparam response_header [Hash<String, String>] response header (e.g. X-Rate-Limit-Limit, X-Rate-Limit-Reset, X-Rate-Limit-Remaining)

@return [Hashie::Mash]

# File lib/smarthr/client/job_title_methods.rb, line 42
def update_job_title(id:, body:, &block)
  patch("/job_titles/#{id}", body, &block)
end