Class: LeanMicrosoftGraph::Resources::UsersResource::User

Inherits:
Object
  • Object
show all
Defined in:
lib/lean_microsoft_graph/resources/users_resource/user.rb

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ User

Returns a new instance of User.



7
8
9
# File 'lib/lean_microsoft_graph/resources/users_resource/user.rb', line 7

def initialize(response)
  @response = response
end

Instance Method Details

#business_phonesObject



23
# File 'lib/lean_microsoft_graph/resources/users_resource/user.rb', line 23

def business_phones = @response[:businessPhones]

#display_nameObject



13
# File 'lib/lean_microsoft_graph/resources/users_resource/user.rb', line 13

def display_name = @response[:displayName]

#given_nameObject



25
# File 'lib/lean_microsoft_graph/resources/users_resource/user.rb', line 25

def given_name = @response[:givenName]

#idObject



11
# File 'lib/lean_microsoft_graph/resources/users_resource/user.rb', line 11

def id = @response[:id]

#job_titleObject



19
# File 'lib/lean_microsoft_graph/resources/users_resource/user.rb', line 19

def job_title = @response[:jobTitle]

#mailObject



15
# File 'lib/lean_microsoft_graph/resources/users_resource/user.rb', line 15

def mail = @response[:mail]

#mobile_phoneObject



21
# File 'lib/lean_microsoft_graph/resources/users_resource/user.rb', line 21

def mobile_phone = @response[:mobilePhone]

#office_locationObject



31
# File 'lib/lean_microsoft_graph/resources/users_resource/user.rb', line 31

def office_location = @response[:officeLocation]

#preferred_languageObject



29
# File 'lib/lean_microsoft_graph/resources/users_resource/user.rb', line 29

def preferred_language = @response[:preferredLanguage]

#surnameObject



27
# File 'lib/lean_microsoft_graph/resources/users_resource/user.rb', line 27

def surname = @response[:surname]

#to_hObject



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/lean_microsoft_graph/resources/users_resource/user.rb', line 33

def to_h
  {
    id: id,
    display_name: display_name,
    mail: mail,
    user_principal_name: user_principal_name,
    job_title: job_title,
    mobile_phone: mobile_phone,
    business_phones: business_phones,
    given_name: given_name,
    surname: surname,
    preferred_language: preferred_language,
    office_location: office_location
  }
end

#user_principal_nameObject



17
# File 'lib/lean_microsoft_graph/resources/users_resource/user.rb', line 17

def user_principal_name = @response[:userPrincipalName]