bandwidth-sdk 11.3.0 → 12.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +16 -14
  3. data/README.md +14 -8
  4. data/bandwidth.yml +223 -17
  5. data/coverage/.last_run.json +1 -1
  6. data/coverage/.resultset.json +609 -208
  7. data/coverage/index.html +14764 -10335
  8. data/custom_templates/README.mustache +4 -4
  9. data/docs/CallRecordingMetadata.md +1 -1
  10. data/docs/CallTranscription.md +24 -0
  11. data/docs/CallTranscriptionMetadata.md +20 -0
  12. data/docs/CallTranscriptionResponse.md +24 -0
  13. data/docs/RecordingAvailableCallback.md +2 -2
  14. data/docs/RecordingTranscriptionMetadata.md +24 -0
  15. data/docs/RecordingTranscriptions.md +18 -0
  16. data/docs/RecordingsApi.md +49 -49
  17. data/docs/TranscriptionsApi.md +229 -0
  18. data/lib/bandwidth-sdk/api/recordings_api.rb +56 -56
  19. data/lib/bandwidth-sdk/api/transcriptions_api.rb +241 -0
  20. data/lib/bandwidth-sdk/configuration.rb +22 -4
  21. data/lib/bandwidth-sdk/models/call_recording_metadata.rb +1 -1
  22. data/lib/bandwidth-sdk/models/call_transcription.rb +317 -0
  23. data/lib/bandwidth-sdk/models/call_transcription_metadata.rb +223 -0
  24. data/lib/bandwidth-sdk/models/call_transcription_response.rb +244 -0
  25. data/lib/bandwidth-sdk/models/recording_available_callback.rb +2 -2
  26. data/lib/bandwidth-sdk/models/recording_transcription_metadata.rb +244 -0
  27. data/lib/bandwidth-sdk/models/recording_transcriptions.rb +214 -0
  28. data/lib/bandwidth-sdk/version.rb +1 -1
  29. data/lib/bandwidth-sdk.rb +6 -2
  30. data/spec/api/calls_api_spec.rb +4 -4
  31. data/spec/api/conferences_api_spec.rb +12 -12
  32. data/spec/api/media_api_spec.rb +6 -6
  33. data/spec/api/messages_api_spec.rb +2 -2
  34. data/spec/api/mfa_api_spec.rb +6 -6
  35. data/spec/api/phone_number_lookup_api_spec.rb +2 -2
  36. data/spec/api/recordings_api_spec.rb +30 -30
  37. data/spec/api/statistics_api_spec.rb +1 -1
  38. data/spec/api/transcriptions_api_spec.rb +130 -0
  39. data/spec/api_client_spec.rb +2 -2
  40. data/spec/integration/calls_api_integration_spec.rb +7 -7
  41. data/spec/integration/conferences_api_integration_spec.rb +9 -9
  42. data/spec/integration/media_api_integration_spec.rb +7 -7
  43. data/spec/integration/messages_api_integration_spec.rb +3 -3
  44. data/spec/integration/mfa_api_integration_spec.rb +3 -3
  45. data/spec/integration/phone_number_lookup_api_integration_spec.rb +2 -2
  46. data/spec/integration/recordings_api_integration_spec.rb +14 -14
  47. data/spec/integration/statistics_api_integration_spec.rb +1 -1
  48. data/spec/integration/transcriptions_api_integration_spec.rb +84 -0
  49. data/spec/spec_helper.rb +1 -1
  50. metadata +49 -33
@@ -19,43 +19,43 @@ module Bandwidth
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Delete Transcription
23
- # Deletes the specified recording's transcription. Note: After the deletion is requested and a `204` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours.
22
+ # Delete Recording
23
+ # Delete the recording information, media and transcription. Note: After the deletion is requested and a `204` is returned, neither the recording metadata nor the actual media nor its transcription will be accessible anymore. However, the media of the specified recording is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours.
24
24
  # @param account_id [String] Your Bandwidth Account ID.
25
25
  # @param call_id [String] Programmable Voice API Call ID.
26
26
  # @param recording_id [String] Programmable Voice API Recording ID.
27
27
  # @param [Hash] opts the optional parameters
28
28
  # @return [nil]
29
- def delete_call_transcription(account_id, call_id, recording_id, opts = {})
30
- delete_call_transcription_with_http_info(account_id, call_id, recording_id, opts)
29
+ def delete_recording(account_id, call_id, recording_id, opts = {})
30
+ delete_recording_with_http_info(account_id, call_id, recording_id, opts)
31
31
  nil
