Class: Gusto::PayrollPaymentSpeedChangedType

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

Overview

ach.

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(original_check_date: OMIT, current_check_date: OMIT, original_debit_date: OMIT, current_debit_date: OMIT, reason: OMIT, additional_properties: nil) ⇒ Gusto::PayrollPaymentSpeedChangedType

Parameters:

  • original_check_date (String) (defaults to: OMIT)

    Original check date when fast ach applies.

  • current_check_date (String) (defaults to: OMIT)

    Current check date.

  • original_debit_date (String) (defaults to: OMIT)

    Original debit date when fast ach applies.

  • current_debit_date (String) (defaults to: OMIT)

    Current debit date.

  • reason (String) (defaults to: OMIT)

    The reason why the payroll is moved to four day.

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



34
35
36
37
38
39
40
41
42
43
44
# File 'lib/fern_gusto/types/payroll_payment_speed_changed_type.rb', line 34

def initialize(original_check_date: OMIT, current_check_date: OMIT, original_debit_date: OMIT, current_debit_date: OMIT, reason: OMIT, additional_properties: nil)
  @original_check_date = original_check_date if original_check_date != OMIT
  @current_check_date = current_check_date if current_check_date != OMIT
  @original_debit_date = original_debit_date if original_debit_date != OMIT
  @current_debit_date = current_debit_date if current_debit_date != OMIT
  @reason = reason if reason != OMIT
  @additional_properties = additional_properties
  @_field_set = { "original_check_date": original_check_date, "current_check_date": current_check_date, "original_debit_date": original_debit_date, "current_debit_date": current_debit_date, "reason": reason }.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/payroll_payment_speed_changed_type.rb', line 20

def additional_properties
  @additional_properties
end

#current_check_dateString (readonly)

Returns Current check date.

Returns:

  • (String)

    Current check date.



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

def current_check_date
  @current_check_date
end

#current_debit_dateString (readonly)

Returns Current debit date.

Returns:

  • (String)

    Current debit date.



16
17
18
# File 'lib/fern_gusto/types/payroll_payment_speed_changed_type.rb', line 16

def current_debit_date
  @current_debit_date
end

#original_check_dateString (readonly)

Returns Original check date when fast ach applies.

Returns:

  • (String)

    Original check date when fast ach applies.



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

def original_check_date
  @original_check_date
end

#original_debit_dateString (readonly)

Returns Original debit date when fast ach applies.

Returns:

  • (String)

    Original debit date when fast ach applies.



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

def original_debit_date
  @original_debit_date
end

#reasonString (readonly)

Returns The reason why the payroll is moved to four day.

Returns:

  • (String)

    The reason why the payroll is moved to four day.



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

def reason
  @reason
end

Class Method Details

.from_json(json_object:) ⇒ Gusto::PayrollPaymentSpeedChangedType

Parameters:

  • json_object (String)

Returns:



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/fern_gusto/types/payroll_payment_speed_changed_type.rb', line 49

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  original_check_date = parsed_json["original_check_date"]
  current_check_date = parsed_json["current_check_date"]
  original_debit_date = parsed_json["original_debit_date"]
  current_debit_date = parsed_json["current_debit_date"]
  reason = parsed_json["reason"]
  new(
    original_check_date: original_check_date,
    current_check_date: current_check_date,
    original_debit_date: original_debit_date,
    current_debit_date: current_debit_date,
    reason: reason,
    additional_properties: struct
  )
end

.validate_raw(obj:) ⇒ Void

Parameters:

  • obj (Object)

Returns:

  • (Void)


78
79
80
81
82
83
84
# File 'lib/fern_gusto/types/payroll_payment_speed_changed_type.rb', line 78

def self.validate_raw(obj:)
  obj.original_check_date&.is_a?(String) != false || raise("Passed value for field obj.original_check_date is not the expected type, validation failed.")
  obj.current_check_date&.is_a?(String) != false || raise("Passed value for field obj.current_check_date is not the expected type, validation failed.")
  obj.original_debit_date&.is_a?(String) != false || raise("Passed value for field obj.original_debit_date is not the expected type, validation failed.")
  obj.current_debit_date&.is_a?(String) != false || raise("Passed value for field obj.current_debit_date is not the expected type, validation failed.")
  obj.reason&.is_a?(String) != false || raise("Passed value for field obj.reason is not the expected type, validation failed.")
end

Instance Method Details

#to_jsonString

Returns:

  • (String)


69
70
71
# File 'lib/fern_gusto/types/payroll_payment_speed_changed_type.rb', line 69

def to_json
  @_field_set&.to_json
end