Class: Gusto::Payrolls::PayPeriodPayroll
- Inherits:
-
Object
- Object
- Gusto::Payrolls::PayPeriodPayroll
- Defined in:
- lib/fern_gusto/payrolls/types/pay_period_payroll.rb
Overview
Information about the payroll for the 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 ⇒ Object
readonly
submitted on time.
-
#payroll_deadline ⇒ Object
readonly
this date.
-
#payroll_type ⇒ Gusto::Payrolls::PayPeriodPayrollPayrollType
readonly
Whether it is regular pay period or transition pay period.
-
#payroll_uuid ⇒ String
readonly
The UUID of the payroll for this pay period.
-
#processed ⇒ Object
readonly
deadline.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(payroll_uuid: OMIT, check_date: OMIT, processed: OMIT, payroll_deadline: OMIT, payroll_type: OMIT, additional_properties: nil) ⇒ Gusto::Payrolls::PayPeriodPayroll constructor
- #to_json ⇒ String
Constructor Details
#initialize(payroll_uuid: OMIT, check_date: OMIT, processed: OMIT, payroll_deadline: OMIT, payroll_type: OMIT, additional_properties: nil) ⇒ Gusto::Payrolls::PayPeriodPayroll
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/fern_gusto/payrolls/types/pay_period_payroll.rb', line 50 def initialize(payroll_uuid: OMIT, check_date: OMIT, processed: OMIT, payroll_deadline: OMIT, payroll_type: OMIT, additional_properties: nil) @payroll_uuid = payroll_uuid if payroll_uuid != OMIT @check_date = check_date if check_date != OMIT @processed = processed if processed != OMIT @payroll_deadline = payroll_deadline if payroll_deadline != OMIT @payroll_type = payroll_type if payroll_type != OMIT @additional_properties = additional_properties @_field_set = { "payroll_uuid": payroll_uuid, "check_date": check_date, "processed": processed, "payroll_deadline": payroll_deadline, "payroll_type": payroll_type }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
29 30 31 |
# File 'lib/fern_gusto/payrolls/types/pay_period_payroll.rb', line 29 def additional_properties @additional_properties end |
#check_date ⇒ Object (readonly)
submitted on time.
15 16 17 |
# File 'lib/fern_gusto/payrolls/types/pay_period_payroll.rb', line 15 def check_date @check_date end |
#payroll_deadline ⇒ Object (readonly)
this date.
25 26 27 |
# File 'lib/fern_gusto/payrolls/types/pay_period_payroll.rb', line 25 def payroll_deadline @payroll_deadline end |
#payroll_type ⇒ Gusto::Payrolls::PayPeriodPayrollPayrollType (readonly)
Returns Whether it is regular pay period or transition pay period.
27 28 29 |
# File 'lib/fern_gusto/payrolls/types/pay_period_payroll.rb', line 27 def payroll_type @payroll_type end |
#payroll_uuid ⇒ String (readonly)
Returns The UUID of the payroll for this pay period.
12 13 14 |
# File 'lib/fern_gusto/payrolls/types/pay_period_payroll.rb', line 12 def payroll_uuid @payroll_uuid end |
#processed ⇒ Object (readonly)
deadline.
21 22 23 |
# File 'lib/fern_gusto/payrolls/types/pay_period_payroll.rb', line 21 def processed @processed end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::Payrolls::PayPeriodPayroll
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/fern_gusto/payrolls/types/pay_period_payroll.rb', line 65 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) payroll_uuid = parsed_json["payroll_uuid"] check_date = parsed_json["check_date"] processed = parsed_json["processed"] payroll_deadline = unless parsed_json["payroll_deadline"].nil? DateTime.parse(parsed_json["payroll_deadline"]) else nil end payroll_type = parsed_json["payroll_type"] new( payroll_uuid: payroll_uuid, check_date: check_date, processed: processed, payroll_deadline: payroll_deadline, payroll_type: payroll_type, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
98 99 100 101 102 103 104 |
# File 'lib/fern_gusto/payrolls/types/pay_period_payroll.rb', line 98 def self.validate_raw(obj:) obj.payroll_uuid&.is_a?(String) != false || raise("Passed value for field obj.payroll_uuid 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.processed&.is_a?(Boolean) != false || raise("Passed value for field obj.processed is not the expected type, validation failed.") obj.payroll_deadline&.is_a?(DateTime) != false || raise("Passed value for field obj.payroll_deadline is not the expected type, validation failed.") obj.payroll_type&.is_a?(Gusto::Payrolls::PayPeriodPayrollPayrollType) != false || raise("Passed value for field obj.payroll_type is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
89 90 91 |
# File 'lib/fern_gusto/payrolls/types/pay_period_payroll.rb', line 89 def to_json @_field_set&.to_json end |