freeclimb 3.0.1 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (296) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/Gemfile +4 -2
  4. data/Gemfile.lock +38 -19
  5. data/README.md +37 -35
  6. data/docs/AccountRequest.md +9 -8
  7. data/docs/AccountResult.md +27 -26
  8. data/docs/AccountResultAllOf.md +19 -18
  9. data/docs/AddToConference.md +25 -24
  10. data/docs/AddToConferenceAllOf.md +25 -24
  11. data/docs/ApplicationList.md +21 -20
  12. data/docs/ApplicationListAllOf.md +7 -6
  13. data/docs/ApplicationRequest.md +19 -18
  14. data/docs/ApplicationResult.md +31 -30
  15. data/docs/ApplicationResultAllOf.md +23 -22
  16. data/docs/AvailableNumber.md +17 -16
  17. data/docs/AvailableNumberList.md +21 -20
  18. data/docs/AvailableNumberListAllOf.md +7 -6
  19. data/docs/BuyIncomingNumberRequest.md +11 -10
  20. data/docs/CallList.md +21 -20
  21. data/docs/CallListAllOf.md +7 -6
  22. data/docs/CallResult.md +43 -44
  23. data/docs/CallResultAllOf.md +35 -36
  24. data/docs/Capabilities.md +26 -0
  25. data/docs/ConferenceList.md +21 -20
  26. data/docs/ConferenceListAllOf.md +7 -6
  27. data/docs/ConferenceParticipantList.md +21 -20
  28. data/docs/ConferenceParticipantListAllOf.md +7 -6
  29. data/docs/ConferenceParticipantResult.md +25 -24
  30. data/docs/ConferenceParticipantResultAllOf.md +17 -16
  31. data/docs/ConferenceResult.md +33 -32
  32. data/docs/ConferenceResultAllOf.md +25 -24
  33. data/docs/CreateConference.md +17 -16
  34. data/docs/CreateConferenceAllOf.md +17 -16
  35. data/docs/CreateConferenceRequest.md +15 -14
  36. data/docs/DefaultApi.md +1629 -629
  37. data/docs/Dequeue.md +3 -4
  38. data/docs/Enqueue.md +13 -12
  39. data/docs/EnqueueAllOf.md +13 -12
  40. data/docs/FilterLogsRequest.md +7 -6
  41. data/docs/GetDigits.md +23 -22
  42. data/docs/GetDigitsAllOf.md +23 -22
  43. data/docs/GetSpeech.md +31 -30
  44. data/docs/GetSpeechAllOf.md +31 -30
  45. data/docs/Hangup.md +7 -6
  46. data/docs/HangupAllOf.md +7 -6
  47. data/docs/IncomingNumberList.md +21 -20
  48. data/docs/IncomingNumberListAllOf.md +7 -6
  49. data/docs/IncomingNumberRequest.md +9 -8
  50. data/docs/IncomingNumberResult.md +33 -30
  51. data/docs/IncomingNumberResultAllOf.md +25 -22
  52. data/docs/LogList.md +21 -20
  53. data/docs/LogListAllOf.md +7 -6
  54. data/docs/LogResult.md +19 -18
  55. data/docs/MakeCallRequest.md +25 -24
  56. data/docs/MessageRequest.md +23 -22
  57. data/docs/MessageRequestAllOf.md +15 -14
  58. data/docs/MessageResult.md +29 -28
  59. data/docs/MessageResultAllOf.md +21 -20
  60. data/docs/MessagesList.md +21 -20
  61. data/docs/MessagesListAllOf.md +7 -6
  62. data/docs/MutableResourceModel.md +13 -12
  63. data/docs/OutDial.md +25 -24
  64. data/docs/OutDialAllOf.md +25 -24
  65. data/docs/PaginationModel.md +19 -18
  66. data/docs/Pause.md +7 -6
  67. data/docs/PauseAllOf.md +7 -6
  68. data/docs/PerclCommand.md +7 -6
  69. data/docs/PerclScript.md +7 -6
  70. data/docs/Play.md +13 -12
  71. data/docs/PlayAllOf.md +13 -12
  72. data/docs/PlayEarlyMedia.md +7 -6
  73. data/docs/PlayEarlyMediaAllOf.md +7 -6
  74. data/docs/QueueList.md +21 -20
  75. data/docs/QueueListAllOf.md +7 -6
  76. data/docs/QueueMember.md +15 -14
  77. data/docs/QueueMemberList.md +21 -20
  78. data/docs/QueueMemberListAllOf.md +7 -6
  79. data/docs/QueueRequest.md +9 -8
  80. data/docs/QueueResult.md +27 -26
  81. data/docs/QueueResultAllOf.md +19 -18
  82. data/docs/RecordUtterance.md +19 -18
  83. data/docs/RecordUtteranceAllOf.md +19 -18
  84. data/docs/RecordingList.md +21 -20
  85. data/docs/RecordingListAllOf.md +7 -6
  86. data/docs/RecordingResult.md +23 -22
  87. data/docs/RecordingResultAllOf.md +15 -14
  88. data/docs/Redirect.md +7 -6
  89. data/docs/RedirectAllOf.md +7 -6
  90. data/docs/Reject.md +7 -6
  91. data/docs/RejectAllOf.md +7 -6
  92. data/docs/RemoveFromConference.md +7 -6
  93. data/docs/RemoveFromConferenceAllOf.md +7 -6
  94. data/docs/Say.md +15 -14
  95. data/docs/SayAllOf.md +15 -14
  96. data/docs/SendDigits.md +11 -10
  97. data/docs/SendDigitsAllOf.md +11 -10
  98. data/docs/SetListen.md +9 -8
  99. data/docs/SetListenAllOf.md +9 -8
  100. data/docs/SetTalk.md +9 -8
  101. data/docs/SetTalkAllOf.md +9 -8
  102. data/docs/Sms.md +13 -12
  103. data/docs/SmsAllOf.md +13 -12
  104. data/docs/StartRecordCall.md +3 -4
  105. data/docs/TerminateConference.md +7 -6
  106. data/docs/TerminateConferenceAllOf.md +7 -6
  107. data/docs/UpdateCallRequest.md +7 -6
  108. data/docs/UpdateConferenceParticipantRequest.md +9 -8
  109. data/docs/UpdateConferenceRequest.md +11 -10
  110. data/freeclimb.gemspec +3 -4
  111. data/lib/freeclimb/api/default_api.rb +449 -263
  112. data/lib/freeclimb/api_client.rb +55 -51
  113. data/lib/freeclimb/api_error.rb +2 -2
  114. data/lib/freeclimb/configuration.rb +41 -11
  115. data/lib/freeclimb/models/account_request.rb +20 -8
  116. data/lib/freeclimb/models/account_result.rb +39 -8
  117. data/lib/freeclimb/models/account_result_all_of.rb +39 -8
  118. data/lib/freeclimb/models/add_to_conference.rb +21 -8
  119. data/lib/freeclimb/models/add_to_conference_all_of.rb +20 -8
  120. data/lib/freeclimb/models/application_list.rb +28 -8
  121. data/lib/freeclimb/models/application_list_all_of.rb +21 -8
  122. data/lib/freeclimb/models/application_request.rb +20 -8
  123. data/lib/freeclimb/models/application_result.rb +29 -8
  124. data/lib/freeclimb/models/application_result_all_of.rb +29 -8
  125. data/lib/freeclimb/models/available_number.rb +35 -19
  126. data/lib/freeclimb/models/available_number_list.rb +28 -8
  127. data/lib/freeclimb/models/available_number_list_all_of.rb +21 -8
  128. data/lib/freeclimb/models/buy_incoming_number_request.rb +20 -8
  129. data/lib/freeclimb/models/call_list.rb +28 -8
  130. data/lib/freeclimb/models/call_list_all_of.rb +21 -8
  131. data/lib/freeclimb/models/call_result.rb +36 -21
  132. data/lib/freeclimb/models/call_result_all_of.rb +36 -21
  133. data/lib/freeclimb/models/capabilities.rb +265 -0
  134. data/lib/freeclimb/models/conference_list.rb +28 -8
  135. data/lib/freeclimb/models/conference_list_all_of.rb +21 -8
  136. data/lib/freeclimb/models/conference_participant_list.rb +28 -8
  137. data/lib/freeclimb/models/conference_participant_list_all_of.rb +21 -8
  138. data/lib/freeclimb/models/conference_participant_result.rb +26 -8
  139. data/lib/freeclimb/models/conference_participant_result_all_of.rb +26 -8
  140. data/lib/freeclimb/models/conference_result.rb +30 -8
  141. data/lib/freeclimb/models/conference_result_all_of.rb +30 -8
  142. data/lib/freeclimb/models/create_conference.rb +21 -8
  143. data/lib/freeclimb/models/create_conference_all_of.rb +20 -8
  144. data/lib/freeclimb/models/create_conference_request.rb +20 -8
  145. data/lib/freeclimb/models/dequeue.rb +21 -8
  146. data/lib/freeclimb/models/enqueue.rb +21 -8
  147. data/lib/freeclimb/models/enqueue_all_of.rb +20 -8
  148. data/lib/freeclimb/models/filter_logs_request.rb +20 -8
  149. data/lib/freeclimb/models/get_digits.rb +21 -8
  150. data/lib/freeclimb/models/get_digits_all_of.rb +20 -8
  151. data/lib/freeclimb/models/get_speech.rb +21 -8
  152. data/lib/freeclimb/models/get_speech_all_of.rb +20 -8
  153. data/lib/freeclimb/models/hangup.rb +21 -8
  154. data/lib/freeclimb/models/hangup_all_of.rb +20 -8
  155. data/lib/freeclimb/models/incoming_number_list.rb +28 -8
  156. data/lib/freeclimb/models/incoming_number_list_all_of.rb +21 -8
  157. data/lib/freeclimb/models/incoming_number_request.rb +20 -8
  158. data/lib/freeclimb/models/incoming_number_result.rb +39 -9
  159. data/lib/freeclimb/models/incoming_number_result_all_of.rb +39 -9
  160. data/lib/freeclimb/models/log_list.rb +28 -8
  161. data/lib/freeclimb/models/log_list_all_of.rb +21 -8
  162. data/lib/freeclimb/models/log_result.rb +27 -8
  163. data/lib/freeclimb/models/make_call_request.rb +22 -8
  164. data/lib/freeclimb/models/message_request.rb +20 -8
  165. data/lib/freeclimb/models/message_request_all_of.rb +20 -8
  166. data/lib/freeclimb/models/message_result.rb +28 -8
  167. data/lib/freeclimb/models/message_result_all_of.rb +28 -8
  168. data/lib/freeclimb/models/messages_list.rb +28 -8
  169. data/lib/freeclimb/models/messages_list_all_of.rb +21 -8
  170. data/lib/freeclimb/models/mutable_resource_model.rb +20 -8
  171. data/lib/freeclimb/models/out_dial.rb +21 -8
  172. data/lib/freeclimb/models/out_dial_all_of.rb +20 -8
  173. data/lib/freeclimb/models/pagination_model.rb +27 -8
  174. data/lib/freeclimb/models/pause.rb +21 -8
  175. data/lib/freeclimb/models/pause_all_of.rb +20 -8
  176. data/lib/freeclimb/models/percl_command.rb +39 -8
  177. data/lib/freeclimb/models/percl_script.rb +24 -8
  178. data/lib/freeclimb/models/play.rb +21 -8
  179. data/lib/freeclimb/models/play_all_of.rb +20 -8
  180. data/lib/freeclimb/models/play_early_media.rb +21 -8
  181. data/lib/freeclimb/models/play_early_media_all_of.rb +20 -8
  182. data/lib/freeclimb/models/queue_list.rb +28 -8
  183. data/lib/freeclimb/models/queue_list_all_of.rb +21 -8
  184. data/lib/freeclimb/models/queue_member.rb +25 -8
  185. data/lib/freeclimb/models/queue_member_list.rb +28 -8
  186. data/lib/freeclimb/models/queue_member_list_all_of.rb +21 -8
  187. data/lib/freeclimb/models/queue_request.rb +22 -8
  188. data/lib/freeclimb/models/queue_result.rb +27 -8
  189. data/lib/freeclimb/models/queue_result_all_of.rb +27 -8
  190. data/lib/freeclimb/models/record_utterance.rb +21 -8
  191. data/lib/freeclimb/models/record_utterance_all_of.rb +20 -8
  192. data/lib/freeclimb/models/recording_list.rb +28 -8
  193. data/lib/freeclimb/models/recording_list_all_of.rb +21 -8
  194. data/lib/freeclimb/models/recording_result.rb +25 -8
  195. data/lib/freeclimb/models/recording_result_all_of.rb +25 -8
  196. data/lib/freeclimb/models/redirect.rb +21 -8
  197. data/lib/freeclimb/models/redirect_all_of.rb +20 -8
  198. data/lib/freeclimb/models/reject.rb +21 -8
  199. data/lib/freeclimb/models/reject_all_of.rb +20 -8
  200. data/lib/freeclimb/models/remove_from_conference.rb +21 -8
  201. data/lib/freeclimb/models/remove_from_conference_all_of.rb +20 -8
  202. data/lib/freeclimb/models/say.rb +21 -8
  203. data/lib/freeclimb/models/say_all_of.rb +20 -8
  204. data/lib/freeclimb/models/send_digits.rb +21 -8
  205. data/lib/freeclimb/models/send_digits_all_of.rb +20 -8
  206. data/lib/freeclimb/models/set_listen.rb +21 -8
  207. data/lib/freeclimb/models/set_listen_all_of.rb +20 -8
  208. data/lib/freeclimb/models/set_talk.rb +21 -8
  209. data/lib/freeclimb/models/set_talk_all_of.rb +20 -8
  210. data/lib/freeclimb/models/sms.rb +21 -8
  211. data/lib/freeclimb/models/sms_all_of.rb +20 -8
  212. data/lib/freeclimb/models/start_record_call.rb +21 -8
  213. data/lib/freeclimb/models/terminate_conference.rb +21 -8
  214. data/lib/freeclimb/models/terminate_conference_all_of.rb +20 -8
  215. data/lib/freeclimb/models/update_call_request.rb +20 -8
  216. data/lib/freeclimb/models/update_conference_participant_request.rb +20 -8
  217. data/lib/freeclimb/models/update_conference_request.rb +20 -8
  218. data/lib/freeclimb/version.rb +3 -3
  219. data/lib/freeclimb.rb +25 -53
  220. data/spec/api/default_api_spec.rb +1095 -668
  221. data/spec/api_client_spec.rb +7 -7
  222. data/spec/configuration_spec.rb +13 -5
  223. data/spec/factories.rb +80 -0
  224. data/spec/models/account_request_spec.rb +20 -13
  225. data/spec/models/account_result_spec.rb +81 -12
  226. data/spec/models/add_to_conference_spec.rb +7 -14
  227. data/spec/models/application_list_spec.rb +55 -12
  228. data/spec/models/application_request_spec.rb +49 -12
  229. data/spec/models/application_result_spec.rb +85 -12
  230. data/spec/models/available_number_list_spec.rb +55 -13
  231. data/spec/models/available_number_spec.rb +43 -12
  232. data/spec/models/buy_incoming_number_request_spec.rb +25 -12
  233. data/spec/models/call_list_spec.rb +55 -13
  234. data/spec/models/call_result_spec.rb +124 -12
  235. data/spec/models/capabilities_spec.rb +58 -0
  236. data/spec/models/conference_list_spec.rb +55 -12
  237. data/spec/models/conference_participant_list_spec.rb +55 -12
  238. data/spec/models/conference_participant_result_spec.rb +67 -12
  239. data/spec/models/conference_result_spec.rb +99 -13
  240. data/spec/models/create_conference_request_spec.rb +41 -13
  241. data/spec/models/create_conference_spec.rb +7 -14
  242. data/spec/models/dequeue_spec.rb +7 -14
  243. data/spec/models/enqueue_spec.rb +7 -14
  244. data/spec/models/filter_logs_request_spec.rb +15 -14
  245. data/spec/models/get_digits_spec.rb +13 -14
  246. data/spec/models/get_speech_spec.rb +8 -15
  247. data/spec/models/hangup_spec.rb +5 -12
  248. data/spec/models/incoming_number_list_spec.rb +55 -13
  249. data/spec/models/incoming_number_request_spec.rb +20 -13
  250. data/spec/models/incoming_number_result_spec.rb +91 -13
  251. data/spec/models/log_list_spec.rb +55 -12
  252. data/spec/models/log_result_spec.rb +53 -12
  253. data/spec/models/make_call_request_spec.rb +67 -12
  254. data/spec/models/message_request_spec.rb +61 -13
  255. data/spec/models/message_result_spec.rb +83 -12
  256. data/spec/models/messages_list_spec.rb +55 -12
  257. data/spec/models/mutable_resource_model_spec.rb +31 -13
  258. data/spec/models/out_dial_spec.rb +13 -14
  259. data/spec/models/pagination_model_spec.rb +49 -12
  260. data/spec/models/pause_spec.rb +7 -14
  261. data/spec/models/percl_command_spec.rb +7 -14
  262. data/spec/models/percl_script_spec.rb +7 -14
  263. data/spec/models/play_early_media_spec.rb +7 -14
  264. data/spec/models/play_spec.rb +13 -14
  265. data/spec/models/queue_list_spec.rb +54 -12
  266. data/spec/models/queue_member_list_spec.rb +55 -12
  267. data/spec/models/queue_member_spec.rb +37 -13
  268. data/spec/models/queue_request_spec.rb +20 -14
  269. data/spec/models/queue_result_spec.rb +73 -12
  270. data/spec/models/record_utterance_spec.rb +13 -14
  271. data/spec/models/recording_list_spec.rb +55 -12
  272. data/spec/models/recording_result_spec.rb +61 -12
  273. data/spec/models/redirect_spec.rb +7 -14
  274. data/spec/models/reject_spec.rb +5 -12
  275. data/spec/models/remove_from_conference_spec.rb +7 -14
  276. data/spec/models/say_spec.rb +8 -15
  277. data/spec/models/send_digits_spec.rb +13 -14
  278. data/spec/models/set_listen_spec.rb +7 -14
  279. data/spec/models/set_talk_spec.rb +7 -14
  280. data/spec/models/sms_spec.rb +7 -14
  281. data/spec/models/start_record_call_spec.rb +7 -14
  282. data/spec/models/terminate_conference_spec.rb +7 -14
  283. data/spec/models/update_call_request_spec.rb +19 -14
  284. data/spec/models/update_conference_participant_request_spec.rb +20 -13
  285. data/spec/models/update_conference_request_spec.rb +29 -12
  286. data/spec/quickstart_spec.rb +10 -0
  287. data/spec/spec_helper.rb +62 -7
  288. metadata +17 -38
  289. data/freeclimb-2.0.3.gem +0 -0
  290. data/freeclimb-2.1.0.gem +0 -0
  291. data/freeclimb-2.1.1.gem +0 -0
  292. data/freeclimb-2.1.2.gem +0 -0
  293. data/freeclimb-2.2.0.gem +0 -0
  294. data/freeclimb-3.0.0.gem +0 -0
  295. data/lib/freeclimb/utils.rb +0 -34
  296. data/spec/api/web_mocks.rb +0 -473
