bandwidth-sdk 13.1.0 → 13.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -4
  3. data/bandwidth-sdk.gemspec +1 -1
  4. data/coverage/.last_run.json +1 -1
  5. data/coverage/.resultset.json +125 -117
  6. data/coverage/index.html +1186 -1098
  7. data/lib/bandwidth-sdk/api/calls_api.rb +6 -6
  8. data/lib/bandwidth-sdk/api/conferences_api.rb +10 -10
  9. data/lib/bandwidth-sdk/api/media_api.rb +5 -5
  10. data/lib/bandwidth-sdk/api/messages_api.rb +3 -3
  11. data/lib/bandwidth-sdk/api/mfa_api.rb +4 -4
  12. data/lib/bandwidth-sdk/api/phone_number_lookup_api.rb +3 -3
  13. data/lib/bandwidth-sdk/api/recordings_api.rb +11 -11
  14. data/lib/bandwidth-sdk/api/statistics_api.rb +2 -2
  15. data/lib/bandwidth-sdk/api/transcriptions_api.rb +4 -4
  16. data/lib/bandwidth-sdk/api_client.rb +30 -24
  17. data/lib/bandwidth-sdk/api_error.rb +1 -1
  18. data/lib/bandwidth-sdk/configuration.rb +1 -1
  19. data/lib/bandwidth-sdk/models/account_statistics.rb +1 -1
  20. data/lib/bandwidth-sdk/models/answer_callback.rb +1 -1
  21. data/lib/bandwidth-sdk/models/bridge_complete_callback.rb +1 -1
  22. data/lib/bandwidth-sdk/models/bridge_target_complete_callback.rb +1 -1
  23. data/lib/bandwidth-sdk/models/call_direction_enum.rb +1 -1
  24. data/lib/bandwidth-sdk/models/call_recording_metadata.rb +1 -1
  25. data/lib/bandwidth-sdk/models/call_state.rb +1 -1
  26. data/lib/bandwidth-sdk/models/call_state_enum.rb +1 -1
  27. data/lib/bandwidth-sdk/models/call_transcription.rb +1 -1
  28. data/lib/bandwidth-sdk/models/call_transcription_detected_language_enum.rb +1 -1
  29. data/lib/bandwidth-sdk/models/call_transcription_metadata.rb +1 -1
  30. data/lib/bandwidth-sdk/models/call_transcription_response.rb +1 -1
  31. data/lib/bandwidth-sdk/models/call_transcription_track_enum.rb +1 -1
  32. data/lib/bandwidth-sdk/models/callback_method_enum.rb +1 -1
  33. data/lib/bandwidth-sdk/models/code_request.rb +1 -1
  34. data/lib/bandwidth-sdk/models/conference.rb +1 -1
  35. data/lib/bandwidth-sdk/models/conference_completed_callback.rb +1 -1
  36. data/lib/bandwidth-sdk/models/conference_created_callback.rb +1 -1
  37. data/lib/bandwidth-sdk/models/conference_member.rb +1 -1
  38. data/lib/bandwidth-sdk/models/conference_member_exit_callback.rb +1 -1
  39. data/lib/bandwidth-sdk/models/conference_member_join_callback.rb +1 -1
  40. data/lib/bandwidth-sdk/models/conference_recording_available_callback.rb +1 -1
  41. data/lib/bandwidth-sdk/models/conference_recording_metadata.rb +1 -1
  42. data/lib/bandwidth-sdk/models/conference_redirect_callback.rb +1 -1
  43. data/lib/bandwidth-sdk/models/conference_state_enum.rb +1 -1
  44. data/lib/bandwidth-sdk/models/create_call.rb +1 -1
  45. data/lib/bandwidth-sdk/models/create_call_response.rb +1 -1
  46. data/lib/bandwidth-sdk/models/create_lookup_response.rb +1 -1
  47. data/lib/bandwidth-sdk/models/create_message_request_error.rb +1 -1
  48. data/lib/bandwidth-sdk/models/deferred_result.rb +1 -1
  49. data/lib/bandwidth-sdk/models/disconnect_callback.rb +1 -1
  50. data/lib/bandwidth-sdk/models/diversion.rb +1 -1
  51. data/lib/bandwidth-sdk/models/dtmf_callback.rb +1 -1
  52. data/lib/bandwidth-sdk/models/field_error.rb +1 -1
  53. data/lib/bandwidth-sdk/models/file_format_enum.rb +1 -1
  54. data/lib/bandwidth-sdk/models/gather_callback.rb +1 -1
  55. data/lib/bandwidth-sdk/models/inbound_message_callback.rb +1 -1
  56. data/lib/bandwidth-sdk/models/inbound_message_callback_message.rb +1 -1
  57. data/lib/bandwidth-sdk/models/initiate_callback.rb +1 -1
  58. data/lib/bandwidth-sdk/models/list_message_direction_enum.rb +1 -1
  59. data/lib/bandwidth-sdk/models/list_message_item.rb +1 -1
  60. data/lib/bandwidth-sdk/models/lookup_request.rb +1 -1
  61. data/lib/bandwidth-sdk/models/lookup_result.rb +1 -1
  62. data/lib/bandwidth-sdk/models/lookup_status.rb +1 -1
  63. data/lib/bandwidth-sdk/models/lookup_status_enum.rb +1 -1
  64. data/lib/bandwidth-sdk/models/machine_detection_complete_callback.rb +1 -1
  65. data/lib/bandwidth-sdk/models/machine_detection_configuration.rb +1 -1
  66. data/lib/bandwidth-sdk/models/machine_detection_mode_enum.rb +1 -1
  67. data/lib/bandwidth-sdk/models/machine_detection_result.rb +1 -1
  68. data/lib/bandwidth-sdk/models/media.rb +1 -1
  69. data/lib/bandwidth-sdk/models/message.rb +1 -1
  70. data/lib/bandwidth-sdk/models/message_delivered_callback.rb +1 -1
  71. data/lib/bandwidth-sdk/models/message_delivered_callback_message.rb +1 -1
  72. data/lib/bandwidth-sdk/models/message_direction_enum.rb +1 -1
  73. data/lib/bandwidth-sdk/models/message_failed_callback.rb +1 -1
  74. data/lib/bandwidth-sdk/models/message_failed_callback_message.rb +1 -1
  75. data/lib/bandwidth-sdk/models/message_request.rb +1 -1
  76. data/lib/bandwidth-sdk/models/message_sending_callback.rb +1 -1
  77. data/lib/bandwidth-sdk/models/message_sending_callback_message.rb +1 -1
  78. data/lib/bandwidth-sdk/models/message_status_enum.rb +1 -1
  79. data/lib/bandwidth-sdk/models/message_type_enum.rb +1 -1
  80. data/lib/bandwidth-sdk/models/messages_list.rb +1 -1
  81. data/lib/bandwidth-sdk/models/messaging_code_response.rb +1 -1
  82. data/lib/bandwidth-sdk/models/messaging_request_error.rb +1 -1
  83. data/lib/bandwidth-sdk/models/mfa_forbidden_request_error.rb +1 -1
  84. data/lib/bandwidth-sdk/models/mfa_request_error.rb +1 -1
  85. data/lib/bandwidth-sdk/models/mfa_unauthorized_request_error.rb +1 -1
  86. data/lib/bandwidth-sdk/models/page_info.rb +1 -1
  87. data/lib/bandwidth-sdk/models/priority_enum.rb +1 -1
  88. data/lib/bandwidth-sdk/models/recording_available_callback.rb +1 -1
  89. data/lib/bandwidth-sdk/models/recording_complete_callback.rb +1 -1
  90. data/lib/bandwidth-sdk/models/recording_state_enum.rb +1 -1
  91. data/lib/bandwidth-sdk/models/recording_transcription_metadata.rb +1 -1
  92. data/lib/bandwidth-sdk/models/recording_transcriptions.rb +1 -1
  93. data/lib/bandwidth-sdk/models/redirect_callback.rb +1 -1
  94. data/lib/bandwidth-sdk/models/redirect_method_enum.rb +1 -1
  95. data/lib/bandwidth-sdk/models/stir_shaken.rb +1 -1
  96. data/lib/bandwidth-sdk/models/tag.rb +1 -1
  97. data/lib/bandwidth-sdk/models/tn_lookup_request_error.rb +1 -1
  98. data/lib/bandwidth-sdk/models/transcribe_recording.rb +1 -1
  99. data/lib/bandwidth-sdk/models/transcription.rb +1 -1
  100. data/lib/bandwidth-sdk/models/transcription_available_callback.rb +1 -1
  101. data/lib/bandwidth-sdk/models/transfer_answer_callback.rb +1 -1
  102. data/lib/bandwidth-sdk/models/transfer_complete_callback.rb +1 -1
  103. data/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb +1 -1
  104. data/lib/bandwidth-sdk/models/update_call.rb +1 -1
  105. data/lib/bandwidth-sdk/models/update_call_recording.rb +1 -1
  106. data/lib/bandwidth-sdk/models/update_conference.rb +1 -1
  107. data/lib/bandwidth-sdk/models/update_conference_member.rb +1 -1
  108. data/lib/bandwidth-sdk/models/verify_code_request.rb +1 -1
  109. data/lib/bandwidth-sdk/models/verify_code_response.rb +1 -1
  110. data/lib/bandwidth-sdk/models/voice_api_error.rb +1 -1
  111. data/lib/bandwidth-sdk/models/voice_code_response.rb +1 -1
  112. data/lib/bandwidth-sdk/version.rb +2 -2
  113. data/lib/bandwidth-sdk.rb +1 -1
  114. data/openapitools.json +1 -1
  115. data/spec/unit/api/conferences_api_spec.rb +3 -2
  116. data/spec/unit/api/media_api_spec.rb +3 -2
  117. data/spec/unit/api/recordings_api_spec.rb +2 -2
  118. metadata +2 -2
@@ -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.7.0
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.7.0
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.7.0
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.7.0
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.7.0
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.7.0
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.7.0
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.7.0
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.7.0
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.7.0
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 = response.body
172
- if @config.return_binary_data == true
173
- # return byte stream
174
- encoding = body.encoding
175
- stream.join.force_encoding(encoding)
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
- # return file instead of binary data
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)
@@ -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.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -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.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -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.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -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.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -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.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -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.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -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.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -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.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -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.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -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.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -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.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -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.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -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.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -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.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -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.7.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12