Skip to content

Commit c5c753f

Browse files
band-swi-release-engineering[bot]DX-Bandwidthckoegel
authored
SWI-9202 Update SDK Based on Recent Spec Changes (#169)
* Generate SDK with OpenAPI Generator Version * unit tests * rename for typo --------- Co-authored-by: DX-Bandwidth <[email protected]> Co-authored-by: ckoegel <[email protected]>
1 parent c21b4c4 commit c5c753f

18 files changed

+352
-11
lines changed

.openapi-generator/FILES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,10 @@ docs/RbmMessageContentFile.md
135135
docs/RbmMessageContentRichCard.md
136136
docs/RbmMessageContentText.md
137137
docs/RbmMessageMedia.md
138+
docs/RbmOpenUrlEnum.md
138139
docs/RbmStandaloneCard.md
139140
docs/RbmSuggestionResponse.md
141+
docs/RbmWebViewEnum.md
140142
docs/RecordingAvailableCallback.md
141143
docs/RecordingCompleteCallback.md
142144
docs/RecordingStateEnum.md
@@ -345,8 +347,10 @@ src/Bandwidth.Standard/Model/RbmMessageContentFile.cs
345347
src/Bandwidth.Standard/Model/RbmMessageContentRichCard.cs
346348
src/Bandwidth.Standard/Model/RbmMessageContentText.cs
347349
src/Bandwidth.Standard/Model/RbmMessageMedia.cs
350+
src/Bandwidth.Standard/Model/RbmOpenUrlEnum.cs
348351
src/Bandwidth.Standard/Model/RbmStandaloneCard.cs
349352
src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs
353+
src/Bandwidth.Standard/Model/RbmWebViewEnum.cs
350354
src/Bandwidth.Standard/Model/RecordingAvailableCallback.cs
351355
src/Bandwidth.Standard/Model/RecordingCompleteCallback.cs
352356
src/Bandwidth.Standard/Model/RecordingStateEnum.cs

Bandwidth.Standard.sln

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio 14
33
VisualStudioVersion = 14.0.25420.1
44
MinimumVisualStudioVersion = 10.0.40219.1
5-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{F953FB82-C495-4E6B-9AAA-9DEA798F76D9}"
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{1B496B75-0E81-41BC-86C2-73D16188960A}"
66
EndProject
77
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard.Test", "src\Bandwidth.Standard.Test\Bandwidth.Standard.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
88
EndProject
@@ -12,10 +12,10 @@ Global
1212
Release|Any CPU = Release|Any CPU
1313
EndGlobalSection
1414
GlobalSection(ProjectConfigurationPlatforms) = postSolution
15-
{F953FB82-C495-4E6B-9AAA-9DEA798F76D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16-
{F953FB82-C495-4E6B-9AAA-9DEA798F76D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
17-
{F953FB82-C495-4E6B-9AAA-9DEA798F76D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
18-
{F953FB82-C495-4E6B-9AAA-9DEA798F76D9}.Release|Any CPU.Build.0 = Release|Any CPU
15+
{1B496B75-0E81-41BC-86C2-73D16188960A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16+
{1B496B75-0E81-41BC-86C2-73D16188960A}.Debug|Any CPU.Build.0 = Debug|Any CPU
17+
{1B496B75-0E81-41BC-86C2-73D16188960A}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{1B496B75-0E81-41BC-86C2-73D16188960A}.Release|Any CPU.Build.0 = Release|Any CPU
1919
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2020
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
2121
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,10 @@ Class | Method | HTTP request | Description
294294
- [Model.RbmMessageContentRichCard](docs/RbmMessageContentRichCard.md)
295295
- [Model.RbmMessageContentText](docs/RbmMessageContentText.md)
296296
- [Model.RbmMessageMedia](docs/RbmMessageMedia.md)
297+
- [Model.RbmOpenUrlEnum](docs/RbmOpenUrlEnum.md)
297298
- [Model.RbmStandaloneCard](docs/RbmStandaloneCard.md)
298299
- [Model.RbmSuggestionResponse](docs/RbmSuggestionResponse.md)
300+
- [Model.RbmWebViewEnum](docs/RbmWebViewEnum.md)
299301
- [Model.RecordingAvailableCallback](docs/RecordingAvailableCallback.md)
300302
- [Model.RecordingCompleteCallback](docs/RecordingCompleteCallback.md)
301303
- [Model.RecordingStateEnum](docs/RecordingStateEnum.md)

api/openapi.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8869,6 +8869,26 @@ components:
88698869
- REQUEST_LOCATION
88708870
example: REPLY
88718871
type: string
8872+
rbmOpenUrlEnum:
8873+
description: "Specifies how the URL should be opened on a mobile device.\n-\
8874+
\ `BROWSER` Opens the URL in the device's default browser. If application\
8875+
\ is not set or the device doesn’t support WebView, this option is used by\
8876+
\ default. \n- `WEBVIEW` Opens the URL in an in-app WebView."
8877+
enum:
8878+
- BROWSER
8879+
- WEBVIEW
8880+
example: WEBVIEW
8881+
type: string
8882+
rbmWebViewEnum:
8883+
description: "Defines the layout of the WebView on a mobile device. It must\
8884+
\ be defined when application is set to `WEBVIEW`\n- `FULL` WebView takes\
8885+
\ the full screen. \n- `HALF` WebView takes half of the screen.\n- `TALL`\
8886+
\ WebView takes three-quarters of the screen."
8887+
enum:
8888+
- FULL
8889+
- HALF
8890+
- TALL
8891+
type: string
88728892
rbmActionText:
88738893
description: Displayed text for user to click
88748894
example: Hello world
@@ -8987,6 +9007,10 @@ components:
89879007
format: uri
89889008
maxLength: 2048
89899009
type: string
9010+
application:
9011+
$ref: '#/components/schemas/rbmOpenUrlEnum'
9012+
webviewViewMode:
9013+
$ref: '#/components/schemas/rbmWebViewEnum'
89909014
required:
89919015
- url
89929016
title: Open URL

bandwidth.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2378,6 +2378,35 @@ components:
23782378
- OPEN_URL
23792379
- REQUEST_LOCATION
23802380
example: REPLY
2381+
rbmOpenUrlEnum:
2382+
type: string
2383+
description: >-
2384+
Specifies how the URL should be opened on a mobile device.
2385+
2386+
- `BROWSER` Opens the URL in the device's default browser. If
2387+
application is not set or the device doesn’t support WebView, this
2388+
option is used by default.
2389+
2390+
- `WEBVIEW` Opens the URL in an in-app WebView.
2391+
enum:
2392+
- BROWSER
2393+
- WEBVIEW
2394+
example: WEBVIEW
2395+
rbmWebViewEnum:
2396+
type: string
2397+
description: >-
2398+
Defines the layout of the WebView on a mobile device. It must be defined
2399+
when application is set to `WEBVIEW`
2400+
2401+
- `FULL` WebView takes the full screen.
2402+
2403+
- `HALF` WebView takes half of the screen.
2404+
2405+
- `TALL` WebView takes three-quarters of the screen.
2406+
enum:
2407+
- FULL
2408+
- HALF
2409+
- TALL
23812410
rbmActionText:
23822411
title: Text
23832412
type: string
@@ -2482,6 +2511,10 @@ components:
24822511
description: The URL to open in browser.
24832512
example: https://dev.bandwidth.com
24842513
maxLength: 2048
2514+
application:
2515+
$ref: '#/components/schemas/rbmOpenUrlEnum'
2516+
webviewViewMode:
2517+
$ref: '#/components/schemas/rbmWebViewEnum'
24852518
required:
24862519
- url
24872520
multiChannelFullActions:

docs/MultiChannelAction.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Name | Type | Description | Notes
1616
**EndTime** | **DateTime** | The end time of the event. |
1717
**Description** | **string** | The description of the event. | [optional]
1818
**Url** | **string** | The URL to open in browser. |
19+
**Application** | **RbmOpenUrlEnum** | | [optional]
20+
**WebviewViewMode** | **RbmWebViewEnum** | | [optional]
1921

2022
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2123

docs/RbmActionOpenUrl.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Name | Type | Description | Notes
88
**Text** | **string** | Displayed text for user to click |
99
**PostbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. |
1010
**Url** | **string** | The URL to open in browser. |
11+
**Application** | **RbmOpenUrlEnum** | | [optional]
12+
**WebviewViewMode** | **RbmWebViewEnum** | | [optional]
1113

1214
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1315

docs/RbmOpenUrlEnum.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Bandwidth.Standard.Model.RbmOpenUrlEnum
2+
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.
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+

docs/RbmWebViewEnum.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Bandwidth.Standard.Model.RbmWebViewEnum
2+
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.
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+

src/Bandwidth.Standard.Test/Unit/Model/RbmActionOpenUrlTests.cs

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ public RbmActionOpenUrlTests()
3939
type: RbmActionTypeEnum.OPENURL,
4040
text: "TestText",
4141
postbackData: new byte[] { 1, 2, 3 },
42-
url: "https://test.url/"
42+
url: "https://test.url/",
43+
application: RbmOpenUrlEnum.BROWSER,
44+
webviewViewMode: RbmWebViewEnum.FULL
4345
);
4446
}
4547

@@ -96,5 +98,25 @@ public void UrlTest()
9698
Assert.IsType<string>(instance.Url);
9799
Assert.Equal("https://test.url/", instance.Url);
98100
}
101+
102+
/// <summary>
103+
/// Test the property 'Application'
104+
/// </summary>
105+
[Fact]
106+
public void ApplicationTest()
107+
{
108+
Assert.IsType<RbmOpenUrlEnum>(instance.Application);
109+
Assert.Equal(RbmOpenUrlEnum.BROWSER, instance.Application);
110+
}
111+
112+
/// <summary>
113+
/// Test the property 'WebviewViewMode'
114+
/// </summary>
115+
[Fact]
116+
public void WebviewViewModeTest()
117+
{
118+
Assert.IsType<RbmWebViewEnum>(instance.WebviewViewMode);
119+
Assert.Equal(RbmWebViewEnum.FULL, instance.WebviewViewMode);
120+
}
99121
}
100122
}

0 commit comments

Comments
 (0)