freeclimb 1.0.1 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (207) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +80 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +67 -42
  5. data/docs/AccountRequest.md +3 -5
  6. data/docs/AccountResult.md +12 -12
  7. data/docs/AccountResultAllOf.md +8 -8
  8. data/docs/AddToConference.md +35 -0
  9. data/docs/AddToConferenceAllOf.md +35 -0
  10. data/docs/ApplicationList.md +9 -9
  11. data/docs/ApplicationListAllOf.md +2 -2
  12. data/docs/ApplicationRequest.md +8 -10
  13. data/docs/ApplicationResult.md +14 -14
  14. data/docs/ApplicationResultAllOf.md +10 -10
  15. data/docs/AvailableNumber.md +7 -7
  16. data/docs/AvailableNumberList.md +9 -9
  17. data/docs/AvailableNumberListAllOf.md +2 -2
  18. data/docs/BuyIncomingNumberRequest.md +4 -6
  19. data/docs/CallList.md +9 -9
  20. data/docs/CallListAllOf.md +2 -2
  21. data/docs/CallResult.md +20 -20
  22. data/docs/CallResultAllOf.md +16 -16
  23. data/docs/ConferenceList.md +9 -9
  24. data/docs/ConferenceListAllOf.md +2 -2
  25. data/docs/ConferenceParticipantList.md +9 -9
  26. data/docs/ConferenceParticipantListAllOf.md +2 -2
  27. data/docs/ConferenceParticipantResult.md +11 -11
  28. data/docs/ConferenceParticipantResultAllOf.md +7 -7
  29. data/docs/ConferenceResult.md +15 -15
  30. data/docs/ConferenceResultAllOf.md +11 -11
  31. data/docs/CreateConference.md +27 -0
  32. data/docs/CreateConferenceAllOf.md +27 -0
  33. data/docs/CreateConferenceRequest.md +6 -8
  34. data/docs/DefaultApi.md +22 -38
  35. data/docs/Dequeue.md +16 -0
  36. data/docs/Enqueue.md +23 -0
  37. data/docs/EnqueueAllOf.md +23 -0
  38. data/docs/FilterLogsRequest.md +2 -4
  39. data/docs/GetDigits.md +33 -0
  40. data/docs/GetDigitsAllOf.md +33 -0
  41. data/docs/GetSpeech.md +41 -0
  42. data/docs/GetSpeechAllOf.md +41 -0
  43. data/docs/IncomingNumberList.md +9 -9
  44. data/docs/IncomingNumberListAllOf.md +2 -2
  45. data/docs/IncomingNumberRequest.md +3 -5
  46. data/docs/IncomingNumberResult.md +14 -14
  47. data/docs/IncomingNumberResultAllOf.md +10 -10
  48. data/docs/LogList.md +9 -9
  49. data/docs/LogListAllOf.md +2 -2
  50. data/docs/LogResult.md +8 -8
  51. data/docs/MakeCallRequest.md +11 -11
  52. data/docs/MessageRequest.md +10 -12
  53. data/docs/MessageRequestAllOf.md +6 -8
  54. data/docs/MessageResult.md +14 -14
  55. data/docs/MessageResultAllOf.md +10 -10
  56. data/docs/MessagesList.md +9 -9
  57. data/docs/MessagesListAllOf.md +2 -2
  58. data/docs/MutableResourceModel.md +5 -5
  59. data/docs/OutDial.md +35 -0
  60. data/docs/OutDialAllOf.md +35 -0
  61. data/docs/PaginationModel.md +8 -8
  62. data/docs/Pause.md +17 -0
  63. data/docs/PauseAllOf.md +17 -0
  64. data/docs/PerclCommand.md +17 -0
  65. data/docs/PerclScript.md +17 -0
  66. data/docs/Play.md +23 -0
  67. data/docs/PlayAllOf.md +23 -0
  68. data/docs/PlayEarlyMedia.md +17 -0
  69. data/docs/PlayEarlyMediaAllOf.md +17 -0
  70. data/docs/QueueList.md +9 -9
  71. data/docs/QueueListAllOf.md +2 -2
  72. data/docs/QueueMember.md +6 -6
  73. data/docs/QueueMemberList.md +9 -9
  74. data/docs/QueueMemberListAllOf.md +2 -2
  75. data/docs/QueueRequest.md +3 -5
  76. data/docs/QueueResult.md +12 -12
  77. data/docs/QueueResultAllOf.md +8 -8
  78. data/docs/RecordUtterance.md +27 -0
  79. data/docs/RecordUtteranceAllOf.md +27 -0
  80. data/docs/RecordingList.md +9 -9
  81. data/docs/RecordingListAllOf.md +2 -2
  82. data/docs/RecordingResult.md +10 -10
  83. data/docs/RecordingResultAllOf.md +6 -6
  84. data/docs/Redirect.md +17 -0
  85. data/docs/RedirectAllOf.md +17 -0
  86. data/docs/RemoveFromConference.md +17 -0
  87. data/docs/RemoveFromConferenceAllOf.md +17 -0
  88. data/docs/Say.md +25 -0
  89. data/docs/SayAllOf.md +25 -0
  90. data/docs/SendDigits.md +21 -0
  91. data/docs/SendDigitsAllOf.md +21 -0
  92. data/docs/SetListen.md +19 -0
  93. data/docs/SetListenAllOf.md +19 -0
  94. data/docs/SetTalk.md +19 -0
  95. data/docs/SetTalkAllOf.md +19 -0
  96. data/docs/Sms.md +23 -0
  97. data/docs/SmsAllOf.md +23 -0
  98. data/docs/StartRecordCall.md +16 -0
  99. data/docs/TerminateConference.md +17 -0
  100. data/docs/TerminateConferenceAllOf.md +17 -0
  101. data/docs/UpdateCallRequest.md +2 -4
  102. data/docs/UpdateConferenceParticipantRequest.md +3 -5
  103. data/docs/UpdateConferenceRequest.md +4 -6
  104. data/freeclimb-2.1.0.gem +0 -0
  105. data/lib/freeclimb.rb +69 -2
  106. data/lib/freeclimb/api/default_api.rb +42 -34
  107. data/lib/freeclimb/api_client.rb +1 -1
  108. data/lib/freeclimb/models/account_request.rb +4 -14
  109. data/lib/freeclimb/models/add_to_conference.rb +320 -0
  110. data/lib/freeclimb/models/add_to_conference_all_of.rb +307 -0
  111. data/lib/freeclimb/models/application_request.rb +4 -14
  112. data/lib/freeclimb/models/buy_incoming_number_request.rb +4 -14
  113. data/lib/freeclimb/models/create_conference.rb +275 -0
  114. data/lib/freeclimb/models/create_conference_all_of.rb +262 -0
  115. data/lib/freeclimb/models/create_conference_request.rb +4 -14
  116. data/lib/freeclimb/models/dequeue.rb +209 -0
  117. data/lib/freeclimb/models/enqueue.rb +265 -0
  118. data/lib/freeclimb/models/enqueue_all_of.rb +252 -0
  119. data/lib/freeclimb/models/filter_logs_request.rb +4 -14
  120. data/lib/freeclimb/models/get_digits.rb +307 -0
  121. data/lib/freeclimb/models/get_digits_all_of.rb +294 -0
  122. data/lib/freeclimb/models/get_speech.rb +352 -0
  123. data/lib/freeclimb/models/get_speech_all_of.rb +339 -0
  124. data/lib/freeclimb/models/incoming_number_request.rb +4 -14
  125. data/lib/freeclimb/models/make_call_request.rb +14 -14
  126. data/lib/freeclimb/models/message_request.rb +1 -11
  127. data/lib/freeclimb/models/message_request_all_of.rb +1 -11
  128. data/lib/freeclimb/models/message_result.rb +3 -3
  129. data/lib/freeclimb/models/message_result_all_of.rb +3 -3
  130. data/lib/freeclimb/models/out_dial.rb +330 -0
  131. data/lib/freeclimb/models/out_dial_all_of.rb +317 -0
  132. data/lib/freeclimb/models/pause.rb +225 -0
  133. data/lib/freeclimb/models/{dequeue_member_request.rb → pause_all_of.rb} +16 -11
  134. data/lib/freeclimb/models/percl_command.rb +211 -0
  135. data/lib/freeclimb/models/percl_script.rb +210 -0
  136. data/lib/freeclimb/models/play.rb +255 -0
  137. data/lib/freeclimb/models/play_all_of.rb +242 -0
  138. data/lib/freeclimb/models/play_early_media.rb +225 -0
  139. data/lib/freeclimb/models/play_early_media_all_of.rb +212 -0
  140. data/lib/freeclimb/models/queue_request.rb +4 -14
  141. data/lib/freeclimb/models/record_utterance.rb +275 -0
  142. data/lib/freeclimb/models/record_utterance_all_of.rb +262 -0
  143. data/lib/freeclimb/models/redirect.rb +220 -0
  144. data/lib/freeclimb/models/redirect_all_of.rb +207 -0
  145. data/lib/freeclimb/models/remove_from_conference.rb +225 -0
  146. data/lib/freeclimb/models/remove_from_conference_all_of.rb +212 -0
  147. data/lib/freeclimb/models/say.rb +265 -0
  148. data/lib/freeclimb/models/say_all_of.rb +252 -0
  149. data/lib/freeclimb/models/send_digits.rb +245 -0
  150. data/lib/freeclimb/models/send_digits_all_of.rb +232 -0
  151. data/lib/freeclimb/models/set_listen.rb +235 -0
  152. data/lib/freeclimb/models/set_listen_all_of.rb +222 -0
  153. data/lib/freeclimb/models/set_talk.rb +235 -0
  154. data/lib/freeclimb/models/set_talk_all_of.rb +222 -0
  155. data/lib/freeclimb/models/sms.rb +265 -0
  156. data/lib/freeclimb/models/sms_all_of.rb +252 -0
  157. data/lib/freeclimb/models/start_record_call.rb +209 -0
  158. data/lib/freeclimb/models/terminate_conference.rb +225 -0
  159. data/lib/freeclimb/models/terminate_conference_all_of.rb +212 -0
  160. data/lib/freeclimb/models/update_call_request.rb +4 -14
  161. data/lib/freeclimb/models/update_conference_participant_request.rb +4 -14
  162. data/lib/freeclimb/models/update_conference_request.rb +4 -14
  163. data/lib/freeclimb/version.rb +1 -1
  164. data/spec/api/default_api_spec.rb +9 -24
  165. data/spec/models/add_to_conference_spec.rb +95 -0
  166. data/spec/models/create_conference_spec.rb +71 -0
  167. data/spec/models/{dequeue_member_request_spec.rb → dequeue_spec.rb} +8 -7
  168. data/spec/models/enqueue_spec.rb +59 -0
  169. data/spec/models/get_digits_spec.rb +83 -0
  170. data/spec/models/get_speech_spec.rb +113 -0
  171. data/spec/models/out_dial_spec.rb +89 -0
  172. data/spec/models/pause_spec.rb +41 -0
  173. data/spec/models/percl_command_spec.rb +41 -0
  174. data/spec/models/percl_script_spec.rb +41 -0
  175. data/spec/models/play_early_media_spec.rb +41 -0
  176. data/spec/models/play_spec.rb +53 -0
  177. data/spec/models/record_utterance_spec.rb +71 -0
  178. data/spec/models/redirect_spec.rb +41 -0
  179. data/spec/models/remove_from_conference_spec.rb +41 -0
  180. data/spec/models/say_spec.rb +65 -0
  181. data/spec/models/send_digits_spec.rb +47 -0
  182. data/spec/models/set_listen_spec.rb +47 -0
  183. data/spec/models/set_talk_spec.rb +47 -0
  184. data/spec/models/sms_spec.rb +59 -0
  185. data/spec/models/start_record_call_spec.rb +35 -0
  186. data/spec/models/terminate_conference_spec.rb +41 -0
  187. metadata +128 -34
  188. data/docs/DequeueMemberRequest.md +0 -17
  189. data/docs/Percl.md +0 -697
  190. data/lib/percl/calls.rb +0 -43
  191. data/lib/percl/conference_participants.rb +0 -40
  192. data/lib/percl/conferences.rb +0 -21
  193. data/lib/percl/ivr.rb +0 -63
  194. data/lib/percl/jsonable.rb +0 -23
  195. data/lib/percl/percl.rb +0 -29
  196. data/lib/percl/queue_members.rb +0 -15
  197. data/lib/percl/recordings.rb +0 -15
  198. data/lib/percl/sms.rb +0 -11
  199. data/spec/percl/calls_spec.rb +0 -111
  200. data/spec/percl/conference_participant_spec.rb +0 -96
  201. data/spec/percl/conference_spec.rb +0 -46
  202. data/spec/percl/ivr_spec.rb +0 -155
  203. data/spec/percl/jsonable_spec.rb +0 -28
  204. data/spec/percl/percl_spec.rb +0 -31
  205. data/spec/percl/queue_members_spec.rb +0 -35
  206. data/spec/percl/recordings_spec.rb +0 -32
  207. data/spec/percl/sms_spec.rb +0 -29
