Class: Gusto::TaxRequirementsState
- Inherits:
-
Object
- Object
- Gusto::TaxRequirementsState
- Defined in:
- lib/fern_gusto/types/tax_requirements_state.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #company_uuid ⇒ String readonly
- #requirement_sets ⇒ Array<Gusto::TaxRequirementSet> readonly
- #state ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(company_uuid: OMIT, state: OMIT, requirement_sets: OMIT, additional_properties: nil) ⇒ Gusto::TaxRequirementsState constructor
- #to_json ⇒ String
Constructor Details
#initialize(company_uuid: OMIT, state: OMIT, requirement_sets: OMIT, additional_properties: nil) ⇒ Gusto::TaxRequirementsState
28 29 30 31 32 33 34 35 36 |
# File 'lib/fern_gusto/types/tax_requirements_state.rb', line 28 def initialize(company_uuid: OMIT, state: OMIT, requirement_sets: OMIT, additional_properties: nil) @company_uuid = company_uuid if company_uuid != OMIT @state = state if state != OMIT @requirement_sets = requirement_sets if requirement_sets != OMIT @additional_properties = additional_properties @_field_set = { "company_uuid": company_uuid, "state": state, "requirement_sets": requirement_sets }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
16 17 18 |
# File 'lib/fern_gusto/types/tax_requirements_state.rb', line 16 def additional_properties @additional_properties end |
#company_uuid ⇒ String (readonly)
10 11 12 |
# File 'lib/fern_gusto/types/tax_requirements_state.rb', line 10 def company_uuid @company_uuid end |
#requirement_sets ⇒ Array<Gusto::TaxRequirementSet> (readonly)
14 15 16 |
# File 'lib/fern_gusto/types/tax_requirements_state.rb', line 14 def requirement_sets @requirement_sets end |
#state ⇒ String (readonly)
12 13 14 |
# File 'lib/fern_gusto/types/tax_requirements_state.rb', line 12 def state @state end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::TaxRequirementsState
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/fern_gusto/types/tax_requirements_state.rb', line 41 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) company_uuid = parsed_json["company_uuid"] state = parsed_json["state"] requirement_sets = parsed_json["requirement_sets"]&.map do | item | item = item.to_json Gusto::TaxRequirementSet.from_json(json_object: item) end new( company_uuid: company_uuid, state: state, requirement_sets: requirement_sets, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
69 70 71 72 73 |
# File 'lib/fern_gusto/types/tax_requirements_state.rb', line 69 def self.validate_raw(obj:) obj.company_uuid&.is_a?(String) != false || raise("Passed value for field obj.company_uuid is not the expected type, validation failed.") obj.state&.is_a?(String) != false || raise("Passed value for field obj.state is not the expected type, validation failed.") obj.requirement_sets&.is_a?(Array) != false || raise("Passed value for field obj.requirement_sets is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
60 61 62 |
# File 'lib/fern_gusto/types/tax_requirements_state.rb', line 60 def to_json @_field_set&.to_json end |