Class: Gusto::HolidayPayPolicyFederalHolidaysItem
- Inherits:
-
Object
- Object
- Gusto::HolidayPayPolicyFederalHolidaysItem
- Defined in:
- lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #columbus_day ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemColumbusDay readonly
- #independence_day ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemIndependenceDay readonly
- #juneteenth ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemJuneteenth readonly
- #labor_day ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemLaborDay readonly
- #memorial_day ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemMemorialDay readonly
- #mlk_day ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemMlkDay readonly
- #new_years_day ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemNewYearsDay readonly
- #presidents_day ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemPresidentsDay readonly
- #thanksgiving ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemThanksgiving readonly
- #veterans_day ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemVeteransDay readonly
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(new_years_day: OMIT, mlk_day: OMIT, presidents_day: OMIT, memorial_day: OMIT, juneteenth: OMIT, independence_day: OMIT, labor_day: OMIT, columbus_day: OMIT, veterans_day: OMIT, thanksgiving: OMIT, additional_properties: nil) ⇒ Gusto::HolidayPayPolicyFederalHolidaysItem constructor
- #to_json ⇒ String
Constructor Details
#initialize(new_years_day: OMIT, mlk_day: OMIT, presidents_day: OMIT, memorial_day: OMIT, juneteenth: OMIT, independence_day: OMIT, labor_day: OMIT, columbus_day: OMIT, veterans_day: OMIT, thanksgiving: OMIT, additional_properties: nil) ⇒ Gusto::HolidayPayPolicyFederalHolidaysItem
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item.rb', line 57 def initialize(new_years_day: OMIT, mlk_day: OMIT, presidents_day: OMIT, memorial_day: OMIT, juneteenth: OMIT, independence_day: OMIT, labor_day: OMIT, columbus_day: OMIT, veterans_day: OMIT, thanksgiving: OMIT, additional_properties: nil) @new_years_day = new_years_day if new_years_day != OMIT @mlk_day = mlk_day if mlk_day != OMIT @presidents_day = presidents_day if presidents_day != OMIT @memorial_day = memorial_day if memorial_day != OMIT @juneteenth = juneteenth if juneteenth != OMIT @independence_day = independence_day if independence_day != OMIT @labor_day = labor_day if labor_day != OMIT @columbus_day = columbus_day if columbus_day != OMIT @veterans_day = veterans_day if veterans_day != OMIT @thanksgiving = thanksgiving if thanksgiving != OMIT @additional_properties = additional_properties @_field_set = { "new_years_day": new_years_day, "mlk_day": mlk_day, "presidents_day": presidents_day, "memorial_day": memorial_day, "juneteenth": juneteenth, "independence_day": independence_day, "labor_day": labor_day, "columbus_day": columbus_day, "veterans_day": veterans_day, "thanksgiving": thanksgiving }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
38 39 40 |
# File 'lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item.rb', line 38 def additional_properties @additional_properties end |
#columbus_day ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemColumbusDay (readonly)
32 33 34 |
# File 'lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item.rb', line 32 def columbus_day @columbus_day end |
#independence_day ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemIndependenceDay (readonly)
28 29 30 |
# File 'lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item.rb', line 28 def independence_day @independence_day end |
#juneteenth ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemJuneteenth (readonly)
26 27 28 |
# File 'lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item.rb', line 26 def juneteenth @juneteenth end |
#labor_day ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemLaborDay (readonly)
30 31 32 |
# File 'lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item.rb', line 30 def labor_day @labor_day end |
#memorial_day ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemMemorialDay (readonly)
24 25 26 |
# File 'lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item.rb', line 24 def memorial_day @memorial_day end |
#mlk_day ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemMlkDay (readonly)
20 21 22 |
# File 'lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item.rb', line 20 def mlk_day @mlk_day end |
#new_years_day ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemNewYearsDay (readonly)
18 19 20 |
# File 'lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item.rb', line 18 def new_years_day @new_years_day end |
#presidents_day ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemPresidentsDay (readonly)
22 23 24 |
# File 'lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item.rb', line 22 def presidents_day @presidents_day end |
#thanksgiving ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemThanksgiving (readonly)
36 37 38 |
# File 'lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item.rb', line 36 def thanksgiving @thanksgiving end |
#veterans_day ⇒ Gusto::HolidayPayPolicyFederalHolidaysItemVeteransDay (readonly)
34 35 36 |
# File 'lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item.rb', line 34 def veterans_day @veterans_day end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::HolidayPayPolicyFederalHolidaysItem
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item.rb', line 77 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) unless parsed_json["new_years_day"].nil? new_years_day = parsed_json["new_years_day"].to_json new_years_day = Gusto::HolidayPayPolicyFederalHolidaysItemNewYearsDay.from_json(json_object: new_years_day) else new_years_day = nil end unless parsed_json["mlk_day"].nil? mlk_day = parsed_json["mlk_day"].to_json mlk_day = Gusto::HolidayPayPolicyFederalHolidaysItemMlkDay.from_json(json_object: mlk_day) else mlk_day = nil end unless parsed_json["presidents_day"].nil? presidents_day = parsed_json["presidents_day"].to_json presidents_day = Gusto::HolidayPayPolicyFederalHolidaysItemPresidentsDay.from_json(json_object: presidents_day) else presidents_day = nil end unless parsed_json["memorial_day"].nil? memorial_day = parsed_json["memorial_day"].to_json memorial_day = Gusto::HolidayPayPolicyFederalHolidaysItemMemorialDay.from_json(json_object: memorial_day) else memorial_day = nil end unless parsed_json["juneteenth"].nil? juneteenth = parsed_json["juneteenth"].to_json juneteenth = Gusto::HolidayPayPolicyFederalHolidaysItemJuneteenth.from_json(json_object: juneteenth) else juneteenth = nil end unless parsed_json["independence_day"].nil? independence_day = parsed_json["independence_day"].to_json independence_day = Gusto::HolidayPayPolicyFederalHolidaysItemIndependenceDay.from_json(json_object: independence_day) else independence_day = nil end unless parsed_json["labor_day"].nil? labor_day = parsed_json["labor_day"].to_json labor_day = Gusto::HolidayPayPolicyFederalHolidaysItemLaborDay.from_json(json_object: labor_day) else labor_day = nil end unless parsed_json["columbus_day"].nil? columbus_day = parsed_json["columbus_day"].to_json columbus_day = Gusto::HolidayPayPolicyFederalHolidaysItemColumbusDay.from_json(json_object: columbus_day) else columbus_day = nil end unless parsed_json["veterans_day"].nil? veterans_day = parsed_json["veterans_day"].to_json veterans_day = Gusto::HolidayPayPolicyFederalHolidaysItemVeteransDay.from_json(json_object: veterans_day) else veterans_day = nil end unless parsed_json["thanksgiving"].nil? thanksgiving = parsed_json["thanksgiving"].to_json thanksgiving = Gusto::HolidayPayPolicyFederalHolidaysItemThanksgiving.from_json(json_object: thanksgiving) else thanksgiving = nil end new( new_years_day: new_years_day, mlk_day: mlk_day, presidents_day: presidents_day, memorial_day: memorial_day, juneteenth: juneteenth, independence_day: independence_day, labor_day: labor_day, columbus_day: columbus_day, veterans_day: veterans_day, thanksgiving: thanksgiving, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item.rb', line 166 def self.validate_raw(obj:) obj.new_years_day.nil? || Gusto::HolidayPayPolicyFederalHolidaysItemNewYearsDay.validate_raw(obj: obj.new_years_day) obj.mlk_day.nil? || Gusto::HolidayPayPolicyFederalHolidaysItemMlkDay.validate_raw(obj: obj.mlk_day) obj.presidents_day.nil? || Gusto::HolidayPayPolicyFederalHolidaysItemPresidentsDay.validate_raw(obj: obj.presidents_day) obj.memorial_day.nil? || Gusto::HolidayPayPolicyFederalHolidaysItemMemorialDay.validate_raw(obj: obj.memorial_day) obj.juneteenth.nil? || Gusto::HolidayPayPolicyFederalHolidaysItemJuneteenth.validate_raw(obj: obj.juneteenth) obj.independence_day.nil? || Gusto::HolidayPayPolicyFederalHolidaysItemIndependenceDay.validate_raw(obj: obj.independence_day) obj.labor_day.nil? || Gusto::HolidayPayPolicyFederalHolidaysItemLaborDay.validate_raw(obj: obj.labor_day) obj.columbus_day.nil? || Gusto::HolidayPayPolicyFederalHolidaysItemColumbusDay.validate_raw(obj: obj.columbus_day) obj.veterans_day.nil? || Gusto::HolidayPayPolicyFederalHolidaysItemVeteransDay.validate_raw(obj: obj.veterans_day) obj.thanksgiving.nil? || Gusto::HolidayPayPolicyFederalHolidaysItemThanksgiving.validate_raw(obj: obj.thanksgiving) end |
Instance Method Details
#to_json ⇒ String
157 158 159 |
# File 'lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item.rb', line 157 def to_json @_field_set&.to_json end |