Class: Gusto::PayrollEmployeeCompensationsTypeItemHourlyCompensationsItem
- Inherits:
-
Object
- Object
- Gusto::PayrollEmployeeCompensationsTypeItemHourlyCompensationsItem
- Defined in:
- lib/fern_gusto/types/payroll_employee_compensations_type_item_hourly_compensations_item.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#amount ⇒ Object
readonly
is calculated and cannot be used for updating hourly compensations.
-
#compensation_multiplier ⇒ Object
readonly
worked.
-
#hours ⇒ String
readonly
The number of hours to be compensated for this pay period.
-
#job_uuid ⇒ String
readonly
The UUID of the job for the compensation.
-
#name ⇒ Object
readonly
identifier for this compensation.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::PayrollEmployeeCompensationsTypeItemHourlyCompensationsItem
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(name: OMIT, hours: OMIT, amount: OMIT, job_uuid: OMIT, compensation_multiplier: OMIT, additional_properties: nil) ⇒ Gusto::PayrollEmployeeCompensationsTypeItemHourlyCompensationsItem constructor
- #to_json ⇒ String
Constructor Details
#initialize(name: OMIT, hours: OMIT, amount: OMIT, job_uuid: OMIT, compensation_multiplier: OMIT, additional_properties: nil) ⇒ Gusto::PayrollEmployeeCompensationsTypeItemHourlyCompensationsItem
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/fern_gusto/types/payroll_employee_compensations_type_item_hourly_compensations_item.rb', line 38 def initialize(name: OMIT, hours: OMIT, amount: OMIT, job_uuid: OMIT, compensation_multiplier: OMIT, additional_properties: nil) @name = name if name != OMIT @hours = hours if hours != OMIT @amount = amount if amount != OMIT @job_uuid = job_uuid if job_uuid != OMIT @compensation_multiplier = compensation_multiplier if compensation_multiplier != OMIT @additional_properties = additional_properties @_field_set = { "name": name, "hours": hours, "amount": amount, "job_uuid": job_uuid, "compensation_multiplier": compensation_multiplier }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
21 22 23 |
# File 'lib/fern_gusto/types/payroll_employee_compensations_type_item_hourly_compensations_item.rb', line 21 def additional_properties @additional_properties end |
#amount ⇒ Object (readonly)
is calculated and cannot be used for updating hourly compensations.
14 15 16 |
# File 'lib/fern_gusto/types/payroll_employee_compensations_type_item_hourly_compensations_item.rb', line 14 def amount @amount end |
#compensation_multiplier ⇒ Object (readonly)
worked.
19 20 21 |
# File 'lib/fern_gusto/types/payroll_employee_compensations_type_item_hourly_compensations_item.rb', line 19 def compensation_multiplier @compensation_multiplier end |
#hours ⇒ String (readonly)
Returns The number of hours to be compensated for this pay period.
11 12 13 |
# File 'lib/fern_gusto/types/payroll_employee_compensations_type_item_hourly_compensations_item.rb', line 11 def hours @hours end |
#job_uuid ⇒ String (readonly)
Returns The UUID of the job for the compensation.
16 17 18 |
# File 'lib/fern_gusto/types/payroll_employee_compensations_type_item_hourly_compensations_item.rb', line 16 def job_uuid @job_uuid end |
#name ⇒ Object (readonly)
identifier for this compensation.
9 10 11 |
# File 'lib/fern_gusto/types/payroll_employee_compensations_type_item_hourly_compensations_item.rb', line 9 def name @name end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::PayrollEmployeeCompensationsTypeItemHourlyCompensationsItem
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/fern_gusto/types/payroll_employee_compensations_type_item_hourly_compensations_item.rb', line 54 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"] amount = parsed_json["amount"] job_uuid = parsed_json["job_uuid"] compensation_multiplier = parsed_json["compensation_multiplier"] new( name: name, hours: hours, amount: amount, job_uuid: job_uuid, compensation_multiplier: compensation_multiplier, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
84 85 86 87 88 89 90 |
# File 'lib/fern_gusto/types/payroll_employee_compensations_type_item_hourly_compensations_item.rb', line 84 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.amount&.is_a?(String) != false || raise("Passed value for field obj.amount 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.") obj.compensation_multiplier&.is_a?(Float) != false || raise("Passed value for field obj.compensation_multiplier is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
75 76 77 |
# File 'lib/fern_gusto/types/payroll_employee_compensations_type_item_hourly_compensations_item.rb', line 75 def to_json @_field_set&.to_json end |