32
32
  end
33
33
 
34
- # Delete Transcription
35
- # Deletes the specified recording's transcription. Note: After the deletion is requested and a `204` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours.
34
+ # Delete Recording
35
+ # Delete the recording information, media and transcription. Note: After the deletion is requested and a `204` is returned, neither the recording metadata nor the actual media nor its transcription will be accessible anymore. However, the media of the specified recording is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours.
36
36
  # @param account_id [String] Your Bandwidth Account ID.
37
37
  # @param call_id [String] Programmable Voice API Call ID.
38
38
  # @param recording_id [String] Programmable Voice API Recording ID.
39
39
  # @param [Hash] opts the optional parameters
40
40
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
41
- def delete_call_transcription_with_http_info(account_id, call_id, recording_id, opts = {})
41
+ def delete_recording_with_http_info(account_id, call_id, recording_id, opts = {})
42
42
  if @api_client.config.debugging
43
- @api_client.config.logger.debug 'Calling API: RecordingsApi.delete_call_transcription ...'
43
+ @api_client.config.logger.debug 'Calling API: RecordingsApi.delete_recording ...'
44
44
  end
45
45
  # verify the required parameter 'account_id' is set
46
46
  if @api_client.config.client_side_validation && account_id.nil?
47
- fail ArgumentError, "Missing the required parameter 'account_id' when calling RecordingsApi.delete_call_transcription"
47
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling RecordingsApi.delete_recording"
48
48
  end
49
49
  # verify the required parameter 'call_id' is set
50
50
  if @api_client.config.client_side_validation && call_id.nil?
51
- fail ArgumentError, "Missing the required parameter 'call_id' when calling RecordingsApi.delete_call_transcription"
51
+ fail ArgumentError, "Missing the required parameter 'call_id' when calling RecordingsApi.delete_recording"
52
52
  end
53
53
  # verify the required parameter 'recording_id' is set
54
54
  if @api_client.config.client_side_validation && recording_id.nil?
55
- fail ArgumentError, "Missing the required parameter 'recording_id' when calling RecordingsApi.delete_call_transcription"
55
+ fail ArgumentError, "Missing the required parameter 'recording_id' when calling RecordingsApi.delete_recording"
56
56
  end
57
57
  # resource path
58
- local_var_path = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)).sub('{' + 'recordingId' + '}', CGI.escape(recording_id.to_s))
58
+ local_var_path = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)).sub('{' + 'recordingId' + '}', CGI.escape(recording_id.to_s))
59
59
 
60
60
  # query parameters
61
61
  query_params = opts[:query_params] || {}
@@ -78,7 +78,7 @@ module Bandwidth
78
78
  auth_names = opts[:debug_auth_names] || ['Basic']
79
79
 
