CiscoWebex 0.0.4 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/lib/Admin/AuditEvents.rb +2 -2
  3. data/lib/Admin/Authorizations.rb +6 -4
  4. data/lib/Admin/Licenses.rb +4 -4
  5. data/lib/Admin/Organizations.rb +3 -3
  6. data/lib/Admin/People.rb +5 -5
  7. data/lib/Admin/ResourceGroups.rb +5 -5
  8. data/lib/Admin/Roles.rb +2 -2
  9. data/lib/CC/AddressBooks.rb +4 -4
  10. data/lib/CC/AgentProfiles.rb +4 -4
  11. data/lib/CC/AuxiliaryCodes.rb +4 -4
  12. data/lib/CC/DialPlans.rb +5 -5
  13. data/lib/CC/EntryPointMappings.rb +5 -5
  14. data/lib/CC/EntryPoints.rb +4 -4
  15. data/lib/CC/Journey/Actions.rb +1 -1
  16. data/lib/CC/Journey/Identities.rb +1 -1
  17. data/lib/CC/MultimediaProfiles.rb +5 -5
  18. data/lib/CC/OutboundANI.rb +4 -4
  19. data/lib/CC/Queues.rb +4 -4
  20. data/lib/CC/Sites.rb +4 -4
  21. data/lib/CC/SkillProfiles.rb +4 -4
  22. data/lib/CC/Skills.rb +4 -4
  23. data/lib/CC/Subscriptions.rb +5 -5
  24. data/lib/CC/Teams.rb +4 -4
  25. data/lib/CC/UserProfiles.rb +4 -4
  26. data/lib/CC/Users.rb +4 -4
  27. data/lib/Calling/Locations.rb +8 -9
  28. data/lib/Calling/Voicemail.rb +4 -4
  29. data/lib/Devices/Configurations.rb +3 -3
  30. data/lib/Devices/Endpoints.rb +4 -4
  31. data/lib/Devices/Workspaces.rb +4 -4
  32. data/lib/Devices/Xapi.rb +2 -2
  33. data/lib/Meetings/ControlStatus.rb +5 -2
  34. data/lib/Meetings/Invitees.rb +4 -4
  35. data/lib/Meetings/Participants.rb +3 -3
  36. data/lib/Meetings/Qualities.rb +2 -2
  37. data/lib/Meetings/Registrations.rb +2 -2
  38. data/lib/Meetings/SessionTypes.rb +2 -2
  39. data/lib/Meetings/Templates.rb +2 -2
  40. data/lib/Meetings/Transcripts.rb +1 -1
  41. data/lib/Meetings/WebexMeetings.rb +4 -4
  42. data/lib/Messaging/Attachements.rb +2 -2
  43. data/lib/Messaging/Classifications.rb +2 -2
  44. data/lib/Messaging/Events.rb +2 -2
  45. data/lib/Messaging/Memberships.rb +4 -4
  46. data/lib/Messaging/Messages.rb +10 -11
  47. data/lib/Messaging/People.rb +5 -5
  48. data/lib/Messaging/Rooms.rb +18 -18
  49. data/lib/Messaging/Teams.rb +3 -3
  50. data/lib/REST/Rest.rb +19 -11
  51. data/lib/REST/RestCC.rb +25 -11
  52. data/lib/Toolbox/Toolbox.rb +3 -1
  53. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b9a3373c319a5269e025a977347bf226802d8e3e5d7c1168c17d95bf101663e
4
- data.tar.gz: a04000f7c97c1c4482eb2a958fc349cbb7e87f6f1ce898ca8152227723fd1c9c
3
+ metadata.gz: 1e603ce6af4d1df64c052e66e41e215ca83eb2cfd008523921d951b0395d0421
4
+ data.tar.gz: 8d820b133524143d0bf9455ff103ea2398f7886ce96af9bb48b3d5ec85b5e522
5
5
  SHA512:
