bandwidth-sdk 18.3.0 → 19.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +27 -21
  3. data/README.md +2 -11
  4. data/Rakefile +1 -1
  5. data/bandwidth.yml +341 -122
  6. data/coverage/.last_run.json +1 -1
  7. data/coverage/.resultset.json +1308 -939
  8. data/coverage/index.html +21197 -17030
  9. data/custom_templates/README.mustache +1 -1
  10. data/custom_templates/api_client.mustache +3 -1
  11. data/custom_templates/configuration.mustache +18 -12
  12. data/custom_templates/gem.mustache +4 -2
  13. data/docs/Callback.md +1 -0
  14. data/docs/CallsApi.md +5 -25
  15. data/docs/ConferencesApi.md +9 -45
  16. data/docs/DisconnectCallback.md +6 -2
  17. data/docs/EndpointsApi.md +5 -25
  18. data/docs/InboundCallback.md +1 -1
  19. data/docs/InboundCallbackMessage.md +2 -0
  20. data/docs/InitiateCallback.md +1 -1
  21. data/docs/LookupResult.md +2 -2
  22. data/docs/MFAApi.md +3 -15
  23. data/docs/MediaApi.md +7 -23
  24. data/docs/Message.md +1 -1
  25. data/docs/MessagesApi.md +2 -10
  26. data/docs/MultiChannelAction.md +3 -3
  27. data/docs/MultiChannelActionCalendarEvent.md +3 -3
  28. data/docs/MultiChannelApi.md +1 -5
  29. data/docs/PhoneNumberLookupApi.md +3 -15
  30. data/docs/RbmActionBase.md +3 -3
  31. data/docs/RbmActionDial.md +3 -3
  32. data/docs/RbmActionOpenUrl.md +3 -3
  33. data/docs/RbmActionViewLocation.md +3 -3
  34. data/docs/RbmSession.md +26 -0
  35. data/docs/RbmSuggestionResponse.md +4 -4
  36. data/docs/RecordingsApi.md +10 -50
  37. data/docs/StatisticsApi.md +1 -5
  38. data/docs/StatusCallback.md +2 -2
  39. data/docs/StatusCallbackMessage.md +3 -1
  40. data/docs/TfvSubmissionInfo.md +2 -2
  41. data/docs/TollFreeVerificationApi.md +12 -48
  42. data/docs/TranscriptionsApi.md +3 -15
  43. data/docs/TransferDisconnectCallback.md +7 -1
  44. data/docs/VerificationRequest.md +2 -2
  45. data/docs/VerificationUpdateRequest.md +3 -3
  46. data/generate.sh +9 -0
  47. data/lib/bandwidth-sdk/api/calls_api.rb +5 -5
  48. data/lib/bandwidth-sdk/api/conferences_api.rb +9 -9
  49. data/lib/bandwidth-sdk/api/endpoints_api.rb +5 -5
  50. data/lib/bandwidth-sdk/api/media_api.rb +8 -8
  51. data/lib/bandwidth-sdk/api/messages_api.rb +2 -2
  52. data/lib/bandwidth-sdk/api/mfa_api.rb +3 -3
  53. data/lib/bandwidth-sdk/api/multi_channel_api.rb +1 -1
  54. data/lib/bandwidth-sdk/api/phone_number_lookup_api.rb +3 -3
  55. data/lib/bandwidth-sdk/api/recordings_api.rb +10 -10
  56. data/lib/bandwidth-sdk/api/statistics_api.rb +1 -1
  57. data/lib/bandwidth-sdk/api/toll_free_verification_api.rb +15 -15
  58. data/lib/bandwidth-sdk/api/transcriptions_api.rb +3 -3
  59. data/lib/bandwidth-sdk/api_client.rb +3 -1
  60. data/lib/bandwidth-sdk/configuration.rb +18 -19
  61. data/lib/bandwidth-sdk/models/callback.rb +1 -0
  62. data/lib/bandwidth-sdk/models/disconnect_callback.rb +27 -5
  63. data/lib/bandwidth-sdk/models/inbound_callback_message.rb +10 -1
  64. data/lib/bandwidth-sdk/models/initiate_callback.rb +1 -1
  65. data/lib/bandwidth-sdk/models/list_message_item.rb +1 -0
  66. data/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb +1 -1
  67. data/lib/bandwidth-sdk/models/rbm_action_base.rb +1 -1
  68. data/lib/bandwidth-sdk/models/rbm_action_dial.rb +1 -1
  69. data/lib/bandwidth-sdk/models/rbm_action_open_url.rb +1 -1
  70. data/lib/bandwidth-sdk/models/rbm_action_view_location.rb +1 -1
  71. data/lib/bandwidth-sdk/models/rbm_session.rb +208 -0
  72. data/lib/bandwidth-sdk/models/rbm_suggestion_response.rb +2 -2
  73. data/lib/bandwidth-sdk/models/status_callback_message.rb +13 -4
  74. data/lib/bandwidth-sdk/models/status_callback_type_enum.rb +2 -1
  75. data/lib/bandwidth-sdk/models/tfv_submission_info.rb +2 -2
  76. data/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb +37 -5
  77. data/lib/bandwidth-sdk/models/verification_request.rb +2 -2
  78. data/lib/bandwidth-sdk/models/verification_update_request.rb +19 -2
  79. data/lib/bandwidth-sdk/version.rb +1 -1
  80. data/lib/bandwidth-sdk.rb +3 -2
  81. data/spec/smoke/calls_api_spec.rb +46 -46
  82. data/spec/smoke/conferences_api_spec.rb +1 -1
  83. data/spec/smoke/endpoints_api_spec.rb +2 -31
  84. data/spec/smoke/media_api_spec.rb +2 -0
  85. data/spec/smoke/messages_api_spec.rb +2 -24
  86. data/spec/smoke/mfa_api_spec.rb +4 -27
  87. data/spec/smoke/multi_channel_api_spec.rb +4 -2
  88. data/spec/smoke/phone_number_lookup_api_spec.rb +2 -0
  89. data/spec/smoke/recordings_api_spec.rb +1 -1
  90. data/spec/smoke/smoke_helper.rb +41 -0
  91. data/spec/smoke/statistics_api_spec.rb +2 -37
  92. data/spec/smoke/toll_free_verification_api_spec.rb +2 -0
  93. data/spec/smoke/transcriptions_api_spec.rb +1 -1
  94. data/spec/spec_helper.rb +0 -48
  95. data/spec/unit/api/calls_api_spec.rb +3 -1
  96. data/spec/unit/api/conferences_api_spec.rb +2 -0
  97. data/spec/unit/api/endpoints_api_spec.rb +2 -0
  98. data/spec/unit/api/media_api_spec.rb +2 -0
  99. data/spec/unit/api/messages_api_spec.rb +2 -0
  100. data/spec/unit/api/mfa_api_spec.rb +2 -0
  101. data/spec/unit/api/multi_channel_api_spec.rb +2 -0
  102. data/spec/unit/api/phone_number_lookup_api_spec.rb +2 -0
  103. data/spec/unit/api/recordings_api_spec.rb +2 -0
  104. data/spec/unit/api/statistics_api_spec.rb +2 -0
  105. data/spec/unit/api/toll_free_verification_api_spec.rb +2 -0
  106. data/spec/unit/api/transcriptions_api_spec.rb +2 -0
  107. data/spec/unit/client/api_client_spec.rb +70 -206
  108. data/spec/unit/client/configuration_spec.rb +22 -17
  109. data/spec/unit/constants.rb +6 -0
  110. data/spec/unit/models/callback_spec.rb +1 -0
  111. data/spec/unit/models/disconnect_callback_spec.rb +10 -2
  112. data/spec/unit/models/inbound_callback_message_spec.rb +20 -5
  113. data/spec/unit/models/list_message_item_spec.rb +1 -0
  114. data/spec/unit/models/rbm_session_spec.rb +95 -0
  115. data/spec/unit/models/status_callback_message_spec.rb +20 -5
  116. data/spec/unit/models/status_callback_type_enum_spec.rb +7 -1
  117. data/spec/unit/models/tfv_submission_wrapper_spec.rb +2 -1
  118. data/spec/unit/models/transfer_disconnect_callback_spec.rb +16 -4
  119. data/spec/unit/models/verification_update_request_spec.rb +4 -2
  120. metadata +10 -1