80
80
  new_options = opts.merge(
81
- :operation => :"RecordingsApi.delete_call_transcription",
81
+ :operation => :"RecordingsApi.delete_recording",
82
82
  :header_params => header_params,
83
83
  :query_params => query_params,
84
84
  :form_params => form_params,
@@ -89,48 +89,48 @@ module Bandwidth
89
89
 
90
90
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
91
91
  if @api_client.config.debugging
92
- @api_client.config.logger.debug "API called: RecordingsApi#delete_call_transcription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
92
+ @api_client.config.logger.debug "API called: RecordingsApi#delete_recording\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
93
93
  end
94
94
  return data, status_code, headers
95
95
  end
96
96
 
97
- # Delete Recording
98
- # Delete the recording information, media and transcription. Note: After the deletion is requested and a `204` is returned, neither the recording metadata nor the actual media nor its transcription will be accessible anymore. However, the media of the specified recording is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours.
97
+ # Delete Recording Media
98
+ # Deletes the specified recording's media.
99
99
  # @param account_id [String] Your Bandwidth Account ID.
100
100
  # @param call_id [String] Programmable Voice API Call ID.
101
101
  # @param recording_id [String] Programmable Voice API Recording ID.
102
102
  # @param [Hash] opts the optional parameters
103
103
  # @return [nil]
104
- def delete_recording(account_id, call_id, recording_id, opts = {})
105
- delete_recording_with_http_info(account_id, call_id, recording_id, opts)
104
+ def delete_recording_media(account_id, call_id, recording_id, opts = {})
105
+ delete_recording_media_with_http_info(account_id, call_id, recording_id, opts)
106
106
  nil
107
107
  end
108
108
 
109
- # Delete Recording
110
- # Delete the recording information, media and transcription. Note: After the deletion is requested and a &#x60;204&#x60; is returned, neither the recording metadata nor the actual media nor its transcription will be accessible anymore. However, the media of the specified recording is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours.
109
+ # Delete Recording Media
110
+ # Deletes the specified recording&#39;s media.
111
111
  # @param account_id [String] Your Bandwidth Account ID.
112
112
  # @param call_id [String] Programmable Voice API Call ID.
113
113
  # @param recording_id [String] Programmable Voice API Recording ID.
114
114
  # @param [Hash] opts the optional parameters
115
115
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
116
- def delete_recording_with_http_info(account_id, call_id, recording_id, opts = {})
116
+ def delete_recording_media_with_http_info(account_id, call_id, recording_id, opts = {})
117
117
  if @api_client.config.debugging
118
- @api_client.config.logger.debug 'Calling API: RecordingsApi.delete_recording ...'
118
+ @api_client.config.logger.debug 'Calling API: RecordingsApi.delete_recording_media ...'
119
119
  end
120
120
  # verify the required parameter 'account_id' is set
121
121
  if @api_client.config.client_side_validation && account_id.nil?
122
- fail ArgumentError, "Missing the required parameter 'account_id' when calling RecordingsApi.delete_recording"
122
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling RecordingsApi.delete_recording_media"
123
123
  end
124
124
  # verify the required parameter 'call_id' is set
125
125
  if @api_client.config.client_side_validation && call_id.nil?
126
- fail ArgumentError, "Missing the required parameter 'call_id' when calling RecordingsApi.delete_recording"
126
+ fail ArgumentError, "Missing the required parameter 'call_id' when calling RecordingsApi.delete_recording_media"
127
127
  end
128
128
  # verify the required parameter 'recording_id' is set
129
129
  if @api_client.config.client_side_validation && recording_id.nil?
130
- fail ArgumentError, "Missing the required parameter 'recording_id' when calling RecordingsApi.delete_recording"
130
+ fail ArgumentError, "Missing the required parameter 'recording_id' when calling RecordingsApi.delete_recording_media"
131
131
  end
132
132
  # resource path
133
- local_var_path = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)).sub('{' + 'recordingId' + '}', CGI.escape(recording_id.to_s))
133
+ local_var_path = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)).sub('{' + 'recordingId' + '}', CGI.escape(recording_id.to_s))
134
134
 
135
135
  # query parameters
136
136
  query_params = opts[:query_params] || {}
@@ -153,7 +153,7 @@ module Bandwidth
153
153
  auth_names = opts[:debug_auth_names] || ['Basic']
154
154
 