6
- metadata.gz: aef6860017643763e700c39b43eb3dbae22d3770728c541506d10c368910dcf5ee80698c192d18323421c06b5c682418959f1a24e27e75f2d0b5ffe507be8870
7
- data.tar.gz: f812c4f691a4bac00b95b3a04aedf7c677742a90b35b678a7f51befc7c90a216db08308befe3eb8216e04c4172de82d96f90aa745bfa6490215271dcab67601b
6
+ metadata.gz: 04674ace2e427ade33c2d0b035556e7445a512b9c2396360b3311b06d25fabcba812182aea08e31f705a46064f74daab1b01882bbdf0e9505c4cd25fd07fdae2
7
+ data.tar.gz: 55cb35a6f2014f32e216229133483e9f39776615cec52ed60405b0f80d53e59999cbf84428fd9c8d6ac6faf14c39e9bc2e834a84621aa4c903de101a01a24294
@@ -56,12 +56,12 @@ module CiscoWebex
56
56
  return False
57
57
  end
58
58
 
59
- def update(id, params)
59
+ def update(params)
60
60
  STDERR.puts "CiscoWebex::Admin::AuditEvents.update() - Metod not implemented"
61
61
  return False
62
62
  end
63
63
 
64
- def patch(id, params)
64
+ def patch(params, id=nil)
65
65
  STDERR.puts "CiscoWebex::Admin::AuditEvents.patch() - Metod not implemented"
66
66
  return False
67
67
  end
@@ -1,14 +1,16 @@
1
1
  module CiscoWebex
2
2
  class Authorizations < Admin
3
3
  @auth_token = nil
4
+ @org_id = nil
4
5
 
5
6
  # initialize object with stored token
6
- def initialize(token=nil)
7
+ def initialize(token=nil, org_id=nil)
7
8
  if token == nil
8
9
  STDERR.puts "Must provide API key for CiscoWebex::Admin::Authorizations"
9
10
  return false
10
11
  else
11
12
  @auth_token = token if token
13
+ @org_id = org_id if org_id
12
14
  end
13
15
  end
14
16
 
@@ -36,15 +38,15 @@ module CiscoWebex
36
38
  end
37
39
 
38
40
  def delete(id)
39
- return CiscoWebex::Rest.delete(@auth_token, "/v1/authorizations/#{id}") rescue false
41
+ return CiscoWebex::Rest.delete(@auth_token, "/v1/authorizations", id) rescue false
40
42
  end
41
43
 
42
- def update(id, params)
44
+ def update(params)
43
45
  STDERR.puts "CiscoWebex::Admin::Authorizations.update() - Metod not implemented"
44
46
  return False
45
47
  end
46
48
 
47
- def patch(id, params)
49
+ def patch(params, id=nil)
48
50
  STDERR.puts "CiscoWebex::Admin::Authorizations.patch() - Metod not implemented"
49
51
  return False
50
52
  end
@@ -34,14 +34,14 @@ module CiscoWebex
34
34
  end
35
35
 
36
36
  def delete(id)
37
- return CiscoWebex::Rest.delete(@auth_token, "/v1/licenses/#{id}") rescue false
37
+ return CiscoWebex::Rest.delete(@auth_token, "/v1/licenses", id) rescue false
38
38
  end
39
39
 
40
- def update(id, params)
41
- return CiscoWebex::Rest.put(@auth_token, "/v1/licenses/#{id}", params) rescue false
40
+ def update(params)
41
+ return CiscoWebex::Rest.put(@auth_token, "/v1/licenses", params) rescue false
42
42
  end
43
43
 
44
- def patch(id, params)
44
+ def patch(params, id=nil)
45
45
  STDERR.puts "CiscoWebex::Teams::Licenses.patch() - Metod not implemented"
46
46
  return False
47
47
  end
@@ -35,15 +35,15 @@ module CiscoWebex
35
35
  end
36
36
 
37
37
  def delete(id)
38
- return CiscoWebex::Rest.delete(@auth_token, "/v1/organizations/#{id}") rescue false
38
+ return CiscoWebex::Rest.delete(@auth_token, "/v1/organizations", id) rescue false
39
39
  end
40
40
 
41
- def update(id, params)
41
+ def update(params)
42
42
  STDERR.puts "CiscoWebex::Teams::Organizations.patch() - Metod not implemented"
43
43
  return False
44
44
  end
45
45
 
