Class: Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemHourlyCompensationsItem
- Inherits:
-
Object
- Object
- Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemHourlyCompensationsItem
- Defined in:
- lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_hourly_compensations_item.rb
Overview
regular, overtime, and double overtime hours.
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#hours ⇒ String
readonly
The number of hours to be compensated for this pay period.
-
#job_uuid ⇒ String
readonly
The UUIDs of the job for the compensation.
-
#name ⇒ Object
readonly
identifier for this compensation.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemHourlyCompensationsItem
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(name: OMIT, hours: OMIT, job_uuid: OMIT, additional_properties: nil) ⇒ Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemHourlyCompensationsItem constructor
- #to_json ⇒ String
Constructor Details
#initialize(name: OMIT, hours: OMIT, job_uuid: OMIT, additional_properties: nil) ⇒ Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemHourlyCompensationsItem
31 32 33 34 35 36 37 38 39 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_hourly_compensations_item.rb', line 31 def initialize(name: OMIT, hours: OMIT, job_uuid: OMIT, additional_properties: nil) @name = name if name != OMIT @hours = hours if hours != OMIT @job_uuid = job_uuid if job_uuid != OMIT @additional_properties = additional_properties @_field_set = { "name": name, "hours": hours, "job_uuid": job_uuid }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
18 19 20 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_hourly_compensations_item.rb', line 18 def additional_properties @additional_properties end |
#hours ⇒ String (readonly)
Returns The number of hours to be compensated for this pay period.
14 15 16 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_hourly_compensations_item.rb', line 14 def hours @hours end |
#job_uuid ⇒ String (readonly)
Returns The UUIDs of the job for the compensation.
16 17 18 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_hourly_compensations_item.rb', line 16 def job_uuid @job_uuid end |
#name ⇒ Object (readonly)
identifier for this compensation.
12 13 14 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_hourly_compensations_item.rb', line 12 def name @name end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemHourlyCompensationsItem
45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_hourly_compensations_item.rb', line 45 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"] job_uuid = parsed_json["job_uuid"] new( name: name, hours: hours, job_uuid: job_uuid, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
72 73 74 75 76 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_hourly_compensations_item.rb', line 72 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.job_uuid&.is_a?(String) != false || raise("Passed value for field obj.job_uuid is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
63 64 65 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_hourly_compensations_item.rb', line 63 def to_json @_field_set&.to_json end |