From 250c278d0aa4a873aeae9ad3790d3072ab4d549d Mon Sep 17 00:00:00 2001 From: Rajneesh Katkam Date: Tue, 3 Oct 2023 23:53:37 +0530 Subject: [PATCH 1/5] Added meta data for List Profile --- .../Resource/Profile/ProfileListResponse.cs | 9 +++- src/Plivo/Resource/Profile/ProfileMeta.cs | 51 +++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 src/Plivo/Resource/Profile/ProfileMeta.cs diff --git a/src/Plivo/Resource/Profile/ProfileListResponse.cs b/src/Plivo/Resource/Profile/ProfileListResponse.cs index d78de094..260e8c1b 100644 --- a/src/Plivo/Resource/Profile/ProfileListResponse.cs +++ b/src/Plivo/Resource/Profile/ProfileListResponse.cs @@ -11,6 +11,11 @@ namespace Plivo.Resource [JsonObject] public class ProfileListResponse : BaseResponse, IEnumerable { + /// + /// Gets or sets the meta. + /// + /// The meta. + public ProfileMeta Meta { get; set; } /// /// Gets or sets the objects. /// @@ -29,8 +34,9 @@ public ProfileListResponse() /// /// Meta. /// profiles. - public ProfileListResponse( List profiles) + public ProfileListResponse(ProfileMeta meta, List profiles) { + Meta = meta ?? throw new ArgumentNullException(nameof(meta)); Profiles = profiles ?? throw new ArgumentNullException(nameof(profiles)); } @@ -59,6 +65,7 @@ public IEnumerator GetEnumerator() public override string ToString() { return "Api Id: " + ApiId + "\n" + + "[Meta]\n" + Meta + "StatusCode: " + StatusCode + "[profiles]\n" + string.Join("\n", Profiles); diff --git a/src/Plivo/Resource/Profile/ProfileMeta.cs b/src/Plivo/Resource/Profile/ProfileMeta.cs new file mode 100644 index 00000000..e9cef648 --- /dev/null +++ b/src/Plivo/Resource/Profile/ProfileMeta.cs @@ -0,0 +1,51 @@ +using System.Threading; +using Newtonsoft.Json; + +namespace Plivo.Resource +{ + /// + /// Profile Meta. + /// + public class ProfileMeta + { + /// + /// Gets or sets the limit. + /// + /// The limit. + public uint Limit { get; set; } + + /// + /// Gets or sets the next. + /// + /// The next. + [JsonProperty("next")] + public string Next { get; set; } + + /// + /// Gets or sets the offset. + /// + /// The offset. + [JsonProperty("offset")] + public uint Offset { get; set; } + + /// + /// Gets or sets the previous. + /// + /// The previous. + [JsonProperty("previous")] + public string Previous { get; set; } + + /// + /// Returns a that represents the current . + /// + /// A that represents the current . + public override string ToString() + { + return + "Limit: " + Limit + "\n" + + "Next: " + Next + "\n" + + "Offset: " + Offset + "\n" + + "Previous: " + Previous + "\n"; + } + } +} \ No newline at end of file From e54d55a6094e84c375b4b01bdc490243b76dbdc0 Mon Sep 17 00:00:00 2001 From: Rajneesh Katkam Date: Wed, 4 Oct 2023 00:04:55 +0530 Subject: [PATCH 2/5] Added meta data for Brand Profile --- src/Plivo/Resource/Brand/BrandListResponse.cs | 9 +++- src/Plivo/Resource/Brand/BrandMeta.cs | 51 +++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 src/Plivo/Resource/Brand/BrandMeta.cs diff --git a/src/Plivo/Resource/Brand/BrandListResponse.cs b/src/Plivo/Resource/Brand/BrandListResponse.cs index 3defcea7..98db194d 100644 --- a/src/Plivo/Resource/Brand/BrandListResponse.cs +++ b/src/Plivo/Resource/Brand/BrandListResponse.cs @@ -11,6 +11,11 @@ namespace Plivo.Resource [JsonObject] public class BrandListResponse : BaseResponse, IEnumerable { + /// + /// Gets or sets the meta. + /// + /// The meta. + public BrandMeta Meta { get; set; } /// /// Gets or sets the objects. /// @@ -29,8 +34,9 @@ public BrandListResponse() /// /// Meta. /// brands. - public BrandListResponse( List brands) + public BrandListResponse(BrandMeta meta, List brands) { + Meta = meta ?? throw new ArgumentNullException(nameof(meta)); Brands = brands ?? throw new ArgumentNullException(nameof(brands)); } @@ -59,6 +65,7 @@ public IEnumerator GetEnumerator() public override string ToString() { return "Api Id: " + ApiId + "\n" + + "[Meta]\n" + Meta + "StatusCode: " + StatusCode + "[Brands]\n" + string.Join("\n", Brands); diff --git a/src/Plivo/Resource/Brand/BrandMeta.cs b/src/Plivo/Resource/Brand/BrandMeta.cs new file mode 100644 index 00000000..38a6dd6c --- /dev/null +++ b/src/Plivo/Resource/Brand/BrandMeta.cs @@ -0,0 +1,51 @@ +using System.Threading; +using Newtonsoft.Json; + +namespace Plivo.Resource +{ + /// + /// Brand Meta. + /// + public class BrandMeta + { + /// + /// Gets or sets the limit. + /// + /// The limit. + public uint Limit { get; set; } + + /// + /// Gets or sets the next. + /// + /// The next. + [JsonProperty("next")] + public string Next { get; set; } + + /// + /// Gets or sets the offset. + /// + /// The offset. + [JsonProperty("offset")] + public uint Offset { get; set; } + + /// + /// Gets or sets the previous. + /// + /// The previous. + [JsonProperty("previous")] + public string Previous { get; set; } + + /// + /// Returns a that represents the current . + /// + /// A that represents the current . + public override string ToString() + { + return + "Limit: " + Limit + "\n" + + "Next: " + Next + "\n" + + "Offset: " + Offset + "\n" + + "Previous: " + Previous + "\n"; + } + } +} \ No newline at end of file From 4503f1ad56ddb690102f7e70af9d9238a881ce67 Mon Sep 17 00:00:00 2001 From: Rajneesh Katkam Date: Wed, 4 Oct 2023 00:08:41 +0530 Subject: [PATCH 3/5] Added meta data for Campaign --- .../Resource/Campaign/CampaignListResponse.cs | 10 +++- src/Plivo/Resource/Campaign/CampaignMeta.cs | 51 +++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 src/Plivo/Resource/Campaign/CampaignMeta.cs diff --git a/src/Plivo/Resource/Campaign/CampaignListResponse.cs b/src/Plivo/Resource/Campaign/CampaignListResponse.cs index b8931b25..0862b5cc 100644 --- a/src/Plivo/Resource/Campaign/CampaignListResponse.cs +++ b/src/Plivo/Resource/Campaign/CampaignListResponse.cs @@ -11,6 +11,12 @@ namespace Plivo.Resource [JsonObject] public class CampaignListResponse : BaseResponse, IEnumerable { + + /// + /// Gets or sets the meta. + /// + /// The meta. + public CampaignMeta Meta { get; set; } /// /// Gets or sets the objects. /// @@ -29,8 +35,9 @@ public CampaignListResponse() /// /// Meta. /// Campaigns. - public CampaignListResponse( List campaigns) + public CampaignListResponse(CampaignMeta meta, List campaigns) { + Meta = meta ?? throw new ArgumentNullException(nameof(meta)); Campaigns = campaigns ?? throw new ArgumentNullException(nameof(campaigns)); } @@ -59,6 +66,7 @@ public IEnumerator GetEnumerator() public override string ToString() { return "Api Id: " + ApiId + "\n" + + "[Meta]\n" + Meta + "StatusCode: " + StatusCode + "[Campaigns]\n" + string.Join("\n", Campaigns); diff --git a/src/Plivo/Resource/Campaign/CampaignMeta.cs b/src/Plivo/Resource/Campaign/CampaignMeta.cs new file mode 100644 index 00000000..917785f2 --- /dev/null +++ b/src/Plivo/Resource/Campaign/CampaignMeta.cs @@ -0,0 +1,51 @@ +using System.Threading; +using Newtonsoft.Json; + +namespace Plivo.Resource +{ + /// + /// Campaign Meta. + /// + public class CampaignMeta + { + /// + /// Gets or sets the limit. + /// + /// The limit. + public uint Limit { get; set; } + + /// + /// Gets or sets the next. + /// + /// The next. + [JsonProperty("next")] + public string Next { get; set; } + + /// + /// Gets or sets the offset. + /// + /// The offset. + [JsonProperty("offset")] + public uint Offset { get; set; } + + /// + /// Gets or sets the previous. + /// + /// The previous. + [JsonProperty("previous")] + public string Previous { get; set; } + + /// + /// Returns a that represents the current . + /// + /// A that represents the current . + public override string ToString() + { + return + "Limit: " + Limit + "\n" + + "Next: " + Next + "\n" + + "Offset: " + Offset + "\n" + + "Previous: " + Previous + "\n"; + } + } +} \ No newline at end of file From 67535fa3dfe6bae7117437fe2c534643d24125fd Mon Sep 17 00:00:00 2001 From: Rajneesh Katkam Date: Thu, 5 Oct 2023 16:10:54 +0530 Subject: [PATCH 4/5] Added total_count field to meta data for campaign and brand list response --- src/Plivo/Resource/Brand/BrandMeta.cs | 10 +++++++++- src/Plivo/Resource/Campaign/CampaignMeta.cs | 11 ++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/Plivo/Resource/Brand/BrandMeta.cs b/src/Plivo/Resource/Brand/BrandMeta.cs index 38a6dd6c..67a49657 100644 --- a/src/Plivo/Resource/Brand/BrandMeta.cs +++ b/src/Plivo/Resource/Brand/BrandMeta.cs @@ -35,6 +35,13 @@ public class BrandMeta [JsonProperty("previous")] public string Previous { get; set; } + /// + /// Gets or sets the total_count. + /// + /// The total_count. + [JsonProperty("total_count")] + public uint TotalCount { get; set; } + /// /// Returns a that represents the current . /// @@ -45,7 +52,8 @@ public override string ToString() "Limit: " + Limit + "\n" + "Next: " + Next + "\n" + "Offset: " + Offset + "\n" + - "Previous: " + Previous + "\n"; + "Previous: " + Previous + "\n" + + "TotalCount: " + TotalCount + "\n"; } } } \ No newline at end of file diff --git a/src/Plivo/Resource/Campaign/CampaignMeta.cs b/src/Plivo/Resource/Campaign/CampaignMeta.cs index 917785f2..dbf0f326 100644 --- a/src/Plivo/Resource/Campaign/CampaignMeta.cs +++ b/src/Plivo/Resource/Campaign/CampaignMeta.cs @@ -35,6 +35,14 @@ public class CampaignMeta [JsonProperty("previous")] public string Previous { get; set; } + + /// + /// Gets or sets the total_count. + /// + /// The total_count. + [JsonProperty("total_count")] + public uint TotalCount { get; set; } + /// /// Returns a that represents the current . /// @@ -45,7 +53,8 @@ public override string ToString() "Limit: " + Limit + "\n" + "Next: " + Next + "\n" + "Offset: " + Offset + "\n" + - "Previous: " + Previous + "\n"; + "Previous: " + Previous + "\n" + + "TotalCount: " + TotalCount + "\n"; } } } \ No newline at end of file From ef9b29dcdad88b23087c6574c3b9b59744412726 Mon Sep 17 00:00:00 2001 From: Rajneesh Katkam Date: Tue, 17 Oct 2023 17:15:42 +0530 Subject: [PATCH 5/5] 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 fdfcdfba..a7a390fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [5.34.0](https://github.com/plivo/plivo-dotnet/tree/v5.34.0) (2023-10-17) +**Feature - Fixes for Campaign services list API meta data** +- Fixed Meta data response for campaign, brand and profile list + ## [5.33.0](https://github.com/plivo/plivo-dotnet/tree/v5.33.0) (2023-08-25) **Feature - Added New Param 'carrier_fees', 'carrier_fees_rate', 'destination_network' in Get Message and List Message APIs** - Added new params on message get and list response diff --git a/README.md b/README.md index cc82b07b..a4dd8946 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.33.0 +PM> Install-Package Plivo -Version 5.34.0 ``` You can also use the .NET CLI to install this package as follows ``` -> dotnet add package Plivo --version 5.33.0 +> dotnet add package Plivo --version 5.34.0 ``` ## Getting started diff --git a/src/Plivo/Plivo.csproj b/src/Plivo/Plivo.csproj index 2aad58d0..d6ab36f5 100644 --- a/src/Plivo/Plivo.csproj +++ b/src/Plivo/Plivo.csproj @@ -1,7 +1,7 @@ netstandard2.0;netstandard1.3 - 5.33.0 + 5.34.0 Plivo SDKs Team Plivo Inc. diff --git a/src/Plivo/Plivo.nuspec b/src/Plivo/Plivo.nuspec index 528ccdbd..2c3c3d5c 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.33.0 + 5.34.0 Plivo Plivo SDKs Team Plivo, Inc. @@ -12,6 +12,7 @@ http://github.com/plivo/plivo-dotnet false + * 5.34.0 Fixes for Campaign services list API meta data. * 5.33.0 Added New Params `DestinationNetwork`, `CarrierFeesRate`, `CarrierFees`. * 5.32.0 Added New Params `DLTEntityID`, `DLTTemplateID`, `DLTTemplateCategory`. * 5.31.0 Added functionality to start, stop and fetch audio streams diff --git a/src/Plivo/Version.cs b/src/Plivo/Version.cs index 0d6e9fd7..81568ab7 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.33.0"; + public const string SdkVersion = "5.34.0"; /// /// Plivo API version /// diff --git a/version.json b/version.json index b89cd737..43be65cc 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "version": "5.33.0", + "version": "5.34.0", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$"