Class: GustoEmbedded::Models::Shared::Admin

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

Overview

The representation of an admin user in Gusto.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(uuid:, email: nil, first_name: nil, last_name: nil, phone: nil) ⇒ Admin

Returns a new instance of Admin.



27
28
29
30
31
32
33
# File 'lib/gusto_embedded/models/shared/admin.rb', line 27

def initialize(uuid:, email: nil, first_name: nil, last_name: nil, phone: nil)
  @uuid = uuid
  @email = email
  @first_name = first_name
  @last_name = last_name
  @phone = phone
end

Instance Method Details

#==(other) ⇒ Object



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

def ==(other)
  return false unless other.is_a? self.class
  return false unless @uuid == other.uuid
  return false unless @email == other.email
  return false unless @first_name == other.first_name
  return false unless @last_name == other.last_name
  return false unless @phone == other.phone
  true
end