Class: GustoEmbedded::Models::Operations::Person

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

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(external_id:, first_name:, last_name:, middle_initial: nil, preferred_first_name: nil, email: nil, work_email: nil, ssn: nil, date_of_birth: nil, self_onboarding: nil) ⇒ Person

Returns a new instance of Person.



37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/gusto_embedded/models/operations/person.rb', line 37

def initialize(external_id:, first_name:, last_name:, middle_initial: nil, preferred_first_name: nil, email: nil, work_email: nil, ssn: nil, date_of_birth: nil, self_onboarding: nil)
  @external_id = external_id
  @first_name = first_name
  @last_name = last_name
  @middle_initial = middle_initial
  @preferred_first_name = preferred_first_name
  @email = email
  @work_email = work_email
  @ssn = ssn
  @date_of_birth = date_of_birth
  @self_onboarding = self_onboarding
end

Instance Method Details

#==(other) ⇒ Object



51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/gusto_embedded/models/operations/person.rb', line 51

def ==(other)
  return false unless other.is_a? self.class
  return false unless @external_id == other.external_id
  return false unless @first_name == other.first_name
  return false unless @last_name == other.last_name
  return false unless @middle_initial == other.middle_initial
  return false unless @preferred_first_name == other.preferred_first_name
  return false unless @email == other.email
  return false unless @work_email == other.work_email
  return false unless @ssn == other.ssn
  return false unless @date_of_birth == other.date_of_birth
  return false unless @self_onboarding == other.self_onboarding
  true
end