Class: Gusto::GarnishmentChildSupport

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

Overview

Additional child support order details

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(state: OMIT, payment_period: OMIT, fips_code: OMIT, case_number: OMIT, order_number: OMIT, remittance_number: OMIT, additional_properties: nil) ⇒ Gusto::GarnishmentChildSupport

Parameters:

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/fern_gusto/types/garnishment_child_support.rb', line 57

def initialize(state: OMIT, payment_period: OMIT, fips_code: OMIT, case_number: OMIT, order_number: OMIT, remittance_number: OMIT, additional_properties: nil)
  @state = state if state != OMIT
  @payment_period = payment_period if payment_period != OMIT
  @fips_code = fips_code if fips_code != OMIT
  @case_number = case_number if case_number != OMIT
  @order_number = order_number if order_number != OMIT
  @remittance_number = remittance_number if remittance_number != OMIT
  @additional_properties = additional_properties
  @_field_set = { "state": state, "payment_period": payment_period, "fips_code": fips_code, "case_number": case_number, "order_number": order_number, "remittance_number": remittance_number }.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



32
33
34
# File 'lib/fern_gusto/types/garnishment_child_support.rb', line 32

def additional_properties
  @additional_properties
end

#case_numberObject (readonly)

available in the ‘GET /v1/garnishments/child_support` API.



22
23
24
# File 'lib/fern_gusto/types/garnishment_child_support.rb', line 22

def case_number
  @case_number
end

#fips_codeObject (readonly)

/v1/garnishments/child_support` API.



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

def fips_code
  @fips_code
end

#order_numberObject (readonly)

/v1/garnishments/child_support` API.



26
27
28
# File 'lib/fern_gusto/types/garnishment_child_support.rb', line 26

def order_number
  @order_number
end

#payment_periodObject (readonly)

‘Monthly`.



14
15
16
# File 'lib/fern_gusto/types/garnishment_child_support.rb', line 14

def payment_period
  @payment_period
end

#remittance_numberObject (readonly)

available in the ‘GET /v1/garnishments/child_support` API.



30
31
32
# File 'lib/fern_gusto/types/garnishment_child_support.rb', line 30

def remittance_number
  @remittance_number
end

#stateObject (readonly)

Agency data is available in the ‘GET /v1/garnishments/child_support` API.



11
12
13
# File 'lib/fern_gusto/types/garnishment_child_support.rb', line 11

def state
  @state
end

Class Method Details

.from_json(json_object:) ⇒ Gusto::GarnishmentChildSupport

Parameters:

  • json_object (String)

Returns:



73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/fern_gusto/types/garnishment_child_support.rb', line 73

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  state = parsed_json["state"]
  payment_period = parsed_json["payment_period"]
  fips_code = parsed_json["fips_code"]
  case_number = parsed_json["case_number"]
  order_number = parsed_json["order_number"]
  remittance_number = parsed_json["remittance_number"]
  new(
    state: state,
    payment_period: payment_period,
    fips_code: fips_code,
    case_number: case_number,
    order_number: order_number,
    remittance_number: remittance_number,
    additional_properties: struct
  )
end

.validate_raw(obj:) ⇒ Void

Parameters:

  • obj (Object)

Returns:

  • (Void)


104
105
106
107
108
109
110
111
# File 'lib/fern_gusto/types/garnishment_child_support.rb', line 104

def self.validate_raw(obj:)
  obj.state&.is_a?(String) != false || raise("Passed value for field obj.state is not the expected type, validation failed.")
  obj.payment_period&.is_a?(Gusto::GarnishmentChildSupportPaymentPeriod) != false || raise("Passed value for field obj.payment_period is not the expected type, validation failed.")
  obj.fips_code&.is_a?(String) != false || raise("Passed value for field obj.fips_code is not the expected type, validation failed.")
  obj.case_number&.is_a?(String) != false || raise("Passed value for field obj.case_number is not the expected type, validation failed.")
  obj.order_number&.is_a?(String) != false || raise("Passed value for field obj.order_number is not the expected type, validation failed.")
  obj.remittance_number&.is_a?(String) != false || raise("Passed value for field obj.remittance_number is not the expected type, validation failed.")
end

Instance Method Details

#to_jsonString

Returns:

  • (String)


95
96
97
# File 'lib/fern_gusto/types/garnishment_child_support.rb', line 95

def to_json
  @_field_set&.to_json
end