Class: Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItem
- Inherits:
-
Object
- Object
- Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItem
- Defined in:
- lib/fern_gusto/payroll/types/payroll_update_request_employee_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.
-
#employee_uuid ⇒ String
readonly
The UUID of the employee.
-
#excluded ⇒ Object
readonly
the payroll.
- #fixed_compensations ⇒ Array<Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemFixedCompensationsItem> readonly
- #hourly_compensations ⇒ Array<Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemHourlyCompensationsItem> readonly
-
#memo ⇒ Object
readonly
paystub.
-
#paid_time_off ⇒ Object
readonly
paid time off object can be the name or the specific policy_uuid.
-
#payment_method ⇒ Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemPaymentMethod
readonly
The employee’s compensation payment method.
-
#version ⇒ Object
readonly
for information on how to use this field.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItem
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(employee_uuid: OMIT, version: OMIT, excluded: OMIT, payment_method: OMIT, memo: OMIT, fixed_compensations: OMIT, hourly_compensations: OMIT, paid_time_off: OMIT, additional_properties: nil) ⇒ Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItem constructor
- #to_json ⇒ String
Constructor Details
#initialize(employee_uuid: OMIT, version: OMIT, excluded: OMIT, payment_method: OMIT, memo: OMIT, fixed_compensations: OMIT, hourly_compensations: OMIT, paid_time_off: OMIT, additional_properties: nil) ⇒ Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItem
57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item.rb', line 57 def initialize(employee_uuid: OMIT, version: OMIT, excluded: OMIT, payment_method: OMIT, memo: OMIT, fixed_compensations: OMIT, hourly_compensations: OMIT, paid_time_off: OMIT, additional_properties: nil) @employee_uuid = employee_uuid if employee_uuid != OMIT @version = version if version != OMIT @excluded = excluded if excluded != OMIT @payment_method = payment_method if payment_method != OMIT @memo = memo if memo != OMIT @fixed_compensations = fixed_compensations if fixed_compensations != OMIT @hourly_compensations = hourly_compensations if hourly_compensations != OMIT @paid_time_off = paid_time_off if paid_time_off != OMIT @additional_properties = additional_properties @_field_set = { "employee_uuid": employee_uuid, "version": version, "excluded": excluded, "payment_method": payment_method, "memo": memo, "fixed_compensations": fixed_compensations, "hourly_compensations": hourly_compensations, "paid_time_off": paid_time_off }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
35 36 37 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item.rb', line 35 def additional_properties @additional_properties end |
#employee_uuid ⇒ String (readonly)
Returns The UUID of the employee.
14 15 16 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item.rb', line 14 def employee_uuid @employee_uuid end |
#excluded ⇒ Object (readonly)
the payroll.
21 22 23 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item.rb', line 21 def excluded @excluded end |
#fixed_compensations ⇒ Array<Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemFixedCompensationsItem> (readonly)
28 29 30 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item.rb', line 28 def fixed_compensations @fixed_compensations end |
#hourly_compensations ⇒ Array<Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemHourlyCompensationsItem> (readonly)
30 31 32 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item.rb', line 30 def hourly_compensations @hourly_compensations end |
#memo ⇒ Object (readonly)
paystub.
26 27 28 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item.rb', line 26 def memo @memo end |
#paid_time_off ⇒ Object (readonly)
paid time off object can be the name or the specific policy_uuid.
33 34 35 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item.rb', line 33 def paid_time_off @paid_time_off end |
#payment_method ⇒ Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemPaymentMethod (readonly)
Returns The employee’s compensation payment method. Invalid values will be ignored.
23 24 25 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item.rb', line 23 def payment_method @payment_method end |
#version ⇒ Object (readonly)
for information on how to use this field.
18 19 20 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item.rb', line 18 def version @version end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItem
76 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 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item.rb', line 76 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) employee_uuid = parsed_json["employee_uuid"] version = parsed_json["version"] excluded = parsed_json["excluded"] payment_method = parsed_json["payment_method"] memo = parsed_json["memo"] fixed_compensations = parsed_json["fixed_compensations"]&.map do | item | item = item.to_json Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemFixedCompensationsItem.from_json(json_object: item) end hourly_compensations = parsed_json["hourly_compensations"]&.map do | item | item = item.to_json Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemHourlyCompensationsItem.from_json(json_object: item) end paid_time_off = parsed_json["paid_time_off"]&.map do | item | item = item.to_json Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemPaidTimeOffItem.from_json(json_object: item) end new( employee_uuid: employee_uuid, version: version, excluded: excluded, payment_method: payment_method, memo: memo, fixed_compensations: fixed_compensations, hourly_compensations: hourly_compensations, paid_time_off: paid_time_off, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
121 122 123 124 125 126 127 128 129 130 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item.rb', line 121 def self.validate_raw(obj:) obj.employee_uuid&.is_a?(String) != false || raise("Passed value for field obj.employee_uuid is not the expected type, validation failed.") obj.version&.is_a?(String) != false || raise("Passed value for field obj.version is not the expected type, validation failed.") obj.excluded&.is_a?(Boolean) != false || raise("Passed value for field obj.excluded is not the expected type, validation failed.") obj.payment_method&.is_a?(Gusto::Payroll::PayrollUpdateRequestEmployeeCompensationsItemPaymentMethod) != false || raise("Passed value for field obj.payment_method is not the expected type, validation failed.") obj.memo&.is_a?(String) != false || raise("Passed value for field obj.memo is not the expected type, validation failed.") obj.fixed_compensations&.is_a?(Array) != false || raise("Passed value for field obj.fixed_compensations is not the expected type, validation failed.") obj.hourly_compensations&.is_a?(Array) != false || raise("Passed value for field obj.hourly_compensations is not the expected type, validation failed.") obj.paid_time_off&.is_a?(Array) != false || raise("Passed value for field obj.paid_time_off is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
112 113 114 |
# File 'lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item.rb', line 112 def to_json @_field_set&.to_json end |