freeclimb 1.0.0 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +69 -50
  4. data/docs/AccountRequest.md +3 -5
  5. data/docs/AccountResult.md +12 -12
  6. data/docs/AccountResultAllOf.md +8 -8
  7. data/docs/AddToConference.md +35 -0
  8. data/docs/AddToConferenceAllOf.md +35 -0
  9. data/docs/ApplicationList.md +9 -9
  10. data/docs/ApplicationListAllOf.md +2 -2
  11. data/docs/ApplicationRequest.md +8 -10
  12. data/docs/ApplicationResult.md +14 -14
  13. data/docs/ApplicationResultAllOf.md +10 -10
  14. data/docs/AvailableNumber.md +7 -7
  15. data/docs/AvailableNumberList.md +9 -9
  16. data/docs/AvailableNumberListAllOf.md +2 -2
  17. data/docs/BuyIncomingNumberRequest.md +4 -6
  18. data/docs/CallList.md +9 -9
  19. data/docs/CallListAllOf.md +2 -2
  20. data/docs/CallResult.md +20 -20
  21. data/docs/CallResultAllOf.md +16 -16
  22. data/docs/ConferenceList.md +9 -9
  23. data/docs/ConferenceListAllOf.md +2 -2
  24. data/docs/ConferenceParticipantList.md +9 -9
  25. data/docs/ConferenceParticipantListAllOf.md +2 -2
  26. data/docs/ConferenceParticipantResult.md +11 -11
  27. data/docs/ConferenceParticipantResultAllOf.md +7 -7
  28. data/docs/ConferenceResult.md +15 -15
  29. data/docs/ConferenceResultAllOf.md +11 -11
  30. data/docs/CreateConference.md +27 -0
  31. data/docs/CreateConferenceAllOf.md +27 -0
  32. data/docs/CreateConferenceRequest.md +6 -8
  33. data/docs/DefaultApi.md +70 -86
  34. data/docs/Dequeue.md +16 -0
  35. data/docs/Enqueue.md +23 -0
  36. data/docs/EnqueueAllOf.md +23 -0
  37. data/docs/FilterLogsRequest.md +2 -4
  38. data/docs/GetDigits.md +33 -0
  39. data/docs/GetDigitsAllOf.md +33 -0
  40. data/docs/GetSpeech.md +41 -0
  41. data/docs/GetSpeechAllOf.md +41 -0
  42. data/docs/IncomingNumberList.md +9 -9
  43. data/docs/IncomingNumberListAllOf.md +2 -2
  44. data/docs/IncomingNumberRequest.md +3 -5
  45. data/docs/IncomingNumberResult.md +14 -14
  46. data/docs/IncomingNumberResultAllOf.md +10 -10
  47. data/docs/LogList.md +9 -9
  48. data/docs/LogListAllOf.md +2 -2
  49. data/docs/LogResult.md +8 -8
  50. data/docs/MakeCallRequest.md +11 -11
  51. data/docs/MessageRequest.md +10 -12
  52. data/docs/MessageRequestAllOf.md +6 -8
  53. data/docs/MessageResult.md +13 -13
  54. data/docs/MessageResultAllOf.md +9 -9
  55. data/docs/MessagesList.md +9 -9
  56. data/docs/MessagesListAllOf.md +2 -2
  57. data/docs/MutableResourceModel.md +5 -5
  58. data/docs/OutDial.md +35 -0
  59. data/docs/OutDialAllOf.md +35 -0
  60. data/docs/PaginationModel.md +8 -8
  61. data/docs/Pause.md +17 -0
  62. data/docs/PauseAllOf.md +17 -0
  63. data/docs/PerclCommand.md +17 -0
  64. data/docs/PerclScript.md +17 -0
  65. data/docs/Play.md +23 -0
  66. data/docs/PlayAllOf.md +23 -0
  67. data/docs/PlayEarlyMedia.md +17 -0
  68. data/docs/PlayEarlyMediaAllOf.md +17 -0
  69. data/docs/QueueList.md +9 -9
  70. data/docs/QueueListAllOf.md +2 -2
  71. data/docs/QueueMember.md +6 -6
  72. data/docs/QueueMemberList.md +9 -9
  73. data/docs/QueueMemberListAllOf.md +2 -2
  74. data/docs/QueueRequest.md +3 -5
  75. data/docs/QueueResult.md +12 -12
  76. data/docs/QueueResultAllOf.md +8 -8
  77. data/docs/RecordUtterance.md +27 -0
  78. data/docs/RecordUtteranceAllOf.md +27 -0
  79. data/docs/RecordingList.md +9 -9
  80. data/docs/RecordingListAllOf.md +2 -2
  81. data/docs/RecordingResult.md +10 -10
  82. data/docs/RecordingResultAllOf.md +6 -6
  83. data/docs/Redirect.md +17 -0
  84. data/docs/RedirectAllOf.md +17 -0
  85. data/docs/RemoveFromConference.md +17 -0
  86. data/docs/RemoveFromConferenceAllOf.md +17 -0
  87. data/docs/Say.md +25 -0
  88. data/docs/SayAllOf.md +25 -0
  89. data/docs/SendDigits.md +21 -0
  90. data/docs/SendDigitsAllOf.md +21 -0
  91. data/docs/SetListen.md +19 -0
  92. data/docs/SetListenAllOf.md +19 -0
  93. data/docs/SetTalk.md +19 -0
  94. data/docs/SetTalkAllOf.md +19 -0
  95. data/docs/Sms.md +23 -0
  96. data/docs/SmsAllOf.md +23 -0
  97. data/docs/StartRecordCall.md +16 -0
  98. data/docs/TerminateConference.md +17 -0
  99. data/docs/TerminateConferenceAllOf.md +17 -0
  100. data/docs/UpdateCallRequest.md +2 -4
  101. data/docs/UpdateConferenceParticipantRequest.md +3 -5
  102. data/docs/UpdateConferenceRequest.md +4 -6
  103. data/lib/freeclimb.rb +69 -2
  104. data/lib/freeclimb/api/default_api.rb +96 -88
  105. data/lib/freeclimb/api_client.rb +1 -1
  106. data/lib/freeclimb/models/account_request.rb +4 -14
  107. data/lib/freeclimb/models/add_to_conference.rb +320 -0
  108. data/lib/freeclimb/models/add_to_conference_all_of.rb +307 -0
  109. data/lib/freeclimb/models/application_request.rb +4 -14
  110. data/lib/freeclimb/models/buy_incoming_number_request.rb +4 -14
  111. data/lib/freeclimb/models/create_conference.rb +275 -0
  112. data/lib/freeclimb/models/create_conference_all_of.rb +262 -0
  113. data/lib/freeclimb/models/create_conference_request.rb +4 -14
  114. data/lib/freeclimb/models/dequeue.rb +209 -0
  115. data/lib/freeclimb/models/enqueue.rb +265 -0
  116. data/lib/freeclimb/models/enqueue_all_of.rb +252 -0
  117. data/lib/freeclimb/models/filter_logs_request.rb +4 -14
  118. data/lib/freeclimb/models/get_digits.rb +307 -0
  119. data/lib/freeclimb/models/get_digits_all_of.rb +294 -0
  120. data/lib/freeclimb/models/get_speech.rb +352 -0
  121. data/lib/freeclimb/models/get_speech_all_of.rb +339 -0
  122. data/lib/freeclimb/models/incoming_number_request.rb +4 -14
  123. data/lib/freeclimb/models/make_call_request.rb +14 -14
  124. data/lib/freeclimb/models/message_request.rb +1 -11
  125. data/lib/freeclimb/models/message_request_all_of.rb +1 -11
  126. data/lib/freeclimb/models/out_dial.rb +330 -0
  127. data/lib/freeclimb/models/out_dial_all_of.rb +317 -0
  128. data/lib/freeclimb/models/pause.rb +225 -0
  129. data/lib/freeclimb/models/{dequeue_member_request.rb → pause_all_of.rb} +16 -11
  130. data/lib/freeclimb/models/percl_command.rb +211 -0
  131. data/lib/freeclimb/models/percl_script.rb +210 -0
  132. data/lib/freeclimb/models/play.rb +255 -0
  133. data/lib/freeclimb/models/play_all_of.rb +242 -0
  134. data/lib/freeclimb/models/play_early_media.rb +225 -0
  135. data/lib/freeclimb/models/play_early_media_all_of.rb +212 -0
  136. data/lib/freeclimb/models/queue_request.rb +4 -14
  137. data/lib/freeclimb/models/record_utterance.rb +275 -0
  138. data/lib/freeclimb/models/record_utterance_all_of.rb +262 -0
  139. data/lib/freeclimb/models/redirect.rb +220 -0
  140. data/lib/freeclimb/models/redirect_all_of.rb +207 -0
  141. data/lib/freeclimb/models/remove_from_conference.rb +225 -0
  142. data/lib/freeclimb/models/remove_from_conference_all_of.rb +212 -0
  143. data/lib/freeclimb/models/say.rb +265 -0
  144. data/lib/freeclimb/models/say_all_of.rb +252 -0
  145. data/lib/freeclimb/models/send_digits.rb +245 -0
  146. data/lib/freeclimb/models/send_digits_all_of.rb +232 -0
  147. data/lib/freeclimb/models/set_listen.rb +235 -0
  148. data/lib/freeclimb/models/set_listen_all_of.rb +222 -0
  149. data/lib/freeclimb/models/set_talk.rb +235 -0
  150. data/lib/freeclimb/models/set_talk_all_of.rb +222 -0
  151. data/lib/freeclimb/models/sms.rb +265 -0
  152. data/lib/freeclimb/models/sms_all_of.rb +252 -0
  153. data/lib/freeclimb/models/start_record_call.rb +209 -0
  154. data/lib/freeclimb/models/terminate_conference.rb +225 -0
  155. data/lib/freeclimb/models/terminate_conference_all_of.rb +212 -0
  156. data/lib/freeclimb/models/update_call_request.rb +4 -14
  157. data/lib/freeclimb/models/update_conference_participant_request.rb +4 -14
  158. data/lib/freeclimb/models/update_conference_request.rb +4 -14
  159. data/lib/freeclimb/version.rb +1 -1
  160. data/spec/api/default_api_spec.rb +9 -24
  161. data/spec/models/add_to_conference_spec.rb +95 -0
  162. data/spec/models/create_conference_spec.rb +71 -0
  163. data/spec/models/{dequeue_member_request_spec.rb → dequeue_spec.rb} +8 -7
  164. data/spec/models/enqueue_spec.rb +59 -0
  165. data/spec/models/get_digits_spec.rb +83 -0
  166. data/spec/models/get_speech_spec.rb +113 -0
  167. data/spec/models/out_dial_spec.rb +89 -0
  168. data/spec/models/pause_spec.rb +41 -0
  169. data/spec/models/percl_command_spec.rb +41 -0
  170. data/spec/models/percl_script_spec.rb +41 -0
  171. data/spec/models/play_early_media_spec.rb +41 -0
  172. data/spec/models/play_spec.rb +53 -0
  173. data/spec/models/record_utterance_spec.rb +71 -0
  174. data/spec/models/redirect_spec.rb +41 -0
  175. data/spec/models/remove_from_conference_spec.rb +41 -0
  176. data/spec/models/say_spec.rb +65 -0
  177. data/spec/models/send_digits_spec.rb +47 -0
  178. data/spec/models/set_listen_spec.rb +47 -0
  179. data/spec/models/set_talk_spec.rb +47 -0
  180. data/spec/models/sms_spec.rb +59 -0
  181. data/spec/models/start_record_call_spec.rb +35 -0
  182. data/spec/models/terminate_conference_spec.rb +41 -0
  183. metadata +126 -35
  184. data/docs/DequeueMemberRequest.md +0 -17
  185. data/docs/Percl.md +0 -697
  186. data/git_push.sh +0 -58
  187. data/lib/percl/calls.rb +0 -43
  188. data/lib/percl/conference_participants.rb +0 -40
  189. data/lib/percl/conferences.rb +0 -21
  190. data/lib/percl/ivr.rb +0 -63
  191. data/lib/percl/jsonable.rb +0 -23
  192. data/lib/percl/percl.rb +0 -29
  193. data/lib/percl/queue_members.rb +0 -15
  194. data/lib/percl/recordings.rb +0 -15
  195. data/lib/percl/sms.rb +0 -11
  196. data/spec/percl/calls_spec.rb +0 -111
  197. data/spec/percl/conference_participant_spec.rb +0 -96
  198. data/spec/percl/conference_spec.rb +0 -46
  199. data/spec/percl/ivr_spec.rb +0 -155
  200. data/spec/percl/jsonable_spec.rb +0 -28
  201. data/spec/percl/percl_spec.rb +0 -31
  202. data/spec/percl/queue_members_spec.rb +0 -35
  203. data/spec/percl/recordings_spec.rb +0 -32
  204. data/spec/percl/sms_spec.rb +0 -29
