Module: SmartHR::Client::DependentRelationMethods

Included in:
SmartHR::Client
Defined in:
lib/smarthr/client/dependent_relation_methods.rb

Instance Method Summary collapse

Instance Method Details

#get_dependent_relations(page: 1, per_page: 10, filter_spouse: false) {|response_body, response_header| ... } ⇒ Array<Hashie::Mash>

Get the list of dependent relations

Parameters:

  • page (Integer) (defaults to: 1)
  • per_page (Integer) (defaults to: 10)
  • filter_spouse (Boolean) (defaults to: false)

    Whether or not to filter spouse

Yields:

  • (response_body, response_header)

    if block was given, return response body and response header through block arguments

Yield Parameters:

  • response_body (Array<Hashie::Mash>)

    response body

  • response_header (Hash<String, String>)

    response header (e.g. X-Rate-Limit-Limit, X-Rate-Limit-Reset, X-Rate-Limit-Remaining)

Returns:

  • (Array<Hashie::Mash>)

See Also:



15
16
17
18
19
20
21
22
# File 'lib/smarthr/client/dependent_relation_methods.rb', line 15

def get_dependent_relations(page: 1, per_page: 10, filter_spouse: false, &block)
  get("/dependent_relations",
    page: page,
    per_page: per_page,
    filter: filter_spouse ? 'spouse' : nil,
    &block
  )
end