Class: Gusto::PayrollCreditBlockersTypeItemUnblockOptionsItem

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

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(unblock_type: OMIT, check_date: OMIT, metadata: OMIT, additional_properties: nil) ⇒ Gusto::PayrollCreditBlockersTypeItemUnblockOptionsItem

Parameters:

  • unblock_type (String) (defaults to: OMIT)

    The type of unblock option for the credit blocker.

  • check_date (String) (defaults to: OMIT)

    The payment check date associated with the unblock option.

  • metadata (Hash{String => Object}) (defaults to: OMIT)

    Additional data associated with the unblock option.

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



26
27
28
29
30
31
32
33
34
# File 'lib/fern_gusto/types/payroll_credit_blockers_type_item_unblock_options_item.rb', line 26

def initialize(unblock_type: OMIT, check_date: OMIT, metadata: OMIT, additional_properties: nil)
  @unblock_type = unblock_type if unblock_type != OMIT
  @check_date = check_date if check_date != OMIT
  @metadata =  if  != OMIT
  @additional_properties = additional_properties
  @_field_set = { "unblock_type": unblock_type, "check_date": check_date, "metadata":  }.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



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

def additional_properties
  @additional_properties
end

#check_dateString (readonly)

Returns The payment check date associated with the unblock option.

Returns:

  • (String)

    The payment check date associated with the unblock option.



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

def check_date
  @check_date
end

#metadataHash{String => Object} (readonly)

Returns Additional data associated with the unblock option.

Returns:

  • (Hash{String => Object})

    Additional data associated with the unblock option.



12
13
14
# File 'lib/fern_gusto/types/payroll_credit_blockers_type_item_unblock_options_item.rb', line 12

def 
  @metadata
end

#unblock_typeString (readonly)

Returns The type of unblock option for the credit blocker.

Returns:

  • (String)

    The type of unblock option for the credit blocker.



8
9
10
# File 'lib/fern_gusto/types/payroll_credit_blockers_type_item_unblock_options_item.rb', line 8

def unblock_type
  @unblock_type
end

Class Method Details

.from_json(json_object:) ⇒ Gusto::PayrollCreditBlockersTypeItemUnblockOptionsItem

Parameters:

  • json_object (String)

Returns:



40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/fern_gusto/types/payroll_credit_blockers_type_item_unblock_options_item.rb', line 40

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

.validate_raw(obj:) ⇒ Void

Parameters:

  • obj (Object)

Returns:

  • (Void)


66
67
68
69
70
# File 'lib/fern_gusto/types/payroll_credit_blockers_type_item_unblock_options_item.rb', line 66

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

Instance Method Details

#to_jsonString

Returns:

  • (String)


57
58
59
# File 'lib/fern_gusto/types/payroll_credit_blockers_type_item_unblock_options_item.rb', line 57

def to_json
  @_field_set&.to_json
end