@@ -0,0 +1,339 @@
1
+ =begin
2
+ #FreeClimb API
3
+
4
+ #FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module Freeclimb
16
+ class GetSpeechAllOf
17
+ # When the caller has finished speaking or the command has timed out, FreeClimb will make a POST request to this URL. A PerCL response is expected to continue handling the call.
18
+ attr_accessor :action_url
19
+
20
+ # The grammar file type to use for speech recognition. A value of 'URL' indicates the grammarFile attribute specifies a URL that points to the grammar file. A value of `BUILTIN` indicates the grammarFile attribute specifies the name of one of the platform built-in grammar files.
21
+ attr_accessor :grammar_type
22
+
23
+ # The grammar file to use for speech recognition. If grammarType is set to URL, this attribute is specified as a download URL.
24
+ attr_accessor :grammar_file
25
+
26
+ # The grammar rule within the specified grammar file to use for speech recognition. This attribute is optional if `grammarType` is `URL` and ignored if `grammarType` is `BUILTIN`.
27
+ attr_accessor :grammar_rule
28
+
29
+ # Indicates whether a beep should be played just before speech recognition is initiated so that the speaker can start to speak.
30
+ attr_accessor :play_beep
31
+
32
+ # The JSON array of PerCL commands to nest within the `GetSpeech` command. The `Say`, `Play`, and `Pause` commands can be used. The nested actions are executed while FreeClimb is waiting for input from the caller. This allows for playing menu options to the caller and to prompt for the expected input. These commands stop executing when the caller begins to input speech.
33
+ attr_accessor :prompts
34
+
35
+ # When recognition is started and there is no speech detected for `noInputTimeoutMs` milliseconds, the recognizer will terminate the recognition operation.
36
+ attr_accessor :no_input_timeout_ms
37
+
38
+ # When playback of prompts ends and there is no match for `recognitionTimeoutMs` milliseconds, the recognizer will terminate the recognition operation.
39
+ attr_accessor :recognition_timeout_ms
40
+
41
+ # When a recognition resource recognizes a spoken phrase, it associates a confidence level with that match. Parameter `confidenceThreshold` specifies what confidence level is considered a successful match. Values are between 0.0 and 1.0.
42
+ attr_accessor :confidence_threshold
43
+
44
+ # The speech recognizer supports a variable level of sound sensitivity. The sensitivityLevel attribute allows for filtering out background noise, so it is not mistaken for speech. Values are between 0.0 and 1.0
45
+ attr_accessor :sensitivity_level
46
+
47
+ # Parameter `speechCompleteTimeoutMs` specifies the length of silence required following user speech before the speech recognizer finalizes a result. This timeout applies when the recognizer currently has a complete match against an active grammar. Reasonable speech complete timeout values are typically in the range of 0.3 seconds to 1.0 seconds.
48
+ attr_accessor :speech_complete_timeout_ms
49
+
50
+ # Parameter `speechIncompleteTimeoutMs` specifies the length of silence following user speech after which a recognizer finalizes a result. This timeout applies when the speech prior to the silence is an incomplete match of all active grammars. Timeout `speechIncompleteTimeoutMs` is usually longer than `speechCompleteTimeoutMs` to allow users to pause mid-utterance.
51
+ attr_accessor :speech_incomplete_timeout_ms
52
+
53
+ # Parameter privacyMode will not log the `text` as required by PCI compliance.
54
+ attr_accessor :privacy_mode
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ {
59
+ :'action_url' => :'actionUrl',
60
+ :'grammar_type' => :'grammarType',
61
+ :'grammar_file' => :'grammarFile',
62
+ :'grammar_rule' => :'grammarRule',
63
+ :'play_beep' => :'playBeep',
64
+ :'prompts' => :'prompts',
65
+ :'no_input_timeout_ms' => :'noInputTimeoutMs',
66
+ :'recognition_timeout_ms' => :'recognitionTimeoutMs',
67
+ :'confidence_threshold' => :'confidenceThreshold',
68
+ :'sensitivity_level' => :'sensitivityLevel',
69
+ :'speech_complete_timeout_ms' => :'speechCompleteTimeoutMs',
70
+ :'speech_incomplete_timeout_ms' => :'speechIncompleteTimeoutMs',
71
+ :'privacy_mode' => :'privacyMode'
72
+ }
73
+ end
74
+
75
+ # Attribute type mapping.
76
+ def self.openapi_types
77
+ {
78
+ :'action_url' => :'String',
79
+ :'grammar_type' => :'Integer',
80
+ :'grammar_file' => :'String',
81
+ :'grammar_rule' => :'Boolean',
82
+ :'play_beep' => :'String',
83
+ :'prompts' => :'Array<PerclCommand>',
84
+ :'no_input_timeout_ms' => :'Integer',
85
+ :'recognition_timeout_ms' => :'Integer',
86
+ :'confidence_threshold' => :'Float',
87
+ :'sensitivity_level' => :'Float',
88
+ :'speech_complete_timeout_ms' => :'Integer',
89
+ :'speech_incomplete_timeout_ms' => :'Integer',
90
+ :'privacy_mode' => :'Boolean'
91
+ }
92
+ end
93
+
94
+ # List of attributes with nullable: true
95
+ def self.openapi_nullable
96
+ Set.new([
97
+ ])
98
+ end
99
+
100
+ # Initializes the object
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ def initialize(attributes = {})
103
+ if (!attributes.is_a?(Hash))
104
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::GetSpeechAllOf` initialize method"
105
+ end
106
+
107
+ # check to see if the attribute exists and convert string to symbol for hash key
108
+ attributes = attributes.each_with_object({}) { |(k, v), h|
109
+ if (!self.class.attribute_map.key?(k.to_sym))
110
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::GetSpeechAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
111
+ end
112
+ h[k.to_sym] = v
113
+ }
114
+
115
+ if attributes.key?(:'action_url')
116
+ self.action_url = attributes[:'action_url']
117
+ end
118
+
119
+ if attributes.key?(:'grammar_type')
120
+ self.grammar_type = attributes[:'grammar_type']
121
+ end
122
+
123
+ if attributes.key?(:'grammar_file')
124
+ self.grammar_file = attributes[:'grammar_file']
125
+ end
126
+
127
+ if attributes.key?(:'grammar_rule')
128
+ self.grammar_rule = attributes[:'grammar_rule']
129
+ end
130
+
131
+ if attributes.key?(:'play_beep')
132
+ self.play_beep = attributes[:'play_beep']
133
+ end
134
+
135
+ if attributes.key?(:'prompts')
136
+ if (value = attributes[:'prompts']).is_a?(Array)
137
+ self.prompts = value
138
+ end
139
+ end
140
+
141
+ if attributes.key?(:'no_input_timeout_ms')
142
+ self.no_input_timeout_ms = attributes[:'no_input_timeout_ms']
143
+ end
144
+
145
+ if attributes.key?(:'recognition_timeout_ms')
146
+ self.recognition_timeout_ms = attributes[:'recognition_timeout_ms']
147
+ end
148
+
149
+ if attributes.key?(:'confidence_threshold')
150
+ self.confidence_threshold = attributes[:'confidence_threshold']
151
+ end
152
+
153
+ if attributes.key?(:'sensitivity_level')
154
+ self.sensitivity_level = attributes[:'sensitivity_level']
155
+ end
156
+
157
+ if attributes.key?(:'speech_complete_timeout_ms')
158
+ self.speech_complete_timeout_ms = attributes[:'speech_complete_timeout_ms']
159
+ end
160
+
161
+ if attributes.key?(:'speech_incomplete_timeout_ms')
162
+ self.speech_incomplete_timeout_ms = attributes[:'speech_incomplete_timeout_ms']
163
+ end
164
+
165
+ if attributes.key?(:'privacy_mode')
166
+ self.privacy_mode = attributes[:'privacy_mode']
167
+ end
168
+ end
169
+
170
+ # Show invalid properties with the reasons. Usually used together with valid?
171
+ # @return Array for valid properties with the reasons
172
+ def list_invalid_properties
173
+ invalid_properties = Array.new
174
+ if @action_url.nil?
175
+ invalid_properties.push('invalid value for "action_url", action_url cannot be nil.')
176
+ end
177
+
178
+ if @grammar_file.nil?
179
+ invalid_properties.push('invalid value for "grammar_file", grammar_file cannot be nil.')
180
+ end
181
+
182
+ invalid_properties
183
+ end
184
+
185
+ # Check to see if the all the properties in the model are valid
186
+ # @return true if the model is valid
187
+ def valid?
188
+ return false if @action_url.nil?
189
+ return false if @grammar_file.nil?
190
+ true
191
+ end
192
+
193
+ # Checks equality by comparing each attribute.
194
+ # @param [Object] Object to be compared
195
+ def ==(o)
196
+ return true if self.equal?(o)
197
+ self.class == o.class &&
198
+ action_url == o.action_url &&
199
+ grammar_type == o.grammar_type &&
200
+ grammar_file == o.grammar_file &&
201
+ grammar_rule == o.grammar_rule &&
202
+ play_beep == o.play_beep &&
203
+ prompts == o.prompts &&
204
+ no_input_timeout_ms == o.no_input_timeout_ms &&
205
+ recognition_timeout_ms == o.recognition_timeout_ms &&
206
+ confidence_threshold == o.confidence_threshold &&
207
+ sensitivity_level == o.sensitivity_level &&
208
+ speech_complete_timeout_ms == o.speech_complete_timeout_ms &&
209
+ speech_incomplete_timeout_ms == o.speech_incomplete_timeout_ms &&
210
+ privacy_mode == o.privacy_mode
211
+ end
212
+
213
+ # @see the `==` method
214
+ # @param [Object] Object to be compared
215
+ def eql?(o)
216
+ self == o
217
+ end
218
+
219
+ # Calculates hash code according to all attributes.
220
+ # @return [Integer] Hash code
221
+ def hash
222
+ [action_url, grammar_type, grammar_file, grammar_rule, play_beep, prompts, no_input_timeout_ms, recognition_timeout_ms, confidence_threshold, sensitivity_level, speech_complete_timeout_ms, speech_incomplete_timeout_ms, privacy_mode].hash
223
+ end
224
+
225
+ # Builds the object from hash
226
+ # @param [Hash] attributes Model attributes in the form of hash
227
+ # @return [Object] Returns the model itself
228
+ def self.build_from_hash(attributes)
229
+ new.build_from_hash(attributes)
230
+ end
231
+
232
+ # Builds the object from hash
233
+ # @param [Hash] attributes Model attributes in the form of hash
234
+ # @return [Object] Returns the model itself
235
+ def build_from_hash(attributes)
236
+ return nil unless attributes.is_a?(Hash)
237
+ self.class.openapi_types.each_pair do |key, type|
238
+ if type =~ /\AArray<(.*)>/i
239
+ # check to ensure the input is an array given that the attribute
240
+ # is documented as an array but the input is not
241
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
242
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
243
+ end
244
+ elsif !attributes[self.class.attribute_map[key]].nil?
245
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
246
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
247
+ end
248
+
249
+ self
250
+ end
251
+
252
+ # Deserializes the data based on type
253
+ # @param string type Data type
254
+ # @param string value Value to be deserialized
255
+ # @return [Object] Deserialized data
256
+ def _deserialize(type, value)
257
+ case type.to_sym
258
+ when :DateTime
259
+ DateTime.parse(value)
260
+ when :Date
261
+ Date.parse(value)
262
+ when :String
263
+ value.to_s
264
+ when :Integer
265
+ value.to_i
266
+ when :Float
267
+ value.to_f
268
+ when :Boolean
269
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
270
+ true
271
+ else
272
+ false
273
+ end
274
+ when :Object
275
+ # generic object (usually a Hash), return directly
276
+ value
277
+ when /\AArray<(?<inner_type>.+)>\z/
278
+ inner_type = Regexp.last_match[:inner_type]
279
+ value.map { |v| _deserialize(inner_type, v) }
280
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
281
+ k_type = Regexp.last_match[:k_type]
282
+ v_type = Regexp.last_match[:v_type]
283
+ {}.tap do |hash|
284
+ value.each do |k, v|
285
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
286
+ end
287
+ end
288
+ else # model
289
+ Freeclimb.const_get(type).build_from_hash(value)
290
+ end
291
+ end
292
+
293
+ # Returns the string representation of the object
294
+ # @return [String] String presentation of the object
295
+ def to_s
296
+ to_hash.to_s
297
+ end
298
+
299
+ # to_body is an alias to to_hash (backward compatibility)
300
+ # @return [Hash] Returns the object in the form of hash
301
+ def to_body
302
+ to_hash
303
+ end
304
+
305
+ # Returns the object in the form of hash
306
+ # @return [Hash] Returns the object in the form of hash
307
+ def to_hash
308
+ hash = {}
309
+ self.class.attribute_map.each_pair do |attr, param|
310
+ value = self.send(attr)
311
+ if value.nil?
312
+ is_nullable = self.class.openapi_nullable.include?(attr)
313
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
314
+ end
315
+
316
+ hash[param] = _to_hash(value)
317
+ end
318
+ hash
319
+ end
320
+
321
+ # Outputs non-array value in the form of hash
322
+ # For object, use to_hash. Otherwise, just return the value
323
+ # @param [Object] value Any valid value
324
+ # @return [Hash] Returns the value in the form of hash
325
+ def _to_hash(value)
326
+ if value.is_a?(Array)
327
+ value.compact.map { |v| _to_hash(v) }
328
+ elsif value.is_a?(Hash)
329
+ {}.tap do |hash|
330
+ value.each { |k, v| hash[k] = _to_hash(v) }
331
+ end
332
+ elsif value.respond_to? :to_hash
333
+ value.to_hash
334
+ else
335
+ value
336
+ end
337
+ end
338
+ end
339
+ end
@@ -20,15 +20,11 @@ module Freeclimb
20
20
  # Description for this phone number.
21
21
  attr_accessor :_alias
22
22
 
23
- # RequestId for this request starting with prefix `RQ` followed by 40 hexadecimal characters. FreeClimb logs that are 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>`).
24
- attr_accessor :request_id
25
-
26
23
  # Attribute mapping from ruby-style variable name to JSON key.
