Class: Teams::Api::TeamInfo

Inherits:
Model
  • Object
show all
Defined in:
lib/teams/api/team_info.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_group_idObject



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

def aad_group_id
  read("aadGroupId", "aad_group_id")
end

#channel_countObject



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

def channel_count
  read("channelCount", "channel_count")
end

#idObject



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

def id
  read("id")
end

#member_countObject



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

def member_count
  read("memberCount", "member_count")
end

#nameObject



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

def name
  read("name")
end

#team_typeObject



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

def team_type
  read("teamType", "team_type")
end

#to_hObject



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/teams/api/team_info.rb', line 30

def to_h
  body = raw.dup
  body["teamType"] = team_type if team_type
  body["memberCount"] = member_count if member_count
  body["channelCount"] = channel_count if channel_count
  body["aadGroupId"] = aad_group_id if aad_group_id
  body.delete("team_type")
  body.delete("member_count")
  body.delete("channel_count")
  body.delete("aad_group_id")
  body
end