Class: Gusto::EmployeeTaxSetup::EmployeeFederalTax
- Inherits:
-
Object
- Object
- Gusto::EmployeeTaxSetup::EmployeeFederalTax
- Defined in:
- lib/fern_gusto/employee_tax_setup/types/employee_federal_tax.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#additional_withholding ⇒ Boolean
readonly
_does not apply to rev_2020_w4 form_.
- #deductions ⇒ String readonly
-
#dependents_amount ⇒ Object
readonly
taxpayer to claim a dependency exemption.
-
#extra_withholding ⇒ String
readonly
An employee can request an additional amount to be withheld from each paycheck.
-
#federal_withholding_allowance ⇒ Object
readonly
An exemption from paying a certain amount of income tax.
-
#filing_status ⇒ Object
readonly
-
Married, but withhold as Single (does not apply to rev_2020_w4 form).
-
-
#other_income ⇒ String
readonly
Other income amount.
-
#two_jobs ⇒ Object
readonly
have two), you can set it to true.
-
#version ⇒ Object
readonly
on how to use this field.
-
#w4data_type ⇒ Gusto::EmployeeTaxSetup::EmployeeFederalTaxW4DataType
readonly
The version of w4 form.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(version: OMIT, filing_status: OMIT, extra_withholding: OMIT, two_jobs: OMIT, dependents_amount: OMIT, other_income: OMIT, deductions: OMIT, w4data_type: OMIT, federal_withholding_allowance: OMIT, additional_withholding: OMIT, additional_properties: nil) ⇒ Gusto::EmployeeTaxSetup::EmployeeFederalTax constructor
- #to_json ⇒ String
Constructor Details
#initialize(version: OMIT, filing_status: OMIT, extra_withholding: OMIT, two_jobs: OMIT, dependents_amount: OMIT, other_income: OMIT, deductions: OMIT, w4data_type: OMIT, federal_withholding_allowance: OMIT, additional_withholding: OMIT, additional_properties: nil) ⇒ Gusto::EmployeeTaxSetup::EmployeeFederalTax
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/fern_gusto/employee_tax_setup/types/employee_federal_tax.rb', line 71 def initialize(version: OMIT, filing_status: OMIT, extra_withholding: OMIT, two_jobs: OMIT, dependents_amount: OMIT, other_income: OMIT, deductions: OMIT, w4data_type: OMIT, federal_withholding_allowance: OMIT, additional_withholding: OMIT, additional_properties: nil) @version = version if version != OMIT @filing_status = filing_status if filing_status != OMIT @extra_withholding = extra_withholding if extra_withholding != OMIT @two_jobs = two_jobs if two_jobs != OMIT @dependents_amount = dependents_amount if dependents_amount != OMIT @other_income = other_income if other_income != OMIT @deductions = deductions if deductions != OMIT @w4data_type = w4data_type if w4data_type != OMIT @federal_withholding_allowance = federal_withholding_allowance if federal_withholding_allowance != OMIT @additional_withholding = additional_withholding if additional_withholding != OMIT @additional_properties = additional_properties @_field_set = { "version": version, "filing_status": filing_status, "extra_withholding": extra_withholding, "two_jobs": two_jobs, "dependents_amount": dependents_amount, "other_income": other_income, "deductions": deductions, "w4_data_type": w4data_type, "federal_withholding_allowance": federal_withholding_allowance, "additional_withholding": additional_withholding }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
41 42 43 |
# File 'lib/fern_gusto/employee_tax_setup/types/employee_federal_tax.rb', line 41 def additional_properties @additional_properties end |
#additional_withholding ⇒ Boolean (readonly)
Returns _does not apply to rev_2020_w4 form_.
39 40 41 |
# File 'lib/fern_gusto/employee_tax_setup/types/employee_federal_tax.rb', line 39 def additional_withholding @additional_withholding end |
#deductions ⇒ String (readonly)
32 33 34 |
# File 'lib/fern_gusto/employee_tax_setup/types/employee_federal_tax.rb', line 32 def deductions @deductions end |
#dependents_amount ⇒ Object (readonly)
taxpayer to claim a dependency exemption.
28 29 30 |
# File 'lib/fern_gusto/employee_tax_setup/types/employee_federal_tax.rb', line 28 def dependents_amount @dependents_amount end |
#extra_withholding ⇒ String (readonly)
Returns An employee can request an additional amount to be withheld from each paycheck.
22 23 24 |
# File 'lib/fern_gusto/employee_tax_setup/types/employee_federal_tax.rb', line 22 def extra_withholding @extra_withholding end |
#federal_withholding_allowance ⇒ Object (readonly)
An exemption from paying a certain amount of income tax.
37 38 39 |
# File 'lib/fern_gusto/employee_tax_setup/types/employee_federal_tax.rb', line 37 def federal_withholding_allowance @federal_withholding_allowance end |
#filing_status ⇒ Object (readonly)
-
Married, but withhold as Single (does not apply to rev_2020_w4 form)
20 21 22 |
# File 'lib/fern_gusto/employee_tax_setup/types/employee_federal_tax.rb', line 20 def filing_status @filing_status end |
#other_income ⇒ String (readonly)
Returns Other income amount.
30 31 32 |
# File 'lib/fern_gusto/employee_tax_setup/types/employee_federal_tax.rb', line 30 def other_income @other_income end |
#two_jobs ⇒ Object (readonly)
have two), you can set it to true.
25 26 27 |
# File 'lib/fern_gusto/employee_tax_setup/types/employee_federal_tax.rb', line 25 def two_jobs @two_jobs end |
#version ⇒ Object (readonly)
on how to use this field.
12 13 14 |
# File 'lib/fern_gusto/employee_tax_setup/types/employee_federal_tax.rb', line 12 def version @version end |
#w4data_type ⇒ Gusto::EmployeeTaxSetup::EmployeeFederalTaxW4DataType (readonly)
Returns The version of w4 form.
34 35 36 |
# File 'lib/fern_gusto/employee_tax_setup/types/employee_federal_tax.rb', line 34 def w4data_type @w4data_type end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::EmployeeTaxSetup::EmployeeFederalTax
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/fern_gusto/employee_tax_setup/types/employee_federal_tax.rb', line 91 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) version = parsed_json["version"] filing_status = parsed_json["filing_status"] extra_withholding = parsed_json["extra_withholding"] two_jobs = parsed_json["two_jobs"] dependents_amount = parsed_json["dependents_amount"] other_income = parsed_json["other_income"] deductions = parsed_json["deductions"] w4data_type = parsed_json["w4_data_type"] federal_withholding_allowance = parsed_json["federal_withholding_allowance"] additional_withholding = parsed_json["additional_withholding"] new( version: version, filing_status: filing_status, extra_withholding: extra_withholding, two_jobs: two_jobs, dependents_amount: dependents_amount, other_income: other_income, deductions: deductions, w4data_type: w4data_type, federal_withholding_allowance: federal_withholding_allowance, additional_withholding: additional_withholding, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/fern_gusto/employee_tax_setup/types/employee_federal_tax.rb', line 130 def self.validate_raw(obj:) obj.version&.is_a?(String) != false || raise("Passed value for field obj.version is not the expected type, validation failed.") obj.filing_status&.is_a?(String) != false || raise("Passed value for field obj.filing_status is not the expected type, validation failed.") obj.extra_withholding&.is_a?(String) != false || raise("Passed value for field obj.extra_withholding is not the expected type, validation failed.") obj.two_jobs&.is_a?(Boolean) != false || raise("Passed value for field obj.two_jobs is not the expected type, validation failed.") obj.dependents_amount&.is_a?(String) != false || raise("Passed value for field obj.dependents_amount is not the expected type, validation failed.") obj.other_income&.is_a?(String) != false || raise("Passed value for field obj.other_income is not the expected type, validation failed.") obj.deductions&.is_a?(String) != false || raise("Passed value for field obj.deductions is not the expected type, validation failed.") obj.w4data_type&.is_a?(Gusto::EmployeeTaxSetup::EmployeeFederalTaxW4DataType) != false || raise("Passed value for field obj.w4data_type is not the expected type, validation failed.") obj.federal_withholding_allowance&.is_a?(Float) != false || raise("Passed value for field obj.federal_withholding_allowance is not the expected type, validation failed.") obj.additional_withholding&.is_a?(Boolean) != false || raise("Passed value for field obj.additional_withholding is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
121 122 123 |
# File 'lib/fern_gusto/employee_tax_setup/types/employee_federal_tax.rb', line 121 def to_json @_field_set&.to_json end |