Class: Gusto::PayrollPayrollStatusMetaType
- Inherits:
-
Object
- Object
- Gusto::PayrollPayrollStatusMetaType
- 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
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#cancellable ⇒ Boolean
readonly
True if the payroll may be cancelled.
-
#expected_check_date ⇒ String
readonly
The date an employee will be paid if the payroll is submitted now.
-
#expected_debit_time ⇒ String
readonly
The time the employer’s account will be debited if the payroll is submitted now.
-
#initial_check_date ⇒ String
readonly
The normal check date for the associated pay period.
-
#initial_debit_cutoff_time ⇒ String
readonly
Payroll must be submitted at or before this time to avoid late payroll.
-
#payroll_late ⇒ Boolean
readonly
Expected_check_date > initial_check_date.
Class Method Summary collapse
Instance Method Summary collapse
- #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 constructor
- #to_json ⇒ String
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
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_properties ⇒ OpenStruct (readonly)
Returns 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 |
#cancellable ⇒ Boolean (readonly)
Returns 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_date ⇒ String (readonly)
Returns 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_time ⇒ String (readonly)
Returns 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_date ⇒ String (readonly)
Returns 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_time ⇒ String (readonly)
Returns 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_late ⇒ Boolean (readonly)
Returns 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
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
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_json ⇒ 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 |