Class: Gusto::HistoricalEmployeeBodyEmployeeStateTaxes

Inherits:
Object
  • Object
show all
Defined in:
lib/fern_gusto/types/historical_employee_body_employee_state_taxes.rb

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(wc_covered: OMIT, wc_class_code: OMIT, additional_properties: nil) ⇒ Gusto::HistoricalEmployeeBodyEmployeeStateTaxes

Parameters:

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



38
39
40
41
42
43
44
45
# File 'lib/fern_gusto/types/historical_employee_body_employee_state_taxes.rb', line 38

def initialize(wc_covered: OMIT, wc_class_code: OMIT, additional_properties: nil)
  @wc_covered = wc_covered if wc_covered != OMIT
  @wc_class_code = wc_class_code if wc_class_code != OMIT
  @additional_properties = additional_properties
  @_field_set = { "wc_covered": wc_covered, "wc_class_code": wc_class_code }.reject do | _k, v |
  v == OMIT
end
end

Instance Attribute Details

#additional_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    Additional properties unmapped to the current class definition



20
21
22
# File 'lib/fern_gusto/types/historical_employee_body_employee_state_taxes.rb', line 20

def additional_properties
  @additional_properties
end

#wc_class_codeObject (readonly)

agency at (307) 235-3217.



18
19
20
# File 'lib/fern_gusto/types/historical_employee_body_employee_state_taxes.rb', line 18

def wc_class_code
  @wc_class_code
end

#wc_coveredObject (readonly)

Washington (WA) or Wyoming (WY).



10
11
12
# File 'lib/fern_gusto/types/historical_employee_body_employee_state_taxes.rb', line 10

def wc_covered
  @wc_covered
end

Class Method Details

.from_json(json_object:) ⇒ Gusto::HistoricalEmployeeBodyEmployeeStateTaxes

Parameters:

  • json_object (String)

Returns:



51
52
53
54
55
56
57
58
59
60
61
# File 'lib/fern_gusto/types/historical_employee_body_employee_state_taxes.rb', line 51

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  wc_covered = parsed_json["wc_covered"]
  wc_class_code = parsed_json["wc_class_code"]
  new(
    wc_covered: wc_covered,
    wc_class_code: wc_class_code,
    additional_properties: struct
  )
end

.validate_raw(obj:) ⇒ Void

Parameters:

  • obj (Object)

Returns:

  • (Void)


75
76
77
78
# File 'lib/fern_gusto/types/historical_employee_body_employee_state_taxes.rb', line 75

def self.validate_raw(obj:)
  obj.wc_covered&.is_a?(Boolean) != false || raise("Passed value for field obj.wc_covered is not the expected type, validation failed.")
  obj.wc_class_code&.is_a?(String) != false || raise("Passed value for field obj.wc_class_code is not the expected type, validation failed.")
end

Instance Method Details

#to_jsonString

Returns:

  • (String)


66
67
68
# File 'lib/fern_gusto/types/historical_employee_body_employee_state_taxes.rb', line 66

def to_json
  @_field_set&.to_json
end