27
24
  def self.attribute_map
28
25
  {
29
26
  :'application_id' => :'applicationId',
30
- :'_alias' => :'alias',
31
- :'request_id' => :'requestID'
27
+ :'_alias' => :'alias'
32
28
  }
33
29
  end
34
30
 
@@ -36,8 +32,7 @@ module Freeclimb
36
32
  def self.openapi_types
37
33
  {
38
34
  :'application_id' => :'String',
39
- :'_alias' => :'String',
40
- :'request_id' => :'String'
35
+ :'_alias' => :'String'
41
36
  }
42
37
  end
43
38
 
@@ -69,10 +64,6 @@ module Freeclimb
69
64
  if attributes.key?(:'_alias')
70
65
  self._alias = attributes[:'_alias']
71
66
  end
72
-
73
- if attributes.key?(:'request_id')
74
- self.request_id = attributes[:'request_id']
75
- end
76
67
  end
77
68
 
78
69
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -94,8 +85,7 @@ module Freeclimb
94
85
  return true if self.equal?(o)
95
86
  self.class == o.class &&
96
87
  application_id == o.application_id &&
97
- _alias == o._alias &&
98
- request_id == o.request_id
88
+ _alias == o._alias
99
89
  end
100
90
 
101
91
  # @see the `==` method
