Class: Gusto::EmployeeEmployments::UnprocessedTerminationPayPeriod
- Inherits:
-
Object
- Object
- Gusto::EmployeeEmployments::UnprocessedTerminationPayPeriod
- Defined in:
- lib/fern_gusto/employee_employments/types/unprocessed_termination_pay_period.rb
Overview
The representation of an unprocessed termination pay period.
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 check date of the pay period.
-
#debit_date ⇒ String
readonly
The debit date of the pay period.
-
#employee_name ⇒ String
readonly
The full name of the employee.
-
#employee_uuid ⇒ String
readonly
A unique identifier of the employee.
-
#end_date ⇒ String
readonly
The end date of the pay period.
-
#pay_schedule_uuid ⇒ String
readonly
A unique identifier of the pay schedule to which the pay period belongs.
-
#start_date ⇒ String
readonly
The start date of the pay period.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::EmployeeEmployments::UnprocessedTerminationPayPeriod
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(start_date: OMIT, end_date: OMIT, check_date: OMIT, debit_date: OMIT, employee_name: OMIT, employee_uuid: OMIT, pay_schedule_uuid: OMIT, additional_properties: nil) ⇒ Gusto::EmployeeEmployments::UnprocessedTerminationPayPeriod constructor
- #to_json ⇒ String
Constructor Details
#initialize(start_date: OMIT, end_date: OMIT, check_date: OMIT, debit_date: OMIT, employee_name: OMIT, employee_uuid: OMIT, pay_schedule_uuid: OMIT, additional_properties: nil) ⇒ Gusto::EmployeeEmployments::UnprocessedTerminationPayPeriod
40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/fern_gusto/employee_employments/types/unprocessed_termination_pay_period.rb', line 40 def initialize(start_date: OMIT, end_date: OMIT, check_date: OMIT, debit_date: OMIT, employee_name: OMIT, employee_uuid: OMIT, pay_schedule_uuid: OMIT, additional_properties: nil) @start_date = start_date if start_date != OMIT @end_date = end_date if end_date != OMIT @check_date = check_date if check_date != OMIT @debit_date = debit_date if debit_date != OMIT @employee_name = employee_name if employee_name != OMIT @employee_uuid = employee_uuid if employee_uuid != OMIT @pay_schedule_uuid = pay_schedule_uuid if pay_schedule_uuid != OMIT @additional_properties = additional_properties @_field_set = { "start_date": start_date, "end_date": end_date, "check_date": check_date, "debit_date": debit_date, "employee_name": employee_name, "employee_uuid": employee_uuid, "pay_schedule_uuid": pay_schedule_uuid }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
24 25 26 |
# File 'lib/fern_gusto/employee_employments/types/unprocessed_termination_pay_period.rb', line 24 def additional_properties @additional_properties end |
#check_date ⇒ String (readonly)
Returns The check date of the pay period.
14 15 16 |
# File 'lib/fern_gusto/employee_employments/types/unprocessed_termination_pay_period.rb', line 14 def check_date @check_date end |
#debit_date ⇒ String (readonly)
Returns The debit date of the pay period.
16 17 18 |
# File 'lib/fern_gusto/employee_employments/types/unprocessed_termination_pay_period.rb', line 16 def debit_date @debit_date end |
#employee_name ⇒ String (readonly)
Returns The full name of the employee.
18 19 20 |
# File 'lib/fern_gusto/employee_employments/types/unprocessed_termination_pay_period.rb', line 18 def employee_name @employee_name end |
#employee_uuid ⇒ String (readonly)
Returns A unique identifier of the employee.
20 21 22 |
# File 'lib/fern_gusto/employee_employments/types/unprocessed_termination_pay_period.rb', line 20 def employee_uuid @employee_uuid end |
#end_date ⇒ String (readonly)
Returns The end date of the pay period.
12 13 14 |
# File 'lib/fern_gusto/employee_employments/types/unprocessed_termination_pay_period.rb', line 12 def end_date @end_date end |
#pay_schedule_uuid ⇒ String (readonly)
Returns A unique identifier of the pay schedule to which the pay period belongs.
22 23 24 |
# File 'lib/fern_gusto/employee_employments/types/unprocessed_termination_pay_period.rb', line 22 def pay_schedule_uuid @pay_schedule_uuid end |
#start_date ⇒ String (readonly)
Returns The start date of the pay period.
10 11 12 |
# File 'lib/fern_gusto/employee_employments/types/unprocessed_termination_pay_period.rb', line 10 def start_date @start_date end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::EmployeeEmployments::UnprocessedTerminationPayPeriod
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/fern_gusto/employee_employments/types/unprocessed_termination_pay_period.rb', line 57 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) start_date = parsed_json["start_date"] end_date = parsed_json["end_date"] check_date = parsed_json["check_date"] debit_date = parsed_json["debit_date"] employee_name = parsed_json["employee_name"] employee_uuid = parsed_json["employee_uuid"] pay_schedule_uuid = parsed_json["pay_schedule_uuid"] new( start_date: start_date, end_date: end_date, check_date: check_date, debit_date: debit_date, employee_name: employee_name, employee_uuid: employee_uuid, pay_schedule_uuid: pay_schedule_uuid, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
90 91 92 93 94 95 96 97 98 |
# File 'lib/fern_gusto/employee_employments/types/unprocessed_termination_pay_period.rb', line 90 def self.validate_raw(obj:) 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.") obj.check_date&.is_a?(String) != false || raise("Passed value for field obj.check_date is not the expected type, validation failed.") obj.debit_date&.is_a?(String) != false || raise("Passed value for field obj.debit_date is not the expected type, validation failed.") obj.employee_name&.is_a?(String) != false || raise("Passed value for field obj.employee_name is not the expected type, validation failed.") obj.employee_uuid&.is_a?(String) != false || raise("Passed value for field obj.employee_uuid is not the expected type, validation failed.") obj.pay_schedule_uuid&.is_a?(String) != false || raise("Passed value for field obj.pay_schedule_uuid is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
81 82 83 |
# File 'lib/fern_gusto/employee_employments/types/unprocessed_termination_pay_period.rb', line 81 def to_json @_field_set&.to_json end |