From 8a4e66d75ec9f486f7d550fdba282b3bf1eae648 Mon Sep 17 00:00:00 2001 From: Ashutosh Kumar Plivo <126571031+ashutoshkumar-plivo@users.noreply.github.com> Date: Fri, 6 Sep 2024 15:46:08 +0530 Subject: [PATCH] SMS-6997: add brand_name and app_hash in create and list api (#285) * SMS-6997: add brand_name and app_hash in create and list api * adding code length param for verify --------- Co-authored-by: narayana-plivo --- CHANGELOG.md | 5 +++ README.md | 4 +-- src/Plivo/Plivo.csproj | 2 +- src/Plivo/Plivo.nuspec | 2 +- .../Resource/VerifySession/VerifySession.cs | 6 ++++ .../VerifySession/VerifySessionInterface.cs | 32 ++++++++++++++++--- src/Plivo/Version.cs | 2 +- version.json | 2 +- 8 files changed, 45 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b87b8b1b..822280d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## [5.48.0](https://github.com/plivo/plivo-dotnet/tree/v5.48.0) (2024-08-12) +**Feature - Adding support for brand_name and app_hash in Create,Get and List Session** +- Added new request param `brand_name` and `app_hash` in create Session API +- Added support for `brand_name` and `app_hash` param in get and list Session response + ## [5.47.4](https://github.com/plivo/plivo-dotnet/tree/v5.47.4) (2024-09-03) **Feature - Adding new element for Audio Stream XML ** - Added `keepCallAlive` element in Audio Stream XML diff --git a/README.md b/README.md index 525e715a..59a4787e 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,13 @@ You can install this SDK either by referencing the .dll file or using NuGet. Use the following line to install the latest SDK using the NuGet CLI. ``` -PM> Install-Package Plivo -Version 5.47.4 +PM> Install-Package Plivo -Version 5.48.0 ``` You can also use the .NET CLI to install this package as follows ``` -> dotnet add package Plivo --version 5.47.4 +> dotnet add package Plivo --version 5.48.0 ``` ## Getting started diff --git a/src/Plivo/Plivo.csproj b/src/Plivo/Plivo.csproj index 50653e3e..d7d82a7f 100644 --- a/src/Plivo/Plivo.csproj +++ b/src/Plivo/Plivo.csproj @@ -1,7 +1,7 @@ netstandard2.0;netstandard1.3 - 5.47.4 + 5.48.0 Plivo SDKs Team Plivo Inc. diff --git a/src/Plivo/Plivo.nuspec b/src/Plivo/Plivo.nuspec index fd92f875..092b7190 100644 --- a/src/Plivo/Plivo.nuspec +++ b/src/Plivo/Plivo.nuspec @@ -4,7 +4,7 @@ A .NET SDK to make voice calls and send SMS using Plivo and to generate Plivo XML A .NET SDK to make voice calls and send SMS using Plivo and to generate Plivo XML Plivo - 5.47.4 + 5.48.0 Plivo Plivo SDKs Team Plivo, Inc. diff --git a/src/Plivo/Resource/VerifySession/VerifySession.cs b/src/Plivo/Resource/VerifySession/VerifySession.cs index 508199be..522ad739 100755 --- a/src/Plivo/Resource/VerifySession/VerifySession.cs +++ b/src/Plivo/Resource/VerifySession/VerifySession.cs @@ -31,6 +31,12 @@ public class AttemptDetail { public string Status { get; set; } [JsonProperty("time")] public string Time { get; set; } + [JsonProperty("brand_name")] + public string BrandName {get; set;} + [JsonProperty("app_hash")] + public string AppHash {get; set;} + [JsonProperty("code_length")] + public int CodeLength {get; set;} } [JsonObject(MemberSerialization.OptIn)] diff --git a/src/Plivo/Resource/VerifySession/VerifySessionInterface.cs b/src/Plivo/Resource/VerifySession/VerifySessionInterface.cs index 9ba7b9ac..408e01ce 100755 --- a/src/Plivo/Resource/VerifySession/VerifySessionInterface.cs +++ b/src/Plivo/Resource/VerifySession/VerifySessionInterface.cs @@ -33,10 +33,13 @@ public VerifySessionInterface(HttpClient client) : base(client) /// URL. /// Method. /// Locale. + /// BrandName. + /// AppHash. + /// CodeLength. public VerifySessionCreateResponse Create( string recipient, string app_uuid = null, string channel = null, string url = null, - string method = null, string locale = null) + string method = null, string locale = null, string brand_name = null, string app_hash = null, int code_length = 0) { Dictionary data = null; var mandatoryParams = new List { "recipient" }; @@ -49,7 +52,10 @@ public VerifySessionCreateResponse Create( channel, url, method, - locale + locale, + brand_name, + app_hash, + code_length }); return ExecuteWithExceptionUnwrap(() => @@ -70,10 +76,13 @@ public VerifySessionCreateResponse Create( /// URL. /// Method. /// Locale. + /// BrandName. + /// AppHash. + /// CodeLength. public async Task CreateAsync( string recipient, string app_uuid = null, string channel = null, string url = null, - string method = null, string locale = null) + string method = null, string locale = null, string brand_name = null, string app_hash = null, int code_length = 0) { Dictionary data = null; var mandatoryParams = new List { "recipient" }; @@ -86,7 +95,10 @@ public async Task CreateAsync( channel, url, method, - locale + locale, + brand_name, + app_hash, + code_length }); var result = await Client.Update(Uri, data); @@ -145,6 +157,8 @@ public async Task GetAsync(string messageUuid) /// SessionTimeLT. /// SessionTimeLTE. /// SessionTime. + /// BrandName. + /// AppHash. public VerifySessionListResponse List( uint? limit = null, uint? offset = null, @@ -154,6 +168,8 @@ public VerifySessionListResponse List( string country = null, string alias = null, string subaccount = null, + string brand_name = null, + string app_hash = null, DateTime? session_time__gt = null, DateTime? session_time__gte = null, DateTime? session_time__lt = null, @@ -178,6 +194,8 @@ public VerifySessionListResponse List( country, alias, subaccount, + brand_name, + app_hash, _session_time__gt, _session_time__gte, _session_time__lt, @@ -211,6 +229,8 @@ public VerifySessionListResponse List( /// SessionTimeLT. /// SessionTimeLTE. /// SessionTime. + /// BrandName. + /// AppHash. public async Task> ListAsync( uint? limit = null, uint? offset = null, @@ -220,6 +240,8 @@ public async Task> ListAsync( string country = null, string alias = null, string subaccount = null, + string brand_name = null, + string app_hash = null, DateTime? session_time__gt = null, DateTime? session_time__gte = null, DateTime? session_time__lt = null, @@ -244,6 +266,8 @@ public async Task> ListAsync( country, alias, subaccount, + brand_name, + app_hash, _session_time__gt, _session_time__gte, _session_time__lt, diff --git a/src/Plivo/Version.cs b/src/Plivo/Version.cs index c8e902a4..8d183dc4 100644 --- a/src/Plivo/Version.cs +++ b/src/Plivo/Version.cs @@ -10,7 +10,7 @@ public class Version /// /// DotNet SDK version /// - public const string SdkVersion = "5.47.4"; + public const string SdkVersion = "5.48.0"; /// /// Plivo API version /// diff --git a/version.json b/version.json index 6f65ba3d..477f36f2 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "version": "5.47.4", + "version": "5.48.0", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$"