155
155
  new_options = opts.merge(
156
- :operation => :"RecordingsApi.delete_recording",
156
+ :operation => :"RecordingsApi.delete_recording_media",
157
157
  :header_params => header_params,
158
158
  :query_params => query_params,
159
159
  :form_params => form_params,
@@ -164,48 +164,48 @@ module Bandwidth
164
164
 
165
165
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
166
166
  if @api_client.config.debugging
167
- @api_client.config.logger.debug "API called: RecordingsApi#delete_recording\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
167
+ @api_client.config.logger.debug "API called: RecordingsApi#delete_recording_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
168
168
  end
169
169
  return data, status_code, headers
170
170
  end
171
171
 
172
- # Delete Recording Media
173
- # Deletes the specified recording's media.
172
+ # Delete Transcription
173
+ # Deletes the specified recording's transcription. Note: After the deletion is requested and a `204` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours.
174
174
  # @param account_id [String] Your Bandwidth Account ID.
175
175
  # @param call_id [String] Programmable Voice API Call ID.
176
176
  # @param recording_id [String] Programmable Voice API Recording ID.
177
177
  # @param [Hash] opts the optional parameters
178
178
  # @return [nil]
179
- def delete_recording_media(account_id, call_id, recording_id, opts = {})
180
- delete_recording_media_with_http_info(account_id, call_id, recording_id, opts)
179
+ def delete_recording_transcription(account_id, call_id, recording_id, opts = {})
180
+ delete_recording_transcription_with_http_info(account_id, call_id, recording_id, opts)
181
181
  nil
182
182
  end
183
183
 
184
- # Delete Recording Media
185
- # Deletes the specified recording&#39;s media.
184
+ # Delete Transcription
185
+ # Deletes the specified recording&#39;s transcription. Note: After the deletion is requested and a &#x60;204&#x60; is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours.
186
186
  # @param account_id [String] Your Bandwidth Account ID.
187
187
  # @param call_id [String] Programmable Voice API Call ID.
188
188
  # @param recording_id [String] Programmable Voice API Recording ID.
189
189
  # @param [Hash] opts the optional parameters
190
190
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
191
- def delete_recording_media_with_http_info(account_id, call_id, recording_id, opts = {})
191
+ def delete_recording_transcription_with_http_info(account_id, call_id, recording_id, opts = {})
192
192
  if @api_client.config.debugging
193
- @api_client.config.logger.debug 'Calling API: RecordingsApi.delete_recording_media ...'
193
+ @api_client.config.logger.debug 'Calling API: RecordingsApi.delete_recording_transcription ...'
194
194
  end
195
195
  # verify the required parameter 'account_id' is set
196
196
  if @api_client.config.client_side_validation && account_id.nil?
197
- fail ArgumentError, "Missing the required parameter 'account_id' when calling RecordingsApi.delete_recording_media"
197
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling RecordingsApi.delete_recording_transcription"
198
198
  end
199
199
  # verify the required parameter 'call_id' is set
200
200
  if @api_client.config.client_side_validation && call_id.nil?
201
- fail ArgumentError, "Missing the required parameter 'call_id' when calling RecordingsApi.delete_recording_media"
201
+ fail ArgumentError, "Missing the required parameter 'call_id' when calling RecordingsApi.delete_recording_transcription"
202
202
  end
203
203
  # verify the required parameter 'recording_id' is set
204
204
  if @api_client.config.client_side_validation && recording_id.nil?
205
- fail ArgumentError, "Missing the required parameter 'recording_id' when calling RecordingsApi.delete_recording_media"
205
+ fail ArgumentError, "Missing the required parameter 'recording_id' when calling RecordingsApi.delete_recording_transcription"
206
206
  end
207
207
  # resource path
208
- local_var_path = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)).sub('{' + 'recordingId' + '}', CGI.escape(recording_id.to_s))
208
+ local_var_path = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)).sub('{' + 'recordingId' + '}', CGI.escape(recording_id.to_s))
209
209
 
210
210
  # query parameters
211
211
  query_params = opts[:query_params] || {}
@@ -228,7 +228,7 @@ module Bandwidth
228
228
  auth_names = opts[:debug_auth_names] || ['Basic']
229
229
 
