Class: Gusto::CompanyBenefits::BenefitSummaryEmployeesPayrollBenefits
- Inherits:
-
Object
- Object
- Gusto::CompanyBenefits::BenefitSummaryEmployeesPayrollBenefits
- Defined in:
- lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits.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
- #company_benefit_contribution ⇒ String readonly
- #company_benefit_deduction ⇒ String readonly
- #gross_pay ⇒ String readonly
- #pay_period ⇒ Gusto::CompanyBenefits::BenefitSummaryEmployeesPayrollBenefitsPayPeriod readonly
-
#payroll_type ⇒ String
readonly
Whether it is regular or bonus payroll.
- #payroll_uuid ⇒ String readonly
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::CompanyBenefits::BenefitSummaryEmployeesPayrollBenefits
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(payroll_uuid: OMIT, payroll_type: OMIT, check_date: OMIT, gross_pay: OMIT, company_benefit_deduction: OMIT, company_benefit_contribution: OMIT, pay_period: OMIT, additional_properties: nil) ⇒ Gusto::CompanyBenefits::BenefitSummaryEmployeesPayrollBenefits constructor
- #to_json ⇒ String
Constructor Details
#initialize(payroll_uuid: OMIT, payroll_type: OMIT, check_date: OMIT, gross_pay: OMIT, company_benefit_deduction: OMIT, company_benefit_contribution: OMIT, pay_period: OMIT, additional_properties: nil) ⇒ Gusto::CompanyBenefits::BenefitSummaryEmployeesPayrollBenefits
40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits.rb', line 40 def initialize(payroll_uuid: OMIT, payroll_type: OMIT, check_date: OMIT, gross_pay: OMIT, company_benefit_deduction: OMIT, company_benefit_contribution: OMIT, pay_period: OMIT, additional_properties: nil) @payroll_uuid = payroll_uuid if payroll_uuid != OMIT @payroll_type = payroll_type if payroll_type != OMIT @check_date = check_date if check_date != OMIT @gross_pay = gross_pay if gross_pay != OMIT @company_benefit_deduction = company_benefit_deduction if company_benefit_deduction != OMIT @company_benefit_contribution = company_benefit_contribution if company_benefit_contribution != OMIT @pay_period = pay_period if pay_period != OMIT @additional_properties = additional_properties @_field_set = { "payroll_uuid": payroll_uuid, "payroll_type": payroll_type, "check_date": check_date, "gross_pay": gross_pay, "company_benefit_deduction": company_benefit_deduction, "company_benefit_contribution": company_benefit_contribution, "pay_period": pay_period }.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/company_benefits/types/benefit_summary_employees_payroll_benefits.rb', line 24 def additional_properties @additional_properties end |
#check_date ⇒ String (readonly)
14 15 16 |
# File 'lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits.rb', line 14 def check_date @check_date end |
#company_benefit_contribution ⇒ String (readonly)
20 21 22 |
# File 'lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits.rb', line 20 def company_benefit_contribution @company_benefit_contribution end |
#company_benefit_deduction ⇒ String (readonly)
18 19 20 |
# File 'lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits.rb', line 18 def company_benefit_deduction @company_benefit_deduction end |
#gross_pay ⇒ String (readonly)
16 17 18 |
# File 'lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits.rb', line 16 def gross_pay @gross_pay end |
#pay_period ⇒ Gusto::CompanyBenefits::BenefitSummaryEmployeesPayrollBenefitsPayPeriod (readonly)
22 23 24 |
# File 'lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits.rb', line 22 def pay_period @pay_period end |
#payroll_type ⇒ String (readonly)
Returns Whether it is regular or bonus payroll.
12 13 14 |
# File 'lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits.rb', line 12 def payroll_type @payroll_type end |
#payroll_uuid ⇒ String (readonly)
10 11 12 |
# File 'lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits.rb', line 10 def payroll_uuid @payroll_uuid end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::CompanyBenefits::BenefitSummaryEmployeesPayrollBenefits
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits.rb', line 58 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"] payroll_type = parsed_json["payroll_type"] check_date = parsed_json["check_date"] gross_pay = parsed_json["gross_pay"] company_benefit_deduction = parsed_json["company_benefit_deduction"] company_benefit_contribution = parsed_json["company_benefit_contribution"] unless parsed_json["pay_period"].nil? pay_period = parsed_json["pay_period"].to_json pay_period = Gusto::CompanyBenefits::BenefitSummaryEmployeesPayrollBenefitsPayPeriod.from_json(json_object: pay_period) else pay_period = nil end new( payroll_uuid: payroll_uuid, payroll_type: payroll_type, check_date: check_date, gross_pay: gross_pay, company_benefit_deduction: company_benefit_deduction, company_benefit_contribution: company_benefit_contribution, pay_period: pay_period, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
96 97 98 99 100 101 102 103 104 |
# File 'lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits.rb', line 96 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.payroll_type&.is_a?(String) != false || raise("Passed value for field obj.payroll_type 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.gross_pay&.is_a?(String) != false || raise("Passed value for field obj.gross_pay is not the expected type, validation failed.") obj.company_benefit_deduction&.is_a?(String) != false || raise("Passed value for field obj.company_benefit_deduction is not the expected type, validation failed.") obj.company_benefit_contribution&.is_a?(String) != false || raise("Passed value for field obj.company_benefit_contribution is not the expected type, validation failed.") obj.pay_period.nil? || Gusto::CompanyBenefits::BenefitSummaryEmployeesPayrollBenefitsPayPeriod.validate_raw(obj: obj.pay_period) end |
Instance Method Details
#to_json ⇒ String
87 88 89 |
# File 'lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits.rb', line 87 def to_json @_field_set&.to_json end |