Class: Gusto::CompanyBenefits::BenefitSummaryEmployeesPayrollBenefitsPayPeriod
- Inherits:
-
Object
- Object
- Gusto::CompanyBenefits::BenefitSummaryEmployeesPayrollBenefitsPayPeriod
- Defined in:
- lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits_pay_period.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #end_date ⇒ String readonly
- #start_date ⇒ String readonly
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::CompanyBenefits::BenefitSummaryEmployeesPayrollBenefitsPayPeriod
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(start_date: OMIT, end_date: OMIT, additional_properties: nil) ⇒ Gusto::CompanyBenefits::BenefitSummaryEmployeesPayrollBenefitsPayPeriod constructor
- #to_json ⇒ String
Constructor Details
#initialize(start_date: OMIT, end_date: OMIT, additional_properties: nil) ⇒ Gusto::CompanyBenefits::BenefitSummaryEmployeesPayrollBenefitsPayPeriod
24 25 26 27 28 29 30 31 |
# File 'lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits_pay_period.rb', line 24 def initialize(start_date: OMIT, end_date: OMIT, additional_properties: nil) @start_date = start_date if start_date != OMIT @end_date = end_date if end_date != OMIT @additional_properties = additional_properties @_field_set = { "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.
13 14 15 |
# File 'lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits_pay_period.rb', line 13 def additional_properties @additional_properties end |
#end_date ⇒ String (readonly)
11 12 13 |
# File 'lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits_pay_period.rb', line 11 def end_date @end_date end |
#start_date ⇒ String (readonly)
9 10 11 |
# File 'lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits_pay_period.rb', line 9 def start_date @start_date end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::CompanyBenefits::BenefitSummaryEmployeesPayrollBenefitsPayPeriod
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits_pay_period.rb', line 37 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"] new( start_date: start_date, end_date: end_date, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
61 62 63 64 |
# File 'lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits_pay_period.rb', line 61 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.") end |
Instance Method Details
#to_json ⇒ String
52 53 54 |
# File 'lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits_pay_period.rb', line 52 def to_json @_field_set&.to_json end |