Class: Gusto::PayrollPayrollStatusMetaType

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

Overview

Information about the payroll’s status and expected dates

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cancellable: OMIT, expected_check_date: OMIT, initial_check_date: OMIT, expected_debit_time: OMIT, payroll_late: OMIT, initial_debit_cutoff_time: OMIT, additional_properties: nil) ⇒ Gusto::PayrollPayrollStatusMetaType

Parameters:

  • cancellable (Boolean) (defaults to: OMIT)

    true if the payroll may be cancelled

  • expected_check_date (String) (defaults to: OMIT)

    The date an employee will be paid if the payroll is submitted now

  • initial_check_date (String) (defaults to: OMIT)

    The normal check date for the associated pay period

  • expected_debit_time (String) (defaults to: OMIT)

    The time the employer’s account will be debited if the payroll is submitted now

  • payroll_late (Boolean) (defaults to: OMIT)

    expected_check_date > initial_check_date

  • initial_debit_cutoff_time (String) (defaults to: OMIT)

    Payroll must be submitted at or before this time to avoid late payroll

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/fern_gusto/types/payroll_payroll_status_meta_type.rb', line 36

def initialize(cancellable: OMIT, expected_check_date: OMIT, initial_check_date: OMIT, expected_debit_time: OMIT, payroll_late: OMIT, initial_debit_cutoff_time: OMIT, additional_properties: nil)
  @cancellable = cancellable if cancellable != OMIT
  @expected_check_date = expected_check_date if expected_check_date != OMIT
  @initial_check_date = initial_check_date if initial_check_date != OMIT
  @expected_debit_time = expected_debit_time if expected_debit_time != OMIT
  @payroll_late = payroll_late if payroll_late != OMIT
  @initial_debit_cutoff_time = initial_debit_cutoff_time if initial_debit_cutoff_time != OMIT
  @additional_properties = additional_properties
  @_field_set = { "cancellable": cancellable, "expected_check_date": expected_check_date, "initial_check_date": initial_check_date, "expected_debit_time": expected_debit_time, "payroll_late": payroll_late, "initial_debit_cutoff_time": initial_debit_cutoff_time }.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



21
22
23
# File 'lib/fern_gusto/types/payroll_payroll_status_meta_type.rb', line 21

def additional_properties
  @additional_properties
end

#cancellableBoolean (readonly)

Returns true if the payroll may be cancelled.

Returns:

  • (Boolean)

    true if the payroll may be cancelled



9
10
11
# File 'lib/fern_gusto/types/payroll_payroll_status_meta_type.rb', line 9

def cancellable
  @cancellable
end

#expected_check_dateString (readonly)

Returns The date an employee will be paid if the payroll is submitted now.

Returns:

  • (String)

    The date an employee will be paid if the payroll is submitted now



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

def expected_check_date
  @expected_check_date
end

#expected_debit_timeString (readonly)

Returns The time the employer’s account will be debited if the payroll is submitted now.

Returns:

  • (String)

    The time the employer’s account will be debited if the payroll is submitted now



15
16
17
# File 'lib/fern_gusto/types/payroll_payroll_status_meta_type.rb', line 15

def expected_debit_time
  @expected_debit_time
end

#initial_check_dateString (readonly)

Returns The normal check date for the associated pay period.

Returns:

  • (String)

    The normal check date for the associated pay period



13
14
15
# File 'lib/fern_gusto/types/payroll_payroll_status_meta_type.rb', line 13

def initial_check_date
  @initial_check_date
end

#initial_debit_cutoff_timeString (readonly)

Returns Payroll must be submitted at or before this time to avoid late payroll.

Returns:

  • (String)

    Payroll must be submitted at or before this time to avoid late payroll



19
20
21
# File 'lib/fern_gusto/types/payroll_payroll_status_meta_type.rb', line 19

def initial_debit_cutoff_time
  @initial_debit_cutoff_time
end

#payroll_lateBoolean (readonly)

Returns expected_check_date > initial_check_date.

Returns:

  • (Boolean)

    expected_check_date > initial_check_date



17
18
19
# File 'lib/fern_gusto/types/payroll_payroll_status_meta_type.rb', line 17

def payroll_late
  @payroll_late
end

Class Method Details

.from_json(json_object:) ⇒ Gusto::PayrollPayrollStatusMetaType

Parameters:

  • json_object (String)

Returns:



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/fern_gusto/types/payroll_payroll_status_meta_type.rb', line 52

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  cancellable = parsed_json["cancellable"]
  expected_check_date = parsed_json["expected_check_date"]
  initial_check_date = parsed_json["initial_check_date"]
  expected_debit_time = parsed_json["expected_debit_time"]
  payroll_late = parsed_json["payroll_late"]
  initial_debit_cutoff_time = parsed_json["initial_debit_cutoff_time"]
  new(
    cancellable: cancellable,
    expected_check_date: expected_check_date,
    initial_check_date: initial_check_date,
    expected_debit_time: expected_debit_time,
    payroll_late: payroll_late,
    initial_debit_cutoff_time: initial_debit_cutoff_time,
    additional_properties: struct
  )
end

.validate_raw(obj:) ⇒ Void

Parameters:

  • obj (Object)

Returns:

  • (Void)


83
84
85
86
87
88
89
90
# File 'lib/fern_gusto/types/payroll_payroll_status_meta_type.rb', line 83

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

Instance Method Details

#to_jsonString

Returns:

  • (String)


74
75
76
# File 'lib/fern_gusto/types/payroll_payroll_status_meta_type.rb', line 74

def to_json
  @_field_set&.to_json
end