@@ -0,0 +1,19 @@
1
+ # Freeclimb::SetListenAllOf
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **call_id** | **String** | ID of the call leg that is to be assigned the listen privilege. The Call must be in a Conference or an error will be triggered. |
8
+ **listen** | **Boolean** | Specifying `false` will silence the Conference for this Participant. | [optional]
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'freeclimb'
14
+
15
+ instance = Freeclimb::SetListenAllOf.new(call_id: nil,
16
+ listen: nil)
17
+ ```
18
+
19
+
@@ -0,0 +1,19 @@
1
+ # Freeclimb::SetTalk
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **call_id** | **String** | ID of the call leg that is to be muted or unmuted. The Call must be in a Conference or an error will be triggered. |
8
+ **talk** | **Boolean** | Specifying `false` mutes the Participant. | [optional]
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'freeclimb'
14
+
15
+ instance = Freeclimb::SetTalk.new(call_id: nil,
16
+ talk: nil)
17
+ ```
18
+
19
+
@@ -0,0 +1,19 @@
1
+ # Freeclimb::SetTalkAllOf
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **call_id** | **String** | ID of the call leg that is to be muted or unmuted. The Call must be in a Conference or an error will be triggered. |
8
+ **talk** | **Boolean** | Specifying `false` mutes the Participant. | [optional]
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'freeclimb'
14
+
15
+ instance = Freeclimb::SetTalkAllOf.new(call_id: nil,
16
+ talk: nil)
17
+ ```
18
+
19
+
@@ -0,0 +1,23 @@
1
+ # Freeclimb::Sms
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **to** | **String** | E.164 representation of the phone number to which the message will be sent. Must be within FreeClimb's service area and E.164 formatting (e.g., +18003608245). |
8
+ **from** | **String** | E.164 representation of the phone number to use as the sender. This must be an incoming phone number you have purchased from FreeClimb. |
9
+ **text** | **String** | Text contained in the message (maximum 160 characters). |
10
+ **notification_url** | **String** | When the message changes status, this URL will be invoked using HTTP POST with the messageStatus parameters. This is a notification only; any PerCL returned will be ignored. | [optional]
11
+
12
+ ## Code Sample
13
+
14
+ ```ruby
15
+ require 'freeclimb'
16
+
17
+ instance = Freeclimb::Sms.new(to: nil,
18
+ from: nil,
19
+ text: nil,
20
+ notification_url: nil)
21
+ ```
22
+
23
+
@@ -0,0 +1,23 @@
1
+ # Freeclimb::SmsAllOf
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **to** | **String** | E.164 representation of the phone number to which the message will be sent. Must be within FreeClimb's service area and E.164 formatting (e.g., +18003608245). |
8
+ **from** | **String** | E.164 representation of the phone number to use as the sender. This must be an incoming phone number you have purchased from FreeClimb. |
9
+ **text** | **String** | Text contained in the message (maximum 160 characters). |
10
+ **notification_url** | **String** | When the message changes status, this URL will be invoked using HTTP POST with the messageStatus parameters. This is a notification only; any PerCL returned will be ignored. | [optional]
11
+
12
+ ## Code Sample
13
+
14
+ ```ruby
15
+ require 'freeclimb'
16
+
17
+ instance = Freeclimb::SmsAllOf.new(to: nil,
18
+ from: nil,
19
+ text: nil,
20
+ notification_url: nil)
21
+ ```
22
+
23
+
@@ -0,0 +1,16 @@
1
+ # Freeclimb::StartRecordCall
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+
8
+ ## Code Sample
9
+
10
+ ```ruby
11
+ require 'freeclimb'
12
+
13
+ instance = Freeclimb::StartRecordCall.new()
14
+ ```
15
+
16
+
@@ -0,0 +1,17 @@
1
+ # Freeclimb::TerminateConference
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **conference_id** | **String** | ID of the conference to terminate. |
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'freeclimb'
13
+
14
+ instance = Freeclimb::TerminateConference.new(conference_id: nil)
15
+ ```
16
+
17
+
@@ -0,0 +1,17 @@
1
+ # Freeclimb::TerminateConferenceAllOf
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **conference_id** | **String** | ID of the conference to terminate. |
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'freeclimb'
13
+
14
+ instance = Freeclimb::TerminateConferenceAllOf.new(conference_id: nil)
15
+ ```
16
+
17
+
@@ -5,15 +5,13 @@
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **status** | **String** | Either `canceled` or `completed`. Specifying `canceled` attempts to hang up calls that are queued without affecting calls already in progress. Specifying `completed` attempts to hang up a call already in progress. |
8
- **request_id** | **String** | RequestId for this request starting with prefix `RQ` followed by 40 hexadecimal characters. FreeClimb logs generated while processing this request will include this requestId. If it is not provided, FreeClimb will generate a requestId and return it as a header in the response (e.g. `X-Pulse-Request-Id: <requestId>`). | [optional]
9
8
 
10
9
  ## Code Sample
11
10
 
12
11
  ```ruby
