Skip to content

Commit 2d81d31

Browse files
band-swi[bot]DX-Bandwidthckoegel
authored
SWI-7375 Update SDK Based on Recent Spec Changes (#140)
* Generate SDK with OpenAPI Generator Version * update unit test * Uui --------- Co-authored-by: DX-Bandwidth <dx@bandwidth.com> Co-authored-by: ckoegel <ckoegel1006@gmail.com> Co-authored-by: Cameron Koegel <53310569+ckoegel@users.noreply.github.com>
1 parent 4aedb16 commit 2d81d31

File tree

6 files changed

+61
-6
lines changed

6 files changed

+61
-6
lines changed

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", "{DDDF742A-20C3-4C63-9E4A-64D5D21514B0}"
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{E141B9CC-5B88-4A01-9A7C-18C8B2581B9E}"
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-
{DDDF742A-20C3-4C63-9E4A-64D5D21514B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16-
{DDDF742A-20C3-4C63-9E4A-64D5D21514B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
17-
{DDDF742A-20C3-4C63-9E4A-64D5D21514B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
18-
{DDDF742A-20C3-4C63-9E4A-64D5D21514B0}.Release|Any CPU.Build.0 = Release|Any CPU
15+
{E141B9CC-5B88-4A01-9A7C-18C8B2581B9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16+
{E141B9CC-5B88-4A01-9A7C-18C8B2581B9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
17+
{E141B9CC-5B88-4A01-9A7C-18C8B2581B9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{E141B9CC-5B88-4A01-9A7C-18C8B2581B9E}.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

api/openapi.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9939,6 +9939,14 @@ components:
99399939
$ref: '#/components/schemas/diversion'
99409940
stirShaken:
99419941
$ref: '#/components/schemas/stirShaken'
9942+
uui:
9943+
description: "The value of the `User-To-User` header to send within the\
9944+
\ initial `INVITE`. Must include the encoding parameter as specified in\
9945+
\ RFC 7433. Only `base64`, `jwt` and `hex` encoding are currently allowed.\
9946+
\ This value, including the encoding specifier, may not exceed 256 characters."
9947+
example: bXktdXVp
9948+
maxLength: 256
9949+
type: string
99429950
type: object
99439951
machineDetectionCompleteCallback:
99449952
description: "This event is sent to the url informed when requesting a machine\
@@ -11018,6 +11026,14 @@ components:
1101811026
example: 99759086-1335-11ed-9bcf-5f7d464e91af
1101911027
type: string
1102011028
type: object
11029+
uui:
11030+
description: "The value of the `User-To-User` header to send within the initial\
11031+
\ `INVITE`. Must include the encoding parameter as specified in RFC 7433.\
11032+
\ Only `base64`, `jwt` and `hex` encoding are currently allowed. This value,\
11033+
\ including the encoding specifier, may not exceed 256 characters."
11034+
example: bXktdXVp
11035+
maxLength: 256
11036+
type: string
1102111037
codeRequest:
1102211038
properties:
1102311039
to:

bandwidth.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3801,6 +3801,8 @@ components:
38013801
$ref: '#/components/schemas/diversion'
38023802
stirShaken:
38033803
$ref: '#/components/schemas/stirShaken'
3804+
uui:
3805+
$ref: '#/components/schemas/uui'
38043806
machineDetectionCompleteCallback:
38053807
type: object
38063808
description: >-
@@ -4435,6 +4437,15 @@ components:
44354437
type: string
44364438
description: (optional) A unique origination identifier.
44374439
example: 99759086-1335-11ed-9bcf-5f7d464e91af
4440+
uui:
4441+
type: string
4442+
description: >-
4443+
The value of the `User-To-User` header to send within the initial
4444+
`INVITE`. Must include the encoding parameter as specified in RFC 7433.
4445+
Only `base64`, `jwt` and `hex` encoding are currently allowed. This
4446+
value, including the encoding specifier, may not exceed 256 characters.
4447+
example: bXktdXVp
4448+
maxLength: 256
44384449
codeRequest:
44394450
type: object
44404451
properties:

docs/InitiateCallback.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Name | Type | Description | Notes
1717
**StartTime** | **DateTime** | Time the call was started, in ISO 8601 format. | [optional]
1818
**Diversion** | [**Diversion**](Diversion.md) | | [optional]
1919
**StirShaken** | [**StirShaken**](StirShaken.md) | | [optional]
20+
**Uui** | **string** | The value of the &#x60;User-To-User&#x60; header to send within the initial &#x60;INVITE&#x60;. Must include the encoding parameter as specified in RFC 7433. Only &#x60;base64&#x60;, &#x60;jwt&#x60; and &#x60;hex&#x60; encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters. | [optional]
2021

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

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,16 @@ public void StirShakenTest()
167167
instance.StirShaken = new StirShaken();
168168
Assert.IsType<StirShaken>(instance.StirShaken);
169169
}
170+
/// <summary>
171+
/// Test the property 'uui'
172+
/// </summary>
173+
[Fact]
174+
public void uuiTest()
175+
{
176+
instance.Uui = "test";
177+
Assert.IsType<string>(instance.Uui);
178+
Assert.Equal("test", instance.Uui);
179+
}
170180

171181
}
172182

src/Bandwidth.Standard/Model/InitiateCallback.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ public partial class InitiateCallback : IValidatableObject
5353
/// <param name="startTime">Time the call was started, in ISO 8601 format..</param>
5454
/// <param name="diversion">diversion.</param>
5555
/// <param name="stirShaken">stirShaken.</param>
56-
public InitiateCallback(string eventType = default(string), DateTime eventTime = default(DateTime), string accountId = default(string), string applicationId = default(string), string from = default(string), string to = default(string), CallDirectionEnum? direction = default(CallDirectionEnum?), string callId = default(string), string callUrl = default(string), DateTime startTime = default(DateTime), Diversion diversion = default(Diversion), StirShaken stirShaken = default(StirShaken))
56+
/// <param name="uui">The value of the &#x60;User-To-User&#x60; header to send within the initial &#x60;INVITE&#x60;. Must include the encoding parameter as specified in RFC 7433. Only &#x60;base64&#x60;, &#x60;jwt&#x60; and &#x60;hex&#x60; encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters..</param>
57+
public InitiateCallback(string eventType = default(string), DateTime eventTime = default(DateTime), string accountId = default(string), string applicationId = default(string), string from = default(string), string to = default(string), CallDirectionEnum? direction = default(CallDirectionEnum?), string callId = default(string), string callUrl = default(string), DateTime startTime = default(DateTime), Diversion diversion = default(Diversion), StirShaken stirShaken = default(StirShaken), string uui = default(string))
5758
{
5859
this.EventType = eventType;
5960
this.EventTime = eventTime;
@@ -67,6 +68,7 @@ public partial class InitiateCallback : IValidatableObject
6768
this.StartTime = startTime;
6869
this.Diversion = diversion;
6970
this.StirShaken = stirShaken;
71+
this.Uui = uui;
7072
}
7173

7274
/// <summary>
@@ -153,6 +155,14 @@ public partial class InitiateCallback : IValidatableObject
153155
[DataMember(Name = "stirShaken", EmitDefaultValue = false)]
154156
public StirShaken StirShaken { get; set; }
155157

158+
/// <summary>
159+
/// The value of the &#x60;User-To-User&#x60; header to send within the initial &#x60;INVITE&#x60;. Must include the encoding parameter as specified in RFC 7433. Only &#x60;base64&#x60;, &#x60;jwt&#x60; and &#x60;hex&#x60; encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters.
160+
/// </summary>
161+
/// <value>The value of the &#x60;User-To-User&#x60; header to send within the initial &#x60;INVITE&#x60;. Must include the encoding parameter as specified in RFC 7433. Only &#x60;base64&#x60;, &#x60;jwt&#x60; and &#x60;hex&#x60; encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters.</value>
162+
/// <example>bXktdXVp</example>
163+
[DataMember(Name = "uui", EmitDefaultValue = false)]
164+
public string Uui { get; set; }
165+
156166
/// <summary>
157167
/// Returns the string presentation of the object
158168
/// </summary>
@@ -173,6 +183,7 @@ public override string ToString()
173183
sb.Append(" StartTime: ").Append(StartTime).Append("\n");
174184
sb.Append(" Diversion: ").Append(Diversion).Append("\n");
175185
sb.Append(" StirShaken: ").Append(StirShaken).Append("\n");
186+
sb.Append(" Uui: ").Append(Uui).Append("\n");
176187
sb.Append("}\n");
177188
return sb.ToString();
178189
}
@@ -193,6 +204,12 @@ public virtual string ToJson()
193204
/// <returns>Validation Result</returns>
194205
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
195206
{
207+
// Uui (string) maxLength
208+
if (this.Uui != null && this.Uui.Length > 256)
209+
{
210+
yield return new ValidationResult("Invalid value for Uui, length must be less than 256.", new [] { "Uui" });
211+
}
212+
196213
yield break;
197214
}
198215
}

0 commit comments

Comments
 (0)