From 7d13763c50ccd616483a0d916b895fe78afc8938 Mon Sep 17 00:00:00 2001 From: DX-Bandwidth Date: Tue, 12 May 2026 15:00:22 +0000 Subject: [PATCH 1/2] Generate SDK with OpenAPI Generator Version --- Bandwidth.Standard.sln | 10 ++++----- api/openapi.yaml | 17 ++++++++++++++ bandwidth.yml | 22 +++++++++++++++++++ docs/SyncLookupRequest.md | 1 + src/Bandwidth.Standard/Model/RbmActionBase.cs | 2 +- .../Model/RbmSuggestionResponse.cs | 2 +- .../Model/SyncLookupRequest.cs | 22 ++++++++++++++++++- 7 files changed, 68 insertions(+), 8 deletions(-) diff --git a/Bandwidth.Standard.sln b/Bandwidth.Standard.sln index ab5b2011..dab502a5 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", "{E14115CA-15F6-4B76-873A-2BCF556F002C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{28C13A04-5CB0-4AAA-B6F3-16A3A8496C30}" 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 - {E14115CA-15F6-4B76-873A-2BCF556F002C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E14115CA-15F6-4B76-873A-2BCF556F002C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E14115CA-15F6-4B76-873A-2BCF556F002C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E14115CA-15F6-4B76-873A-2BCF556F002C}.Release|Any CPU.Build.0 = Release|Any CPU + {28C13A04-5CB0-4AAA-B6F3-16A3A8496C30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28C13A04-5CB0-4AAA-B6F3-16A3A8496C30}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28C13A04-5CB0-4AAA-B6F3-16A3A8496C30}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28C13A04-5CB0-4AAA-B6F3-16A3A8496C30}.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/api/openapi.yaml b/api/openapi.yaml index 39821486..77f3127d 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -6723,6 +6723,13 @@ components: phoneNumbers: - "+19196104423" - "+19196104424" + rcsAgentRequestExample: + summary: Number Lookup Request with Custom RCS Agent + value: + phoneNumbers: + - "+19196104423" + - "+19196104424" + rcsAgent: MyCustomRcsAgent lookupAcceptedExample: summary: Numbers Lookup Accepted value: @@ -8099,6 +8106,8 @@ components: $ref: '#/components/examples/singleNumberRequestExample' multipleNumberRequestExample: $ref: '#/components/examples/multipleNumberRequestExample' + rcsAgentRequestExample: + $ref: '#/components/examples/rcsAgentRequestExample' schema: $ref: '#/components/schemas/syncLookupRequest' description: Synchronous phone number lookup request. @@ -14315,6 +14324,14 @@ components: maximum: 100 minimum: 1 type: array + rcsAgent: + description: |- + Override the default RCS sender/agent ID used when checking RCS capabilities. + When provided, this value is used as the `sender` in the RCS capability-check request instead of the account default. + Must be 1–40 characters and contain only letters, digits, underscores, or hyphens. + example: MyCustomRcsAgent + pattern: "^[A-Za-z0-9_-]{1,40}$" + type: string required: - phoneNumbers type: object diff --git a/bandwidth.yml b/bandwidth.yml index 5b874eeb..84e00b33 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -5759,6 +5759,19 @@ components: items: type: string pattern: ^\+[1-9]\d{1,14}$ + rcsAgent: + type: string + description: >- + Override the default RCS sender/agent ID used when checking RCS + capabilities. + + When provided, this value is used as the `sender` in the RCS + capability-check request instead of the account default. + + Must be 1–40 characters and contain only letters, digits, + underscores, or hyphens. + pattern: ^[A-Za-z0-9_-]{1,40}$ + example: MyCustomRcsAgent required: - phoneNumbers asyncLookupRequest: @@ -8758,6 +8771,13 @@ components: phoneNumbers: - '+19196104423' - '+19196104424' + rcsAgentRequestExample: + summary: Number Lookup Request with Custom RCS Agent + value: + phoneNumbers: + - '+19196104423' + - '+19196104424' + rcsAgent: MyCustomRcsAgent lookupAcceptedExample: summary: Numbers Lookup Accepted value: @@ -9518,6 +9538,8 @@ components: $ref: '#/components/examples/singleNumberRequestExample' multipleNumberRequestExample: $ref: '#/components/examples/multipleNumberRequestExample' + rcsAgentRequestExample: + $ref: '#/components/examples/rcsAgentRequestExample' createAsyncBulkLookupRequest: description: Asynchronous bulk phone number lookup request. required: true diff --git a/docs/SyncLookupRequest.md b/docs/SyncLookupRequest.md index e6ad7d30..56738b1a 100644 --- a/docs/SyncLookupRequest.md +++ b/docs/SyncLookupRequest.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **PhoneNumbers** | **List<string>** | Telephone numbers in E.164 format. | +**RcsAgent** | **string** | Override the default RCS sender/agent ID used when checking RCS capabilities. When provided, this value is used as the `sender` in the RCS capability-check request instead of the account default. Must be 1–40 characters and contain only letters, digits, underscores, or hyphens. | [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/src/Bandwidth.Standard/Model/RbmActionBase.cs b/src/Bandwidth.Standard/Model/RbmActionBase.cs index 0409197e..5c3e89ad 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@73bcd9b4 + /// [B@6a9ac8b [DataMember(Name = "postbackData", IsRequired = true, EmitDefaultValue = true)] public byte[] PostbackData { get; set; } diff --git a/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs b/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs index 1db34e52..f6f0a771 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@73bcd9b4 + /// [B@6a9ac8b [DataMember(Name = "postbackData", EmitDefaultValue = false)] public byte[] PostbackData { get; set; } diff --git a/src/Bandwidth.Standard/Model/SyncLookupRequest.cs b/src/Bandwidth.Standard/Model/SyncLookupRequest.cs index 486b7841..c2f87954 100644 --- a/src/Bandwidth.Standard/Model/SyncLookupRequest.cs +++ b/src/Bandwidth.Standard/Model/SyncLookupRequest.cs @@ -41,7 +41,8 @@ protected SyncLookupRequest() { } /// Initializes a new instance of the class. /// /// Telephone numbers in E.164 format. (required). - public SyncLookupRequest(List phoneNumbers = default(List)) + /// Override the default RCS sender/agent ID used when checking RCS capabilities. When provided, this value is used as the `sender` in the RCS capability-check request instead of the account default. Must be 1–40 characters and contain only letters, digits, underscores, or hyphens.. + public SyncLookupRequest(List phoneNumbers = default(List), string rcsAgent = default(string)) { // to ensure "phoneNumbers" is required (not null) if (phoneNumbers == null) @@ -49,6 +50,7 @@ protected SyncLookupRequest() { } throw new ArgumentNullException("phoneNumbers is a required property for SyncLookupRequest and cannot be null"); } this.PhoneNumbers = phoneNumbers; + this.RcsAgent = rcsAgent; } /// @@ -58,6 +60,14 @@ protected SyncLookupRequest() { } [DataMember(Name = "phoneNumbers", IsRequired = true, EmitDefaultValue = true)] public List PhoneNumbers { get; set; } + /// + /// Override the default RCS sender/agent ID used when checking RCS capabilities. When provided, this value is used as the `sender` in the RCS capability-check request instead of the account default. Must be 1–40 characters and contain only letters, digits, underscores, or hyphens. + /// + /// Override the default RCS sender/agent ID used when checking RCS capabilities. When provided, this value is used as the `sender` in the RCS capability-check request instead of the account default. Must be 1–40 characters and contain only letters, digits, underscores, or hyphens. + /// MyCustomRcsAgent + [DataMember(Name = "rcsAgent", EmitDefaultValue = false)] + public string RcsAgent { get; set; } + /// /// Returns the string presentation of the object /// @@ -67,6 +77,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class SyncLookupRequest {\n"); sb.Append(" PhoneNumbers: ").Append(PhoneNumbers).Append("\n"); + sb.Append(" RcsAgent: ").Append(RcsAgent).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -87,6 +98,15 @@ public virtual string ToJson() /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { + if (this.RcsAgent != null) { + // RcsAgent (string) pattern + Regex regexRcsAgent = new Regex(@"^[A-Za-z0-9_-]{1,40}$", RegexOptions.CultureInvariant); + if (!regexRcsAgent.Match(this.RcsAgent).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RcsAgent, must match a pattern of " + regexRcsAgent, new [] { "RcsAgent" }); + } + } + yield break; } } From 2c6b3c7131184deae414747e8b752dbc00e20199 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 12 May 2026 14:12:37 -0400 Subject: [PATCH 2/2] unit test --- .../Unit/Model/SyncLookupRequestTests.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Bandwidth.Standard.Test/Unit/Model/SyncLookupRequestTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/SyncLookupRequestTests.cs index f3183875..2be153c3 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/SyncLookupRequestTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/SyncLookupRequestTests.cs @@ -36,7 +36,8 @@ public class SyncLookupRequestTests : IDisposable public SyncLookupRequestTests() { instance = new SyncLookupRequest( - phoneNumbers: new List { "1234567890", "0987654321" } + phoneNumbers: new List { "1234567890", "0987654321" }, + rcsAgent: "TestAgent" ); } @@ -63,5 +64,16 @@ public void PhoneNumbersTest() Assert.IsType>(instance.PhoneNumbers); Assert.Equal(new List { "1234567890", "0987654321" }, instance.PhoneNumbers); } + + + /// + /// Test the property 'RcsAgent' + /// + [Fact] + public void RcsAgentTest() + { + Assert.IsType(instance.RcsAgent); + Assert.Equal("TestAgent", instance.RcsAgent); + } } }