Class: GustoEmbedded::Models::Shared::YtdBenefitAmountsFromDifferentCompanyBody

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/gusto_embedded/models/shared/ytd_benefit_amounts_from_different_company_body.rb

Overview

Year-to-date benefit amounts contributed at a different company for the specified employee.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(benefit_type:, tax_year:, ytd_employee_deduction_amount: '0.00', ytd_company_contribution_amount: '0.00') ⇒ YtdBenefitAmountsFromDifferentCompanyBody

Returns a new instance of YtdBenefitAmountsFromDifferentCompanyBody.



25
26
27
28
29
30
# File 'lib/gusto_embedded/models/shared/ytd_benefit_amounts_from_different_company_body.rb', line 25

def initialize(benefit_type:, tax_year:, ytd_employee_deduction_amount: '0.00', ytd_company_contribution_amount: '0.00')
  @benefit_type = benefit_type
  @tax_year = tax_year
  @ytd_employee_deduction_amount = ytd_employee_deduction_amount
  @ytd_company_contribution_amount = ytd_company_contribution_amount
end

Instance Method Details

#==(other) ⇒ Object



33
34
35
36
37
38
39
40
# File 'lib/gusto_embedded/models/shared/ytd_benefit_amounts_from_different_company_body.rb', line 33

def ==(other)
  return false unless other.is_a? self.class
  return false unless @benefit_type == other.benefit_type
  return false unless @tax_year == other.tax_year
  return false unless @ytd_employee_deduction_amount == other.ytd_employee_deduction_amount
  return false unless @ytd_company_contribution_amount == other.ytd_company_contribution_amount
  true
end