@@ -107,7 +97,7 @@ module Freeclimb
107
97
  # Calculates hash code according to all attributes.
108
98
  # @return [Integer] Hash code
109
99
  def hash
110
- [application_id, _alias, request_id].hash
100
+ [application_id, _alias].hash
111
101
  end
112
102
 
113
103
  # Builds the object from hash
@@ -35,12 +35,12 @@ module Freeclimb
35
35
  # Number of seconds that FreeClimb should allow the phone to ring before assuming there is no answer. Default is 30 seconds. Maximum allowed ring-time is determined by the target phone's provider. Note that most providers limit ring-time to 120 seconds.
36
36
  attr_accessor :timeout
37
37
 
38
- # The 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>`).
39
- attr_accessor :request_id
40
-
41
38
  # The ID of the parent Call in the case that this new Call is meant to be treated as a child of an existing Call. This attribute should be included when possible to reduce latency when adding child calls to Conferences containing the parent Call. A call can only be used as a parent once the call is in progress or as an inbound call that is still ringing. An outbound call is considered to be in progress once the outdialConnect or outdialApiConnect webhook is invoked. An inbound call is ringing when the inbound webhook is invoked.
42
39
  attr_accessor :parent_call_id
43
40
 
41
+ # Activate privacy mode in order to obscure log data that can potentially expose private information.
42
+ attr_accessor :privacy_mode
43
+
44
44
  # Attribute mapping from ruby-style variable name to JSON key.
