freeclimb 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +64 -41
  4. data/docs/AccountRequest.md +4 -4
  5. data/docs/AccountResult.md +12 -12
  6. data/docs/AccountResultAllOf.md +8 -8
  7. data/docs/AddToConference.md +35 -0
  8. data/docs/AddToConferenceAllOf.md +35 -0
  9. data/docs/ApplicationList.md +9 -9
  10. data/docs/ApplicationListAllOf.md +2 -2
  11. data/docs/ApplicationRequest.md +9 -9
  12. data/docs/ApplicationResult.md +14 -14
  13. data/docs/ApplicationResultAllOf.md +10 -10
  14. data/docs/AvailableNumber.md +7 -7
  15. data/docs/AvailableNumberList.md +9 -9
  16. data/docs/AvailableNumberListAllOf.md +2 -2
  17. data/docs/BuyIncomingNumberRequest.md +5 -5
  18. data/docs/CallList.md +9 -9
  19. data/docs/CallListAllOf.md +2 -2
  20. data/docs/CallResult.md +20 -20
  21. data/docs/CallResultAllOf.md +16 -16
  22. data/docs/ConferenceList.md +9 -9
  23. data/docs/ConferenceListAllOf.md +2 -2
  24. data/docs/ConferenceParticipantList.md +9 -9
  25. data/docs/ConferenceParticipantListAllOf.md +2 -2
  26. data/docs/ConferenceParticipantResult.md +11 -11
  27. data/docs/ConferenceParticipantResultAllOf.md +7 -7
  28. data/docs/ConferenceResult.md +15 -15
  29. data/docs/ConferenceResultAllOf.md +11 -11
  30. data/docs/CreateConference.md +27 -0
  31. data/docs/CreateConferenceAllOf.md +27 -0
  32. data/docs/CreateConferenceRequest.md +7 -7
  33. data/docs/Dequeue.md +16 -0
  34. data/docs/DequeueMemberRequest.md +2 -2
  35. data/docs/Enqueue.md +23 -0
  36. data/docs/EnqueueAllOf.md +23 -0
  37. data/docs/FilterLogsRequest.md +3 -3
  38. data/docs/GetDigits.md +31 -0
  39. data/docs/GetDigitsAllOf.md +31 -0
  40. data/docs/GetSpeech.md +41 -0
  41. data/docs/GetSpeechAllOf.md +41 -0
  42. data/docs/IncomingNumberList.md +9 -9
  43. data/docs/IncomingNumberListAllOf.md +2 -2
  44. data/docs/IncomingNumberRequest.md +4 -4
  45. data/docs/IncomingNumberResult.md +14 -14
  46. data/docs/IncomingNumberResultAllOf.md +10 -10
  47. data/docs/LogList.md +9 -9
  48. data/docs/LogListAllOf.md +2 -2
  49. data/docs/LogResult.md +8 -8
  50. data/docs/MakeCallRequest.md +10 -10
  51. data/docs/MessageRequest.md +11 -11
  52. data/docs/MessageRequestAllOf.md +7 -7
  53. data/docs/MessageResult.md +13 -13
  54. data/docs/MessageResultAllOf.md +9 -9
  55. data/docs/MessagesList.md +9 -9
  56. data/docs/MessagesListAllOf.md +2 -2
  57. data/docs/MutableResourceModel.md +5 -5
  58. data/docs/OutDial.md +33 -0
  59. data/docs/OutDialAllOf.md +33 -0
  60. data/docs/PaginationModel.md +8 -8
  61. data/docs/Pause.md +17 -0
  62. data/docs/PauseAllOf.md +17 -0
  63. data/docs/PerclCommand.md +17 -0
  64. data/docs/PerclScript.md +17 -0
  65. data/docs/Play.md +21 -0
  66. data/docs/PlayAllOf.md +21 -0
  67. data/docs/PlayEarlyMedia.md +17 -0
  68. data/docs/PlayEarlyMediaAllOf.md +17 -0
  69. data/docs/QueueList.md +9 -9
  70. data/docs/QueueListAllOf.md +2 -2
  71. data/docs/QueueMember.md +6 -6
  72. data/docs/QueueMemberList.md +9 -9
  73. data/docs/QueueMemberListAllOf.md +2 -2
  74. data/docs/QueueRequest.md +4 -4
  75. data/docs/QueueResult.md +12 -12
  76. data/docs/QueueResultAllOf.md +8 -8
  77. data/docs/RecordUtterance.md +27 -0
  78. data/docs/RecordUtteranceAllOf.md +27 -0
  79. data/docs/RecordingList.md +9 -9
  80. data/docs/RecordingListAllOf.md +2 -2
  81. data/docs/RecordingResult.md +10 -10
  82. data/docs/RecordingResultAllOf.md +6 -6
  83. data/docs/Redirect.md +17 -0
  84. data/docs/RedirectAllOf.md +17 -0
  85. data/docs/RemoveFromConference.md +17 -0
  86. data/docs/RemoveFromConferenceAllOf.md +17 -0
  87. data/docs/Say.md +25 -0
  88. data/docs/SayAllOf.md +25 -0
  89. data/docs/SendDigits.md +19 -0
  90. data/docs/SendDigitsAllOf.md +19 -0
  91. data/docs/SetListen.md +19 -0
  92. data/docs/SetListenAllOf.md +19 -0
  93. data/docs/SetTalk.md +19 -0
  94. data/docs/SetTalkAllOf.md +19 -0
  95. data/docs/Sms.md +23 -0
  96. data/docs/SmsAllOf.md +23 -0
  97. data/docs/StartRecordCall.md +16 -0
  98. data/docs/TerminateConference.md +17 -0
  99. data/docs/TerminateConferenceAllOf.md +17 -0
  100. data/docs/UpdateCallRequest.md +3 -3
  101. data/docs/UpdateConferenceParticipantRequest.md +4 -4
  102. data/docs/UpdateConferenceRequest.md +5 -5
  103. data/lib/freeclimb/api_client.rb +1 -1
  104. data/lib/freeclimb/models/add_to_conference.rb +320 -0
  105. data/lib/freeclimb/models/add_to_conference_all_of.rb +307 -0
  106. data/lib/freeclimb/models/create_conference.rb +275 -0
  107. data/lib/freeclimb/models/create_conference_all_of.rb +262 -0
  108. data/lib/freeclimb/models/dequeue.rb +209 -0
  109. data/lib/freeclimb/models/enqueue.rb +265 -0
  110. data/lib/freeclimb/models/enqueue_all_of.rb +252 -0
  111. data/lib/freeclimb/models/get_digits.rb +297 -0
  112. data/lib/freeclimb/models/get_digits_all_of.rb +284 -0
  113. data/lib/freeclimb/models/get_speech.rb +352 -0
  114. data/lib/freeclimb/models/get_speech_all_of.rb +339 -0
  115. data/lib/freeclimb/models/out_dial.rb +320 -0
  116. data/lib/freeclimb/models/out_dial_all_of.rb +307 -0
  117. data/lib/freeclimb/models/pause.rb +225 -0
  118. data/lib/freeclimb/models/pause_all_of.rb +212 -0
  119. data/lib/freeclimb/models/percl_command.rb +211 -0
  120. data/lib/freeclimb/models/percl_script.rb +210 -0
  121. data/lib/freeclimb/models/play.rb +245 -0
  122. data/lib/freeclimb/models/play_all_of.rb +232 -0
  123. data/lib/freeclimb/models/play_early_media.rb +225 -0
  124. data/lib/freeclimb/models/play_early_media_all_of.rb +212 -0
  125. data/lib/freeclimb/models/record_utterance.rb +275 -0
  126. data/lib/freeclimb/models/record_utterance_all_of.rb +262 -0
  127. data/lib/freeclimb/models/redirect.rb +220 -0
  128. data/lib/freeclimb/models/redirect_all_of.rb +207 -0
  129. data/lib/freeclimb/models/remove_from_conference.rb +225 -0
  130. data/lib/freeclimb/models/remove_from_conference_all_of.rb +212 -0
  131. data/lib/freeclimb/models/say.rb +265 -0
  132. data/lib/freeclimb/models/say_all_of.rb +252 -0
  133. data/lib/freeclimb/models/send_digits.rb +235 -0
  134. data/lib/freeclimb/models/send_digits_all_of.rb +222 -0
  135. data/lib/freeclimb/models/set_listen.rb +235 -0
  136. data/lib/freeclimb/models/set_listen_all_of.rb +222 -0
  137. data/lib/freeclimb/models/set_talk.rb +235 -0
  138. data/lib/freeclimb/models/set_talk_all_of.rb +222 -0
  139. data/lib/freeclimb/models/sms.rb +265 -0
  140. data/lib/freeclimb/models/sms_all_of.rb +252 -0
  141. data/lib/freeclimb/models/start_record_call.rb +209 -0
  142. data/lib/freeclimb/models/terminate_conference.rb +225 -0
  143. data/lib/freeclimb/models/terminate_conference_all_of.rb +212 -0
  144. data/lib/freeclimb/version.rb +1 -1
  145. data/lib/freeclimb.rb +69 -1
  146. data/spec/models/add_to_conference_spec.rb +95 -0
  147. data/spec/models/create_conference_spec.rb +71 -0
  148. data/spec/models/dequeue_spec.rb +35 -0
  149. data/spec/models/enqueue_spec.rb +59 -0
  150. data/spec/models/get_digits_spec.rb +83 -0
  151. data/spec/models/get_speech_spec.rb +113 -0
  152. data/spec/models/out_dial_spec.rb +89 -0
  153. data/spec/models/pause_spec.rb +41 -0
  154. data/spec/models/percl_command_spec.rb +41 -0
  155. data/spec/models/percl_script_spec.rb +41 -0
  156. data/spec/models/play_early_media_spec.rb +41 -0
  157. data/spec/models/play_spec.rb +53 -0
  158. data/spec/models/record_utterance_spec.rb +71 -0
  159. data/spec/models/redirect_spec.rb +41 -0
  160. data/spec/models/remove_from_conference_spec.rb +41 -0
  161. data/spec/models/say_spec.rb +65 -0
  162. data/spec/models/send_digits_spec.rb +47 -0
  163. data/spec/models/set_listen_spec.rb +47 -0
  164. data/spec/models/set_talk_spec.rb +47 -0
  165. data/spec/models/sms_spec.rb +59 -0
  166. data/spec/models/start_record_call_spec.rb +35 -0
  167. data/spec/models/terminate_conference_spec.rb +41 -0
  168. metadata +126 -30
  169. data/docs/Percl.md +0 -697
  170. data/lib/percl/calls.rb +0 -43
  171. data/lib/percl/conference_participants.rb +0 -40
  172. data/lib/percl/conferences.rb +0 -21
  173. data/lib/percl/ivr.rb +0 -63
  174. data/lib/percl/jsonable.rb +0 -23
  175. data/lib/percl/percl.rb +0 -29
  176. data/lib/percl/queue_members.rb +0 -15
  177. data/lib/percl/recordings.rb +0 -15
  178. data/lib/percl/sms.rb +0 -11
  179. data/spec/percl/calls_spec.rb +0 -111
  180. data/spec/percl/conference_participant_spec.rb +0 -96
  181. data/spec/percl/conference_spec.rb +0 -46
  182. data/spec/percl/ivr_spec.rb +0 -155
  183. data/spec/percl/jsonable_spec.rb +0 -28
  184. data/spec/percl/percl_spec.rb +0 -31
  185. data/spec/percl/queue_members_spec.rb +0 -35
  186. data/spec/percl/recordings_spec.rb +0 -32
  187. data/spec/percl/sms_spec.rb +0 -29
