freeclimb 2.1.2 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -0
- data/Gemfile +0 -1
- data/README.md +6 -5
- data/docs/AccountResult.md +2 -2
- data/docs/AccountResultAllOf.md +2 -2
- data/docs/AddToConference.md +1 -1
- data/docs/AddToConferenceAllOf.md +1 -1
- data/docs/AvailableNumber.md +0 -2
- data/docs/DefaultApi.md +73 -51
- data/lib/freeclimb/api/default_api.rb +33 -3
- data/lib/freeclimb/api_client.rb +1 -1
- data/lib/freeclimb/models/account_result.rb +8 -8
- data/lib/freeclimb/models/account_result_all_of.rb +8 -8
- data/lib/freeclimb/models/add_to_conference.rb +0 -5
- data/lib/freeclimb/models/add_to_conference_all_of.rb +0 -5
- data/lib/freeclimb/models/available_number.rb +1 -11
- data/lib/freeclimb/models/percl_command.rb +1 -0
- data/lib/freeclimb/utils.rb +34 -0
- data/lib/freeclimb/version.rb +1 -1
- data/spec/api/default_api_spec.rb +119 -675
- data/spec/api/web_mocks.rb +1 -1
- data/spec/api_client_spec.rb +3 -3
- data/spec/configuration_spec.rb +18 -10
- data/spec/models/account_request_spec.rb +19 -5
- data/spec/models/account_result_all_of_spec.rb +81 -0
- data/spec/models/account_result_spec.rb +77 -5
- data/spec/models/add_to_conference_all_of_spec.rb +95 -0
- data/spec/models/add_to_conference_spec.rb +2 -2
- data/spec/models/application_list_all_of_spec.rb +41 -0
- data/spec/models/application_list_spec.rb +55 -5
- data/spec/models/application_request_spec.rb +49 -5
- data/spec/models/application_result_all_of_spec.rb +89 -0
- data/spec/models/application_result_spec.rb +85 -5
- data/spec/models/available_number_list_all_of_spec.rb +41 -0
- data/spec/models/available_number_list_spec.rb +55 -6
- data/spec/models/available_number_spec.rb +37 -5
- data/spec/models/buy_incoming_number_request_spec.rb +25 -5
- data/spec/models/call_list_all_of_spec.rb +41 -0
- data/spec/models/call_list_spec.rb +55 -6
- data/spec/models/call_result_all_of_spec.rb +129 -0
- data/spec/models/call_result_spec.rb +124 -5
- data/spec/models/conference_list_all_of_spec.rb +41 -0
- data/spec/models/conference_list_spec.rb +55 -5
- data/spec/models/conference_participant_list_all_of_spec.rb +41 -0
- data/spec/models/conference_participant_list_spec.rb +55 -5
- data/spec/models/conference_participant_result_all_of_spec.rb +71 -0
- data/spec/models/conference_participant_result_spec.rb +67 -5
- data/spec/models/conference_result_all_of_spec.rb +103 -0
- data/spec/models/conference_result_spec.rb +99 -6
- data/spec/models/create_conference_all_of_spec.rb +71 -0
- data/spec/models/create_conference_request_spec.rb +41 -6
- data/spec/models/create_conference_spec.rb +2 -2
- data/spec/models/dequeue_spec.rb +2 -2
- data/spec/models/enqueue_all_of_spec.rb +59 -0
- data/spec/models/enqueue_spec.rb +2 -2
- data/spec/models/filter_logs_request_spec.rb +13 -5
- data/spec/models/get_digits_all_of_spec.rb +89 -0
- data/spec/models/get_digits_spec.rb +8 -2
- data/spec/models/get_speech_all_of_spec.rb +113 -0
- data/spec/models/get_speech_spec.rb +3 -3
- data/spec/models/hangup_all_of_spec.rb +41 -0
- data/spec/models/incoming_number_list_all_of_spec.rb +41 -0
- data/spec/models/incoming_number_list_spec.rb +55 -6
- data/spec/models/incoming_number_request_spec.rb +19 -5
- data/spec/models/incoming_number_result_all_of_spec.rb +89 -0
- data/spec/models/incoming_number_result_spec.rb +85 -6
- data/spec/models/log_list_all_of_spec.rb +41 -0
- data/spec/models/log_list_spec.rb +55 -5
- data/spec/models/log_result_spec.rb +53 -5
- data/spec/models/make_call_request_spec.rb +67 -5
- data/spec/models/message_request_all_of_spec.rb +65 -0
- data/spec/models/message_request_spec.rb +61 -6
- data/spec/models/message_result_all_of_spec.rb +87 -0
- data/spec/models/message_result_spec.rb +83 -5
- data/spec/models/messages_list_all_of_spec.rb +41 -0
- data/spec/models/messages_list_spec.rb +55 -5
- data/spec/models/mutable_resource_model_spec.rb +31 -6
- data/spec/models/out_dial_all_of_spec.rb +95 -0
- data/spec/models/out_dial_spec.rb +8 -2
- data/spec/models/pagination_model_spec.rb +49 -5
- data/spec/models/pause_all_of_spec.rb +41 -0
- data/spec/models/pause_spec.rb +2 -2
- data/spec/models/percl_command_spec.rb +2 -2
- data/spec/models/percl_script_spec.rb +2 -2
- data/spec/models/play_all_of_spec.rb +59 -0
- data/spec/models/play_early_media_all_of_spec.rb +41 -0
- data/spec/models/play_early_media_spec.rb +2 -2
- data/spec/models/play_spec.rb +8 -2
- data/spec/models/queue_list_all_of_spec.rb +41 -0
- data/spec/models/queue_list_spec.rb +54 -5
- data/spec/models/queue_member_list_all_of_spec.rb +41 -0
- data/spec/models/queue_member_list_spec.rb +55 -5
- data/spec/models/queue_member_spec.rb +37 -6
- data/spec/models/queue_request_spec.rb +19 -6
- data/spec/models/queue_result_all_of_spec.rb +77 -0
- data/spec/models/queue_result_spec.rb +73 -5
- data/spec/models/record_utterance_all_of_spec.rb +77 -0
- data/spec/models/record_utterance_spec.rb +8 -2
- data/spec/models/recording_list_all_of_spec.rb +41 -0
- data/spec/models/recording_list_spec.rb +55 -5
- data/spec/models/recording_result_all_of_spec.rb +65 -0
- data/spec/models/recording_result_spec.rb +61 -5
- data/spec/models/redirect_all_of_spec.rb +41 -0
- data/spec/models/redirect_spec.rb +2 -2
- data/spec/models/reject_all_of_spec.rb +41 -0
- data/spec/models/remove_from_conference_all_of_spec.rb +41 -0
- data/spec/models/remove_from_conference_spec.rb +2 -2
- data/spec/models/say_all_of_spec.rb +65 -0
- data/spec/models/say_spec.rb +3 -3
- data/spec/models/send_digits_all_of_spec.rb +53 -0
- data/spec/models/send_digits_spec.rb +8 -2
- data/spec/models/set_listen_all_of_spec.rb +47 -0
- data/spec/models/set_listen_spec.rb +2 -2
- data/spec/models/set_talk_all_of_spec.rb +47 -0
- data/spec/models/set_talk_spec.rb +2 -2
- data/spec/models/sms_all_of_spec.rb +59 -0
- data/spec/models/sms_spec.rb +2 -2
- data/spec/models/start_record_call_spec.rb +2 -2
- data/spec/models/terminate_conference_all_of_spec.rb +41 -0
- data/spec/models/terminate_conference_spec.rb +2 -2
- data/spec/models/update_call_request_spec.rb +17 -5
- data/spec/models/update_conference_participant_request_spec.rb +19 -5
- data/spec/models/update_conference_request_spec.rb +29 -5
- data/spec/spec_helper.rb +4 -7
- metadata +85 -5
- data/freeclimb-2.0.3.gem +0 -0
- data/freeclimb-2.1.0.gem +0 -0
- data/freeclimb-2.1.1.gem +0 -0
@@ -1,35 +1,25 @@
|
|
1
1
|
=begin
|
2
2
|
#FreeClimb API
|
3
3
|
|
4
|
-
#
|
4
|
+
#FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.0
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.
|
9
|
+
OpenAPI Generator version: 4.3.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'spec_helper'
|
14
14
|
require 'json'
|
15
|
-
|
15
|
+
|
16
16
|
# Unit tests for Freeclimb::DefaultApi
|
17
17
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
18
|
# Please update as you see appropriate
|
19
|
-
API_SERVER = 'https://www.freeclimb.com/apiserver'
|
20
|
-
|
21
19
|
describe 'DefaultApi' do
|
22
|
-
|
23
20
|
before do
|
24
|
-
Freeclimb.configure do |config|
|
25
|
-
# Configure HTTP basic authorization: fc
|
26
|
-
config.username = 'MOCK_ACCOUNT_ID'
|
27
|
-
config.password = 'MOCK_PASSWORD'
|
28
|
-
end
|
29
|
-
|
30
21
|
# run before each test
|
31
22
|
@api_instance = Freeclimb::DefaultApi.new
|
32
|
-
|
33
23
|
end
|
34
24
|
|
35
25
|
after do
|
@@ -42,28 +32,24 @@ describe 'DefaultApi' do
|
|
42
32
|
end
|
43
33
|
end
|
44
34
|
|
35
|
+
# unit tests for get_an_account
|
36
|
+
# Get an Account
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [AccountResult]
|
39
|
+
describe 'get_an_account test' do
|
40
|
+
it 'should work' do
|
41
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
45
|
# unit tests for buy_a_phone_number
|
46
46
|
# Buy a Phone Number
|
47
|
+
# @param buy_incoming_number_request Incoming Number transaction details
|
47
48
|
# @param [Hash] opts the optional parameters
|
48
|
-
# @option opts [BuyIncomingNumberRequest] :buy_incoming_number_request Incoming Number transaction details
|
49
49
|
# @return [IncomingNumberResult]
|
50
50
|
describe 'buy_a_phone_number test' do
|
51
|
-
|
52
|
-
|
53
|
-
uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/IncomingPhoneNumbers"
|
54
|
-
@stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::INCOMING_PHONE_NUMBER, :status => 200, :headers => {})
|
55
|
-
buy_incoming_number_request = Freeclimb::BuyIncomingNumberRequest.new # BuyIncomingNumberRequest | Incoming Number transaction details
|
56
|
-
#Buy a Phone Number
|
57
|
-
@result = @api_instance.buy_a_phone_number(buy_incoming_number_request)
|
58
|
-
end
|
59
|
-
|
60
|
-
|
61
|
-
it 'should respond with the phone number that was bought' do
|
62
|
-
expect(@result).to be_instance_of Freeclimb::IncomingNumberResult
|
63
|
-
end
|
64
|
-
|
65
|
-
it 'should make a POST request to /Accounts/{accountId}/IncomingPhoneNumbers' do
|
66
|
-
expect(@stub).to have_been_requested
|
51
|
+
it 'should work' do
|
52
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
67
53
|
end
|
68
54
|
end
|
69
55
|
|
@@ -73,49 +59,19 @@ describe 'DefaultApi' do
|
|
73
59
|
# @option opts [CreateConferenceRequest] :create_conference_request Conference to create
|
74
60
|
# @return [ConferenceResult]
|
75
61
|
describe 'create_a_conference test' do
|
76
|
-
|
77
|
-
|
78
|
-
@stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::CONFERENCE_RESULT, :status => 200, :headers => {})
|
79
|
-
opts = {
|
80
|
-
create_conference_request: Freeclimb::CreateConferenceRequest.new # CreateConferenceRequest | Conference to create
|
81
|
-
}
|
82
|
-
#Create a Conference
|
83
|
-
@result = @api_instance.create_a_conference(opts)
|
84
|
-
|
85
|
-
end
|
86
|
-
|
87
|
-
it 'should respond with the conference it created' do
|
88
|
-
expect(@result).to be_instance_of Freeclimb::ConferenceResult
|
89
|
-
end
|
90
|
-
|
91
|
-
it 'should make a POST request to /Accounts/{accountId}/Conferences' do
|
92
|
-
expect(@stub).to have_been_requested
|
62
|
+
it 'should work' do
|
63
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
93
64
|
end
|
94
65
|
end
|
95
66
|
|
96
67
|
# unit tests for create_a_queue
|
97
68
|
# Create a Queue
|
98
|
-
# @param account_id ID of the account that created this Queue.
|
99
69
|
# @param [Hash] opts the optional parameters
|
100
70
|
# @option opts [QueueRequest] :queue_request Queue details used to create a queue
|
101
71
|
# @return [QueueResult]
|
102
72
|
describe 'create_a_queue test' do
|
103
|
-
|
104
|
-
|
105
|
-
@stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::QUEUE_RESULT, :status => 200, :headers => {})
|
106
|
-
opts = {
|
107
|
-
queue_request: Freeclimb::QueueRequest.new # QueueRequest | Queue details used to create a queue
|
108
|
-
}
|
109
|
-
#Create a Queue
|
110
|
-
@result = @api_instance.create_a_queue(opts)
|
111
|
-
end
|
112
|
-
|
113
|
-
it 'should respond with the queue it created' do
|
114
|
-
expect(@result).to be_instance_of Freeclimb::QueueResult
|
115
|
-
end
|
116
|
-
|
117
|
-
it 'should make a POST request to /Accounts/{accountId}/Queues' do
|
118
|
-
expect(@stub).to have_been_requested
|
73
|
+
it 'should work' do
|
74
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
119
75
|
end
|
120
76
|
end
|
121
77
|
|
@@ -125,22 +81,8 @@ describe 'DefaultApi' do
|
|
125
81
|
# @option opts [ApplicationRequest] :application_request Application Details
|
126
82
|
# @return [ApplicationResult]
|
127
83
|
describe 'create_an_application test' do
|
128
|
-
|
129
|
-
|
130
|
-
@stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::APPLICATION_RESULT, :status => 200, :headers => {})
|
131
|
-
opts = {
|
132
|
-
queue_request: Freeclimb::QueueRequest.new # QueueRequest | Queue details used to create a queue
|
133
|
-
}
|
134
|
-
#Create a Queue
|
135
|
-
@result = @api_instance.create_an_application(opts)
|
136
|
-
end
|
137
|
-
|
138
|
-
it 'should respond with the application it created' do
|
139
|
-
expect(@result).to be_instance_of Freeclimb::ApplicationResult
|
140
|
-
end
|
141
|
-
|
142
|
-
it 'should make a POST request to /Accounts/{accountId}/Applications' do
|
143
|
-
expect(@stub).to have_been_requested
|
84
|
+
it 'should work' do
|
85
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
144
86
|
end
|
145
87
|
end
|
146
88
|
|
@@ -150,20 +92,8 @@ describe 'DefaultApi' do
|
|
150
92
|
# @param [Hash] opts the optional parameters
|
151
93
|
# @return [nil]
|
152
94
|
describe 'delete_a_recording test' do
|
153
|
-
|
154
|
-
|
155
|
-
@stub = stub_request(:delete, uri_template).to_return(:status => 204, :headers => {})
|
156
|
-
recording_id = 'MOCK_RECORDING_ID' # String | String that uniquely identifies this recording resource.
|
157
|
-
|
158
|
-
@result = @api_instance.delete_a_recording(recording_id)
|
159
|
-
end
|
160
|
-
|
161
|
-
it 'should respond with nothing' do
|
162
|
-
expect(@result).to be_nil
|
163
|
-
end
|
164
|
-
|
165
|
-
it 'should make a DELETE request to /Accounts/{accountId}/Recordings/{recordingId}' do
|
166
|
-
expect(@stub).to have_been_requested
|
95
|
+
it 'should work' do
|
96
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
167
97
|
end
|
168
98
|
end
|
169
99
|
|
@@ -173,20 +103,8 @@ describe 'DefaultApi' do
|
|
173
103
|
# @param [Hash] opts the optional parameters
|
174
104
|
# @return [nil]
|
175
105
|
describe 'delete_an_application test' do
|
176
|
-
|
177
|
-
|
178
|
-
@stub = stub_request(:delete, uri_template).to_return(:status => 204, :headers => {})
|
179
|
-
application_id = 'MOCK_APPLICATION_ID' # String | String that uniquely identifies this application resource.
|
180
|
-
|
181
|
-
@result = @api_instance.delete_an_application(application_id)
|
182
|
-
end
|
183
|
-
|
184
|
-
it 'should respond with nothing' do
|
185
|
-
expect(@result).to be_nil
|
186
|
-
end
|
187
|
-
|
188
|
-
it 'should make a DELETE request to /Accounts/{accountId}/Applications/{applicationId}' do
|
189
|
-
expect(@stub).to have_been_requested
|
106
|
+
it 'should work' do
|
107
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
190
108
|
end
|
191
109
|
end
|
192
110
|
|
@@ -196,21 +114,8 @@ describe 'DefaultApi' do
|
|
196
114
|
# @param [Hash] opts the optional parameters
|
197
115
|
# @return [nil]
|
198
116
|
describe 'delete_an_incoming_number test' do
|
199
|
-
|
200
|
-
|
201
|
-
@stub = stub_request(:delete, uri_template).to_return(:status => 204, :headers => {})
|
202
|
-
phone_number_id = 'phone_number_id_example' # String | String that uniquely identifies this phone number resource.
|
203
|
-
|
204
|
-
#Delete an Incoming Number
|
205
|
-
@result = @api_instance.delete_an_incoming_number(phone_number_id)
|
206
|
-
end
|
207
|
-
|
208
|
-
it 'should respond with nothing' do
|
209
|
-
expect(@result).to be_nil
|
210
|
-
end
|
211
|
-
|
212
|
-
it 'should make a DELETE request to /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}' do
|
213
|
-
expect(@stub).to have_been_requested
|
117
|
+
it 'should work' do
|
118
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
214
119
|
end
|
215
120
|
end
|
216
121
|
|
@@ -221,21 +126,8 @@ describe 'DefaultApi' do
|
|
221
126
|
# @param [Hash] opts the optional parameters
|
222
127
|
# @return [QueueMember]
|
223
128
|
describe 'dequeue_a_member test' do
|
224
|
-
|
225
|
-
|
226
|
-
@stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::QUEUE_MEMBER_RESULT, :status => 200, :headers => {})
|
227
|
-
queue_id = 'MOCK_QUEUE_ID' # String | String that uniquely identifies the Queue that the Member belongs to.
|
228
|
-
call_id = 'MOCK_CALL_ID' # String | ID if the Call that the Member belongs to
|
229
|
-
|
230
|
-
@result = @api_instance.dequeue_a_member(queue_id, call_id)
|
231
|
-
end
|
232
|
-
|
233
|
-
it 'should respond with a queue member' do
|
234
|
-
expect(@result).to be_instance_of(Freeclimb::QueueMember)
|
235
|
-
end
|
236
|
-
|
237
|
-
it 'should make a POST request to /Accounts/{accountId}/Queues/{queueId}/Members/{callId}' do
|
238
|
-
expect(@stub).to have_been_requested
|
129
|
+
it 'should work' do
|
130
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
239
131
|
end
|
240
132
|
end
|
241
133
|
|
@@ -245,20 +137,8 @@ describe 'DefaultApi' do
|
|
245
137
|
# @param [Hash] opts the optional parameters
|
246
138
|
# @return [QueueMember]
|
247
139
|
describe 'dequeue_head_member test' do
|
248
|
-
|
249
|
-
|
250
|
-
@stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::QUEUE_MEMBER_RESULT, :status => 200, :headers => {})
|
251
|
-
queue_id = 'MOCK_QUEUE_ID' # String | String that uniquely identifies the Queue that the Member belongs to.
|
252
|
-
|
253
|
-
@result = @api_instance.dequeue_head_member(queue_id)
|
254
|
-
end
|
255
|
-
|
256
|
-
it 'should respond with a queue member' do
|
257
|
-
expect(@result).to be_instance_of(Freeclimb::QueueMember)
|
258
|
-
end
|
259
|
-
|
260
|
-
it 'should make a POST request to /Accounts/{accountId}/Queues/{queueId}/Members/{callId}' do
|
261
|
-
expect(@stub).to have_been_requested
|
140
|
+
it 'should work' do
|
141
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
262
142
|
end
|
263
143
|
end
|
264
144
|
|
@@ -268,63 +148,30 @@ describe 'DefaultApi' do
|
|
268
148
|
# @param [Hash] opts the optional parameters
|
269
149
|
# @return [File]
|
270
150
|
describe 'download_a_recording_file test' do
|
271
|
-
|
272
|
-
|
273
|
-
@stub = stub_request(:get, uri_template).with(:headers => {'Accept' => 'audio/x-wav'}).to_return(:status => 200, :headers => {})
|
274
|
-
recording_id = 'MOCK_RECORDING_ID' # String | String that uniquely identifies this recording resource.
|
275
|
-
|
276
|
-
@result = @api_instance.download_a_recording_file(recording_id)
|
277
|
-
end
|
278
|
-
|
279
|
-
it 'should make a POST request to /Accounts/{accountId}/Recordings/{recordingId}/Download' do
|
280
|
-
expect(@stub).to have_been_requested
|
151
|
+
it 'should work' do
|
152
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
281
153
|
end
|
282
154
|
end
|
283
155
|
|
284
156
|
# unit tests for filter_logs
|
285
157
|
# Filter Logs
|
158
|
+
# @param filter_logs_request Filter logs request paramters
|
286
159
|
# @param [Hash] opts the optional parameters
|
287
|
-
# @option opts [FilterLogsRequest] :filter_logs_request Filter logs request paramters
|
288
160
|
# @return [LogList]
|
289
161
|
describe 'filter_logs test' do
|
290
|
-
|
291
|
-
|
292
|
-
@stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::LOG_LIST_RESULT, :status => 200, :headers => {})
|
293
|
-
filter_logs_request = Freeclimb::FilterLogsRequest.new # FilterLogsRequest | Filter logs request paramters
|
294
|
-
|
295
|
-
@result = @api_instance.filter_logs(filter_logs_request)
|
296
|
-
end
|
297
|
-
|
298
|
-
it 'should respond with a list of logs' do
|
299
|
-
expect(@result).to be_instance_of(Freeclimb::LogList)
|
300
|
-
end
|
301
|
-
|
302
|
-
it 'should make a POST request to /Accounts/{accountId}/Logs' do
|
303
|
-
expect(@stub).to have_been_requested
|
162
|
+
it 'should work' do
|
163
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
304
164
|
end
|
305
165
|
end
|
306
166
|
|
307
|
-
|
308
167
|
# unit tests for get_a_call
|
309
168
|
# Get a Call
|
310
169
|
# @param call_id String that uniquely identifies this call resource.
|
311
170
|
# @param [Hash] opts the optional parameters
|
312
171
|
# @return [CallResult]
|
313
172
|
describe 'get_a_call test' do
|
314
|
-
|
315
|
-
|
316
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::CALL_RESULT, :status => 200, :headers => {})
|
317
|
-
call_id = 'MOCK_CALL_ID' # String | String that uniquely identifies this call resource.
|
318
|
-
|
319
|
-
@result = @api_instance.get_a_call(call_id)
|
320
|
-
end
|
321
|
-
|
322
|
-
it 'should respond with a call result' do
|
323
|
-
expect(@result).to be_instance_of(Freeclimb::CallResult)
|
324
|
-
end
|
325
|
-
|
326
|
-
it 'should make a GET request to /Accounts/{accountId}/Calls/{callId}' do
|
327
|
-
expect(@stub).to have_been_requested
|
173
|
+
it 'should work' do
|
174
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
328
175
|
end
|
329
176
|
end
|
330
177
|
|
@@ -334,20 +181,8 @@ describe 'DefaultApi' do
|
|
334
181
|
# @param [Hash] opts the optional parameters
|
335
182
|
# @return [ConferenceResult]
|
336
183
|
describe 'get_a_conference test' do
|
337
|
-
|
338
|
-
|
339
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::CONFERENCE_RESULT, :status => 200, :headers => {})
|
340
|
-
conference_id = 'MOCK_CONFERENCE_ID' # String | A string that uniquely identifies this conference resource.
|
341
|
-
|
342
|
-
@result = @api_instance.get_a_conference(conference_id)
|
343
|
-
end
|
344
|
-
|
345
|
-
it 'should respond with a conference result' do
|
346
|
-
expect(@result).to be_instance_of(Freeclimb::ConferenceResult)
|
347
|
-
end
|
348
|
-
|
349
|
-
it 'should make a GET request to /Accounts/{accountId}/Conferences/{conferenceId}' do
|
350
|
-
expect(@stub).to have_been_requested
|
184
|
+
it 'should work' do
|
185
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
351
186
|
end
|
352
187
|
end
|
353
188
|
|
@@ -358,20 +193,8 @@ describe 'DefaultApi' do
|
|
358
193
|
# @param [Hash] opts the optional parameters
|
359
194
|
# @return [QueueMember]
|
360
195
|
describe 'get_a_member test' do
|
361
|
-
|
362
|
-
|
363
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::QUEUE_MEMBER_RESULT, :status => 200, :headers => {})
|
364
|
-
queue_id = 'MOCK_QUEUE_ID' # String | String that uniquely identifies the Queue that the Member belongs to.
|
365
|
-
call_id = 'MOCK_CALL_ID' # String | ID of the Call that the Member belongs to
|
366
|
-
@result = @api_instance.get_a_member(queue_id, call_id)
|
367
|
-
end
|
368
|
-
|
369
|
-
it 'should respond with a queue member result' do
|
370
|
-
expect(@result).to be_instance_of(Freeclimb::QueueMember)
|
371
|
-
end
|
372
|
-
|
373
|
-
it 'should make a GET request to /Accounts/{accountId}/Queues/{queueId}/Members/{callId}' do
|
374
|
-
expect(@stub).to have_been_requested
|
196
|
+
it 'should work' do
|
197
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
375
198
|
end
|
376
199
|
end
|
377
200
|
|
@@ -382,21 +205,8 @@ describe 'DefaultApi' do
|
|
382
205
|
# @param [Hash] opts the optional parameters
|
383
206
|
# @return [ConferenceParticipantResult]
|
384
207
|
describe 'get_a_participant test' do
|
385
|
-
|
386
|
-
|
387
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::CONFERENCE_PARTICIPANT_RESULT, :status => 200, :headers => {})
|
388
|
-
conference_id = 'MOCK_CONFERENCE_ID' # String | ID of the conference this participant is in.
|
389
|
-
call_id = 'MOCK_CALL_ID' # String | ID of the Call associated with this participant.
|
390
|
-
|
391
|
-
@result = @api_instance.get_a_participant(conference_id, call_id)
|
392
|
-
end
|
393
|
-
|
394
|
-
it 'should respond with a Conference participant result' do
|
395
|
-
expect(@result).to be_instance_of(Freeclimb::ConferenceParticipantResult)
|
396
|
-
end
|
397
|
-
|
398
|
-
it 'should make a GET request to /Accounts/{accountId}/Conferences/{ConferenceId}/Participants/{callId}' do
|
399
|
-
expect(@stub).to have_been_requested
|
208
|
+
it 'should work' do
|
209
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
400
210
|
end
|
401
211
|
end
|
402
212
|
|
@@ -406,20 +216,8 @@ describe 'DefaultApi' do
|
|
406
216
|
# @param [Hash] opts the optional parameters
|
407
217
|
# @return [QueueResult]
|
408
218
|
describe 'get_a_queue test' do
|
409
|
-
|
410
|
-
|
411
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::QUEUE_RESULT, :status => 200, :headers => {})
|
412
|
-
queue_id = 'MOCK_QUEUE_ID' # String | A string that uniquely identifies this queue resource.
|
413
|
-
|
414
|
-
@result = @api_instance.get_a_queue(queue_id)
|
415
|
-
end
|
416
|
-
|
417
|
-
it 'should respond with a queue result' do
|
418
|
-
expect(@result).to be_instance_of(Freeclimb::QueueResult)
|
419
|
-
end
|
420
|
-
|
421
|
-
it 'should make a GET request to /Accounts/{accountId}/Queues/{queueId}' do
|
422
|
-
expect(@stub).to have_been_requested
|
219
|
+
it 'should work' do
|
220
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
423
221
|
end
|
424
222
|
end
|
425
223
|
|
@@ -429,41 +227,8 @@ describe 'DefaultApi' do
|
|
429
227
|
# @param [Hash] opts the optional parameters
|
430
228
|
# @return [RecordingResult]
|
431
229
|
describe 'get_a_recording test' do
|
432
|
-
|
433
|
-
|
434
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::QUEUE_RESULT, :status => 200, :headers => {})
|
435
|
-
recording_id = 'MOCK_RECORDING_ID' # String | String that uniquely identifies this recording resource.
|
436
|
-
|
437
|
-
@result = @api_instance.get_a_recording(recording_id)
|
438
|
-
end
|
439
|
-
|
440
|
-
it 'should respond with a Recording result' do
|
441
|
-
expect(@result).to be_instance_of(Freeclimb::RecordingResult)
|
442
|
-
end
|
443
|
-
|
444
|
-
it 'should make a GET request to /Accounts/{accountId}/Recordings/{recordingId}' do
|
445
|
-
expect(@stub).to have_been_requested
|
446
|
-
end
|
447
|
-
end
|
448
|
-
|
449
|
-
# unit tests for get_an_account
|
450
|
-
# Get an Account
|
451
|
-
# @param [Hash] opts the optional parameters
|
452
|
-
# @return [AccountResult]
|
453
|
-
describe 'get_an_account test' do
|
454
|
-
before do
|
455
|
-
uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}"
|
456
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::ACCOUNT_RESULT, :status => 200, :headers => {})
|
457
|
-
|
458
|
-
@result = @api_instance.get_an_account
|
459
|
-
end
|
460
|
-
|
461
|
-
it 'should respond with an Account result' do
|
462
|
-
expect(@result).to be_instance_of(Freeclimb::AccountResult)
|
463
|
-
end
|
464
|
-
|
465
|
-
it 'should make a GET request to /Accounts/{accountId}' do
|
466
|
-
expect(@stub).to have_been_requested
|
230
|
+
it 'should work' do
|
231
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
467
232
|
end
|
468
233
|
end
|
469
234
|
|
@@ -473,20 +238,8 @@ describe 'DefaultApi' do
|
|
473
238
|
# @param [Hash] opts the optional parameters
|
474
239
|
# @return [ApplicationResult]
|
475
240
|
describe 'get_an_application test' do
|
476
|
-
|
477
|
-
|
478
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::APPLICATION_RESULT, :status => 200, :headers => {})
|
479
|
-
|
480
|
-
application_id = 'MOCK_APPLICATION_ID' # String | A string that uniquely identifies this application resource.
|
481
|
-
@result = @api_instance.get_an_application(application_id)
|
482
|
-
end
|
483
|
-
|
484
|
-
it 'should respond with an Application result' do
|
485
|
-
expect(@result).to be_instance_of(Freeclimb::ApplicationResult)
|
486
|
-
end
|
487
|
-
|
488
|
-
it 'should make a GET request to /Accounts/{accountId}/Applications/{applicationId}' do
|
489
|
-
expect(@stub).to have_been_requested
|
241
|
+
it 'should work' do
|
242
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
490
243
|
end
|
491
244
|
end
|
492
245
|
|
@@ -494,22 +247,16 @@ describe 'DefaultApi' do
|
|
494
247
|
# Get an Incoming Number
|
495
248
|
# @param phone_number_id String that uniquely identifies this phone number resource.
|
496
249
|
# @param [Hash] opts the optional parameters
|
250
|
+
# @option opts [String] :region State or province of this phone number.
|
251
|
+
# @option opts [String] :country Country of this phone number.
|
252
|
+
# @option opts [Boolean] :voice_enabled Indicates whether the phone number can handle Calls. Typically set to true for all numbers.
|
253
|
+
# @option opts [Boolean] :sms_enabled Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers.
|
254
|
+
# @option opts [String] :application_id ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId.
|
255
|
+
# @option opts [Boolean] :has_application Indication of whether the phone number has an application linked to it.
|
497
256
|
# @return [IncomingNumberResult]
|
498
257
|
describe 'get_an_incoming_number test' do
|
499
|
-
|
500
|
-
|
501
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::INCOMING_PHONE_NUMBER, :status => 200, :headers => {})
|
502
|
-
|
503
|
-
phone_number_id = 'MOCK_PHONE_NUMBER_ID' # String | String that uniquely identifies this phone number resource.
|
504
|
-
@result = @api_instance.get_an_incoming_number(phone_number_id)
|
505
|
-
end
|
506
|
-
|
507
|
-
it 'should respond with an Application result' do
|
508
|
-
expect(@result).to be_instance_of(Freeclimb::IncomingNumberResult)
|
509
|
-
end
|
510
|
-
|
511
|
-
it 'should make a GET request to /Accounts/{accountId}/Applications/{applicationId}' do
|
512
|
-
expect(@stub).to have_been_requested
|
258
|
+
it 'should work' do
|
259
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
513
260
|
end
|
514
261
|
end
|
515
262
|
|
@@ -519,21 +266,8 @@ describe 'DefaultApi' do
|
|
519
266
|
# @param [Hash] opts the optional parameters
|
520
267
|
# @return [MessageResult]
|
521
268
|
describe 'get_an_sms_message test' do
|
522
|
-
|
523
|
-
|
524
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::MESSAGE_RESULT, :status => 200, :headers => {})
|
525
|
-
|
526
|
-
message_id = 'MOCK_MESSAGE_ID' # String | String that uniquely identifies this Message resource.
|
527
|
-
|
528
|
-
@result = @api_instance.get_an_sms_message(message_id)
|
529
|
-
end
|
530
|
-
|
531
|
-
it 'should respond with a Message result' do
|
532
|
-
expect(@result).to be_instance_of(Freeclimb::MessageResult)
|
533
|
-
end
|
534
|
-
|
535
|
-
it 'should make a GET request to /Accounts/{accountId}/Messages/{messageId}' do
|
536
|
-
expect(@stub).to have_been_requested
|
269
|
+
it 'should work' do
|
270
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
537
271
|
end
|
538
272
|
end
|
539
273
|
|
@@ -543,21 +277,8 @@ describe 'DefaultApi' do
|
|
543
277
|
# @param [Hash] opts the optional parameters
|
544
278
|
# @return [QueueMember]
|
545
279
|
describe 'get_head_member test' do
|
546
|
-
|
547
|
-
|
548
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::QUEUE_MEMBER_RESULT, :status => 200, :headers => {})
|
549
|
-
|
550
|
-
queue_id = 'MOCK_QUEUE_ID' # String | String that uniquely identifies this Message resource.
|
551
|
-
|
552
|
-
@result = @api_instance.get_head_member(queue_id)
|
553
|
-
end
|
554
|
-
|
555
|
-
it 'should respond with a Queue Member result' do
|
556
|
-
expect(@result).to be_instance_of(Freeclimb::QueueMember)
|
557
|
-
end
|
558
|
-
|
559
|
-
it 'should make a GET request to /Accounts/{accountId}/Queues/{queueId}/Members/Front' do
|
560
|
-
expect(@stub).to have_been_requested
|
280
|
+
it 'should work' do
|
281
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
561
282
|
end
|
562
283
|
end
|
563
284
|
|
@@ -567,19 +288,8 @@ describe 'DefaultApi' do
|
|
567
288
|
# @option opts [String] :_alias Return only the Queue resources with aliases that exactly match this name.
|
568
289
|
# @return [QueueList]
|
569
290
|
describe 'list_active_queues test' do
|
570
|
-
|
571
|
-
|
572
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::QUEUE_LIST_RESULT, :status => 200, :headers => {})
|
573
|
-
|
574
|
-
@result = @api_instance.list_active_queues
|
575
|
-
end
|
576
|
-
|
577
|
-
it 'should respond with a Queue List result' do
|
578
|
-
expect(@result).to be_instance_of(Freeclimb::QueueList)
|
579
|
-
end
|
580
|
-
|
581
|
-
it 'should make a GET request to /Accounts/{accountId}/Queues' do
|
582
|
-
expect(@stub).to have_been_requested
|
291
|
+
it 'should work' do
|
292
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
583
293
|
end
|
584
294
|
end
|
585
295
|
|
@@ -588,19 +298,8 @@ describe 'DefaultApi' do
|
|
588
298
|
# @param [Hash] opts the optional parameters
|
589
299
|
# @return [LogList]
|
590
300
|
describe 'list_all_account_logs test' do
|
591
|
-
|
592
|
-
|
593
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::LOG_LIST_RESULT, :status => 200, :headers => {})
|
594
|
-
|
595
|
-
@result = @api_instance.list_all_account_logs
|
596
|
-
end
|
597
|
-
|
598
|
-
it 'should respond with a Queue Member result' do
|
599
|
-
expect(@result).to be_instance_of(Freeclimb::LogList)
|
600
|
-
end
|
601
|
-
|
602
|
-
it 'should make a GET request to /Accounts/{accountId}/Logs' do
|
603
|
-
expect(@stub).to have_been_requested
|
301
|
+
it 'should work' do
|
302
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
604
303
|
end
|
605
304
|
end
|
606
305
|
|
@@ -610,47 +309,23 @@ describe 'DefaultApi' do
|
|
610
309
|
# @option opts [String] :_alias Return only applications with aliases that exactly match this value.
|
611
310
|
# @return [ApplicationList]
|
612
311
|
describe 'list_an_application test' do
|
613
|
-
|
614
|
-
|
615
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::APPLICATION_LIST_RESULT, :status => 200, :headers => {})
|
616
|
-
|
617
|
-
@result = @api_instance.list_an_application
|
618
|
-
end
|
619
|
-
|
620
|
-
it 'should respond with a Application List result' do
|
621
|
-
expect(@result).to be_instance_of(Freeclimb::ApplicationList)
|
622
|
-
end
|
623
|
-
|
624
|
-
it 'should make a GET request to /Accounts/{accountId}/Applications' do
|
625
|
-
expect(@stub).to have_been_requested
|
312
|
+
it 'should work' do
|
313
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
626
314
|
end
|
627
315
|
end
|
628
316
|
|
629
317
|
# unit tests for list_available_numbers
|
630
318
|
# List available numbers
|
631
319
|
# @param [Hash] opts the optional parameters
|
632
|
-
# @option opts [String] :_alias Filter on numbers based on the formatted string of the phone number.
|
633
320
|
# @option opts [String] :phone_number PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format.
|
321
|
+
# @option opts [String] :region State or province of this phone number.
|
322
|
+
# @option opts [String] :country Country of this phone number.
|
323
|
+
# @option opts [Boolean] :voice_enabled Indicates whether the phone number can handle Calls. Typically set to true for all numbers.
|
324
|
+
# @option opts [Boolean] :sms_enabled Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers.
|
634
325
|
# @return [AvailableNumberList]
|
635
326
|
describe 'list_available_numbers test' do
|
636
|
-
|
637
|
-
|
638
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::AVAILABLE_NUMBER_LIST, :status => 200, :headers => {})
|
639
|
-
|
640
|
-
opts = {
|
641
|
-
_alias: 'MOCK_ALIAS', # String | Filter on numbers based on the formatted string of the phone number.
|
642
|
-
phone_number: 'MOCK_PHONE_NUMBER' # String | PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format.
|
643
|
-
}
|
644
|
-
|
645
|
-
@result = @api_instance.list_available_numbers(opts)
|
646
|
-
end
|
647
|
-
|
648
|
-
it 'should respond with a Available Number List result' do
|
649
|
-
expect(@result).to be_instance_of(Freeclimb::AvailableNumberList)
|
650
|
-
end
|
651
|
-
|
652
|
-
it 'should make a GET request to /AvailablePhoneNumbers' do
|
653
|
-
expect(@stub).to have_been_requested
|
327
|
+
it 'should work' do
|
328
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
654
329
|
end
|
655
330
|
end
|
656
331
|
|
@@ -660,20 +335,8 @@ describe 'DefaultApi' do
|
|
660
335
|
# @param [Hash] opts the optional parameters
|
661
336
|
# @return [LogList]
|
662
337
|
describe 'list_call_logs test' do
|
663
|
-
|
664
|
-
|
665
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::LOG_LIST_RESULT, :status => 200, :headers => {})
|
666
|
-
|
667
|
-
call_id = 'MOCK_CALL_ID' # String | String that uniquely identifies this call resource.
|
668
|
-
@result = @api_instance.list_call_logs(call_id)
|
669
|
-
end
|
670
|
-
|
671
|
-
it 'should respond with a Logs List result' do
|
672
|
-
expect(@result).to be_instance_of(Freeclimb::LogList)
|
673
|
-
end
|
674
|
-
|
675
|
-
it 'should make a GET request to /Accounts/{accountId}/Calls/{callId}/Logs' do
|
676
|
-
expect(@stub).to have_been_requested
|
338
|
+
it 'should work' do
|
339
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
677
340
|
end
|
678
341
|
end
|
679
342
|
|
@@ -684,26 +347,15 @@ describe 'DefaultApi' do
|
|
684
347
|
# @option opts [String] :date_created Only show recordings created on the specified date, in the form *YYYY-MM-DD*.
|
685
348
|
# @return [RecordingList]
|
686
349
|
describe 'list_call_recordings test' do
|
687
|
-
|
688
|
-
|
689
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::RECORDING_LIST_RESULT, :status => 200, :headers => {})
|
690
|
-
|
691
|
-
call_id = 'MOCK_CALL_ID' # String | String that uniquely identifies this call resource.
|
692
|
-
@result = @api_instance.list_call_recordings(call_id)
|
693
|
-
end
|
694
|
-
|
695
|
-
it 'should respond with a Recording List result' do
|
696
|
-
expect(@result).to be_instance_of(Freeclimb::RecordingList)
|
697
|
-
end
|
698
|
-
|
699
|
-
it 'should make a GET request to /Accounts/{accountId}/Calls/{callId}/Recordings' do
|
700
|
-
expect(@stub).to have_been_requested
|
350
|
+
it 'should work' do
|
351
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
701
352
|
end
|
702
353
|
end
|
703
354
|
|
704
355
|
# unit tests for list_calls
|
705
356
|
# List Calls
|
706
357
|
# @param [Hash] opts the optional parameters
|
358
|
+
# @option opts [Boolean] :active If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query.
|
707
359
|
# @option opts [String] :to Only show Calls to this phone number.
|
708
360
|
# @option opts [String] :from Only show Calls from this phone number.
|
709
361
|
# @option opts [String] :status Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`.
|
@@ -712,19 +364,8 @@ describe 'DefaultApi' do
|
|
712
364
|
# @option opts [String] :parent_call_id Only show Calls spawned by the call with this ID.
|
713
365
|
# @return [CallList]
|
714
366
|
describe 'list_calls test' do
|
715
|
-
|
716
|
-
|
717
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::CALL_LIST_RESULT, :status => 200, :headers => {})
|
718
|
-
|
719
|
-
@result = @api_instance.list_calls
|
720
|
-
end
|
721
|
-
|
722
|
-
it 'should respond with a Call List result' do
|
723
|
-
expect(@result).to be_instance_of(Freeclimb::CallList)
|
724
|
-
end
|
725
|
-
|
726
|
-
it 'should make a GET request to /Accounts/{accountId}/Calls' do
|
727
|
-
expect(@stub).to have_been_requested
|
367
|
+
it 'should work' do
|
368
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
728
369
|
end
|
729
370
|
end
|
730
371
|
|
@@ -737,19 +378,8 @@ describe 'DefaultApi' do
|
|
737
378
|
# @option opts [String] :date_updated Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*.
|
738
379
|
# @return [ConferenceList]
|
739
380
|
describe 'list_conferences test' do
|
740
|
-
|
741
|
-
|
742
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::CONFERNECE_LIST_RESULT, :status => 200, :headers => {})
|
743
|
-
|
744
|
-
@result = @api_instance.list_conferences
|
745
|
-
end
|
746
|
-
|
747
|
-
it 'should respond with a Conferences List result' do
|
748
|
-
expect(@result).to be_instance_of(Freeclimb::ConferenceList)
|
749
|
-
end
|
750
|
-
|
751
|
-
it 'should make a GET request to /Accounts/{accountId}/Conferences' do
|
752
|
-
expect(@stub).to have_been_requested
|
381
|
+
it 'should work' do
|
382
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
753
383
|
end
|
754
384
|
end
|
755
385
|
|
@@ -760,19 +390,8 @@ describe 'DefaultApi' do
|
|
760
390
|
# @option opts [String] :_alias Only show incoming phone numbers with aliases that exactly match this value.
|
761
391
|
# @return [IncomingNumberList]
|
762
392
|
describe 'list_incoming_numbers test' do
|
763
|
-
|
764
|
-
|
765
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::INCOMING_PHONE_NUMBER_LIST_RESULT, :status => 200, :headers => {})
|
766
|
-
|
767
|
-
@result = @api_instance.list_incoming_numbers
|
768
|
-
end
|
769
|
-
|
770
|
-
it 'should respond with a Incoming Phone Number List result' do
|
771
|
-
expect(@result).to be_instance_of(Freeclimb::IncomingNumberList)
|
772
|
-
end
|
773
|
-
|
774
|
-
it 'should make a GET request to /Accounts/{accountId}/IncomingPhoneNumbers' do
|
775
|
-
expect(@stub).to have_been_requested
|
393
|
+
it 'should work' do
|
394
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
776
395
|
end
|
777
396
|
end
|
778
397
|
|
@@ -782,20 +401,8 @@ describe 'DefaultApi' do
|
|
782
401
|
# @param [Hash] opts the optional parameters
|
783
402
|
# @return [QueueMemberList]
|
784
403
|
describe 'list_members test' do
|
785
|
-
|
786
|
-
|
787
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::QUEUE_MEMBER_RESULT, :status => 200, :headers => {})
|
788
|
-
|
789
|
-
queue_id = 'MOCK_QUEUE_ID'
|
790
|
-
@result = @api_instance.list_members(queue_id)
|
791
|
-
end
|
792
|
-
|
793
|
-
it 'should respond with a Queue Member List result' do
|
794
|
-
expect(@result).to be_instance_of(Freeclimb::QueueMemberList)
|
795
|
-
end
|
796
|
-
|
797
|
-
it 'should make a GET request to /Accounts/{accountId}/Queues/{queueId}/Members' do
|
798
|
-
expect(@stub).to have_been_requested
|
404
|
+
it 'should work' do
|
405
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
799
406
|
end
|
800
407
|
end
|
801
408
|
|
@@ -807,20 +414,8 @@ describe 'DefaultApi' do
|
|
807
414
|
# @option opts [Boolean] :listen Only show Participants with the listen privilege.
|
808
415
|
# @return [ConferenceParticipantList]
|
809
416
|
describe 'list_participants test' do
|
810
|
-
|
811
|
-
|
812
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::PARTICIPANT_LIST_RESULT, :status => 200, :headers => {})
|
813
|
-
|
814
|
-
conference_id = 'MOCK_CONFERENCE_ID'
|
815
|
-
@result = @api_instance.list_participants(conference_id)
|
816
|
-
end
|
817
|
-
|
818
|
-
it 'should respond with a Conference Participant List result' do
|
819
|
-
expect(@result).to be_instance_of(Freeclimb::ConferenceParticipantList)
|
820
|
-
end
|
821
|
-
|
822
|
-
it 'should make a GET request to /Accounts/{accountId}/Conferences/{conferenceId}/Participants' do
|
823
|
-
expect(@stub).to have_been_requested
|
417
|
+
it 'should work' do
|
418
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
824
419
|
end
|
825
420
|
end
|
826
421
|
|
@@ -832,19 +427,8 @@ describe 'DefaultApi' do
|
|
832
427
|
# @option opts [String] :date_created Only show Recordings created on this date, formatted as *YYYY-MM-DD*.
|
833
428
|
# @return [RecordingList]
|
834
429
|
describe 'list_recordings test' do
|
835
|
-
|
836
|
-
|
837
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::RECORDING_LIST_RESULT, :status => 200, :headers => {})
|
838
|
-
|
839
|
-
@result = @api_instance.list_recordings
|
840
|
-
end
|
841
|
-
|
842
|
-
it 'should respond with a Recordings List result' do
|
843
|
-
expect(@result).to be_instance_of(Freeclimb::RecordingList)
|
844
|
-
end
|
845
|
-
|
846
|
-
it 'should make a GET request to /Accounts/{accountId}/Recordings' do
|
847
|
-
expect(@stub).to have_been_requested
|
430
|
+
it 'should work' do
|
431
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
848
432
|
end
|
849
433
|
end
|
850
434
|
|
@@ -859,19 +443,8 @@ describe 'DefaultApi' do
|
|
859
443
|
# @option opts [String] :account_id String that uniquely identifies this account resource.
|
860
444
|
# @return [MessagesList]
|
861
445
|
describe 'list_sms_messages test' do
|
862
|
-
|
863
|
-
|
864
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::MESSAGE_RESULT, :status => 200, :headers => {})
|
865
|
-
|
866
|
-
@result = @api_instance.list_sms_messages
|
867
|
-
end
|
868
|
-
|
869
|
-
it 'should respond with a Messages List result' do
|
870
|
-
expect(@result).to be_instance_of(Freeclimb::MessagesList)
|
871
|
-
end
|
872
|
-
|
873
|
-
it 'should make a GET request to /Accounts/{accountId}/Messages' do
|
874
|
-
expect(@stub).to have_been_requested
|
446
|
+
it 'should work' do
|
447
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
875
448
|
end
|
876
449
|
end
|
877
450
|
|
@@ -881,19 +454,8 @@ describe 'DefaultApi' do
|
|
881
454
|
# @option opts [MakeCallRequest] :make_call_request Call details for making a call
|
882
455
|
# @return [CallResult]
|
883
456
|
describe 'make_a_call test' do
|
884
|
-
|
885
|
-
|
886
|
-
@stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::CALL_RESULT, :status => 200, :headers => {})
|
887
|
-
|
888
|
-
@result = @api_instance.make_a_call
|
889
|
-
end
|
890
|
-
|
891
|
-
it 'should respond with a Call Result result' do
|
892
|
-
expect(@result).to be_instance_of(Freeclimb::CallResult)
|
893
|
-
end
|
894
|
-
|
895
|
-
it 'should make a POST request to /Accounts/{accountId}/Calls' do
|
896
|
-
expect(@stub).to have_been_requested
|
457
|
+
it 'should work' do
|
458
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
897
459
|
end
|
898
460
|
end
|
899
461
|
|
@@ -904,48 +466,19 @@ describe 'DefaultApi' do
|
|
904
466
|
# @param [Hash] opts the optional parameters
|
905
467
|
# @return [nil]
|
906
468
|
describe 'remove_a_participant test' do
|
907
|
-
|
908
|
-
|
909
|
-
@stub = stub_request(:delete, uri_template).to_return(:status => 204, :headers => {})
|
910
|
-
|
911
|
-
conference_id = 'MOCK_CONFERENCE_ID'
|
912
|
-
call_id = 'CALL_ID'
|
913
|
-
@result = @api_instance.remove_a_participant(conference_id, call_id)
|
914
|
-
end
|
915
|
-
|
916
|
-
it 'should respond with nil' do
|
917
|
-
expect(@result).to be_nil
|
918
|
-
end
|
919
|
-
|
920
|
-
it 'should make a POST request to /Accounts/{accountId}/Calls' do
|
921
|
-
expect(@stub).to have_been_requested
|
469
|
+
it 'should work' do
|
470
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
922
471
|
end
|
923
472
|
end
|
924
473
|
|
925
474
|
# unit tests for send_an_sms_message
|
926
475
|
# Send an SMS Message
|
476
|
+
# @param message_request Details to create a message
|
927
477
|
# @param [Hash] opts the optional parameters
|
928
|
-
# @option opts [MessageRequest] :message_request Details to create a message
|
929
478
|
# @return [MessageResult]
|
930
479
|
describe 'send_an_sms_message test' do
|
931
|
-
|
932
|
-
|
933
|
-
@stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::CALL_RESULT, :status => 200, :headers => {})
|
934
|
-
|
935
|
-
request_body = Freeclimb::MessageRequest.new
|
936
|
-
request_body.to = 'MOCK_TO_NUMBER'
|
937
|
-
request_body.from ='MOCK_FROM_NUMBER'
|
938
|
-
request_body.text = 'MOCK_TEXT'
|
939
|
-
|
940
|
-
@result = @api_instance.send_an_sms_message(request_body)
|
941
|
-
end
|
942
|
-
|
943
|
-
it 'should respond with Message result' do
|
944
|
-
expect(@result).to be_instance_of(Freeclimb::MessageResult)
|
945
|
-
end
|
946
|
-
|
947
|
-
it 'should make a POST request to /Accounts/{accountId}/Messages' do
|
948
|
-
expect(@stub).to have_been_requested
|
480
|
+
it 'should work' do
|
481
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
949
482
|
end
|
950
483
|
end
|
951
484
|
|
@@ -955,16 +488,8 @@ describe 'DefaultApi' do
|
|
955
488
|
# @param [Hash] opts the optional parameters
|
956
489
|
# @return [File]
|
957
490
|
describe 'stream_a_recording_file test' do
|
958
|
-
|
959
|
-
|
960
|
-
@stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::CALL_RESULT, :status => 200, :headers => {})
|
961
|
-
|
962
|
-
recording_id = 'MOCK_RECORDING_ID'
|
963
|
-
@result = @api_instance.stream_a_recording_file(recording_id)
|
964
|
-
end
|
965
|
-
|
966
|
-
it 'should make a GET request to /Accounts/{accountId}/Recordings/{recordingId}/Stream' do
|
967
|
-
expect(@stub).to have_been_requested
|
491
|
+
it 'should work' do
|
492
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
968
493
|
end
|
969
494
|
end
|
970
495
|
|
@@ -975,41 +500,20 @@ describe 'DefaultApi' do
|
|
975
500
|
# @option opts [UpdateConferenceRequest] :update_conference_request Conference Details to update
|
976
501
|
# @return [ConferenceResult]
|
977
502
|
describe 'update_a_conference test' do
|
978
|
-
|
979
|
-
|
980
|
-
@stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::CONFERENCE_RESULT, :status => 200, :headers => {})
|
981
|
-
|
982
|
-
conference_id = 'MOCK_CONFERENCE_ID'
|
983
|
-
@result = @api_instance.update_a_conference(conference_id)
|
984
|
-
end
|
985
|
-
|
986
|
-
it 'should respond with a Conference result' do
|
987
|
-
expect(@result).to be_instance_of(Freeclimb::ConferenceResult)
|
988
|
-
end
|
989
|
-
|
990
|
-
it 'should make a POST request to /Accounts/{accountId}/Conferences/{conferenceId}' do
|
991
|
-
expect(@stub).to have_been_requested
|
503
|
+
it 'should work' do
|
504
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
992
505
|
end
|
993
506
|
end
|
994
507
|
|
995
508
|
# unit tests for update_a_live_call
|
996
509
|
# Update a Live Call
|
997
510
|
# @param call_id String that uniquely identifies this call resource.
|
511
|
+
# @param update_call_request Call details to update
|
998
512
|
# @param [Hash] opts the optional parameters
|
999
|
-
# @option opts [UpdateCallRequest] :update_call_request Call details to update
|
1000
513
|
# @return [nil]
|
1001
514
|
describe 'update_a_live_call test' do
|
1002
|
-
|
1003
|
-
|
1004
|
-
@stub = stub_request(:post, uri_template).to_return(:body => '{}', :status => 202, :headers => {})
|
1005
|
-
|
1006
|
-
call_id = 'MOCK_CALL_ID'
|
1007
|
-
call_request = Freeclimb::UpdateCallRequest.new
|
1008
|
-
@result = @api_instance.update_a_live_call(call_id, call_request)
|
1009
|
-
end
|
1010
|
-
|
1011
|
-
it 'should make a POST request to /Accounts/{accountId}/Calls/{callId}' do
|
1012
|
-
expect(@stub).to have_been_requested
|
515
|
+
it 'should work' do
|
516
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
1013
517
|
end
|
1014
518
|
end
|
1015
519
|
|
@@ -1021,21 +525,8 @@ describe 'DefaultApi' do
|
|
1021
525
|
# @option opts [UpdateConferenceParticipantRequest] :update_conference_participant_request Conference participant details to update
|
1022
526
|
# @return [ConferenceParticipantResult]
|
1023
527
|
describe 'update_a_participant test' do
|
1024
|
-
|
1025
|
-
|
1026
|
-
@stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::CONFERENCE_PARTICIPANT_RESULT, :status => 200, :headers => {})
|
1027
|
-
|
1028
|
-
conference_id = 'MOCK_CONFERENCE_ID'
|
1029
|
-
call_id = 'MOCK_CALL_ID'
|
1030
|
-
@result = @api_instance.update_a_participant(conference_id, call_id)
|
1031
|
-
end
|
1032
|
-
|
1033
|
-
it 'should respond with a Conference Participant result' do
|
1034
|
-
expect(@result).to be_instance_of(Freeclimb::ConferenceParticipantResult)
|
1035
|
-
end
|
1036
|
-
|
1037
|
-
it 'should make a POST request to /Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}' do
|
1038
|
-
expect(@stub).to have_been_requested
|
528
|
+
it 'should work' do
|
529
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
1039
530
|
end
|
1040
531
|
end
|
1041
532
|
|
@@ -1046,20 +537,8 @@ describe 'DefaultApi' do
|
|
1046
537
|
# @option opts [QueueRequest] :queue_request Queue Details to update
|
1047
538
|
# @return [QueueResult]
|
1048
539
|
describe 'update_a_queue test' do
|
1049
|
-
|
1050
|
-
|
1051
|
-
@stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::QUEUE_RESULT, :status => 200, :headers => {})
|
1052
|
-
|
1053
|
-
queue_id = 'MOCK_QUEUE_ID'
|
1054
|
-
@result = @api_instance.update_a_queue(queue_id)
|
1055
|
-
end
|
1056
|
-
|
1057
|
-
it 'should respond with a Queue result' do
|
1058
|
-
expect(@result).to be_instance_of(Freeclimb::QueueResult)
|
1059
|
-
end
|
1060
|
-
|
1061
|
-
it 'should make a POST request to /Accounts/{accountId}/Queues/{queueId}' do
|
1062
|
-
expect(@stub).to have_been_requested
|
540
|
+
it 'should work' do
|
541
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
1063
542
|
end
|
1064
543
|
end
|
1065
544
|
|
@@ -1069,19 +548,8 @@ describe 'DefaultApi' do
|
|
1069
548
|
# @option opts [AccountRequest] :account_request Account details to update
|
1070
549
|
# @return [nil]
|
1071
550
|
describe 'update_an_account test' do
|
1072
|
-
|
1073
|
-
|
1074
|
-
@stub = stub_request(:post, uri_template).to_return(:status => 204, :headers => {})
|
1075
|
-
|
1076
|
-
@result = @api_instance.update_an_account
|
1077
|
-
end
|
1078
|
-
|
1079
|
-
it 'should respond an empty body' do
|
1080
|
-
expect(@result).to be_nil
|
1081
|
-
end
|
1082
|
-
|
1083
|
-
it 'should make a POST request to /Accounts/{accountId}' do
|
1084
|
-
expect(@stub).to have_been_requested
|
551
|
+
it 'should work' do
|
552
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
1085
553
|
end
|
1086
554
|
end
|
1087
555
|
|
@@ -1092,20 +560,8 @@ describe 'DefaultApi' do
|
|
1092
560
|
# @option opts [ApplicationRequest] :application_request Application details to update.
|
1093
561
|
# @return [ApplicationResult]
|
1094
562
|
describe 'update_an_application test' do
|
1095
|
-
|
1096
|
-
|
1097
|
-
@stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::APPLICATION_RESULT, :status => 200, :headers => {})
|
1098
|
-
|
1099
|
-
application_id = 'MOCK_APPLICAION_ID'
|
1100
|
-
@result = @api_instance.update_an_application(application_id)
|
1101
|
-
end
|
1102
|
-
|
1103
|
-
it 'should respond with an Application result' do
|
1104
|
-
expect(@result).to be_instance_of(Freeclimb::ApplicationResult)
|
1105
|
-
end
|
1106
|
-
|
1107
|
-
it 'should make a POST request to /Accounts/{accountId}/Applications/{application_id}' do
|
1108
|
-
expect(@stub).to have_been_requested
|
563
|
+
it 'should work' do
|
564
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
1109
565
|
end
|
1110
566
|
end
|
1111
567
|
|
@@ -1116,20 +572,8 @@ describe 'DefaultApi' do
|
|
1116
572
|
# @option opts [IncomingNumberRequest] :incoming_number_request Incoming Number details to update
|
1117
573
|
# @return [IncomingNumberResult]
|
1118
574
|
describe 'update_an_incoming_number test' do
|
1119
|
-
|
1120
|
-
|
1121
|
-
@stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::APPLICATION_RESULT, :status => 200, :headers => {})
|
1122
|
-
|
1123
|
-
phoneNumberId = 'MOCK_PHONE_NUMBER'
|
1124
|
-
@result = @api_instance.update_an_incoming_number(phoneNumberId)
|
1125
|
-
end
|
1126
|
-
|
1127
|
-
it 'should respond with an Incoming Number result' do
|
1128
|
-
expect(@result).to be_instance_of(Freeclimb::IncomingNumberResult)
|
1129
|
-
end
|
1130
|
-
|
1131
|
-
it 'should make a POST request to /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}' do
|
1132
|
-
expect(@stub).to have_been_requested
|
575
|
+
it 'should work' do
|
576
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
1133
577
|
end
|
1134
578
|
end
|
1135
579
|
|