46
- def patch(id, params)
46
+ def patch(params, id=nil)
47
47
  STDERR.puts "CiscoWebex::Teams::Organizations.patch() - Metod not implemented"
48
48
  return False
49
49
  end
data/lib/Admin/People.rb CHANGED
@@ -52,7 +52,7 @@ module CiscoWebex
52
52
  else
53
53
  params = { "displayName"=> params }
54
54
  end
55
- elsif param.is_a?(Hash)
55
+ elsif params.is_a?(Hash)
56
56
  STDERR.puts "CiscoWebex::Teams::People.search - require email or displayname for search or custom Hash"
57
57
  return false
58
58
  else
@@ -65,14 +65,14 @@ module CiscoWebex
65
65
  end
66
66
 
67
67
  def delete(id)
68
- return CiscoWebex::Rest.delete(@auth_token, "/v1/people/#{id}") rescue false
68
+ return CiscoWebex::Rest.delete(@auth_token, "/v1/people", id) rescue false
69
69
  end
70
70
 
71
- def update(id, params)
72
- return CiscoWebex::Rest.put(@auth_token, "/v1/people/#{id}", params) rescue false
71
+ def update(params)
72
+ return CiscoWebex::Rest.put(@auth_token, "/v1/people", params) rescue false
73
73
  end
74
74
 
75
- def patch(id, params)
75
+ def patch(params, id=nil)
76
76
  STDERR.puts "CiscoWebex::Teams::People.patch() - Metod not implemented"
77
77
  return False
78
78
  end
@@ -49,12 +49,12 @@ module CiscoWebex
49
49
  return False
50
50
  end
51
51
 
52
- def update(id, params)
52
+ def update(params)
53
53
  STDERR.puts "CiscoWebex::Admin::ResourceGroups.update() - Metod not implemented"
54
54
  return False
55
55
  end
56
56
 
57
- def patch(id, params)
57
+ def patch(params, id=nil)
58
58
  STDERR.puts "CiscoWebex::Admin::ResourceGroups.patch() - Metod not implemented"
59
59
  return False
60
60
  end
@@ -104,11 +104,11 @@ module CiscoWebex
104
104
  return False
105
105
  end
106
106
 
107
- def update(id, params)
108
- return CiscoWebex::Rest.put(@auth_token, "/v1/resourceGroups/memberships/#{id}", params, limit) rescue false
107
+ def update(params)
108
+ return CiscoWebex::Rest.put(@auth_token, "/v1/resourceGroups/memberships", params, limit) rescue false
109
109
  end
110
110
 
111
- def patch(id, params)
111
+ def patch(params, id=nil)
112
112
  STDERR.puts "CiscoWebex::Admin::ResourceGroups::Memberships.patch() - Metod not implemented"
113
113
  return False
114
114
  end
data/lib/Admin/Roles.rb CHANGED
@@ -46,12 +46,12 @@ module CiscoWebex
46
46
  return False
47
47
  end
48
48
 
49
- def update(id, params)
49
+ def update(params)
50
50
  STDERR.puts "CiscoWebex::Admin::Roles.update() - Metod not implemented"
51
51
  return False
52
52
  end
53
53
 
54
- def patch(id, params)
54
+ def patch(params, id=nil)
55
55
  STDERR.puts "CiscoWebex::Admin::Roles.patch() - Metod not implemented"
56
56
  return False
57
57
  end
@@ -40,14 +40,14 @@ module CiscoWebex
40
40
  end
41
41
 
42
42
  def delete(id)
43
- return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/address-book/#{id}") rescue false
43
+ return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/address-book", id) rescue false
44
44
  end
45
45
 
46
- def update(id, params)
47
- return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/address-book/#{id}", params) rescue false
46
+ def update(params)
47
+ return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/address-book", params) rescue false
48
48
  end
49
49
 
50
- def patch(id, params)
50
+ def patch(params)
51
51
  return CiscoWebex::RestCC.patch(@auth_token, "/organization/#{@org_id}/address-book/#{id}", params) rescue false
52
52
  end
53
53
  end
@@ -56,14 +56,14 @@ module CiscoWebex
56
56
  end
57
57
 
58
58
  def delete(id)
59
- return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/agent-profile/#{id}") rescue false
59
+ return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/agent-profile", id) rescue false
60
60
  end
