Class: MicrosoftLive::Contact

Inherits:
Object
  • Object
show all
Defined in:
lib/microsoft-live/contact.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data: {}, simple:) ⇒ Contact

Returns a new instance of Contact.



17
18
19
20
21
22
# File 'lib/microsoft-live/contact.rb', line 17

def initialize(data: {}, simple:)
  data.each do |key,val|
    self.send "#{key}=", val
  end
  self.simple = simple
end

Instance Attribute Details

#birth_dayObject

Returns the value of attribute birth_day.



4
5
6
# File 'lib/microsoft-live/contact.rb', line 4

def birth_day
  @birth_day
end

#birth_monthObject

Returns the value of attribute birth_month.



4
5
6
# File 'lib/microsoft-live/contact.rb', line 4

def birth_month
  @birth_month
end

#email_hashesObject

Returns the value of attribute email_hashes.



4
5
6
# File 'lib/microsoft-live/contact.rb', line 4

def email_hashes
  @email_hashes
end

#first_nameObject

Returns the value of attribute first_name.



4
5
6
# File 'lib/microsoft-live/contact.rb', line 4

def first_name
  @first_name
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/microsoft-live/contact.rb', line 4

def id
  @id
end

#is_favoriteObject

Returns the value of attribute is_favorite.



4
5
6
# File 'lib/microsoft-live/contact.rb', line 4

def is_favorite
  @is_favorite
end

#is_friendObject

Returns the value of attribute is_friend.



4
5
6
# File 'lib/microsoft-live/contact.rb', line 4

def is_friend
  @is_friend
end

#last_nameObject

Returns the value of attribute last_name.



4
5
6
# File 'lib/microsoft-live/contact.rb', line 4

def last_name
  @last_name
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/microsoft-live/contact.rb', line 4

def name
  @name
end

#simpleObject

Returns the value of attribute simple.



4
5
6
# File 'lib/microsoft-live/contact.rb', line 4

def simple
  @simple
end

#updated_timeObject

Returns the value of attribute updated_time.



4
5
6
# File 'lib/microsoft-live/contact.rb', line 4

def updated_time
  @updated_time
end

#user_idObject

Returns the value of attribute user_id.



4
5
6
# File 'lib/microsoft-live/contact.rb', line 4

def user_id
  @user_id
end

Instance Method Details

#userObject



24
25
26
27
# File 'lib/microsoft-live/contact.rb', line 24

def user
  return unless user_id
  simple.user(user_id)
end