Class: GustoEmbedded::Models::Shared::PayScheduleShow

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

Overview

Pay schedule returned from pay schedule endpoints (GET by ID, POST create, PUT update). Same fields as Pay-Schedule with a required ‘version` for [optimistic concurrency](docs.gusto.com/embedded-payroll/docs/api-fundamentals#optimistic-version-control).

For API version 2025-11-15 and later, responses use ‘auto_payroll`; earlier versions use `auto_pilot` for the same semantic.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(uuid:, version:, frequency: nil, anchor_pay_date: nil, anchor_end_of_pay_period: nil, custom_name: nil, auto_pilot: nil, auto_payroll: nil, active: nil, day_1: nil, day_2: nil, name: nil, auto_payroll_enablement_blockers: nil) ⇒ PayScheduleShow

Returns a new instance of PayScheduleShow.



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/gusto_embedded/models/shared/pay_schedule_show.rb', line 65

def initialize(uuid:, version:, frequency: nil, anchor_pay_date: nil, anchor_end_of_pay_period: nil, custom_name: nil, auto_pilot: nil, auto_payroll: nil, active: nil, day_1: nil, day_2: nil, name: nil, auto_payroll_enablement_blockers: nil)
  @uuid = uuid
  @version = version
  @frequency = frequency
  @anchor_pay_date = anchor_pay_date
  @anchor_end_of_pay_period = anchor_end_of_pay_period
  @custom_name = custom_name
  @auto_pilot = auto_pilot
  @auto_payroll = auto_payroll
  @active = active
  @day_1 = day_1
  @day_2 = day_2
  @name = name
  @auto_payroll_enablement_blockers = auto_payroll_enablement_blockers
end

Instance Method Details

#==(other) ⇒ Object



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/gusto_embedded/models/shared/pay_schedule_show.rb', line 82

def ==(other)
  return false unless other.is_a? self.class
  return false unless @uuid == other.uuid
  return false unless @version == other.version
  return false unless @frequency == other.frequency
  return false unless @anchor_pay_date == other.anchor_pay_date
  return false unless @anchor_end_of_pay_period == other.anchor_end_of_pay_period
  return false unless @custom_name == other.custom_name
  return false unless @auto_pilot == other.auto_pilot
  return false unless @auto_payroll == other.auto_payroll
  return false unless @active == other.active
  return false unless @day_1 == other.day_1
  return false unless @day_2 == other.day_2
  return false unless @name == other.name
  return false unless @auto_payroll_enablement_blockers == other.auto_payroll_enablement_blockers
  true
end