Class: Gusto::ExternalPayrolls::ExternalPayrollTaxSuggestions
- Inherits:
-
Object
- Object
- Gusto::ExternalPayrolls::ExternalPayrollTaxSuggestions
- Defined in:
- lib/fern_gusto/external_payrolls/types/external_payroll_tax_suggestions.rb
Overview
The representation of an external payroll with minimal information.
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.
-
#tax_suggestions ⇒ Gusto::ExternalPayrolls::ExternalPayrollTaxSuggestionsTaxSuggestions
readonly
Possible tax liabilities selections.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::ExternalPayrolls::ExternalPayrollTaxSuggestions
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(employee_uuid: OMIT, tax_suggestions: OMIT, additional_properties: nil) ⇒ Gusto::ExternalPayrolls::ExternalPayrollTaxSuggestions constructor
- #to_json ⇒ String
Constructor Details
#initialize(employee_uuid: OMIT, tax_suggestions: OMIT, additional_properties: nil) ⇒ Gusto::ExternalPayrolls::ExternalPayrollTaxSuggestions
26 27 28 29 30 31 32 33 |
# File 'lib/fern_gusto/external_payrolls/types/external_payroll_tax_suggestions.rb', line 26 def initialize(employee_uuid: OMIT, tax_suggestions: OMIT, additional_properties: nil) @employee_uuid = employee_uuid if employee_uuid != OMIT @tax_suggestions = tax_suggestions if tax_suggestions != OMIT @additional_properties = additional_properties @_field_set = { "employee_uuid": employee_uuid, "tax_suggestions": tax_suggestions }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
15 16 17 |
# File 'lib/fern_gusto/external_payrolls/types/external_payroll_tax_suggestions.rb', line 15 def additional_properties @additional_properties end |
#employee_uuid ⇒ String (readonly)
Returns The UUID of the employee.
11 12 13 |
# File 'lib/fern_gusto/external_payrolls/types/external_payroll_tax_suggestions.rb', line 11 def employee_uuid @employee_uuid end |
#tax_suggestions ⇒ Gusto::ExternalPayrolls::ExternalPayrollTaxSuggestionsTaxSuggestions (readonly)
Returns Possible tax liabilities selections.
13 14 15 |
# File 'lib/fern_gusto/external_payrolls/types/external_payroll_tax_suggestions.rb', line 13 def tax_suggestions @tax_suggestions end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::ExternalPayrolls::ExternalPayrollTaxSuggestions
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/fern_gusto/external_payrolls/types/external_payroll_tax_suggestions.rb', line 38 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"] unless parsed_json["tax_suggestions"].nil? tax_suggestions = parsed_json["tax_suggestions"].to_json tax_suggestions = Gusto::ExternalPayrolls::ExternalPayrollTaxSuggestionsTaxSuggestions.from_json(json_object: tax_suggestions) else tax_suggestions = nil end new( employee_uuid: employee_uuid, tax_suggestions: tax_suggestions, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
66 67 68 69 |
# File 'lib/fern_gusto/external_payrolls/types/external_payroll_tax_suggestions.rb', line 66 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.tax_suggestions.nil? || Gusto::ExternalPayrolls::ExternalPayrollTaxSuggestionsTaxSuggestions.validate_raw(obj: obj.tax_suggestions) end |
Instance Method Details
#to_json ⇒ String
57 58 59 |
# File 'lib/fern_gusto/external_payrolls/types/external_payroll_tax_suggestions.rb', line 57 def to_json @_field_set&.to_json end |