@@ -1,38 +1,34 @@
1
1
  =begin
2
2
  #FreeClimb API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
-
6
- The version of the OpenAPI document: 0.0.1
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.
7
5
 
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@freeclimb.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
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_relative 'web_mocks'
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
- before do
53
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/IncomingPhoneNumbers"
54
- @stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::INCOMING_PHONE_NUMBER, :status => 200, :headers => {})
55
- buy_incoming_number_request = Freeclimb::BuyIncomingNumberRequest.new # BuyIncomingNumberRequest | Incoming Number transaction details
56
- #Buy a Phone Number
57
- @result = @api_instance.buy_a_phone_number(buy_incoming_number_request)
58
- end
59
-
60
-
61
- it 'should respond with the phone number that was bought' do
62
- expect(@result).to be_instance_of Freeclimb::IncomingNumberResult
63
- end
64
-
65
- it 'should make a POST request to /Accounts/{accountId}/IncomingPhoneNumbers' do
66
- expect(@stub).to have_been_requested
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
- before do
77
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Conferences"
78
- @stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::CONFERENCE_RESULT, :status => 200, :headers => {})
79
- opts = {
80
- create_conference_request: Freeclimb::CreateConferenceRequest.new # CreateConferenceRequest | Conference to create
81
- }
82
- #Create a Conference
83
- @result = @api_instance.create_a_conference(opts)
84
-
85
- end
86
-
87
- it 'should respond with the conference it created' do
88
- expect(@result).to be_instance_of Freeclimb::ConferenceResult
89
- end
90
-
91
- it 'should make a POST request to /Accounts/{accountId}/Conferences' do
92
- expect(@stub).to have_been_requested
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
- before do
104
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Queues"
105
- @stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::QUEUE_RESULT, :status => 200, :headers => {})
106
- opts = {
107
- queue_request: Freeclimb::QueueRequest.new # QueueRequest | Queue details used to create a queue
108
- }
109
- #Create a Queue
110
- @result = @api_instance.create_a_queue(opts)
111
- end
112
-
113
- it 'should respond with the queue it created' do
114
- expect(@result).to be_instance_of Freeclimb::QueueResult
115
- end
116
-
117
- it 'should make a POST request to /Accounts/{accountId}/Queues' do
118
- expect(@stub).to have_been_requested
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
- before do
129
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Applications"
130
- @stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::APPLICATION_RESULT, :status => 200, :headers => {})
131
- opts = {
132
- queue_request: Freeclimb::QueueRequest.new # QueueRequest | Queue details used to create a queue
133
- }
134
- #Create a Queue
135
- @result = @api_instance.create_an_application(opts)
136
- end
137
-
138
- it 'should respond with the application it created' do
139
- expect(@result).to be_instance_of Freeclimb::ApplicationResult
140
- end
141
-
142
- it 'should make a POST request to /Accounts/{accountId}/Applications' do
143
- expect(@stub).to have_been_requested
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
- before do
154
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Recordings/{recordingId}"
155
- @stub = stub_request(:delete, uri_template).to_return(:status => 204, :headers => {})
156
- recording_id = 'MOCK_RECORDING_ID' # String | String that uniquely identifies this recording resource.
157
-
158
- @result = @api_instance.delete_a_recording(recording_id)
159
- end
160
-
161
- it 'should respond with nothing' do
162
- expect(@result).to be_nil
163
- end
164
-
165
- it 'should make a DELETE request to /Accounts/{accountId}/Recordings/{recordingId}' do
166
- expect(@stub).to have_been_requested
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
- before do
177
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Applications/{applicationId}"
178
- @stub = stub_request(:delete, uri_template).to_return(:status => 204, :headers => {})
179
- application_id = 'MOCK_APPLICATION_ID' # String | String that uniquely identifies this application resource.
180
-
181
- @result = @api_instance.delete_an_application(application_id)
182
- end
183
-
184
- it 'should respond with nothing' do
185
- expect(@result).to be_nil
186
- end
187
-
188
- it 'should make a DELETE request to /Accounts/{accountId}/Applications/{applicationId}' do
189
- expect(@stub).to have_been_requested
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
- before do
200
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}"
201
- @stub = stub_request(:delete, uri_template).to_return(:status => 204, :headers => {})
202
- phone_number_id = 'phone_number_id_example' # String | String that uniquely identifies this phone number resource.
203
-
204
- #Delete an Incoming Number
205
- @result = @api_instance.delete_an_incoming_number(phone_number_id)
206
- end
207
-
208
- it 'should respond with nothing' do
209
- expect(@result).to be_nil
210
- end
211
-
212
- it 'should make a DELETE request to /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}' do
213
- expect(@stub).to have_been_requested
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
- before do
225
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Queues/{queueId}/Members/{callId}"
226
- @stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::QUEUE_MEMBER_RESULT, :status => 200, :headers => {})
227
- queue_id = 'MOCK_QUEUE_ID' # String | String that uniquely identifies the Queue that the Member belongs to.
228
- call_id = 'MOCK_CALL_ID' # String | ID if the Call that the Member belongs to
229
-
230
- @result = @api_instance.dequeue_a_member(queue_id, call_id)
231
- end
232
-
233
- it 'should respond with a queue member' do
234
- expect(@result).to be_instance_of(Freeclimb::QueueMember)
235
- end
236
-
237
- it 'should make a POST request to /Accounts/{accountId}/Queues/{queueId}/Members/{callId}' do
238
- expect(@stub).to have_been_requested
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
- before do
249
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Queues/{queueId}/Members/Front"
250
- @stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::QUEUE_MEMBER_RESULT, :status => 200, :headers => {})
251
- queue_id = 'MOCK_QUEUE_ID' # String | String that uniquely identifies the Queue that the Member belongs to.
252
-
253
- @result = @api_instance.dequeue_head_member(queue_id)
254
- end
255
-
256
- it 'should respond with a queue member' do
257
- expect(@result).to be_instance_of(Freeclimb::QueueMember)
258
- end
259
-
260
- it 'should make a POST request to /Accounts/{accountId}/Queues/{queueId}/Members/{callId}' do
261
- expect(@stub).to have_been_requested
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
- before do
272
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Recordings/{recordingId}/Download"
273
- @stub = stub_request(:get, uri_template).with(:headers => {'Accept' => 'audio/x-wav'}).to_return(:status => 200, :headers => {})
274
- recording_id = 'MOCK_RECORDING_ID' # String | String that uniquely identifies this recording resource.
275
-
276
- @result = @api_instance.download_a_recording_file(recording_id)
277
- end
278
-
279
- it 'should make a POST request to /Accounts/{accountId}/Recordings/{recordingId}/Download' do
280
- expect(@stub).to have_been_requested
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
- before do
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
- @result = @api_instance.filter_logs(filter_logs_request)
296
- end
297
-
298
- it 'should respond with a list of logs' do
299
- expect(@result).to be_instance_of(Freeclimb::LogList)
300
- end
301
-
302
- it 'should make a POST request to /Accounts/{accountId}/Logs' do
303
- expect(@stub).to have_been_requested
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
- before do
315
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Calls/{callId}"
316
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::CALL_RESULT, :status => 200, :headers => {})
317
- call_id = 'MOCK_CALL_ID' # String | String that uniquely identifies this call resource.
318
-
319
- @result = @api_instance.get_a_call(call_id)
320
- end
321
-
322
- it 'should respond with a call result' do
323
- expect(@result).to be_instance_of(Freeclimb::CallResult)
324
- end
325
-
326
- it 'should make a GET request to /Accounts/{accountId}/Calls/{callId}' do
327
- expect(@stub).to have_been_requested
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
- before do
338
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Conferences/{conferenceId}"
339
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::CONFERENCE_RESULT, :status => 200, :headers => {})
340
- conference_id = 'MOCK_CONFERENCE_ID' # String | A string that uniquely identifies this conference resource.
341
-
342
- @result = @api_instance.get_a_conference(conference_id)
343
- end
344
-
345
- it 'should respond with a conference result' do
346
- expect(@result).to be_instance_of(Freeclimb::ConferenceResult)
347
- end
348
-
349
- it 'should make a GET request to /Accounts/{accountId}/Conferences/{conferenceId}' do
350
- expect(@stub).to have_been_requested
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
- before do
362
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Queues/{queueId}/Members/{callId}"
363
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::QUEUE_MEMBER_RESULT, :status => 200, :headers => {})
364
- queue_id = 'MOCK_QUEUE_ID' # String | String that uniquely identifies the Queue that the Member belongs to.
365
- call_id = 'MOCK_CALL_ID' # String | ID of the Call that the Member belongs to
366
- @result = @api_instance.get_a_member(queue_id, call_id)
367
- end
368
-
369
- it 'should respond with a queue member result' do
370
- expect(@result).to be_instance_of(Freeclimb::QueueMember)
371
- end
372
-
373
- it 'should make a GET request to /Accounts/{accountId}/Queues/{queueId}/Members/{callId}' do
374
- expect(@stub).to have_been_requested
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
- before do
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
- @result = @api_instance.get_a_participant(conference_id, call_id)
392
- end
393
-
394
- it 'should respond with a Conference participant result' do
395
- expect(@result).to be_instance_of(Freeclimb::ConferenceParticipantResult)
396
- end
397
-
398
- it 'should make a GET request to /Accounts/{accountId}/Conferences/{ConferenceId}/Participants/{callId}' do
399
- expect(@stub).to have_been_requested
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
- before do
410
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Queues/{queueId}"
411
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::QUEUE_RESULT, :status => 200, :headers => {})
412
- queue_id = 'MOCK_QUEUE_ID' # String | A string that uniquely identifies this queue resource.
413
-
414
- @result = @api_instance.get_a_queue(queue_id)
415
- end
416
-
417
- it 'should respond with a queue result' do
418
- expect(@result).to be_instance_of(Freeclimb::QueueResult)
419
- end
420
-
421
- it 'should make a GET request to /Accounts/{accountId}/Queues/{queueId}' do
422
- expect(@stub).to have_been_requested
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
- before do
433
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Recordings/{recordingId}"
434
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::QUEUE_RESULT, :status => 200, :headers => {})
435
- recording_id = 'MOCK_RECORDING_ID' # String | String that uniquely identifies this recording resource.
436
-
437
- @result = @api_instance.get_a_recording(recording_id)
438
- end
439
-
440
- it 'should respond with a Recording result' do
441
- expect(@result).to be_instance_of(Freeclimb::RecordingResult)
442
- end
443
-
444
- it 'should make a GET request to /Accounts/{accountId}/Recordings/{recordingId}' do
445
- expect(@stub).to have_been_requested
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
- before do
455
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}"
456
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::ACCOUNT_RESULT, :status => 200, :headers => {})
457
-
458
- @result = @api_instance.get_an_account
459
- end
460
-
461
- it 'should respond with an Account result' do
462
- expect(@result).to be_instance_of(Freeclimb::AccountResult)
463
- end
464
-
465
- it 'should make a GET request to /Accounts/{accountId}' do
466
- expect(@stub).to have_been_requested
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
- before do
477
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Applications/{applicationId}"
478
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::APPLICATION_RESULT, :status => 200, :headers => {})
479
-
480
- application_id = 'MOCK_APPLICATION_ID' # String | A string that uniquely identifies this application resource.
481
- @result = @api_instance.get_an_application(application_id)
482
- end
483
-
484
- it 'should respond with an Application result' do
485
- expect(@result).to be_instance_of(Freeclimb::ApplicationResult)
486
- end
487
-
488
- it 'should make a GET request to /Accounts/{accountId}/Applications/{applicationId}' do
489
- expect(@stub).to have_been_requested
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
- before do
500
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}"
501
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::INCOMING_PHONE_NUMBER, :status => 200, :headers => {})
502
-
503
- phone_number_id = 'MOCK_PHONE_NUMBER_ID' # String | String that uniquely identifies this phone number resource.
504
- @result = @api_instance.get_an_incoming_number(phone_number_id)
505
- end
506
-
507
- it 'should respond with an Application result' do
508
- expect(@result).to be_instance_of(Freeclimb::IncomingNumberResult)
509
- end
510
-
511
- it 'should make a GET request to /Accounts/{accountId}/Applications/{applicationId}' do
512
- expect(@stub).to have_been_requested
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
- before do
523
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Messages/{messageId}"
524
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::MESSAGE_RESULT, :status => 200, :headers => {})
525
-
526
- message_id = 'MOCK_MESSAGE_ID' # String | String that uniquely identifies this Message resource.
527
-
528
- @result = @api_instance.get_an_sms_message(message_id)
529
- end
530
-
531
- it 'should respond with a Message result' do
532
- expect(@result).to be_instance_of(Freeclimb::MessageResult)
533
- end
534
-
535
- it 'should make a GET request to /Accounts/{accountId}/Messages/{messageId}' do
536
- expect(@stub).to have_been_requested
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
- before do
547
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Queues/{queueId}/Members/Front"
548
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::QUEUE_MEMBER_RESULT, :status => 200, :headers => {})
549
-
550
- queue_id = 'MOCK_QUEUE_ID' # String | String that uniquely identifies this Message resource.
551
-
552
- @result = @api_instance.get_head_member(queue_id)
553
- end
554
-
555
- it 'should respond with a Queue Member result' do
556
- expect(@result).to be_instance_of(Freeclimb::QueueMember)
557
- end
558
-
559
- it 'should make a GET request to /Accounts/{accountId}/Queues/{queueId}/Members/Front' do
560
- expect(@stub).to have_been_requested
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
- before do
571
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Queues"
572
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::QUEUE_LIST_RESULT, :status => 200, :headers => {})
573
-
574
- @result = @api_instance.list_active_queues
575
- end
576
-
577
- it 'should respond with a Queue List result' do
578
- expect(@result).to be_instance_of(Freeclimb::QueueList)
579
- end
580
-
581
- it 'should make a GET request to /Accounts/{accountId}/Queues' do
582
- expect(@stub).to have_been_requested
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,69 +760,107 @@ 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
- before do
592
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Logs"
593
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::LOG_LIST_RESULT, :status => 200, :headers => {})
594
-
595
- @result = @api_instance.list_all_account_logs
596
- end
597
-
598
- it 'should respond with a Queue Member result' do
599
- expect(@result).to be_instance_of(Freeclimb::LogList)
600
- end
601
-
602
- it 'should make a GET request to /Accounts/{accountId}/Logs' do
603
- expect(@stub).to have_been_requested
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
 
