Class: CiscoWebex::ContactCenter

Inherits:
Object
  • Object
show all
Defined in:
lib/CC/CC.rb

Instance Method Summary collapse

Constructor Details

#initialize(token = nil) ⇒ ContactCenter

initialize object with stored token



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/CC/CC.rb', line 7

def initialize(token=nil)
	if not token
		raise "Must provide API key"
	else
		@auth_token = token if token
		@org_id =  my_org()  # test token and store users profile
		if ! @org_id
			raise "CiscoWebex::ContactCenter API Token not valid!"
		else
			# initiate all class methods
			@users = Users.new(@auth_token, @org_id)
			@user_profiles = UserProfiles.new(@auth_token, @org_id)
			@teams = CCTeams.new(@auth_token, @org_id)
			@skills = Skills.new(@auth_token, @org_id)
			@agents = Agents.new(@auth_token, @org_id)
			@queues = Queues.new(@auth_token, @org_id)
			@tasks = Tasks.new(@auth_token, @org_id)
			@captures = Captures.new(@auth_token, @org_id)
			@subscriptions = Subscriptions.new(@auth_token, @org_id)
			@skill_profiles = SkillProfiles.new(@auth_token, @org_id)
			@sites = Sites.new(@auth_token, @org_id)
			@entry_points = EntryPoints.new(@auth_token, @org_id)
			@multimedia_profiles = MultimediaProfiles.new(@auth_token, @org_id)
			@journey = Journey.new(@auth_token, @org_id)
			@address_books = AddressBooks.new(@auth_token, @org_id)
			@agent_profiles = AgentProfiles.new(@auth_token, @org_id)
			@auxiliary_codes = AuxiliaryCodes.new(@auth_token, @org_id)
			@dial_plans = DialPlans.new(@auth_token, @org_id)
			@entry_point_mappings = EntryPointMappings.new(@auth_token, @org_id)
			@outbound_ani = OutboundANI.new(@auth_token, @org_id)
		end
	end
end

Instance Method Details

#address_booksObject

sub class for Journey methods



96
97
98
# File 'lib/CC/CC.rb', line 96

def address_books()
	return @address_books
end

#agent_profilesObject

sub class for Journey methods



91
92
93
# File 'lib/CC/CC.rb', line 91

def agent_profiles()
	return @agent_profiles
end

#agentsObject



145
146
147
# File 'lib/CC/CC.rb', line 145

def agents()
	return @agents
end

#auxiliary_codesObject

sub class for Journey methods



86
87
88
# File 'lib/CC/CC.rb', line 86

def auxiliary_codes()
	return @auxiliary_codes
end

#capturesObject



137
138
139
# File 'lib/CC/CC.rb', line 137

def captures()
	return @captures
end

#dial_plansObject

sub class for Journey methods



81
82
83
# File 'lib/CC/CC.rb', line 81

def dial_plans()
	return @dial_plans
end

#entry_point_mappingsObject

sub class for Journey methods



76
77
78
# File 'lib/CC/CC.rb', line 76

def entry_point_mappings()
	return @entry_point_mappings
end

#entry_pointsObject



117
118
119
# File 'lib/CC/CC.rb', line 117

def entry_points()
	return @entry_points
end

#get(uri, params = nil, limit = 50000) ⇒ Object

access to REST API



46
47
48
# File 'lib/CC/CC.rb', line 46

def get(uri, params=nil, limit=50000)
	return CiscoWebex::RestCC.get(@auth_token, uri, params, limit)
end

#head(uri, params = nil) ⇒ Object

access to REST API



51
52
53
# File 'lib/CC/CC.rb', line 51

def head(uri, params=nil)
	return CiscoWebex::RestCC.head(@auth_token, uri, params)
end

#journeyObject

sub class for Journey methods



101
102
103
# File 'lib/CC/CC.rb', line 101

def journey()
	return @journey
end

#multimedia_profilesObject



141
142
143
# File 'lib/CC/CC.rb', line 141

def multimedia_profiles()
	return @multimedia_profiles
end

#my_orgObject

shortcut for getting the org associated with the token



66
67
68
# File 'lib/CC/CC.rb', line 66

def my_org()
	return CiscoWebex::RestCC.get(@auth_token, "/v1/subscriptions")['meta']['orgId'] rescue nil
end

#outbound_aniObject

sub class for Journey methods



71
72
73
# File 'lib/CC/CC.rb', line 71

def outbound_ani()
	return @outbound_ani
end

#post(uri, params = nil) ⇒ Object

access to REST API



56
57
58
# File 'lib/CC/CC.rb', line 56

def post(uri, params=nil)
	return CiscoWebex::RestCC.post(@auth_token, uri, params)
end

#put(uri, params = nil) ⇒ Object

access to REST API



61
62
63
# File 'lib/CC/CC.rb', line 61

def put(uri, params=nil)
	return CiscoWebex::RestCC.put(@auth_token, uri, params)
end

#queuesObject



133
134
135
# File 'lib/CC/CC.rb', line 133

def queues()
	return @queues
end

#sitesObject



149
150
151
# File 'lib/CC/CC.rb', line 149

def sites()
	return @sites
end

#skill_profilesObject



129
130
131
# File 'lib/CC/CC.rb', line 129

def skill_profiles()
	return @skill_profiles
end

#skillsObject



113
114
115
# File 'lib/CC/CC.rb', line 113

def skills()
	return @skills
end

#subscriptionsObject



121
122
123
# File 'lib/CC/CC.rb', line 121

def subscriptions()
	return @subscriptions
end

#tasksObject



125
126
127
# File 'lib/CC/CC.rb', line 125

def tasks()
	return @tasks
end

#teamsObject



109
110
111
# File 'lib/CC/CC.rb', line 109

def teams()
	return @teams
end

#thisObject



41
42
43
# File 'lib/CC/CC.rb', line 41

def this()
	puts "CiscoWebex::ContactCenter - Org:#{@org_id}"
end

#user_profilesObject



153
154
155
# File 'lib/CC/CC.rb', line 153

def user_profiles()
	return @user_profiles
end

#usersObject



105
106
107
# File 'lib/CC/CC.rb', line 105

def users()
	return @users
end