230
230
  new_options = opts.merge(
231
- :operation => :"RecordingsApi.delete_recording_media",
231
+ :operation => :"RecordingsApi.delete_recording_transcription",
232
232
  :header_params => header_params,
233
233
  :query_params => query_params,
234
234
  :form_params => form_params,
@@ -239,7 +239,7 @@ module Bandwidth
239
239
 
240
240
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
241
241
  if @api_client.config.debugging
242
- @api_client.config.logger.debug "API called: RecordingsApi#delete_recording_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
242
+ @api_client.config.logger.debug "API called: RecordingsApi#delete_recording_transcription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
243
243
  end
244
244
  return data, status_code, headers
245
245
  end
@@ -395,39 +395,39 @@ module Bandwidth
395
395
  end
396
396
 
397
397
  # Get Transcription
398
- # Downloads the specified transcription. If the transcribed recording was multi-channel, then there will be 2 transcripts. The caller/called party transcript will be the first item while [`<PlayAudio>`](/docs/voice/bxml/playAudio) and [`<SpeakSentence>`](/docs/voice/bxml/speakSentence) transcript will be the second item. During a [`<Transfer>`](/docs/voice/bxml/transfer) the A-leg transcript will be the first item while the B-leg transcript will be the second item.
398
+ # Downloads the specified transcription. If the recording was multi-channel, then there will be 2 transcripts. The caller/called party transcript will be the first item while [`<PlayAudio>`](/docs/voice/bxml/playAudio) and [`<SpeakSentence>`](/docs/voice/bxml/speakSentence) transcript will be the second item. During a [`<Transfer>`](/docs/voice/bxml/transfer) the A-leg transcript will be the first item while the B-leg transcript will be the second item.
399
399
  # @param account_id [String] Your Bandwidth Account ID.
400
400
  # @param call_id [String] Programmable Voice API Call ID.
401
401
  # @param recording_id [String] Programmable Voice API Recording ID.
402
402
  # @param [Hash] opts the optional parameters
403
- # @return [TranscriptionList]
404
- def get_call_transcription(account_id, call_id, recording_id, opts = {})
405
- data, _status_code, _headers = get_call_transcription_with_http_info(account_id, call_id, recording_id, opts)
403
+ # @return [RecordingTranscriptions]
404
+ def get_recording_transcription(account_id, call_id, recording_id, opts = {})
405
+ data, _status_code, _headers = get_recording_transcription_with_http_info(account_id, call_id, recording_id, opts)
406
406
  data
407
407
  end
408
408
 
409
409
  # Get Transcription
410
- # Downloads the specified transcription. If the transcribed recording was multi-channel, then there will be 2 transcripts. The caller/called party transcript will be the first item while [&#x60;&lt;PlayAudio&gt;&#x60;](/docs/voice/bxml/playAudio) and [&#x60;&lt;SpeakSentence&gt;&#x60;](/docs/voice/bxml/speakSentence) transcript will be the second item. During a [&#x60;&lt;Transfer&gt;&#x60;](/docs/voice/bxml/transfer) the A-leg transcript will be the first item while the B-leg transcript will be the second item.
410
+ # Downloads the specified transcription. If the recording was multi-channel, then there will be 2 transcripts. The caller/called party transcript will be the first item while [&#x60;&lt;PlayAudio&gt;&#x60;](/docs/voice/bxml/playAudio) and [&#x60;&lt;SpeakSentence&gt;&#x60;](/docs/voice/bxml/speakSentence) transcript will be the second item. During a [&#x60;&lt;Transfer&gt;&#x60;](/docs/voice/bxml/transfer) the A-leg transcript will be the first item while the B-leg transcript will be the second item.
411
411
  # @param account_id [String] Your Bandwidth Account ID.
412
412
  # @param call_id [String] Programmable Voice API Call ID.
413
413
  # @param recording_id [String] Programmable Voice API Recording ID.
414
414
  # @param [Hash] opts the optional parameters
415
- # @return [Array<(TranscriptionList, Integer, Hash)>] TranscriptionList data, response status code and response headers
416
- def get_call_transcription_with_http_info(account_id, call_id, recording_id, opts = {})
415
+ # @return [Array<(RecordingTranscriptions, Integer, Hash)>] RecordingTranscriptions data, response status code and response headers
416
+ def get_recording_transcription_with_http_info(account_id, call_id, recording_id, opts = {})
417
417
  if @api_client.config.debugging
418
- @api_client.config.logger.debug 'Calling API: RecordingsApi.get_call_transcription ...'
418
+ @api_client.config.logger.debug 'Calling API: RecordingsApi.get_recording_transcription ...'
419
419
  end
420
420
  # verify the required parameter 'account_id' is set
421
421
  if @api_client.config.client_side_validation && account_id.nil?
422
- fail ArgumentError, "Missing the required parameter 'account_id' when calling RecordingsApi.get_call_transcription"
422
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling RecordingsApi.get_recording_transcription"
423
423
  end
424
424
  # verify the required parameter 'call_id' is set
425
425
  if @api_client.config.client_side_validation && call_id.nil?
426
- fail ArgumentError, "Missing the required parameter 'call_id' when calling RecordingsApi.get_call_transcription"
426
+ fail ArgumentError, "Missing the required parameter 'call_id' when calling RecordingsApi.get_recording_transcription"
427
427
  end
428
428
  # verify the required parameter 'recording_id' is set
429
429
  if @api_client.config.client_side_validation && recording_id.nil?
430
- fail ArgumentError, "Missing the required parameter 'recording_id' when calling RecordingsApi.get_call_transcription"
430
+ fail ArgumentError, "Missing the required parameter 'recording_id' when calling RecordingsApi.get_recording_transcription"
431
431
  end
432
432
  # resource path
433
433
  local_var_path = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)).sub('{' + 'recordingId' + '}', CGI.escape(recording_id.to_s))
@@ -447,13 +447,13 @@ module Bandwidth
447
447
  post_body = opts[:debug_body]
448
448
 
449
449
  # return_type
450
- return_type = opts[:debug_return_type] || 'TranscriptionList'
450
+ return_type = opts[:debug_return_type] || 'RecordingTranscriptions'
451
451
 
452
452
  # auth_names
453
453
  auth_names = opts[:debug_auth_names] || ['Basic']
454
454
 
