Class: Gusto::Payroll::PaySchedules::PaySchedulesPreviewResponsePayPeriodsItem
- Inherits:
-
Object
- Object
- Gusto::Payroll::PaySchedules::PaySchedulesPreviewResponsePayPeriodsItem
- Defined in:
- lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_preview_response_pay_periods_item.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#check_date ⇒ String
readonly
The payment date, “Check date”, for the pay period.
-
#end_date ⇒ String
readonly
The last day of the pay period.
-
#run_payroll_by ⇒ String
readonly
The deadline to run payroll for direct deposit on the check date.
-
#start_date ⇒ String
readonly
The first day of the pay period.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::Payroll::PaySchedules::PaySchedulesPreviewResponsePayPeriodsItem
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(check_date: OMIT, run_payroll_by: OMIT, start_date: OMIT, end_date: OMIT, additional_properties: nil) ⇒ Gusto::Payroll::PaySchedules::PaySchedulesPreviewResponsePayPeriodsItem constructor
- #to_json ⇒ String
Constructor Details
#initialize(check_date: OMIT, run_payroll_by: OMIT, start_date: OMIT, end_date: OMIT, additional_properties: nil) ⇒ Gusto::Payroll::PaySchedules::PaySchedulesPreviewResponsePayPeriodsItem
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_preview_response_pay_periods_item.rb', line 31 def initialize(check_date: OMIT, run_payroll_by: OMIT, start_date: OMIT, end_date: OMIT, additional_properties: nil) @check_date = check_date if check_date != OMIT @run_payroll_by = run_payroll_by if run_payroll_by != OMIT @start_date = start_date if start_date != OMIT @end_date = end_date if end_date != OMIT @additional_properties = additional_properties @_field_set = { "check_date": check_date, "run_payroll_by": run_payroll_by, "start_date": start_date, "end_date": end_date }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
18 19 20 |
# File 'lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_preview_response_pay_periods_item.rb', line 18 def additional_properties @additional_properties end |
#check_date ⇒ String (readonly)
Returns The payment date, “Check date”, for the pay period.
10 11 12 |
# File 'lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_preview_response_pay_periods_item.rb', line 10 def check_date @check_date end |
#end_date ⇒ String (readonly)
Returns The last day of the pay period.
16 17 18 |
# File 'lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_preview_response_pay_periods_item.rb', line 16 def end_date @end_date end |
#run_payroll_by ⇒ String (readonly)
Returns The deadline to run payroll for direct deposit on the check date.
12 13 14 |
# File 'lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_preview_response_pay_periods_item.rb', line 12 def run_payroll_by @run_payroll_by end |
#start_date ⇒ String (readonly)
Returns The first day of the pay period.
14 15 16 |
# File 'lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_preview_response_pay_periods_item.rb', line 14 def start_date @start_date end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::Payroll::PaySchedules::PaySchedulesPreviewResponsePayPeriodsItem
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_preview_response_pay_periods_item.rb', line 46 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) check_date = parsed_json["check_date"] run_payroll_by = parsed_json["run_payroll_by"] start_date = parsed_json["start_date"] end_date = parsed_json["end_date"] new( check_date: check_date, run_payroll_by: run_payroll_by, start_date: start_date, end_date: end_date, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
74 75 76 77 78 79 |
# File 'lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_preview_response_pay_periods_item.rb', line 74 def self.validate_raw(obj:) obj.check_date&.is_a?(String) != false || raise("Passed value for field obj.check_date is not the expected type, validation failed.") obj.run_payroll_by&.is_a?(String) != false || raise("Passed value for field obj.run_payroll_by is not the expected type, validation failed.") obj.start_date&.is_a?(String) != false || raise("Passed value for field obj.start_date is not the expected type, validation failed.") obj.end_date&.is_a?(String) != false || raise("Passed value for field obj.end_date is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
65 66 67 |
# File 'lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_preview_response_pay_periods_item.rb', line 65 def to_json @_field_set&.to_json end |