13
- require 'Freeclimb'
12
+ require 'freeclimb'
14
13
 
15
- instance = Freeclimb::UpdateCallRequest.new(status: null,
16
- request_id: null)
14
+ instance = Freeclimb::UpdateCallRequest.new(status: nil)
17
15
  ```
18
16
 
19
17
 
@@ -6,16 +6,14 @@ Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **talk** | **Boolean** | (Optional) Default is `true`. Setting to `false` mutes the Participant. FreeClimb returns an error and ignores any other value. | [optional]
8
8
  **listen** | **Boolean** | (Optional) Default is `true`. Setting to `false` silences the Conference for this Participant. FreeClimb returns an error and ignores any other value. | [optional]
9
- **request_id** | **String** | ID of this request starting with prefix *RQ* followed by 40 hexadecimal characters. FreeClimb logs generated while processing this request include this requestId. If this value is not provided, FreeClimb generates a requestId and returns it as a header in the response (e.g., X-Pulse-Request-Id: <requestId>). | [optional]
10
9
 
11
10
  ## Code Sample
12
11
 
13
12
  ```ruby
14
- require 'Freeclimb'
13
+ require 'freeclimb'
15
14
 
16
- instance = Freeclimb::UpdateConferenceParticipantRequest.new(talk: null,
17
- listen: null,
18
- request_id: null)
15
+ instance = Freeclimb::UpdateConferenceParticipantRequest.new(talk: nil,
16
+ listen: nil)
19
17
  ```
20
18
 
21
19
 
@@ -7,17 +7,15 @@ Name | Type | Description | Notes
7
7
  **_alias** | **String** | Description for this conference. Maximum 64 characters. | [optional]
8
8
  **play_beep** | **String** | Controls when a beep is played. Valid values: `always`, `never`, `entryOnly`, `exitOnly`. | [optional] [default to 'always']
9
9
  **status** | **String** | New status of the conference. Valid values: `empty` or `terminated`. For more information, see **Status Parameter** below.** | [optional]
10
- **request_id** | **String** | ID for this request starting with prefix *RQ* followed by 40 hexadecimal characters. FreeClimb logs generated while processing this request will include this requestId. If it is not provided, FreeClimb will generate a requestId and return it as a header in the response (e.g. X-Pulse-Request-Id: <requestId>). | [optional]
11
10
 
12
11
  ## Code Sample
13
12
 
14
13
  ```ruby
