bandwidth-sdk 13.0.0 → 13.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +10 -10
- data/bandwidth-sdk.gemspec +1 -1
- data/bandwidth.yml +15 -0
- data/coverage/.last_run.json +1 -1
- data/coverage/.resultset.json +188 -176
- data/coverage/index.html +1590 -1458
- data/docs/CallRecordingMetadata.md +3 -1
- data/docs/CallTranscriptionMetadata.md +2 -0
- data/docs/ConferenceRecordingMetadata.md +3 -1
- data/lib/bandwidth-sdk/api/calls_api.rb +6 -6
- data/lib/bandwidth-sdk/api/conferences_api.rb +10 -10
- data/lib/bandwidth-sdk/api/media_api.rb +5 -5
- data/lib/bandwidth-sdk/api/messages_api.rb +3 -3
- data/lib/bandwidth-sdk/api/mfa_api.rb +4 -4
- data/lib/bandwidth-sdk/api/phone_number_lookup_api.rb +3 -3
- data/lib/bandwidth-sdk/api/recordings_api.rb +11 -11
- data/lib/bandwidth-sdk/api/statistics_api.rb +2 -2
- data/lib/bandwidth-sdk/api/transcriptions_api.rb +4 -4
- data/lib/bandwidth-sdk/api_client.rb +30 -24
- data/lib/bandwidth-sdk/api_error.rb +1 -1
- data/lib/bandwidth-sdk/configuration.rb +1 -1
- data/lib/bandwidth-sdk/models/account_statistics.rb +1 -1
- data/lib/bandwidth-sdk/models/answer_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/bridge_complete_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/bridge_target_complete_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/call_direction_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/call_recording_metadata.rb +16 -6
- data/lib/bandwidth-sdk/models/call_state.rb +1 -1
- data/lib/bandwidth-sdk/models/call_state_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/call_transcription.rb +1 -1
- data/lib/bandwidth-sdk/models/call_transcription_detected_language_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/call_transcription_metadata.rb +12 -2
- data/lib/bandwidth-sdk/models/call_transcription_response.rb +1 -1
- data/lib/bandwidth-sdk/models/call_transcription_track_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/callback_method_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/code_request.rb +1 -1
- data/lib/bandwidth-sdk/models/conference.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_completed_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_created_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_member.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_member_exit_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_member_join_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_recording_available_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_recording_metadata.rb +16 -6
- data/lib/bandwidth-sdk/models/conference_redirect_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_state_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/create_call.rb +1 -1
- data/lib/bandwidth-sdk/models/create_call_response.rb +1 -1
- data/lib/bandwidth-sdk/models/create_lookup_response.rb +1 -1
- data/lib/bandwidth-sdk/models/create_message_request_error.rb +1 -1
- data/lib/bandwidth-sdk/models/deferred_result.rb +1 -1
- data/lib/bandwidth-sdk/models/disconnect_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/diversion.rb +1 -1
- data/lib/bandwidth-sdk/models/dtmf_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/field_error.rb +1 -1
- data/lib/bandwidth-sdk/models/file_format_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/gather_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/inbound_message_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/inbound_message_callback_message.rb +1 -1
- data/lib/bandwidth-sdk/models/initiate_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/list_message_direction_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/list_message_item.rb +1 -1
- data/lib/bandwidth-sdk/models/lookup_request.rb +1 -1
- data/lib/bandwidth-sdk/models/lookup_result.rb +1 -1
- data/lib/bandwidth-sdk/models/lookup_status.rb +1 -1
- data/lib/bandwidth-sdk/models/lookup_status_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/machine_detection_complete_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/machine_detection_configuration.rb +1 -1
- data/lib/bandwidth-sdk/models/machine_detection_mode_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/machine_detection_result.rb +1 -1
- data/lib/bandwidth-sdk/models/media.rb +1 -1
- data/lib/bandwidth-sdk/models/message.rb +1 -1
- data/lib/bandwidth-sdk/models/message_delivered_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/message_delivered_callback_message.rb +1 -1
- data/lib/bandwidth-sdk/models/message_direction_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/message_failed_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/message_failed_callback_message.rb +1 -1
- data/lib/bandwidth-sdk/models/message_request.rb +1 -1
- data/lib/bandwidth-sdk/models/message_sending_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/message_sending_callback_message.rb +1 -1
- data/lib/bandwidth-sdk/models/message_status_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/message_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/messages_list.rb +1 -1
- data/lib/bandwidth-sdk/models/messaging_code_response.rb +1 -1
- data/lib/bandwidth-sdk/models/messaging_request_error.rb +1 -1
- data/lib/bandwidth-sdk/models/mfa_forbidden_request_error.rb +1 -1
- data/lib/bandwidth-sdk/models/mfa_request_error.rb +1 -1
- data/lib/bandwidth-sdk/models/mfa_unauthorized_request_error.rb +1 -1
- data/lib/bandwidth-sdk/models/page_info.rb +1 -1
- data/lib/bandwidth-sdk/models/priority_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/recording_available_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/recording_complete_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/recording_state_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/recording_transcription_metadata.rb +1 -1
- data/lib/bandwidth-sdk/models/recording_transcriptions.rb +1 -1
- data/lib/bandwidth-sdk/models/redirect_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/redirect_method_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/stir_shaken.rb +1 -1
- data/lib/bandwidth-sdk/models/tag.rb +1 -1
- data/lib/bandwidth-sdk/models/tn_lookup_request_error.rb +1 -1
- data/lib/bandwidth-sdk/models/transcribe_recording.rb +1 -1
- data/lib/bandwidth-sdk/models/transcription.rb +1 -1
- data/lib/bandwidth-sdk/models/transcription_available_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/transfer_answer_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/transfer_complete_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/update_call.rb +1 -1
- data/lib/bandwidth-sdk/models/update_call_recording.rb +1 -1
- data/lib/bandwidth-sdk/models/update_conference.rb +1 -1
- data/lib/bandwidth-sdk/models/update_conference_member.rb +1 -1
- data/lib/bandwidth-sdk/models/verify_code_request.rb +1 -1
- data/lib/bandwidth-sdk/models/verify_code_response.rb +1 -1
- data/lib/bandwidth-sdk/models/voice_api_error.rb +1 -1
- data/lib/bandwidth-sdk/models/voice_code_response.rb +1 -1
- data/lib/bandwidth-sdk/version.rb +2 -2
- data/lib/bandwidth-sdk.rb +1 -1
- data/openapitools.json +1 -1
- data/spec/smoke/transcriptions_api_spec.rb +1 -0
- data/spec/unit/api/conferences_api_spec.rb +3 -2
- data/spec/unit/api/media_api_spec.rb +3 -2
- data/spec/unit/api/recordings_api_spec.rb +6 -3
- data/spec/unit/api/transcriptions_api_spec.rb +1 -0
- metadata +47 -47
@@ -22,6 +22,7 @@
|
|
22
22
|
| **status** | **String** | The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values. | [optional] |
|
23
23
|
| **media_url** | **String** | The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. | [optional] |
|
24
24
|
| **transcription** | [**RecordingTranscriptionMetadata**](RecordingTranscriptionMetadata.md) | | [optional] |
|
25
|
+
| **recording_name** | **String** | A name to identify this recording. | [optional] |
|
25
26
|
|
26
27
|
## Example
|
27
28
|
|
@@ -46,7 +47,8 @@ instance = Bandwidth::CallRecordingMetadata.new(
|
|
46
47
|
file_format: null,
|
47
48
|
status: completed,
|
48
49
|
media_url: https://voice.bandwidth.com/api/v2/accounts/9900000/conferences/conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9/recordings/r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833/media,
|
49
|
-
transcription: null
|
50
|
+
transcription: null,
|
51
|
+
recording_name: my-recording-name
|
50
52
|
)
|
51
53
|
```
|
52
54
|
|
@@ -5,6 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **transcription_id** | **String** | The programmable voice API transcription ID. | [optional] |
|
8
|
+
| **transcription_name** | **String** | The programmable voice API transcription name. This name could be provided by the user when creating the transcription. | [optional] |
|
8
9
|
| **transcription_url** | **String** | A URL that may be used to retrieve the transcription itself. This points to the [Get Call Transcription](/apis/voice/#operation/getCallTranscription) endpoint. | [optional] |
|
9
10
|
|
10
11
|
## Example
|
@@ -14,6 +15,7 @@ require 'bandwidth-sdk'
|
|
14
15
|
|
15
16
|
instance = Bandwidth::CallTranscriptionMetadata.new(
|
16
17
|
transcription_id: t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b,
|
18
|
+
transcription_name: live_transcription,
|
17
19
|
transcription_url: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-fef240ff-5cfc9091-8069-4863-a8c0-a4dcbbf1f1a4/transcriptions/t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b
|
18
20
|
)
|
19
21
|
```
|
@@ -15,6 +15,7 @@
|
|
15
15
|
| **file_format** | [**FileFormatEnum**](FileFormatEnum.md) | | [optional] |
|
16
16
|
| **status** | **String** | The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values. | [optional] |
|
17
17
|
| **media_url** | **String** | The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. | [optional] |
|
18
|
+
| **recording_name** | **String** | A name to identify this recording. | [optional] |
|
18
19
|
|
19
20
|
## Example
|
20
21
|
|
@@ -32,7 +33,8 @@ instance = Bandwidth::ConferenceRecordingMetadata.new(
|
|
32
33
|
end_time: 2022-06-17T22:20Z,
|
33
34
|
file_format: null,
|
34
35
|
status: completed,
|
35
|
-
media_url: https://voice.bandwidth.com/api/v2/accounts/9900000/conferences/conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9/recordings/r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833/media
|
36
|
+
media_url: https://voice.bandwidth.com/api/v2/accounts/9900000/conferences/conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9/recordings/r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833/media,
|
37
|
+
recording_name: my-recording-name
|
36
38
|
)
|
37
39
|
```
|
38
40
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: letstalk@bandwidth.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.8.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -57,7 +57,7 @@ module Bandwidth
|
|
57
57
|
# header parameters
|
58
58
|
header_params = opts[:header_params] || {}
|
59
59
|
# HTTP header 'Accept' (if needed)
|
60
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
61
61
|
# HTTP header 'Content-Type'
|
62
62
|
content_type = @api_client.select_header_content_type(['application/json'])
|
63
63
|
if !content_type.nil?
|
@@ -131,7 +131,7 @@ module Bandwidth
|
|
131
131
|
# header parameters
|
132
132
|
header_params = opts[:header_params] || {}
|
133
133
|
# HTTP header 'Accept' (if needed)
|
134
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
134
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
135
135
|
|
136
136
|
# form parameters
|
137
137
|
form_params = opts[:form_params] || {}
|
@@ -223,7 +223,7 @@ module Bandwidth
|
|
223
223
|
# header parameters
|
224
224
|
header_params = opts[:header_params] || {}
|
225
225
|
# HTTP header 'Accept' (if needed)
|
226
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
226
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
227
227
|
|
228
228
|
# form parameters
|
229
229
|
form_params = opts[:form_params] || {}
|
@@ -298,7 +298,7 @@ module Bandwidth
|
|
298
298
|
# header parameters
|
299
299
|
header_params = opts[:header_params] || {}
|
300
300
|
# HTTP header 'Accept' (if needed)
|
301
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
301
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
302
302
|
# HTTP header 'Content-Type'
|
303
303
|
content_type = @api_client.select_header_content_type(['application/json'])
|
304
304
|
if !content_type.nil?
|
@@ -378,7 +378,7 @@ module Bandwidth
|
|
378
378
|
# header parameters
|
379
379
|
header_params = opts[:header_params] || {}
|
380
380
|
# HTTP header 'Accept' (if needed)
|
381
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
381
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
382
382
|
# HTTP header 'Content-Type'
|
383
383
|
content_type = @api_client.select_header_content_type(['application/xml'])
|
384
384
|
if !content_type.nil?
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: letstalk@bandwidth.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.8.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -63,7 +63,7 @@ module Bandwidth
|
|
63
63
|
# header parameters
|
64
64
|
header_params = opts[:header_params] || {}
|
65
65
|
# HTTP header 'Accept' (if needed)
|
66
|
-
header_params['Accept'] = @api_client.select_header_accept(['audio/vnd.wave', 'audio/mpeg', 'application/json'])
|
66
|
+
header_params['Accept'] = @api_client.select_header_accept(['audio/vnd.wave', 'audio/mpeg', 'application/json']) unless header_params['Accept']
|
67
67
|
|
68
68
|
# form parameters
|
69
69
|
form_params = opts[:form_params] || {}
|
@@ -132,7 +132,7 @@ module Bandwidth
|
|
132
132
|
# header parameters
|
133
133
|
header_params = opts[:header_params] || {}
|
134
134
|
# HTTP header 'Accept' (if needed)
|
135
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
135
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
136
136
|
|
137
137
|
# form parameters
|
138
138
|
form_params = opts[:form_params] || {}
|
@@ -207,7 +207,7 @@ module Bandwidth
|
|
207
207
|
# header parameters
|
208
208
|
header_params = opts[:header_params] || {}
|
209
209
|
# HTTP header 'Accept' (if needed)
|
210
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
210
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
211
211
|
|
212
212
|
# form parameters
|
213
213
|
form_params = opts[:form_params] || {}
|
@@ -282,7 +282,7 @@ module Bandwidth
|
|
282
282
|
# header parameters
|
283
283
|
header_params = opts[:header_params] || {}
|
284
284
|
# HTTP header 'Accept' (if needed)
|
285
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
285
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
286
286
|
|
287
287
|
# form parameters
|
288
288
|
form_params = opts[:form_params] || {}
|
@@ -351,7 +351,7 @@ module Bandwidth
|
|
351
351
|
# header parameters
|
352
352
|
header_params = opts[:header_params] || {}
|
353
353
|
# HTTP header 'Accept' (if needed)
|
354
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
354
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
355
355
|
|
356
356
|
# form parameters
|
357
357
|
form_params = opts[:form_params] || {}
|
@@ -437,7 +437,7 @@ module Bandwidth
|
|
437
437
|
# header parameters
|
438
438
|
header_params = opts[:header_params] || {}
|
439
439
|
# HTTP header 'Accept' (if needed)
|
440
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
440
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
441
441
|
|
442
442
|
# form parameters
|
443
443
|
form_params = opts[:form_params] || {}
|
@@ -512,7 +512,7 @@ module Bandwidth
|
|
512
512
|
# header parameters
|
513
513
|
header_params = opts[:header_params] || {}
|
514
514
|
# HTTP header 'Accept' (if needed)
|
515
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
515
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
516
516
|
# HTTP header 'Content-Type'
|
517
517
|
content_type = @api_client.select_header_content_type(['application/json'])
|
518
518
|
if !content_type.nil?
|
@@ -592,7 +592,7 @@ module Bandwidth
|
|
592
592
|
# header parameters
|
593
593
|
header_params = opts[:header_params] || {}
|
594
594
|
# HTTP header 'Accept' (if needed)
|
595
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
595
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
596
596
|
# HTTP header 'Content-Type'
|
597
597
|
content_type = @api_client.select_header_content_type(['application/xml'])
|
598
598
|
if !content_type.nil?
|
@@ -678,7 +678,7 @@ module Bandwidth
|
|
678
678
|
# header parameters
|
679
679
|
header_params = opts[:header_params] || {}
|
680
680
|
# HTTP header 'Accept' (if needed)
|
681
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
681
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
682
682
|
# HTTP header 'Content-Type'
|
683
683
|
content_type = @api_client.select_header_content_type(['application/json'])
|
684
684
|
if !content_type.nil?
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: letstalk@bandwidth.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.8.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -57,7 +57,7 @@ module Bandwidth
|
|
57
57
|
# header parameters
|
58
58
|
header_params = opts[:header_params] || {}
|
59
59
|
# HTTP header 'Accept' (if needed)
|
60
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
61
61
|
|
62
62
|
# form parameters
|
63
63
|
form_params = opts[:form_params] || {}
|
@@ -126,7 +126,7 @@ module Bandwidth
|
|
126
126
|
# header parameters
|
127
127
|
header_params = opts[:header_params] || {}
|
128
128
|
# HTTP header 'Accept' (if needed)
|
129
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', 'application/json'])
|
129
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', 'application/json']) unless header_params['Accept']
|
130
130
|
|
131
131
|
# form parameters
|
132
132
|
form_params = opts[:form_params] || {}
|
@@ -191,7 +191,7 @@ module Bandwidth
|
|
191
191
|
# header parameters
|
192
192
|
header_params = opts[:header_params] || {}
|
193
193
|
# HTTP header 'Accept' (if needed)
|
194
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
194
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
195
195
|
header_params[:'Continuation-Token'] = opts[:'continuation_token'] if !opts[:'continuation_token'].nil?
|
196
196
|
|
197
197
|
# form parameters
|
@@ -271,7 +271,7 @@ module Bandwidth
|
|
271
271
|
# header parameters
|
272
272
|
header_params = opts[:header_params] || {}
|
273
273
|
# HTTP header 'Accept' (if needed)
|
274
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
274
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
275
275
|
# HTTP header 'Content-Type'
|
276
276
|
content_type = @api_client.select_header_content_type(['application/json', 'application/ogg', 'application/pdf', 'application/rtf', 'application/zip', 'application/x-tar', 'application/xml', 'application/gzip', 'application/x-bzip2', 'application/x-gzip', 'application/smil', 'application/javascript', 'audio/mp4', 'audio/mpeg', 'audio/ogg', 'audio/flac', 'audio/webm', 'audio/wav', 'audio/amr', 'audio/3gpp', 'image/bmp', 'image/gif', 'image/jpeg', 'image/pjpeg', 'image/png', 'image/svg+xml', 'image/tiff', 'image/webp', 'image/x-icon', 'text/css', 'text/csv', 'text/calendar', 'text/plain', 'text/javascript', 'text/vcard', 'text/vnd.wap.wml', 'text/xml', 'video/avi', 'video/mp4', 'video/mpeg', 'video/ogg', 'video/quicktime', 'video/webm', 'video/x-ms-wmv'])
|
277
277
|
if !content_type.nil?
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: letstalk@bandwidth.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.8.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -57,7 +57,7 @@ module Bandwidth
|
|
57
57
|
# header parameters
|
58
58
|
header_params = opts[:header_params] || {}
|
59
59
|
# HTTP header 'Accept' (if needed)
|
60
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
61
61
|
# HTTP header 'Content-Type'
|
62
62
|
content_type = @api_client.select_header_content_type(['application/json'])
|
63
63
|
if !content_type.nil?
|
@@ -170,7 +170,7 @@ module Bandwidth
|
|
170
170
|
# header parameters
|
171
171
|
header_params = opts[:header_params] || {}
|
172
172
|
# HTTP header 'Accept' (if needed)
|
173
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
173
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
174
174
|
|
175
175
|
# form parameters
|
176
176
|
form_params = opts[:form_params] || {}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: letstalk@bandwidth.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.8.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -57,7 +57,7 @@ module Bandwidth
|
|
57
57
|
# header parameters
|
58
58
|
header_params = opts[:header_params] || {}
|
59
59
|
# HTTP header 'Accept' (if needed)
|
60
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
61
61
|
# HTTP header 'Content-Type'
|
62
62
|
content_type = @api_client.select_header_content_type(['application/json'])
|
63
63
|
if !content_type.nil?
|
@@ -131,7 +131,7 @@ module Bandwidth
|
|
131
131
|
# header parameters
|
132
132
|
header_params = opts[:header_params] || {}
|
133
133
|
# HTTP header 'Accept' (if needed)
|
134
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
134
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
135
135
|
# HTTP header 'Content-Type'
|
136
136
|
content_type = @api_client.select_header_content_type(['application/json'])
|
137
137
|
if !content_type.nil?
|
@@ -205,7 +205,7 @@ module Bandwidth
|
|
205
205
|
# header parameters
|
206
206
|
header_params = opts[:header_params] || {}
|
207
207
|
# HTTP header 'Accept' (if needed)
|
208
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
208
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
209
209
|
# HTTP header 'Content-Type'
|
210
210
|
content_type = @api_client.select_header_content_type(['application/json'])
|
211
211
|
if !content_type.nil?
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: letstalk@bandwidth.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.8.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -57,7 +57,7 @@ module Bandwidth
|
|
57
57
|
# header parameters
|
58
58
|
header_params = opts[:header_params] || {}
|
59
59
|
# HTTP header 'Accept' (if needed)
|
60
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
61
61
|
# HTTP header 'Content-Type'
|
62
62
|
content_type = @api_client.select_header_content_type(['application/json'])
|
63
63
|
if !content_type.nil?
|
@@ -131,7 +131,7 @@ module Bandwidth
|
|
131
131
|
# header parameters
|
132
132
|
header_params = opts[:header_params] || {}
|
133
133
|
# HTTP header 'Accept' (if needed)
|
134
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
134
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
135
135
|
|
136
136
|
# form parameters
|
137
137
|
form_params = opts[:form_params] || {}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: letstalk@bandwidth.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.8.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -63,7 +63,7 @@ module Bandwidth
|
|
63
63
|
# header parameters
|
64
64
|
header_params = opts[:header_params] || {}
|
65
65
|
# HTTP header 'Accept' (if needed)
|
66
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
66
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
67
67
|
|
68
68
|
# form parameters
|
69
69
|
form_params = opts[:form_params] || {}
|
@@ -138,7 +138,7 @@ module Bandwidth
|
|
138
138
|
# header parameters
|
139
139
|
header_params = opts[:header_params] || {}
|
140
140
|
# HTTP header 'Accept' (if needed)
|
141
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
141
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
142
142
|
|
143
143
|
# form parameters
|
144
144
|
form_params = opts[:form_params] || {}
|
@@ -213,7 +213,7 @@ module Bandwidth
|
|
213
213
|
# header parameters
|
214
214
|
header_params = opts[:header_params] || {}
|
215
215
|
# HTTP header 'Accept' (if needed)
|
216
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
216
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
217
217
|
|
218
218
|
# form parameters
|
219
219
|
form_params = opts[:form_params] || {}
|
@@ -288,7 +288,7 @@ module Bandwidth
|
|
288
288
|
# header parameters
|
289
289
|
header_params = opts[:header_params] || {}
|
290
290
|
# HTTP header 'Accept' (if needed)
|
291
|
-
header_params['Accept'] = @api_client.select_header_accept(['audio/vnd.wave', 'audio/mpeg', 'application/json'])
|
291
|
+
header_params['Accept'] = @api_client.select_header_accept(['audio/vnd.wave', 'audio/mpeg', 'application/json']) unless header_params['Accept']
|
292
292
|
|
293
293
|
# form parameters
|
294
294
|
form_params = opts[:form_params] || {}
|
@@ -363,7 +363,7 @@ module Bandwidth
|
|
363
363
|
# header parameters
|
364
364
|
header_params = opts[:header_params] || {}
|
365
365
|
# HTTP header 'Accept' (if needed)
|
366
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
366
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
367
367
|
|
368
368
|
# form parameters
|
369
369
|
form_params = opts[:form_params] || {}
|
@@ -438,7 +438,7 @@ module Bandwidth
|
|
438
438
|
# header parameters
|
439
439
|
header_params = opts[:header_params] || {}
|
440
440
|
# HTTP header 'Accept' (if needed)
|
441
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
441
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
442
442
|
|
443
443
|
# form parameters
|
444
444
|
form_params = opts[:form_params] || {}
|
@@ -513,7 +513,7 @@ module Bandwidth
|
|
513
513
|
# header parameters
|
514
514
|
header_params = opts[:header_params] || {}
|
515
515
|
# HTTP header 'Accept' (if needed)
|
516
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
516
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
517
517
|
|
518
518
|
# form parameters
|
519
519
|
form_params = opts[:form_params] || {}
|
@@ -582,7 +582,7 @@ module Bandwidth
|
|
582
582
|
# header parameters
|
583
583
|
header_params = opts[:header_params] || {}
|
584
584
|
# HTTP header 'Accept' (if needed)
|
585
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
585
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
586
586
|
|
587
587
|
# form parameters
|
588
588
|
form_params = opts[:form_params] || {}
|
@@ -663,7 +663,7 @@ module Bandwidth
|
|
663
663
|
# header parameters
|
664
664
|
header_params = opts[:header_params] || {}
|
665
665
|
# HTTP header 'Accept' (if needed)
|
666
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
666
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
667
667
|
# HTTP header 'Content-Type'
|
668
668
|
content_type = @api_client.select_header_content_type(['application/json'])
|
669
669
|
if !content_type.nil?
|
@@ -743,7 +743,7 @@ module Bandwidth
|
|
743
743
|
# header parameters
|
744
744
|
header_params = opts[:header_params] || {}
|
745
745
|
# HTTP header 'Accept' (if needed)
|
746
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
746
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
747
747
|
# HTTP header 'Content-Type'
|
748
748
|
content_type = @api_client.select_header_content_type(['application/json'])
|
749
749
|
if !content_type.nil?
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: letstalk@bandwidth.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.8.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -51,7 +51,7 @@ module Bandwidth
|
|
51
51
|
# header parameters
|
52
52
|
header_params = opts[:header_params] || {}
|
53
53
|
# HTTP header 'Accept' (if needed)
|
54
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
55
55
|
|
56
56
|
# form parameters
|
57
57
|
form_params = opts[:form_params] || {}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: letstalk@bandwidth.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.8.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -63,7 +63,7 @@ module Bandwidth
|
|
63
63
|
# header parameters
|
64
64
|
header_params = opts[:header_params] || {}
|
65
65
|
# HTTP header 'Accept' (if needed)
|
66
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
66
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
67
67
|
|
68
68
|
# form parameters
|
69
69
|
form_params = opts[:form_params] || {}
|
@@ -138,7 +138,7 @@ module Bandwidth
|
|
138
138
|
# header parameters
|
139
139
|
header_params = opts[:header_params] || {}
|
140
140
|
# HTTP header 'Accept' (if needed)
|
141
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
141
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
142
142
|
|
143
143
|
# form parameters
|
144
144
|
form_params = opts[:form_params] || {}
|
@@ -207,7 +207,7 @@ module Bandwidth
|
|
207
207
|
# header parameters
|
208
208
|
header_params = opts[:header_params] || {}
|
209
209
|
# HTTP header 'Accept' (if needed)
|
210
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
210
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
211
211
|
|
212
212
|
# form parameters
|
213
213
|
form_params = opts[:form_params] || {}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: letstalk@bandwidth.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.8.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -164,35 +164,41 @@ module Bandwidth
|
|
164
164
|
request.options.on_data = Proc.new do |chunk, overall_received_bytes|
|
165
165
|
stream << chunk
|
166
166
|
end
|
167
|
+
|
167
168
|
stream
|
168
169
|
end
|
169
170
|
|
170
171
|
def deserialize_file(response, stream)
|
171
|
-
body
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
172
|
+
body = response.body
|
173
|
+
encoding = body.encoding
|
174
|
+
|
175
|
+
# reconstruct content
|
176
|
+
content = stream.join
|
177
|
+
content = content.unpack('m').join if response.headers['Content-Transfer-Encoding'] == 'binary'
|
178
|
+
content = content.force_encoding(encoding)
|
179
|
+
|
180
|
+
# return byte stream
|
181
|
+
return content if @config.return_binary_data == true
|
182
|
+
|
183
|
+
# return file instead of binary data
|
184
|
+
content_disposition = response.headers['Content-Disposition']
|
185
|
+
if content_disposition && content_disposition =~ /filename=/i
|
186
|
+
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
|
187
|
+
prefix = sanitize_filename(filename)
|
176
188
|
else
|
177
|
-
|
178
|
-
content_disposition = response.headers['Content-Disposition']
|
179
|
-
if content_disposition && content_disposition =~ /filename=/i
|
180
|
-
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
|
181
|
-
prefix = sanitize_filename(filename)
|
182
|
-
else
|
183
|
-
prefix = 'download-'
|
184
|
-
end
|
185
|
-
prefix = prefix + '-' unless prefix.end_with?('-')
|
186
|
-
encoding = body.encoding
|
187
|
-
tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
|
188
|
-
tempfile.write(stream.join.force_encoding(encoding))
|
189
|
-
tempfile.close
|
190
|
-
config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
|
191
|
-
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
192
|
-
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
193
|
-
"explicitly with `tempfile.delete`"
|
194
|
-
tempfile
|
189
|
+
prefix = 'download-'
|
195
190
|
end
|
191
|
+
prefix = prefix + '-' unless prefix.end_with?('-')
|
192
|
+
|
193
|
+
tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
|
194
|
+
tempfile.write(content)
|
195
|
+
tempfile.close
|
196
|
+
|
197
|
+
config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
|
198
|
+
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
199
|
+
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
200
|
+
"explicitly with `tempfile.delete`"
|
201
|
+
tempfile
|
196
202
|
end
|
197
203
|
|
198
204
|
def connection(opts)
|