61
61
 
62
- def update(id, params)
63
- return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/agent-profile/#{id}", params) rescue false
62
+ def update(params)
63
+ return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/agent-profile", params) rescue false
64
64
  end
65
65
 
66
- def patch(id, params)
66
+ def patch(params, id=nil)
67
67
  return CiscoWebex::RestCC.patch(@auth_token, "/organization/#{@org_id}/agent-profile/#{id}", params) rescue false
68
68
  end
69
69
  end
@@ -40,14 +40,14 @@ module CiscoWebex
40
40
  end
41
41
 
42
42
  def delete(id)
43
- return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/auxiliary-code/#{id}") rescue false
43
+ return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/auxiliary-code", id) rescue false
44
44
  end
45
45
 
46
- def update(id, params)
47
- return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/auxiliary-code/#{id}", params) rescue false
46
+ def update(params)
47
+ return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/auxiliary-code", params) rescue false
48
48
  end
49
49
 
50
- def patch(id, params)
50
+ def patch(params, id=nil)
51
51
  return CiscoWebex::RestCC.patch(@auth_token, "/organization/#{@org_id}/auxiliary-code/#{id}", params) rescue false
52
52
  end
53
53
  end
data/lib/CC/DialPlans.rb CHANGED
@@ -40,15 +40,15 @@ module CiscoWebex
40
40
  end
41
41
 
42
42
  def delete(id)
43
- return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/dial-plan/#{id}") rescue false
43
+ return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/dial-plan", id) rescue false
44
44
  end
45
45
 
46
- def update(id, params)
47
- return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/dial-plan/#{id}", params) rescue false
46
+ def update(params)
47
+ return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/dial-plan", params) rescue false
48
48
  end
49
49
 
50
- def patch(id, params)
51
- STDERR.puts "PATCH not Implemented"
50
+ def patch(params, id=nil)
51
+ STDERR.puts "CiscoWebex::ContactCenter::DialPlans.patch(): not Implemented"
52
52
  return false
53
53
  end
54
54
  end
@@ -40,16 +40,16 @@ module CiscoWebex
40
40
  end
41
41
 
42
42
  def delete(id)
43
- return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/dial-number/#{id}") rescue false
43
+ return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/dial-number", id) rescue false
44
44
  end
45
45
 
46
- def update(id, params)
47
- return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/dial-number/#{id}", params) rescue false
46
+ def update(params)
47
+ return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/dial-number", params) rescue false
48
48
  end
49
49
 
50
50
  def patch(id, params)
51
- STDERR.puts "PATCH not Implemented."
52
- return False
51
+ STDERR.puts "CiscoWebex::ContactCenter::EntryPointMappings.patch(): not Implemented."
52
+ return false
53
53
  end
54
54
  end
55
55
  end
@@ -40,14 +40,14 @@ module CiscoWebex
40
40
  end
41
41
 
42
42
  def delete(id)
43
- return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/entry-point/#{id}") rescue false
43
+ return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/entry-point", id) rescue false
44
44
  end
45
45
 
46
- def update(id, params)
47
- return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/entry-point/#{id}", params) rescue false
46
+ def update(params)
47
+ return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/entry-point", params) rescue false
48
48
  end
49
49
 
50
- def patch(id, params)
50
+ def patch(params, id=nil)
51
51
  return CiscoWebex::RestCC.patch(@auth_token, "/organization/#{@org_id}/entry-point/#{id}", params) rescue false
52
52
  end
53
53
  end
@@ -35,7 +35,7 @@ module CiscoWebex
35
35
  end
36
36
 
37
37
  def delete(id)
38
- return CiscoWebex::RestCC.delete(@auth_token, "/v1/journey/actions/#{id}")['data']
38
+ return CiscoWebex::RestCC.delete(@auth_token, "/v1/journey/actions", id)['data']
39
39
  end
40
40
  end
41
41
  end
@@ -31,7 +31,7 @@ module CiscoWebex
31
31
  end
32
32
 
33
33
  def delete(id)
34
- return CiscoWebex::RestCC.delete(@auth_token, "/v1/journey/identities/#{id}")
34
+ return CiscoWebex::RestCC.delete(@auth_token, "/v1/journey/identities", id)
35
35
  end
