Class: IllyanClient::Person

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model, ActiveModel::Serializers::JSON
Defined in:
lib/illyan_client/person.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#adminObject

Returns the value of attribute admin.



8
9
10
# File 'lib/illyan_client/person.rb', line 8

def admin
  @admin
end

#birthdateObject

Returns the value of attribute birthdate.



8
9
10
# File 'lib/illyan_client/person.rb', line 8

def birthdate
  @birthdate
end

#emailObject

Returns the value of attribute email.



8
9
10
# File 'lib/illyan_client/person.rb', line 8

def email
  @email
end

#firstnameObject

Returns the value of attribute firstname.



8
9
10
# File 'lib/illyan_client/person.rb', line 8

def firstname
  @firstname
end

#genderObject

Returns the value of attribute gender.



8
9
10
# File 'lib/illyan_client/person.rb', line 8

def gender
  @gender
end

#idObject

Returns the value of attribute id.



8
9
10
# File 'lib/illyan_client/person.rb', line 8

def id
  @id
end

#lastnameObject

Returns the value of attribute lastname.



8
9
10
# File 'lib/illyan_client/person.rb', line 8

def lastname
  @lastname
end

Instance Method Details

#attributesObject



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/illyan_client/person.rb', line 14

def attributes
  {
    id: id,
    firstname: firstname,
    lastname: lastname,
    gender: gender,
    birthdate: birthdate,
    email: email,
    admin: admin
  }
end

#persisted?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/illyan_client/person.rb', line 10

def persisted?
  id
end