module SmartHR::Client::DependentMethods
Public Instance Methods
Create a new crew dependent
@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
Delete the crew dependent
@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
Get the crew dependent
@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 the list of crew dependents
@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
Change the data of the specified crew dependent
@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