Class: Teams::Api::Account

Inherits:
Model
  • Object
show all
Defined in:
lib/teams/api/account.rb

Instance Attribute Summary

Attributes inherited from Model

#raw

Instance Method Summary collapse

Methods inherited from Model

#initialize

Constructor Details

This class inherits a constructor from Teams::Api::Model

Instance Method Details

#aad_object_idObject



14
15
16
# File 'lib/teams/api/account.rb', line 14

def aad_object_id
  read("aadObjectId", "objectId", "aad_object_id")
end

#emailObject



46
47
48
# File 'lib/teams/api/account.rb', line 46

def email
  read("email")
end

#given_nameObject



38
39
40
# File 'lib/teams/api/account.rb', line 38

def given_name
  read("givenName", "given_name")
end

#idObject



6
7
8
# File 'lib/teams/api/account.rb', line 6

def id
  read("id")
end

#is_targetedObject



26
27
28
# File 'lib/teams/api/account.rb', line 26

def is_targeted
  read("isTargeted", "is_targeted")
end

#nameObject



10
11
12
# File 'lib/teams/api/account.rb', line 10

def name
  read("name")
end

#propertiesObject



22
23
24
# File 'lib/teams/api/account.rb', line 22

def properties
  read("properties")
end

#roleObject



30
31
32
# File 'lib/teams/api/account.rb', line 30

def role
  read("role")
end

#surnameObject



42
43
44
# File 'lib/teams/api/account.rb', line 42

def surname
  read("surname")
end

#tenant_idObject



54
55
56
# File 'lib/teams/api/account.rb', line 54

def tenant_id
  read("tenantId", "tenant_id")
end

#to_hObject



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/teams/api/account.rb', line 58

def to_h
  body = raw.dup
  body["id"] = id if id
  body["name"] = name if name
  body["aadObjectId"] = aad_object_id if aad_object_id
  body["type"] = type if type
  body["properties"] = properties if properties
  body["isTargeted"] = is_targeted unless is_targeted.nil?
  body["role"] = role if role
  body["userRole"] = user_role if user_role
  body["givenName"] = given_name if given_name
  body["surname"] = surname if surname
  body["email"] = email if email
  body["userPrincipalName"] = user_principal_name if user_principal_name
  body["tenantId"] = tenant_id if tenant_id
  remove_aliases(body)
end

#typeObject



18
19
20
# File 'lib/teams/api/account.rb', line 18

def type
  read("type")
end

#user_principal_nameObject



50
51
52
# File 'lib/teams/api/account.rb', line 50

def user_principal_name
  read("userPrincipalName", "user_principal_name")
end

#user_roleObject



34
35
36
# File 'lib/teams/api/account.rb', line 34

def user_role
  read("userRole", "user_role")
end