data/lib/percl/calls.rb DELETED
@@ -1,43 +0,0 @@
1
- module Percl
2
- class OutDial < JSONable
3
- attr_accessor :ifMachine
4
- attr_accessor :ifMachineUrl
5
- attr_accessor :sendDigits
6
- attr_accessor :statusCallbackUrl
7
- attr_accessor :timeout
8
- def initialize(actionUrl, callConnectUrl, callingNumber, destination)
9
- @actionUrl = actionUrl
10
- @callConnectUrl = callConnectUrl
11
- @callingNumber = callingNumber
12
- @destination = destination
13
- end
14
- end
15
-
16
- class Hangup < JSONable
17
- attr_accessor :callId
18
- attr_accessor :reason
19
- end
20
-
21
- class Pause < JSONable
22
- def initialize(length)
23
- @length = length
24
- end
25
- end
26
-
27
- class Redirect < JSONable
28
- def initialize(actionUrl)
29
- @actionUrl = actionUrl
30
- end
31
- end
32
-
33
- class SendDigits < JSONable
34
- attr_accessor :pauseMs
35
- def initialize(digits)
36
- @digits = digits
37
- end
38
- end
39
-
40
- class Reject < JSONable
41
- attr_accessor :reason
42
- end
43
- end
@@ -1,40 +0,0 @@
1
- module Percl
2
- class AddToConference < JSONable
3
- attr_accessor :startConfOnEnter
4
- attr_accessor :talk
5
- attr_accessor :listen
6
- attr_accessor :allowCallControl
7
- attr_accessor :callControlSequence
8
- attr_accessor :callControlUrl
9
- attr_accessor :leaveConferenceUrl
10
- attr_accessor :notificationUrl
11
-
12
- def initialize(confId, callId)
13
- @conferenceId = confId
14
- @callId = callId
15
- end
16
-
17
- end
18
-
19
- class RemoveFromConference < JSONable
20
- def initialize(callId)
21
- @callId = callId
22
- end
23
- end
24
-
25
- class SetListen < JSONable
26
- attr_accessor :listen
27
-
28
- def initialize(callId)
29
- @callId = callId
30
- end
31
- end
32
-
33
- class SetTalk < JSONable
34
- attr_accessor :talk
35
-
36
- def initialize(callId)
37
- @callId = callId
38
- end
39
- end
40
- end
@@ -1,21 +0,0 @@
1
- module Percl
2
- class CreateConference < JSONable
3
-
4
- attr_accessor :alias
5
- attr_accessor :playBeep
6
- attr_accessor :record
7
- attr_accessor :waitUrl
8
- attr_accessor :statusCallbackUrl
9
-
10
- def initialize(actionUrl)
11
- @actionUrl = actionUrl
12
- end
13
-
14
- end
15
-
16
- class TerminateConference < JSONable
17
- def initialize(confId)
18
- @conferenceId = confId
19
- end
20
- end
21
- end
data/lib/percl/ivr.rb DELETED
@@ -1,63 +0,0 @@
1
- module Percl
2
- class PlayEarlyMedia < JSONable
3
- def initialize(file)
4
- @file = file
5
- end
6
- end
7
-
8
- class Say < JSONable
9
- attr_accessor :language
10
- attr_accessor :loop
11
- attr_accessor :conferenceId
12
- attr_accessor :enforcePCI
13
-
14
- def initialize(response)
15
- @text = response
16
- end
17
-
18
- end
19
-
20
- class Play < JSONable
21
- attr_accessor :loop
22
- attr_accessor :conferenceId
23
-
24
- def initialize(file)
25
- @file = file
26
- end
27
- end
28
-
29
- class GetDigits < JSONable
30
- attr_accessor :initialTimeoutMs
31
- attr_accessor :digitTimeoutMs
32
- attr_accessor :finishOnKey
33
- attr_accessor :minDigits
34
- attr_accessor :maxDigits
35
- attr_accessor :flushBuffer
36
- attr_accessor :prompts
37
- attr_accessor :enforcePCI
38
-
39
- def initialize(actionUrl)
40
- @actionUrl = actionUrl
41
- end
42
-
43
- end
44
-
45
- class GetSpeech < JSONable
46
- attr_accessor :grammarType
47
- attr_accessor :grammarRule
48
- attr_accessor :playBeep
49
- attr_accessor :prompts
50
- attr_accessor :noInputTimeoutMs
51
- attr_accessor :recognitionTimeoutMs
52
- attr_accessor :confidenceThreshold
53
- attr_accessor :speechCompleteTimeoutMs
54
- attr_accessor :speechIncompleteTimeoutMs
55
- attr_accessor :sensitivityLevel
56
- attr_accessor :enforcePCI
57
-
58
- def initialize(actionUrl, grammarFile)
59
- @actionUrl = actionUrl
60
- @grammarFile = grammarFile
61
- end
62
- end
63
- end
@@ -1,23 +0,0 @@
1
- class JSONable
2
- def as_json
3
- hash = {}
4
- self.instance_variables.each do |var|
5
- val = self.instance_variable_get var
6
- if val.instance_of? Array
7
- arr = []
8
- val.each do |prompt|
9
- arr.push prompt.as_json
10
- end
11
- hash[var.to_s.delete "@"] = arr
12
- else
13
- hash[var.to_s.delete "@"] = val
14
- end
15
- end
16
- {self.class.name.split('::').last => hash}
17
- end
18
- def from_json! string
19
- JSON.load(string).each do |var, val|
20
- self.instance_variable_set var, val
21
- end
22
- end
23
- end
data/lib/percl/percl.rb DELETED
@@ -1,29 +0,0 @@
1
- require_relative 'jsonable'
2
- require 'json'
3
- require_relative 'calls'
4
- require_relative 'conferences'
5
- require_relative 'conference_participants'
6
- require_relative 'ivr'
7
- require_relative 'queue_members'
8
- require_relative 'recordings'
9
- require_relative 'sms'
10
-
11
- module Percl
12
- class Script
13
- def initialize
14
- @commands = []
15
- end
16
-
17
- def add(command)
18
- @commands.push(command)
19
- end
20
-
21
- def to_json
22
- hash = []
23
- @commands.each do |command|
24
- hash.push(command.as_json)
25
- end
26
- hash.to_json
27
- end
28
- end
29
- end
@@ -1,15 +0,0 @@
1
- module Percl
2
- class Enqueue < JSONable
3
- attr_accessor :notificationUrl
4
-
5
- def initialize(queueId, waitUrl, actionUrl)
6
- @queueId = queueId
7
- @waitUrl = waitUrl
8
- @actionUrl = actionUrl
9
- end
10
-
11
- end
12
-
13
- class Dequeue < JSONable
14
- end
15
- end
@@ -1,15 +0,0 @@
1
- module Percl
2
- class RecordUtterance < JSONable
3
- attr_accessor :silenceTimeoutMs
4
- attr_accessor :finishOnKey
5
- attr_accessor :maxLengthSec
6
- attr_accessor :autoStart
7
-
8
- def initialize(actionUrl)
9
- @actionUrl = actionUrl
10
- end
11
- end
12
-
13
- class StartRecordCall < JSONable
14
- end
15
- end
data/lib/percl/sms.rb DELETED
@@ -1,11 +0,0 @@
1
- module Percl
2
- class Sms < JSONable
3
- attr_accessor :notificationUrl
4
-
5
- def initialize(to, from, text)
6
- @to = to
7
- @from = from
8
- @text = text
9
- end
10
- end
11
- end
@@ -1,111 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe 'calls' do
4
- describe 'OutDial' do
5
- describe 'initialize' do
6
- before do
7
- @instance = Percl::OutDial.new('MOCK_ACTION_URL', 'MOCK_CALL_CONNECT_URL', 'MOCK_CALLING_NUMBER', 'MOCK_DESTINATION')
8
- end
9
- it 'should set actionUrl' do
10
- actionUrl = @instance.instance_variable_get :@actionUrl
11
- expect(actionUrl).to eq('MOCK_ACTION_URL')
12
- end
13
- it 'should set callConnectUrl' do
14
- callConnectUrl = @instance.instance_variable_get :@callConnectUrl
15
- expect(callConnectUrl).to eq('MOCK_CALL_CONNECT_URL')
16
- end
17
- it 'should set callingNumber' do
18
- callingNumber = @instance.instance_variable_get :@callingNumber
19
- expect(callingNumber).to eq('MOCK_CALLING_NUMBER')
20
- end
21
- it 'should set destinationNumber' do
22
- destination = @instance.instance_variable_get :@destination
23
- expect(destination).to eq('MOCK_DESTINATION')
24
- end
25
- end
26
- describe 'instance variables' do
27
- before do
28
- @instance = Percl::OutDial.new('MOCK_ACTION_URL', 'MOCK_CALL_CONNECT_URL', 'MOCK_CALLING_NUMBER', 'MOCK_DESTINATION')
29
- end
30
- it 'should have ifMachine' do
31
- expect(@instance).to respond_to(:ifMachine)
32
- end
33
- it 'should have ifMachineUrl' do
34
- expect(@instance).to respond_to(:ifMachineUrl)
35
- end
36
- it 'should have sendDigits' do
37
- expect(@instance).to respond_to(:sendDigits)
38
- end
39
- it 'should have statusCallbackUrl' do
40
- expect(@instance).to respond_to(:statusCallbackUrl)
41
- end
42
- it 'should have timeout' do
43
- expect(@instance).to respond_to(:timeout)
44
- end
45
- end
46
- end
47
- describe 'Hangup' do
48
- describe 'instance variables' do
49
- before do
50
- @instance = Percl::Hangup.new
51
- end
52
- it 'should have callId' do
53
- expect(@instance).to respond_to(:callId)
54
- end
55
- it 'should have reason' do
56
- expect(@instance).to respond_to(:reason)
57
- end
58
- end
59
- end
60
- describe 'Pause' do
61
- describe 'initialize' do
62
- before do
63
- @instance = Percl::Pause.new(10)
64
- end
65
- it 'should set length' do
66
- actual = @instance.instance_variable_get :@length
67
- expect(actual).to eq(10)
68
- end
69
- end
70
- end
71
- describe 'Redirect' do
72
- describe 'initialize' do
73
- before do
74
- @instance = Percl::Redirect.new('MOCK_ACTION_URL')
75
- end
76
- it 'should set actionUrl' do
77
- url = @instance.instance_variable_get :@actionUrl
78
- expect(url).to eq('MOCK_ACTION_URL')
79
- end
80
- end
81
- end
82
- describe 'SendDigits' do
83
- describe 'initialize' do
84
- before do
85
- @instance = Percl::SendDigits.new('1234')
86
- end
87
- it 'should set actionUrl' do
88
- digits = @instance.instance_variable_get :@digits
89
- expect(digits).to eq('1234')
90
- end
91
- end
92
- describe 'instance variables' do
93
- before do
94
- @instance = Percl::SendDigits.new('1234')
95
- end
96
- it 'should have pauseMs' do
97
- expect(@instance).to respond_to(:pauseMs)
98
- end
99
- end
100
- end
101
- describe 'Reject' do
102
- describe 'instance variables' do
103
- before do
104
- @instance = Percl::Reject.new
105
- end
106
- it 'should have reason' do
107
- expect(@instance).to respond_to(:reason)
108
- end
109
- end
110
- end
111
- end
@@ -1,96 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe 'conference participants' do
4
- describe 'AddToConference' do
5
- describe 'initialize' do
6
- before do
7
- @instance = Percl::AddToConference.new('MOCK_CONF_ID', 'MOCK_CALL_ID')
8
- end
9
- it 'should set conferenceId' do
10
- addToConf = @instance.instance_variable_get :@conferenceId
11
- expect(addToConf).to eq('MOCK_CONF_ID')
12
- end
13
- it 'should set callId' do
14
- callId = @instance.instance_variable_get :@callId
15
- end
16
- end
17
- describe 'instance variables' do
18
- before do
19
- @instance = Percl::AddToConference.new('MOCK_CONF_ID', 'MOCK_CALL_ID')
20
- end
21
- it 'should have startConfOnEnter' do
22
- expect(@instance).to respond_to(:startConfOnEnter)
23
- end
24
- it 'should have talk' do
25
- expect(@instance).to respond_to(:talk)
26
- end
27
- it 'should have listen' do
28
- expect(@instance).to respond_to(:listen)
29
- end
30
- it 'should have allowCallControl' do
31
- expect(@instance).to respond_to(:allowCallControl)
32
- end
33
- it 'should have callControlSequence' do
34
- expect(@instance).to respond_to(:callControlSequence)
35
- end
36
- it 'should have callControlUrl' do
37
- expect(@instance).to respond_to(:callControlUrl)
38
- end
39
- it 'should have leaveConferenceUrl' do
40
- expect(@instance).to respond_to(:leaveConferenceUrl)
41
- end
42
- it 'should have notificationUrl' do
43
- expect(@instance).to respond_to(:notificationUrl)
44
- end
45
- end
46
- end
47
- describe 'RemoveFromConference' do
48
- describe 'initialize' do
49
- before do
50
- @instance = Percl::RemoveFromConference.new('MOCK_CALL_ID')
51
- end
52
- it 'should set callId' do
53
- callId = @instance.instance_variable_get :@callId
54
- expect(callId).to eq('MOCK_CALL_ID')
55
- end
56
- end
57
- end
58
- describe 'SetListen' do
59
- describe 'initialize' do
60
- before do
61
- @instance = Percl::SetListen.new('MOCK_CALL_ID')
62
- end
63
- it 'should set callId' do
64
- callId = @instance.instance_variable_get :@callId
65
- expect(callId).to eq('MOCK_CALL_ID')
66
- end
67
- end
68
- describe 'instance variables' do
69
- before do
70
- @instance = Percl::SetListen.new('MOCK_CALL_ID')
71
- end
72
- it 'should have listen' do
73
- expect(@instance).to respond_to(:listen)
74
- end
75
- end
76
- end
77
- describe 'SetTalk' do
78
- describe 'initialize' do
79
- before do
80
- @instance = Percl::SetTalk.new('MOCK_CALL_ID')
81
- end
82
- it 'should set callId' do
83
- callId = @instance.instance_variable_get :@callId
84
- expect(callId).to eq('MOCK_CALL_ID')
85
- end
86
- end
87
- describe 'instance variables' do
88
- before do
89
- @instance = Percl::SetTalk.new('MOCK_CALL_ID')
90
- end
91
- it 'should have talk' do
92
- expect(@instance).to respond_to(:talk)
93
- end
94
- end
95
- end
96
- end
@@ -1,46 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe 'Conferences' do
4
- describe 'CreateConference' do
5
- describe 'initialize' do
6
- before do
7
- @instance = Percl::CreateConference.new('MOCK_ACTION_URL')
8
- end
9
- it 'should set actionUrl' do
10
- actionUrl = @instance.instance_variable_get :@actionUrl
11
- expect(actionUrl).to eq('MOCK_ACTION_URL')
12
- end
13
- end
14
- describe 'instance variables' do
15
- before do
16
- @instance = Percl::CreateConference.new('MOCK_ACTION_URL')
17
- end
18
- it 'should have alias' do
19
- expect(@instance).to respond_to(:alias)
20
- end
21
- it 'should have playBeep' do
22
- expect(@instance).to respond_to(:playBeep)
23
- end
24
- it 'should have record' do
25
- expect(@instance).to respond_to(:record)
26
- end
27
- it 'should have waitUrl' do
28
- expect(@instance).to respond_to(:waitUrl)
29
- end
30
- it 'should have statusCallbackUrl' do
31
- expect(@instance).to respond_to(:statusCallbackUrl)
32
- end
33
- end
34
- end
35
- describe 'TerminateConference' do
36
- describe 'initialize' do
37
- before do
38
- @instance = Percl::TerminateConference.new('MOCK_CONF_ID')
39
- end
40
- it 'should set conferenceId' do
41
- confId = @instance.instance_variable_get :@conferenceId
42
- expect(confId).to eq('MOCK_CONF_ID')
43
- end
44
- end
45
- end
46
- end
@@ -1,155 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe 'ivr' do
4
- describe 'PlayEarlyMedia' do
5
- describe 'initialize' do
6
- before do
7
- @instance = Percl::PlayEarlyMedia.new('MOCK_FILE')
8
- end
9
- it 'should set file' do
10
- file = @instance.instance_variable_get(:@file)
11
- expect(file).to eq('MOCK_FILE')
12
- end
13
- end
14
- end
15
- describe 'Say' do
16
- describe 'initialize' do
17
- before do
18
- @instance = Percl::Say.new('MOCK_RESPONSE')
19
- end
20
- it 'should set text' do
21
- text = @instance.instance_variable_get :@text
22
- expect(text).to eq('MOCK_RESPONSE')
23
- end
24
- end
25
- describe 'instance variables' do
26
- before do
27
- @instance = Percl::Say.new('MOCK_RESPONSE')
28
- end
29
- it 'should have language' do
30
- expect(@instance).to respond_to(:language)
31
- end
32
- it 'should have loop' do
33
- expect(@instance).to respond_to(:loop)
34
- end
35
- it 'should have conferenceId' do
36
- expect(@instance).to respond_to(:conferenceId)
37
- end
38
- it 'should have enforcePCI' do
39
- expect(@instance).to respond_to(:enforcePCI)
40
- end
41
- end
42
- end
43
- describe 'Play' do
44
- describe 'initialize' do
45
- before do
46
- @instance = Percl::Play.new('MOCK_FILE')
47
- end
48
- it 'should have file' do
49
- file = @instance.instance_variable_get :@file
50
- expect(file).to eq('MOCK_FILE')
51
- end
52
- end
53
- describe 'instance variables' do
54
- before do
55
- @instance = Percl::Play.new('MOCK_FILE')
56
- end
57
- it 'should have loop' do
58
- expect(@instance).to respond_to(:loop)
59
- end
60
- it 'should have conferenceId' do
61
- expect(@instance).to respond_to(:conferenceId)
62
- end
63
- end
64
- end
65
- describe 'GetDigits' do
66
- describe 'initialize' do
67
- before do
68
- @instance = Percl::GetDigits.new('MOCK_ACTION_URL')
69
- end
70
- it 'should set actionUrl' do
71
- actionUrl = @instance.instance_variable_get :@actionUrl
72
- expect(actionUrl).to eq('MOCK_ACTION_URL')
73
- end
74
- end
75
- describe 'instance variables' do
76
- before do
77
- @instance = Percl::GetDigits.new('MOCK_ACTION_URL')
78
- end
79
- it 'should have initialTimeoutMs' do
80
- expect(@instance).to respond_to(:initialTimeoutMs)
81
- end
82
- it 'should have digitTimeoutMs' do
83
- expect(@instance).to respond_to(:digitTimeoutMs)
84
- end
85
- it 'should have finishOnKey' do
86
- expect(@instance).to respond_to(:finishOnKey)
87
- end
88
- it 'should have minDigits' do
89
- expect(@instance).to respond_to(:minDigits)
90
- end
91
- it 'should have maxDigits' do
92
- expect(@instance).to respond_to(:maxDigits)
93
- end
94
- it 'should have flushBuffer' do
95
- expect(@instance).to respond_to(:flushBuffer)
96
- end
97
- it 'should have prompts' do
98
- expect(@instance).to respond_to(:prompts)
99
- end
100
- it 'should have enforePCI' do
101
- expect(@instance).to respond_to(:enforcePCI)
102
- end
103
- end
104
- end
105
- describe 'GetSpeech' do
106
- describe 'initialize' do
107
- before do
108
- @instance = Percl::GetSpeech.new('MOCK_ACTION_URL', 'MOCK_GRAMMAR_FILE')
109
- end
110
- it 'should set actionUrl' do
111
- actionUrl = @instance.instance_variable_get :@actionUrl
112
- expect(actionUrl).to eq('MOCK_ACTION_URL')
113
- end
114
- it 'should set grammarFile' do
115
- grammarFile = @instance.instance_variable_get :@grammarFile
116
- expect(grammarFile).to eq('MOCK_GRAMMAR_FILE')
117
- end
118
- end
119
- describe 'instance variables' do
120
- before do
121
- @instance = Percl::GetSpeech.new('MOCK_ACTION_URL', 'MOCK_GRAMAR_FILE')
122
- end
123
- it 'should have grammarType' do
124
- expect(@instance).to respond_to(:grammarType)
125
- end
126
- it 'should have grammarRule' do
127
- expect(@instance).to respond_to(:grammarRule)
128
- end
129
- it 'should have playBeep' do
130
- expect(@instance).to respond_to(:playBeep)
131
- end
132
- it 'should have prompts' do
133
- expect(@instance).to respond_to(:prompts)
134
- end
135
- it 'should have noInputTimeoutMs' do
136
- expect(@instance).to respond_to(:noInputTimeoutMs)
137
- end
138
- it 'should have confidenceThreshold' do
139
- expect(@instance).to respond_to(:confidenceThreshold)
140
- end
141
- it 'should have sensitivityLevel' do
142
- expect(@instance).to respond_to(:sensitivityLevel)
143
- end
144
- it 'should have enforePCI' do
145
- expect(@instance).to respond_to(:enforcePCI)
146
- end
147
- it 'should have speechCompleteTimeoutMs' do
148
- expect(@instance).to respond_to(:speechCompleteTimeoutMs)
149
- end
150
- it 'should have speechIncompleteTimeoutMs' do
151
- expect(@instance).to respond_to(:speechIncompleteTimeoutMs)
152
- end
153
- end
154
- end
155
- end