36
36
 
37
37
  def create(params)
@@ -36,16 +36,16 @@ module CiscoWebex
36
36
  end
37
37
 
38
38
  def delete(id)
39
- return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/multimedia-profile/#{id}") rescue false
39
+ return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/multimedia-profile", id) rescue false
40
40
  end
41
41
 
42
- def update(id, params)
43
- return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/multimedia-profile/#{id}", params) rescue false
42
+ def update(params)
43
+ return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/multimedia-profile", params) rescue false
44
44
  end
45
45
 
46
46
  def patch(id, params)
47
- return False
48
- # return CiscoWebex::RestCC.patch(@auth_token, "/organization/#{@org_id}/multimedia-profile/#{id}", params) rescue false
47
+ STDERR.puts "CiscoWebex::ContactCenter::MultimediaProfile.patch(): not Implemented."
48
+ return false
49
49
  end
50
50
  end
51
51
  end
@@ -40,15 +40,15 @@ module CiscoWebex
40
40
  end
41
41
 
42
42
  def delete(id)
43
- return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/outbound-ani/#{id}") rescue false
43
+ return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/outbound-ani", id) rescue false
44
44
  end
45
45
 
46
- def update(id, params)
47
- return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/outbound-ani/#{id}", params) rescue false
46
+ def update(params)
47
+ return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/outbound-ani", params) rescue false
48
48
  end
49
49
 
50
50
  def patch(id, params)
51
- STDERR.puts "PATCH not Implemented."
51
+ STDERR.puts "CiscoWebex::ContactCenter::OutboundANI.patch(): not Implemented."
52
52
  return False
53
53
  end
54
54
  end
data/lib/CC/Queues.rb CHANGED
@@ -49,14 +49,14 @@ module CiscoWebex
49
49
  end
50
50
 
51
51
  def delete(id)
52
- return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/contact-service-queue/#{id}") rescue false
52
+ return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/contact-service-queue", id) rescue false
53
53
  end
54
54
 
55
- def update(id, params)
56
- return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/contact-service-queue/#{id}", params) rescue false
55
+ def update(params)
56
+ return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/contact-service-queue", params) rescue false
57
57
  end
58
58
 
59
- def patch(id, params)
59
+ def patch(params, id=nil)
60
60
  return CiscoWebex::RestCC.patch(@auth_token, "/organization/#{@org_id}/contact-service-queue/#{id}", params) rescue false
61
61
  end
62
62
  end
data/lib/CC/Sites.rb CHANGED
@@ -36,14 +36,14 @@ module CiscoWebex
36
36
  end
37
37
 
38
38
  def delete(id)
39
- return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/site/#{id}") rescue false
39
+ return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/site", id) rescue false
40
40
  end
41
41
 
42
- def update(id, params)
43
- return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/site/#{id}", params) rescue false
42
+ def update(params)
43
+ return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/site", params) rescue false
44
44
  end
45
45
 
46
- def patch(id, params)
46
+ def patch(params, id=nil)
47
47
  return CiscoWebex::RestCC.patch(@auth_token, "/organization/#{@org_id}/site/#{id}", params) rescue false
48
48
  end
49
49
  end
@@ -40,14 +40,14 @@ module CiscoWebex
40
40
  end
41
41
 
42
42
  def delete(id)
43
- return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/skill-profile/#{id}") rescue false
43
+ return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/skill-profile", id) rescue false
44
44
  end
45
45
 
46
- def update(id, params)
47
- return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/skill-profile/#{id}", params) rescue false
46
+ def update(params)
47
+ return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/skill-profile", params) rescue false
48
48
  end
49
49
 
50
- def patch(id, params)
50
+ def patch(params, id=nil)
51
51
  return CiscoWebex::RestCC.patch(@auth_token, "/organization/#{@org_id}/skill-profile/#{id}", params) rescue false
52
52
  end
53
53
  end
data/lib/CC/Skills.rb CHANGED
@@ -40,14 +40,14 @@ module CiscoWebex
40
40
  end
41
41
 
42
42
  def delete(id)
