Class: Gusto::Employees::Employments::EmploymentsGetHistoryResponseItem
- Inherits:
-
Object
- Object
- Gusto::Employees::Employments::EmploymentsGetHistoryResponseItem
- Defined in:
- lib/fern_gusto/employees/employments/types/employments_get_history_response_item.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#employment_status ⇒ Object
readonly
employment_status to not_set.
-
#file_new_hire_report ⇒ Object
readonly
employee.
-
#hire_date ⇒ String
readonly
The employee’s start day of work for an employment.
-
#termination_date ⇒ String
readonly
The employee’s last day of work for an employment.
-
#two_percent_shareholder ⇒ Object
readonly
only applies to companies with an S-Corp entity type.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::Employees::Employments::EmploymentsGetHistoryResponseItem
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(hire_date: OMIT, termination_date: OMIT, file_new_hire_report: OMIT, two_percent_shareholder: OMIT, employment_status: OMIT, additional_properties: nil) ⇒ Gusto::Employees::Employments::EmploymentsGetHistoryResponseItem constructor
- #to_json ⇒ String
Constructor Details
#initialize(hire_date: OMIT, termination_date: OMIT, file_new_hire_report: OMIT, two_percent_shareholder: OMIT, employment_status: OMIT, additional_properties: nil) ⇒ Gusto::Employees::Employments::EmploymentsGetHistoryResponseItem
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/fern_gusto/employees/employments/types/employments_get_history_response_item.rb', line 41 def initialize(hire_date: OMIT, termination_date: OMIT, file_new_hire_report: OMIT, two_percent_shareholder: OMIT, employment_status: OMIT, additional_properties: nil) @hire_date = hire_date if hire_date != OMIT @termination_date = termination_date if termination_date != OMIT @file_new_hire_report = file_new_hire_report if file_new_hire_report != OMIT @two_percent_shareholder = two_percent_shareholder if two_percent_shareholder != OMIT @employment_status = employment_status if employment_status != OMIT @additional_properties = additional_properties @_field_set = { "hire_date": hire_date, "termination_date": termination_date, "file_new_hire_report": file_new_hire_report, "two_percent_shareholder": two_percent_shareholder, "employment_status": employment_status }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
24 25 26 |
# File 'lib/fern_gusto/employees/employments/types/employments_get_history_response_item.rb', line 24 def additional_properties @additional_properties end |
#employment_status ⇒ Object (readonly)
employment_status to not_set.
22 23 24 |
# File 'lib/fern_gusto/employees/employments/types/employments_get_history_response_item.rb', line 22 def employment_status @employment_status end |
#file_new_hire_report ⇒ Object (readonly)
employee.
16 17 18 |
# File 'lib/fern_gusto/employees/employments/types/employments_get_history_response_item.rb', line 16 def file_new_hire_report @file_new_hire_report end |
#hire_date ⇒ String (readonly)
Returns The employee’s start day of work for an employment.
11 12 13 |
# File 'lib/fern_gusto/employees/employments/types/employments_get_history_response_item.rb', line 11 def hire_date @hire_date end |
#termination_date ⇒ String (readonly)
Returns The employee’s last day of work for an employment.
13 14 15 |
# File 'lib/fern_gusto/employees/employments/types/employments_get_history_response_item.rb', line 13 def termination_date @termination_date end |
#two_percent_shareholder ⇒ Object (readonly)
only applies to companies with an S-Corp entity type.
19 20 21 |
# File 'lib/fern_gusto/employees/employments/types/employments_get_history_response_item.rb', line 19 def two_percent_shareholder @two_percent_shareholder end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::Employees::Employments::EmploymentsGetHistoryResponseItem
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/fern_gusto/employees/employments/types/employments_get_history_response_item.rb', line 56 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) hire_date = parsed_json["hire_date"] termination_date = parsed_json["termination_date"] file_new_hire_report = parsed_json["file_new_hire_report"] two_percent_shareholder = parsed_json["two_percent_shareholder"] employment_status = parsed_json["employment_status"] new( hire_date: hire_date, termination_date: termination_date, file_new_hire_report: file_new_hire_report, two_percent_shareholder: two_percent_shareholder, employment_status: employment_status, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
85 86 87 88 89 90 91 |
# File 'lib/fern_gusto/employees/employments/types/employments_get_history_response_item.rb', line 85 def self.validate_raw(obj:) obj.hire_date&.is_a?(String) != false || raise("Passed value for field obj.hire_date is not the expected type, validation failed.") obj.termination_date&.is_a?(String) != false || raise("Passed value for field obj.termination_date is not the expected type, validation failed.") obj.file_new_hire_report&.is_a?(Boolean) != false || raise("Passed value for field obj.file_new_hire_report is not the expected type, validation failed.") obj.two_percent_shareholder&.is_a?(Boolean) != false || raise("Passed value for field obj.two_percent_shareholder is not the expected type, validation failed.") obj.employment_status&.is_a?(Gusto::Employees::Employments::EmploymentsGetHistoryResponseItemEmploymentStatus) != false || raise("Passed value for field obj.employment_status is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
76 77 78 |
# File 'lib/fern_gusto/employees/employments/types/employments_get_history_response_item.rb', line 76 def to_json @_field_set&.to_json end |