freeclimb 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile +4 -1
- data/Gemfile.lock +41 -20
- data/README.md +34 -33
- data/docs/AccountRequest.md +9 -8
- data/docs/AccountResult.md +27 -26
- data/docs/AccountResultAllOf.md +19 -18
- data/docs/AddToConference.md +25 -24
- data/docs/AddToConferenceAllOf.md +25 -24
- data/docs/ApplicationList.md +21 -20
- data/docs/ApplicationListAllOf.md +7 -6
- data/docs/ApplicationRequest.md +19 -18
- data/docs/ApplicationResult.md +31 -30
- data/docs/ApplicationResultAllOf.md +23 -22
- data/docs/AvailableNumber.md +17 -14
- data/docs/AvailableNumberList.md +21 -20
- data/docs/AvailableNumberListAllOf.md +7 -6
- data/docs/BuyIncomingNumberRequest.md +11 -10
- data/docs/CallList.md +21 -20
- data/docs/CallListAllOf.md +7 -6
- data/docs/CallResult.md +43 -42
- data/docs/CallResultAllOf.md +35 -34
- data/docs/Capabilities.md +26 -0
- data/docs/ConferenceList.md +21 -20
- data/docs/ConferenceListAllOf.md +7 -6
- data/docs/ConferenceParticipantList.md +21 -20
- data/docs/ConferenceParticipantListAllOf.md +7 -6
- data/docs/ConferenceParticipantResult.md +25 -24
- data/docs/ConferenceParticipantResultAllOf.md +17 -16
- data/docs/ConferenceResult.md +33 -32
- data/docs/ConferenceResultAllOf.md +25 -24
- data/docs/CreateConference.md +17 -16
- data/docs/CreateConferenceAllOf.md +17 -16
- data/docs/CreateConferenceRequest.md +15 -14
- data/docs/DefaultApi.md +1670 -600
- data/docs/Dequeue.md +3 -4
- data/docs/Enqueue.md +13 -12
- data/docs/EnqueueAllOf.md +13 -12
- data/docs/FilterLogsRequest.md +7 -6
- data/docs/GetDigits.md +23 -22
- data/docs/GetDigitsAllOf.md +23 -22
- data/docs/GetSpeech.md +31 -30
- data/docs/GetSpeechAllOf.md +31 -30
- data/docs/Hangup.md +7 -6
- data/docs/HangupAllOf.md +7 -6
- data/docs/IncomingNumberList.md +21 -20
- data/docs/IncomingNumberListAllOf.md +7 -6
- data/docs/IncomingNumberRequest.md +9 -8
- data/docs/IncomingNumberResult.md +33 -30
- data/docs/IncomingNumberResultAllOf.md +25 -22
- data/docs/LogList.md +21 -20
- data/docs/LogListAllOf.md +7 -6
- data/docs/LogResult.md +19 -18
- data/docs/MakeCallRequest.md +25 -24
- data/docs/MessageRequest.md +23 -22
- data/docs/MessageRequestAllOf.md +15 -14
- data/docs/MessageResult.md +29 -28
- data/docs/MessageResultAllOf.md +21 -20
- data/docs/MessagesList.md +21 -20
- data/docs/MessagesListAllOf.md +7 -6
- data/docs/MutableResourceModel.md +13 -12
- data/docs/OutDial.md +25 -24
- data/docs/OutDialAllOf.md +25 -24
- data/docs/PaginationModel.md +19 -18
- data/docs/Pause.md +7 -6
- data/docs/PauseAllOf.md +7 -6
- data/docs/PerclCommand.md +7 -6
- data/docs/PerclScript.md +7 -6
- data/docs/Play.md +13 -12
- data/docs/PlayAllOf.md +13 -12
- data/docs/PlayEarlyMedia.md +7 -6
- data/docs/PlayEarlyMediaAllOf.md +7 -6
- data/docs/QueueList.md +21 -20
- data/docs/QueueListAllOf.md +7 -6
- data/docs/QueueMember.md +15 -14
- data/docs/QueueMemberList.md +21 -20
- data/docs/QueueMemberListAllOf.md +7 -6
- data/docs/QueueRequest.md +9 -8
- data/docs/QueueResult.md +27 -26
- data/docs/QueueResultAllOf.md +19 -18
- data/docs/RecordUtterance.md +19 -18
- data/docs/RecordUtteranceAllOf.md +19 -18
- data/docs/RecordingList.md +21 -20
- data/docs/RecordingListAllOf.md +7 -6
- data/docs/RecordingResult.md +23 -22
- data/docs/RecordingResultAllOf.md +15 -14
- data/docs/Redirect.md +7 -6
- data/docs/RedirectAllOf.md +7 -6
- data/docs/Reject.md +7 -6
- data/docs/RejectAllOf.md +7 -6
- data/docs/RemoveFromConference.md +7 -6
- data/docs/RemoveFromConferenceAllOf.md +7 -6
- data/docs/Say.md +15 -14
- data/docs/SayAllOf.md +15 -14
- data/docs/SendDigits.md +11 -10
- data/docs/SendDigitsAllOf.md +11 -10
- data/docs/SetListen.md +9 -8
- data/docs/SetListenAllOf.md +9 -8
- data/docs/SetTalk.md +9 -8
- data/docs/SetTalkAllOf.md +9 -8
- data/docs/Sms.md +13 -12
- data/docs/SmsAllOf.md +13 -12
- data/docs/StartRecordCall.md +3 -4
- data/docs/TerminateConference.md +7 -6
- data/docs/TerminateConferenceAllOf.md +7 -6
- data/docs/UpdateCallRequest.md +7 -6
- data/docs/UpdateConferenceParticipantRequest.md +9 -8
- data/docs/UpdateConferenceRequest.md +11 -10
- data/freeclimb.gemspec +2 -3
- data/lib/freeclimb/api/default_api.rb +424 -272
- data/lib/freeclimb/api_client.rb +54 -50
- data/lib/freeclimb/api_error.rb +1 -1
- data/lib/freeclimb/configuration.rb +40 -10
- data/lib/freeclimb/models/account_request.rb +19 -7
- data/lib/freeclimb/models/account_result.rb +19 -7
- data/lib/freeclimb/models/account_result_all_of.rb +19 -7
- data/lib/freeclimb/models/add_to_conference.rb +19 -7
- data/lib/freeclimb/models/add_to_conference_all_of.rb +19 -7
- data/lib/freeclimb/models/application_list.rb +19 -7
- data/lib/freeclimb/models/application_list_all_of.rb +19 -7
- data/lib/freeclimb/models/application_request.rb +19 -7
- data/lib/freeclimb/models/application_result.rb +19 -7
- data/lib/freeclimb/models/application_result_all_of.rb +19 -7
- data/lib/freeclimb/models/available_number.rb +29 -8
- data/lib/freeclimb/models/available_number_list.rb +19 -7
- data/lib/freeclimb/models/available_number_list_all_of.rb +19 -7
- data/lib/freeclimb/models/buy_incoming_number_request.rb +19 -7
- data/lib/freeclimb/models/call_list.rb +19 -7
- data/lib/freeclimb/models/call_list_all_of.rb +19 -7
- data/lib/freeclimb/models/call_result.rb +19 -7
- data/lib/freeclimb/models/call_result_all_of.rb +19 -7
- data/lib/freeclimb/models/capabilities.rb +285 -0
- data/lib/freeclimb/models/conference_list.rb +19 -7
- data/lib/freeclimb/models/conference_list_all_of.rb +19 -7
- data/lib/freeclimb/models/conference_participant_list.rb +19 -7
- data/lib/freeclimb/models/conference_participant_list_all_of.rb +19 -7
- data/lib/freeclimb/models/conference_participant_result.rb +19 -7
- data/lib/freeclimb/models/conference_participant_result_all_of.rb +19 -7
- data/lib/freeclimb/models/conference_result.rb +19 -7
- data/lib/freeclimb/models/conference_result_all_of.rb +19 -7
- data/lib/freeclimb/models/create_conference.rb +19 -7
- data/lib/freeclimb/models/create_conference_all_of.rb +19 -7
- data/lib/freeclimb/models/create_conference_request.rb +19 -7
- data/lib/freeclimb/models/dequeue.rb +19 -7
- data/lib/freeclimb/models/enqueue.rb +19 -7
- data/lib/freeclimb/models/enqueue_all_of.rb +19 -7
- data/lib/freeclimb/models/filter_logs_request.rb +19 -7
- data/lib/freeclimb/models/get_digits.rb +19 -7
- data/lib/freeclimb/models/get_digits_all_of.rb +19 -7
- data/lib/freeclimb/models/get_speech.rb +19 -7
- data/lib/freeclimb/models/get_speech_all_of.rb +19 -7
- data/lib/freeclimb/models/hangup.rb +19 -7
- data/lib/freeclimb/models/hangup_all_of.rb +19 -7
- data/lib/freeclimb/models/incoming_number_list.rb +19 -7
- data/lib/freeclimb/models/incoming_number_list_all_of.rb +19 -7
- data/lib/freeclimb/models/incoming_number_request.rb +19 -7
- data/lib/freeclimb/models/incoming_number_result.rb +29 -8
- data/lib/freeclimb/models/incoming_number_result_all_of.rb +29 -8
- data/lib/freeclimb/models/log_list.rb +19 -7
- data/lib/freeclimb/models/log_list_all_of.rb +19 -7
- data/lib/freeclimb/models/log_result.rb +19 -7
- data/lib/freeclimb/models/make_call_request.rb +19 -7
- data/lib/freeclimb/models/message_request.rb +19 -7
- data/lib/freeclimb/models/message_request_all_of.rb +19 -7
- data/lib/freeclimb/models/message_result.rb +19 -7
- data/lib/freeclimb/models/message_result_all_of.rb +19 -7
- data/lib/freeclimb/models/messages_list.rb +19 -7
- data/lib/freeclimb/models/messages_list_all_of.rb +19 -7
- data/lib/freeclimb/models/mutable_resource_model.rb +19 -7
- data/lib/freeclimb/models/out_dial.rb +19 -7
- data/lib/freeclimb/models/out_dial_all_of.rb +19 -7
- data/lib/freeclimb/models/pagination_model.rb +19 -7
- data/lib/freeclimb/models/pause.rb +19 -7
- data/lib/freeclimb/models/pause_all_of.rb +19 -7
- data/lib/freeclimb/models/percl_command.rb +19 -7
- data/lib/freeclimb/models/percl_script.rb +19 -7
- data/lib/freeclimb/models/play.rb +19 -7
- data/lib/freeclimb/models/play_all_of.rb +19 -7
- data/lib/freeclimb/models/play_early_media.rb +19 -7
- data/lib/freeclimb/models/play_early_media_all_of.rb +19 -7
- data/lib/freeclimb/models/queue_list.rb +19 -7
- data/lib/freeclimb/models/queue_list_all_of.rb +19 -7
- data/lib/freeclimb/models/queue_member.rb +19 -7
- data/lib/freeclimb/models/queue_member_list.rb +19 -7
- data/lib/freeclimb/models/queue_member_list_all_of.rb +19 -7
- data/lib/freeclimb/models/queue_request.rb +19 -7
- data/lib/freeclimb/models/queue_result.rb +19 -7
- data/lib/freeclimb/models/queue_result_all_of.rb +19 -7
- data/lib/freeclimb/models/record_utterance.rb +19 -7
- data/lib/freeclimb/models/record_utterance_all_of.rb +19 -7
- data/lib/freeclimb/models/recording_list.rb +19 -7
- data/lib/freeclimb/models/recording_list_all_of.rb +19 -7
- data/lib/freeclimb/models/recording_result.rb +19 -7
- data/lib/freeclimb/models/recording_result_all_of.rb +19 -7
- data/lib/freeclimb/models/redirect.rb +19 -7
- data/lib/freeclimb/models/redirect_all_of.rb +19 -7
- data/lib/freeclimb/models/reject.rb +19 -7
- data/lib/freeclimb/models/reject_all_of.rb +19 -7
- data/lib/freeclimb/models/remove_from_conference.rb +19 -7
- data/lib/freeclimb/models/remove_from_conference_all_of.rb +19 -7
- data/lib/freeclimb/models/say.rb +19 -7
- data/lib/freeclimb/models/say_all_of.rb +19 -7
- data/lib/freeclimb/models/send_digits.rb +19 -7
- data/lib/freeclimb/models/send_digits_all_of.rb +19 -7
- data/lib/freeclimb/models/set_listen.rb +19 -7
- data/lib/freeclimb/models/set_listen_all_of.rb +19 -7
- data/lib/freeclimb/models/set_talk.rb +19 -7
- data/lib/freeclimb/models/set_talk_all_of.rb +19 -7
- data/lib/freeclimb/models/sms.rb +19 -7
- data/lib/freeclimb/models/sms_all_of.rb +19 -7
- data/lib/freeclimb/models/start_record_call.rb +19 -7
- data/lib/freeclimb/models/terminate_conference.rb +19 -7
- data/lib/freeclimb/models/terminate_conference_all_of.rb +19 -7
- data/lib/freeclimb/models/update_call_request.rb +19 -7
- data/lib/freeclimb/models/update_conference_participant_request.rb +19 -7
- data/lib/freeclimb/models/update_conference_request.rb +19 -7
- data/lib/freeclimb/version.rb +2 -2
- data/lib/freeclimb.rb +46 -46
- data/spec/api/default_api_spec.rb +1001 -18
- data/spec/api_client_spec.rb +4 -4
- data/spec/configuration_spec.rb +9 -9
- data/spec/factories.rb +80 -0
- data/spec/models/account_request_spec.rb +4 -11
- data/spec/models/account_result_spec.rb +5 -12
- data/spec/models/add_to_conference_spec.rb +4 -11
- data/spec/models/application_list_spec.rb +4 -11
- data/spec/models/application_request_spec.rb +4 -11
- data/spec/models/application_result_spec.rb +4 -11
- data/spec/models/available_number_list_spec.rb +4 -11
- data/spec/models/available_number_spec.rb +10 -11
- data/spec/models/buy_incoming_number_request_spec.rb +4 -11
- data/spec/models/call_list_spec.rb +4 -11
- data/spec/models/call_result_spec.rb +5 -12
- data/spec/models/{say_all_of_spec.rb → capabilities_spec.rb} +12 -19
- data/spec/models/conference_list_spec.rb +4 -11
- data/spec/models/conference_participant_list_spec.rb +4 -11
- data/spec/models/conference_participant_result_spec.rb +4 -11
- data/spec/models/conference_result_spec.rb +6 -13
- data/spec/models/create_conference_request_spec.rb +5 -12
- data/spec/models/create_conference_spec.rb +4 -11
- data/spec/models/dequeue_spec.rb +4 -11
- data/spec/models/enqueue_spec.rb +4 -11
- data/spec/models/filter_logs_request_spec.rb +4 -11
- data/spec/models/get_digits_spec.rb +4 -11
- data/spec/models/get_speech_spec.rb +4 -11
- data/spec/models/hangup_spec.rb +4 -11
- data/spec/models/incoming_number_list_spec.rb +4 -11
- data/spec/models/incoming_number_request_spec.rb +4 -11
- data/spec/models/incoming_number_result_spec.rb +10 -11
- data/spec/models/log_list_spec.rb +4 -11
- data/spec/models/log_result_spec.rb +5 -12
- data/spec/models/make_call_request_spec.rb +4 -11
- data/spec/models/message_request_spec.rb +4 -11
- data/spec/models/message_result_spec.rb +5 -12
- data/spec/models/messages_list_spec.rb +4 -11
- data/spec/models/mutable_resource_model_spec.rb +4 -11
- data/spec/models/out_dial_spec.rb +4 -11
- data/spec/models/pagination_model_spec.rb +4 -11
- data/spec/models/pause_spec.rb +4 -11
- data/spec/models/percl_command_spec.rb +4 -11
- data/spec/models/percl_script_spec.rb +4 -11
- data/spec/models/play_early_media_spec.rb +4 -11
- data/spec/models/play_spec.rb +4 -11
- data/spec/models/queue_list_spec.rb +4 -11
- data/spec/models/queue_member_list_spec.rb +4 -11
- data/spec/models/queue_member_spec.rb +4 -11
- data/spec/models/queue_request_spec.rb +4 -11
- data/spec/models/queue_result_spec.rb +4 -11
- data/spec/models/record_utterance_spec.rb +4 -11
- data/spec/models/recording_list_spec.rb +4 -11
- data/spec/models/recording_result_spec.rb +4 -11
- data/spec/models/redirect_spec.rb +4 -11
- data/spec/models/reject_spec.rb +4 -11
- data/spec/models/remove_from_conference_spec.rb +4 -11
- data/spec/models/say_spec.rb +4 -11
- data/spec/models/send_digits_spec.rb +4 -11
- data/spec/models/set_listen_spec.rb +4 -11
- data/spec/models/set_talk_spec.rb +4 -11
- data/spec/models/sms_spec.rb +4 -11
- data/spec/models/start_record_call_spec.rb +4 -11
- data/spec/models/terminate_conference_spec.rb +4 -11
- data/spec/models/update_call_request_spec.rb +5 -12
- data/spec/models/update_conference_participant_request_spec.rb +4 -11
- data/spec/models/update_conference_request_spec.rb +5 -12
- data/spec/quickstart_spec.rb +10 -0
- data/spec/spec_helper.rb +55 -1
- metadata +20 -117
- data/lib/freeclimb/utils.rb +0 -34
- data/spec/api/web_mocks.rb +0 -473
- data/spec/models/account_result_all_of_spec.rb +0 -81
- data/spec/models/add_to_conference_all_of_spec.rb +0 -95
- data/spec/models/application_list_all_of_spec.rb +0 -41
- data/spec/models/application_result_all_of_spec.rb +0 -89
- data/spec/models/available_number_list_all_of_spec.rb +0 -41
- data/spec/models/call_list_all_of_spec.rb +0 -41
- data/spec/models/call_result_all_of_spec.rb +0 -129
- data/spec/models/conference_list_all_of_spec.rb +0 -41
- data/spec/models/conference_participant_list_all_of_spec.rb +0 -41
- data/spec/models/conference_participant_result_all_of_spec.rb +0 -71
- data/spec/models/conference_result_all_of_spec.rb +0 -103
- data/spec/models/create_conference_all_of_spec.rb +0 -71
- data/spec/models/enqueue_all_of_spec.rb +0 -59
- data/spec/models/get_digits_all_of_spec.rb +0 -89
- data/spec/models/get_speech_all_of_spec.rb +0 -113
- data/spec/models/hangup_all_of_spec.rb +0 -41
- data/spec/models/incoming_number_list_all_of_spec.rb +0 -41
- data/spec/models/incoming_number_result_all_of_spec.rb +0 -89
- data/spec/models/log_list_all_of_spec.rb +0 -41
- data/spec/models/message_request_all_of_spec.rb +0 -65
- data/spec/models/message_result_all_of_spec.rb +0 -87
- data/spec/models/messages_list_all_of_spec.rb +0 -41
- data/spec/models/out_dial_all_of_spec.rb +0 -95
- data/spec/models/pause_all_of_spec.rb +0 -41
- data/spec/models/play_all_of_spec.rb +0 -59
- data/spec/models/play_early_media_all_of_spec.rb +0 -41
- data/spec/models/queue_list_all_of_spec.rb +0 -41
- data/spec/models/queue_member_list_all_of_spec.rb +0 -41
- data/spec/models/queue_result_all_of_spec.rb +0 -77
- data/spec/models/record_utterance_all_of_spec.rb +0 -77
- data/spec/models/recording_list_all_of_spec.rb +0 -41
- data/spec/models/recording_result_all_of_spec.rb +0 -65
- data/spec/models/redirect_all_of_spec.rb +0 -41
- data/spec/models/reject_all_of_spec.rb +0 -41
- data/spec/models/remove_from_conference_all_of_spec.rb +0 -41
- data/spec/models/send_digits_all_of_spec.rb +0 -53
- data/spec/models/set_listen_all_of_spec.rb +0 -47
- data/spec/models/set_talk_all_of_spec.rb +0 -47
- data/spec/models/sms_all_of_spec.rb +0 -59
- data/spec/models/terminate_conference_all_of_spec.rb +0 -41
@@ -6,12 +6,13 @@
|
|
6
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: 5.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'spec_helper'
|
14
14
|
require 'json'
|
15
|
+
require 'rusty_camel'
|
15
16
|
|
16
17
|
# Unit tests for Freeclimb::DefaultApi
|
17
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
@@ -20,9 +21,14 @@ describe 'DefaultApi' do
|
|
20
21
|
before do
|
21
22
|
# run before each test
|
22
23
|
@api_instance = Freeclimb::DefaultApi.new
|
24
|
+
@scheme = @api_instance.api_client.config.scheme
|
25
|
+
@host = @api_instance.api_client.config.host
|
26
|
+
@base_path = @api_instance.api_client.config.base_path
|
27
|
+
@base_url = "#{@scheme}://#{@host}#{@base_path}"
|
23
28
|
end
|
24
29
|
|
25
30
|
after do
|
31
|
+
WebMock.reset!
|
26
32
|
# run after each test
|
27
33
|
end
|
28
34
|
|
@@ -32,16 +38,6 @@ describe 'DefaultApi' do
|
|
32
38
|
end
|
33
39
|
end
|
34
40
|
|
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
41
|
# unit tests for buy_a_phone_number
|
46
42
|
# Buy a Phone Number
|
47
43
|
# @param buy_incoming_number_request Incoming Number transaction details
|
@@ -49,6 +45,26 @@ describe 'DefaultApi' do
|
|
49
45
|
# @return [IncomingNumberResult]
|
50
46
|
describe 'buy_a_phone_number test' do
|
51
47
|
it 'should work' do
|
48
|
+
|
49
|
+
buy_incoming_number_request = build_value(:buy_incoming_number_request)
|
50
|
+
local_var_path = @base_url + '/Accounts/{accountId}/IncomingPhoneNumbers'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase))
|
51
|
+
|
52
|
+
stub = stub_request(:POST.downcase, local_var_path)
|
53
|
+
.with(
|
54
|
+
body: buy_incoming_number_request.to_body.to_json,
|
55
|
+
query: build_query_parameters({
|
56
|
+
|
57
|
+
})
|
58
|
+
)
|
59
|
+
.to_return(status: 200, body: "", headers: {})
|
60
|
+
@api_instance.buy_a_phone_number(
|
61
|
+
buy_incoming_number_request,
|
62
|
+
{
|
63
|
+
|
64
|
+
}
|
65
|
+
)
|
66
|
+
|
67
|
+
expect(stub).to have_been_requested
|
52
68
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
53
69
|
end
|
54
70
|
end
|
@@ -60,6 +76,26 @@ describe 'DefaultApi' do
|
|
60
76
|
# @return [ConferenceResult]
|
61
77
|
describe 'create_a_conference test' do
|
62
78
|
it 'should work' do
|
79
|
+
|
80
|
+
create_conference_request = build_value(:create_conference_request)
|
81
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Conferences'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase))
|
82
|
+
|
83
|
+
stub = stub_request(:POST.downcase, local_var_path)
|
84
|
+
.with(
|
85
|
+
body: create_conference_request.to_body.to_json,
|
86
|
+
query: build_query_parameters({
|
87
|
+
|
88
|
+
})
|
89
|
+
)
|
90
|
+
.to_return(status: 200, body: "", headers: {})
|
91
|
+
@api_instance.create_a_conference(
|
92
|
+
|
93
|
+
{
|
94
|
+
:create_conference_request => create_conference_request,
|
95
|
+
}
|
96
|
+
)
|
97
|
+
|
98
|
+
expect(stub).to have_been_requested
|
63
99
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
64
100
|
end
|
65
101
|
end
|
@@ -71,6 +107,26 @@ describe 'DefaultApi' do
|
|
71
107
|
# @return [QueueResult]
|
72
108
|
describe 'create_a_queue test' do
|
73
109
|
it 'should work' do
|
110
|
+
|
111
|
+
queue_request = build_value(:queue_request)
|
112
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Queues'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase))
|
113
|
+
|
114
|
+
stub = stub_request(:POST.downcase, local_var_path)
|
115
|
+
.with(
|
116
|
+
body: queue_request.to_body.to_json,
|
117
|
+
query: build_query_parameters({
|
118
|
+
|
119
|
+
})
|
120
|
+
)
|
121
|
+
.to_return(status: 200, body: "", headers: {})
|
122
|
+
@api_instance.create_a_queue(
|
123
|
+
|
124
|
+
{
|
125
|
+
:queue_request => queue_request,
|
126
|
+
}
|
127
|
+
)
|
128
|
+
|
129
|
+
expect(stub).to have_been_requested
|
74
130
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
75
131
|
end
|
76
132
|
end
|
@@ -82,6 +138,26 @@ describe 'DefaultApi' do
|
|
82
138
|
# @return [ApplicationResult]
|
83
139
|
describe 'create_an_application test' do
|
84
140
|
it 'should work' do
|
141
|
+
|
142
|
+
application_request = build_value(:application_request)
|
143
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Applications'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase))
|
144
|
+
|
145
|
+
stub = stub_request(:POST.downcase, local_var_path)
|
146
|
+
.with(
|
147
|
+
body: application_request.to_body.to_json,
|
148
|
+
query: build_query_parameters({
|
149
|
+
|
150
|
+
})
|
151
|
+
)
|
152
|
+
.to_return(status: 200, body: "", headers: {})
|
153
|
+
@api_instance.create_an_application(
|
154
|
+
|
155
|
+
{
|
156
|
+
:application_request => application_request,
|
157
|
+
}
|
158
|
+
)
|
159
|
+
|
160
|
+
expect(stub).to have_been_requested
|
85
161
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
86
162
|
end
|
87
163
|
end
|
@@ -93,6 +169,26 @@ describe 'DefaultApi' do
|
|
93
169
|
# @return [nil]
|
94
170
|
describe 'delete_a_recording test' do
|
95
171
|
it 'should work' do
|
172
|
+
|
173
|
+
recording_id = build_value(:recording_id)
|
174
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Recordings/{recordingId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'recordingId' + '}', CGI.escape('TEST_' + 'recordingId'.snakecase.upcase))
|
175
|
+
|
176
|
+
stub = stub_request(:DELETE.downcase, local_var_path)
|
177
|
+
.with(
|
178
|
+
body: {},
|
179
|
+
query: build_query_parameters({
|
180
|
+
|
181
|
+
})
|
182
|
+
)
|
183
|
+
.to_return(status: 200, body: "", headers: {})
|
184
|
+
@api_instance.delete_a_recording(
|
185
|
+
recording_id,
|
186
|
+
{
|
187
|
+
|
188
|
+
}
|
189
|
+
)
|
190
|
+
|
191
|
+
expect(stub).to have_been_requested
|
96
192
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
97
193
|
end
|
98
194
|
end
|
@@ -104,6 +200,26 @@ describe 'DefaultApi' do
|
|
104
200
|
# @return [nil]
|
105
201
|
describe 'delete_an_application test' do
|
106
202
|
it 'should work' do
|
203
|
+
|
204
|
+
application_id = build_value(:application_id)
|
205
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Applications/{applicationId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'applicationId' + '}', CGI.escape('TEST_' + 'applicationId'.snakecase.upcase))
|
206
|
+
|
207
|
+
stub = stub_request(:DELETE.downcase, local_var_path)
|
208
|
+
.with(
|
209
|
+
body: {},
|
210
|
+
query: build_query_parameters({
|
211
|
+
|
212
|
+
})
|
213
|
+
)
|
214
|
+
.to_return(status: 200, body: "", headers: {})
|
215
|
+
@api_instance.delete_an_application(
|
216
|
+
application_id,
|
217
|
+
{
|
218
|
+
|
219
|
+
}
|
220
|
+
)
|
221
|
+
|
222
|
+
expect(stub).to have_been_requested
|
107
223
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
108
224
|
end
|
109
225
|
end
|
@@ -115,6 +231,26 @@ describe 'DefaultApi' do
|
|
115
231
|
# @return [nil]
|
116
232
|
describe 'delete_an_incoming_number test' do
|
117
233
|
it 'should work' do
|
234
|
+
|
235
|
+
phone_number_id = build_value(:phone_number_id)
|
236
|
+
local_var_path = @base_url + '/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'phoneNumberId' + '}', CGI.escape('TEST_' + 'phoneNumberId'.snakecase.upcase))
|
237
|
+
|
238
|
+
stub = stub_request(:DELETE.downcase, local_var_path)
|
239
|
+
.with(
|
240
|
+
body: {},
|
241
|
+
query: build_query_parameters({
|
242
|
+
|
243
|
+
})
|
244
|
+
)
|
245
|
+
.to_return(status: 200, body: "", headers: {})
|
246
|
+
@api_instance.delete_an_incoming_number(
|
247
|
+
phone_number_id,
|
248
|
+
{
|
249
|
+
|
250
|
+
}
|
251
|
+
)
|
252
|
+
|
253
|
+
expect(stub).to have_been_requested
|
118
254
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
119
255
|
end
|
120
256
|
end
|
@@ -127,6 +263,27 @@ describe 'DefaultApi' do
|
|
127
263
|
# @return [QueueMember]
|
128
264
|
describe 'dequeue_a_member test' do
|
129
265
|
it 'should work' do
|
266
|
+
|
267
|
+
queue_id = build_value(:queue_id)
|
268
|
+
call_id = build_value(:call_id)
|
269
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Queues/{queueId}/Members/{callId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'queueId' + '}', CGI.escape('TEST_' + 'queueId'.snakecase.upcase)).sub('{' + 'callId' + '}', CGI.escape('TEST_' + 'callId'.snakecase.upcase))
|
270
|
+
|
271
|
+
stub = stub_request(:POST.downcase, local_var_path)
|
272
|
+
.with(
|
273
|
+
body: {},
|
274
|
+
query: build_query_parameters({
|
275
|
+
|
276
|
+
})
|
277
|
+
)
|
278
|
+
.to_return(status: 200, body: "", headers: {})
|
279
|
+
@api_instance.dequeue_a_member(
|
280
|
+
queue_id,call_id,
|
281
|
+
{
|
282
|
+
|
283
|
+
}
|
284
|
+
)
|
285
|
+
|
286
|
+
expect(stub).to have_been_requested
|
130
287
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
131
288
|
end
|
132
289
|
end
|
@@ -138,6 +295,26 @@ describe 'DefaultApi' do
|
|
138
295
|
# @return [QueueMember]
|
139
296
|
describe 'dequeue_head_member test' do
|
140
297
|
it 'should work' do
|
298
|
+
|
299
|
+
queue_id = build_value(:queue_id)
|
300
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Queues/{queueId}/Members/Front'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'queueId' + '}', CGI.escape('TEST_' + 'queueId'.snakecase.upcase))
|
301
|
+
|
302
|
+
stub = stub_request(:POST.downcase, local_var_path)
|
303
|
+
.with(
|
304
|
+
body: {},
|
305
|
+
query: build_query_parameters({
|
306
|
+
|
307
|
+
})
|
308
|
+
)
|
309
|
+
.to_return(status: 200, body: "", headers: {})
|
310
|
+
@api_instance.dequeue_head_member(
|
311
|
+
queue_id,
|
312
|
+
{
|
313
|
+
|
314
|
+
}
|
315
|
+
)
|
316
|
+
|
317
|
+
expect(stub).to have_been_requested
|
141
318
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
142
319
|
end
|
143
320
|
end
|
@@ -149,6 +326,26 @@ describe 'DefaultApi' do
|
|
149
326
|
# @return [File]
|
150
327
|
describe 'download_a_recording_file test' do
|
151
328
|
it 'should work' do
|
329
|
+
|
330
|
+
recording_id = build_value(:recording_id)
|
331
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Recordings/{recordingId}/Download'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'recordingId' + '}', CGI.escape('TEST_' + 'recordingId'.snakecase.upcase))
|
332
|
+
|
333
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
334
|
+
.with(
|
335
|
+
body: {},
|
336
|
+
query: build_query_parameters({
|
337
|
+
|
338
|
+
})
|
339
|
+
)
|
340
|
+
.to_return(status: 200, body: "", headers: {})
|
341
|
+
@api_instance.download_a_recording_file(
|
342
|
+
recording_id,
|
343
|
+
{
|
344
|
+
|
345
|
+
}
|
346
|
+
)
|
347
|
+
|
348
|
+
expect(stub).to have_been_requested
|
152
349
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
153
350
|
end
|
154
351
|
end
|
@@ -160,6 +357,26 @@ describe 'DefaultApi' do
|
|
160
357
|
# @return [LogList]
|
161
358
|
describe 'filter_logs test' do
|
162
359
|
it 'should work' do
|
360
|
+
|
361
|
+
filter_logs_request = build_value(:filter_logs_request)
|
362
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Logs'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase))
|
363
|
+
|
364
|
+
stub = stub_request(:POST.downcase, local_var_path)
|
365
|
+
.with(
|
366
|
+
body: filter_logs_request.to_body.to_json,
|
367
|
+
query: build_query_parameters({
|
368
|
+
|
369
|
+
})
|
370
|
+
)
|
371
|
+
.to_return(status: 200, body: "", headers: {})
|
372
|
+
@api_instance.filter_logs(
|
373
|
+
filter_logs_request,
|
374
|
+
{
|
375
|
+
|
376
|
+
}
|
377
|
+
)
|
378
|
+
|
379
|
+
expect(stub).to have_been_requested
|
163
380
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
164
381
|
end
|
165
382
|
end
|
@@ -171,6 +388,26 @@ describe 'DefaultApi' do
|
|
171
388
|
# @return [CallResult]
|
172
389
|
describe 'get_a_call test' do
|
173
390
|
it 'should work' do
|
391
|
+
|
392
|
+
call_id = build_value(:call_id)
|
393
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Calls/{callId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'callId' + '}', CGI.escape('TEST_' + 'callId'.snakecase.upcase))
|
394
|
+
|
395
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
396
|
+
.with(
|
397
|
+
body: {},
|
398
|
+
query: build_query_parameters({
|
399
|
+
|
400
|
+
})
|
401
|
+
)
|
402
|
+
.to_return(status: 200, body: "", headers: {})
|
403
|
+
@api_instance.get_a_call(
|
404
|
+
call_id,
|
405
|
+
{
|
406
|
+
|
407
|
+
}
|
408
|
+
)
|
409
|
+
|
410
|
+
expect(stub).to have_been_requested
|
174
411
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
175
412
|
end
|
176
413
|
end
|
@@ -182,6 +419,26 @@ describe 'DefaultApi' do
|
|
182
419
|
# @return [ConferenceResult]
|
183
420
|
describe 'get_a_conference test' do
|
184
421
|
it 'should work' do
|
422
|
+
|
423
|
+
conference_id = build_value(:conference_id)
|
424
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Conferences/{conferenceId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'conferenceId' + '}', CGI.escape('TEST_' + 'conferenceId'.snakecase.upcase))
|
425
|
+
|
426
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
427
|
+
.with(
|
428
|
+
body: {},
|
429
|
+
query: build_query_parameters({
|
430
|
+
|
431
|
+
})
|
432
|
+
)
|
433
|
+
.to_return(status: 200, body: "", headers: {})
|
434
|
+
@api_instance.get_a_conference(
|
435
|
+
conference_id,
|
436
|
+
{
|
437
|
+
|
438
|
+
}
|
439
|
+
)
|
440
|
+
|
441
|
+
expect(stub).to have_been_requested
|
185
442
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
186
443
|
end
|
187
444
|
end
|
@@ -194,6 +451,27 @@ describe 'DefaultApi' do
|
|
194
451
|
# @return [QueueMember]
|
195
452
|
describe 'get_a_member test' do
|
196
453
|
it 'should work' do
|
454
|
+
|
455
|
+
queue_id = build_value(:queue_id)
|
456
|
+
call_id = build_value(:call_id)
|
457
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Queues/{queueId}/Members/{callId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'queueId' + '}', CGI.escape('TEST_' + 'queueId'.snakecase.upcase)).sub('{' + 'callId' + '}', CGI.escape('TEST_' + 'callId'.snakecase.upcase))
|
458
|
+
|
459
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
460
|
+
.with(
|
461
|
+
body: {},
|
462
|
+
query: build_query_parameters({
|
463
|
+
|
464
|
+
})
|
465
|
+
)
|
466
|
+
.to_return(status: 200, body: "", headers: {})
|
467
|
+
@api_instance.get_a_member(
|
468
|
+
queue_id,call_id,
|
469
|
+
{
|
470
|
+
|
471
|
+
}
|
472
|
+
)
|
473
|
+
|
474
|
+
expect(stub).to have_been_requested
|
197
475
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
198
476
|
end
|
199
477
|
end
|
@@ -206,6 +484,27 @@ describe 'DefaultApi' do
|
|
206
484
|
# @return [ConferenceParticipantResult]
|
207
485
|
describe 'get_a_participant test' do
|
208
486
|
it 'should work' do
|
487
|
+
|
488
|
+
conference_id = build_value(:conference_id)
|
489
|
+
call_id = build_value(:call_id)
|
490
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'conferenceId' + '}', CGI.escape('TEST_' + 'conferenceId'.snakecase.upcase)).sub('{' + 'callId' + '}', CGI.escape('TEST_' + 'callId'.snakecase.upcase))
|
491
|
+
|
492
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
493
|
+
.with(
|
494
|
+
body: {},
|
495
|
+
query: build_query_parameters({
|
496
|
+
|
497
|
+
})
|
498
|
+
)
|
499
|
+
.to_return(status: 200, body: "", headers: {})
|
500
|
+
@api_instance.get_a_participant(
|
501
|
+
conference_id,call_id,
|
502
|
+
{
|
503
|
+
|
504
|
+
}
|
505
|
+
)
|
506
|
+
|
507
|
+
expect(stub).to have_been_requested
|
209
508
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
210
509
|
end
|
211
510
|
end
|
@@ -217,6 +516,26 @@ describe 'DefaultApi' do
|
|
217
516
|
# @return [QueueResult]
|
218
517
|
describe 'get_a_queue test' do
|
219
518
|
it 'should work' do
|
519
|
+
|
520
|
+
queue_id = build_value(:queue_id)
|
521
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Queues/{queueId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'queueId' + '}', CGI.escape('TEST_' + 'queueId'.snakecase.upcase))
|
522
|
+
|
523
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
524
|
+
.with(
|
525
|
+
body: {},
|
526
|
+
query: build_query_parameters({
|
527
|
+
|
528
|
+
})
|
529
|
+
)
|
530
|
+
.to_return(status: 200, body: "", headers: {})
|
531
|
+
@api_instance.get_a_queue(
|
532
|
+
queue_id,
|
533
|
+
{
|
534
|
+
|
535
|
+
}
|
536
|
+
)
|
537
|
+
|
538
|
+
expect(stub).to have_been_requested
|
220
539
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
221
540
|
end
|
222
541
|
end
|
@@ -228,6 +547,55 @@ describe 'DefaultApi' do
|
|
228
547
|
# @return [RecordingResult]
|
229
548
|
describe 'get_a_recording test' do
|
230
549
|
it 'should work' do
|
550
|
+
|
551
|
+
recording_id = build_value(:recording_id)
|
552
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Recordings/{recordingId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'recordingId' + '}', CGI.escape('TEST_' + 'recordingId'.snakecase.upcase))
|
553
|
+
|
554
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
555
|
+
.with(
|
556
|
+
body: {},
|
557
|
+
query: build_query_parameters({
|
558
|
+
|
559
|
+
})
|
560
|
+
)
|
561
|
+
.to_return(status: 200, body: "", headers: {})
|
562
|
+
@api_instance.get_a_recording(
|
563
|
+
recording_id,
|
564
|
+
{
|
565
|
+
|
566
|
+
}
|
567
|
+
)
|
568
|
+
|
569
|
+
expect(stub).to have_been_requested
|
570
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
571
|
+
end
|
572
|
+
end
|
573
|
+
|
574
|
+
# unit tests for get_an_account
|
575
|
+
# Get an Account
|
576
|
+
# @param [Hash] opts the optional parameters
|
577
|
+
# @return [AccountResult]
|
578
|
+
describe 'get_an_account test' do
|
579
|
+
it 'should work' do
|
580
|
+
|
581
|
+
local_var_path = @base_url + '/Accounts/{accountId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase))
|
582
|
+
|
583
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
584
|
+
.with(
|
585
|
+
body: {},
|
586
|
+
query: build_query_parameters({
|
587
|
+
|
588
|
+
})
|
589
|
+
)
|
590
|
+
.to_return(status: 200, body: "", headers: {})
|
591
|
+
@api_instance.get_an_account(
|
592
|
+
|
593
|
+
{
|
594
|
+
|
595
|
+
}
|
596
|
+
)
|
597
|
+
|
598
|
+
expect(stub).to have_been_requested
|
231
599
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
232
600
|
end
|
233
601
|
end
|
@@ -239,6 +607,26 @@ describe 'DefaultApi' do
|
|
239
607
|
# @return [ApplicationResult]
|
240
608
|
describe 'get_an_application test' do
|
241
609
|
it 'should work' do
|
610
|
+
|
611
|
+
application_id = build_value(:application_id)
|
612
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Applications/{applicationId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'applicationId' + '}', CGI.escape('TEST_' + 'applicationId'.snakecase.upcase))
|
613
|
+
|
614
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
615
|
+
.with(
|
616
|
+
body: {},
|
617
|
+
query: build_query_parameters({
|
618
|
+
|
619
|
+
})
|
620
|
+
)
|
621
|
+
.to_return(status: 200, body: "", headers: {})
|
622
|
+
@api_instance.get_an_application(
|
623
|
+
application_id,
|
624
|
+
{
|
625
|
+
|
626
|
+
}
|
627
|
+
)
|
628
|
+
|
629
|
+
expect(stub).to have_been_requested
|
242
630
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
243
631
|
end
|
244
632
|
end
|
@@ -247,15 +635,29 @@ describe 'DefaultApi' do
|
|
247
635
|
# Get an Incoming Number
|
248
636
|
# @param phone_number_id String that uniquely identifies this phone number resource.
|
249
637
|
# @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.
|
256
638
|
# @return [IncomingNumberResult]
|
257
639
|
describe 'get_an_incoming_number test' do
|
258
640
|
it 'should work' do
|
641
|
+
|
642
|
+
phone_number_id = build_value(:phone_number_id)
|
643
|
+
local_var_path = @base_url + '/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'phoneNumberId' + '}', CGI.escape('TEST_' + 'phoneNumberId'.snakecase.upcase))
|
644
|
+
|
645
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
646
|
+
.with(
|
647
|
+
body: {},
|
648
|
+
query: build_query_parameters({
|
649
|
+
|
650
|
+
})
|
651
|
+
)
|
652
|
+
.to_return(status: 200, body: "", headers: {})
|
653
|
+
@api_instance.get_an_incoming_number(
|
654
|
+
phone_number_id,
|
655
|
+
{
|
656
|
+
|
657
|
+
}
|
658
|
+
)
|
659
|
+
|
660
|
+
expect(stub).to have_been_requested
|
259
661
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
260
662
|
end
|
261
663
|
end
|
@@ -267,6 +669,26 @@ describe 'DefaultApi' do
|
|
267
669
|
# @return [MessageResult]
|
268
670
|
describe 'get_an_sms_message test' do
|
269
671
|
it 'should work' do
|
672
|
+
|
673
|
+
message_id = build_value(:message_id)
|
674
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Messages/{messageId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'messageId' + '}', CGI.escape('TEST_' + 'messageId'.snakecase.upcase))
|
675
|
+
|
676
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
677
|
+
.with(
|
678
|
+
body: {},
|
679
|
+
query: build_query_parameters({
|
680
|
+
|
681
|
+
})
|
682
|
+
)
|
683
|
+
.to_return(status: 200, body: "", headers: {})
|
684
|
+
@api_instance.get_an_sms_message(
|
685
|
+
message_id,
|
686
|
+
{
|
687
|
+
|
688
|
+
}
|
689
|
+
)
|
690
|
+
|
691
|
+
expect(stub).to have_been_requested
|
270
692
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
271
693
|
end
|
272
694
|
end
|
@@ -278,6 +700,26 @@ describe 'DefaultApi' do
|
|
278
700
|
# @return [QueueMember]
|
279
701
|
describe 'get_head_member test' do
|
280
702
|
it 'should work' do
|
703
|
+
|
704
|
+
queue_id = build_value(:queue_id)
|
705
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Queues/{queueId}/Members/Front'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'queueId' + '}', CGI.escape('TEST_' + 'queueId'.snakecase.upcase))
|
706
|
+
|
707
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
708
|
+
.with(
|
709
|
+
body: {},
|
710
|
+
query: build_query_parameters({
|
711
|
+
|
712
|
+
})
|
713
|
+
)
|
714
|
+
.to_return(status: 200, body: "", headers: {})
|
715
|
+
@api_instance.get_head_member(
|
716
|
+
queue_id,
|
717
|
+
{
|
718
|
+
|
719
|
+
}
|
720
|
+
)
|
721
|
+
|
722
|
+
expect(stub).to have_been_requested
|
281
723
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
282
724
|
end
|
283
725
|
end
|
@@ -289,6 +731,26 @@ describe 'DefaultApi' do
|
|
289
731
|
# @return [QueueList]
|
290
732
|
describe 'list_active_queues test' do
|
291
733
|
it 'should work' do
|
734
|
+
|
735
|
+
_alias = build_value(:_alias)
|
736
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Queues'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase))
|
737
|
+
|
738
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
739
|
+
.with(
|
740
|
+
body: {},
|
741
|
+
query: build_query_parameters({
|
742
|
+
:_alias => _alias,
|
743
|
+
})
|
744
|
+
)
|
745
|
+
.to_return(status: 200, body: "", headers: {})
|
746
|
+
@api_instance.list_active_queues(
|
747
|
+
|
748
|
+
{
|
749
|
+
:_alias => _alias,
|
750
|
+
}
|
751
|
+
)
|
752
|
+
|
753
|
+
expect(stub).to have_been_requested
|
292
754
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
293
755
|
end
|
294
756
|
end
|
@@ -299,6 +761,25 @@ describe 'DefaultApi' do
|
|
299
761
|
# @return [LogList]
|
300
762
|
describe 'list_all_account_logs test' do
|
301
763
|
it 'should work' do
|
764
|
+
|
765
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Logs'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase))
|
766
|
+
|
767
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
768
|
+
.with(
|
769
|
+
body: {},
|
770
|
+
query: build_query_parameters({
|
771
|
+
|
772
|
+
})
|
773
|
+
)
|
774
|
+
.to_return(status: 200, body: "", headers: {})
|
775
|
+
@api_instance.list_all_account_logs(
|
776
|
+
|
777
|
+
{
|
778
|
+
|
779
|
+
}
|
780
|
+
)
|
781
|
+
|
782
|
+
expect(stub).to have_been_requested
|
302
783
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
303
784
|
end
|
304
785
|
end
|
@@ -310,6 +791,26 @@ describe 'DefaultApi' do
|
|
310
791
|
# @return [ApplicationList]
|
311
792
|
describe 'list_an_application test' do
|
312
793
|
it 'should work' do
|
794
|
+
|
795
|
+
_alias = build_value(:_alias)
|
796
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Applications'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase))
|
797
|
+
|
798
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
799
|
+
.with(
|
800
|
+
body: {},
|
801
|
+
query: build_query_parameters({
|
802
|
+
:_alias => _alias,
|
803
|
+
})
|
804
|
+
)
|
805
|
+
.to_return(status: 200, body: "", headers: {})
|
806
|
+
@api_instance.list_an_application(
|
807
|
+
|
808
|
+
{
|
809
|
+
:_alias => _alias,
|
810
|
+
}
|
811
|
+
)
|
812
|
+
|
813
|
+
expect(stub).to have_been_requested
|
313
814
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
314
815
|
end
|
315
816
|
end
|
@@ -322,9 +823,43 @@ describe 'DefaultApi' do
|
|
322
823
|
# @option opts [String] :country Country of this phone number.
|
323
824
|
# @option opts [Boolean] :voice_enabled Indicates whether the phone number can handle Calls. Typically set to true for all numbers.
|
324
825
|
# @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.
|
826
|
+
# @option opts [Boolean] :capabilities_voice
|
827
|
+
# @option opts [Boolean] :capabilities_sms
|
828
|
+
# @option opts [Boolean] :capabilities_toll_free
|
829
|
+
# @option opts [Boolean] :capabilities_ten_dlc
|
830
|
+
# @option opts [Boolean] :capabilities_short_code
|
325
831
|
# @return [AvailableNumberList]
|
326
832
|
describe 'list_available_numbers test' do
|
327
833
|
it 'should work' do
|
834
|
+
|
835
|
+
phone_number = build_value(:phone_number)
|
836
|
+
region = build_value(:region)
|
837
|
+
country = build_value(:country)
|
838
|
+
voice_enabled = build_value(:voice_enabled)
|
839
|
+
sms_enabled = build_value(:sms_enabled)
|
840
|
+
capabilities_voice = build_value(:capabilities_voice)
|
841
|
+
capabilities_sms = build_value(:capabilities_sms)
|
842
|
+
capabilities_toll_free = build_value(:capabilities_toll_free)
|
843
|
+
capabilities_ten_dlc = build_value(:capabilities_ten_dlc)
|
844
|
+
capabilities_short_code = build_value(:capabilities_short_code)
|
845
|
+
local_var_path = @base_url + '/AvailablePhoneNumbers'
|
846
|
+
|
847
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
848
|
+
.with(
|
849
|
+
body: {},
|
850
|
+
query: build_query_parameters({
|
851
|
+
:phone_number => phone_number, :region => region, :country => country, :voice_enabled => voice_enabled, :sms_enabled => sms_enabled, :capabilities_voice => capabilities_voice, :capabilities_sms => capabilities_sms, :capabilities_toll_free => capabilities_toll_free, :capabilities_ten_dlc => capabilities_ten_dlc, :capabilities_short_code => capabilities_short_code,
|
852
|
+
})
|
853
|
+
)
|
854
|
+
.to_return(status: 200, body: "", headers: {})
|
855
|
+
@api_instance.list_available_numbers(
|
856
|
+
|
857
|
+
{
|
858
|
+
:phone_number => phone_number,:region => region,:country => country,:voice_enabled => voice_enabled,:sms_enabled => sms_enabled,:capabilities_voice => capabilities_voice,:capabilities_sms => capabilities_sms,:capabilities_toll_free => capabilities_toll_free,:capabilities_ten_dlc => capabilities_ten_dlc,:capabilities_short_code => capabilities_short_code,
|
859
|
+
}
|
860
|
+
)
|
861
|
+
|
862
|
+
expect(stub).to have_been_requested
|
328
863
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
329
864
|
end
|
330
865
|
end
|
@@ -336,6 +871,26 @@ describe 'DefaultApi' do
|
|
336
871
|
# @return [LogList]
|
337
872
|
describe 'list_call_logs test' do
|
338
873
|
it 'should work' do
|
874
|
+
|
875
|
+
call_id = build_value(:call_id)
|
876
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Calls/{callId}/Logs'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'callId' + '}', CGI.escape('TEST_' + 'callId'.snakecase.upcase))
|
877
|
+
|
878
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
879
|
+
.with(
|
880
|
+
body: {},
|
881
|
+
query: build_query_parameters({
|
882
|
+
|
883
|
+
})
|
884
|
+
)
|
885
|
+
.to_return(status: 200, body: "", headers: {})
|
886
|
+
@api_instance.list_call_logs(
|
887
|
+
call_id,
|
888
|
+
{
|
889
|
+
|
890
|
+
}
|
891
|
+
)
|
892
|
+
|
893
|
+
expect(stub).to have_been_requested
|
339
894
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
340
895
|
end
|
341
896
|
end
|
@@ -348,6 +903,27 @@ describe 'DefaultApi' do
|
|
348
903
|
# @return [RecordingList]
|
349
904
|
describe 'list_call_recordings test' do
|
350
905
|
it 'should work' do
|
906
|
+
|
907
|
+
call_id = build_value(:call_id)
|
908
|
+
date_created = build_value(:date_created)
|
909
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Calls/{callId}/Recordings'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'callId' + '}', CGI.escape('TEST_' + 'callId'.snakecase.upcase))
|
910
|
+
|
911
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
912
|
+
.with(
|
913
|
+
body: {},
|
914
|
+
query: build_query_parameters({
|
915
|
+
:date_created => date_created,
|
916
|
+
})
|
917
|
+
)
|
918
|
+
.to_return(status: 200, body: "", headers: {})
|
919
|
+
@api_instance.list_call_recordings(
|
920
|
+
call_id,
|
921
|
+
{
|
922
|
+
:date_created => date_created,
|
923
|
+
}
|
924
|
+
)
|
925
|
+
|
926
|
+
expect(stub).to have_been_requested
|
351
927
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
352
928
|
end
|
353
929
|
end
|
@@ -365,6 +941,32 @@ describe 'DefaultApi' do
|
|
365
941
|
# @return [CallList]
|
366
942
|
describe 'list_calls test' do
|
367
943
|
it 'should work' do
|
944
|
+
|
945
|
+
active = build_value(:active)
|
946
|
+
to = build_value(:to)
|
947
|
+
from = build_value(:from)
|
948
|
+
status = build_value(:status)
|
949
|
+
start_time = build_value(:start_time)
|
950
|
+
end_time = build_value(:end_time)
|
951
|
+
parent_call_id = build_value(:parent_call_id)
|
952
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Calls'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase))
|
953
|
+
|
954
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
955
|
+
.with(
|
956
|
+
body: {},
|
957
|
+
query: build_query_parameters({
|
958
|
+
:active => active, :to => to, :from => from, :status => status, :start_time => start_time, :end_time => end_time, :parent_call_id => parent_call_id,
|
959
|
+
})
|
960
|
+
)
|
961
|
+
.to_return(status: 200, body: "", headers: {})
|
962
|
+
@api_instance.list_calls(
|
963
|
+
|
964
|
+
{
|
965
|
+
:active => active,:to => to,:from => from,:status => status,:start_time => start_time,:end_time => end_time,:parent_call_id => parent_call_id,
|
966
|
+
}
|
967
|
+
)
|
968
|
+
|
969
|
+
expect(stub).to have_been_requested
|
368
970
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
369
971
|
end
|
370
972
|
end
|
@@ -379,6 +981,29 @@ describe 'DefaultApi' do
|
|
379
981
|
# @return [ConferenceList]
|
380
982
|
describe 'list_conferences test' do
|
381
983
|
it 'should work' do
|
984
|
+
|
985
|
+
status = build_value(:status)
|
986
|
+
_alias = build_value(:_alias)
|
987
|
+
date_created = build_value(:date_created)
|
988
|
+
date_updated = build_value(:date_updated)
|
989
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Conferences'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase))
|
990
|
+
|
991
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
992
|
+
.with(
|
993
|
+
body: {},
|
994
|
+
query: build_query_parameters({
|
995
|
+
:status => status, :_alias => _alias, :date_created => date_created, :date_updated => date_updated,
|
996
|
+
})
|
997
|
+
)
|
998
|
+
.to_return(status: 200, body: "", headers: {})
|
999
|
+
@api_instance.list_conferences(
|
1000
|
+
|
1001
|
+
{
|
1002
|
+
:status => status,:_alias => _alias,:date_created => date_created,:date_updated => date_updated,
|
1003
|
+
}
|
1004
|
+
)
|
1005
|
+
|
1006
|
+
expect(stub).to have_been_requested
|
382
1007
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
383
1008
|
end
|
384
1009
|
end
|
@@ -388,9 +1013,52 @@ describe 'DefaultApi' do
|
|
388
1013
|
# @param [Hash] opts the optional parameters
|
389
1014
|
# @option opts [String] :phone_number Only show incoming phone number resources that match this PCRE-compatible regular expression.
|
390
1015
|
# @option opts [String] :_alias Only show incoming phone numbers with aliases that exactly match this value.
|
1016
|
+
# @option opts [String] :region State or province of this phone number.
|
1017
|
+
# @option opts [String] :country Country of this phone number.
|
1018
|
+
# @option opts [Boolean] :voice_enabled Indicates whether the phone number can handle Calls. Typically set to true for all numbers.
|
1019
|
+
# @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.
|
1020
|
+
# @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.
|
1021
|
+
# @option opts [Boolean] :has_application Indication of whether the phone number has an application linked to it.
|
1022
|
+
# @option opts [Boolean] :capabilities_voice
|
1023
|
+
# @option opts [Boolean] :capabilities_sms
|
1024
|
+
# @option opts [Boolean] :capabilities_toll_free
|
1025
|
+
# @option opts [Boolean] :capabilities_ten_dlc
|
1026
|
+
# @option opts [Boolean] :capabilities_short_code
|
391
1027
|
# @return [IncomingNumberList]
|
392
1028
|
describe 'list_incoming_numbers test' do
|
393
1029
|
it 'should work' do
|
1030
|
+
|
1031
|
+
phone_number = build_value(:phone_number)
|
1032
|
+
_alias = build_value(:_alias)
|
1033
|
+
region = build_value(:region)
|
1034
|
+
country = build_value(:country)
|
1035
|
+
voice_enabled = build_value(:voice_enabled)
|
1036
|
+
sms_enabled = build_value(:sms_enabled)
|
1037
|
+
application_id = build_value(:application_id)
|
1038
|
+
has_application = build_value(:has_application)
|
1039
|
+
capabilities_voice = build_value(:capabilities_voice)
|
1040
|
+
capabilities_sms = build_value(:capabilities_sms)
|
1041
|
+
capabilities_toll_free = build_value(:capabilities_toll_free)
|
1042
|
+
capabilities_ten_dlc = build_value(:capabilities_ten_dlc)
|
1043
|
+
capabilities_short_code = build_value(:capabilities_short_code)
|
1044
|
+
local_var_path = @base_url + '/Accounts/{accountId}/IncomingPhoneNumbers'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase))
|
1045
|
+
|
1046
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
1047
|
+
.with(
|
1048
|
+
body: {},
|
1049
|
+
query: build_query_parameters({
|
1050
|
+
:phone_number => phone_number, :_alias => _alias, :region => region, :country => country, :voice_enabled => voice_enabled, :sms_enabled => sms_enabled, :application_id => application_id, :has_application => has_application, :capabilities_voice => capabilities_voice, :capabilities_sms => capabilities_sms, :capabilities_toll_free => capabilities_toll_free, :capabilities_ten_dlc => capabilities_ten_dlc, :capabilities_short_code => capabilities_short_code,
|
1051
|
+
})
|
1052
|
+
)
|
1053
|
+
.to_return(status: 200, body: "", headers: {})
|
1054
|
+
@api_instance.list_incoming_numbers(
|
1055
|
+
|
1056
|
+
{
|
1057
|
+
:phone_number => phone_number,:_alias => _alias,:region => region,:country => country,:voice_enabled => voice_enabled,:sms_enabled => sms_enabled,:application_id => application_id,:has_application => has_application,:capabilities_voice => capabilities_voice,:capabilities_sms => capabilities_sms,:capabilities_toll_free => capabilities_toll_free,:capabilities_ten_dlc => capabilities_ten_dlc,:capabilities_short_code => capabilities_short_code,
|
1058
|
+
}
|
1059
|
+
)
|
1060
|
+
|
1061
|
+
expect(stub).to have_been_requested
|
394
1062
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
395
1063
|
end
|
396
1064
|
end
|
@@ -402,6 +1070,26 @@ describe 'DefaultApi' do
|
|
402
1070
|
# @return [QueueMemberList]
|
403
1071
|
describe 'list_members test' do
|
404
1072
|
it 'should work' do
|
1073
|
+
|
1074
|
+
queue_id = build_value(:queue_id)
|
1075
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Queues/{queueId}/Members'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'queueId' + '}', CGI.escape('TEST_' + 'queueId'.snakecase.upcase))
|
1076
|
+
|
1077
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
1078
|
+
.with(
|
1079
|
+
body: {},
|
1080
|
+
query: build_query_parameters({
|
1081
|
+
|
1082
|
+
})
|
1083
|
+
)
|
1084
|
+
.to_return(status: 200, body: "", headers: {})
|
1085
|
+
@api_instance.list_members(
|
1086
|
+
queue_id,
|
1087
|
+
{
|
1088
|
+
|
1089
|
+
}
|
1090
|
+
)
|
1091
|
+
|
1092
|
+
expect(stub).to have_been_requested
|
405
1093
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
406
1094
|
end
|
407
1095
|
end
|
@@ -415,6 +1103,28 @@ describe 'DefaultApi' do
|
|
415
1103
|
# @return [ConferenceParticipantList]
|
416
1104
|
describe 'list_participants test' do
|
417
1105
|
it 'should work' do
|
1106
|
+
|
1107
|
+
conference_id = build_value(:conference_id)
|
1108
|
+
talk = build_value(:talk)
|
1109
|
+
listen = build_value(:listen)
|
1110
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Conferences/{conferenceId}/Participants'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'conferenceId' + '}', CGI.escape('TEST_' + 'conferenceId'.snakecase.upcase))
|
1111
|
+
|
1112
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
1113
|
+
.with(
|
1114
|
+
body: {},
|
1115
|
+
query: build_query_parameters({
|
1116
|
+
:talk => talk, :listen => listen,
|
1117
|
+
})
|
1118
|
+
)
|
1119
|
+
.to_return(status: 200, body: "", headers: {})
|
1120
|
+
@api_instance.list_participants(
|
1121
|
+
conference_id,
|
1122
|
+
{
|
1123
|
+
:talk => talk,:listen => listen,
|
1124
|
+
}
|
1125
|
+
)
|
1126
|
+
|
1127
|
+
expect(stub).to have_been_requested
|
418
1128
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
419
1129
|
end
|
420
1130
|
end
|
@@ -428,6 +1138,28 @@ describe 'DefaultApi' do
|
|
428
1138
|
# @return [RecordingList]
|
429
1139
|
describe 'list_recordings test' do
|
430
1140
|
it 'should work' do
|
1141
|
+
|
1142
|
+
call_id = build_value(:call_id)
|
1143
|
+
conference_id = build_value(:conference_id)
|
1144
|
+
date_created = build_value(:date_created)
|
1145
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Recordings'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase))
|
1146
|
+
|
1147
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
1148
|
+
.with(
|
1149
|
+
body: {},
|
1150
|
+
query: build_query_parameters({
|
1151
|
+
:call_id => call_id, :conference_id => conference_id, :date_created => date_created,
|
1152
|
+
})
|
1153
|
+
)
|
1154
|
+
.to_return(status: 200, body: "", headers: {})
|
1155
|
+
@api_instance.list_recordings(
|
1156
|
+
|
1157
|
+
{
|
1158
|
+
:call_id => call_id,:conference_id => conference_id,:date_created => date_created,
|
1159
|
+
}
|
1160
|
+
)
|
1161
|
+
|
1162
|
+
expect(stub).to have_been_requested
|
431
1163
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
432
1164
|
end
|
433
1165
|
end
|
@@ -440,10 +1172,33 @@ describe 'DefaultApi' do
|
|
440
1172
|
# @option opts [String] :begin_time Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*.
|
441
1173
|
# @option opts [String] :end_time Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*..
|
442
1174
|
# @option opts [String] :direction Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb.
|
443
|
-
# @option opts [String] :account_id String that uniquely identifies this account resource.
|
444
1175
|
# @return [MessagesList]
|
445
1176
|
describe 'list_sms_messages test' do
|
446
1177
|
it 'should work' do
|
1178
|
+
|
1179
|
+
to = build_value(:to)
|
1180
|
+
from = build_value(:from)
|
1181
|
+
begin_time = build_value(:begin_time)
|
1182
|
+
end_time = build_value(:end_time)
|
1183
|
+
direction = build_value(:direction)
|
1184
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Messages'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase))
|
1185
|
+
|
1186
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
1187
|
+
.with(
|
1188
|
+
body: {},
|
1189
|
+
query: build_query_parameters({
|
1190
|
+
:to => to, :from => from, :begin_time => begin_time, :end_time => end_time, :direction => direction,
|
1191
|
+
})
|
1192
|
+
)
|
1193
|
+
.to_return(status: 200, body: "", headers: {})
|
1194
|
+
@api_instance.list_sms_messages(
|
1195
|
+
|
1196
|
+
{
|
1197
|
+
:to => to,:from => from,:begin_time => begin_time,:end_time => end_time,:direction => direction,
|
1198
|
+
}
|
1199
|
+
)
|
1200
|
+
|
1201
|
+
expect(stub).to have_been_requested
|
447
1202
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
448
1203
|
end
|
449
1204
|
end
|
@@ -455,6 +1210,26 @@ describe 'DefaultApi' do
|
|
455
1210
|
# @return [CallResult]
|
456
1211
|
describe 'make_a_call test' do
|
457
1212
|
it 'should work' do
|
1213
|
+
|
1214
|
+
make_call_request = build_value(:make_call_request)
|
1215
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Calls'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase))
|
1216
|
+
|
1217
|
+
stub = stub_request(:POST.downcase, local_var_path)
|
1218
|
+
.with(
|
1219
|
+
body: make_call_request.to_body.to_json,
|
1220
|
+
query: build_query_parameters({
|
1221
|
+
|
1222
|
+
})
|
1223
|
+
)
|
1224
|
+
.to_return(status: 200, body: "", headers: {})
|
1225
|
+
@api_instance.make_a_call(
|
1226
|
+
|
1227
|
+
{
|
1228
|
+
:make_call_request => make_call_request,
|
1229
|
+
}
|
1230
|
+
)
|
1231
|
+
|
1232
|
+
expect(stub).to have_been_requested
|
458
1233
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
459
1234
|
end
|
460
1235
|
end
|
@@ -467,6 +1242,27 @@ describe 'DefaultApi' do
|
|
467
1242
|
# @return [nil]
|
468
1243
|
describe 'remove_a_participant test' do
|
469
1244
|
it 'should work' do
|
1245
|
+
|
1246
|
+
conference_id = build_value(:conference_id)
|
1247
|
+
call_id = build_value(:call_id)
|
1248
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'conferenceId' + '}', CGI.escape('TEST_' + 'conferenceId'.snakecase.upcase)).sub('{' + 'callId' + '}', CGI.escape('TEST_' + 'callId'.snakecase.upcase))
|
1249
|
+
|
1250
|
+
stub = stub_request(:DELETE.downcase, local_var_path)
|
1251
|
+
.with(
|
1252
|
+
body: {},
|
1253
|
+
query: build_query_parameters({
|
1254
|
+
|
1255
|
+
})
|
1256
|
+
)
|
1257
|
+
.to_return(status: 200, body: "", headers: {})
|
1258
|
+
@api_instance.remove_a_participant(
|
1259
|
+
conference_id,call_id,
|
1260
|
+
{
|
1261
|
+
|
1262
|
+
}
|
1263
|
+
)
|
1264
|
+
|
1265
|
+
expect(stub).to have_been_requested
|
470
1266
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
471
1267
|
end
|
472
1268
|
end
|
@@ -478,6 +1274,26 @@ describe 'DefaultApi' do
|
|
478
1274
|
# @return [MessageResult]
|
479
1275
|
describe 'send_an_sms_message test' do
|
480
1276
|
it 'should work' do
|
1277
|
+
|
1278
|
+
message_request = build_value(:message_request)
|
1279
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Messages'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase))
|
1280
|
+
|
1281
|
+
stub = stub_request(:POST.downcase, local_var_path)
|
1282
|
+
.with(
|
1283
|
+
body: message_request.to_body.to_json,
|
1284
|
+
query: build_query_parameters({
|
1285
|
+
|
1286
|
+
})
|
1287
|
+
)
|
1288
|
+
.to_return(status: 200, body: "", headers: {})
|
1289
|
+
@api_instance.send_an_sms_message(
|
1290
|
+
message_request,
|
1291
|
+
{
|
1292
|
+
|
1293
|
+
}
|
1294
|
+
)
|
1295
|
+
|
1296
|
+
expect(stub).to have_been_requested
|
481
1297
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
482
1298
|
end
|
483
1299
|
end
|
@@ -489,6 +1305,26 @@ describe 'DefaultApi' do
|
|
489
1305
|
# @return [File]
|
490
1306
|
describe 'stream_a_recording_file test' do
|
491
1307
|
it 'should work' do
|
1308
|
+
|
1309
|
+
recording_id = build_value(:recording_id)
|
1310
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Recordings/{recordingId}/Stream'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'recordingId' + '}', CGI.escape('TEST_' + 'recordingId'.snakecase.upcase))
|
1311
|
+
|
1312
|
+
stub = stub_request(:GET.downcase, local_var_path)
|
1313
|
+
.with(
|
1314
|
+
body: {},
|
1315
|
+
query: build_query_parameters({
|
1316
|
+
|
1317
|
+
})
|
1318
|
+
)
|
1319
|
+
.to_return(status: 200, body: "", headers: {})
|
1320
|
+
@api_instance.stream_a_recording_file(
|
1321
|
+
recording_id,
|
1322
|
+
{
|
1323
|
+
|
1324
|
+
}
|
1325
|
+
)
|
1326
|
+
|
1327
|
+
expect(stub).to have_been_requested
|
492
1328
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
493
1329
|
end
|
494
1330
|
end
|
@@ -501,6 +1337,27 @@ describe 'DefaultApi' do
|
|
501
1337
|
# @return [ConferenceResult]
|
502
1338
|
describe 'update_a_conference test' do
|
503
1339
|
it 'should work' do
|
1340
|
+
|
1341
|
+
conference_id = build_value(:conference_id)
|
1342
|
+
update_conference_request = build_value(:update_conference_request)
|
1343
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Conferences/{conferenceId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'conferenceId' + '}', CGI.escape('TEST_' + 'conferenceId'.snakecase.upcase))
|
1344
|
+
|
1345
|
+
stub = stub_request(:POST.downcase, local_var_path)
|
1346
|
+
.with(
|
1347
|
+
body: update_conference_request.to_body.to_json,
|
1348
|
+
query: build_query_parameters({
|
1349
|
+
|
1350
|
+
})
|
1351
|
+
)
|
1352
|
+
.to_return(status: 200, body: "", headers: {})
|
1353
|
+
@api_instance.update_a_conference(
|
1354
|
+
conference_id,
|
1355
|
+
{
|
1356
|
+
:update_conference_request => update_conference_request,
|
1357
|
+
}
|
1358
|
+
)
|
1359
|
+
|
1360
|
+
expect(stub).to have_been_requested
|
504
1361
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
505
1362
|
end
|
506
1363
|
end
|
@@ -513,6 +1370,27 @@ describe 'DefaultApi' do
|
|
513
1370
|
# @return [nil]
|
514
1371
|
describe 'update_a_live_call test' do
|
515
1372
|
it 'should work' do
|
1373
|
+
|
1374
|
+
call_id = build_value(:call_id)
|
1375
|
+
update_call_request = build_value(:update_call_request)
|
1376
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Calls/{callId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'callId' + '}', CGI.escape('TEST_' + 'callId'.snakecase.upcase))
|
1377
|
+
|
1378
|
+
stub = stub_request(:POST.downcase, local_var_path)
|
1379
|
+
.with(
|
1380
|
+
body: update_call_request.to_body.to_json,
|
1381
|
+
query: build_query_parameters({
|
1382
|
+
|
1383
|
+
})
|
1384
|
+
)
|
1385
|
+
.to_return(status: 200, body: "", headers: {})
|
1386
|
+
@api_instance.update_a_live_call(
|
1387
|
+
call_id,update_call_request,
|
1388
|
+
{
|
1389
|
+
|
1390
|
+
}
|
1391
|
+
)
|
1392
|
+
|
1393
|
+
expect(stub).to have_been_requested
|
516
1394
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
517
1395
|
end
|
518
1396
|
end
|
@@ -526,6 +1404,28 @@ describe 'DefaultApi' do
|
|
526
1404
|
# @return [ConferenceParticipantResult]
|
527
1405
|
describe 'update_a_participant test' do
|
528
1406
|
it 'should work' do
|
1407
|
+
|
1408
|
+
conference_id = build_value(:conference_id)
|
1409
|
+
call_id = build_value(:call_id)
|
1410
|
+
update_conference_participant_request = build_value(:update_conference_participant_request)
|
1411
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'conferenceId' + '}', CGI.escape('TEST_' + 'conferenceId'.snakecase.upcase)).sub('{' + 'callId' + '}', CGI.escape('TEST_' + 'callId'.snakecase.upcase))
|
1412
|
+
|
1413
|
+
stub = stub_request(:POST.downcase, local_var_path)
|
1414
|
+
.with(
|
1415
|
+
body: update_conference_participant_request.to_body.to_json,
|
1416
|
+
query: build_query_parameters({
|
1417
|
+
|
1418
|
+
})
|
1419
|
+
)
|
1420
|
+
.to_return(status: 200, body: "", headers: {})
|
1421
|
+
@api_instance.update_a_participant(
|
1422
|
+
conference_id,call_id,
|
1423
|
+
{
|
1424
|
+
:update_conference_participant_request => update_conference_participant_request,
|
1425
|
+
}
|
1426
|
+
)
|
1427
|
+
|
1428
|
+
expect(stub).to have_been_requested
|
529
1429
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
530
1430
|
end
|
531
1431
|
end
|
@@ -538,6 +1438,27 @@ describe 'DefaultApi' do
|
|
538
1438
|
# @return [QueueResult]
|
539
1439
|
describe 'update_a_queue test' do
|
540
1440
|
it 'should work' do
|
1441
|
+
|
1442
|
+
queue_id = build_value(:queue_id)
|
1443
|
+
queue_request = build_value(:queue_request)
|
1444
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Queues/{queueId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'queueId' + '}', CGI.escape('TEST_' + 'queueId'.snakecase.upcase))
|
1445
|
+
|
1446
|
+
stub = stub_request(:POST.downcase, local_var_path)
|
1447
|
+
.with(
|
1448
|
+
body: queue_request.to_body.to_json,
|
1449
|
+
query: build_query_parameters({
|
1450
|
+
|
1451
|
+
})
|
1452
|
+
)
|
1453
|
+
.to_return(status: 200, body: "", headers: {})
|
1454
|
+
@api_instance.update_a_queue(
|
1455
|
+
queue_id,
|
1456
|
+
{
|
1457
|
+
:queue_request => queue_request,
|
1458
|
+
}
|
1459
|
+
)
|
1460
|
+
|
1461
|
+
expect(stub).to have_been_requested
|
541
1462
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
542
1463
|
end
|
543
1464
|
end
|
@@ -549,6 +1470,26 @@ describe 'DefaultApi' do
|
|
549
1470
|
# @return [nil]
|
550
1471
|
describe 'update_an_account test' do
|
551
1472
|
it 'should work' do
|
1473
|
+
|
1474
|
+
account_request = build_value(:account_request)
|
1475
|
+
local_var_path = @base_url + '/Accounts/{accountId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase))
|
1476
|
+
|
1477
|
+
stub = stub_request(:POST.downcase, local_var_path)
|
1478
|
+
.with(
|
1479
|
+
body: account_request.to_body.to_json,
|
1480
|
+
query: build_query_parameters({
|
1481
|
+
|
1482
|
+
})
|
1483
|
+
)
|
1484
|
+
.to_return(status: 200, body: "", headers: {})
|
1485
|
+
@api_instance.update_an_account(
|
1486
|
+
|
1487
|
+
{
|
1488
|
+
:account_request => account_request,
|
1489
|
+
}
|
1490
|
+
)
|
1491
|
+
|
1492
|
+
expect(stub).to have_been_requested
|
552
1493
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
553
1494
|
end
|
554
1495
|
end
|
@@ -561,6 +1502,27 @@ describe 'DefaultApi' do
|
|
561
1502
|
# @return [ApplicationResult]
|
562
1503
|
describe 'update_an_application test' do
|
563
1504
|
it 'should work' do
|
1505
|
+
|
1506
|
+
application_id = build_value(:application_id)
|
1507
|
+
application_request = build_value(:application_request)
|
1508
|
+
local_var_path = @base_url + '/Accounts/{accountId}/Applications/{applicationId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'applicationId' + '}', CGI.escape('TEST_' + 'applicationId'.snakecase.upcase))
|
1509
|
+
|
1510
|
+
stub = stub_request(:POST.downcase, local_var_path)
|
1511
|
+
.with(
|
1512
|
+
body: application_request.to_body.to_json,
|
1513
|
+
query: build_query_parameters({
|
1514
|
+
|
1515
|
+
})
|
1516
|
+
)
|
1517
|
+
.to_return(status: 200, body: "", headers: {})
|
1518
|
+
@api_instance.update_an_application(
|
1519
|
+
application_id,
|
1520
|
+
{
|
1521
|
+
:application_request => application_request,
|
1522
|
+
}
|
1523
|
+
)
|
1524
|
+
|
1525
|
+
expect(stub).to have_been_requested
|
564
1526
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
565
1527
|
end
|
566
1528
|
end
|
@@ -573,6 +1535,27 @@ describe 'DefaultApi' do
|
|
573
1535
|
# @return [IncomingNumberResult]
|
574
1536
|
describe 'update_an_incoming_number test' do
|
575
1537
|
it 'should work' do
|
1538
|
+
|
1539
|
+
phone_number_id = build_value(:phone_number_id)
|
1540
|
+
incoming_number_request = build_value(:incoming_number_request)
|
1541
|
+
local_var_path = @base_url + '/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}'.sub('{' + 'accountId' + '}', CGI.escape('TEST_' + 'accountId'.snakecase.upcase)).sub('{' + 'phoneNumberId' + '}', CGI.escape('TEST_' + 'phoneNumberId'.snakecase.upcase))
|
1542
|
+
|
1543
|
+
stub = stub_request(:POST.downcase, local_var_path)
|
1544
|
+
.with(
|
1545
|
+
body: incoming_number_request.to_body.to_json,
|
1546
|
+
query: build_query_parameters({
|
1547
|
+
|
1548
|
+
})
|
1549
|
+
)
|
1550
|
+
.to_return(status: 200, body: "", headers: {})
|
1551
|
+
@api_instance.update_an_incoming_number(
|
1552
|
+
phone_number_id,
|
1553
|
+
{
|
1554
|
+
:incoming_number_request => incoming_number_request,
|
1555
|
+
}
|
1556
|
+
)
|
1557
|
+
|
1558
|
+
expect(stub).to have_been_requested
|
576
1559
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
577
1560
|
end
|
578
1561
|
end
|