@@ -75,7 +75,7 @@ module Bandwidth
75
75
  return_type = opts[:debug_return_type]
76
76
 
77
77
  # auth_names
78
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
78
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
79
79
 
80
80
  new_options = opts.merge(
81
81
  :operation => :"RecordingsApi.delete_recording",
@@ -150,7 +150,7 @@ module Bandwidth
150
150
  return_type = opts[:debug_return_type]
151
151
 
152
152
  # auth_names
153
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
153
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
154
154
 
155
155
  new_options = opts.merge(
156
156
  :operation => :"RecordingsApi.delete_recording_media",
@@ -225,7 +225,7 @@ module Bandwidth
225
225
  return_type = opts[:debug_return_type]
226
226
 
227
227
  # auth_names
228
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
228
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
229
229
 
230
230
  new_options = opts.merge(
231
231
  :operation => :"RecordingsApi.delete_recording_transcription",
@@ -300,7 +300,7 @@ module Bandwidth
300
300
  return_type = opts[:debug_return_type] || 'File'
301
301
 
302
302
  # auth_names
303
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
303
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
304
304
 
305
305
  new_options = opts.merge(
306
306
  :operation => :"RecordingsApi.download_call_recording",
@@ -375,7 +375,7 @@ module Bandwidth
375
375
  return_type = opts[:debug_return_type] || 'CallRecordingMetadata'
376
376
 
377
377
  # auth_names
378
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
378
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
379
379
 
380
380
  new_options = opts.merge(
381
381
  :operation => :"RecordingsApi.get_call_recording",
@@ -450,7 +450,7 @@ module Bandwidth
450
450
  return_type = opts[:debug_return_type] || 'RecordingTranscriptions'
451
451
 
452
452
  # auth_names
453
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
453
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
454
454
 
455
455
  new_options = opts.merge(
456
456
  :operation => :"RecordingsApi.get_recording_transcription",
@@ -525,7 +525,7 @@ module Bandwidth
525
525
  return_type = opts[:debug_return_type] || 'Array<CallRecordingMetadata>'
526
526
 
527
527
  # auth_names
528
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
528
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
529
529
 
530
530
  new_options = opts.merge(
531
531
  :operation => :"RecordingsApi.list_account_call_recordings",
@@ -594,7 +594,7 @@ module Bandwidth
594
594
  return_type = opts[:debug_return_type] || 'Array<CallRecordingMetadata>'
595
595
 
596
596
  # auth_names
597
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
597
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
598
598
 
599
599
  new_options = opts.merge(
600
600
  :operation => :"RecordingsApi.list_call_recordings",
@@ -680,7 +680,7 @@ module Bandwidth
680
680
  return_type = opts[:debug_return_type]
681
681
 
682
682
  # auth_names
683
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
683
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
684
684
 
685
685
  new_options = opts.merge(
686
686
  :operation => :"RecordingsApi.transcribe_call_recording",
@@ -760,7 +760,7 @@ module Bandwidth
760
760
  return_type = opts[:debug_return_type]
761
761
 
762
762
  # auth_names
763
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
763
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
764
764
 
765
765
  new_options = opts.merge(
766
766
  :operation => :"RecordingsApi.update_call_recording_state",
@@ -63,7 +63,7 @@ module Bandwidth
63
63
  return_type = opts[:debug_return_type] || 'AccountStatistics'
64
64
 
65
65
  # auth_names
66
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
66
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
67
67
 
68
68
  new_options = opts.merge(
69
69
  :operation => :"StatisticsApi.get_statistics",
@@ -74,7 +74,7 @@ module Bandwidth
74
74
  return_type = opts[:debug_return_type] || 'WebhookSubscription'
75
75
 
76
76
  # auth_names
77
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
77
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
78
78
 
79
79
  new_options = opts.merge(
80
80
  :operation => :"TollFreeVerificationApi.create_webhook_subscription",
@@ -94,7 +94,7 @@ module Bandwidth
94
94
  end
95
95
 
96
96
  # Delete a Toll-Free Verification Submission
97
- # Delete a toll-free verification submission for a toll-free number.
97
+ # Delete a toll-free verification submission for a toll-free number. **Upcoming change (effective January 2027):** If a verification for the phone number is in progress, it will be cancelled and the submission will then be deleted asynchronously.
98
98
  # @param account_id [String] Your Bandwidth Account ID.
99
99
  # @param phone_number [String] Valid Toll-Free telephone number in E.164 format.
100
100
  # @param [Hash] opts the optional parameters
@@ -105,7 +105,7 @@ module Bandwidth
105
105
  end
106
106
 
107
107
  # Delete a Toll-Free Verification Submission
108
- # Delete a toll-free verification submission for a toll-free number.
108
+ # Delete a toll-free verification submission for a toll-free number. **Upcoming change (effective January 2027):** If a verification for the phone number is in progress, it will be cancelled and the submission will then be deleted asynchronously.
109
109
  # @param account_id [String] Your Bandwidth Account ID.
110
110
  # @param phone_number [String] Valid Toll-Free telephone number in E.164 format.
111
111
  # @param [Hash] opts the optional parameters
@@ -156,7 +156,7 @@ module Bandwidth
156
156
  return_type = opts[:debug_return_type]
157
157
 
158
158
  # auth_names
159
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
159
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
160
160
 
161
161
  new_options = opts.merge(
162
162
  :operation => :"TollFreeVerificationApi.delete_verification_request",
@@ -225,7 +225,7 @@ module Bandwidth
225
225
  return_type = opts[:debug_return_type]
226
226
 
227
227
  # auth_names
228
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
228
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
229
229
 
230
230
  new_options = opts.merge(
231
231
  :operation => :"TollFreeVerificationApi.delete_webhook_subscription",
@@ -307,7 +307,7 @@ module Bandwidth
307
307
  return_type = opts[:debug_return_type] || 'TfvStatus'
308
308
 
309
309
  # auth_names
310
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
310
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
311
311
 
312
312
  new_options = opts.merge(
313
313
  :operation => :"TollFreeVerificationApi.get_toll_free_verification_status",
@@ -364,7 +364,7 @@ module Bandwidth
364
364
  return_type = opts[:debug_return_type] || 'Array<String>'
365
365
 
366
366
  # auth_names
367
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
367
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
368
368
 
369
369
  new_options = opts.merge(
370
370
  :operation => :"TollFreeVerificationApi.list_toll_free_use_cases",
@@ -427,7 +427,7 @@ module Bandwidth
427
427
  return_type = opts[:debug_return_type] || 'WebhookSubscriptionsListBody'
428
428
 
429
429
  # auth_names
430
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
430
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
431
431
 
432
432
  new_options = opts.merge(
433
433
  :operation => :"TollFreeVerificationApi.list_webhook_subscriptions",
@@ -447,7 +447,7 @@ module Bandwidth
447
447
  end
448
448
 
449
449
  # Request Toll-Free Verification
450
- # Submit a request for verification of a toll-free phone number.
450
+ # Submit a request for verification of a toll-free phone number. **Upcoming change (effective January 2027):** If any phone number in the request already has a verification in progress, the request will be rejected with a `409 Conflict`. This check is all-or-nothing: if a single phone number conflicts, the entire request is rejected and **none** of the phone numbers in the request are submitted. Today, these requests are accepted with a `202`.
451
451
  # @param account_id [String] Your Bandwidth Account ID.
452
452
  # @param verification_request [VerificationRequest] Request for verification of a toll-free phone number.
453
453
  # @param [Hash] opts the optional parameters
@@ -458,7 +458,7 @@ module Bandwidth
458
458
  end
459
459
 
460
460
  # Request Toll-Free Verification
461
- # Submit a request for verification of a toll-free phone number.
461
+ # Submit a request for verification of a toll-free phone number. **Upcoming change (effective January 2027):** If any phone number in the request already has a verification in progress, the request will be rejected with a &#x60;409 Conflict&#x60;. This check is all-or-nothing: if a single phone number conflicts, the entire request is rejected and **none** of the phone numbers in the request are submitted. Today, these requests are accepted with a &#x60;202&#x60;.
462
462
  # @param account_id [String] Your Bandwidth Account ID.
463
463
  # @param verification_request [VerificationRequest] Request for verification of a toll-free phone number.
464
464
  # @param [Hash] opts the optional parameters
@@ -501,7 +501,7 @@ module Bandwidth
501
501
  return_type = opts[:debug_return_type]
502
502
 
503
503
  # auth_names
504
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
504
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
505
505
 
506
506
  new_options = opts.merge(
507
507
  :operation => :"TollFreeVerificationApi.request_toll_free_verification",
@@ -521,7 +521,7 @@ module Bandwidth
521
521
  end
522
522
 
523
523
  # Update Toll-Free Verification Request
524
- # Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true).
524
+ # Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true). Returns a `404` if no verification request exists for the phone number, and a `400` if the existing request is not eligible for resubmission. **Upcoming change (effective January 2027):** If a verification for the phone number is in progress, the update will be rejected with a `409 Conflict`.
525
525
  # @param account_id [String] Your Bandwidth Account ID.
526
526
  # @param phone_number [String] Valid Toll-Free telephone number in E.164 format.
527
527
  # @param tfv_submission_wrapper [TfvSubmissionWrapper] Update a request for verification of a toll-free phone number.
@@ -533,7 +533,7 @@ module Bandwidth
533
533
  end
534
534
 
535
535
  # Update Toll-Free Verification Request
536
- # Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true).
536
+ # Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true). Returns a &#x60;404&#x60; if no verification request exists for the phone number, and a &#x60;400&#x60; if the existing request is not eligible for resubmission. **Upcoming change (effective January 2027):** If a verification for the phone number is in progress, the update will be rejected with a &#x60;409 Conflict&#x60;.
537
537
  # @param account_id [String] Your Bandwidth Account ID.
538
538
  # @param phone_number [String] Valid Toll-Free telephone number in E.164 format.
539
539
  # @param tfv_submission_wrapper [TfvSubmissionWrapper] Update a request for verification of a toll-free phone number.
@@ -594,7 +594,7 @@ module Bandwidth
594
594
  return_type = opts[:debug_return_type]
595
595
 
596
596
  # auth_names
597
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
597
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
598
598
 
599
599
  new_options = opts.merge(
600
600
  :operation => :"TollFreeVerificationApi.update_toll_free_verification_request",
@@ -674,7 +674,7 @@ module Bandwidth
674
674
  return_type = opts[:debug_return_type] || 'WebhookSubscription'
675
675
 
676
676
  # auth_names
677
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
677
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
678
678
 
679
679
  new_options = opts.merge(
680
680
  :operation => :"TollFreeVerificationApi.update_webhook_subscription",
@@ -75,7 +75,7 @@ module Bandwidth
75
75
  return_type = opts[:debug_return_type]
76
76
 
77
77
  # auth_names
78
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
78
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
79
79
 
80
80
  new_options = opts.merge(
81
81
  :operation => :"TranscriptionsApi.delete_real_time_transcription",
@@ -150,7 +150,7 @@ module Bandwidth
150
150
  return_type = opts[:debug_return_type] || 'CallTranscriptionResponse'
151
151
 
152
152
  # auth_names
153
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
153
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
154
154
 
155
155
  new_options = opts.merge(
156
156
  :operation => :"TranscriptionsApi.get_real_time_transcription",
@@ -219,7 +219,7 @@ module Bandwidth
219
219
  return_type = opts[:debug_return_type] || 'Array<CallTranscriptionMetadata>'
220
220
 
221
221
  # auth_names
222
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
222
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
223
223
 
224
224
  new_options = opts.merge(
225
225
  :operation => :"TranscriptionsApi.list_real_time_transcriptions",
@@ -353,8 +353,10 @@ module Bandwidth
353
353
  # @param [Hash] query_params Query parameters
354
354
  # @param [String] auth_names Authentication scheme name
355
355
  def update_params_for_auth!(header_params, query_params, auth_names)
356
+ auth_settings = nil
356
357
  Array(auth_names).each do |auth_name|
357
- auth_setting = @config.auth_settings[auth_name]
358
+ auth_settings ||= @config.auth_settings
359
+ auth_setting = auth_settings[auth_name]
358
360
  next unless auth_setting
359
361
  case auth_setting[:in]
360
362
  when 'header' then header_params[auth_setting[:key]] = auth_setting[:value] unless auth_setting[:value].nil?
@@ -49,15 +49,25 @@ module Bandwidth
49
49
  # config.api_key_prefix['api_key'] = 'Token'
50
50
  attr_accessor :api_key_prefix
51
51
 
52
- # Defines the username used with HTTP basic authentication.
52
+ # HTTP basic authentication is no longer supported. Always nil.
53
53
  #
54
- # @return [String]
55
- attr_accessor :username
54
+ # @return [nil]
55
+ attr_reader :username
56
56
 
57
- # Defines the password used with HTTP basic authentication.
57
+ # HTTP basic authentication is no longer supported. Always nil.
58
58
  #
59
- # @return [String]
60
- attr_accessor :password
59
+ # @return [nil]
60
+ attr_reader :password
61
+
62
+ # @raise [ArgumentError] HTTP basic authentication is no longer supported
63
+ def username=(_username)
64
+ raise ArgumentError, 'HTTP basic authentication is no longer supported. Use client_id and client_secret instead.'
65
+ end
66
+
67
+ # @raise [ArgumentError] HTTP basic authentication is no longer supported
68
+ def password=(_password)
69
+ raise ArgumentError, 'HTTP basic authentication is no longer supported. Use client_id and client_secret instead.'
70
+ end
61
71
 
62
72
  # Defines the client ID used with OAuth2.
63
73
  #
@@ -281,27 +291,16 @@ module Bandwidth
281
291
  access_token_getter.call
282
292
  end
283
293
 
284
- # Gets Basic Auth token string
285
- def basic_auth_token
286
- 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
287
- end
288
-
289
294
  # Gets Bearer auth token string
290
295
  def oauth_bearer_token
291
- "Bearer #{access_token_with_refresh}" unless access_token_with_refresh.nil?
296
+ token = access_token_with_refresh
297
+ "Bearer #{token}" unless token.nil?
292
298
  end
293
299
 
294
300
 
295
301
  # Returns Auth Settings hash for api client.
296
302
  def auth_settings
297
303
  {
298
- 'Basic' =>
299
- {
300
- type: 'basic',
301
- in: 'header',
302
- key: 'Authorization',
303
- value: basic_auth_token
304
- },
305
304
  'OAuth2' =>
306
305
  {
307
306
  type: 'oauth2',
@@ -40,6 +40,7 @@ module Bandwidth
40
40
  :'message-sending' => :'StatusCallback',
41
41
  :'message-sent' => :'StatusCallback',
42
42
  :'requested-location-response' => :'InboundCallback',
43
+ :'session-started' => :'StatusCallback',
43
44
  :'suggestion-response' => :'InboundCallback'
44
45
  }
45
46
  end
@@ -69,9 +69,15 @@ module Bandwidth
69
69
  # (optional) The SIP Call-ID of the call's current SIP dialog with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists.
70
70
  attr_accessor :sip_call_id
71
71
 
72
- # (optional) The SIP status code returned by Bandwidth's SBC when it rejected an outbound call's INVITE (e.g. 486 for busy, 603 for decline). Present only when an outbound call was rejected by the SBC.
72
+ # (optional) The SIP status code of the final response that rejected an outbound call's (or transferred leg's) INVITE (e.g. 486 for busy, 603 for decline). Present only when the call was rejected with a SIP response.
73
73
  attr_accessor :sip_response_code
74
74
 
75
+ # (optional) The full SIP status line, exactly as received, of the final response that rejected an outbound call's INVITE. The reason phrase can help distinguish outcomes that share a status code, such as `603 Network Blocked` and `603 Decline`. Present only when an outbound call was rejected with a SIP response.
76
+ attr_accessor :sip_status_line
77
+
78
+ # (optional) Map of SIP headers, with lowercase keys (SIP headers are case-insensitive). On the Initiate callback, contains the customer-supplied X-* headers from the original INVITE; present only for inbound SIP URI calls with custom headers. On the Disconnect and Transfer Disconnect callbacks, contains a single `reason` key holding the raw, unmodified `Reason` header value from the final SIP response that rejected an outbound call (or transferred leg); present only when that response included a `Reason` header (for example, `v=analytics1` call-analytics block information from a terminating carrier). If the response carries more than one `Reason` header, all values are returned in the order received, separated by `, `. Note - on the Initiate callback, keys preserve the original SIP header name in lowercase rather than Bandwidth's usual camelCase JSON convention, since these are passthrough values from the caller's SIP INVITE, not Bandwidth-defined fields. If the same header name is sent more than once in the INVITE, only the last value is kept. The example shown is for the Initiate callback; on the Disconnect and Transfer Disconnect callbacks the only key is `reason`.
79
+ attr_accessor :sip_headers
80
+
75
81
  class EnumAttributeValidator
76
82
  attr_reader :datatype
77
83
  attr_reader :allowable_values
@@ -115,7 +121,9 @@ module Bandwidth
115
121
  :'error_id' => :'errorId',
116
122
  :'tag' => :'tag',
117
123
  :'sip_call_id' => :'sipCallId',
118
- :'sip_response_code' => :'sipResponseCode'
124
+ :'sip_response_code' => :'sipResponseCode',
125
+ :'sip_status_line' => :'sipStatusLine',
126
+ :'sip_headers' => :'sipHeaders'
119
127
  }
120
128
  end
121
129
 
@@ -150,7 +158,9 @@ module Bandwidth
150
158
  :'error_id' => :'String',
151
159
  :'tag' => :'String',
152
160
  :'sip_call_id' => :'String',
153
- :'sip_response_code' => :'Integer'
161
+ :'sip_response_code' => :'Integer',
162
+ :'sip_status_line' => :'String',
163
+ :'sip_headers' => :'Hash<String, String>'
154
164
  }
155
165
  end
156
166
 
@@ -256,6 +266,16 @@ module Bandwidth
256
266
  if attributes.key?(:'sip_response_code')
257
267
  self.sip_response_code = attributes[:'sip_response_code']
258
268
  end
269
+
270
+ if attributes.key?(:'sip_status_line')
271
+ self.sip_status_line = attributes[:'sip_status_line']
272
+ end
273
+
274
+ if attributes.key?(:'sip_headers')
275
+ if (value = attributes[:'sip_headers']).is_a?(Hash)
276
+ self.sip_headers = value
277
+ end
278
+ end
259
279
  end
260
280
 
261
281
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -296,7 +316,9 @@ module Bandwidth
296
316
  error_id == o.error_id &&
297
317
  tag == o.tag &&
298
318
  sip_call_id == o.sip_call_id &&
299
- sip_response_code == o.sip_response_code
319
+ sip_response_code == o.sip_response_code &&
320
+ sip_status_line == o.sip_status_line &&
321
+ sip_headers == o.sip_headers
300
322
  end
301
323
 
302
324
  # @see the `==` method
@@ -308,7 +330,7 @@ module Bandwidth
308
330
  # Calculates hash code according to all attributes.
309
331
  # @return [Integer] Hash code
310
332
  def hash
311
- [event_type, event_time, account_id, application_id, from, to, call_id, direction, call_url, enqueued_time, start_time, answer_time, end_time, cause, error_message, error_id, tag, sip_call_id, sip_response_code].hash
333
+ [event_type, event_time, account_id, application_id, from, to, call_id, direction, call_url, enqueued_time, start_time, answer_time, end_time, cause, error_message, error_id, tag, sip_call_id, sip_response_code, sip_status_line, sip_headers].hash
312
334
  end
313
335
 
314
336
  # Builds the object from hash
@@ -49,6 +49,8 @@ module Bandwidth
49
49
 
50
50
  attr_accessor :channel
51
51
 
52
+ attr_accessor :session
53
+
52
54
  attr_accessor :content
53
55
 
54
56
  attr_accessor :suggestion_response
@@ -93,6 +95,7 @@ module Bandwidth
93
95
  :'media' => :'media',
94
96
  :'priority' => :'priority',
95
97
  :'channel' => :'channel',
98
+ :'session' => :'session',
96
99
  :'content' => :'content',
97
100
  :'suggestion_response' => :'suggestionResponse',
98
101
  :'location_response' => :'locationResponse'
@@ -125,6 +128,7 @@ module Bandwidth
125
128
  :'media' => :'Array<String>',
126
129
  :'priority' => :'PriorityEnum',
127
130
  :'channel' => :'MultiChannelMessageChannelEnum',
131
+ :'session' => :'RbmSession',
128
132
  :'content' => :'MultiChannelMessageContent',
129
133
  :'suggestion_response' => :'RbmSuggestionResponse',
130
134
  :'location_response' => :'RbmLocationResponse'
@@ -232,6 +236,10 @@ module Bandwidth
232
236
  self.channel = attributes[:'channel']
233
237
  end
234
238
 
239
+ if attributes.key?(:'session')
240
+ self.session = attributes[:'session']
241
+ end
242
+
235
243
  if attributes.key?(:'content')
236
244
  self.content = attributes[:'content']
237
245
  end
@@ -398,6 +406,7 @@ module Bandwidth
398
406
  media == o.media &&
399
407
  priority == o.priority &&
400
408
  channel == o.channel &&
409
+ session == o.session &&
401
410
  content == o.content &&
402
411
  suggestion_response == o.suggestion_response &&
403
412
  location_response == o.location_response
@@ -412,7 +421,7 @@ module Bandwidth
412
421
  # Calculates hash code according to all attributes.
413
422
  # @return [Integer] Hash code
414
423
  def hash
415
- [id, owner, application_id, time, segment_count, direction, to, from, text, tag, media, priority, channel, content, suggestion_response, location_response].hash
424
+ [id, owner, application_id, time, segment_count, direction, to, from, text, tag, media, priority, channel, session, content, suggestion_response, location_response].hash
416
425
  end
417
426
 
418
427
  # Builds the object from hash
@@ -55,7 +55,7 @@ module Bandwidth
55
55
  # (optional) The SIP Call-ID of the call's current SIP dialog with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists.
56
56
  attr_accessor :sip_call_id
57
57
 
58
- # (optional) Map of customer-supplied X-* headers from the original INVITE. Keys are lowercase (SIP headers are case-insensitive). Present only for inbound SIP URI calls with custom headers. Note - keys preserve the original SIP header name in lowercase rather than Bandwidth's usual camelCase JSON convention, since these are passthrough values from the caller's SIP INVITE, not Bandwidth-defined fields. If the same header name is sent more than once in the INVITE, only the last value is kept.
58
+ # (optional) Map of SIP headers, with lowercase keys (SIP headers are case-insensitive). On the Initiate callback, contains the customer-supplied X-* headers from the original INVITE; present only for inbound SIP URI calls with custom headers. On the Disconnect and Transfer Disconnect callbacks, contains a single `reason` key holding the raw, unmodified `Reason` header value from the final SIP response that rejected an outbound call (or transferred leg); present only when that response included a `Reason` header (for example, `v=analytics1` call-analytics block information from a terminating carrier). If the response carries more than one `Reason` header, all values are returned in the order received, separated by `, `. Note - on the Initiate callback, keys preserve the original SIP header name in lowercase rather than Bandwidth's usual camelCase JSON convention, since these are passthrough values from the caller's SIP INVITE, not Bandwidth-defined fields. If the same header name is sent more than once in the INVITE, only the last value is kept. The example shown is for the Initiate callback; on the Disconnect and Transfer Disconnect callbacks the only key is `reason`.
59
59
  attr_accessor :sip_headers
60
60
 
61
61
  class EnumAttributeValidator
@@ -176,6 +176,7 @@ module Bandwidth
176
176
  Set.new([
177
177
  :'carrier_name',
178
178
  :'message_size',
179
+ :'message_length',
179
180
  :'attachment_count',
180
181
  :'recipient_count',
181
182
  :'campaign_class',
@@ -20,7 +20,7 @@ module Bandwidth
20
20
  # Displayed text for user to click
21
21
  attr_accessor :text
22
22
 
23
- # Base64 payload the customer receives when the reply is clicked.
23
+ # Payload the customer receives when the reply is clicked.
24
24
  attr_accessor :postback_data
25
25
 
26
26
  # The title of the event.
@@ -20,7 +20,7 @@ module Bandwidth
20
20
  # Displayed text for user to click
21
21
  attr_accessor :text
22
22
 
23
- # Base64 payload the customer receives when the reply is clicked.
23
+ # Payload the customer receives when the reply is clicked.
24
24
  attr_accessor :postback_data
25
25
 
26
26
  class EnumAttributeValidator
@@ -20,7 +20,7 @@ module Bandwidth
20
20
  # Displayed text for user to click
21
21
  attr_accessor :text
22
22
 
23
- # Base64 payload the customer receives when the reply is clicked.
23
+ # Payload the customer receives when the reply is clicked.
24
24
  attr_accessor :postback_data
25
25
 
26
26
  # The phone number to dial. Must be E164 format.
@@ -20,7 +20,7 @@ module Bandwidth
20
20
  # Displayed text for user to click
21
21
  attr_accessor :text
22
22
 
23
- # Base64 payload the customer receives when the reply is clicked.
23
+ # Payload the customer receives when the reply is clicked.
24
24
  attr_accessor :postback_data
25
25
 
26
26
  # The URL to open in browser. Must use http:// or https:// scheme.
@@ -20,7 +20,7 @@ module Bandwidth
20
20
  # Displayed text for user to click
21
21
  attr_accessor :text
22
22
 
23
- # Base64 payload the customer receives when the reply is clicked.
23
+ # Payload the customer receives when the reply is clicked.
24
24
  attr_accessor :postback_data
25
25
 
26
26
  # The latitude of the location. Must be in range [-90.000000, 90.000000].