module SmartHR::Client::DependentMethods

Public Instance Methods

create_crew_dependent(crew_id:, body:, &block) click to toggle source

Create a new crew dependent

@see developer.smarthr.jp/api/index.html#!/%E5%AE%B6%E6%97%8F%E6%83%85%E5%A0%B1/postV1CrewsCrewIdDependents

@param crew_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/dependent_methods.rb, line 82
def create_crew_dependent(crew_id:, body:, &block)
  post("/crews/#{crew_id}/dependents", body, &block)
end
destroy_crew_dependent(crew_id:, id:, &block) click to toggle source

Delete the crew dependent

@see developer.smarthr.jp/api/index.html#!/%E5%AE%B6%E6%97%8F%E6%83%85%E5%A0%B1/deleteV1CrewsCrewIdDependentsId

@param crew_id [String] @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/dependent_methods.rb, line 12
def destroy_crew_dependent(crew_id:, id:, &block)
  delete("/crews/#{crew_id}/dependents/#{id}", &block)
end
find_crew_dependent(crew_id:, id:, &block) click to toggle source

Get the crew dependent

@see developer.smarthr.jp/api/index.html#!/%E5%AE%B6%E6%97%8F%E6%83%85%E5%A0%B1/getV1CrewsCrewIdDependentsId

@param crew_id [String] @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/dependent_methods.rb, line 28
def find_crew_dependent(crew_id:, id:, &block)
  get("/crews/#{crew_id}/dependents/#{id}", &block)
end
get_crew_dependents(crew_id:, page: 1, per_page: 10, &block) click to toggle source

Get the list of crew dependents

@see developer.smarthr.jp/api/index.html#!/%E5%AE%B6%E6%97%8F%E6%83%85%E5%A0%B1/getV1CrewsCrewIdDependents

@param crew_id [String] @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/dependent_methods.rb, line 62
def get_crew_dependents(crew_id:, page: 1, per_page: 10, &block)
  get("/crews/#{crew_id}/dependents",
    page: page,
    per_page: per_page,
    &block
  )
end
update_crew_dependent(crew_id:, id:, body:, &block) click to toggle source

Change the data of the specified crew dependent

@see developer.smarthr.jp/api/index.html#!/%E5%AE%B6%E6%97%8F%E6%83%85%E5%A0%B1/patchV1CrewsCrewIdDependentsId

@param crew_id [String] @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/dependent_methods.rb, line 45
def update_crew_dependent(crew_id:, id:, body:, &block)
  patch("/crews/#{crew_id}/dependents/#{id}", body, &block)
end