455
455
  new_options = opts.merge(
456
- :operation => :"RecordingsApi.get_call_transcription",
456
+ :operation => :"RecordingsApi.get_recording_transcription",
457
457
  :header_params => header_params,
458
458
  :query_params => query_params,
459
459
  :form_params => form_params,
@@ -464,7 +464,7 @@ module Bandwidth
464
464
 
465
465
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
466
466
  if @api_client.config.debugging
467
- @api_client.config.logger.debug "API called: RecordingsApi#get_call_transcription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
467
+ @api_client.config.logger.debug "API called: RecordingsApi#get_recording_transcription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
468
468
  end
469
469
  return data, status_code, headers
470
470
  end
@@ -0,0 +1,241 @@
1
+ =begin
2
+ #Bandwidth
3
+
4
+ #Bandwidth's Communication APIs
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: letstalk@bandwidth.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.0.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Bandwidth
16
+ class TranscriptionsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete a specific transcription
23
+ # Delete the specified transcription that was created on this call via [startTranscription](/docs/voice/bxml/startTranscription). Note: After the deletion is requested and a `204` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours.
24
+ # @param account_id [String] Your Bandwidth Account ID.
25
+ # @param call_id [String] Programmable Voice API Call ID.
26
+ # @param transcription_id [String] Programmable Voice API Transcription ID.
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [nil]
29
+ def delete_real_time_transcription(account_id, call_id, transcription_id, opts = {})
30
+ delete_real_time_transcription_with_http_info(account_id, call_id, transcription_id, opts)
31
+ nil
32
+ end
33
+
34
+ # Delete a specific transcription
35
+ # Delete the specified transcription that was created on this call via [startTranscription](/docs/voice/bxml/startTranscription). Note: After the deletion is requested and a &#x60;204&#x60; is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours.
36
+ # @param account_id [String] Your Bandwidth Account ID.
37
+ # @param call_id [String] Programmable Voice API Call ID.
38
+ # @param transcription_id [String] Programmable Voice API Transcription ID.
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
41
+ def delete_real_time_transcription_with_http_info(account_id, call_id, transcription_id, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: TranscriptionsApi.delete_real_time_transcription ...'
44
+ end
45
+ # verify the required parameter 'account_id' is set
46
+ if @api_client.config.client_side_validation && account_id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling TranscriptionsApi.delete_real_time_transcription"
48
+ end
49
+ # verify the required parameter 'call_id' is set
50
+ if @api_client.config.client_side_validation && call_id.nil?
51
+ fail ArgumentError, "Missing the required parameter 'call_id' when calling TranscriptionsApi.delete_real_time_transcription"
52
+ end
53
+ # verify the required parameter 'transcription_id' is set
54
+ if @api_client.config.client_side_validation && transcription_id.nil?
55
+ fail ArgumentError, "Missing the required parameter 'transcription_id' when calling TranscriptionsApi.delete_real_time_transcription"
56
+ end
57
+ # resource path
58
+ local_var_path = '/accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)).sub('{' + 'transcriptionId' + '}', CGI.escape(transcription_id.to_s))
59
+
60
+ # query parameters
61
+ query_params = opts[:query_params] || {}
62
+
63
+ # header parameters
64
+ header_params = opts[:header_params] || {}
65
+ # HTTP header 'Accept' (if needed)
66
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
67
+
68
+ # form parameters
69
+ form_params = opts[:form_params] || {}
70
+
71
+ # http body (model)
72
+ post_body = opts[:debug_body]
73
+
74
+ # return_type
75
+ return_type = opts[:debug_return_type]
76
+
77
+ # auth_names
78
+ auth_names = opts[:debug_auth_names] || ['Basic']
79
+
80
+ new_options = opts.merge(
81
+ :operation => :"TranscriptionsApi.delete_real_time_transcription",
82
+ :header_params => header_params,
83
+ :query_params => query_params,
84
+ :form_params => form_params,
85
+ :body => post_body,
86
+ :auth_names => auth_names,
87
+ :return_type => return_type
88
+ )
89
+
90
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
91
+ if @api_client.config.debugging
92
+ @api_client.config.logger.debug "API called: TranscriptionsApi#delete_real_time_transcription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
93
+ end
94
+ return data, status_code, headers
95
+ end
96
+
97
+ # Retrieve a specific transcription
98
+ # Retrieve the specified transcription that was created on this call via [startTranscription](/docs/voice/bxml/startTranscription).
99
+ # @param account_id [String] Your Bandwidth Account ID.
100
+ # @param call_id [String] Programmable Voice API Call ID.
101
+ # @param transcription_id [String] Programmable Voice API Transcription ID.
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [CallTranscriptionResponse]
104
+ def get_real_time_transcription(account_id, call_id, transcription_id, opts = {})
105
+ data, _status_code, _headers = get_real_time_transcription_with_http_info(account_id, call_id, transcription_id, opts)
106
+ data
107
+ end
108
+
109
+ # Retrieve a specific transcription
110
+ # Retrieve the specified transcription that was created on this call via [startTranscription](/docs/voice/bxml/startTranscription).
111
+ # @param account_id [String] Your Bandwidth Account ID.
112
+ # @param call_id [String] Programmable Voice API Call ID.
113
+ # @param transcription_id [String] Programmable Voice API Transcription ID.
114
+ # @param [Hash] opts the optional parameters
115
+ # @return [Array<(CallTranscriptionResponse, Integer, Hash)>] CallTranscriptionResponse data, response status code and response headers
116
+ def get_real_time_transcription_with_http_info(account_id, call_id, transcription_id, opts = {})
117
+ if @api_client.config.debugging
118
+ @api_client.config.logger.debug 'Calling API: TranscriptionsApi.get_real_time_transcription ...'
119
+ end
120
+ # verify the required parameter 'account_id' is set
121
+ if @api_client.config.client_side_validation && account_id.nil?
122
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling TranscriptionsApi.get_real_time_transcription"
123
+ end
124
+ # verify the required parameter 'call_id' is set
125
+ if @api_client.config.client_side_validation && call_id.nil?
126
+ fail ArgumentError, "Missing the required parameter 'call_id' when calling TranscriptionsApi.get_real_time_transcription"
127
+ end
128
+ # verify the required parameter 'transcription_id' is set
129
+ if @api_client.config.client_side_validation && transcription_id.nil?
130
+ fail ArgumentError, "Missing the required parameter 'transcription_id' when calling TranscriptionsApi.get_real_time_transcription"
131
+ end
132
+ # resource path
133
+ local_var_path = '/accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)).sub('{' + 'transcriptionId' + '}', CGI.escape(transcription_id.to_s))
134
+
135
+ # query parameters
136
+ query_params = opts[:query_params] || {}
137
+
138
+ # header parameters
139
+ header_params = opts[:header_params] || {}
140
+ # HTTP header 'Accept' (if needed)
141
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
142
+
143
+ # form parameters
144
+ form_params = opts[:form_params] || {}
145
+
146
+ # http body (model)
147
+ post_body = opts[:debug_body]
148
+
149
+ # return_type
150
+ return_type = opts[:debug_return_type] || 'CallTranscriptionResponse'
151
+
152
+ # auth_names
153
+ auth_names = opts[:debug_auth_names] || ['Basic']
154
+
155
+ new_options = opts.merge(
156
+ :operation => :"TranscriptionsApi.get_real_time_transcription",
157
+ :header_params => header_params,
158
+ :query_params => query_params,
159
+ :form_params => form_params,
160
+ :body => post_body,
161
+ :auth_names => auth_names,
162
+ :return_type => return_type
163
+ )
164
+
165
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
166
+ if @api_client.config.debugging
167
+ @api_client.config.logger.debug "API called: TranscriptionsApi#get_real_time_transcription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
168
+ end
169
+ return data, status_code, headers
170
+ end
171
+
172
+ # Enumerate transcriptions made with StartTranscription
173
+ # Enumerates the transcriptions created on this call via [startTranscription](/docs/voice/bxml/startTranscription).
174
+ # @param account_id [String] Your Bandwidth Account ID.
175
+ # @param call_id [String] Programmable Voice API Call ID.
176
+ # @param [Hash] opts the optional parameters
177
+ # @return [Array<CallTranscriptionMetadata>]
178
+ def list_real_time_transcriptions(account_id, call_id, opts = {})
179
+ data, _status_code, _headers = list_real_time_transcriptions_with_http_info(account_id, call_id, opts)
180
+ data
181
+ end
182
+
183
+ # Enumerate transcriptions made with StartTranscription
184
+ # Enumerates the transcriptions created on this call via [startTranscription](/docs/voice/bxml/startTranscription).
185
+ # @param account_id [String] Your Bandwidth Account ID.
186
+ # @param call_id [String] Programmable Voice API Call ID.
187
+ # @param [Hash] opts the optional parameters
188
+ # @return [Array<(Array<CallTranscriptionMetadata>, Integer, Hash)>] Array<CallTranscriptionMetadata> data, response status code and response headers
189
+ def list_real_time_transcriptions_with_http_info(account_id, call_id, opts = {})
190
+ if @api_client.config.debugging
191
+ @api_client.config.logger.debug 'Calling API: TranscriptionsApi.list_real_time_transcriptions ...'
192
+ end
193
+ # verify the required parameter 'account_id' is set
194
+ if @api_client.config.client_side_validation && account_id.nil?
195
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling TranscriptionsApi.list_real_time_transcriptions"
196
+ end
197
+ # verify the required parameter 'call_id' is set
198
+ if @api_client.config.client_side_validation && call_id.nil?
199
+ fail ArgumentError, "Missing the required parameter 'call_id' when calling TranscriptionsApi.list_real_time_transcriptions"
200
+ end
201
+ # resource path
202
+ local_var_path = '/accounts/{accountId}/calls/{callId}/transcriptions'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s))
203
+
204
+ # query parameters
205
+ query_params = opts[:query_params] || {}
206
+
207
+ # header parameters
208
+ header_params = opts[:header_params] || {}
209
+ # HTTP header 'Accept' (if needed)
210
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
211
+
212
+ # form parameters
213
+ form_params = opts[:form_params] || {}
214
+
215
+ # http body (model)
216
+ post_body = opts[:debug_body]
217
+
218
+ # return_type
219
+ return_type = opts[:debug_return_type] || 'Array<CallTranscriptionMetadata>'
220
+
221
+ # auth_names
222
+ auth_names = opts[:debug_auth_names] || ['Basic']
223
+
224
+ new_options = opts.merge(
225
+ :operation => :"TranscriptionsApi.list_real_time_transcriptions",
226
+ :header_params => header_params,
227
+ :query_params => query_params,
228
+ :form_params => form_params,
229
+ :body => post_body,
230
+ :auth_names => auth_names,
231
+ :return_type => return_type
232
+ )
233
+
234
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
235
+ if @api_client.config.debugging
236
+ @api_client.config.logger.debug "API called: TranscriptionsApi#list_real_time_transcriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
237
+ end
238
+ return data, status_code, headers
239
+ end
240
+ end
241
+ end
@@ -410,19 +410,19 @@ module Bandwidth
410
410
  description: "Production",