607
- # unit tests for list_an_application
787
+ # unit tests for list_applications
608
788
  # List applications
609
789
  # @param [Hash] opts the optional parameters
610
790
  # @option opts [String] :_alias Return only applications with aliases that exactly match this value.
611
791
  # @return [ApplicationList]
612
- describe 'list_an_application test' do
613
- before do
614
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Applications"
615
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::APPLICATION_LIST_RESULT, :status => 200, :headers => {})
616
-
617
- @result = @api_instance.list_an_application
618
- end
619
-
620
- it 'should respond with a Application List result' do
621
- expect(@result).to be_instance_of(Freeclimb::ApplicationList)
622
- end
623
-
624
- it 'should make a GET request to /Accounts/{accountId}/Applications' do
625
- expect(@stub).to have_been_requested
792
+ describe 'list_applications test' do
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_applications(
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
- before do
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
- @result = @api_instance.list_available_numbers(opts)
646
- end
647
-
648
- it 'should respond with a Available Number List result' do
649
- expect(@result).to be_instance_of(Freeclimb::AvailableNumberList)
650
- end
651
-
652
- it 'should make a GET request to /AvailablePhoneNumbers' do
653
- expect(@stub).to have_been_requested
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
- before do
664
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Calls/{callId}/Logs"
665
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::LOG_LIST_RESULT, :status => 200, :headers => {})
666
-
667
- call_id = 'MOCK_CALL_ID' # String | String that uniquely identifies this call resource.
668
- @result = @api_instance.list_call_logs(call_id)
669
- end
670
-
671
- it 'should respond with a Logs List result' do
672
- expect(@result).to be_instance_of(Freeclimb::LogList)
673
- end
674
-
675
- it 'should make a GET request to /Accounts/{accountId}/Calls/{callId}/Logs' do
676
- expect(@stub).to have_been_requested
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
- before do
688
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Calls/{callId}/Recordings"
689
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::RECORDING_LIST_RESULT, :status => 200, :headers => {})
690
-
691
- call_id = 'MOCK_CALL_ID' # String | String that uniquely identifies this call resource.
692
- @result = @api_instance.list_call_recordings(call_id)
693
- end
694
-
695
- it 'should respond with a Recording List result' do
696
- expect(@result).to be_instance_of(Freeclimb::RecordingList)
697
- end
698
-
699
- it 'should make a GET request to /Accounts/{accountId}/Calls/{callId}/Recordings' do
700
- expect(@stub).to have_been_requested
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
- before do
716
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Calls"
717
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::CALL_LIST_RESULT, :status => 200, :headers => {})
718
-
719
- @result = @api_instance.list_calls
720
- end
721
-
722
- it 'should respond with a Call List result' do
723
- expect(@result).to be_instance_of(Freeclimb::CallList)
724
- end
725
-
726
- it 'should make a GET request to /Accounts/{accountId}/Calls' do
727
- expect(@stub).to have_been_requested
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
- before do
741
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Conferences"
742
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::CONFERNECE_LIST_RESULT, :status => 200, :headers => {})
743
-
744
- @result = @api_instance.list_conferences
745
- end
746
-
747
- it 'should respond with a Conferences List result' do
748
- expect(@result).to be_instance_of(Freeclimb::ConferenceList)
749
- end
750
-
751
- it 'should make a GET request to /Accounts/{accountId}/Conferences' do
752
- expect(@stub).to have_been_requested
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 [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.
1019
+ # @option opts [Boolean] :has_application Indication of whether the phone number has an application linked to it.
1020
+ # @option opts [Boolean] :voice_enabled Indicates whether the phone number can handle Calls. Typically set to true for all numbers.
1021
+ # @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.
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
- before do
764
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/IncomingPhoneNumbers"
765
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::INCOMING_PHONE_NUMBER_LIST_RESULT, :status => 200, :headers => {})
766
-
767
- @result = @api_instance.list_incoming_numbers
768
- end
769
-
770
- it 'should respond with a Incoming Phone Number List result' do
771
- expect(@result).to be_instance_of(Freeclimb::IncomingNumberList)
772
- end
773
-
774
- it 'should make a GET request to /Accounts/{accountId}/IncomingPhoneNumbers' do
775
- expect(@stub).to have_been_requested
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
+ application_id = build_value(:application_id)
1036
+ has_application = build_value(:has_application)
1037
+ voice_enabled = build_value(:voice_enabled)
1038
+ sms_enabled = build_value(:sms_enabled)
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, :application_id => application_id, :has_application => has_application, :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,
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,:application_id => application_id,:has_application => has_application,: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,
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
- before do
786
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Queues/{queueId}/Members"
787
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::QUEUE_MEMBER_RESULT, :status => 200, :headers => {})
788
-
789
- queue_id = 'MOCK_QUEUE_ID'
790
- @result = @api_instance.list_members(queue_id)
791
- end
792
-
793
- it 'should respond with a Queue Member List result' do
794
- expect(@result).to be_instance_of(Freeclimb::QueueMemberList)
795
- end
796
-
797
- it 'should make a GET request to /Accounts/{accountId}/Queues/{queueId}/Members' do
798
- expect(@stub).to have_been_requested
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
- before do
811
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Conferences/{conferenceId}/Participants"
812
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::PARTICIPANT_LIST_RESULT, :status => 200, :headers => {})
813
-
814
- conference_id = 'MOCK_CONFERENCE_ID'
815
- @result = @api_instance.list_participants(conference_id)
816
- end
817
-
818
- it 'should respond with a Conference Participant List result' do
819
- expect(@result).to be_instance_of(Freeclimb::ConferenceParticipantList)
820
- end
821
-
822
- it 'should make a GET request to /Accounts/{accountId}/Conferences/{conferenceId}/Participants' do
823
- expect(@stub).to have_been_requested
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
- before do
836
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Recordings"
837
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::RECORDING_LIST_RESULT, :status => 200, :headers => {})
838
-
839
- @result = @api_instance.list_recordings
840
- end
841
-
842
- it 'should respond with a Recordings List result' do
843
- expect(@result).to be_instance_of(Freeclimb::RecordingList)
844
- end
845
-
846
- it 'should make a GET request to /Accounts/{accountId}/Recordings' do
847
- expect(@stub).to have_been_requested
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
- before do
863
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Messages"
864
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::MESSAGE_RESULT, :status => 200, :headers => {})
865
-
866
- @result = @api_instance.list_sms_messages
867
- end
868
-
869
- it 'should respond with a Messages List result' do
870
- expect(@result).to be_instance_of(Freeclimb::MessagesList)
871
- end
872
-
873
- it 'should make a GET request to /Accounts/{accountId}/Messages' do
874
- expect(@stub).to have_been_requested
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
- before do
885
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Calls"
886
- @stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::CALL_RESULT, :status => 200, :headers => {})
887
-
888
- @result = @api_instance.make_a_call
889
- end
890
-
891
- it 'should respond with a Call Result result' do
892
- expect(@result).to be_instance_of(Freeclimb::CallResult)
893
- end
894
-
895
- it 'should make a POST request to /Accounts/{accountId}/Calls' do
896
- expect(@stub).to have_been_requested
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
- before do
908
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}"
909
- @stub = stub_request(:delete, uri_template).to_return(:status => 204, :headers => {})
910
-
911
- conference_id = 'MOCK_CONFERENCE_ID'
912
- call_id = 'CALL_ID'
913
- @result = @api_instance.remove_a_participant(conference_id, call_id)
914
- end
915
-
916
- it 'should respond with nil' do
917
- expect(@result).to be_nil
918
- end
919
-
920
- it 'should make a POST request to /Accounts/{accountId}/Calls' do
921
- expect(@stub).to have_been_requested
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
- before do
932
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Messages"
933
- @stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::CALL_RESULT, :status => 200, :headers => {})
934
-
935
- request_body = Freeclimb::MessageRequest.new
936
- request_body.to = 'MOCK_TO_NUMBER'
937
- request_body.from ='MOCK_FROM_NUMBER'
938
- request_body.text = 'MOCK_TEXT'
939
-
940
- @result = @api_instance.send_an_sms_message(request_body)
941
- end
942
-
943
- it 'should respond with Message result' do
944
- expect(@result).to be_instance_of(Freeclimb::MessageResult)
945
- end
946
-
947
- it 'should make a POST request to /Accounts/{accountId}/Messages' do
948
- expect(@stub).to have_been_requested
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
- before do
959
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Recordings/{recordingId}/Stream"
960
- @stub = stub_request(:get, uri_template).to_return(:body => ResponseMocks::CALL_RESULT, :status => 200, :headers => {})
961
-
962
- recording_id = 'MOCK_RECORDING_ID'
963
- @result = @api_instance.stream_a_recording_file(recording_id)
964
- end
965
-
966
- it 'should make a GET request to /Accounts/{accountId}/Recordings/{recordingId}/Stream' do
967
- expect(@stub).to have_been_requested
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
- before do
979
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Conferences/{conferenceId}"
980
- @stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::CONFERENCE_RESULT, :status => 200, :headers => {})
981
-
982
- conference_id = 'MOCK_CONFERENCE_ID'
983
- @result = @api_instance.update_a_conference(conference_id)
984
- end
985
-
986
- it 'should respond with a Conference result' do
987
- expect(@result).to be_instance_of(Freeclimb::ConferenceResult)
988
- end
989
-
990
- it 'should make a POST request to /Accounts/{accountId}/Conferences/{conferenceId}' do
991
- expect(@stub).to have_been_requested
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
- before do
1003
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Calls/{callId}"
1004
- @stub = stub_request(:post, uri_template).to_return(:body => '{}', :status => 202, :headers => {})
1005
-
1006
- call_id = 'MOCK_CALL_ID'
1007
- call_request = Freeclimb::UpdateCallRequest.new
1008
- @result = @api_instance.update_a_live_call(call_id, call_request)
1009
- end
1010
-
1011
- it 'should make a POST request to /Accounts/{accountId}/Calls/{callId}' do
1012
- expect(@stub).to have_been_requested
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
- before do
1025
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}"
1026
- @stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::CONFERENCE_PARTICIPANT_RESULT, :status => 200, :headers => {})
1027
-
1028
- conference_id = 'MOCK_CONFERENCE_ID'
1029
- call_id = 'MOCK_CALL_ID'
1030
- @result = @api_instance.update_a_participant(conference_id, call_id)
1031
- end
1032
-
1033
- it 'should respond with a Conference Participant result' do
1034
- expect(@result).to be_instance_of(Freeclimb::ConferenceParticipantResult)
1035
- end
1036
-
1037
- it 'should make a POST request to /Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}' do
1038
- expect(@stub).to have_been_requested
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
- before do
1050
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Queues/{queueId}"
1051
- @stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::QUEUE_RESULT, :status => 200, :headers => {})
1052
-
1053
- queue_id = 'MOCK_QUEUE_ID'
1054
- @result = @api_instance.update_a_queue(queue_id)
1055
- end
1056
-
1057
- it 'should respond with a Queue result' do
1058
- expect(@result).to be_instance_of(Freeclimb::QueueResult)
1059
- end
1060
-
1061
- it 'should make a POST request to /Accounts/{accountId}/Queues/{queueId}' do
1062
- expect(@stub).to have_been_requested
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
- before do
1073
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}"
1074
- @stub = stub_request(:post, uri_template).to_return(:status => 204, :headers => {})
1075
-
1076
- @result = @api_instance.update_an_account
1077
- end
1078
-
1079
- it 'should respond an empty body' do
1080
- expect(@result).to be_nil
1081
- end
1082
-
1083
- it 'should make a POST request to /Accounts/{accountId}' do
1084
- expect(@stub).to have_been_requested
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
- before do
1096
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/Applications/{applicationId}"
1097
- @stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::APPLICATION_RESULT, :status => 200, :headers => {})
1098
-
1099
- application_id = 'MOCK_APPLICAION_ID'
1100
- @result = @api_instance.update_an_application(application_id)
1101
- end
1102
-
1103
- it 'should respond with an Application result' do
1104
- expect(@result).to be_instance_of(Freeclimb::ApplicationResult)
1105
- end
1106
-
1107
- it 'should make a POST request to /Accounts/{accountId}/Applications/{application_id}' do
1108
- expect(@stub).to have_been_requested
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
- before do
1120
- uri_template = Addressable::Template.new "#{API_SERVER}/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}"
1121
- @stub = stub_request(:post, uri_template).to_return(:body => ResponseMocks::APPLICATION_RESULT, :status => 200, :headers => {})
1122
-
1123
- phoneNumberId = 'MOCK_PHONE_NUMBER'
1124
- @result = @api_instance.update_an_incoming_number(phoneNumberId)
1125
- end
1126
-
1127
- it 'should respond with an Incoming Number result' do
1128
- expect(@result).to be_instance_of(Freeclimb::IncomingNumberResult)
1129
- end
1130
-
1131
- it 'should make a POST request to /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}' do
1132
- expect(@stub).to have_been_requested
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