15
- require 'Freeclimb'
14
+ require 'freeclimb'
16
15
 
17
- instance = Freeclimb::UpdateConferenceRequest.new(_alias: null,
18
- play_beep: null,
19
- status: null,
20
- request_id: null)
16
+ instance = Freeclimb::UpdateConferenceRequest.new(_alias: nil,
17
+ play_beep: nil,
18
+ status: nil)
21
19
  ```
22
20
 
23
21
 
@@ -15,11 +15,14 @@ require 'freeclimb/api_client'
15
15
  require 'freeclimb/api_error'
16
16
  require 'freeclimb/version'
17
17
  require 'freeclimb/configuration'
18
- require 'percl/percl'
18
+ require 'freeclimb/models/percl_command'
19
+
19
20
  # Models
20
21
  require 'freeclimb/models/account_request'
21
22
  require 'freeclimb/models/account_result'
22
23
  require 'freeclimb/models/account_result_all_of'
24
+ require 'freeclimb/models/add_to_conference'
25
+ require 'freeclimb/models/add_to_conference_all_of'
23
26
  require 'freeclimb/models/application_list'
24
27
  require 'freeclimb/models/application_list_all_of'
25
28
  require 'freeclimb/models/application_request'
@@ -41,9 +44,17 @@ require 'freeclimb/models/conference_participant_result'
41
44
  require 'freeclimb/models/conference_participant_result_all_of'
42
45
  require 'freeclimb/models/conference_result'
43
46
  require 'freeclimb/models/conference_result_all_of'
47
+ require 'freeclimb/models/create_conference'
48
+ require 'freeclimb/models/create_conference_all_of'
44
49
  require 'freeclimb/models/create_conference_request'
45
- require 'freeclimb/models/dequeue_member_request'
50
+ require 'freeclimb/models/dequeue'
51
+ require 'freeclimb/models/enqueue'
52
+ require 'freeclimb/models/enqueue_all_of'
46
53
  require 'freeclimb/models/filter_logs_request'
54
+ require 'freeclimb/models/get_digits'
55
+ require 'freeclimb/models/get_digits_all_of'
56
+ require 'freeclimb/models/get_speech'
57
+ require 'freeclimb/models/get_speech_all_of'
47
58
  require 'freeclimb/models/incoming_number_list'
48
59
  require 'freeclimb/models/incoming_number_list_all_of'
49
60
  require 'freeclimb/models/incoming_number_request'
@@ -60,7 +71,17 @@ require 'freeclimb/models/message_result_all_of'
60
71
  require 'freeclimb/models/messages_list'
61
72
  require 'freeclimb/models/messages_list_all_of'
62
73
  require 'freeclimb/models/mutable_resource_model'
74
+ require 'freeclimb/models/out_dial'
75
+ require 'freeclimb/models/out_dial_all_of'
63
76
  require 'freeclimb/models/pagination_model'
77
+ require 'freeclimb/models/pause'
78
+ require 'freeclimb/models/pause_all_of'
79
+ require 'freeclimb/models/percl_command'
80
+ require 'freeclimb/models/percl_script'
81
+ require 'freeclimb/models/play'
82
+ require 'freeclimb/models/play_all_of'
83
+ require 'freeclimb/models/play_early_media'
84
+ require 'freeclimb/models/play_early_media_all_of'
64
85
  require 'freeclimb/models/queue_list'
65
86
  require 'freeclimb/models/queue_list_all_of'
66
87
  require 'freeclimb/models/queue_member'
@@ -69,10 +90,29 @@ require 'freeclimb/models/queue_member_list_all_of'
69
90
  require 'freeclimb/models/queue_request'
70
91
  require 'freeclimb/models/queue_result'
71
92
  require 'freeclimb/models/queue_result_all_of'
93
+ require 'freeclimb/models/record_utterance'
94
+ require 'freeclimb/models/record_utterance_all_of'
72
95
  require 'freeclimb/models/recording_list'
73
96
  require 'freeclimb/models/recording_list_all_of'
74
97
  require 'freeclimb/models/recording_result'
75
98
  require 'freeclimb/models/recording_result_all_of'
99
+ require 'freeclimb/models/redirect'
100
+ require 'freeclimb/models/redirect_all_of'
101
+ require 'freeclimb/models/remove_from_conference'
102
+ require 'freeclimb/models/remove_from_conference_all_of'
103
+ require 'freeclimb/models/say'
104
+ require 'freeclimb/models/say_all_of'
105
+ require 'freeclimb/models/send_digits'
106
+ require 'freeclimb/models/send_digits_all_of'
107
+ require 'freeclimb/models/set_listen'
108
+ require 'freeclimb/models/set_listen_all_of'
109
+ require 'freeclimb/models/set_talk'
110
+ require 'freeclimb/models/set_talk_all_of'
111
+ require 'freeclimb/models/sms'
112
+ require 'freeclimb/models/sms_all_of'
113
+ require 'freeclimb/models/start_record_call'
114
+ require 'freeclimb/models/terminate_conference'
115
+ require 'freeclimb/models/terminate_conference_all_of'
76
116
  require 'freeclimb/models/update_call_request'
77
117
  require 'freeclimb/models/update_conference_participant_request'
78
118
  require 'freeclimb/models/update_conference_request'
@@ -96,4 +136,31 @@ module Freeclimb
96
136
  end
97
137
  end
98
138
  end
139
+
140
+ def self.percl_list_to_hash(percl_list)
141
+ percl_list_hash = []
142
+ percl_list.each_with_index do | command, index |
143
+ class_name = command.class.name.split('::').last
144
+ percl_hash = Hash.new
145
+ if command.respond_to?(:prompts) && command.prompts != nil && command.prompts.any?
146
+ percl_hash[class_name] = to_hash_with_prompts(command)
147
+ else
148
+ percl_hash[class_name] = command.to_hash
149
+ end
150
+ percl_list_hash.push(percl_hash)
151
+ end
152
+ percl_list_hash
153
+ end
154
+
155
+ def self.to_hash_with_prompts(command)
156
+ prompts_hash = percl_list_to_hash(command.prompts)
157
+ command.prompts = nil
158
+ hash = command.to_hash
159
+ hash[:prompts] = prompts_hash
160
+ hash
161
+ end
162
+
163
+ def self.percl_to_json(percl_script)
164
+ percl_list_to_hash(percl_script.commands).to_json
165
+ end
99
166
  end
@@ -24,23 +24,81 @@ module Freeclimb
24
24
  @account_id = account_id
25
25
  end
26
26
  end
27
+ # Get an Account
28
+ # @param [Hash] opts the optional parameters
29
+ # @return [AccountResult]
30
+ def get_an_account(opts = {})
31
+ data, _status_code, _headers = get_an_account_with_http_info(opts)
32
+ data
33
+ end
34
+
35
+ # Get an Account
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(AccountResult, Integer, Hash)>] AccountResult data, response status code and response headers
38
+ def get_an_account_with_http_info(opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_an_account ...'
41
+ end
42
+ # resource path
43
+ local_var_path = '/Accounts/{accountId}'.sub('{' + 'accountId' + '}', CGI.escape(@account_id.to_s))
44
+
45
+ # query parameters
46
+ query_params = opts[:query_params] || {}
47
+
48
+ # header parameters
49
+ header_params = opts[:header_params] || {}
50
+ # HTTP header 'Accept' (if needed)
51
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
52
+
53
+ # form parameters
54
+ form_params = opts[:form_params] || {}
55
+
56
+ # http body (model)
57
+ post_body = opts[:body]
58
+
59
+ # return_type
60
+ return_type = opts[:return_type] || 'AccountResult'
61
+
62
+ # auth_names
63
+ auth_names = opts[:auth_names] || ['fc']
64
+
65
+ new_options = opts.merge(
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => return_type
72
+ )
73
+
74
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
75
+ if @api_client.config.debugging
76
+ @api_client.config.logger.debug "API called: DefaultApi#get_an_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
77
+ end
78
+ return data, status_code, headers
79
+ end
80
+
27
81
  # Buy a Phone Number
82
+ # @param buy_incoming_number_request [BuyIncomingNumberRequest] Incoming Number transaction details
28
83
  # @param [Hash] opts the optional parameters
29
- # @option opts [BuyIncomingNumberRequest] :buy_incoming_number_request Incoming Number transaction details
30
84
  # @return [IncomingNumberResult]
31
- def buy_a_phone_number(opts = {})
32
- data, _status_code, _headers = buy_a_phone_number_with_http_info(opts)
85
+ def buy_a_phone_number(buy_incoming_number_request, opts = {})
86
+ data, _status_code, _headers = buy_a_phone_number_with_http_info(buy_incoming_number_request, opts)
33
87
  data
34
88
  end
35
89
 
36
90
  # Buy a Phone Number
91
+ # @param buy_incoming_number_request [BuyIncomingNumberRequest] Incoming Number transaction details
37
92
  # @param [Hash] opts the optional parameters
38
- # @option opts [BuyIncomingNumberRequest] :buy_incoming_number_request Incoming Number transaction details
39
93
  # @return [Array<(IncomingNumberResult, Integer, Hash)>] IncomingNumberResult data, response status code and response headers
40
- def buy_a_phone_number_with_http_info(opts = {})
94
+ def buy_a_phone_number_with_http_info(buy_incoming_number_request, opts = {})
41
95
  if @api_client.config.debugging
42
96
  @api_client.config.logger.debug 'Calling API: DefaultApi.buy_a_phone_number ...'
43
97
  end
98
+ # verify the required parameter 'buy_incoming_number_request' is set
99
+ if @api_client.config.client_side_validation && buy_incoming_number_request.nil?
100
+ fail ArgumentError, "Missing the required parameter 'buy_incoming_number_request' when calling DefaultApi.buy_a_phone_number"
101
+ end
44
102
  # resource path
45
103
  local_var_path = '/Accounts/{accountId}/IncomingPhoneNumbers'.sub('{' + 'accountId' + '}', CGI.escape(@account_id.to_s))
46
104
 
@@ -58,7 +116,7 @@ module Freeclimb
58
116
  form_params = opts[:form_params] || {}
59
117
 
60
118
  # http body (model)
61
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'buy_incoming_number_request'])
119
+ post_body = opts[:body] || @api_client.object_to_http_body(buy_incoming_number_request)
62
120
 
63
121
  # return_type
64
122
  return_type = opts[:return_type] || 'IncomingNumberResult'
@@ -434,7 +492,6 @@ module Freeclimb
434
492
  # @param queue_id [String] String that uniquely identifies the Queue that the Member belongs to.
435
493
  # @param call_id [String] ID if the Call that the Member belongs to
436
494
  # @param [Hash] opts the optional parameters
437
- # @option opts [DequeueMemberRequest] :dequeue_member_request Dequeue member request details
438
495
  # @return [QueueMember]
439
496
  def dequeue_a_member(queue_id, call_id, opts = {})
440
497
  data, _status_code, _headers = dequeue_a_member_with_http_info(queue_id, call_id, opts)
@@ -445,7 +502,6 @@ module Freeclimb
445
502
  # @param queue_id [String] String that uniquely identifies the Queue that the Member belongs to.
446
503
  # @param call_id [String] ID if the Call that the Member belongs to
447
504
  # @param [Hash] opts the optional parameters
448
- # @option opts [DequeueMemberRequest] :dequeue_member_request Dequeue member request details
449
505
  # @return [Array<(QueueMember, Integer, Hash)>] QueueMember data, response status code and response headers
450
506
  def dequeue_a_member_with_http_info(queue_id, call_id, opts = {})
451
507
  if @api_client.config.debugging
@@ -469,14 +525,12 @@ module Freeclimb
469
525
  header_params = opts[:header_params] || {}
470
526
  # HTTP header 'Accept' (if needed)
471
527
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
472
- # HTTP header 'Content-Type'
473
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
474
528
 
475
529
  # form parameters
476
530
  form_params = opts[:form_params] || {}
477
531
 
478
532
  # http body (model)
479
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'dequeue_member_request'])
533
+ post_body = opts[:body]
480
534
 
481
535
  # return_type
482
536
  return_type = opts[:return_type] || 'QueueMember'
@@ -503,7 +557,6 @@ module Freeclimb
503
557
  # Dequeue Head Member
504
558
  # @param queue_id [String] String that uniquely identifies this queue resource.
505
559
  # @param [Hash] opts the optional parameters
506
- # @option opts [DequeueMemberRequest] :dequeue_member_request Dequeue head member request details
507
560
  # @return [QueueMember]
508
561
  def dequeue_head_member(queue_id, opts = {})
509
562
  data, _status_code, _headers = dequeue_head_member_with_http_info(queue_id, opts)
@@ -513,7 +566,6 @@ module Freeclimb
513
566
  # Dequeue Head Member
514
567
  # @param queue_id [String] String that uniquely identifies this queue resource.
515
568
  # @param [Hash] opts the optional parameters
516
- # @option opts [DequeueMemberRequest] :dequeue_member_request Dequeue head member request details
517
569
  # @return [Array<(QueueMember, Integer, Hash)>] QueueMember data, response status code and response headers
518
570
  def dequeue_head_member_with_http_info(queue_id, opts = {})
519
571
  if @api_client.config.debugging
@@ -533,14 +585,12 @@ module Freeclimb
533
585
  header_params = opts[:header_params] || {}
534
586
  # HTTP header 'Accept' (if needed)
535
587
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
536
- # HTTP header 'Content-Type'
537
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
538
588
 
539
589
  # form parameters
540
590
  form_params = opts[:form_params] || {}
541
591
 
542
592
  # http body (model)
543
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'dequeue_member_request'])
593
+ post_body = opts[:body]
544
594
 
545
595
  # return_type
546
596
  return_type = opts[:return_type] || 'QueueMember'
@@ -625,22 +675,26 @@ module Freeclimb
625
675
  end
626
676
 
627
677
  # Filter Logs
678
+ # @param filter_logs_request [FilterLogsRequest] Filter logs request paramters
628
679
  # @param [Hash] opts the optional parameters
629
- # @option opts [FilterLogsRequest] :filter_logs_request Filter logs request paramters
630
680
  # @return [LogList]
631
- def filter_logs(opts = {})
632
- data, _status_code, _headers = filter_logs_with_http_info(opts)
681
+ def filter_logs(filter_logs_request, opts = {})
682
+ data, _status_code, _headers = filter_logs_with_http_info(filter_logs_request, opts)
633
683
  data
634
684
  end
635
685
 
636
686
  # Filter Logs
687
+ # @param filter_logs_request [FilterLogsRequest] Filter logs request paramters
637
688
  # @param [Hash] opts the optional parameters
638
- # @option opts [FilterLogsRequest] :filter_logs_request Filter logs request paramters
639
689
  # @return [Array<(LogList, Integer, Hash)>] LogList data, response status code and response headers
640
- def filter_logs_with_http_info(opts = {})
690
+ def filter_logs_with_http_info(filter_logs_request, opts = {})
641
691
  if @api_client.config.debugging
642
692
  @api_client.config.logger.debug 'Calling API: DefaultApi.filter_logs ...'
643
693
  end
694
+ # verify the required parameter 'filter_logs_request' is set
695
+ if @api_client.config.client_side_validation && filter_logs_request.nil?
696
+ fail ArgumentError, "Missing the required parameter 'filter_logs_request' when calling DefaultApi.filter_logs"
697
+ end
644
698
  # resource path
645
699
  local_var_path = '/Accounts/{accountId}/Logs'.sub('{' + 'accountId' + '}', CGI.escape(@account_id.to_s))
646
700
 
@@ -658,7 +712,7 @@ module Freeclimb
658
712
  form_params = opts[:form_params] || {}
659
713
 
660
714
  # http body (model)
661
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'filter_logs_request'])
715
+ post_body = opts[:body] || @api_client.object_to_http_body(filter_logs_request)
662
716
 
663
717
  # return_type
664
718
  return_type = opts[:return_type] || 'LogList'
@@ -1054,60 +1108,6 @@ module Freeclimb
1054
1108
  return data, status_code, headers
1055
1109
  end
1056
1110
 
1057
- # Get an Account
1058
- # @param [Hash] opts the optional parameters
1059
- # @return [AccountResult]
1060
- def get_an_account(opts = {})
1061
- data, _status_code, _headers = get_an_account_with_http_info(opts)
1062
- data
1063
- end
1064
-
1065
- # Get an Account
1066
- # @param [Hash] opts the optional parameters
1067
- # @return [Array<(AccountResult, Integer, Hash)>] AccountResult data, response status code and response headers
1068
- def get_an_account_with_http_info(opts = {})
1069
- if @api_client.config.debugging
1070
- @api_client.config.logger.debug 'Calling API: DefaultApi.get_an_account ...'
1071
- end
1072
- # resource path
1073
- local_var_path = '/Accounts/{accountId}'.sub('{' + 'accountId' + '}', CGI.escape(@account_id.to_s))
1074
-
1075
- # query parameters
1076
- query_params = opts[:query_params] || {}
1077
-
1078
- # header parameters
1079
- header_params = opts[:header_params] || {}
1080
- # HTTP header 'Accept' (if needed)
1081
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1082
-
1083
- # form parameters
1084
- form_params = opts[:form_params] || {}
1085
-
1086
- # http body (model)
1087
- post_body = opts[:body]
1088
-
1089
- # return_type
1090
- return_type = opts[:return_type] || 'AccountResult'
1091
-
1092
- # auth_names
1093
- auth_names = opts[:auth_names] || ['fc']
1094
-
1095
- new_options = opts.merge(
1096
- :header_params => header_params,
1097
- :query_params => query_params,
1098
- :form_params => form_params,
1099
- :body => post_body,
1100
- :auth_names => auth_names,
1101
- :return_type => return_type
1102
- )
1103
-
1104
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1105
- if @api_client.config.debugging
1106
- @api_client.config.logger.debug "API called: DefaultApi#get_an_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1107
- end
1108
- return data, status_code, headers
1109
- end
1110
-
1111
1111
  # Get an Application
1112
1112
  # @param application_id [String] A string that uniquely identifies this application resource.
1113
1113
  # @param [Hash] opts the optional parameters
@@ -2281,22 +2281,26 @@ module Freeclimb
2281
2281
  end
2282
2282
 
2283
2283
  # Send an SMS Message
2284
+ # @param message_request [MessageRequest] Details to create a message
2284
2285
  # @param [Hash] opts the optional parameters
2285
- # @option opts [MessageRequest] :message_request Details to create a message
2286
2286
  # @return [MessageResult]
2287
- def send_an_sms_message(opts = {})
2288
- data, _status_code, _headers = send_an_sms_message_with_http_info(opts)
2287
+ def send_an_sms_message(message_request, opts = {})
2288
+ data, _status_code, _headers = send_an_sms_message_with_http_info(message_request, opts)
2289
2289
  data
2290
2290
  end
2291
2291
 
2292
2292
  # Send an SMS Message
2293
+ # @param message_request [MessageRequest] Details to create a message
2293
2294
  # @param [Hash] opts the optional parameters
2294
- # @option opts [MessageRequest] :message_request Details to create a message
2295
2295
  # @return [Array<(MessageResult, Integer, Hash)>] MessageResult data, response status code and response headers
2296
- def send_an_sms_message_with_http_info(opts = {})
2296
+ def send_an_sms_message_with_http_info(message_request, opts = {})
2297
2297
  if @api_client.config.debugging
2298
2298
  @api_client.config.logger.debug 'Calling API: DefaultApi.send_an_sms_message ...'
2299
2299
  end
2300
+ # verify the required parameter 'message_request' is set
2301
+ if @api_client.config.client_side_validation && message_request.nil?
2302
+ fail ArgumentError, "Missing the required parameter 'message_request' when calling DefaultApi.send_an_sms_message"
2303
+ end
2300
2304
  # resource path
2301
2305
  local_var_path = '/Accounts/{accountId}/Messages'.sub('{' + 'accountId' + '}', CGI.escape(@account_id.to_s))
2302
2306
 
@@ -2314,7 +2318,7 @@ module Freeclimb
2314
2318
  form_params = opts[:form_params] || {}
2315
2319
 
2316
2320
  # http body (model)
2317
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'message_request'])
2321
+ post_body = opts[:body] || @api_client.object_to_http_body(message_request)
2318
2322
 
2319
2323
  # return_type
2320
2324
  return_type = opts[:return_type] || 'MessageResult'
@@ -2464,20 +2468,20 @@ module Freeclimb
2464
2468
 
2465
2469
  # Update a Live Call
2466
2470
  # @param call_id [String] String that uniquely identifies this call resource.
2471
+ # @param update_call_request [UpdateCallRequest] Call details to update
2467
2472
  # @param [Hash] opts the optional parameters
2468
- # @option opts [UpdateCallRequest] :update_call_request Call details to update
2469
2473
  # @return [nil]
2470
- def update_a_live_call(call_id, opts = {})
2471
- update_a_live_call_with_http_info(call_id, opts)
2474
+ def update_a_live_call(call_id, update_call_request, opts = {})
2475
+ update_a_live_call_with_http_info(call_id, update_call_request, opts)
2472
2476
  nil
2473
2477
  end
2474
2478
 
2475
2479
  # Update a Live Call
2476
2480
  # @param call_id [String] String that uniquely identifies this call resource.
2481
+ # @param update_call_request [UpdateCallRequest] Call details to update
2477
2482
  # @param [Hash] opts the optional parameters
2478
- # @option opts [UpdateCallRequest] :update_call_request Call details to update
2479
2483
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2480
- def update_a_live_call_with_http_info(call_id, opts = {})
2484
+ def update_a_live_call_with_http_info(call_id, update_call_request, opts = {})
2481
2485
  if @api_client.config.debugging
2482
2486
  @api_client.config.logger.debug 'Calling API: DefaultApi.update_a_live_call ...'
2483
2487
  end
@@ -2485,6 +2489,10 @@ module Freeclimb
2485
2489
  if @api_client.config.client_side_validation && call_id.nil?
2486
2490
  fail ArgumentError, "Missing the required parameter 'call_id' when calling DefaultApi.update_a_live_call"
2487
2491
  end
2492
+ # verify the required parameter 'update_call_request' is set
2493
+ if @api_client.config.client_side_validation && update_call_request.nil?
2494
+ fail ArgumentError, "Missing the required parameter 'update_call_request' when calling DefaultApi.update_a_live_call"
2495
+ end
2488
2496
  # resource path
2489
2497
  local_var_path = '/Accounts/{accountId}/Calls/{callId}'.sub('{' + 'accountId' + '}', CGI.escape(@account_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s))
2490
2498
 
@@ -2500,7 +2508,7 @@ module Freeclimb
2500
2508
  form_params = opts[:form_params] || {}
2501
2509
 
2502
2510
  # http body (model)
2503
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'update_call_request'])
2511
+ post_body = opts[:body] || @api_client.object_to_http_body(update_call_request)
2504
2512
 
2505
2513
  # return_type
2506
2514
  return_type = opts[:return_type]