Class: Gusto::ExternalPayrolls::ExternalPayrollBasic
- Inherits:
-
Object
- Object
- Gusto::ExternalPayrolls::ExternalPayrollBasic
- Defined in:
- lib/fern_gusto/external_payrolls/types/external_payroll_basic.rb
Overview
The representation of an external payroll with minimal information.
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
External payroll’s check date.
-
#company_uuid ⇒ String
readonly
The UUID of the company.
-
#payment_period_end_date ⇒ String
readonly
External payroll’s pay period end date.
-
#payment_period_start_date ⇒ String
readonly
External payroll’s pay period start date.
-
#status ⇒ Object
readonly
edit an external payroll will be disabled.
-
#uuid ⇒ String
readonly
The UUID of the external payroll.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(uuid:, company_uuid: OMIT, check_date: OMIT, payment_period_start_date: OMIT, payment_period_end_date: OMIT, status: OMIT, additional_properties: nil) ⇒ Gusto::ExternalPayrolls::ExternalPayrollBasic constructor
- #to_json ⇒ String
Constructor Details
#initialize(uuid:, company_uuid: OMIT, check_date: OMIT, payment_period_start_date: OMIT, payment_period_end_date: OMIT, status: OMIT, additional_properties: nil) ⇒ Gusto::ExternalPayrolls::ExternalPayrollBasic
44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/fern_gusto/external_payrolls/types/external_payroll_basic.rb', line 44 def initialize(uuid:, company_uuid: OMIT, check_date: OMIT, payment_period_start_date: OMIT, payment_period_end_date: OMIT, status: OMIT, additional_properties: nil) @uuid = uuid @company_uuid = company_uuid if company_uuid != OMIT @check_date = check_date if check_date != OMIT @payment_period_start_date = payment_period_start_date if payment_period_start_date != OMIT @payment_period_end_date = payment_period_end_date if payment_period_end_date != OMIT @status = status if status != OMIT @additional_properties = additional_properties @_field_set = { "uuid": uuid, "company_uuid": company_uuid, "check_date": check_date, "payment_period_start_date": payment_period_start_date, "payment_period_end_date": payment_period_end_date, "status": status }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
26 27 28 |
# File 'lib/fern_gusto/external_payrolls/types/external_payroll_basic.rb', line 26 def additional_properties @additional_properties end |
#check_date ⇒ String (readonly)
Returns External payroll’s check date.
15 16 17 |
# File 'lib/fern_gusto/external_payrolls/types/external_payroll_basic.rb', line 15 def check_date @check_date end |
#company_uuid ⇒ String (readonly)
Returns The UUID of the company.
13 14 15 |
# File 'lib/fern_gusto/external_payrolls/types/external_payroll_basic.rb', line 13 def company_uuid @company_uuid end |
#payment_period_end_date ⇒ String (readonly)
Returns External payroll’s pay period end date.
19 20 21 |
# File 'lib/fern_gusto/external_payrolls/types/external_payroll_basic.rb', line 19 def payment_period_end_date @payment_period_end_date end |
#payment_period_start_date ⇒ String (readonly)
Returns External payroll’s pay period start date.
17 18 19 |
# File 'lib/fern_gusto/external_payrolls/types/external_payroll_basic.rb', line 17 def payment_period_start_date @payment_period_start_date end |
#status ⇒ Object (readonly)
edit an external payroll will be disabled.
24 25 26 |
# File 'lib/fern_gusto/external_payrolls/types/external_payroll_basic.rb', line 24 def status @status end |
#uuid ⇒ String (readonly)
Returns The UUID of the external payroll.
11 12 13 |
# File 'lib/fern_gusto/external_payrolls/types/external_payroll_basic.rb', line 11 def uuid @uuid end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::ExternalPayrolls::ExternalPayrollBasic
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/fern_gusto/external_payrolls/types/external_payroll_basic.rb', line 60 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) uuid = parsed_json["uuid"] company_uuid = parsed_json["company_uuid"] check_date = parsed_json["check_date"] payment_period_start_date = parsed_json["payment_period_start_date"] payment_period_end_date = parsed_json["payment_period_end_date"] status = parsed_json["status"] new( uuid: uuid, company_uuid: company_uuid, check_date: check_date, payment_period_start_date: payment_period_start_date, payment_period_end_date: payment_period_end_date, status: status, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
91 92 93 94 95 96 97 98 |
# File 'lib/fern_gusto/external_payrolls/types/external_payroll_basic.rb', line 91 def self.validate_raw(obj:) obj.uuid.is_a?(String) != false || raise("Passed value for field obj.uuid is not the expected type, validation failed.") obj.company_uuid&.is_a?(String) != false || raise("Passed value for field obj.company_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.payment_period_start_date&.is_a?(String) != false || raise("Passed value for field obj.payment_period_start_date is not the expected type, validation failed.") obj.payment_period_end_date&.is_a?(String) != false || raise("Passed value for field obj.payment_period_end_date is not the expected type, validation failed.") obj.status&.is_a?(Gusto::ExternalPayrolls::ExternalPayrollBasicStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
82 83 84 |
# File 'lib/fern_gusto/external_payrolls/types/external_payroll_basic.rb', line 82 def to_json @_field_set&.to_json end |