43
- return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/skill/#{id}") rescue false
43
+ return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/skill", id) rescue false
44
44
  end
45
45
 
46
- def update(id, params)
47
- return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/skill/#{id}", params) rescue false
46
+ def update(params)
47
+ return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/skill", params) rescue false
48
48
  end
49
49
 
50
- def patch(id, params)
50
+ def patch(params, id=nil)
51
51
  return CiscoWebex::RestCC.patch(@auth_token, "/organization/#{@org_id}/skill/#{id}", params) rescue false
52
52
  end
53
53
  end
@@ -40,15 +40,15 @@ module CiscoWebex
40
40
  end
41
41
 
42
42
  def delete(id)
43
- return CiscoWebex::RestCC.delete(@auth_token, "/v1/subscriptions/id") rescue false
43
+ return CiscoWebex::RestCC.delete(@auth_token, "/v1/subscriptions", id) rescue false
44
44
  end
45
45
 
46
- def update(id, params)
47
- return CiscoWebex::RestCC.patch(@auth_token, "/v1/subscriptions/id", params) rescue false
46
+ def update(params)
47
+ return CiscoWebex::RestCC.patch(@auth_token, "/v1/subscriptions", params) rescue false
48
48
  end
49
49
 
50
- def patch(id, params)
51
- return CiscoWebex::RestCC.patch(@auth_token, "/v1/subscriptions/id", params) rescue false
50
+ def patch(params, id=nil)
51
+ return CiscoWebex::RestCC.patch(@auth_token, "/v1/subscriptions/#{id}", params) rescue false
52
52
  end
53
53
  end
54
54
  end
data/lib/CC/Teams.rb CHANGED
@@ -40,14 +40,14 @@ module CiscoWebex
40
40
  end
41
41
 
42
42
  def delete(id)
43
- return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/team/#{id}") rescue false
43
+ return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/team", id) rescue false
44
44
  end
45
45
 
46
- def update(id, params)
47
- return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/team/#{id}", params) rescue false
46
+ def update(params)
47
+ return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/team", params) rescue false
48
48
  end
49
49
 
50
- def patch(id, params)
50
+ def patch(params, id=nil)
51
51
  return CiscoWebex::RestCC.patch(@auth_token, "/organization/#{@org_id}/team/#{id}", params) rescue false
52
52
  end
53
53
  end
@@ -41,14 +41,14 @@ module CiscoWebex
41
41
  end
42
42
 
43
43
  def delete(id)
44
- return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/user-profile/#{id}") rescue false
44
+ return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/user-profile", id) rescue false
45
45
  end
46
46
 
47
- def update(id, params)
48
- return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/user-profile/#{id}", params) rescue false
47
+ def update(params)
48
+ return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/user-profile", params) rescue false
49
49
  end
50
50
 
51
- def patch(id, params)
51
+ def patch(params, id=nil)
52
52
  return CiscoWebex::RestCC.patch(@auth_token, "/organization/#{@org_id}/user-profile/#{id}", params) rescue false
53
53
  end
54
54
  end
data/lib/CC/Users.rb CHANGED
@@ -42,14 +42,14 @@ module CiscoWebex
42
42
  end
43
43
 
44
44
  def delete(id)
45
- return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/user/#{id}") rescue false
45
+ return CiscoWebex::RestCC.delete(@auth_token, "/organization/#{@org_id}/user", id) rescue false
46
46
  end
47
47
 
48
- def update(id, params)
49
- return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/user/#{id}", params) rescue false
48
+ def update(params)
49
+ return CiscoWebex::RestCC.put(@auth_token, "/organization/#{@org_id}/user", params) rescue false
50
50
  end
51
51
 
52
- def patch(id, params)
52
+ def patch(params, id=nil)
53
53
  return CiscoWebex::RestCC.patch(@auth_token, "/organization/#{@org_id}/user/#{id}", params) rescue false
54
54
  end
55
55
  end
@@ -1,6 +1,5 @@
1
1
  module CiscoWebex
2
2
  class Locations < Calling
3
- @base_uri = "/v1/locations"
4
3
  @auth_token = nil
5
4
 
6
5
  # initialize object with stored token
