Class: PayrollHero::Api::V3::AttendanceDays

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

Overview

AttendanceDays 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

#list(page: nil, per_page: nil, start_date: nil, end_date: nil, worksite_id: nil, excluded_worksite_id: nil, employee_id: nil) ⇒ Hashie::Mash

implements the interface to the AttendanceDays List endpoint

Parameters:

  • page (Fixnum) (defaults to: nil)
  • per_page (Fixnum) (defaults to: nil)
  • start_date (Date) (defaults to: nil)
  • end_date (Date) (defaults to: nil)
  • worksite_id (Fixnum) (defaults to: nil)
  • excluded_worksite_id (Fixnum) (defaults to: nil)
  • employee_id (Fixnum) (defaults to: nil)

Returns:

  • (Hashie::Mash)


17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/payroll_hero/api/v3/attendance_days.rb', line 17

def list(page: nil, per_page: nil, start_date: nil, end_date: nil, worksite_id: nil, excluded_worksite_id: nil, employee_id: nil)
  params = {
    page: page,
    per_page: per_page,
    start_date: start_date,
    end_date: end_date,
    worksite_id: worksite_id,
    excluded_worksite_id: excluded_worksite_id,
    employee_id: employee_id,
  }
  remove_nil_values_from!(params)
  client.get("/api/v3/attendance_days", params)
end