411
411
  }
412
412
  ],
413
- "RecordingsApi.delete_call_transcription": [
413
+ "RecordingsApi.delete_recording": [
414
414
  {
415
415
  url: "https://voice.bandwidth.com/api/v2",
416
416
  description: "Production",
417
417
  }
418
418
  ],
419
- "RecordingsApi.delete_recording": [
419
+ "RecordingsApi.delete_recording_media": [
420
420
  {
421
421
  url: "https://voice.bandwidth.com/api/v2",
422
422
  description: "Production",
423
423
  }
424
424
  ],
425
- "RecordingsApi.delete_recording_media": [
425
+ "RecordingsApi.delete_recording_transcription": [
426
426
  {
427
427
  url: "https://voice.bandwidth.com/api/v2",
428
428
  description: "Production",
@@ -440,7 +440,7 @@ module Bandwidth
440
440
  description: "Production",
441
441
  }
442
442
  ],
443
- "RecordingsApi.get_call_transcription": [
443
+ "RecordingsApi.get_recording_transcription": [
444
444
  {
445
445
  url: "https://voice.bandwidth.com/api/v2",
446
446
  description: "Production",
@@ -476,6 +476,24 @@ module Bandwidth
476
476
  description: "Production",
477
477
  }
478
478
  ],
479
+ "TranscriptionsApi.delete_real_time_transcription": [
480
+ {
481
+ url: "https://voice.bandwidth.com/api/v2",
482
+ description: "Production",
483
+ }
484
+ ],
485
+ "TranscriptionsApi.get_real_time_transcription": [
486
+ {
487
+ url: "https://voice.bandwidth.com/api/v2",
488
+ description: "Production",
489
+ }
490
+ ],
491
+ "TranscriptionsApi.list_real_time_transcriptions": [
492
+ {
493
+ url: "https://voice.bandwidth.com/api/v2",
494
+ description: "Production",
495
+ }
496
+ ],
479
497
  }
480
498
  end
481
499
 
@@ -137,7 +137,7 @@ module Bandwidth
137
137
  :'file_format' => :'FileFormatEnum',
138
138
  :'status' => :'String',
139
139
  :'media_url' => :'String',
140
- :'transcription' => :'TranscriptionMetadata'
140
+ :'transcription' => :'RecordingTranscriptionMetadata'
141
141
  }
142
142
  end
143
143