Class: GustoEmbedded::Models::Shared::PaySchedulePreview

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/gusto_embedded/models/shared/pay_schedule_preview.rb

Overview

Preview of pay schedule dates for the next 18 months. Use this to show partners expected pay dates, pay period boundaries, and payroll deadlines before they create or change a pay schedule. See [Preview pay schedule dates](docs.gusto.com/embedded-payroll/reference/get-v1-companies-company_id-pay_schedules-preview) for usage.

  • pay_periods: One entry per pay period in the range; each includes check_date, start_date, end_date, and run_payroll_by.

  • holidays: Observed bank holidays (ISO date strings) that may affect payroll timing.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(pay_periods: nil, holidays: nil) ⇒ PaySchedulePreview

Returns a new instance of PaySchedulePreview.



25
26
27
28
# File 'lib/gusto_embedded/models/shared/pay_schedule_preview.rb', line 25

def initialize(pay_periods: nil, holidays: nil)
  @pay_periods = pay_periods
  @holidays = holidays
end

Instance Method Details

#==(other) ⇒ Object



31
32
33
34
35
36
# File 'lib/gusto_embedded/models/shared/pay_schedule_preview.rb', line 31

def ==(other)
  return false unless other.is_a? self.class
  return false unless @pay_periods == other.pay_periods
  return false unless @holidays == other.holidays
  true
end