Class: CiscoWebex::CCTeams
Instance Method Summary
collapse
#address_books, #agent_profiles, #agents, #auxiliary_codes, #captures, #dial_plans, #entry_point_mappings, #entry_points, #head, #journey, #multimedia_profiles, #my_org, #outbound_ani, #post, #put, #queues, #sites, #skill_profiles, #skills, #subscriptions, #tasks, #teams, #user_profiles, #users
Constructor Details
#initialize(token = nil, org_id = nil) ⇒ CCTeams
initialize object with stored token
7
8
9
10
11
12
13
14
15
|
# File 'lib/CC/Teams.rb', line 7
def initialize(token=nil, org_id=nil)
if token == nil || org_id == nil
STDERR.puts "Must provide API key for CiscoWebex::ContactCenter::Team"
return false
else
@auth_token = token if token
@org_id = org_id end
end
|
Instance Method Details
#create(params) ⇒ Object
38
39
40
|
# File 'lib/CC/Teams.rb', line 38
def create(params)
return CiscoWebex::RestCC.post(@auth_token, "/organization/#{@org_id}/team", params) rescue false
end
|
#delete(id) ⇒ Object
42
43
44
|
# File 'lib/CC/Teams.rb', line 42
def delete(id)
return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/team/#{id}") rescue false
end
|
#get(id, limit = 5000) ⇒ Object
21
22
23
|
# File 'lib/CC/Teams.rb', line 21
def get(id, limit=5000)
return CiscoWebex::RestCC.get(@auth_token, "/organization/#{@org_id}/team/#{id}", {}, limit)['data'] rescue false
end
|
#list(params = {}, limit = 5000) ⇒ Object
25
26
27
|
# File 'lib/CC/Teams.rb', line 25
def list(params={}, limit=5000)
return CiscoWebex::RestCC.get(@auth_token, "/organization/#{@org_id}/team", {}, limit)['data'] rescue false
end
|
#patch(id, params) ⇒ Object
50
51
52
|
# File 'lib/CC/Teams.rb', line 50
def patch(id, params)
return CiscoWebex::RestCC.patch(@auth_token, "/organization/#{@org_id}/team/#{id}", params) rescue false
end
|
#save(params = {}) ⇒ Object
34
35
36
|
# File 'lib/CC/Teams.rb', line 34
def save(params={})
return CiscoWebex::RestCC.post(@auth_token, "/organization/#{@org_id}/team/bulk", params) rescue false
end
|
#search(params = {}) ⇒ Object
29
30
31
32
|
# File 'lib/CC/Teams.rb', line 29
def search(params={})
params = { "name"=> params } if params.class == String
return CiscoWebex::Toolbox.search(list(), params)
end
|
#this ⇒ Object
17
18
19
|
# File 'lib/CC/Teams.rb', line 17
def this()
puts "CiscoWebex::ContactCenter::Team - Org:#{@org_id}"
end
|
#update(id, params) ⇒ Object
46
47
48
|
# File 'lib/CC/Teams.rb', line 46
def update(id, params)
return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/team/#{id}", params) rescue false
end
|