Class: Gusto::FederalTaxDetails::FederalTaxDetails
- Inherits:
-
Object
- Object
- Gusto::FederalTaxDetails::FederalTaxDetails
- Defined in:
- lib/fern_gusto/federal_tax_details/types/federal_tax_details.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#ein_verified ⇒ Boolean
readonly
Whether the EIN was able to be verified as a valid EIN with the IRS.
-
#filing_form ⇒ Object
readonly
-
944 (Annual federal tax return form).
-
-
#has_ein ⇒ Boolean
readonly
Whether company’s Employer Identification Number (EIN) is present.
-
#legal_name ⇒ String
readonly
The legal name of the company.
-
#tax_payer_type ⇒ Object
readonly
-
Non-Profit.
-
-
#taxable_as_scorp ⇒ Object
readonly
-
LLC.
-
-
#version ⇒ Object
readonly
on how to use this field.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(version: OMIT, tax_payer_type: OMIT, taxable_as_scorp: OMIT, filing_form: OMIT, has_ein: OMIT, ein_verified: OMIT, legal_name: OMIT, additional_properties: nil) ⇒ Gusto::FederalTaxDetails::FederalTaxDetails constructor
- #to_json ⇒ String
Constructor Details
#initialize(version: OMIT, tax_payer_type: OMIT, taxable_as_scorp: OMIT, filing_form: OMIT, has_ein: OMIT, ein_verified: OMIT, legal_name: OMIT, additional_properties: nil) ⇒ Gusto::FederalTaxDetails::FederalTaxDetails
79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/fern_gusto/federal_tax_details/types/federal_tax_details.rb', line 79 def initialize(version: OMIT, tax_payer_type: OMIT, taxable_as_scorp: OMIT, filing_form: OMIT, has_ein: OMIT, ein_verified: OMIT, legal_name: OMIT, additional_properties: nil) @version = version if version != OMIT @tax_payer_type = tax_payer_type if tax_payer_type != OMIT @taxable_as_scorp = taxable_as_scorp if taxable_as_scorp != OMIT @filing_form = filing_form if filing_form != OMIT @has_ein = has_ein if has_ein != OMIT @ein_verified = ein_verified if ein_verified != OMIT @legal_name = legal_name if legal_name != OMIT @additional_properties = additional_properties @_field_set = { "version": version, "tax_payer_type": tax_payer_type, "taxable_as_scorp": taxable_as_scorp, "filing_form": filing_form, "has_ein": has_ein, "ein_verified": ein_verified, "legal_name": legal_name }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
43 44 45 |
# File 'lib/fern_gusto/federal_tax_details/types/federal_tax_details.rb', line 43 def additional_properties @additional_properties end |
#ein_verified ⇒ Boolean (readonly)
Returns Whether the EIN was able to be verified as a valid EIN with the IRS.
39 40 41 |
# File 'lib/fern_gusto/federal_tax_details/types/federal_tax_details.rb', line 39 def ein_verified @ein_verified end |
#filing_form ⇒ Object (readonly)
-
944 (Annual federal tax return form)
35 36 37 |
# File 'lib/fern_gusto/federal_tax_details/types/federal_tax_details.rb', line 35 def filing_form @filing_form end |
#has_ein ⇒ Boolean (readonly)
Returns Whether company’s Employer Identification Number (EIN) is present.
37 38 39 |
# File 'lib/fern_gusto/federal_tax_details/types/federal_tax_details.rb', line 37 def has_ein @has_ein end |
#legal_name ⇒ String (readonly)
Returns The legal name of the company.
41 42 43 |
# File 'lib/fern_gusto/federal_tax_details/types/federal_tax_details.rb', line 41 def legal_name @legal_name end |
#tax_payer_type ⇒ Object (readonly)
-
Non-Profit
25 26 27 |
# File 'lib/fern_gusto/federal_tax_details/types/federal_tax_details.rb', line 25 def tax_payer_type @tax_payer_type end |
#taxable_as_scorp ⇒ Object (readonly)
-
LLC
31 32 33 |
# File 'lib/fern_gusto/federal_tax_details/types/federal_tax_details.rb', line 31 def taxable_as_scorp @taxable_as_scorp end |
#version ⇒ Object (readonly)
on how to use this field.
11 12 13 |
# File 'lib/fern_gusto/federal_tax_details/types/federal_tax_details.rb', line 11 def version @version end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::FederalTaxDetails::FederalTaxDetails
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/fern_gusto/federal_tax_details/types/federal_tax_details.rb', line 96 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) version = parsed_json["version"] tax_payer_type = parsed_json["tax_payer_type"] taxable_as_scorp = parsed_json["taxable_as_scorp"] filing_form = parsed_json["filing_form"] has_ein = parsed_json["has_ein"] ein_verified = parsed_json["ein_verified"] legal_name = parsed_json["legal_name"] new( version: version, tax_payer_type: tax_payer_type, taxable_as_scorp: taxable_as_scorp, filing_form: filing_form, has_ein: has_ein, ein_verified: ein_verified, legal_name: legal_name, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
129 130 131 132 133 134 135 136 137 |
# File 'lib/fern_gusto/federal_tax_details/types/federal_tax_details.rb', line 129 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.tax_payer_type&.is_a?(String) != false || raise("Passed value for field obj.tax_payer_type is not the expected type, validation failed.") obj.taxable_as_scorp&.is_a?(Boolean) != false || raise("Passed value for field obj.taxable_as_scorp is not the expected type, validation failed.") obj.filing_form&.is_a?(String) != false || raise("Passed value for field obj.filing_form is not the expected type, validation failed.") obj.has_ein&.is_a?(Boolean) != false || raise("Passed value for field obj.has_ein is not the expected type, validation failed.") obj.ein_verified&.is_a?(Boolean) != false || raise("Passed value for field obj.ein_verified is not the expected type, validation failed.") obj.legal_name&.is_a?(String) != false || raise("Passed value for field obj.legal_name is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
120 121 122 |
# File 'lib/fern_gusto/federal_tax_details/types/federal_tax_details.rb', line 120 def to_json @_field_set&.to_json end |