Class: GustoEmbedded::Models::Shared::PaySchedulePreviewPayPeriod

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

Overview

A single pay period in a pay schedule preview, with check date, period boundaries, and payroll deadline.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(check_date:, start_date:, run_payroll_by:, end_date:) ⇒ PaySchedulePreviewPayPeriod

Returns a new instance of PaySchedulePreviewPayPeriod.



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

def initialize(check_date:, start_date:, run_payroll_by:, end_date:)
  @check_date = check_date
  @start_date = start_date
  @run_payroll_by = run_payroll_by
  @end_date = end_date
end

Instance Method Details

#==(other) ⇒ Object



33
34
35
36
37
38
39
40
# File 'lib/gusto_embedded/models/shared/pay_schedule_preview_pay_period.rb', line 33

def ==(other)
  return false unless other.is_a? self.class
  return false unless @check_date == other.check_date
  return false unless @start_date == other.start_date
  return false unless @run_payroll_by == other.run_payroll_by
  return false unless @end_date == other.end_date
  true
end