From e1bbfd00ba9f7211a6f5a34eb24f125593d76c8a Mon Sep 17 00:00:00 2001 From: DX-Bandwidth Date: Tue, 9 Dec 2025 14:06:29 +0000 Subject: [PATCH 1/3] Generate SDK with OpenAPI Generator Version --- .openapi-generator/FILES | 7 + Bandwidth.Standard.sln | 10 +- README.md | 12 + api/openapi.yaml | 31 ++ bandwidth.yml | 40 +++ docs/CallsApi.md | 20 +- docs/ConferencesApi.md | 36 +- docs/MFAApi.md | 12 +- docs/MediaApi.md | 16 +- docs/MessagesApi.md | 8 +- docs/MultiChannelAction.md | 2 + docs/MultiChannelApi.md | 4 +- docs/PhoneNumberLookupApi.md | 12 +- docs/RbmActionOpenUrl.md | 2 + docs/RbmOpenUrlEnum.md | 10 + docs/RbmVebViewEnum.md | 10 + docs/RecordingsApi.md | 40 ++- docs/StatisticsApi.md | 4 +- docs/TollFreeVerificationApi.md | 36 +- docs/TranscriptionsApi.md | 12 +- src/Bandwidth.Standard/Api/CallsApi.cs | 161 +++++++++ src/Bandwidth.Standard/Api/ConferencesApi.cs | 289 ++++++++++++++++ src/Bandwidth.Standard/Api/MFAApi.cs | 97 ++++++ src/Bandwidth.Standard/Api/MediaApi.cs | 129 +++++++ src/Bandwidth.Standard/Api/MessagesApi.cs | 65 ++++ src/Bandwidth.Standard/Api/MultiChannelApi.cs | 33 ++ .../Api/PhoneNumberLookupApi.cs | 97 ++++++ src/Bandwidth.Standard/Api/RecordingsApi.cs | 321 ++++++++++++++++++ src/Bandwidth.Standard/Api/StatisticsApi.cs | 33 ++ .../Api/TollFreeVerificationApi.cs | 289 ++++++++++++++++ .../Api/TranscriptionsApi.cs | 97 ++++++ src/Bandwidth.Standard/Client/ApiClient.cs | 15 + .../Client/Auth/OAuthAuthenticator.cs | 106 ++++++ .../Client/Auth/OAuthFlow.cs | 28 ++ .../Client/Auth/TokenResponse.cs | 23 ++ .../Client/Configuration.cs | 29 ++ .../Client/IReadableConfiguration.cs | 25 ++ .../Client/RequestOptions.cs | 5 + src/Bandwidth.Standard/Model/LookupResult.cs | 4 +- src/Bandwidth.Standard/Model/RbmActionBase.cs | 2 +- .../Model/RbmActionOpenUrl.cs | 20 +- .../Model/RbmOpenUrlEnum.cs | 49 +++ .../Model/RbmSuggestionResponse.cs | 2 +- .../Model/RbmVebViewEnum.cs | 55 +++ 44 files changed, 2238 insertions(+), 60 deletions(-) create mode 100644 docs/RbmOpenUrlEnum.md create mode 100644 docs/RbmVebViewEnum.md create mode 100644 src/Bandwidth.Standard/Client/Auth/OAuthAuthenticator.cs create mode 100644 src/Bandwidth.Standard/Client/Auth/OAuthFlow.cs create mode 100644 src/Bandwidth.Standard/Client/Auth/TokenResponse.cs create mode 100644 src/Bandwidth.Standard/Model/RbmOpenUrlEnum.cs create mode 100644 src/Bandwidth.Standard/Model/RbmVebViewEnum.cs diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 24505288..4bf627bd 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -135,8 +135,10 @@ docs/RbmMessageContentFile.md docs/RbmMessageContentRichCard.md docs/RbmMessageContentText.md docs/RbmMessageMedia.md +docs/RbmOpenUrlEnum.md docs/RbmStandaloneCard.md docs/RbmSuggestionResponse.md +docs/RbmVebViewEnum.md docs/RecordingAvailableCallback.md docs/RecordingCompleteCallback.md docs/RecordingStateEnum.md @@ -202,6 +204,9 @@ src/Bandwidth.Standard/Api/TranscriptionsApi.cs src/Bandwidth.Standard/Client/ApiClient.cs src/Bandwidth.Standard/Client/ApiException.cs src/Bandwidth.Standard/Client/ApiResponse.cs +src/Bandwidth.Standard/Client/Auth/OAuthAuthenticator.cs +src/Bandwidth.Standard/Client/Auth/OAuthFlow.cs +src/Bandwidth.Standard/Client/Auth/TokenResponse.cs src/Bandwidth.Standard/Client/ClientUtils.cs src/Bandwidth.Standard/Client/Configuration.cs src/Bandwidth.Standard/Client/ExceptionFactory.cs @@ -342,8 +347,10 @@ src/Bandwidth.Standard/Model/RbmMessageContentFile.cs src/Bandwidth.Standard/Model/RbmMessageContentRichCard.cs src/Bandwidth.Standard/Model/RbmMessageContentText.cs src/Bandwidth.Standard/Model/RbmMessageMedia.cs +src/Bandwidth.Standard/Model/RbmOpenUrlEnum.cs src/Bandwidth.Standard/Model/RbmStandaloneCard.cs src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs +src/Bandwidth.Standard/Model/RbmVebViewEnum.cs src/Bandwidth.Standard/Model/RecordingAvailableCallback.cs src/Bandwidth.Standard/Model/RecordingCompleteCallback.cs src/Bandwidth.Standard/Model/RecordingStateEnum.cs diff --git a/Bandwidth.Standard.sln b/Bandwidth.Standard.sln index a681fdd7..3bea64fd 100644 --- a/Bandwidth.Standard.sln +++ b/Bandwidth.Standard.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{90963038-62D5-4C4E-931F-91B8A5342BAC}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{8553E87A-245E-4BE1-B540-298581E0FC38}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard.Test", "src\Bandwidth.Standard.Test\Bandwidth.Standard.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject @@ -12,10 +12,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {90963038-62D5-4C4E-931F-91B8A5342BAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {90963038-62D5-4C4E-931F-91B8A5342BAC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {90963038-62D5-4C4E-931F-91B8A5342BAC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {90963038-62D5-4C4E-931F-91B8A5342BAC}.Release|Any CPU.Build.0 = Release|Any CPU + {8553E87A-245E-4BE1-B540-298581E0FC38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8553E87A-245E-4BE1-B540-298581E0FC38}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8553E87A-245E-4BE1-B540-298581E0FC38}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8553E87A-245E-4BE1-B540-298581E0FC38}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/README.md b/README.md index 00b0a95e..927f3aad 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new CallsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -289,8 +291,10 @@ Class | Method | HTTP request | Description - [Model.RbmMessageContentRichCard](docs/RbmMessageContentRichCard.md) - [Model.RbmMessageContentText](docs/RbmMessageContentText.md) - [Model.RbmMessageMedia](docs/RbmMessageMedia.md) + - [Model.RbmOpenUrlEnum](docs/RbmOpenUrlEnum.md) - [Model.RbmStandaloneCard](docs/RbmStandaloneCard.md) - [Model.RbmSuggestionResponse](docs/RbmSuggestionResponse.md) + - [Model.RbmVebViewEnum](docs/RbmVebViewEnum.md) - [Model.RecordingAvailableCallback](docs/RecordingAvailableCallback.md) - [Model.RecordingCompleteCallback](docs/RecordingCompleteCallback.md) - [Model.RecordingStateEnum](docs/RecordingStateEnum.md) @@ -349,3 +353,11 @@ Authentication schemes defined for the API: - **Type**: HTTP basic authentication + +### OAuth2 + +- **Type**: OAuth +- **Flow**: application +- **Authorization URL**: +- **Scopes**: N/A + diff --git a/api/openapi.yaml b/api/openapi.yaml index cfdbd769..7dfade8d 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -11,6 +11,7 @@ servers: - url: / security: - Basic: [] +- OAuth2: [] tags: - name: Messages - name: Media @@ -8868,6 +8869,26 @@ components: - REQUEST_LOCATION example: REPLY type: string + rbmOpenUrlEnum: + description: "Specifies how the URL should be opened on a mobile device.\n-\ + \ `BROWSER` Opens the URL in the device's default browser. If application\ + \ is not set or the device doesn’t support WebView, this option is used by\ + \ default. \n- `WEBVIEW` Opens the URL in an in-app WebView." + enum: + - BROWSER + - WEBVIEW + example: WEBVIEW + type: string + rbmVebViewEnum: + description: "Defines the layout of the WebView on a mobile device. It must\ + \ be defined when application is set to `WEBVIEW`\n- `FULL` WebView takes\ + \ the full screen. \n- `HALF` WebView takes half of the screen.\n- `TALL`\ + \ WebView takes three-quarters of the screen." + enum: + - FULL + - HALF + - TALL + type: string rbmActionText: description: Displayed text for user to click example: Hello world @@ -8986,6 +9007,10 @@ components: format: uri maxLength: 2048 type: string + application: + $ref: '#/components/schemas/rbmOpenUrlEnum' + webviewViewMode: + $ref: '#/components/schemas/rbmVebViewEnum' required: - url title: Open URL @@ -14800,4 +14825,10 @@ components: - Example: `Authorization: Basic ZGVtbZpwQDU1dzByZA==` scheme: basic type: http + OAuth2: + flows: + clientCredentials: + scopes: {} + tokenUrl: https://api.bandwidth.com/api/v1/oauth2/token + type: oauth2 diff --git a/bandwidth.yml b/bandwidth.yml index 6ee15ae1..db625ad7 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -9,6 +9,7 @@ info: version: 1.0.0 security: - Basic: [] + - OAuth2: [] tags: - name: Messages - name: Media @@ -2377,6 +2378,35 @@ components: - OPEN_URL - REQUEST_LOCATION example: REPLY + rbmOpenUrlEnum: + type: string + description: >- + Specifies how the URL should be opened on a mobile device. + + - `BROWSER` Opens the URL in the device's default browser. If + application is not set or the device doesn’t support WebView, this + option is used by default. + + - `WEBVIEW` Opens the URL in an in-app WebView. + enum: + - BROWSER + - WEBVIEW + example: WEBVIEW + rbmVebViewEnum: + type: string + description: >- + Defines the layout of the WebView on a mobile device. It must be defined + when application is set to `WEBVIEW` + + - `FULL` WebView takes the full screen. + + - `HALF` WebView takes half of the screen. + + - `TALL` WebView takes three-quarters of the screen. + enum: + - FULL + - HALF + - TALL rbmActionText: title: Text type: string @@ -2481,6 +2511,10 @@ components: description: The URL to open in browser. example: https://dev.bandwidth.com maxLength: 2048 + application: + $ref: '#/components/schemas/rbmOpenUrlEnum' + webviewViewMode: + $ref: '#/components/schemas/rbmVebViewEnum' required: - url multiChannelFullActions: @@ -8427,6 +8461,12 @@ components: - Example: `Authorization: Basic ZGVtbZpwQDU1dzByZA==` + OAuth2: + type: oauth2 + flows: + clientCredentials: + tokenUrl: https://api.bandwidth.com/api/v1/oauth2/token + scopes: {} callbacks: inboundCallback: '{inboundCallbackUrl}': diff --git a/docs/CallsApi.md b/docs/CallsApi.md index 05a24cf7..0b466eb6 100644 --- a/docs/CallsApi.md +++ b/docs/CallsApi.md @@ -37,6 +37,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new CallsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -92,7 +94,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -142,6 +144,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new CallsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -197,7 +201,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -247,6 +251,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new CallsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -314,7 +320,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -364,6 +370,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new CallsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -417,7 +425,7 @@ void (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -468,6 +476,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new CallsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -524,7 +534,7 @@ void (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/ConferencesApi.md b/docs/ConferencesApi.md index 1d6da39f..b956ad8f 100644 --- a/docs/ConferencesApi.md +++ b/docs/ConferencesApi.md @@ -41,6 +41,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new ConferencesApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -98,7 +100,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -148,6 +150,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new ConferencesApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -203,7 +207,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -253,6 +257,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new ConferencesApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -310,7 +316,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -360,6 +366,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new ConferencesApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -417,7 +425,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -467,6 +475,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new ConferencesApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -522,7 +532,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -572,6 +582,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new ConferencesApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -635,7 +647,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -685,6 +697,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new ConferencesApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -738,7 +752,7 @@ void (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -788,6 +802,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new ConferencesApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -844,7 +860,7 @@ void (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -894,6 +910,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new ConferencesApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -949,7 +967,7 @@ void (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/MFAApi.md b/docs/MFAApi.md index 525197a8..c8d7e4a5 100644 --- a/docs/MFAApi.md +++ b/docs/MFAApi.md @@ -35,6 +35,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new MFAApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -90,7 +92,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -136,6 +138,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new MFAApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -191,7 +195,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -237,6 +241,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new MFAApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -292,7 +298,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/MediaApi.md b/docs/MediaApi.md index da780d2c..dc2862f5 100644 --- a/docs/MediaApi.md +++ b/docs/MediaApi.md @@ -36,6 +36,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new MediaApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -87,7 +89,7 @@ void (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -137,6 +139,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new MediaApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -192,7 +196,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -242,6 +246,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new MediaApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -297,7 +303,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -347,6 +353,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new MediaApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -404,7 +412,7 @@ void (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/MessagesApi.md b/docs/MessagesApi.md index 52296ff1..ddd281a3 100644 --- a/docs/MessagesApi.md +++ b/docs/MessagesApi.md @@ -34,6 +34,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new MessagesApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -89,7 +91,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -140,6 +142,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new MessagesApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -247,7 +251,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/MultiChannelAction.md b/docs/MultiChannelAction.md index 76c29ffa..70b4a81c 100644 --- a/docs/MultiChannelAction.md +++ b/docs/MultiChannelAction.md @@ -16,6 +16,8 @@ Name | Type | Description | Notes **EndTime** | **DateTime** | The end time of the event. | **Description** | **string** | The description of the event. | [optional] **Url** | **string** | The URL to open in browser. | +**Application** | **RbmOpenUrlEnum** | | [optional] +**WebviewViewMode** | **RbmVebViewEnum** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultiChannelApi.md b/docs/MultiChannelApi.md index 9bef9031..5df7ea15 100644 --- a/docs/MultiChannelApi.md +++ b/docs/MultiChannelApi.md @@ -33,6 +33,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new MultiChannelApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -88,7 +90,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/PhoneNumberLookupApi.md b/docs/PhoneNumberLookupApi.md index 14265b46..2df516dc 100644 --- a/docs/PhoneNumberLookupApi.md +++ b/docs/PhoneNumberLookupApi.md @@ -35,6 +35,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PhoneNumberLookupApi(config); var accountId = 9900000; // string | @@ -90,7 +92,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -133,6 +135,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PhoneNumberLookupApi(config); var accountId = 9900000; // string | @@ -188,7 +192,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -231,6 +235,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PhoneNumberLookupApi(config); var accountId = 9900000; // string | @@ -286,7 +292,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/RbmActionOpenUrl.md b/docs/RbmActionOpenUrl.md index f1dec721..a656914d 100644 --- a/docs/RbmActionOpenUrl.md +++ b/docs/RbmActionOpenUrl.md @@ -8,6 +8,8 @@ Name | Type | Description | Notes **Text** | **string** | Displayed text for user to click | **PostbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | **Url** | **string** | The URL to open in browser. | +**Application** | **RbmOpenUrlEnum** | | [optional] +**WebviewViewMode** | **RbmVebViewEnum** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RbmOpenUrlEnum.md b/docs/RbmOpenUrlEnum.md new file mode 100644 index 00000000..fcde391b --- /dev/null +++ b/docs/RbmOpenUrlEnum.md @@ -0,0 +1,10 @@ +# Bandwidth.Standard.Model.RbmOpenUrlEnum +Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device's default browser. If application is not set or the device doesn’t support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RbmVebViewEnum.md b/docs/RbmVebViewEnum.md new file mode 100644 index 00000000..f857eab3 --- /dev/null +++ b/docs/RbmVebViewEnum.md @@ -0,0 +1,10 @@ +# Bandwidth.Standard.Model.RbmVebViewEnum +Defines the layout of the WebView on a mobile device. It must be defined when application is set to `WEBVIEW` - `FULL` WebView takes the full screen. - `HALF` WebView takes half of the screen. - `TALL` WebView takes three-quarters of the screen. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RecordingsApi.md b/docs/RecordingsApi.md index ec1e1b32..21fdfb81 100644 --- a/docs/RecordingsApi.md +++ b/docs/RecordingsApi.md @@ -42,6 +42,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new RecordingsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -95,7 +97,7 @@ void (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -145,6 +147,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new RecordingsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -198,7 +202,7 @@ void (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -248,6 +252,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new RecordingsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -301,7 +307,7 @@ void (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -351,6 +357,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new RecordingsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -408,7 +416,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -458,6 +466,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new RecordingsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -515,7 +525,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -565,6 +575,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new RecordingsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -622,7 +634,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -672,6 +684,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new RecordingsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -733,7 +747,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -783,6 +797,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new RecordingsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -838,7 +854,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -888,6 +904,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new RecordingsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -943,7 +961,7 @@ void (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -993,6 +1011,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new RecordingsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -1046,7 +1066,7 @@ void (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/StatisticsApi.md b/docs/StatisticsApi.md index 73aa1578..075657fa 100644 --- a/docs/StatisticsApi.md +++ b/docs/StatisticsApi.md @@ -33,6 +33,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new StatisticsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -86,7 +88,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/TollFreeVerificationApi.md b/docs/TollFreeVerificationApi.md index 69151969..bb69f97b 100644 --- a/docs/TollFreeVerificationApi.md +++ b/docs/TollFreeVerificationApi.md @@ -41,6 +41,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new TollFreeVerificationApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -96,7 +98,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -146,6 +148,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new TollFreeVerificationApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -197,7 +201,7 @@ void (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -247,6 +251,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new TollFreeVerificationApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -298,7 +304,7 @@ void (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -348,6 +354,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new TollFreeVerificationApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -403,7 +411,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -453,6 +461,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new TollFreeVerificationApi(config); @@ -501,7 +511,7 @@ This endpoint does not need any parameter. ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -551,6 +561,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new TollFreeVerificationApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -604,7 +616,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -653,6 +665,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new TollFreeVerificationApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -704,7 +718,7 @@ void (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -753,6 +767,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new TollFreeVerificationApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -806,7 +822,7 @@ void (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -855,6 +871,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new TollFreeVerificationApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -912,7 +930,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/TranscriptionsApi.md b/docs/TranscriptionsApi.md index 577c33a6..4cf6b661 100644 --- a/docs/TranscriptionsApi.md +++ b/docs/TranscriptionsApi.md @@ -35,6 +35,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new TranscriptionsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -88,7 +90,7 @@ void (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -138,6 +140,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new TranscriptionsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -195,7 +199,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -245,6 +249,8 @@ namespace Example // Configure HTTP basic authorization: Basic config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: OAuth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new TranscriptionsApi(config); var accountId = 9900000; // string | Your Bandwidth Account ID. @@ -300,7 +306,7 @@ catch (ApiException e) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/src/Bandwidth.Standard/Api/CallsApi.cs b/src/Bandwidth.Standard/Api/CallsApi.cs index 5f3b3082..749cda48 100644 --- a/src/Bandwidth.Standard/Api/CallsApi.cs +++ b/src/Bandwidth.Standard/Api/CallsApi.cs @@ -16,6 +16,7 @@ using System.Net; using System.Net.Mime; using Bandwidth.Standard.Client; +using Bandwidth.Standard.Client.Auth; using Bandwidth.Standard.Model; namespace Bandwidth.Standard.Api @@ -519,6 +520,22 @@ public Bandwidth.Standard.Client.ApiResponse CreateCallWithH { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Post("/accounts/{accountId}/calls", localVarRequestOptions, this.Configuration); @@ -608,6 +625,22 @@ public Bandwidth.Standard.Client.ApiResponse CreateCallWithH { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/accounts/{accountId}/calls", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -694,6 +727,22 @@ public Bandwidth.Standard.Client.ApiResponse GetCallStateWithHttpInfo { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get("/accounts/{accountId}/calls/{callId}", localVarRequestOptions, this.Configuration); @@ -782,6 +831,22 @@ public Bandwidth.Standard.Client.ApiResponse GetCallStateWithHttpInfo { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/accounts/{accountId}/calls/{callId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -901,6 +966,22 @@ public Bandwidth.Standard.Client.ApiResponse GetCallStateWithHttpInfo { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get>("/accounts/{accountId}/calls", localVarRequestOptions, this.Configuration); @@ -1022,6 +1103,22 @@ public Bandwidth.Standard.Client.ApiResponse GetCallStateWithHttpInfo { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync>("/accounts/{accountId}/calls", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1117,6 +1214,22 @@ public Bandwidth.Standard.Client.ApiResponse UpdateCallWithHttpInfo(stri { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Post("/accounts/{accountId}/calls/{callId}", localVarRequestOptions, this.Configuration); @@ -1214,6 +1327,22 @@ public Bandwidth.Standard.Client.ApiResponse UpdateCallWithHttpInfo(stri { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/accounts/{accountId}/calls/{callId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1309,6 +1438,22 @@ public Bandwidth.Standard.Client.ApiResponse UpdateCallBxmlWithHttpInfo( { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Put("/accounts/{accountId}/calls/{callId}/bxml", localVarRequestOptions, this.Configuration); @@ -1406,6 +1551,22 @@ public Bandwidth.Standard.Client.ApiResponse UpdateCallBxmlWithHttpInfo( { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/accounts/{accountId}/calls/{callId}/bxml", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/src/Bandwidth.Standard/Api/ConferencesApi.cs b/src/Bandwidth.Standard/Api/ConferencesApi.cs index 3e8eddd5..7e4d71b3 100644 --- a/src/Bandwidth.Standard/Api/ConferencesApi.cs +++ b/src/Bandwidth.Standard/Api/ConferencesApi.cs @@ -16,6 +16,7 @@ using System.Net; using System.Net.Mime; using Bandwidth.Standard.Client; +using Bandwidth.Standard.Client.Auth; using Bandwidth.Standard.Model; namespace Bandwidth.Standard.Api @@ -749,6 +750,22 @@ public System.IO.Stream DownloadConferenceRecording(string accountId, string con { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get("/accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}/media", localVarRequestOptions, this.Configuration); @@ -848,6 +865,22 @@ public System.IO.Stream DownloadConferenceRecording(string accountId, string con { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}/media", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -934,6 +967,22 @@ public Bandwidth.Standard.Client.ApiResponse GetConferenceWithHttpIn { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get("/accounts/{accountId}/conferences/{conferenceId}", localVarRequestOptions, this.Configuration); @@ -1022,6 +1071,22 @@ public Bandwidth.Standard.Client.ApiResponse GetConferenceWithHttpIn { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/accounts/{accountId}/conferences/{conferenceId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1117,6 +1182,22 @@ public Bandwidth.Standard.Client.ApiResponse GetConferenceMemb { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get("/accounts/{accountId}/conferences/{conferenceId}/members/{memberId}", localVarRequestOptions, this.Configuration); @@ -1214,6 +1295,22 @@ public Bandwidth.Standard.Client.ApiResponse GetConferenceMemb { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/accounts/{accountId}/conferences/{conferenceId}/members/{memberId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1309,6 +1406,22 @@ public Bandwidth.Standard.Client.ApiResponse GetCon { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get("/accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}", localVarRequestOptions, this.Configuration); @@ -1406,6 +1519,22 @@ public Bandwidth.Standard.Client.ApiResponse GetCon { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1492,6 +1621,22 @@ public Bandwidth.Standard.Client.ApiResponse> { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get>("/accounts/{accountId}/conferences/{conferenceId}/recordings", localVarRequestOptions, this.Configuration); @@ -1580,6 +1725,22 @@ public Bandwidth.Standard.Client.ApiResponse> { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync>("/accounts/{accountId}/conferences/{conferenceId}/recordings", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1687,6 +1848,22 @@ public Bandwidth.Standard.Client.ApiResponse> { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get>("/accounts/{accountId}/conferences", localVarRequestOptions, this.Configuration); @@ -1796,6 +1973,22 @@ public Bandwidth.Standard.Client.ApiResponse> { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync>("/accounts/{accountId}/conferences", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1891,6 +2084,22 @@ public Bandwidth.Standard.Client.ApiResponse UpdateConferenceWithHttpInf { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Post("/accounts/{accountId}/conferences/{conferenceId}", localVarRequestOptions, this.Configuration); @@ -1988,6 +2197,22 @@ public Bandwidth.Standard.Client.ApiResponse UpdateConferenceWithHttpInf { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/accounts/{accountId}/conferences/{conferenceId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2083,6 +2308,22 @@ public Bandwidth.Standard.Client.ApiResponse UpdateConferenceBxmlWithHtt { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Put("/accounts/{accountId}/conferences/{conferenceId}/bxml", localVarRequestOptions, this.Configuration); @@ -2180,6 +2421,22 @@ public Bandwidth.Standard.Client.ApiResponse UpdateConferenceBxmlWithHtt { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/accounts/{accountId}/conferences/{conferenceId}/bxml", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2284,6 +2541,22 @@ public Bandwidth.Standard.Client.ApiResponse UpdateConferenceMemberWithH { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Put("/accounts/{accountId}/conferences/{conferenceId}/members/{memberId}", localVarRequestOptions, this.Configuration); @@ -2390,6 +2663,22 @@ public Bandwidth.Standard.Client.ApiResponse UpdateConferenceMemberWithH { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/accounts/{accountId}/conferences/{conferenceId}/members/{memberId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/src/Bandwidth.Standard/Api/MFAApi.cs b/src/Bandwidth.Standard/Api/MFAApi.cs index edab657c..10535a3e 100644 --- a/src/Bandwidth.Standard/Api/MFAApi.cs +++ b/src/Bandwidth.Standard/Api/MFAApi.cs @@ -16,6 +16,7 @@ using System.Net; using System.Net.Mime; using Bandwidth.Standard.Client; +using Bandwidth.Standard.Client.Auth; using Bandwidth.Standard.Model; namespace Bandwidth.Standard.Api @@ -383,6 +384,22 @@ public Bandwidth.Standard.Client.ApiResponse GenerateMess { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Post("/accounts/{accountId}/code/messaging", localVarRequestOptions, this.Configuration); @@ -472,6 +489,22 @@ public Bandwidth.Standard.Client.ApiResponse GenerateMess { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/accounts/{accountId}/code/messaging", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -559,6 +592,22 @@ public Bandwidth.Standard.Client.ApiResponse GenerateVoiceCod { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Post("/accounts/{accountId}/code/voice", localVarRequestOptions, this.Configuration); @@ -648,6 +697,22 @@ public Bandwidth.Standard.Client.ApiResponse GenerateVoiceCod { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/accounts/{accountId}/code/voice", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -735,6 +800,22 @@ public Bandwidth.Standard.Client.ApiResponse VerifyCodeWithH { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Post("/accounts/{accountId}/code/verify", localVarRequestOptions, this.Configuration); @@ -824,6 +905,22 @@ public Bandwidth.Standard.Client.ApiResponse VerifyCodeWithH { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/accounts/{accountId}/code/verify", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/src/Bandwidth.Standard/Api/MediaApi.cs b/src/Bandwidth.Standard/Api/MediaApi.cs index 4be556e7..5ffa2cba 100644 --- a/src/Bandwidth.Standard/Api/MediaApi.cs +++ b/src/Bandwidth.Standard/Api/MediaApi.cs @@ -16,6 +16,7 @@ using System.Net; using System.Net.Mime; using Bandwidth.Standard.Client; +using Bandwidth.Standard.Client.Auth; using Bandwidth.Standard.Model; namespace Bandwidth.Standard.Api @@ -445,6 +446,22 @@ public Bandwidth.Standard.Client.ApiResponse DeleteMediaWithHttpInfo(str { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Delete("/users/{accountId}/media/{mediaId}", localVarRequestOptions, this.Configuration); @@ -532,6 +549,22 @@ public Bandwidth.Standard.Client.ApiResponse DeleteMediaWithHttpInfo(str { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/users/{accountId}/media/{mediaId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -619,6 +652,22 @@ public System.IO.Stream GetMedia(string accountId, string mediaId, int operation { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get("/users/{accountId}/media/{mediaId}", localVarRequestOptions, this.Configuration); @@ -708,6 +757,22 @@ public System.IO.Stream GetMedia(string accountId, string mediaId, int operation { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/users/{accountId}/media/{mediaId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -791,6 +856,22 @@ public System.IO.Stream GetMedia(string accountId, string mediaId, int operation { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get>("/users/{accountId}/media", localVarRequestOptions, this.Configuration); @@ -876,6 +957,22 @@ public System.IO.Stream GetMedia(string accountId, string mediaId, int operation { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync>("/users/{accountId}/media", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1030,6 +1127,22 @@ public System.IO.Stream GetMedia(string accountId, string mediaId, int operation { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Put("/users/{accountId}/media/{mediaId}", localVarRequestOptions, this.Configuration); @@ -1186,6 +1299,22 @@ public System.IO.Stream GetMedia(string accountId, string mediaId, int operation { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/users/{accountId}/media/{mediaId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/src/Bandwidth.Standard/Api/MessagesApi.cs b/src/Bandwidth.Standard/Api/MessagesApi.cs index 4e108ac7..7b11fb04 100644 --- a/src/Bandwidth.Standard/Api/MessagesApi.cs +++ b/src/Bandwidth.Standard/Api/MessagesApi.cs @@ -16,6 +16,7 @@ using System.Net; using System.Net.Mime; using Bandwidth.Standard.Client; +using Bandwidth.Standard.Client.Auth; using Bandwidth.Standard.Model; namespace Bandwidth.Standard.Api @@ -435,6 +436,22 @@ public Bandwidth.Standard.Client.ApiResponse CreateMessageWithHttpInfo( { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Post("/users/{accountId}/messages", localVarRequestOptions, this.Configuration); @@ -524,6 +541,22 @@ public Bandwidth.Standard.Client.ApiResponse CreateMessageWithHttpInfo( { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/users/{accountId}/messages", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -763,6 +796,22 @@ public Bandwidth.Standard.Client.ApiResponse CreateMessageWithHttpInfo( { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get("/users/{accountId}/messages", localVarRequestOptions, this.Configuration); @@ -1004,6 +1053,22 @@ public Bandwidth.Standard.Client.ApiResponse CreateMessageWithHttpInfo( { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/users/{accountId}/messages", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/src/Bandwidth.Standard/Api/MultiChannelApi.cs b/src/Bandwidth.Standard/Api/MultiChannelApi.cs index a0e1dafb..7542b3eb 100644 --- a/src/Bandwidth.Standard/Api/MultiChannelApi.cs +++ b/src/Bandwidth.Standard/Api/MultiChannelApi.cs @@ -16,6 +16,7 @@ using System.Net; using System.Net.Mime; using Bandwidth.Standard.Client; +using Bandwidth.Standard.Client.Auth; using Bandwidth.Standard.Model; namespace Bandwidth.Standard.Api @@ -279,6 +280,22 @@ public Bandwidth.Standard.Client.ApiResponse { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Post("/users/{accountId}/messages/multiChannel", localVarRequestOptions, this.Configuration); @@ -368,6 +385,22 @@ public Bandwidth.Standard.Client.ApiResponse { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/users/{accountId}/messages/multiChannel", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/src/Bandwidth.Standard/Api/PhoneNumberLookupApi.cs b/src/Bandwidth.Standard/Api/PhoneNumberLookupApi.cs index 10e8e76c..6a4b349e 100644 --- a/src/Bandwidth.Standard/Api/PhoneNumberLookupApi.cs +++ b/src/Bandwidth.Standard/Api/PhoneNumberLookupApi.cs @@ -16,6 +16,7 @@ using System.Net; using System.Net.Mime; using Bandwidth.Standard.Client; +using Bandwidth.Standard.Client.Auth; using Bandwidth.Standard.Model; namespace Bandwidth.Standard.Api @@ -383,6 +384,22 @@ public Bandwidth.Standard.Client.ApiResponse Crea { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Post("/accounts/{accountId}/phoneNumberLookup/bulk", localVarRequestOptions, this.Configuration); @@ -472,6 +489,22 @@ public Bandwidth.Standard.Client.ApiResponse Crea { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/accounts/{accountId}/phoneNumberLookup/bulk", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -559,6 +592,22 @@ public Bandwidth.Standard.Client.ApiResponse CreateSyn { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Post("/accounts/{accountId}/phoneNumberLookup", localVarRequestOptions, this.Configuration); @@ -648,6 +697,22 @@ public Bandwidth.Standard.Client.ApiResponse CreateSyn { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/accounts/{accountId}/phoneNumberLookup", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -728,6 +793,22 @@ public Bandwidth.Standard.Client.ApiResponse GetAsyn { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get("/accounts/{accountId}/phoneNumberLookup/bulk/{requestId}", localVarRequestOptions, this.Configuration); @@ -810,6 +891,22 @@ public Bandwidth.Standard.Client.ApiResponse GetAsyn { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/accounts/{accountId}/phoneNumberLookup/bulk/{requestId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/src/Bandwidth.Standard/Api/RecordingsApi.cs b/src/Bandwidth.Standard/Api/RecordingsApi.cs index 6eac8894..edb9cfe7 100644 --- a/src/Bandwidth.Standard/Api/RecordingsApi.cs +++ b/src/Bandwidth.Standard/Api/RecordingsApi.cs @@ -16,6 +16,7 @@ using System.Net; using System.Net.Mime; using Bandwidth.Standard.Client; +using Bandwidth.Standard.Client.Auth; using Bandwidth.Standard.Model; namespace Bandwidth.Standard.Api @@ -802,6 +803,22 @@ public Bandwidth.Standard.Client.ApiResponse DeleteRecordingWithHttpInfo { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Delete("/accounts/{accountId}/calls/{callId}/recordings/{recordingId}", localVarRequestOptions, this.Configuration); @@ -898,6 +915,22 @@ public Bandwidth.Standard.Client.ApiResponse DeleteRecordingWithHttpInfo { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/accounts/{accountId}/calls/{callId}/recordings/{recordingId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -992,6 +1025,22 @@ public Bandwidth.Standard.Client.ApiResponse DeleteRecordingMediaWithHtt { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Delete("/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media", localVarRequestOptions, this.Configuration); @@ -1088,6 +1137,22 @@ public Bandwidth.Standard.Client.ApiResponse DeleteRecordingMediaWithHtt { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1182,6 +1247,22 @@ public Bandwidth.Standard.Client.ApiResponse DeleteRecordingTranscriptio { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Delete("/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription", localVarRequestOptions, this.Configuration); @@ -1278,6 +1359,22 @@ public Bandwidth.Standard.Client.ApiResponse DeleteRecordingTranscriptio { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1375,6 +1472,22 @@ public System.IO.Stream DownloadCallRecording(string accountId, string callId, s { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get("/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media", localVarRequestOptions, this.Configuration); @@ -1474,6 +1587,22 @@ public System.IO.Stream DownloadCallRecording(string accountId, string callId, s { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1569,6 +1698,22 @@ public Bandwidth.Standard.Client.ApiResponse GetCallRecor { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get("/accounts/{accountId}/calls/{callId}/recordings/{recordingId}", localVarRequestOptions, this.Configuration); @@ -1666,6 +1811,22 @@ public Bandwidth.Standard.Client.ApiResponse GetCallRecor { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/accounts/{accountId}/calls/{callId}/recordings/{recordingId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1761,6 +1922,22 @@ public Bandwidth.Standard.Client.ApiResponse GetRecordi { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get("/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription", localVarRequestOptions, this.Configuration); @@ -1858,6 +2035,22 @@ public Bandwidth.Standard.Client.ApiResponse GetRecordi { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1959,6 +2152,22 @@ public Bandwidth.Standard.Client.ApiResponse GetRecordi { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get>("/accounts/{accountId}/recordings", localVarRequestOptions, this.Configuration); @@ -2062,6 +2271,22 @@ public Bandwidth.Standard.Client.ApiResponse GetRecordi { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync>("/accounts/{accountId}/recordings", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2148,6 +2373,22 @@ public Bandwidth.Standard.Client.ApiResponse> ListCa { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get>("/accounts/{accountId}/calls/{callId}/recordings", localVarRequestOptions, this.Configuration); @@ -2236,6 +2477,22 @@ public Bandwidth.Standard.Client.ApiResponse> ListCa { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync>("/accounts/{accountId}/calls/{callId}/recordings", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2340,6 +2597,22 @@ public Bandwidth.Standard.Client.ApiResponse TranscribeCallRecordingWith { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Post("/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription", localVarRequestOptions, this.Configuration); @@ -2446,6 +2719,22 @@ public Bandwidth.Standard.Client.ApiResponse TranscribeCallRecordingWith { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2541,6 +2830,22 @@ public Bandwidth.Standard.Client.ApiResponse UpdateCallRecordingStateWit { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Put("/accounts/{accountId}/calls/{callId}/recording", localVarRequestOptions, this.Configuration); @@ -2638,6 +2943,22 @@ public Bandwidth.Standard.Client.ApiResponse UpdateCallRecordingStateWit { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/accounts/{accountId}/calls/{callId}/recording", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/src/Bandwidth.Standard/Api/StatisticsApi.cs b/src/Bandwidth.Standard/Api/StatisticsApi.cs index 55534f65..fb5c1ae3 100644 --- a/src/Bandwidth.Standard/Api/StatisticsApi.cs +++ b/src/Bandwidth.Standard/Api/StatisticsApi.cs @@ -16,6 +16,7 @@ using System.Net; using System.Net.Mime; using Bandwidth.Standard.Client; +using Bandwidth.Standard.Client.Auth; using Bandwidth.Standard.Model; namespace Bandwidth.Standard.Api @@ -265,6 +266,22 @@ public Bandwidth.Standard.Client.ApiResponse GetStatisticsWit { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get("/accounts/{accountId}/statistics", localVarRequestOptions, this.Configuration); @@ -344,6 +361,22 @@ public Bandwidth.Standard.Client.ApiResponse GetStatisticsWit { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/accounts/{accountId}/statistics", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/src/Bandwidth.Standard/Api/TollFreeVerificationApi.cs b/src/Bandwidth.Standard/Api/TollFreeVerificationApi.cs index 587a0f5b..104d8ff4 100644 --- a/src/Bandwidth.Standard/Api/TollFreeVerificationApi.cs +++ b/src/Bandwidth.Standard/Api/TollFreeVerificationApi.cs @@ -16,6 +16,7 @@ using System.Net; using System.Net.Mime; using Bandwidth.Standard.Client; +using Bandwidth.Standard.Client.Auth; using Bandwidth.Standard.Model; namespace Bandwidth.Standard.Api @@ -691,6 +692,22 @@ public Bandwidth.Standard.Client.ApiResponse CreateWebhookS { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Post("/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions", localVarRequestOptions, this.Configuration); @@ -780,6 +797,22 @@ public Bandwidth.Standard.Client.ApiResponse CreateWebhookS { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -865,6 +898,22 @@ public Bandwidth.Standard.Client.ApiResponse DeleteVerificationRequestWi { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Delete("/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification", localVarRequestOptions, this.Configuration); @@ -952,6 +1001,22 @@ public Bandwidth.Standard.Client.ApiResponse DeleteVerificationRequestWi { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1037,6 +1102,22 @@ public Bandwidth.Standard.Client.ApiResponse DeleteWebhookSubscriptionWi { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Delete("/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}", localVarRequestOptions, this.Configuration); @@ -1124,6 +1205,22 @@ public Bandwidth.Standard.Client.ApiResponse DeleteWebhookSubscriptionWi { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1210,6 +1307,22 @@ public Bandwidth.Standard.Client.ApiResponse GetTollFreeVerificationS { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get("/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification", localVarRequestOptions, this.Configuration); @@ -1298,6 +1411,22 @@ public Bandwidth.Standard.Client.ApiResponse GetTollFreeVerificationS { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1366,6 +1495,22 @@ public Bandwidth.Standard.Client.ApiResponse> ListTollFreeUseCasesW { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get>("/tollFreeVerification/useCases", localVarRequestOptions, this.Configuration); @@ -1436,6 +1581,22 @@ public Bandwidth.Standard.Client.ApiResponse> ListTollFreeUseCasesW { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync>("/tollFreeVerification/useCases", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1513,6 +1674,22 @@ public Bandwidth.Standard.Client.ApiResponse ListW { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get("/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions", localVarRequestOptions, this.Configuration); @@ -1592,6 +1769,22 @@ public Bandwidth.Standard.Client.ApiResponse ListW { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1678,6 +1871,22 @@ public Bandwidth.Standard.Client.ApiResponse RequestTollFreeVerification { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Post("/accounts/{accountId}/tollFreeVerification", localVarRequestOptions, this.Configuration); @@ -1766,6 +1975,22 @@ public Bandwidth.Standard.Client.ApiResponse RequestTollFreeVerification { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/accounts/{accountId}/tollFreeVerification", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1861,6 +2086,22 @@ public Bandwidth.Standard.Client.ApiResponse UpdateTollFreeVerificationR { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Put("/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification", localVarRequestOptions, this.Configuration); @@ -1958,6 +2199,22 @@ public Bandwidth.Standard.Client.ApiResponse UpdateTollFreeVerificationR { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2054,6 +2311,22 @@ public Bandwidth.Standard.Client.ApiResponse UpdateWebhookS { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Put("/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}", localVarRequestOptions, this.Configuration); @@ -2152,6 +2425,22 @@ public Bandwidth.Standard.Client.ApiResponse UpdateWebhookS { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync("/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/src/Bandwidth.Standard/Api/TranscriptionsApi.cs b/src/Bandwidth.Standard/Api/TranscriptionsApi.cs index e4f52240..47703333 100644 --- a/src/Bandwidth.Standard/Api/TranscriptionsApi.cs +++ b/src/Bandwidth.Standard/Api/TranscriptionsApi.cs @@ -16,6 +16,7 @@ using System.Net; using System.Net.Mime; using Bandwidth.Standard.Client; +using Bandwidth.Standard.Client.Auth; using Bandwidth.Standard.Model; namespace Bandwidth.Standard.Api @@ -398,6 +399,22 @@ public Bandwidth.Standard.Client.ApiResponse DeleteRealTimeTranscription { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Delete("/accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}", localVarRequestOptions, this.Configuration); @@ -494,6 +511,22 @@ public Bandwidth.Standard.Client.ApiResponse DeleteRealTimeTranscription { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -589,6 +622,22 @@ public Bandwidth.Standard.Client.ApiResponse GetRealT { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get("/accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}", localVarRequestOptions, this.Configuration); @@ -686,6 +735,22 @@ public Bandwidth.Standard.Client.ApiResponse GetRealT { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -772,6 +837,22 @@ public Bandwidth.Standard.Client.ApiResponse> Li { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = this.Client.Get>("/accounts/{accountId}/calls/{callId}/transcriptions", localVarRequestOptions, this.Configuration); @@ -860,6 +941,22 @@ public Bandwidth.Standard.Client.ApiResponse> Li { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } + // authentication (OAuth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync>("/accounts/{accountId}/calls/{callId}/transcriptions", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/src/Bandwidth.Standard/Client/ApiClient.cs b/src/Bandwidth.Standard/Client/ApiClient.cs index 38aff316..381e8616 100644 --- a/src/Bandwidth.Standard/Client/ApiClient.cs +++ b/src/Bandwidth.Standard/Client/ApiClient.cs @@ -31,6 +31,7 @@ using RestSharpMethod = RestSharp.Method; using FileIO = System.IO.File; using Polly; +using Bandwidth.Standard.Client.Auth; using Bandwidth.Standard.Model; namespace Bandwidth.Standard.Client @@ -465,6 +466,20 @@ private ApiResponse ExecClient(Func> getRespon }; setOptions(clientOptions); + if (!string.IsNullOrEmpty(configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(configuration.OAuthClientId) && + !string.IsNullOrEmpty(configuration.OAuthClientSecret) && + configuration.OAuthFlow != null) + { + clientOptions.Authenticator = new OAuthAuthenticator( + configuration.OAuthTokenUrl, + configuration.OAuthClientId, + configuration.OAuthClientSecret, + configuration.OAuthFlow, + SerializerSettings, + configuration); + } + using (RestClient client = new RestClient(clientOptions, configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)))) { diff --git a/src/Bandwidth.Standard/Client/Auth/OAuthAuthenticator.cs b/src/Bandwidth.Standard/Client/Auth/OAuthAuthenticator.cs new file mode 100644 index 00000000..a7a4405c --- /dev/null +++ b/src/Bandwidth.Standard/Client/Auth/OAuthAuthenticator.cs @@ -0,0 +1,106 @@ +/* + * Bandwidth + * + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; +using RestSharp; +using RestSharp.Authenticators; + +namespace Bandwidth.Standard.Client.Auth +{ + /// + /// An authenticator for OAuth2 authentication flows + /// + public class OAuthAuthenticator : AuthenticatorBase + { + readonly string _tokenUrl; + readonly string _clientId; + readonly string _clientSecret; + readonly string _grantType; + readonly JsonSerializerSettings _serializerSettings; + readonly IReadableConfiguration _configuration; + + /// + /// Initialize the OAuth2 Authenticator + /// + public OAuthAuthenticator( + string tokenUrl, + string clientId, + string clientSecret, + OAuthFlow? flow, + JsonSerializerSettings serializerSettings, + IReadableConfiguration configuration) : base("") + { + _tokenUrl = tokenUrl; + _clientId = clientId; + _clientSecret = clientSecret; + _serializerSettings = serializerSettings; + _configuration = configuration; + + switch (flow) + { + /*case OAuthFlow.ACCESS_CODE: + _grantType = "authorization_code"; + break; + case OAuthFlow.IMPLICIT: + _grantType = "implicit"; + break; + case OAuthFlow.PASSWORD: + _grantType = "password"; + break;*/ + case OAuthFlow.APPLICATION: + _grantType = "client_credentials"; + break; + default: + break; + } + } + + /// + /// Creates an authentication parameter from an access token. + /// + /// Access token to create a parameter from. + /// An authentication parameter. + protected override async ValueTask GetAuthenticationParameter(string accessToken) + { + var token = string.IsNullOrEmpty(Token) ? await GetToken().ConfigureAwait(false) : Token; + return new HeaderParameter(KnownHeaders.Authorization, token); + } + + /// + /// Gets the token from the OAuth2 server. + /// + /// An authentication token. + async Task GetToken() + { + var client = new RestClient(_tokenUrl, + configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(_serializerSettings, _configuration))); + + var request = new RestRequest() + .AddParameter("grant_type", _grantType) + .AddParameter("client_id", _clientId) + .AddParameter("client_secret", _clientSecret); + var response = await client.PostAsync(request).ConfigureAwait(false); + + // RFC6749 - token_type is case insensitive. + // RFC6750 - In Authorization header Bearer should be capitalized. + // Fix the capitalization irrespective of token_type casing. + switch (response.TokenType?.ToLower()) + { + case "bearer": + return $"Bearer {response.AccessToken}"; + default: + return $"{response.TokenType} {response.AccessToken}"; + } + } + } +} diff --git a/src/Bandwidth.Standard/Client/Auth/OAuthFlow.cs b/src/Bandwidth.Standard/Client/Auth/OAuthFlow.cs new file mode 100644 index 00000000..b595b8e0 --- /dev/null +++ b/src/Bandwidth.Standard/Client/Auth/OAuthFlow.cs @@ -0,0 +1,28 @@ +/* + * Bandwidth + * + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +namespace Bandwidth.Standard.Client.Auth +{ + /// + /// Available flows for OAuth2 authentication + /// + public enum OAuthFlow + { + /// Authorization code flow + ACCESS_CODE, + /// Implicit flow + IMPLICIT, + /// Password flow + PASSWORD, + /// Client credentials flow + APPLICATION + } +} \ No newline at end of file diff --git a/src/Bandwidth.Standard/Client/Auth/TokenResponse.cs b/src/Bandwidth.Standard/Client/Auth/TokenResponse.cs new file mode 100644 index 00000000..56e84de6 --- /dev/null +++ b/src/Bandwidth.Standard/Client/Auth/TokenResponse.cs @@ -0,0 +1,23 @@ +/* + * Bandwidth + * + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Newtonsoft.Json; + +namespace Bandwidth.Standard.Client.Auth +{ + class TokenResponse + { + [JsonProperty("token_type")] + public string TokenType { get; set; } + [JsonProperty("access_token")] + public string AccessToken { get; set; } + } +} \ No newline at end of file diff --git a/src/Bandwidth.Standard/Client/Configuration.cs b/src/Bandwidth.Standard/Client/Configuration.cs index a5d0bb39..9a73986d 100644 --- a/src/Bandwidth.Standard/Client/Configuration.cs +++ b/src/Bandwidth.Standard/Client/Configuration.cs @@ -20,6 +20,7 @@ using System.Text; using System.Net.Http; using System.Net.Security; +using Bandwidth.Standard.Client.Auth; namespace Bandwidth.Standard.Client { @@ -876,6 +877,30 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The access token. public virtual string AccessToken { get; set; } + /// + /// Gets or sets the token URL for OAuth2 authentication. + /// + /// The OAuth Token URL. + public virtual string OAuthTokenUrl { get; set; } + + /// + /// Gets or sets the client ID for OAuth2 authentication. + /// + /// The OAuth Client ID. + public virtual string OAuthClientId { get; set; } + + /// + /// Gets or sets the client secret for OAuth2 authentication. + /// + /// The OAuth Client Secret. + public virtual string OAuthClientSecret { get; set; } + + /// + /// Gets or sets the flow for OAuth2 authentication. + /// + /// The OAuth Flow. + public virtual OAuthFlow? OAuthFlow { get; set; } + /// /// Gets or sets the temporary folder path to store the files downloaded from the server. /// @@ -1195,6 +1220,10 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration Username = second.Username ?? first.Username, Password = second.Password ?? first.Password, AccessToken = second.AccessToken ?? first.AccessToken, + OAuthTokenUrl = second.OAuthTokenUrl ?? first.OAuthTokenUrl, + OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, + OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, + OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, diff --git a/src/Bandwidth.Standard/Client/IReadableConfiguration.cs b/src/Bandwidth.Standard/Client/IReadableConfiguration.cs index d910c143..587ae852 100644 --- a/src/Bandwidth.Standard/Client/IReadableConfiguration.cs +++ b/src/Bandwidth.Standard/Client/IReadableConfiguration.cs @@ -14,6 +14,7 @@ using System.Net; using System.Net.Security; using System.Security.Cryptography.X509Certificates; +using Bandwidth.Standard.Client.Auth; namespace Bandwidth.Standard.Client { @@ -28,6 +29,30 @@ public interface IReadableConfiguration /// Access token. string AccessToken { get; } + /// + /// Gets the OAuth token URL. + /// + /// OAuth Token URL. + string OAuthTokenUrl { get; } + + /// + /// Gets the OAuth client ID. + /// + /// OAuth Client ID. + string OAuthClientId { get; } + + /// + /// Gets the OAuth client secret. + /// + /// OAuth Client Secret. + string OAuthClientSecret { get; } + + /// + /// Gets the OAuth flow. + /// + /// OAuth Flow. + OAuthFlow? OAuthFlow { get; } + /// /// Gets the API key. /// diff --git a/src/Bandwidth.Standard/Client/RequestOptions.cs b/src/Bandwidth.Standard/Client/RequestOptions.cs index e7b6d045..e11610d6 100644 --- a/src/Bandwidth.Standard/Client/RequestOptions.cs +++ b/src/Bandwidth.Standard/Client/RequestOptions.cs @@ -69,6 +69,11 @@ public class RequestOptions /// public Object Data { get; set; } + /// + /// If request should be authenticated with OAuth. + /// + public bool OAuth { get; set; } + /// /// Constructs a new instance of /// diff --git a/src/Bandwidth.Standard/Model/LookupResult.cs b/src/Bandwidth.Standard/Model/LookupResult.cs index e566406b..549bafe1 100644 --- a/src/Bandwidth.Standard/Model/LookupResult.cs +++ b/src/Bandwidth.Standard/Model/LookupResult.cs @@ -130,7 +130,7 @@ public partial class LookupResult : IValidatableObject /// [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes. /// /// [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes. - /// Thu Jun 19 20:00:00 EDT 2025 + /// Fri Jun 20 00:00:00 UTC 2025 [DataMember(Name = "initialMessageDeliveryStatusDate", EmitDefaultValue = false)] [JsonConverter(typeof(OpenAPIDateConverter))] public DateTime InitialMessageDeliveryStatusDate { get; set; } @@ -139,7 +139,7 @@ public partial class LookupResult : IValidatableObject /// [DNI-Only](#section/DNI-Only). The date bandwidth last received delivery status information for this phone number. Use this field to understand how up-to-date the `latestMessageDeliveryStatus` is. Value resets every time the `latestMessageDeliveryStatus` changes. /// /// [DNI-Only](#section/DNI-Only). The date bandwidth last received delivery status information for this phone number. Use this field to understand how up-to-date the `latestMessageDeliveryStatus` is. Value resets every time the `latestMessageDeliveryStatus` changes. - /// Fri Jun 20 20:00:00 EDT 2025 + /// Sat Jun 21 00:00:00 UTC 2025 [DataMember(Name = "latestMessageDeliveryStatusDate", EmitDefaultValue = false)] [JsonConverter(typeof(OpenAPIDateConverter))] public DateTime LatestMessageDeliveryStatusDate { get; set; } diff --git a/src/Bandwidth.Standard/Model/RbmActionBase.cs b/src/Bandwidth.Standard/Model/RbmActionBase.cs index 9d7ac0e7..f41f14e2 100644 --- a/src/Bandwidth.Standard/Model/RbmActionBase.cs +++ b/src/Bandwidth.Standard/Model/RbmActionBase.cs @@ -78,7 +78,7 @@ protected RbmActionBase() { } /// Base64 payload the customer receives when the reply is clicked. /// /// Base64 payload the customer receives when the reply is clicked. - /// [B@1942a36e + /// [B@7e514482 [DataMember(Name = "postbackData", IsRequired = true, EmitDefaultValue = true)] public byte[] PostbackData { get; set; } diff --git a/src/Bandwidth.Standard/Model/RbmActionOpenUrl.cs b/src/Bandwidth.Standard/Model/RbmActionOpenUrl.cs index 767066fd..4d3e480b 100644 --- a/src/Bandwidth.Standard/Model/RbmActionOpenUrl.cs +++ b/src/Bandwidth.Standard/Model/RbmActionOpenUrl.cs @@ -38,6 +38,18 @@ public partial class RbmActionOpenUrl : IValidatableObject /// [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public RbmActionTypeEnum Type { get; set; } + + /// + /// Gets or Sets Application + /// + [DataMember(Name = "application", EmitDefaultValue = false)] + public RbmOpenUrlEnum? Application { get; set; } + + /// + /// Gets or Sets WebviewViewMode + /// + [DataMember(Name = "webviewViewMode", EmitDefaultValue = false)] + public RbmVebViewEnum? WebviewViewMode { get; set; } /// /// Initializes a new instance of the class. /// @@ -50,7 +62,9 @@ protected RbmActionOpenUrl() { } /// Displayed text for user to click (required). /// Base64 payload the customer receives when the reply is clicked. (required). /// The URL to open in browser. (required). - public RbmActionOpenUrl(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), byte[] postbackData = default(byte[]), string url = default(string)) + /// application. + /// webviewViewMode. + public RbmActionOpenUrl(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), byte[] postbackData = default(byte[]), string url = default(string), RbmOpenUrlEnum? application = default(RbmOpenUrlEnum?), RbmVebViewEnum? webviewViewMode = default(RbmVebViewEnum?)) { this.Type = type; // to ensure "text" is required (not null) @@ -71,6 +85,8 @@ protected RbmActionOpenUrl() { } throw new ArgumentNullException("url is a required property for RbmActionOpenUrl and cannot be null"); } this.Url = url; + this.Application = application; + this.WebviewViewMode = webviewViewMode; } /// @@ -109,6 +125,8 @@ public override string ToString() sb.Append(" Text: ").Append(Text).Append("\n"); sb.Append(" PostbackData: ").Append(PostbackData).Append("\n"); sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" Application: ").Append(Application).Append("\n"); + sb.Append(" WebviewViewMode: ").Append(WebviewViewMode).Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/src/Bandwidth.Standard/Model/RbmOpenUrlEnum.cs b/src/Bandwidth.Standard/Model/RbmOpenUrlEnum.cs new file mode 100644 index 00000000..e3f94f13 --- /dev/null +++ b/src/Bandwidth.Standard/Model/RbmOpenUrlEnum.cs @@ -0,0 +1,49 @@ +/* + * Bandwidth + * + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Bandwidth.Standard.Client.OpenAPIDateConverter; + +namespace Bandwidth.Standard.Model +{ + /// + /// Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device's default browser. If application is not set or the device doesn’t support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. + /// + /// Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device's default browser. If application is not set or the device doesn’t support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. + [JsonConverter(typeof(StringEnumConverter))] + public enum RbmOpenUrlEnum + { + /// + /// Enum BROWSER for value: BROWSER + /// + [EnumMember(Value = "BROWSER")] + BROWSER = 1, + + /// + /// Enum WEBVIEW for value: WEBVIEW + /// + [EnumMember(Value = "WEBVIEW")] + WEBVIEW = 2 + } + +} diff --git a/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs b/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs index 72170cc6..f1307dfc 100644 --- a/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs +++ b/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs @@ -55,7 +55,7 @@ public partial class RbmSuggestionResponse : IValidatableObject /// Base64 payload the customer receives when the reply is clicked. /// /// Base64 payload the customer receives when the reply is clicked. - /// [B@1942a36e + /// [B@7e514482 [DataMember(Name = "postbackData", EmitDefaultValue = false)] public byte[] PostbackData { get; set; } diff --git a/src/Bandwidth.Standard/Model/RbmVebViewEnum.cs b/src/Bandwidth.Standard/Model/RbmVebViewEnum.cs new file mode 100644 index 00000000..7ca60ce1 --- /dev/null +++ b/src/Bandwidth.Standard/Model/RbmVebViewEnum.cs @@ -0,0 +1,55 @@ +/* + * Bandwidth + * + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Bandwidth.Standard.Client.OpenAPIDateConverter; + +namespace Bandwidth.Standard.Model +{ + /// + /// Defines the layout of the WebView on a mobile device. It must be defined when application is set to `WEBVIEW` - `FULL` WebView takes the full screen. - `HALF` WebView takes half of the screen. - `TALL` WebView takes three-quarters of the screen. + /// + /// Defines the layout of the WebView on a mobile device. It must be defined when application is set to `WEBVIEW` - `FULL` WebView takes the full screen. - `HALF` WebView takes half of the screen. - `TALL` WebView takes three-quarters of the screen. + [JsonConverter(typeof(StringEnumConverter))] + public enum RbmVebViewEnum + { + /// + /// Enum FULL for value: FULL + /// + [EnumMember(Value = "FULL")] + FULL = 1, + + /// + /// Enum HALF for value: HALF + /// + [EnumMember(Value = "HALF")] + HALF = 2, + + /// + /// Enum TALL for value: TALL + /// + [EnumMember(Value = "TALL")] + TALL = 3 + } + +} From c6b60b22fb868f0079539823d813488d1ec74299 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 9 Dec 2025 17:30:11 -0500 Subject: [PATCH 2/3] unit tests --- .../Unit/Model/RbmActionOpenUrlTests.cs | 24 +++++++- .../Unit/Model/RbmOpenUrlEnumTests.cs | 55 +++++++++++++++++++ .../Unit/Model/RbmVebViewEnumTests.cs | 55 +++++++++++++++++++ 3 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 src/Bandwidth.Standard.Test/Unit/Model/RbmOpenUrlEnumTests.cs create mode 100644 src/Bandwidth.Standard.Test/Unit/Model/RbmVebViewEnumTests.cs diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmActionOpenUrlTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionOpenUrlTests.cs index a70918c6..86afc84e 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/RbmActionOpenUrlTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionOpenUrlTests.cs @@ -39,7 +39,9 @@ public RbmActionOpenUrlTests() type: RbmActionTypeEnum.OPENURL, text: "TestText", postbackData: new byte[] { 1, 2, 3 }, - url: "https://test.url/" + url: "https://test.url/", + application: RbmOpenUrlEnum.BROWSER, + webviewViewMode: RbmVebViewEnum.FULL ); } @@ -96,5 +98,25 @@ public void UrlTest() Assert.IsType(instance.Url); Assert.Equal("https://test.url/", instance.Url); } + + /// + /// Test the property 'Application' + /// + [Fact] + public void ApplicationTest() + { + Assert.IsType(instance.Application); + Assert.Equal(RbmOpenUrlEnum.BROWSER, instance.Application); + } + + /// + /// Test the property 'WebviewViewMode' + /// + [Fact] + public void WebviewViewModeTest() + { + Assert.IsType(instance.WebviewViewMode); + Assert.Equal(RbmVebViewEnum.FULL, instance.WebviewViewMode); + } } } diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmOpenUrlEnumTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmOpenUrlEnumTests.cs new file mode 100644 index 00000000..0dcaea2c --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmOpenUrlEnumTests.cs @@ -0,0 +1,55 @@ +/* + * Bandwidth + * + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Bandwidth.Standard.Model; +using Bandwidth.Standard.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Bandwidth.Standard.Test.Unit.Model +{ + /// + /// Class for testing RbmOpenUrlEnum + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RbmOpenUrlEnumTests : IDisposable + { + private RbmOpenUrlEnum instance; + + public RbmOpenUrlEnumTests() + { + instance = new RbmOpenUrlEnum(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RbmOpenUrlEnum + /// + [Fact] + public void RbmOpenUrlEnumInstanceTest() + { + Assert.IsType(instance); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmVebViewEnumTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmVebViewEnumTests.cs new file mode 100644 index 00000000..62e1af02 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmVebViewEnumTests.cs @@ -0,0 +1,55 @@ +/* + * Bandwidth + * + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Bandwidth.Standard.Model; +using Bandwidth.Standard.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Bandwidth.Standard.Test.Unit.Model +{ + /// + /// Class for testing RbmVebViewEnum + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RbmVebViewEnumTests : IDisposable + { + private RbmVebViewEnum instance; + + public RbmVebViewEnumTests() + { + instance = new RbmVebViewEnum(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RbmVebViewEnum + /// + [Fact] + public void RbmVebViewEnumInstanceTest() + { + Assert.IsType(instance); + } + } +} From 76608ed36daffe8c327ad8084b5dc416f716e7f1 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 9 Dec 2025 17:43:44 -0500 Subject: [PATCH 3/3] rename for typo --- .openapi-generator/FILES | 4 ++-- Bandwidth.Standard.sln | 12 ++++++------ README.md | 2 +- api/openapi.yaml | 4 ++-- bandwidth.yml | 4 ++-- docs/MultiChannelAction.md | 2 +- docs/RbmActionOpenUrl.md | 2 +- docs/{RbmVebViewEnum.md => RbmWebViewEnum.md} | 2 +- .../Unit/Model/RbmActionOpenUrlTests.cs | 6 +++--- ...ebViewEnumTests.cs => RbmWebViewEnumTests.cs} | 16 ++++++++-------- .../Client/Auth/OAuthAuthenticator.cs | 2 +- src/Bandwidth.Standard/Model/LookupResult.cs | 4 ++-- src/Bandwidth.Standard/Model/RbmActionBase.cs | 6 +++--- src/Bandwidth.Standard/Model/RbmActionOpenUrl.cs | 4 ++-- .../Model/RbmSuggestionResponse.cs | 4 ++-- .../{RbmVebViewEnum.cs => RbmWebViewEnum.cs} | 2 +- 16 files changed, 38 insertions(+), 38 deletions(-) rename docs/{RbmVebViewEnum.md => RbmWebViewEnum.md} (92%) rename src/Bandwidth.Standard.Test/Unit/Model/{RbmVebViewEnumTests.cs => RbmWebViewEnumTests.cs} (71%) rename src/Bandwidth.Standard/Model/{RbmVebViewEnum.cs => RbmWebViewEnum.cs} (98%) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 4bf627bd..9fa5c7fe 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -138,7 +138,7 @@ docs/RbmMessageMedia.md docs/RbmOpenUrlEnum.md docs/RbmStandaloneCard.md docs/RbmSuggestionResponse.md -docs/RbmVebViewEnum.md +docs/RbmWebViewEnum.md docs/RecordingAvailableCallback.md docs/RecordingCompleteCallback.md docs/RecordingStateEnum.md @@ -350,7 +350,7 @@ src/Bandwidth.Standard/Model/RbmMessageMedia.cs src/Bandwidth.Standard/Model/RbmOpenUrlEnum.cs src/Bandwidth.Standard/Model/RbmStandaloneCard.cs src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs -src/Bandwidth.Standard/Model/RbmVebViewEnum.cs +src/Bandwidth.Standard/Model/RbmWebViewEnum.cs src/Bandwidth.Standard/Model/RecordingAvailableCallback.cs src/Bandwidth.Standard/Model/RecordingCompleteCallback.cs src/Bandwidth.Standard/Model/RecordingStateEnum.cs diff --git a/Bandwidth.Standard.sln b/Bandwidth.Standard.sln index 76792b4f..45670746 100644 --- a/Bandwidth.Standard.sln +++ b/Bandwidth.Standard.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{F953FB82-C495-4E6B-9AAA-9DEA798F76D9}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{1B496B75-0E81-41BC-86C2-73D16188960A}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard.Test", "src\Bandwidth.Standard.Test\Bandwidth.Standard.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject @@ -12,10 +12,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F953FB82-C495-4E6B-9AAA-9DEA798F76D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F953FB82-C495-4E6B-9AAA-9DEA798F76D9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F953FB82-C495-4E6B-9AAA-9DEA798F76D9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F953FB82-C495-4E6B-9AAA-9DEA798F76D9}.Release|Any CPU.Build.0 = Release|Any CPU + {1B496B75-0E81-41BC-86C2-73D16188960A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1B496B75-0E81-41BC-86C2-73D16188960A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1B496B75-0E81-41BC-86C2-73D16188960A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1B496B75-0E81-41BC-86C2-73D16188960A}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -24,4 +24,4 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection -EndGlobal +EndGlobal \ No newline at end of file diff --git a/README.md b/README.md index 34dc00c1..63e41ead 100644 --- a/README.md +++ b/README.md @@ -297,7 +297,7 @@ Class | Method | HTTP request | Description - [Model.RbmOpenUrlEnum](docs/RbmOpenUrlEnum.md) - [Model.RbmStandaloneCard](docs/RbmStandaloneCard.md) - [Model.RbmSuggestionResponse](docs/RbmSuggestionResponse.md) - - [Model.RbmVebViewEnum](docs/RbmVebViewEnum.md) + - [Model.RbmWebViewEnum](docs/RbmWebViewEnum.md) - [Model.RecordingAvailableCallback](docs/RecordingAvailableCallback.md) - [Model.RecordingCompleteCallback](docs/RecordingCompleteCallback.md) - [Model.RecordingStateEnum](docs/RecordingStateEnum.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 7dfade8d..9cd4e5ce 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -8879,7 +8879,7 @@ components: - WEBVIEW example: WEBVIEW type: string - rbmVebViewEnum: + rbmWebViewEnum: description: "Defines the layout of the WebView on a mobile device. It must\ \ be defined when application is set to `WEBVIEW`\n- `FULL` WebView takes\ \ the full screen. \n- `HALF` WebView takes half of the screen.\n- `TALL`\ @@ -9010,7 +9010,7 @@ components: application: $ref: '#/components/schemas/rbmOpenUrlEnum' webviewViewMode: - $ref: '#/components/schemas/rbmVebViewEnum' + $ref: '#/components/schemas/rbmWebViewEnum' required: - url title: Open URL diff --git a/bandwidth.yml b/bandwidth.yml index db625ad7..d7c32953 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -2392,7 +2392,7 @@ components: - BROWSER - WEBVIEW example: WEBVIEW - rbmVebViewEnum: + rbmWebViewEnum: type: string description: >- Defines the layout of the WebView on a mobile device. It must be defined @@ -2514,7 +2514,7 @@ components: application: $ref: '#/components/schemas/rbmOpenUrlEnum' webviewViewMode: - $ref: '#/components/schemas/rbmVebViewEnum' + $ref: '#/components/schemas/rbmWebViewEnum' required: - url multiChannelFullActions: diff --git a/docs/MultiChannelAction.md b/docs/MultiChannelAction.md index 70b4a81c..fd6ebbf8 100644 --- a/docs/MultiChannelAction.md +++ b/docs/MultiChannelAction.md @@ -17,7 +17,7 @@ Name | Type | Description | Notes **Description** | **string** | The description of the event. | [optional] **Url** | **string** | The URL to open in browser. | **Application** | **RbmOpenUrlEnum** | | [optional] -**WebviewViewMode** | **RbmVebViewEnum** | | [optional] +**WebviewViewMode** | **RbmWebViewEnum** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RbmActionOpenUrl.md b/docs/RbmActionOpenUrl.md index a656914d..8abc0e36 100644 --- a/docs/RbmActionOpenUrl.md +++ b/docs/RbmActionOpenUrl.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **PostbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | **Url** | **string** | The URL to open in browser. | **Application** | **RbmOpenUrlEnum** | | [optional] -**WebviewViewMode** | **RbmVebViewEnum** | | [optional] +**WebviewViewMode** | **RbmWebViewEnum** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RbmVebViewEnum.md b/docs/RbmWebViewEnum.md similarity index 92% rename from docs/RbmVebViewEnum.md rename to docs/RbmWebViewEnum.md index f857eab3..ae441a3e 100644 --- a/docs/RbmVebViewEnum.md +++ b/docs/RbmWebViewEnum.md @@ -1,4 +1,4 @@ -# Bandwidth.Standard.Model.RbmVebViewEnum +# Bandwidth.Standard.Model.RbmWebViewEnum Defines the layout of the WebView on a mobile device. It must be defined when application is set to `WEBVIEW` - `FULL` WebView takes the full screen. - `HALF` WebView takes half of the screen. - `TALL` WebView takes three-quarters of the screen. ## Properties diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmActionOpenUrlTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionOpenUrlTests.cs index 86afc84e..589f00f7 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/RbmActionOpenUrlTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionOpenUrlTests.cs @@ -41,7 +41,7 @@ public RbmActionOpenUrlTests() postbackData: new byte[] { 1, 2, 3 }, url: "https://test.url/", application: RbmOpenUrlEnum.BROWSER, - webviewViewMode: RbmVebViewEnum.FULL + webviewViewMode: RbmWebViewEnum.FULL ); } @@ -115,8 +115,8 @@ public void ApplicationTest() [Fact] public void WebviewViewModeTest() { - Assert.IsType(instance.WebviewViewMode); - Assert.Equal(RbmVebViewEnum.FULL, instance.WebviewViewMode); + Assert.IsType(instance.WebviewViewMode); + Assert.Equal(RbmWebViewEnum.FULL, instance.WebviewViewMode); } } } diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmVebViewEnumTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmWebViewEnumTests.cs similarity index 71% rename from src/Bandwidth.Standard.Test/Unit/Model/RbmVebViewEnumTests.cs rename to src/Bandwidth.Standard.Test/Unit/Model/RbmWebViewEnumTests.cs index 62e1af02..7aae129a 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/RbmVebViewEnumTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmWebViewEnumTests.cs @@ -23,19 +23,19 @@ namespace Bandwidth.Standard.Test.Unit.Model { /// - /// Class for testing RbmVebViewEnum + /// Class for testing RbmWebViewEnum /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class RbmVebViewEnumTests : IDisposable + public class RbmWebViewEnumTests : IDisposable { - private RbmVebViewEnum instance; + private RbmWebViewEnum instance; - public RbmVebViewEnumTests() + public RbmWebViewEnumTests() { - instance = new RbmVebViewEnum(); + instance = new RbmWebViewEnum(); } public void Dispose() @@ -44,12 +44,12 @@ public void Dispose() } /// - /// Test an instance of RbmVebViewEnum + /// Test an instance of RbmWebViewEnum /// [Fact] - public void RbmVebViewEnumInstanceTest() + public void RbmWebViewEnumInstanceTest() { - Assert.IsType(instance); + Assert.IsType(instance); } } } diff --git a/src/Bandwidth.Standard/Client/Auth/OAuthAuthenticator.cs b/src/Bandwidth.Standard/Client/Auth/OAuthAuthenticator.cs index 9e44c762..4217b129 100644 --- a/src/Bandwidth.Standard/Client/Auth/OAuthAuthenticator.cs +++ b/src/Bandwidth.Standard/Client/Auth/OAuthAuthenticator.cs @@ -90,7 +90,7 @@ async Task GetToken() .AddHeader("Authorization", $"Basic {credentials}") .AddParameter("grant_type", _grantType, ParameterType.GetOrPost); var response = await client.PostAsync(request).ConfigureAwait(false); - + // RFC6749 - token_type is case insensitive. // RFC6750 - In Authorization header Bearer should be capitalized. // Fix the capitalization irrespective of token_type casing. diff --git a/src/Bandwidth.Standard/Model/LookupResult.cs b/src/Bandwidth.Standard/Model/LookupResult.cs index 549bafe1..e566406b 100644 --- a/src/Bandwidth.Standard/Model/LookupResult.cs +++ b/src/Bandwidth.Standard/Model/LookupResult.cs @@ -130,7 +130,7 @@ public partial class LookupResult : IValidatableObject /// [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes. /// /// [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes. - /// Fri Jun 20 00:00:00 UTC 2025 + /// Thu Jun 19 20:00:00 EDT 2025 [DataMember(Name = "initialMessageDeliveryStatusDate", EmitDefaultValue = false)] [JsonConverter(typeof(OpenAPIDateConverter))] public DateTime InitialMessageDeliveryStatusDate { get; set; } @@ -139,7 +139,7 @@ public partial class LookupResult : IValidatableObject /// [DNI-Only](#section/DNI-Only). The date bandwidth last received delivery status information for this phone number. Use this field to understand how up-to-date the `latestMessageDeliveryStatus` is. Value resets every time the `latestMessageDeliveryStatus` changes. /// /// [DNI-Only](#section/DNI-Only). The date bandwidth last received delivery status information for this phone number. Use this field to understand how up-to-date the `latestMessageDeliveryStatus` is. Value resets every time the `latestMessageDeliveryStatus` changes. - /// Sat Jun 21 00:00:00 UTC 2025 + /// Fri Jun 20 20:00:00 EDT 2025 [DataMember(Name = "latestMessageDeliveryStatusDate", EmitDefaultValue = false)] [JsonConverter(typeof(OpenAPIDateConverter))] public DateTime LatestMessageDeliveryStatusDate { get; set; } diff --git a/src/Bandwidth.Standard/Model/RbmActionBase.cs b/src/Bandwidth.Standard/Model/RbmActionBase.cs index 1fa18b32..e7864304 100644 --- a/src/Bandwidth.Standard/Model/RbmActionBase.cs +++ b/src/Bandwidth.Standard/Model/RbmActionBase.cs @@ -78,7 +78,7 @@ protected RbmActionBase() { } /// Base64 payload the customer receives when the reply is clicked. /// /// Base64 payload the customer receives when the reply is clicked. - /// [B@3fe5ad73 + /// [B@731d0d5c [DataMember(Name = "postbackData", IsRequired = true, EmitDefaultValue = true)] public byte[] PostbackData { get; set; } @@ -116,13 +116,13 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali // Text (string) maxLength if (this.Text != null && this.Text.Length > 25) { - yield return new ValidationResult("Invalid value for Text, length must be less than 25.", new[] { "Text" }); + yield return new ValidationResult("Invalid value for Text, length must be less than 25.", new [] { "Text" }); } // PostbackData (byte[]) maxLength if (this.PostbackData != null && this.PostbackData.Length > 2048) { - yield return new ValidationResult("Invalid value for PostbackData, length must be less than 2048.", new[] { "PostbackData" }); + yield return new ValidationResult("Invalid value for PostbackData, length must be less than 2048.", new [] { "PostbackData" }); } yield break; diff --git a/src/Bandwidth.Standard/Model/RbmActionOpenUrl.cs b/src/Bandwidth.Standard/Model/RbmActionOpenUrl.cs index 4d3e480b..e44a20a9 100644 --- a/src/Bandwidth.Standard/Model/RbmActionOpenUrl.cs +++ b/src/Bandwidth.Standard/Model/RbmActionOpenUrl.cs @@ -49,7 +49,7 @@ public partial class RbmActionOpenUrl : IValidatableObject /// Gets or Sets WebviewViewMode /// [DataMember(Name = "webviewViewMode", EmitDefaultValue = false)] - public RbmVebViewEnum? WebviewViewMode { get; set; } + public RbmWebViewEnum? WebviewViewMode { get; set; } /// /// Initializes a new instance of the class. /// @@ -64,7 +64,7 @@ protected RbmActionOpenUrl() { } /// The URL to open in browser. (required). /// application. /// webviewViewMode. - public RbmActionOpenUrl(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), byte[] postbackData = default(byte[]), string url = default(string), RbmOpenUrlEnum? application = default(RbmOpenUrlEnum?), RbmVebViewEnum? webviewViewMode = default(RbmVebViewEnum?)) + public RbmActionOpenUrl(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), byte[] postbackData = default(byte[]), string url = default(string), RbmOpenUrlEnum? application = default(RbmOpenUrlEnum?), RbmWebViewEnum? webviewViewMode = default(RbmWebViewEnum?)) { this.Type = type; // to ensure "text" is required (not null) diff --git a/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs b/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs index e63cb044..732e4594 100644 --- a/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs +++ b/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs @@ -55,7 +55,7 @@ public partial class RbmSuggestionResponse : IValidatableObject /// Base64 payload the customer receives when the reply is clicked. /// /// Base64 payload the customer receives when the reply is clicked. - /// [B@3fe5ad73 + /// [B@731d0d5c [DataMember(Name = "postbackData", EmitDefaultValue = false)] public byte[] PostbackData { get; set; } @@ -92,7 +92,7 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali // PostbackData (byte[]) maxLength if (this.PostbackData != null && this.PostbackData.Length > 2048) { - yield return new ValidationResult("Invalid value for PostbackData, length must be less than 2048.", new[] { "PostbackData" }); + yield return new ValidationResult("Invalid value for PostbackData, length must be less than 2048.", new [] { "PostbackData" }); } yield break; diff --git a/src/Bandwidth.Standard/Model/RbmVebViewEnum.cs b/src/Bandwidth.Standard/Model/RbmWebViewEnum.cs similarity index 98% rename from src/Bandwidth.Standard/Model/RbmVebViewEnum.cs rename to src/Bandwidth.Standard/Model/RbmWebViewEnum.cs index 7ca60ce1..76dc5047 100644 --- a/src/Bandwidth.Standard/Model/RbmVebViewEnum.cs +++ b/src/Bandwidth.Standard/Model/RbmWebViewEnum.cs @@ -31,7 +31,7 @@ namespace Bandwidth.Standard.Model /// /// Defines the layout of the WebView on a mobile device. It must be defined when application is set to `WEBVIEW` - `FULL` WebView takes the full screen. - `HALF` WebView takes half of the screen. - `TALL` WebView takes three-quarters of the screen. [JsonConverter(typeof(StringEnumConverter))] - public enum RbmVebViewEnum + public enum RbmWebViewEnum { /// /// Enum FULL for value: FULL