Class: GustoEmbedded::Models::Shared::EmployeeBenefits

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

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(employee_uuid: nil, company_benefit_uuid: nil, company_contribution: nil, effective_date: nil, expiration_date: nil, contribution: nil, active: true, deduct_as_percentage: false, employee_deduction: '0.00') ⇒ EmployeeBenefits

Returns a new instance of EmployeeBenefits.



35
36
37
38
39
40
41
42
43
44
45
# File 'lib/gusto_embedded/models/shared/employee_benefits.rb', line 35

def initialize(employee_uuid: nil, company_benefit_uuid: nil, company_contribution: nil, effective_date: nil, expiration_date: nil, contribution: nil, active: true, deduct_as_percentage: false, employee_deduction: '0.00')
  @employee_uuid = employee_uuid
  @company_benefit_uuid = company_benefit_uuid
  @company_contribution = company_contribution
  @effective_date = effective_date
  @expiration_date = expiration_date
  @contribution = contribution
  @active = active
  @deduct_as_percentage = deduct_as_percentage
  @employee_deduction = employee_deduction
end

Instance Method Details

#==(other) ⇒ Object



48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/gusto_embedded/models/shared/employee_benefits.rb', line 48

def ==(other)
  return false unless other.is_a? self.class
  return false unless @employee_uuid == other.employee_uuid
  return false unless @company_benefit_uuid == other.company_benefit_uuid
  return false unless @company_contribution == other.company_contribution
  return false unless @effective_date == other.effective_date
  return false unless @expiration_date == other.expiration_date
  return false unless @contribution == other.contribution
  return false unless @active == other.active
  return false unless @deduct_as_percentage == other.deduct_as_percentage
  return false unless @employee_deduction == other.employee_deduction
  true
end