freeclimb 2.2.0 → 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 +29 -1
- data/Gemfile +4 -2
- data/Gemfile.lock +41 -20
- data/README.md +35 -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 -16
- 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 +1672 -580
- 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 +439 -257
- 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 +20 -8
- data/lib/freeclimb/models/account_result_all_of.rb +20 -8
- data/lib/freeclimb/models/add_to_conference.rb +19 -12
- data/lib/freeclimb/models/add_to_conference_all_of.rb +19 -12
- 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 -18
- 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 +20 -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 +1092 -665
- data/spec/api_client_spec.rb +6 -6
- data/spec/configuration_spec.rb +12 -4
- data/spec/factories.rb +80 -0
- data/spec/models/account_request_spec.rb +19 -12
- data/spec/models/account_result_spec.rb +76 -11
- data/spec/models/add_to_conference_spec.rb +6 -13
- data/spec/models/application_list_spec.rb +54 -11
- data/spec/models/application_request_spec.rb +48 -11
- data/spec/models/application_result_spec.rb +84 -11
- data/spec/models/available_number_list_spec.rb +54 -12
- data/spec/models/available_number_spec.rb +42 -11
- data/spec/models/buy_incoming_number_request_spec.rb +24 -11
- data/spec/models/call_list_spec.rb +54 -12
- data/spec/models/call_result_spec.rb +123 -11
- data/spec/models/capabilities_spec.rb +58 -0
- data/spec/models/conference_list_spec.rb +54 -11
- data/spec/models/conference_participant_list_spec.rb +54 -11
- data/spec/models/conference_participant_result_spec.rb +66 -11
- data/spec/models/conference_result_spec.rb +98 -12
- data/spec/models/create_conference_request_spec.rb +40 -12
- data/spec/models/create_conference_spec.rb +6 -13
- data/spec/models/dequeue_spec.rb +6 -13
- data/spec/models/enqueue_spec.rb +6 -13
- data/spec/models/filter_logs_request_spec.rb +14 -13
- data/spec/models/get_digits_spec.rb +12 -13
- data/spec/models/get_speech_spec.rb +7 -14
- data/spec/models/hangup_spec.rb +4 -11
- data/spec/models/incoming_number_list_spec.rb +54 -12
- data/spec/models/incoming_number_request_spec.rb +19 -12
- data/spec/models/incoming_number_result_spec.rb +90 -12
- data/spec/models/log_list_spec.rb +54 -11
- data/spec/models/log_result_spec.rb +52 -11
- data/spec/models/make_call_request_spec.rb +66 -11
- data/spec/models/message_request_spec.rb +60 -12
- data/spec/models/message_result_spec.rb +82 -11
- data/spec/models/messages_list_spec.rb +54 -11
- data/spec/models/mutable_resource_model_spec.rb +30 -12
- data/spec/models/out_dial_spec.rb +12 -13
- data/spec/models/pagination_model_spec.rb +48 -11
- data/spec/models/pause_spec.rb +6 -13
- data/spec/models/percl_command_spec.rb +6 -13
- data/spec/models/percl_script_spec.rb +6 -13
- data/spec/models/play_early_media_spec.rb +6 -13
- data/spec/models/play_spec.rb +12 -13
- data/spec/models/queue_list_spec.rb +53 -11
- data/spec/models/queue_member_list_spec.rb +54 -11
- data/spec/models/queue_member_spec.rb +36 -12
- data/spec/models/queue_request_spec.rb +19 -13
- data/spec/models/queue_result_spec.rb +72 -11
- data/spec/models/record_utterance_spec.rb +12 -13
- data/spec/models/recording_list_spec.rb +54 -11
- data/spec/models/recording_result_spec.rb +60 -11
- data/spec/models/redirect_spec.rb +6 -13
- data/spec/models/reject_spec.rb +4 -11
- data/spec/models/remove_from_conference_spec.rb +6 -13
- data/spec/models/say_spec.rb +7 -14
- data/spec/models/send_digits_spec.rb +12 -13
- data/spec/models/set_listen_spec.rb +6 -13
- data/spec/models/set_talk_spec.rb +6 -13
- data/spec/models/sms_spec.rb +6 -13
- data/spec/models/start_record_call_spec.rb +6 -13
- data/spec/models/terminate_conference_spec.rb +6 -13
- data/spec/models/update_call_request_spec.rb +18 -13
- data/spec/models/update_conference_participant_request_spec.rb +19 -12
- data/spec/models/update_conference_request_spec.rb +28 -11
- data/spec/quickstart_spec.rb +10 -0
- data/spec/spec_helper.rb +57 -6
- metadata +20 -38
- data/freeclimb-2.0.3.gem +0 -0
- data/freeclimb-2.1.0.gem +0 -0
- data/freeclimb-2.1.1.gem +0 -0
- data/freeclimb-2.1.2.gem +0 -0
- data/spec/api/web_mocks.rb +0 -473
@@ -1,38 +1,34 @@
|
|
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: 5.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'spec_helper'
|
14
14
|
require 'json'
|
15
|
-
|
15
|
+
require 'rusty_camel'
|
16
|
+
|
16
17
|
# Unit tests for Freeclimb::DefaultApi
|
17
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
19
|
# Please update as you see appropriate
|
19
|
-
API_SERVER = 'https://www.freeclimb.com/apiserver'
|
20
|
-
|
21
20
|
describe 'DefaultApi' do
|
22
|
-
|
23
21
|
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
22
|
# run before each test
|
31
23
|
@api_instance = Freeclimb::DefaultApi.new
|
32
|
-
|
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}"
|
33
28
|
end
|
34
29
|
|
35
30
|
after do
|
31
|
+
WebMock.reset!
|
36
32
|
# run after each test
|
37
33
|
end
|
38
34
|
|
@@ -44,26 +40,32 @@ describe 'DefaultApi' do
|
|
44
40
|
|
45
41
|
# unit tests for buy_a_phone_number
|
46
42
|
# Buy a Phone Number
|
43
|
+
# @param buy_incoming_number_request Incoming Number transaction details
|
47
44
|
# @param [Hash] opts the optional parameters
|
48
|
-
# @option opts [BuyIncomingNumberRequest] :buy_incoming_number_request Incoming Number transaction details
|
49
45
|
# @return [IncomingNumberResult]
|
50
46
|
describe 'buy_a_phone_number test' do
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
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
|
68
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
67
69
|
end
|
68
70
|
end
|
69
71
|
|
@@ -73,49 +75,59 @@ describe 'DefaultApi' do
|
|
73
75
|
# @option opts [CreateConferenceRequest] :create_conference_request Conference to create
|
74
76
|
# @return [ConferenceResult]
|
75
77
|
describe 'create_a_conference test' do
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
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
|
99
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
93
100
|
end
|
94
101
|
end
|
95
102
|
|
96
103
|
# unit tests for create_a_queue
|
97
104
|
# Create a Queue
|
98
|
-
# @param account_id ID of the account that created this Queue.
|
99
105
|
# @param [Hash] opts the optional parameters
|
100
106
|
# @option opts [QueueRequest] :queue_request Queue details used to create a queue
|
101
107
|
# @return [QueueResult]
|
102
108
|
describe 'create_a_queue test' do
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
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
|
130
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
119
131
|
end
|
120
132
|
end
|
121
133
|
|
@@ -125,22 +137,28 @@ describe 'DefaultApi' do
|
|
125
137
|
# @option opts [ApplicationRequest] :application_request Application Details
|
126
138
|
# @return [ApplicationResult]
|
127
139
|
describe 'create_an_application test' do
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
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
|
161
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
144
162
|
end
|
145
163
|
end
|
146
164
|
|
@@ -150,20 +168,28 @@ describe 'DefaultApi' do
|
|
150
168
|
# @param [Hash] opts the optional parameters
|
151
169
|
# @return [nil]
|
152
170
|
describe 'delete_a_recording test' do
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
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
|
192
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
167
193
|
end
|
168
194
|
end
|
169
195
|
|
@@ -173,20 +199,28 @@ describe 'DefaultApi' do
|
|
173
199
|
# @param [Hash] opts the optional parameters
|
174
200
|
# @return [nil]
|
175
201
|
describe 'delete_an_application test' do
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
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
|
223
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
190
224
|
end
|
191
225
|
end
|
192
226
|
|
@@ -196,21 +230,28 @@ describe 'DefaultApi' do
|
|
196
230
|
# @param [Hash] opts the optional parameters
|
197
231
|
# @return [nil]
|
198
232
|
describe 'delete_an_incoming_number test' do
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
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
|
254
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
214
255
|
end
|
215
256
|
end
|
216
257
|
|
@@ -221,21 +262,29 @@ describe 'DefaultApi' do
|
|
221
262
|
# @param [Hash] opts the optional parameters
|
222
263
|
# @return [QueueMember]
|
223
264
|
describe 'dequeue_a_member test' do
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
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
|
287
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
239
288
|
end
|
240
289
|
end
|
241
290
|
|
@@ -245,20 +294,28 @@ describe 'DefaultApi' do
|
|
245
294
|
# @param [Hash] opts the optional parameters
|
246
295
|
# @return [QueueMember]
|
247
296
|
describe 'dequeue_head_member test' do
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
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
|
318
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
262
319
|
end
|
263
320
|
end
|
264
321
|
|
@@ -268,63 +325,90 @@ describe 'DefaultApi' do
|
|
268
325
|
# @param [Hash] opts the optional parameters
|
269
326
|
# @return [File]
|
270
327
|
describe 'download_a_recording_file test' do
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
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
|
349
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
281
350
|
end
|
282
351
|
end
|
283
352
|
|
284
353
|
# unit tests for filter_logs
|
285
354
|
# Filter Logs
|
355
|
+
# @param filter_logs_request Filter logs request paramters
|
286
356
|
# @param [Hash] opts the optional parameters
|
287
|
-
# @option opts [FilterLogsRequest] :filter_logs_request Filter logs request paramters
|
288
357
|
# @return [LogList]
|
289
358
|
describe 'filter_logs test' do
|
290
|
-
|
291
|
-
uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Logs"
|
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
|
359
|
+
it 'should work' do
|
294
360
|
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
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
|
380
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
304
381
|
end
|
305
382
|
end
|
306
383
|
|
307
|
-
|
308
384
|
# unit tests for get_a_call
|
309
385
|
# Get a Call
|
310
386
|
# @param call_id String that uniquely identifies this call resource.
|
311
387
|
# @param [Hash] opts the optional parameters
|
312
388
|
# @return [CallResult]
|
313
389
|
describe 'get_a_call test' do
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
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
|
411
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
328
412
|
end
|
329
413
|
end
|
330
414
|
|
@@ -334,20 +418,28 @@ describe 'DefaultApi' do
|
|
334
418
|
# @param [Hash] opts the optional parameters
|
335
419
|
# @return [ConferenceResult]
|
336
420
|
describe 'get_a_conference test' do
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
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
|
442
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
351
443
|
end
|
352
444
|
end
|
353
445
|
|
@@ -358,20 +450,29 @@ describe 'DefaultApi' do
|
|
358
450
|
# @param [Hash] opts the optional parameters
|
359
451
|
# @return [QueueMember]
|
360
452
|
describe 'get_a_member test' do
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
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
|
475
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
375
476
|
end
|
376
477
|
end
|
377
478
|
|
@@ -382,21 +483,29 @@ describe 'DefaultApi' do
|
|
382
483
|
# @param [Hash] opts the optional parameters
|
383
484
|
# @return [ConferenceParticipantResult]
|
384
485
|
describe 'get_a_participant test' do
|
385
|
-
|
386
|
-
uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Conferences/{ConferenceId}/Participants/{callId}"
|
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.
|
486
|
+
it 'should work' do
|
390
487
|
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
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
|
508
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
400
509
|
end
|
401
510
|
end
|
402
511
|
|
@@ -406,20 +515,28 @@ describe 'DefaultApi' do
|
|
406
515
|
# @param [Hash] opts the optional parameters
|
407
516
|
# @return [QueueResult]
|
408
517
|
describe 'get_a_queue test' do
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
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
|
539
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
423
540
|
end
|
424
541
|
end
|
425
542
|
|
@@ -429,20 +546,28 @@ describe 'DefaultApi' do
|
|
429
546
|
# @param [Hash] opts the optional parameters
|
430
547
|
# @return [RecordingResult]
|
431
548
|
describe 'get_a_recording test' do
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
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
|
446
571
|
end
|
447
572
|
end
|
448
573
|
|
@@ -451,19 +576,27 @@ describe 'DefaultApi' do
|
|
451
576
|
# @param [Hash] opts the optional parameters
|
452
577
|
# @return [AccountResult]
|
453
578
|
describe 'get_an_account test' do
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
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
|
599
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
467
600
|
end
|
468
601
|
end
|
469
602
|
|
@@ -473,20 +606,28 @@ describe 'DefaultApi' do
|
|
473
606
|
# @param [Hash] opts the optional parameters
|
474
607
|
# @return [ApplicationResult]
|
475
608
|
describe 'get_an_application test' do
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
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
|
630
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
490
631
|
end
|
491
632
|
end
|
492
633
|
|
@@ -496,20 +637,28 @@ describe 'DefaultApi' do
|
|
496
637
|
# @param [Hash] opts the optional parameters
|
497
638
|
# @return [IncomingNumberResult]
|
498
639
|
describe 'get_an_incoming_number test' do
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
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
|
661
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
513
662
|
end
|
514
663
|
end
|
515
664
|
|
@@ -519,21 +668,28 @@ describe 'DefaultApi' do
|
|
519
668
|
# @param [Hash] opts the optional parameters
|
520
669
|
# @return [MessageResult]
|
521
670
|
describe 'get_an_sms_message test' do
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
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
|
692
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
537
693
|
end
|
538
694
|
end
|
539
695
|
|
@@ -543,21 +699,28 @@ describe 'DefaultApi' do
|
|
543
699
|
# @param [Hash] opts the optional parameters
|
544
700
|
# @return [QueueMember]
|
545
701
|
describe 'get_head_member test' do
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
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
|
723
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
561
724
|
end
|
562
725
|
end
|
563
726
|
|
@@ -567,19 +730,28 @@ describe 'DefaultApi' do
|
|
567
730
|
# @option opts [String] :_alias Return only the Queue resources with aliases that exactly match this name.
|
568
731
|
# @return [QueueList]
|
569
732
|
describe 'list_active_queues test' do
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
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
|
754
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
583
755
|
end
|
584
756
|
end
|
585
757
|
|
@@ -588,19 +760,27 @@ describe 'DefaultApi' do
|
|
588
760
|
# @param [Hash] opts the optional parameters
|
589
761
|
# @return [LogList]
|
590
762
|
describe 'list_all_account_logs test' do
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
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
|
783
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
604
784
|
end
|
605
785
|
end
|
606
786
|
|
@@ -610,47 +790,77 @@ describe 'DefaultApi' do
|
|
610
790
|
# @option opts [String] :_alias Return only applications with aliases that exactly match this value.
|
611
791
|
# @return [ApplicationList]
|
612
792
|
describe 'list_an_application test' do
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
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
|
814
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
626
815
|
end
|
627
816
|
end
|
628
817
|
|
629
818
|
# unit tests for list_available_numbers
|
630
819
|
# List available numbers
|
631
820
|
# @param [Hash] opts the optional parameters
|
632
|
-
# @option opts [String] :_alias Filter on numbers based on the formatted string of the phone number.
|
633
821
|
# @option opts [String] :phone_number PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format.
|
822
|
+
# @option opts [String] :region State or province of this phone number.
|
823
|
+
# @option opts [String] :country Country of this phone number.
|
824
|
+
# @option opts [Boolean] :voice_enabled Indicates whether the phone number can handle Calls. Typically set to true for all numbers.
|
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
|
634
831
|
# @return [AvailableNumberList]
|
635
832
|
describe 'list_available_numbers test' do
|
636
|
-
|
637
|
-
uri_template = Addressable::Template.new "#{API_SERVER}/AvailablePhoneNumbers?alias=MOCK_ALIAS&phoneNumber=MOCK_PHONE_NUMBER"
|
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
|
-
}
|
833
|
+
it 'should work' do
|
644
834
|
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
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
|
863
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
654
864
|
end
|
655
865
|
end
|
656
866
|
|
@@ -660,20 +870,28 @@ describe 'DefaultApi' do
|
|
660
870
|
# @param [Hash] opts the optional parameters
|
661
871
|
# @return [LogList]
|
662
872
|
describe 'list_call_logs test' do
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
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
|
894
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
677
895
|
end
|
678
896
|
end
|
679
897
|
|
@@ -684,26 +902,36 @@ describe 'DefaultApi' do
|
|
684
902
|
# @option opts [String] :date_created Only show recordings created on the specified date, in the form *YYYY-MM-DD*.
|
685
903
|
# @return [RecordingList]
|
686
904
|
describe 'list_call_recordings test' do
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
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
|
927
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
701
928
|
end
|
702
929
|
end
|
703
930
|
|
704
931
|
# unit tests for list_calls
|
705
932
|
# List Calls
|
706
933
|
# @param [Hash] opts the optional parameters
|
934
|
+
# @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
935
|
# @option opts [String] :to Only show Calls to this phone number.
|
708
936
|
# @option opts [String] :from Only show Calls from this phone number.
|
709
937
|
# @option opts [String] :status Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`.
|
@@ -712,19 +940,34 @@ describe 'DefaultApi' do
|
|
712
940
|
# @option opts [String] :parent_call_id Only show Calls spawned by the call with this ID.
|
713
941
|
# @return [CallList]
|
714
942
|
describe 'list_calls test' do
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
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
|
970
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
728
971
|
end
|
729
972
|
end
|
730
973
|
|
@@ -737,19 +980,31 @@ describe 'DefaultApi' do
|
|
737
980
|
# @option opts [String] :date_updated Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*.
|
738
981
|
# @return [ConferenceList]
|
739
982
|
describe 'list_conferences test' do
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
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
|
1007
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
753
1008
|
end
|
754
1009
|
end
|
755
1010
|
|
@@ -758,21 +1013,53 @@ describe 'DefaultApi' do
|
|
758
1013
|
# @param [Hash] opts the optional parameters
|
759
1014
|
# @option opts [String] :phone_number Only show incoming phone number resources that match this PCRE-compatible regular expression.
|
760
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
|
761
1027
|
# @return [IncomingNumberList]
|
762
1028
|
describe 'list_incoming_numbers test' do
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
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
|
1062
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
776
1063
|
end
|
777
1064
|
end
|
778
1065
|
|
@@ -782,20 +1069,28 @@ describe 'DefaultApi' do
|
|
782
1069
|
# @param [Hash] opts the optional parameters
|
783
1070
|
# @return [QueueMemberList]
|
784
1071
|
describe 'list_members test' do
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
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
|
1093
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
799
1094
|
end
|
800
1095
|
end
|
801
1096
|
|
@@ -807,20 +1102,30 @@ describe 'DefaultApi' do
|
|
807
1102
|
# @option opts [Boolean] :listen Only show Participants with the listen privilege.
|
808
1103
|
# @return [ConferenceParticipantList]
|
809
1104
|
describe 'list_participants test' do
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
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
|
1128
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
824
1129
|
end
|
825
1130
|
end
|
826
1131
|
|
@@ -832,19 +1137,30 @@ describe 'DefaultApi' do
|
|
832
1137
|
# @option opts [String] :date_created Only show Recordings created on this date, formatted as *YYYY-MM-DD*.
|
833
1138
|
# @return [RecordingList]
|
834
1139
|
describe 'list_recordings test' do
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
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
|
1163
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
848
1164
|
end
|
849
1165
|
end
|
850
1166
|
|
@@ -856,22 +1172,34 @@ describe 'DefaultApi' do
|
|
856
1172
|
# @option opts [String] :begin_time Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*.
|
857
1173
|
# @option opts [String] :end_time Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*..
|
858
1174
|
# @option opts [String] :direction Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb.
|
859
|
-
# @option opts [String] :account_id String that uniquely identifies this account resource.
|
860
1175
|
# @return [MessagesList]
|
861
1176
|
describe 'list_sms_messages test' do
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
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
|
1202
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
875
1203
|
end
|
876
1204
|
end
|
877
1205
|
|
@@ -881,19 +1209,28 @@ describe 'DefaultApi' do
|
|
881
1209
|
# @option opts [MakeCallRequest] :make_call_request Call details for making a call
|
882
1210
|
# @return [CallResult]
|
883
1211
|
describe 'make_a_call test' do
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
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
|
1233
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
897
1234
|
end
|
898
1235
|
end
|
899
1236
|
|
@@ -904,48 +1241,60 @@ describe 'DefaultApi' do
|
|
904
1241
|
# @param [Hash] opts the optional parameters
|
905
1242
|
# @return [nil]
|
906
1243
|
describe 'remove_a_participant test' do
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
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
|
1266
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
922
1267
|
end
|
923
1268
|
end
|
924
1269
|
|
925
1270
|
# unit tests for send_an_sms_message
|
926
1271
|
# Send an SMS Message
|
1272
|
+
# @param message_request Details to create a message
|
927
1273
|
# @param [Hash] opts the optional parameters
|
928
|
-
# @option opts [MessageRequest] :message_request Details to create a message
|
929
1274
|
# @return [MessageResult]
|
930
1275
|
describe 'send_an_sms_message test' do
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
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
|
1297
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
949
1298
|
end
|
950
1299
|
end
|
951
1300
|
|
@@ -955,16 +1304,28 @@ describe 'DefaultApi' do
|
|
955
1304
|
# @param [Hash] opts the optional parameters
|
956
1305
|
# @return [File]
|
957
1306
|
describe 'stream_a_recording_file test' do
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
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
|
1328
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
968
1329
|
end
|
969
1330
|
end
|
970
1331
|
|
@@ -975,41 +1336,62 @@ describe 'DefaultApi' do
|
|
975
1336
|
# @option opts [UpdateConferenceRequest] :update_conference_request Conference Details to update
|
976
1337
|
# @return [ConferenceResult]
|
977
1338
|
describe 'update_a_conference test' do
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
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
|
1361
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
992
1362
|
end
|
993
1363
|
end
|
994
1364
|
|
995
1365
|
# unit tests for update_a_live_call
|
996
1366
|
# Update a Live Call
|
997
1367
|
# @param call_id String that uniquely identifies this call resource.
|
1368
|
+
# @param update_call_request Call details to update
|
998
1369
|
# @param [Hash] opts the optional parameters
|
999
|
-
# @option opts [UpdateCallRequest] :update_call_request Call details to update
|
1000
1370
|
# @return [nil]
|
1001
1371
|
describe 'update_a_live_call test' do
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
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
|
1394
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
1013
1395
|
end
|
1014
1396
|
end
|
1015
1397
|
|
@@ -1021,21 +1403,30 @@ describe 'DefaultApi' do
|
|
1021
1403
|
# @option opts [UpdateConferenceParticipantRequest] :update_conference_participant_request Conference participant details to update
|
1022
1404
|
# @return [ConferenceParticipantResult]
|
1023
1405
|
describe 'update_a_participant test' do
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
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
|
1429
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
1039
1430
|
end
|
1040
1431
|
end
|
1041
1432
|
|
@@ -1046,20 +1437,29 @@ describe 'DefaultApi' do
|
|
1046
1437
|
# @option opts [QueueRequest] :queue_request Queue Details to update
|
1047
1438
|
# @return [QueueResult]
|
1048
1439
|
describe 'update_a_queue test' do
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
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
|
1462
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
1063
1463
|
end
|
1064
1464
|
end
|
1065
1465
|
|
@@ -1069,19 +1469,28 @@ describe 'DefaultApi' do
|
|
1069
1469
|
# @option opts [AccountRequest] :account_request Account details to update
|
1070
1470
|
# @return [nil]
|
1071
1471
|
describe 'update_an_account test' do
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
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
|
1493
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
1085
1494
|
end
|
1086
1495
|
end
|
1087
1496
|
|
@@ -1092,20 +1501,29 @@ describe 'DefaultApi' do
|
|
1092
1501
|
# @option opts [ApplicationRequest] :application_request Application details to update.
|
1093
1502
|
# @return [ApplicationResult]
|
1094
1503
|
describe 'update_an_application test' do
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
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
|
1526
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
1109
1527
|
end
|
1110
1528
|
end
|
1111
1529
|
|
@@ -1116,20 +1534,29 @@ describe 'DefaultApi' do
|
|
1116
1534
|
# @option opts [IncomingNumberRequest] :incoming_number_request Incoming Number details to update
|
1117
1535
|
# @return [IncomingNumberResult]
|
1118
1536
|
describe 'update_an_incoming_number test' do
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
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
|
1559
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
1133
1560
|
end
|
1134
1561
|
end
|
1135
1562
|
|