Class: PayrollHero::Api::V4::ScheduleEvents

Inherits:
BaseGroup
  • Object
show all
Defined in:
lib/payroll_hero/api/v4/schedule_events.rb

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(time_zone: nil, start_time: nil, end_time: nil, start_date: nil, end_date: nil, employee_ids: nil, worksite_ids: nil, excluded_worksite_ids: nil, shared_events: nil, page: nil, per_page: nil, **params) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/payroll_hero/api/v4/schedule_events.rb', line 6

def list(
  time_zone: nil,
  start_time: nil,
  end_time: nil,
  start_date: nil,
  end_date: nil,
  employee_ids: nil,
  worksite_ids: nil,
  excluded_worksite_ids: nil,
  shared_events: nil,
  page: nil,
  per_page: nil,
  **params
)
  combined_params = params.merge time_zone: time_zone,
                                 start_time: start_time,
                                 end_time: end_time,
                                 start_date: start_date,
                                 end_date: end_date,
                                 employee_ids: employee_ids,
                                 worksite_ids: worksite_ids,
                                 excluded_worksite_ids: excluded_worksite_ids,
                                 shared_events: shared_events,
                                 page: page,
                                 per_page: per_page

  remove_nil_values_from! combined_params
  client.get '/api/v4/schedule_events', combined_params
end