From 3b28474b26796567b87dc28113a67be29b7cad58 Mon Sep 17 00:00:00 2001 From: Thumpala Vinay Kumar Date: Thu, 11 Jan 2024 16:23:32 +0530 Subject: [PATCH 1/2] SDK changes for P2 apis --- src/Plivo/Resource/Media/MediaInterface.cs | 6 +++-- .../Resource/Powerpack/PowerpackInterface.cs | 25 +++++++++++++++---- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/Plivo/Resource/Media/MediaInterface.cs b/src/Plivo/Resource/Media/MediaInterface.cs index ff3ca5e0..c7ac847e 100644 --- a/src/Plivo/Resource/Media/MediaInterface.cs +++ b/src/Plivo/Resource/Media/MediaInterface.cs @@ -127,7 +127,8 @@ public ListResponse List( return ExecuteWithExceptionUnwrap(() => { var resources = Task.Run(async () => await ListResources>(data).ConfigureAwait(false)).Result; - + resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous; + resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next; resources.Objects.ForEach( (obj) => obj.Interface = this ); @@ -153,7 +154,8 @@ public async Task> ListAsync( offset }); var resources = await ListResources>(data); - + resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous; + resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next; resources.Objects.ForEach( (obj) => obj.Interface = this ); diff --git a/src/Plivo/Resource/Powerpack/PowerpackInterface.cs b/src/Plivo/Resource/Powerpack/PowerpackInterface.cs index a6fe9d93..3e253448 100644 --- a/src/Plivo/Resource/Powerpack/PowerpackInterface.cs +++ b/src/Plivo/Resource/Powerpack/PowerpackInterface.cs @@ -183,9 +183,11 @@ public ListResponse List( return ExecuteWithExceptionUnwrap(() => { var resources = Task.Run(async () => await ListResources>("Powerpack",data).ConfigureAwait(false)).Result; - resources.Objects.ForEach( + resources.Objects.ForEach( (obj) => obj.Interface = this ); + resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous; + resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next; return resources; }); @@ -211,7 +213,8 @@ public async Task> ListAsync( resources.Objects.ForEach( (obj) => obj.Interface = this ); - + resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous; + resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next; return resources; } #endregion @@ -306,7 +309,9 @@ public ListResponse List_Numbers(string uuid, string starts_with =null, return ExecuteWithExceptionUnwrap(() => { var resources = Task.Run(async () => await ListResources>("NumberPool/"+uuid+"/Number", data).ConfigureAwait(false)).Result; - resources.Objects.ForEach( + resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous; + resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next; + resources.Objects.ForEach( (obj) => obj.Interface = this ); @@ -342,6 +347,8 @@ public async Task> List_NumbersAsync( service }); var resources = await ListResources>("NumberPool/"+uuid+"/Number", data); + resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous; + resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next; resources.Objects.ForEach( (obj) => obj.Interface = this ); @@ -681,7 +688,9 @@ public ListResponse ListShortcode(string uuid, uint? limit = null, ui return ExecuteWithExceptionUnwrap(() => { var resources = Task.Run(async () => await ListResources>("NumberPool/"+uuid+"/Shortcode", data).ConfigureAwait(false)).Result; - resources.Objects.ForEach( + resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous; + resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next; + resources.Objects.ForEach( (obj) => obj.Interface = this ); @@ -709,6 +718,8 @@ public async Task> List_ShortcodeAsync( offset }); var resources = await ListResources>("NumberPool/"+uuid+"/Shortcode", data); + resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous; + resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next; resources.Objects.ForEach( (obj) => obj.Interface = this ); @@ -808,7 +819,9 @@ public ListResponse ListTollfree(string uuid, uint? limit = null, uint return ExecuteWithExceptionUnwrap(() => { var resources = Task.Run(async () => await ListResources>("NumberPool/"+uuid+"/Tollfree", data).ConfigureAwait(false)).Result; - resources.Objects.ForEach( + resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous; + resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next; + resources.Objects.ForEach( (obj) => obj.Interface = this ); @@ -836,6 +849,8 @@ public async Task> List_TollfreeAsync( offset }); var resources = await ListResources>("NumberPool/"+uuid+"/Tollfree", data); + resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous; + resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next; resources.Objects.ForEach( (obj) => obj.Interface = this ); From 0fed8a285761ca2d1b61795fda33eb9e771aa1d9 Mon Sep 17 00:00:00 2001 From: Thumpala Vinay Kumar Date: Thu, 11 Jan 2024 18:48:07 +0530 Subject: [PATCH 2/2] updating version --- CHANGELOG.md | 4 ++++ README.md | 4 ++-- src/Plivo/Plivo.csproj | 2 +- src/Plivo/Plivo.nuspec | 3 ++- src/Plivo/Version.cs | 2 +- version.json | 2 +- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e56492d9..9263f945 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [5.43.0](https://github.com/plivo/plivo-dotnet/tree/v5.43.0) (2023-01-11) +**Feature - Fixes for api-messaing list API meta data** +- Fixed Meta data response for powerpack, media, and profile list + ## [5.42.1](https://github.com/plivo/plivo-dotnet/tree/v5.42.1) (2023-12-19) **Feature - added param in speak api** - Added new field `type` for POST Speak APIs diff --git a/README.md b/README.md index c10efc49..59f0c5ba 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.42.1 +PM> Install-Package Plivo -Version 5.43.0 ``` You can also use the .NET CLI to install this package as follows ``` -> dotnet add package Plivo --version 5.42.1 +> dotnet add package Plivo --version 5.43.0 ``` ## Getting started diff --git a/src/Plivo/Plivo.csproj b/src/Plivo/Plivo.csproj index b0c6fc73..4efce50b 100644 --- a/src/Plivo/Plivo.csproj +++ b/src/Plivo/Plivo.csproj @@ -1,7 +1,7 @@ netstandard2.0;netstandard1.3 - 5.42.1 + 5.43.0 Plivo SDKs Team Plivo Inc. diff --git a/src/Plivo/Plivo.nuspec b/src/Plivo/Plivo.nuspec index c173fcf3..4d5659a4 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.42.1 + 5.43.0 Plivo Plivo SDKs Team Plivo, Inc. @@ -12,6 +12,7 @@ http://github.com/plivo/plivo-dotnet false + * 5.43.0 Fixes for api-messaging list API meta data. * 5.42.0 Added Params `vertical`, `campaign_alias` for GET and LIST Campaigns. * 5.41.1 Support Params `from_number` and `to_number` for LIST Message. * 5.41.0 Added New Params `error_code`, `error_reason` for GET and LIST Campaign. diff --git a/src/Plivo/Version.cs b/src/Plivo/Version.cs index b510ef13..4e807175 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.42.1"; + public const string SdkVersion = "5.43.0"; /// /// Plivo API version /// diff --git a/version.json b/version.json index 722d8639..c56d49bf 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "version": "5.42.1", + "version": "5.43.0", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$"