45
45
  def self.attribute_map
46
46
  {
@@ -51,8 +51,8 @@ module Freeclimb
51
51
  :'if_machine' => :'ifMachine',
52
52
  :'if_machine_url' => :'ifMachineUrl',
53
53
  :'timeout' => :'timeout',
54
- :'request_id' => :'requestId',
55
- :'parent_call_id' => :'parentCallId'
54
+ :'parent_call_id' => :'parentCallId',
55
+ :'privacy_mode' => :'privacyMode'
56
56
  }
57
57
  end
58
58
 
@@ -66,8 +66,8 @@ module Freeclimb
66
66
  :'if_machine' => :'String',
67
67
  :'if_machine_url' => :'String',
68
68
  :'timeout' => :'Integer',
69
- :'request_id' => :'String',
70
- :'parent_call_id' => :'String'
69
+ :'parent_call_id' => :'String',
70
+ :'privacy_mode' => :'Boolean'
71
71
  }
72
72
  end
73
73
 
@@ -120,13 +120,13 @@ module Freeclimb
120
120
  self.timeout = attributes[:'timeout']
121
121
  end
122
122
 
123
- if attributes.key?(:'request_id')
124
- self.request_id = attributes[:'request_id']
125
- end
126
-
127
123
  if attributes.key?(:'parent_call_id')
128
124
  self.parent_call_id = attributes[:'parent_call_id']
129
125
  end
126
+
127
+ if attributes.key?(:'privacy_mode')
128
+ self.privacy_mode = attributes[:'privacy_mode']
129
+ end
130
130
  end
131
131
 
132
132
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -169,8 +169,8 @@ module Freeclimb
169
169
  if_machine == o.if_machine &&
170
170
  if_machine_url == o.if_machine_url &&
171
171
  timeout == o.timeout &&
172
- request_id == o.request_id &&
173
- parent_call_id == o.parent_call_id
172
+ parent_call_id == o.parent_call_id &&
173
+ privacy_mode == o.privacy_mode
174
174
  end
175
175
 
176
176
  # @see the `==` method
@@ -182,7 +182,7 @@ module Freeclimb
182
182
  # Calculates hash code according to all attributes.
183
183
  # @return [Integer] Hash code
184
184
  def hash
185
- [from, to, application_id, send_digits, if_machine, if_machine_url, timeout, request_id, parent_call_id].hash
185
+ [from, to, application_id, send_digits, if_machine, if_machine_url, timeout, parent_call_id, privacy_mode].hash
186
186
  end
187
187
 
188
188
  # Builds the object from hash