Class: GustoEmbedded::Models::Shared::PaidHoliday

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

Overview

A paid holiday derived from the company’s holiday pay policy

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(holiday_name: nil, start_date: nil, end_date: nil, holiday_key: nil) ⇒ PaidHoliday

Returns a new instance of PaidHoliday.



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

def initialize(holiday_name: nil, start_date: nil, end_date: nil, holiday_key: nil)
  @holiday_name = holiday_name
  @start_date = start_date
  @end_date = end_date
  @holiday_key = holiday_key
end

Instance Method Details

#==(other) ⇒ Object



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

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