Class: Gusto::PayrollEmployeeCompensationsTypeItemPaidTimeOffItem
- Inherits:
-
Object
- Object
- Gusto::PayrollEmployeeCompensationsTypeItemPaidTimeOffItem
- Defined in:
- lib/fern_gusto/types/payroll_employee_compensations_type_item_paid_time_off_item.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#final_payout_unused_hours_input ⇒ Object
readonly
termination payrolls.
-
#hours ⇒ String
readonly
The hours of this PTO taken during the pay period.
-
#name ⇒ Object
readonly
the PTO.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::PayrollEmployeeCompensationsTypeItemPaidTimeOffItem
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(name: OMIT, hours: OMIT, final_payout_unused_hours_input: OMIT, additional_properties: nil) ⇒ Gusto::PayrollEmployeeCompensationsTypeItemPaidTimeOffItem constructor
- #to_json ⇒ String
Constructor Details
#initialize(name: OMIT, hours: OMIT, final_payout_unused_hours_input: OMIT, additional_properties: nil) ⇒ Gusto::PayrollEmployeeCompensationsTypeItemPaidTimeOffItem
30 31 32 33 34 35 36 37 38 |
# File 'lib/fern_gusto/types/payroll_employee_compensations_type_item_paid_time_off_item.rb', line 30 def initialize(name: OMIT, hours: OMIT, final_payout_unused_hours_input: OMIT, additional_properties: nil) @name = name if name != OMIT @hours = hours if hours != OMIT @final_payout_unused_hours_input = final_payout_unused_hours_input if final_payout_unused_hours_input != OMIT @additional_properties = additional_properties @_field_set = { "name": name, "hours": hours, "final_payout_unused_hours_input": final_payout_unused_hours_input }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
16 17 18 |
# File 'lib/fern_gusto/types/payroll_employee_compensations_type_item_paid_time_off_item.rb', line 16 def additional_properties @additional_properties end |
#final_payout_unused_hours_input ⇒ Object (readonly)
termination payrolls.
14 15 16 |
# File 'lib/fern_gusto/types/payroll_employee_compensations_type_item_paid_time_off_item.rb', line 14 def final_payout_unused_hours_input @final_payout_unused_hours_input end |
#hours ⇒ String (readonly)
Returns The hours of this PTO taken during the pay period.
11 12 13 |
# File 'lib/fern_gusto/types/payroll_employee_compensations_type_item_paid_time_off_item.rb', line 11 def hours @hours end |
#name ⇒ Object (readonly)
the PTO.
9 10 11 |
# File 'lib/fern_gusto/types/payroll_employee_compensations_type_item_paid_time_off_item.rb', line 9 def name @name end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::PayrollEmployeeCompensationsTypeItemPaidTimeOffItem
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/fern_gusto/types/payroll_employee_compensations_type_item_paid_time_off_item.rb', line 44 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) name = parsed_json["name"] hours = parsed_json["hours"] final_payout_unused_hours_input = parsed_json["final_payout_unused_hours_input"] new( name: name, hours: hours, final_payout_unused_hours_input: final_payout_unused_hours_input, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
70 71 72 73 74 |
# File 'lib/fern_gusto/types/payroll_employee_compensations_type_item_paid_time_off_item.rb', line 70 def self.validate_raw(obj:) obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.") obj.hours&.is_a?(String) != false || raise("Passed value for field obj.hours is not the expected type, validation failed.") obj.final_payout_unused_hours_input&.is_a?(String) != false || raise("Passed value for field obj.final_payout_unused_hours_input is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
61 62 63 |
# File 'lib/fern_gusto/types/payroll_employee_compensations_type_item_paid_time_off_item.rb', line 61 def to_json @_field_set&.to_json end |