Class: Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemPaidTimeOffItem
- Inherits:
-
Object
- Object
- Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemPaidTimeOffItem
- Defined in:
- lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_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.
-
#policy_uuid ⇒ String
readonly
The uuid of the PTO policy.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemPaidTimeOffItem
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(name: OMIT, hours: OMIT, policy_uuid: OMIT, final_payout_unused_hours_input: OMIT, additional_properties: nil) ⇒ Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemPaidTimeOffItem constructor
- #to_json ⇒ String
Constructor Details
#initialize(name: OMIT, hours: OMIT, policy_uuid: OMIT, final_payout_unused_hours_input: OMIT, additional_properties: nil) ⇒ Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemPaidTimeOffItem
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_paid_time_off_item.rb', line 34 def initialize(name: OMIT, hours: OMIT, policy_uuid: OMIT, final_payout_unused_hours_input: OMIT, additional_properties: nil) @name = name if name != OMIT @hours = hours if hours != OMIT @policy_uuid = policy_uuid if policy_uuid != 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, "policy_uuid": policy_uuid, "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.
19 20 21 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_paid_time_off_item.rb', line 19 def additional_properties @additional_properties end |
#final_payout_unused_hours_input ⇒ Object (readonly)
termination payrolls.
17 18 19 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_paid_time_off_item.rb', line 17 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.
12 13 14 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_paid_time_off_item.rb', line 12 def hours @hours end |
#name ⇒ Object (readonly)
the PTO. Must pass in name or policy_uuid but not both.
10 11 12 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_paid_time_off_item.rb', line 10 def name @name end |
#policy_uuid ⇒ String (readonly)
Returns The uuid of the PTO policy. Must pass in name or policy_uuid but not both.
14 15 16 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_paid_time_off_item.rb', line 14 def policy_uuid @policy_uuid end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemPaidTimeOffItem
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_paid_time_off_item.rb', line 49 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"] policy_uuid = parsed_json["policy_uuid"] final_payout_unused_hours_input = parsed_json["final_payout_unused_hours_input"] new( name: name, hours: hours, policy_uuid: policy_uuid, final_payout_unused_hours_input: final_payout_unused_hours_input, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
77 78 79 80 81 82 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_paid_time_off_item.rb', line 77 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.policy_uuid&.is_a?(String) != false || raise("Passed value for field obj.policy_uuid 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
68 69 70 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_paid_time_off_item.rb', line 68 def to_json @_field_set&.to_json end |