@@ -18,30 +17,30 @@ module CiscoWebex
18
17
  end
19
18
 
20
19
  def get(id)
21
- return CiscoWebex::Rest.get(@auth_token, "#{@base_uri}/#{id}", {}, limit).data rescue false
20
+ return CiscoWebex::Rest.get(@auth_token, "/v1/locations/#{id}", {}, limit).data rescue false
22
21
  end
23
22
 
24
23
  def list(params={}, limit=5000)
25
- return CiscoWebex::Rest.get(@auth_token, @base_uri, params, limit).data rescue false
24
+ return CiscoWebex::Rest.get(@auth_token, "/v1/locations", params, limit).data rescue false
26
25
  end
27
26
 
28
27
  def search(params={}, limit=5000)
29
- return CiscoWebex::Rest.get(@auth_token, @base_uri, params, limit).data rescue false
28
+ return CiscoWebex::Rest.get(@auth_token, "/v1/locations", params, limit).data rescue false
30
29
  end
31
30
 
32
31
  def create(params)
33
- return CiscoWebex::Rest.post(@auth_token, @base_uri, params) rescue false
32
+ return CiscoWebex::Rest.post(@auth_token, "/v1/locations", params) rescue false
34
33
  end
35
34
 
36
35
  def delete(id)
37
- return CiscoWebex::Rest.delete(@auth_token, "#{@base_uri}/#{id}") rescue false
36
+ return CiscoWebex::Rest.delete(@auth_token, "/v1/locations", id) rescue false
38
37
  end
39
38
 
40
- def update(id, params)
41
- return CiscoWebex::Rest.put(@auth_token, "#{@base_uri}/#{id}", params) rescue false
39
+ def update(params)
40
+ return CiscoWebex::Rest.put(@auth_token, "/v1/locations", params) rescue false
42
41
  end
43
42
 
44
- def patch(id, params)
43
+ def patch(params, id=nil)
45
44
  STDERR.puts "CiscoWebex::Calling::Locations.patch() - Metod not implemented"
46
45
  return False
47
46
  end
@@ -41,11 +41,11 @@ module CiscoWebex
41
41
  end
42
42
  end
43
43
 
44
- def delete(message_id=nil)
45
- if message_id
46
- return CiscoWebex::Rest.delete(@auth_token, "/v1/telephony/voiceMessages/#{message_id}")
44
+ def delete(id)
45
+ if id
46
+ return CiscoWebex::Rest.delete(@auth_token, "/v1/telephony/voiceMessages", id)
47
47
  else
48
- STDERR.puts "CiscoWebex::Calling::Voicemail.delete(): Must contain `message_id`"
48
+ STDERR.puts "CiscoWebex::Calling::Voicemail.delete(): Must contain `id`"
49
49
  return false
50
50
  end
51
51
  end
@@ -40,11 +40,11 @@ module CiscoWebex
40
40
  return False
41
41
  end
42
42
 
43
- def update(id, params)
44
- return patch(id, params)
43
+ def update(params, id)
44
+ return patch(params, id)
45
45
  end
46
46
 
47
- def patch(id, params)
47
+ def patch(params, id)
48
48
  return CiscoWebex::Rest.patch(@auth_token, "/v1/deviceConfigurations?deviceId=#{id}", params) rescue false
49
49
  end
50
50
  end
@@ -35,14 +35,14 @@ module CiscoWebex
35
35
  end
36
36
 
37
37
  def delete(id)
38
- return CiscoWebex::Rest.delete(@auth_token, "/v1/devices/#{id}") rescue false
38
+ return CiscoWebex::Rest.delete(@auth_token, "/v1/devices", id) rescue false
39
39
  end
40
40
 
41
- def update(id, params)
42
- return CiscoWebex::Rest.put(@auth_token, "#/v1/devices/#{id}", params) rescue false
41
+ def update(params)
42
+ return CiscoWebex::Rest.put(@auth_token, "#/v1/devices", params) rescue false
43
43
  end
44
44
 
45
- def patch(id, params)
45
+ def patch(params, id=nil)
46
46
  STDERR.puts "CiscoWebex::Devices::Endpoints.patch() - Metod not implemented"
47
47
  return False
48
48
  end