Class: PayrollHero::Api::V3::Employees

Inherits:
BaseGroup
  • Object
show all
Defined in:
lib/payroll_hero/api/v3/employees.rb

Overview

Employees Endpoint

Instance Attribute Summary

Attributes inherited from BaseGroup

#client

Instance Method Summary collapse

Methods inherited from BaseGroup

#initialize

Constructor Details

This class inherits a constructor from PayrollHero::Api::BaseGroup

Instance Method Details

#get(id, show_tags: false) ⇒ Hashie::Mash

implements the interface to get a single Employee record

Parameters:

  • id (Fixnum|String)
  • show_tags (TrueClass|FalseClass) (defaults to: false)

Returns:

  • (Hashie::Mash)


12
13
14
15
16
17
18
# File 'lib/payroll_hero/api/v3/employees.rb', line 12

def get(id, show_tags: false)
  params = {
    show_tags: show_tags,
  }
  remove_nil_values_from!(params)
  client.get("/api/v3/employees/#{id}", params)
end