From e53fb33742884dd838832347be1b7ded35385f37 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 3 Nov 2026 14:55:52 -0500 Subject: [PATCH 1/7] DX-4149 Remove Basic Auth --- README.md | 10 ---- bandwidth.yml | 16 ++--- breaking-changes.md | 3 + docs/CallsApi.md | 30 ++-------- docs/ConferencesApi.md | 54 +++-------------- docs/EndpointsApi.md | 30 ++-------- docs/LookupResult.md | 4 +- docs/MFAApi.md | 18 +----- docs/MediaApi.md | 24 ++------ docs/MessagesApi.md | 12 +--- docs/MultiChannelApi.md | 6 +- docs/PhoneNumberLookupApi.md | 18 +----- docs/RecordingsApi.md | 60 ++++--------------- docs/StatisticsApi.md | 6 +- docs/TollFreeVerificationApi.md | 54 +++-------------- docs/TranscriptionsApi.md | 18 +----- lib/bandwidth-sdk/api/calls_api.rb | 10 ++-- lib/bandwidth-sdk/api/conferences_api.rb | 18 +++--- lib/bandwidth-sdk/api/endpoints_api.rb | 10 ++-- lib/bandwidth-sdk/api/media_api.rb | 8 +-- lib/bandwidth-sdk/api/messages_api.rb | 4 +- lib/bandwidth-sdk/api/mfa_api.rb | 6 +- lib/bandwidth-sdk/api/multi_channel_api.rb | 2 +- .../api/phone_number_lookup_api.rb | 6 +- lib/bandwidth-sdk/api/recordings_api.rb | 20 +++---- lib/bandwidth-sdk/api/statistics_api.rb | 2 +- .../api/toll_free_verification_api.rb | 18 +++--- lib/bandwidth-sdk/api/transcriptions_api.rb | 6 +- lib/bandwidth-sdk/configuration.rb | 7 --- 29 files changed, 119 insertions(+), 361 deletions(-) create mode 100644 breaking-changes.md diff --git a/README.md b/README.md index f86216e1..7c9b430e 100644 --- a/README.md +++ b/README.md @@ -80,12 +80,6 @@ require 'bandwidth-sdk' # Setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR_USERNAME' - config.password = 'YOUR_PASSWORD' - # Configure faraday connection - config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' } - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR_ACCESS TOKEN' # Or use your client ID and client secret to obtain an access token @@ -384,10 +378,6 @@ Class | Method | HTTP request | Description Authentication schemes defined for the API: -### Basic - -- **Type**: HTTP basic authentication - ### OAuth2 diff --git a/bandwidth.yml b/bandwidth.yml index 0df9d764..338259b4 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -8,7 +8,6 @@ info: email: letstalk@bandwidth.com version: 1.0.0 security: - - Basic: [] - OAuth2: [] tags: - name: Messages @@ -10129,19 +10128,12 @@ components: updateEndpointBxmlRequestExample: $ref: '#/components/examples/updateEndpointBxmlRequestExample' securitySchemes: - Basic: - type: http - scheme: basic - description: >- - Basic authentication is a simple authentication scheme built into the - HTTP protocol. To use it, send your HTTP requests with an - `Authorization` header that contains the word `Basic` followed by a - space and a Base64-encoded string `username:password`. - - - - Example: `Authorization: Basic ZGVtbZpwQDU1dzByZA==` OAuth2: type: oauth2 + description: >- + OAuth2 client credentials. For information on obtaining credentials, see + [Credentials + Management](https://dev.bandwidth.com/docs/account/credentials/management/). flows: clientCredentials: tokenUrl: https://api.bandwidth.com/api/v1/oauth2/token diff --git a/breaking-changes.md b/breaking-changes.md new file mode 100644 index 00000000..0677a7f0 --- /dev/null +++ b/breaking-changes.md @@ -0,0 +1,3 @@ +# Breaking Changes + +None. diff --git a/docs/CallsApi.md b/docs/CallsApi.md index b0f61d3e..d51acaf2 100644 --- a/docs/CallsApi.md +++ b/docs/CallsApi.md @@ -26,10 +26,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -78,7 +74,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -101,10 +97,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -153,7 +145,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -176,10 +168,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -242,7 +230,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -265,10 +253,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -318,7 +302,7 @@ nil (empty response body) ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -341,10 +325,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -397,7 +377,7 @@ nil (empty response body) ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/ConferencesApi.md b/docs/ConferencesApi.md index 743ef413..7b313f8d 100644 --- a/docs/ConferencesApi.md +++ b/docs/ConferencesApi.md @@ -30,10 +30,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -84,7 +80,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -107,10 +103,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -159,7 +151,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -182,10 +174,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -236,7 +224,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -259,10 +247,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -313,7 +297,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -336,10 +320,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -388,7 +368,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -411,10 +391,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -473,7 +449,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -496,10 +472,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -549,7 +521,7 @@ nil (empty response body) ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -572,10 +544,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -628,7 +596,7 @@ nil (empty response body) ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -651,10 +619,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -706,7 +670,7 @@ nil (empty response body) ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/EndpointsApi.md b/docs/EndpointsApi.md index bae5ab8b..4fcf579a 100644 --- a/docs/EndpointsApi.md +++ b/docs/EndpointsApi.md @@ -26,10 +26,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -78,7 +74,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -101,10 +97,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -152,7 +144,7 @@ nil (empty response body) ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -175,10 +167,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -227,7 +215,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -250,10 +238,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -310,7 +294,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -333,10 +317,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -386,7 +366,7 @@ nil (empty response body) ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/LookupResult.md b/docs/LookupResult.md index a0c2aef2..1ada17a5 100644 --- a/docs/LookupResult.md +++ b/docs/LookupResult.md @@ -32,8 +32,8 @@ instance = Bandwidth::LookupResult.new( deactivation_date: 2025-06-20 18:35, deactivation_event: null, latest_message_delivery_status: null, - initial_message_delivery_status_date: Fri Jun 20 00:00:00 UTC 2025, - latest_message_delivery_status_date: Sat Jun 21 00:00:00 UTC 2025, + initial_message_delivery_status_date: Thu Jun 19 20:00:00 EDT 2025, + latest_message_delivery_status_date: Fri Jun 20 20:00:00 EDT 2025, rcs_enabled: true ) ``` diff --git a/docs/MFAApi.md b/docs/MFAApi.md index 96b14b48..0d323630 100644 --- a/docs/MFAApi.md +++ b/docs/MFAApi.md @@ -24,10 +24,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -76,7 +72,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -99,10 +95,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -151,7 +143,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -174,10 +166,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -226,7 +214,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/MediaApi.md b/docs/MediaApi.md index 8c800661..950c0efe 100644 --- a/docs/MediaApi.md +++ b/docs/MediaApi.md @@ -25,10 +25,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -76,7 +72,7 @@ nil (empty response body) ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -99,10 +95,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -151,7 +143,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -174,10 +166,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -228,7 +216,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -251,10 +239,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -310,7 +294,7 @@ nil (empty response body) ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/MessagesApi.md b/docs/MessagesApi.md index 4aa303ae..35d6d114 100644 --- a/docs/MessagesApi.md +++ b/docs/MessagesApi.md @@ -23,10 +23,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -75,7 +71,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -98,10 +94,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -204,7 +196,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/MultiChannelApi.md b/docs/MultiChannelApi.md index 2bfbe583..185adce0 100644 --- a/docs/MultiChannelApi.md +++ b/docs/MultiChannelApi.md @@ -22,10 +22,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -74,7 +70,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/PhoneNumberLookupApi.md b/docs/PhoneNumberLookupApi.md index b3c38843..cc09933a 100644 --- a/docs/PhoneNumberLookupApi.md +++ b/docs/PhoneNumberLookupApi.md @@ -24,10 +24,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -76,7 +72,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -99,10 +95,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -151,7 +143,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -174,10 +166,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -226,7 +214,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/RecordingsApi.md b/docs/RecordingsApi.md index f95bf9f0..eca620e8 100644 --- a/docs/RecordingsApi.md +++ b/docs/RecordingsApi.md @@ -31,10 +31,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -84,7 +80,7 @@ nil (empty response body) ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -107,10 +103,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -160,7 +152,7 @@ nil (empty response body) ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -183,10 +175,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -236,7 +224,7 @@ nil (empty response body) ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -259,10 +247,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -313,7 +297,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -336,10 +320,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -390,7 +370,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -413,10 +393,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -467,7 +443,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -490,10 +466,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -550,7 +522,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -573,10 +545,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -625,7 +593,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -648,10 +616,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -703,7 +667,7 @@ nil (empty response body) ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -726,10 +690,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -779,7 +739,7 @@ nil (empty response body) ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/StatisticsApi.md b/docs/StatisticsApi.md index 15fa3fcb..d649b289 100644 --- a/docs/StatisticsApi.md +++ b/docs/StatisticsApi.md @@ -22,10 +22,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -72,7 +68,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/TollFreeVerificationApi.md b/docs/TollFreeVerificationApi.md index 1646e37b..be38871b 100644 --- a/docs/TollFreeVerificationApi.md +++ b/docs/TollFreeVerificationApi.md @@ -30,10 +30,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -82,7 +78,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -105,10 +101,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -156,7 +148,7 @@ nil (empty response body) ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -179,10 +171,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -230,7 +218,7 @@ nil (empty response body) ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -253,10 +241,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -305,7 +289,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -328,10 +312,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -375,7 +355,7 @@ This endpoint does not need any parameter. ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -398,10 +378,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -448,7 +424,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -471,10 +447,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -522,7 +494,7 @@ nil (empty response body) ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -545,10 +517,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -598,7 +566,7 @@ nil (empty response body) ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -621,10 +589,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -675,7 +639,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/TranscriptionsApi.md b/docs/TranscriptionsApi.md index ea2a4beb..2503d94a 100644 --- a/docs/TranscriptionsApi.md +++ b/docs/TranscriptionsApi.md @@ -24,10 +24,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -77,7 +73,7 @@ nil (empty response body) ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -100,10 +96,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -154,7 +146,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -177,10 +169,6 @@ require 'time' require 'bandwidth-sdk' # setup authorization Bandwidth.configure do |config| - # Configure HTTP basic authorization: Basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - # Configure OAuth2 access token for authorization: OAuth2 config.access_token = 'YOUR ACCESS TOKEN' end @@ -229,7 +217,7 @@ end ### Authorization -[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) +[OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/lib/bandwidth-sdk/api/calls_api.rb b/lib/bandwidth-sdk/api/calls_api.rb index b41a7c39..9a8ec91c 100644 --- a/lib/bandwidth-sdk/api/calls_api.rb +++ b/lib/bandwidth-sdk/api/calls_api.rb @@ -74,7 +74,7 @@ def create_call_with_http_info(account_id, create_call, opts = {}) return_type = opts[:debug_return_type] || 'CreateCallResponse' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"CallsApi.create_call", @@ -143,7 +143,7 @@ def get_call_state_with_http_info(account_id, call_id, opts = {}) return_type = opts[:debug_return_type] || 'CallState' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"CallsApi.get_call_state", @@ -235,7 +235,7 @@ def list_calls_with_http_info(account_id, opts = {}) return_type = opts[:debug_return_type] || 'Array' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"CallsApi.list_calls", @@ -315,7 +315,7 @@ def update_call_with_http_info(account_id, call_id, update_call, opts = {}) return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"CallsApi.update_call", @@ -395,7 +395,7 @@ def update_call_bxml_with_http_info(account_id, call_id, body, opts = {}) return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"CallsApi.update_call_bxml", diff --git a/lib/bandwidth-sdk/api/conferences_api.rb b/lib/bandwidth-sdk/api/conferences_api.rb index 8023df17..28d1e8ba 100644 --- a/lib/bandwidth-sdk/api/conferences_api.rb +++ b/lib/bandwidth-sdk/api/conferences_api.rb @@ -75,7 +75,7 @@ def download_conference_recording_with_http_info(account_id, conference_id, reco return_type = opts[:debug_return_type] || 'File' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"ConferencesApi.download_conference_recording", @@ -144,7 +144,7 @@ def get_conference_with_http_info(account_id, conference_id, opts = {}) return_type = opts[:debug_return_type] || 'Conference' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"ConferencesApi.get_conference", @@ -219,7 +219,7 @@ def get_conference_member_with_http_info(account_id, conference_id, member_id, o return_type = opts[:debug_return_type] || 'ConferenceMember' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"ConferencesApi.get_conference_member", @@ -294,7 +294,7 @@ def get_conference_recording_with_http_info(account_id, conference_id, recording return_type = opts[:debug_return_type] || 'ConferenceRecordingMetadata' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"ConferencesApi.get_conference_recording", @@ -363,7 +363,7 @@ def list_conference_recordings_with_http_info(account_id, conference_id, opts = return_type = opts[:debug_return_type] || 'Array' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"ConferencesApi.list_conference_recordings", @@ -449,7 +449,7 @@ def list_conferences_with_http_info(account_id, opts = {}) return_type = opts[:debug_return_type] || 'Array' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"ConferencesApi.list_conferences", @@ -529,7 +529,7 @@ def update_conference_with_http_info(account_id, conference_id, update_conferenc return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"ConferencesApi.update_conference", @@ -609,7 +609,7 @@ def update_conference_bxml_with_http_info(account_id, conference_id, body, opts return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"ConferencesApi.update_conference_bxml", @@ -695,7 +695,7 @@ def update_conference_member_with_http_info(account_id, conference_id, member_id return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"ConferencesApi.update_conference_member", diff --git a/lib/bandwidth-sdk/api/endpoints_api.rb b/lib/bandwidth-sdk/api/endpoints_api.rb index 7b5759c1..68265ac0 100644 --- a/lib/bandwidth-sdk/api/endpoints_api.rb +++ b/lib/bandwidth-sdk/api/endpoints_api.rb @@ -74,7 +74,7 @@ def create_endpoint_with_http_info(account_id, body, opts = {}) return_type = opts[:debug_return_type] || 'CreateEndpointResponse' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"EndpointsApi.create_endpoint", @@ -143,7 +143,7 @@ def delete_endpoint_with_http_info(account_id, endpoint_id, opts = {}) return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"EndpointsApi.delete_endpoint", @@ -212,7 +212,7 @@ def get_endpoint_with_http_info(account_id, endpoint_id, opts = {}) return_type = opts[:debug_return_type] || 'EndpointResponse' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"EndpointsApi.get_endpoint", @@ -295,7 +295,7 @@ def list_endpoints_with_http_info(account_id, opts = {}) return_type = opts[:debug_return_type] || 'ListEndpointsResponse' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"EndpointsApi.list_endpoints", @@ -375,7 +375,7 @@ def update_endpoint_bxml_with_http_info(account_id, endpoint_id, body, opts = {} return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"EndpointsApi.update_endpoint_bxml", diff --git a/lib/bandwidth-sdk/api/media_api.rb b/lib/bandwidth-sdk/api/media_api.rb index cbe04871..00b7dbea 100644 --- a/lib/bandwidth-sdk/api/media_api.rb +++ b/lib/bandwidth-sdk/api/media_api.rb @@ -69,7 +69,7 @@ def delete_media_with_http_info(account_id, media_id, opts = {}) return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"MediaApi.delete_media", @@ -138,7 +138,7 @@ def get_media_with_http_info(account_id, media_id, opts = {}) return_type = opts[:debug_return_type] || 'File' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"MediaApi.get_media", @@ -204,7 +204,7 @@ def list_media_with_http_info(account_id, opts = {}) return_type = opts[:debug_return_type] || 'Array' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"MediaApi.list_media", @@ -290,7 +290,7 @@ def upload_media_with_http_info(account_id, media_id, body, opts = {}) return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"MediaApi.upload_media", diff --git a/lib/bandwidth-sdk/api/messages_api.rb b/lib/bandwidth-sdk/api/messages_api.rb index eacc0e94..7a778493 100644 --- a/lib/bandwidth-sdk/api/messages_api.rb +++ b/lib/bandwidth-sdk/api/messages_api.rb @@ -74,7 +74,7 @@ def create_message_with_http_info(account_id, message_request, opts = {}) return_type = opts[:debug_return_type] || 'Message' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"MessagesApi.create_message", @@ -218,7 +218,7 @@ def list_messages_with_http_info(account_id, opts = {}) return_type = opts[:debug_return_type] || 'MessagesList' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"MessagesApi.list_messages", diff --git a/lib/bandwidth-sdk/api/mfa_api.rb b/lib/bandwidth-sdk/api/mfa_api.rb index bcd0eebd..1c6f1699 100644 --- a/lib/bandwidth-sdk/api/mfa_api.rb +++ b/lib/bandwidth-sdk/api/mfa_api.rb @@ -74,7 +74,7 @@ def generate_messaging_code_with_http_info(account_id, code_request, opts = {}) return_type = opts[:debug_return_type] || 'MessagingCodeResponse' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"MFAApi.generate_messaging_code", @@ -148,7 +148,7 @@ def generate_voice_code_with_http_info(account_id, code_request, opts = {}) return_type = opts[:debug_return_type] || 'VoiceCodeResponse' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"MFAApi.generate_voice_code", @@ -222,7 +222,7 @@ def verify_code_with_http_info(account_id, verify_code_request, opts = {}) return_type = opts[:debug_return_type] || 'VerifyCodeResponse' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"MFAApi.verify_code", diff --git a/lib/bandwidth-sdk/api/multi_channel_api.rb b/lib/bandwidth-sdk/api/multi_channel_api.rb index cfcdc351..da88b7ab 100644 --- a/lib/bandwidth-sdk/api/multi_channel_api.rb +++ b/lib/bandwidth-sdk/api/multi_channel_api.rb @@ -74,7 +74,7 @@ def create_multi_channel_message_with_http_info(account_id, multi_channel_messag return_type = opts[:debug_return_type] || 'CreateMultiChannelMessageResponse' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"MultiChannelApi.create_multi_channel_message", diff --git a/lib/bandwidth-sdk/api/phone_number_lookup_api.rb b/lib/bandwidth-sdk/api/phone_number_lookup_api.rb index 52fb1cbd..41213033 100644 --- a/lib/bandwidth-sdk/api/phone_number_lookup_api.rb +++ b/lib/bandwidth-sdk/api/phone_number_lookup_api.rb @@ -74,7 +74,7 @@ def create_async_bulk_lookup_with_http_info(account_id, async_lookup_request, op return_type = opts[:debug_return_type] || 'CreateAsyncBulkLookupResponse' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"PhoneNumberLookupApi.create_async_bulk_lookup", @@ -148,7 +148,7 @@ def create_sync_lookup_with_http_info(account_id, sync_lookup_request, opts = {} return_type = opts[:debug_return_type] || 'CreateSyncLookupResponse' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"PhoneNumberLookupApi.create_sync_lookup", @@ -217,7 +217,7 @@ def get_async_bulk_lookup_with_http_info(account_id, request_id, opts = {}) return_type = opts[:debug_return_type] || 'GetAsyncBulkLookupResponse' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"PhoneNumberLookupApi.get_async_bulk_lookup", diff --git a/lib/bandwidth-sdk/api/recordings_api.rb b/lib/bandwidth-sdk/api/recordings_api.rb index 73331162..55b72821 100644 --- a/lib/bandwidth-sdk/api/recordings_api.rb +++ b/lib/bandwidth-sdk/api/recordings_api.rb @@ -75,7 +75,7 @@ def delete_recording_with_http_info(account_id, call_id, recording_id, opts = {} return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"RecordingsApi.delete_recording", @@ -150,7 +150,7 @@ def delete_recording_media_with_http_info(account_id, call_id, recording_id, opt return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"RecordingsApi.delete_recording_media", @@ -225,7 +225,7 @@ def delete_recording_transcription_with_http_info(account_id, call_id, recording return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"RecordingsApi.delete_recording_transcription", @@ -300,7 +300,7 @@ def download_call_recording_with_http_info(account_id, call_id, recording_id, op return_type = opts[:debug_return_type] || 'File' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"RecordingsApi.download_call_recording", @@ -375,7 +375,7 @@ def get_call_recording_with_http_info(account_id, call_id, recording_id, opts = return_type = opts[:debug_return_type] || 'CallRecordingMetadata' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"RecordingsApi.get_call_recording", @@ -450,7 +450,7 @@ def get_recording_transcription_with_http_info(account_id, call_id, recording_id return_type = opts[:debug_return_type] || 'RecordingTranscriptions' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"RecordingsApi.get_recording_transcription", @@ -525,7 +525,7 @@ def list_account_call_recordings_with_http_info(account_id, opts = {}) return_type = opts[:debug_return_type] || 'Array' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"RecordingsApi.list_account_call_recordings", @@ -594,7 +594,7 @@ def list_call_recordings_with_http_info(account_id, call_id, opts = {}) return_type = opts[:debug_return_type] || 'Array' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"RecordingsApi.list_call_recordings", @@ -680,7 +680,7 @@ def transcribe_call_recording_with_http_info(account_id, call_id, recording_id, return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"RecordingsApi.transcribe_call_recording", @@ -760,7 +760,7 @@ def update_call_recording_state_with_http_info(account_id, call_id, update_call_ return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"RecordingsApi.update_call_recording_state", diff --git a/lib/bandwidth-sdk/api/statistics_api.rb b/lib/bandwidth-sdk/api/statistics_api.rb index f841444a..79741c49 100644 --- a/lib/bandwidth-sdk/api/statistics_api.rb +++ b/lib/bandwidth-sdk/api/statistics_api.rb @@ -63,7 +63,7 @@ def get_statistics_with_http_info(account_id, opts = {}) return_type = opts[:debug_return_type] || 'AccountStatistics' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"StatisticsApi.get_statistics", diff --git a/lib/bandwidth-sdk/api/toll_free_verification_api.rb b/lib/bandwidth-sdk/api/toll_free_verification_api.rb index b62c4929..d00d3461 100644 --- a/lib/bandwidth-sdk/api/toll_free_verification_api.rb +++ b/lib/bandwidth-sdk/api/toll_free_verification_api.rb @@ -74,7 +74,7 @@ def create_webhook_subscription_with_http_info(account_id, webhook_subscription_ return_type = opts[:debug_return_type] || 'WebhookSubscription' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"TollFreeVerificationApi.create_webhook_subscription", @@ -156,7 +156,7 @@ def delete_verification_request_with_http_info(account_id, phone_number, opts = return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"TollFreeVerificationApi.delete_verification_request", @@ -225,7 +225,7 @@ def delete_webhook_subscription_with_http_info(account_id, id, opts = {}) return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"TollFreeVerificationApi.delete_webhook_subscription", @@ -307,7 +307,7 @@ def get_toll_free_verification_status_with_http_info(account_id, phone_number, o return_type = opts[:debug_return_type] || 'TfvStatus' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"TollFreeVerificationApi.get_toll_free_verification_status", @@ -364,7 +364,7 @@ def list_toll_free_use_cases_with_http_info(opts = {}) return_type = opts[:debug_return_type] || 'Array' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"TollFreeVerificationApi.list_toll_free_use_cases", @@ -427,7 +427,7 @@ def list_webhook_subscriptions_with_http_info(account_id, opts = {}) return_type = opts[:debug_return_type] || 'WebhookSubscriptionsListBody' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"TollFreeVerificationApi.list_webhook_subscriptions", @@ -501,7 +501,7 @@ def request_toll_free_verification_with_http_info(account_id, verification_reque return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"TollFreeVerificationApi.request_toll_free_verification", @@ -594,7 +594,7 @@ def update_toll_free_verification_request_with_http_info(account_id, phone_numbe return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"TollFreeVerificationApi.update_toll_free_verification_request", @@ -674,7 +674,7 @@ def update_webhook_subscription_with_http_info(account_id, id, webhook_subscript return_type = opts[:debug_return_type] || 'WebhookSubscription' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"TollFreeVerificationApi.update_webhook_subscription", diff --git a/lib/bandwidth-sdk/api/transcriptions_api.rb b/lib/bandwidth-sdk/api/transcriptions_api.rb index 99c79076..b08e01a5 100644 --- a/lib/bandwidth-sdk/api/transcriptions_api.rb +++ b/lib/bandwidth-sdk/api/transcriptions_api.rb @@ -75,7 +75,7 @@ def delete_real_time_transcription_with_http_info(account_id, call_id, transcrip return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"TranscriptionsApi.delete_real_time_transcription", @@ -150,7 +150,7 @@ def get_real_time_transcription_with_http_info(account_id, call_id, transcriptio return_type = opts[:debug_return_type] || 'CallTranscriptionResponse' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"TranscriptionsApi.get_real_time_transcription", @@ -219,7 +219,7 @@ def list_real_time_transcriptions_with_http_info(account_id, call_id, opts = {}) return_type = opts[:debug_return_type] || 'Array' # auth_names - auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2'] + auth_names = opts[:debug_auth_names] || ['OAuth2'] new_options = opts.merge( :operation => :"TranscriptionsApi.list_real_time_transcriptions", diff --git a/lib/bandwidth-sdk/configuration.rb b/lib/bandwidth-sdk/configuration.rb index 303f043d..a34945f9 100644 --- a/lib/bandwidth-sdk/configuration.rb +++ b/lib/bandwidth-sdk/configuration.rb @@ -296,13 +296,6 @@ def oauth_bearer_token # Returns Auth Settings hash for api client. def auth_settings { - 'Basic' => - { - type: 'basic', - in: 'header', - key: 'Authorization', - value: basic_auth_token - }, 'OAuth2' => { type: 'oauth2', From 87e496071d5a86914835ff18fba2ff8051dfdef3 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 3 Nov 2026 15:27:44 -0500 Subject: [PATCH 2/7] update tests --- .github/workflows/deploy.yml | 4 --- .github/workflows/test-pr.yml | 4 --- .github/workflows/test-smoke.yml | 4 --- spec/smoke/endpoints_api_spec.rb | 31 --------------------- spec/smoke/messages_api_spec.rb | 24 ----------------- spec/smoke/mfa_api_spec.rb | 29 ++------------------ spec/smoke/multi_channel_api_spec.rb | 4 +-- spec/smoke/statistics_api_spec.rb | 37 -------------------------- spec/spec_helper.rb | 10 ++----- spec/unit/client/configuration_spec.rb | 8 ------ 10 files changed, 6 insertions(+), 149 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9d3b3afa..5eefe8fd 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,12 +14,8 @@ jobs: id-token: write env: BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }} - BW_USERNAME: ${{ secrets.BW_USERNAME }} - BW_PASSWORD: ${{ secrets.BW_PASSWORD }} BW_CLIENT_ID: ${{ secrets.BW_CLIENT_ID }} BW_CLIENT_SECRET: ${{ secrets.BW_CLIENT_SECRET }} - BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }} - BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }} BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }} BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }} BW_NUMBER: ${{ secrets.BW_NUMBER }} diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 8251972d..67a7a2f1 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -11,12 +11,8 @@ concurrency: env: BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID || '9900000' }} - BW_USERNAME: ${{ secrets.BW_USERNAME }} - BW_PASSWORD: ${{ secrets.BW_PASSWORD }} BW_CLIENT_ID: ${{ secrets.BW_CLIENT_ID }} BW_CLIENT_SECRET: ${{ secrets.BW_CLIENT_SECRET }} - BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }} - BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }} BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID || 'abc12345-6def-abc1-2345-6defabc12345' }} BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID || 'abc12345-6def-abc1-2345-6defabc12345' }} BW_NUMBER: ${{ secrets.BW_NUMBER || '+19195551234' }} diff --git a/.github/workflows/test-smoke.yml b/.github/workflows/test-smoke.yml index e8f73eca..244cbf42 100644 --- a/.github/workflows/test-smoke.yml +++ b/.github/workflows/test-smoke.yml @@ -13,12 +13,8 @@ concurrency: cancel-in-progress: true env: - BW_USERNAME: ${{ secrets.BW_USERNAME }} - BW_PASSWORD: ${{ secrets.BW_PASSWORD }} BW_CLIENT_ID: ${{ secrets.BW_CLIENT_ID }} BW_CLIENT_SECRET: ${{ secrets.BW_CLIENT_SECRET }} - BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }} - BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }} USER_NUMBER: ${{ secrets.USER_NUMBER }} BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }} MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }} diff --git a/spec/smoke/endpoints_api_spec.rb b/spec/smoke/endpoints_api_spec.rb index c394f726..e2bdabbb 100644 --- a/spec/smoke/endpoints_api_spec.rb +++ b/spec/smoke/endpoints_api_spec.rb @@ -9,14 +9,6 @@ client = Bandwidth::ApiClient.new(config) @endpoints_api_instance = Bandwidth::EndpointsApi.new(client) - unauthorized_config = Bandwidth::Configuration.new - unauthorized_config.configure do |config| - config.username = UNAUTHORIZED_USERNAME - config.password = UNAUTHORIZED_PASSWORD - end - unauthorized_client = Bandwidth::ApiClient.new(unauthorized_config) - @unauthorized_api_instance = Bandwidth::EndpointsApi.new(unauthorized_client) - $endpoint_id = '' end @@ -104,29 +96,6 @@ # HTTP 4XX Errors describe 'http error' do - it 'causes a 401 error on create' do - create_endpoint_body = Bandwidth::CreateWebRtcConnectionRequest.new( - type: Bandwidth::EndpointTypeEnum::WEBRTC, - direction: Bandwidth::EndpointDirectionEnum::BIDIRECTIONAL - ) - - expect { - @unauthorized_api_instance.create_endpoint_with_http_info(BW_ACCOUNT_ID, create_endpoint_body) - }.to raise_error { |e| - expect(e).to be_instance_of(Bandwidth::ApiError) - expect(e.code).to eq(401) - } - end - - it 'causes a 401 error on list' do - expect { - @unauthorized_api_instance.list_endpoints_with_http_info(BW_ACCOUNT_ID) - }.to raise_error { |e| - expect(e).to be_instance_of(Bandwidth::ApiError) - expect(e.code).to eq(401) - } - end - it 'causes a 404 error on get' do expect { @endpoints_api_instance.get_endpoint_with_http_info(BW_ACCOUNT_ID, 'does-not-exist') diff --git a/spec/smoke/messages_api_spec.rb b/spec/smoke/messages_api_spec.rb index 09f8e8ac..f3cbf5cd 100644 --- a/spec/smoke/messages_api_spec.rb +++ b/spec/smoke/messages_api_spec.rb @@ -110,30 +110,6 @@ expect(e.code).to eq(400) } end - - it 'causes a 401 error' do - config = Bandwidth::Configuration.new - config.configure do |config| - config.username = UNAUTHORIZED_USERNAME - config.password = UNAUTHORIZED_PASSWORD - end - client = Bandwidth::ApiClient.new(config) - unauthorized_instance = Bandwidth::MessagesApi.new(client) - - body = Bandwidth::MessageRequest.new( - application_id: BW_MESSAGING_APPLICATION_ID, - to: [USER_NUMBER], - from: BW_NUMBER, - text: 'ruby sdk 401 test' - ) - - expect { - unauthorized_instance.create_message_with_http_info(BW_ACCOUNT_ID, body) - }.to raise_error { |e| - expect(e).to be_instance_of(Bandwidth::ApiError) - expect(e.code).to eq(401) - } - end end end diff --git a/spec/smoke/mfa_api_spec.rb b/spec/smoke/mfa_api_spec.rb index 339491ad..0eacf705 100644 --- a/spec/smoke/mfa_api_spec.rb +++ b/spec/smoke/mfa_api_spec.rb @@ -7,8 +7,8 @@ before(:all) do config = Bandwidth::Configuration.new config.configure do |config| - config.username = BW_USERNAME - config.password = BW_PASSWORD + config.client_id = BW_CLIENT_ID + config.client_secret = BW_CLIENT_SECRET end client = Bandwidth::ApiClient.new(config) @mfa_api_instance = Bandwidth::MFAApi.new(client) @@ -88,30 +88,5 @@ expect(e.code).to eq(400) } end - - it 'causes a 403 error' do - config = Bandwidth::Configuration.new - config.configure do |config| - config.username = UNAUTHORIZED_USERNAME - config.password = UNAUTHORIZED_PASSWORD - end - client = Bandwidth::ApiClient.new(config) - forbidden_instance = Bandwidth::MFAApi.new(client) - - req_schema = Bandwidth::CodeRequest.new( - to: USER_NUMBER, - from: BW_NUMBER, - application_id: BW_MESSAGING_APPLICATION_ID, - message: message, - digits: digits - ) - - expect { - forbidden_instance.generate_messaging_code_with_http_info(BW_ACCOUNT_ID, req_schema) - }.to raise_error { |e| - expect(e).to be_instance_of(Bandwidth::ApiError) - expect(e.code).to eq(403) - } - end end end diff --git a/spec/smoke/multi_channel_api_spec.rb b/spec/smoke/multi_channel_api_spec.rb index 7166a9a2..f8545552 100644 --- a/spec/smoke/multi_channel_api_spec.rb +++ b/spec/smoke/multi_channel_api_spec.rb @@ -3,8 +3,8 @@ before(:all) do config = Bandwidth::Configuration.new config.configure do |config| - config.username = BW_USERNAME - config.password = BW_PASSWORD + config.client_id = BW_CLIENT_ID + config.client_secret = BW_CLIENT_SECRET end client = Bandwidth::ApiClient.new(config) @multi_channel_api_instance = Bandwidth::MultiChannelApi.new(client) diff --git a/spec/smoke/statistics_api_spec.rb b/spec/smoke/statistics_api_spec.rb index 626ec3fc..62d51e39 100644 --- a/spec/smoke/statistics_api_spec.rb +++ b/spec/smoke/statistics_api_spec.rb @@ -21,41 +21,4 @@ expect(data.max_call_queue_size).to eq(7500) end end - - # HTTP 4XX Errors - describe 'http error' do - it 'causes a 401 error' do - config = Bandwidth::Configuration.new - config.configure do |config| - config.username = UNAUTHORIZED_USERNAME - config.password = UNAUTHORIZED_PASSWORD - end - client = Bandwidth::ApiClient.new(config) - unauthorized_instance = Bandwidth::StatisticsApi.new(client) - - expect { - unauthorized_instance.get_statistics_with_http_info(BW_ACCOUNT_ID) - }.to raise_error { |e| - expect(e).to be_instance_of(Bandwidth::ApiError) - expect(e.code).to eq(401) - } - end - - it 'causes a 403 error' do - config = Bandwidth::Configuration.new - config.configure do |config| - config.username = FORBIDDEN_USERNAME - config.password = FORBIDDEN_PASSWORD - end - client = Bandwidth::ApiClient.new(config) - forbidden_instance = Bandwidth::StatisticsApi.new(client) - - expect { - forbidden_instance.get_statistics_with_http_info(BW_ACCOUNT_ID) - }.to raise_error { |e| - expect(e).to be_instance_of(Bandwidth::ApiError) - expect(e.code).to eq(403) - } - end - end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 7ad0c1b3..2105674e 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -43,12 +43,8 @@ RSpec.configure do |config| config.before(:suite) { begin - BW_USERNAME = ENV.fetch('BW_USERNAME') - BW_PASSWORD = ENV.fetch('BW_PASSWORD') BW_CLIENT_ID = ENV.fetch('BW_CLIENT_ID') BW_CLIENT_SECRET = ENV.fetch('BW_CLIENT_SECRET') - FORBIDDEN_USERNAME = ENV.fetch('BW_USERNAME_FORBIDDEN') - FORBIDDEN_PASSWORD = ENV.fetch('BW_PASSWORD_FORBIDDEN') BW_ACCOUNT_ID = ENV.fetch('BW_ACCOUNT_ID') BW_VOICE_APPLICATION_ID = ENV.fetch('BW_VOICE_APPLICATION_ID') BW_MESSAGING_APPLICATION_ID = ENV.fetch('BW_MESSAGING_APPLICATION_ID') @@ -68,8 +64,6 @@ SLEEP_TIME_S = 3 # default sleep time in seconds MAX_RETRIES = 40 - UNAUTHORIZED_USERNAME = 'bad_username' - UNAUTHORIZED_PASSWORD = 'bad_password' $active_calls = [] $complete_call_body = Bandwidth::UpdateCall.new( @@ -79,8 +73,8 @@ config.after(:suite) { Bandwidth.configure do |config| - config.username = BW_USERNAME - config.password = BW_PASSWORD + config.client_id = BW_CLIENT_ID + config.client_secret = BW_CLIENT_SECRET end calls_api = Bandwidth::CallsApi.new cleanup_calls($active_calls, calls_api) diff --git a/spec/unit/client/configuration_spec.rb b/spec/unit/client/configuration_spec.rb index ff62e78e..86104954 100644 --- a/spec/unit/client/configuration_spec.rb +++ b/spec/unit/client/configuration_spec.rb @@ -193,14 +193,6 @@ end describe '#auth_settings' do - it 'returns Basic auth entry for api client' do - basic_auth = config.auth_settings['Basic'] - expect(basic_auth[:type]).to eq('basic') - expect(basic_auth[:in]).to eq('header') - expect(basic_auth[:key]).to eq('Authorization') - expect(basic_auth[:value]).to eq('Basic Og==') - end - it 'returns OAuth2 auth entry for api client' do config.access_token = token config.access_token_getter = nil From e43f80eb9aa4691870cab4b811c184827a3aa178 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 3 Nov 2026 15:28:18 -0500 Subject: [PATCH 3/7] update examples --- bandwidth.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/bandwidth.yml b/bandwidth.yml index 338259b4..b29fed02 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -9308,7 +9308,6 @@ components: data: requestId: 004223a0-8b17-41b1-bf81-20732adf5590 status: IN_PROGRESS - results: [] errors: [] lookupInProgressExample: summary: Numbers Lookup In Progress @@ -9481,7 +9480,8 @@ components: links: [] data: {} errors: - - type: bad-request + - code: '1234' + type: bad-request description: >- Bad Request. Ensure that you have set the requestId as a URL path parameter. @@ -9494,7 +9494,6 @@ components: - type: Unauthorized description: You are not authorized to access this resource. code: '1' - page: null forbiddenExample: summary: Forbidden Error value: @@ -9504,14 +9503,14 @@ components: - type: Forbidden description: You do not have permission to access this resource. code: '2' - page: null unsupportedMediaTypeExample: summary: Unsupported Media Type Error value: links: [] data: {} errors: - - type: invalid-content-type + - code: '1234' + type: invalid-content-type description: >- Invalid content-type. Ensure that your content-type header is set to application/json. @@ -9521,7 +9520,8 @@ components: links: [] data: {} errors: - - type: not-found + - code: '1234' + type: not-found description: >- RequestId not found. Ensure that the requestId used in the URL path is valid and maps to a previous request that was submitted. @@ -9531,7 +9531,8 @@ components: links: [] data: {} errors: - - type: rate-limiting + - code: '1234' + type: rate-limiting description: >- Rate limit exceeded. Wait for the time specified in the Retry-After header before sending another request. From 3527fa956ebea5b8df66361545accf6e52b2a67b Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 3 Nov 2026 16:13:58 -0500 Subject: [PATCH 4/7] rm breaking changes md --- breaking-changes.md | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 breaking-changes.md diff --git a/breaking-changes.md b/breaking-changes.md deleted file mode 100644 index 0677a7f0..00000000 --- a/breaking-changes.md +++ /dev/null @@ -1,3 +0,0 @@ -# Breaking Changes - -None. From fb05b1d86ebd8c7c7cc214706bfa437a9e37cedd Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 3 Nov 2026 16:57:31 -0500 Subject: [PATCH 5/7] make basic auth fail loud --- custom_templates/configuration.mustache | 27 +++++++++++++++---------- custom_templates/gem.mustache | 4 ++-- lib/bandwidth-sdk.rb | 4 ++-- lib/bandwidth-sdk/configuration.rb | 27 +++++++++++++++---------- spec/unit/client/api_client_spec.rb | 16 ++------------- spec/unit/client/configuration_spec.rb | 24 +++++++++++++++------- 6 files changed, 55 insertions(+), 47 deletions(-) diff --git a/custom_templates/configuration.mustache b/custom_templates/configuration.mustache index b21388df..e4e4475d 100644 --- a/custom_templates/configuration.mustache +++ b/custom_templates/configuration.mustache @@ -42,15 +42,25 @@ module {{moduleName}} # config.api_key_prefix['api_key'] = 'Token' attr_accessor :api_key_prefix - # Defines the username used with HTTP basic authentication. + # HTTP basic authentication is no longer supported. Always nil. # - # @return [String] - attr_accessor :username + # @return [nil] + attr_reader :username - # Defines the password used with HTTP basic authentication. + # HTTP basic authentication is no longer supported. Always nil. # - # @return [String] - attr_accessor :password + # @return [nil] + attr_reader :password + + # @raise [ArgumentError] HTTP basic authentication is no longer supported + def username=(_username) + raise ArgumentError, 'HTTP basic authentication is no longer supported. Use client_id and client_secret instead.' + end + + # @raise [ArgumentError] HTTP basic authentication is no longer supported + def password=(_password) + raise ArgumentError, 'HTTP basic authentication is no longer supported. Use client_id and client_secret instead.' + end # Defines the client ID used with OAuth2. # @@ -265,11 +275,6 @@ module {{moduleName}} access_token_getter.call end - # Gets Basic Auth token string - def basic_auth_token - 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n") - end - {{#authMethods}} {{#isOAuth}} # Gets Bearer auth token string diff --git a/custom_templates/gem.mustache b/custom_templates/gem.mustache index e5e4e229..38f64ec9 100644 --- a/custom_templates/gem.mustache +++ b/custom_templates/gem.mustache @@ -89,8 +89,8 @@ module {{moduleName}} class << self # Customize default settings for the SDK using block. # {{moduleName}}.configure do |config| - # config.username = "xxx" - # config.password = "xxx" + # config.client_id = "xxx" + # config.client_secret = "xxx" # end # If no block given, return the default Configuration object. def configure diff --git a/lib/bandwidth-sdk.rb b/lib/bandwidth-sdk.rb index 26dd16dc..83f1d94e 100644 --- a/lib/bandwidth-sdk.rb +++ b/lib/bandwidth-sdk.rb @@ -277,8 +277,8 @@ module Bandwidth class << self # Customize default settings for the SDK using block. # Bandwidth.configure do |config| - # config.username = "xxx" - # config.password = "xxx" + # config.client_id = "xxx" + # config.client_secret = "xxx" # end # If no block given, return the default Configuration object. def configure diff --git a/lib/bandwidth-sdk/configuration.rb b/lib/bandwidth-sdk/configuration.rb index a34945f9..03af0bad 100644 --- a/lib/bandwidth-sdk/configuration.rb +++ b/lib/bandwidth-sdk/configuration.rb @@ -49,15 +49,25 @@ class Configuration # config.api_key_prefix['api_key'] = 'Token' attr_accessor :api_key_prefix - # Defines the username used with HTTP basic authentication. + # HTTP basic authentication is no longer supported. Always nil. # - # @return [String] - attr_accessor :username + # @return [nil] + attr_reader :username - # Defines the password used with HTTP basic authentication. + # HTTP basic authentication is no longer supported. Always nil. # - # @return [String] - attr_accessor :password + # @return [nil] + attr_reader :password + + # @raise [ArgumentError] HTTP basic authentication is no longer supported + def username=(_username) + raise ArgumentError, 'HTTP basic authentication is no longer supported. Use client_id and client_secret instead.' + end + + # @raise [ArgumentError] HTTP basic authentication is no longer supported + def password=(_password) + raise ArgumentError, 'HTTP basic authentication is no longer supported. Use client_id and client_secret instead.' + end # Defines the client ID used with OAuth2. # @@ -281,11 +291,6 @@ def access_token_with_refresh access_token_getter.call end - # Gets Basic Auth token string - def basic_auth_token - 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n") - end - # Gets Bearer auth token string def oauth_bearer_token token = access_token_with_refresh diff --git a/spec/unit/client/api_client_spec.rb b/spec/unit/client/api_client_spec.rb index 8a672d15..475d10e6 100644 --- a/spec/unit/client/api_client_spec.rb +++ b/spec/unit/client/api_client_spec.rb @@ -39,16 +39,6 @@ end end - describe '#basic_auth' do - it 'sets basic auth for the connection' do - api_client.config.username = 'username' - api_client.config.password = 'password' - api_client.basic_auth(faraday_connection) - expect(api_client.config.username).to eq('username') - expect(api_client.config.password).to eq('password') - end - end - describe '#json_mime?' do it 'checks if the given MIME is a JSON MIME' do expect(api_client_default.json_mime?(nil)).to eq false @@ -154,14 +144,12 @@ expect(authorization_headers.last).to eq('Bearer token_2') end - it 'uses Basic authentication when OAuth credentials are absent' do + it 'sends no Authorization header when OAuth credentials are absent' do config.client_id = nil config.client_secret = nil - config.username = 'username' - config.password = 'password' messages_api.list_messages('account') expect(token_requests).to be_empty - expect(authorization_headers).to eq(['Basic dXNlcm5hbWU6cGFzc3dvcmQ=']) + expect(authorization_headers).to eq([nil]) end [nil, []].each do |auth_names| diff --git a/spec/unit/client/configuration_spec.rb b/spec/unit/client/configuration_spec.rb index 86104954..fedea4e0 100644 --- a/spec/unit/client/configuration_spec.rb +++ b/spec/unit/client/configuration_spec.rb @@ -105,11 +105,21 @@ end end - describe '#basic_auth_token' do - it 'gets Basic Auth token string' do - config.username = 'username' - config.password = 'password' - expect(config.basic_auth_token).to eq('Basic dXNlcm5hbWU6cGFzc3dvcmQ=') + describe '#username=' do + it 'raises because basic auth is no longer supported' do + expect { + config.username = 'username' + }.to raise_error(ArgumentError, 'HTTP basic authentication is no longer supported. Use client_id and client_secret instead.') + expect(config.username).to be_nil + end + end + + describe '#password=' do + it 'raises because basic auth is no longer supported' do + expect { + config.password = 'password' + }.to raise_error(ArgumentError, 'HTTP basic authentication is no longer supported. Use client_id and client_secret instead.') + expect(config.password).to be_nil end end @@ -225,10 +235,10 @@ describe 'configure faraday connection' do it '#configure_faraday_connection #configure_connection' do config.configure_faraday_connection do |c| - config.username = 'username' + config.client_id = 'client_id' end config.configure_connection(faraday_connection) - expect(config.username).to eq('username') + expect(config.client_id).to eq('client_id') end end From 91dc1f15b86ea861742ce5b74b86d343bbc52876 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 3 Nov 2026 16:57:57 -0500 Subject: [PATCH 6/7] list calls filter --- spec/smoke/calls_api_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/smoke/calls_api_spec.rb b/spec/smoke/calls_api_spec.rb index bebaa00a..71b32c8a 100644 --- a/spec/smoke/calls_api_spec.rb +++ b/spec/smoke/calls_api_spec.rb @@ -83,7 +83,7 @@ # Get Calls describe '#list_calls' do it 'gets a list of calls' do - data, status_code = @calls_api_instance.list_calls_with_http_info(BW_ACCOUNT_ID) + data, status_code = @calls_api_instance.list_calls_with_http_info(BW_ACCOUNT_ID, USER_NUMBER, BW_NUMBER) expect(status_code).to eq(200) expect(data).to be_instance_of(Array) From b59149c2f8b389e92d229d68ce00b9675583132d Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 3 Nov 2026 17:09:39 -0500 Subject: [PATCH 7/7] update calls smoke test --- spec/smoke/calls_api_spec.rb | 90 ++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/spec/smoke/calls_api_spec.rb b/spec/smoke/calls_api_spec.rb index 71b32c8a..6e30afef 100644 --- a/spec/smoke/calls_api_spec.rb +++ b/spec/smoke/calls_api_spec.rb @@ -83,7 +83,7 @@ # Get Calls describe '#list_calls' do it 'gets a list of calls' do - data, status_code = @calls_api_instance.list_calls_with_http_info(BW_ACCOUNT_ID, USER_NUMBER, BW_NUMBER) + data, status_code = @calls_api_instance.list_calls_with_http_info(BW_ACCOUNT_ID, { to: USER_NUMBER, from: BW_NUMBER }) expect(status_code).to eq(200) expect(data).to be_instance_of(Array) @@ -94,58 +94,58 @@ end # Get Call State Information - # describe 'get_call_state' do - # it 'gets the call state' do - # sleep(40) # wait 40s for voice API to update call status - # data, status_code = @calls_api_instance.get_call_state_with_http_info(BW_ACCOUNT_ID, $call_info_id) - - # expect(status_code).to eq(200) - # expect(data).to be_instance_of(Bandwidth::CallState) - # expect(data.call_id).to eq($call_info_id) - # expect(data.account_id).to eq(BW_ACCOUNT_ID) - # expect(data.application_id).to eq(BW_VOICE_APPLICATION_ID) - # expect(data.start_time).to be_instance_of(Time).or be_nil - # expect(data.last_update).to be_instance_of(Time) - # expect(data.state).to be_instance_of(String) - # expect(data.direction).to eq(direction) - # end - # end + describe 'get_call_state' do + it 'gets the call state' do + sleep(40) # wait 40s for voice API to update call status + data, status_code = @calls_api_instance.get_call_state_with_http_info(BW_ACCOUNT_ID, $call_info_id) + + expect(status_code).to eq(200) + expect(data).to be_instance_of(Bandwidth::CallState) + expect(data.call_id).to eq($call_info_id) + expect(data.account_id).to eq(BW_ACCOUNT_ID) + expect(data.application_id).to eq(BW_VOICE_APPLICATION_ID) + expect(data.start_time).to be_instance_of(Time).or be_nil + expect(data.last_update).to be_instance_of(Time) + expect(data.state).to be_instance_of(String) + expect(data.direction).to eq(direction) + end + end # Update Call - # describe 'update_call' do - # it 'creates and updates a call' do - # update_call_body = Bandwidth::UpdateCall.new( - # state: Bandwidth::CallStateEnum::ACTIVE, - # redirect_url: MANTECA_BASE_URL + '/bxml/pause' - # ) + describe 'update_call' do + it 'creates and updates a call' do + update_call_body = Bandwidth::UpdateCall.new( + state: Bandwidth::CallStateEnum::ACTIVE, + redirect_url: MANTECA_BASE_URL + '/bxml/pause' + ) - # update_call_id = create_manteca_call(@calls_api_instance) - # sleep(SLEEP_TIME_S) + update_call_id = create_manteca_call(@calls_api_instance) + sleep(SLEEP_TIME_S) - # _update_data, update_status_code = @calls_api_instance.update_call_with_http_info(BW_ACCOUNT_ID, update_call_id, update_call_body) - # expect(update_status_code).to eq(200) - # sleep(SLEEP_TIME_S) + _update_data, update_status_code = @calls_api_instance.update_call_with_http_info(BW_ACCOUNT_ID, update_call_id, update_call_body) + expect(update_status_code).to eq(200) + sleep(SLEEP_TIME_S) - # _complete_data, complete_status_code = @calls_api_instance.update_call_with_http_info(BW_ACCOUNT_ID, update_call_id, $complete_call_body) - # expect(complete_status_code).to eq(200) - # end - # end + _complete_data, complete_status_code = @calls_api_instance.update_call_with_http_info(BW_ACCOUNT_ID, update_call_id, $complete_call_body) + expect(complete_status_code).to eq(200) + end + end # Update Call BXML - # describe 'update_call_bxml' do - # it 'updates a call using bxml' do - # update_call_id = create_manteca_call(@calls_api_instance) - # sleep(SLEEP_TIME_S) - - # update_bxml = 'This is a test bxml response' - # _update_data, update_status_code = @calls_api_instance.update_call_bxml_with_http_info(BW_ACCOUNT_ID, update_call_id, update_bxml) - # expect(update_status_code).to eq(204) - # sleep(SLEEP_TIME_S) + describe 'update_call_bxml' do + it 'updates a call using bxml' do + update_call_id = create_manteca_call(@calls_api_instance) + sleep(SLEEP_TIME_S) + + update_bxml = 'This is a test bxml response' + _update_data, update_status_code = @calls_api_instance.update_call_bxml_with_http_info(BW_ACCOUNT_ID, update_call_id, update_bxml) + expect(update_status_code).to eq(204) + sleep(SLEEP_TIME_S) - # _complete_data, complete_status_code = @calls_api_instance.update_call_with_http_info(BW_ACCOUNT_ID, update_call_id, $complete_call_body) - # expect(complete_status_code).to eq(200) - # end - # end + _complete_data, complete_status_code = @calls_api_instance.update_call_with_http_info(BW_ACCOUNT_ID, update_call_id, $complete_call_body) + expect(complete_status_code).to eq(200) + end + end # HTTP 4XX Errors describe 'http error' do