Class: CiscoWebex::ContactCenter
- Inherits:
-
Object
- Object
- CiscoWebex::ContactCenter
- Defined in:
- lib/CC/CC.rb
Direct Known Subclasses
AddressBooks, AgentProfiles, Agents, AuxiliaryCodes, CCTeams, Captures, DialPlans, EntryPointMappings, EntryPoints, Journey, MultimediaProfiles, OutboundANI, Queues, Sites, SkillProfiles, Skills, Subscriptions, Tasks, UserProfiles, Users
Instance Method Summary collapse
-
#address_books ⇒ Object
sub class for Journey methods.
-
#agent_profiles ⇒ Object
sub class for Journey methods.
- #agents ⇒ Object
-
#auxiliary_codes ⇒ Object
sub class for Journey methods.
- #captures ⇒ Object
-
#dial_plans ⇒ Object
sub class for Journey methods.
-
#entry_point_mappings ⇒ Object
sub class for Journey methods.
- #entry_points ⇒ Object
-
#get(uri, params = nil, limit = 50000) ⇒ Object
access to REST API.
-
#head(uri, params = nil) ⇒ Object
access to REST API.
-
#initialize(token = nil) ⇒ ContactCenter
constructor
initialize object with stored token.
-
#journey ⇒ Object
sub class for Journey methods.
- #multimedia_profiles ⇒ Object
-
#my_org ⇒ Object
shortcut for getting the org associated with the token.
-
#outbound_ani ⇒ Object
sub class for Journey methods.
-
#post(uri, params = nil) ⇒ Object
access to REST API.
-
#put(uri, params = nil) ⇒ Object
access to REST API.
- #queues ⇒ Object
- #sites ⇒ Object
- #skill_profiles ⇒ Object
- #skills ⇒ Object
- #subscriptions ⇒ Object
- #tasks ⇒ Object
- #teams ⇒ Object
- #this ⇒ Object
- #user_profiles ⇒ Object
- #users ⇒ Object
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_books ⇒ Object
sub class for Journey methods
96 97 98 |
# File 'lib/CC/CC.rb', line 96 def address_books() return @address_books end |
#agent_profiles ⇒ Object
sub class for Journey methods
91 92 93 |
# File 'lib/CC/CC.rb', line 91 def agent_profiles() return @agent_profiles end |
#agents ⇒ Object
145 146 147 |
# File 'lib/CC/CC.rb', line 145 def agents() return @agents end |
#auxiliary_codes ⇒ Object
sub class for Journey methods
86 87 88 |
# File 'lib/CC/CC.rb', line 86 def auxiliary_codes() return @auxiliary_codes end |
#captures ⇒ Object
137 138 139 |
# File 'lib/CC/CC.rb', line 137 def captures() return @captures end |
#dial_plans ⇒ Object
sub class for Journey methods
81 82 83 |
# File 'lib/CC/CC.rb', line 81 def dial_plans() return @dial_plans end |
#entry_point_mappings ⇒ Object
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_points ⇒ Object
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 |
#journey ⇒ Object
sub class for Journey methods
101 102 103 |
# File 'lib/CC/CC.rb', line 101 def journey() return @journey end |
#multimedia_profiles ⇒ Object
141 142 143 |
# File 'lib/CC/CC.rb', line 141 def multimedia_profiles() return @multimedia_profiles end |
#my_org ⇒ Object
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_ani ⇒ Object
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 |
#queues ⇒ Object
133 134 135 |
# File 'lib/CC/CC.rb', line 133 def queues() return @queues end |
#sites ⇒ Object
149 150 151 |
# File 'lib/CC/CC.rb', line 149 def sites() return @sites end |
#skill_profiles ⇒ Object
129 130 131 |
# File 'lib/CC/CC.rb', line 129 def skill_profiles() return @skill_profiles end |
#skills ⇒ Object
113 114 115 |
# File 'lib/CC/CC.rb', line 113 def skills() return @skills end |
#subscriptions ⇒ Object
121 122 123 |
# File 'lib/CC/CC.rb', line 121 def subscriptions() return @subscriptions end |
#tasks ⇒ Object
125 126 127 |
# File 'lib/CC/CC.rb', line 125 def tasks() return @tasks end |
#teams ⇒ Object
109 110 111 |
# File 'lib/CC/CC.rb', line 109 def teams() return @teams end |
#this ⇒ Object
41 42 43 |
# File 'lib/CC/CC.rb', line 41 def this() puts "CiscoWebex::ContactCenter - Org:#{@org_id}" end |
#user_profiles ⇒ Object
153 154 155 |
# File 'lib/CC/CC.rb', line 153 def user_profiles() return @user_profiles end |
#users ⇒ Object
105 106 107 |
# File 'lib/CC/CC.rb', line 105 def users() return @users end |