diff --git a/CHANGELOG.md b/CHANGELOG.md index d76a5010..809b1ff6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [5.35.0](https://github.com/plivo/plivo-dotnet/tree/v5.35.0) (2023-10-17) +**Feature - Fixes for Campaign services list API meta data** +- Fixed Meta data response for campaign, brand and profile list + ## [5.34.0](https://github.com/plivo/plivo-dotnet/tree/v5.34.0) (2023-10-13) **Feature - WhatsApp message support** - Added new params `template`, `template_json_string` and new message_type `whatsapp` to [send message API](https://www.plivo.com/docs/sms/api/message#send-a-message) diff --git a/README.md b/README.md index a4dd8946..eec0059a 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.34.0 +PM> Install-Package Plivo -Version 5.35.0 ``` You can also use the .NET CLI to install this package as follows ``` -> dotnet add package Plivo --version 5.34.0 +> dotnet add package Plivo --version 5.35.0 ``` ## Getting started diff --git a/src/Plivo/Plivo.csproj b/src/Plivo/Plivo.csproj index d6ab36f5..f64d0d8a 100644 --- a/src/Plivo/Plivo.csproj +++ b/src/Plivo/Plivo.csproj @@ -1,7 +1,7 @@ netstandard2.0;netstandard1.3 - 5.34.0 + 5.35.0 Plivo SDKs Team Plivo Inc. diff --git a/src/Plivo/Plivo.nuspec b/src/Plivo/Plivo.nuspec index 53f05444..126d586d 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.34.0 + 5.35.0 Plivo Plivo SDKs Team Plivo, Inc. @@ -12,6 +12,7 @@ http://github.com/plivo/plivo-dotnet false + * 5.35.0 Fixes for Campaign services list API meta data. * 5.34.0 Added new params `template`, `template_json_string` and message_type `whatsapp`in send message API. Added new `message_state` (`read`), `message_type` (`whatsapp`), `conversation_id`, `conversation_origin`, `conversation_expiration_timestamp` in List Message and Get Message APIs. * 5.33.0 Added New Params `DestinationNetwork`, `CarrierFeesRate`, `CarrierFees`. * 5.32.0 Added New Params `DLTEntityID`, `DLTTemplateID`, `DLTTemplateCategory`. 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..67a49657 --- /dev/null +++ b/src/Plivo/Resource/Brand/BrandMeta.cs @@ -0,0 +1,59 @@ +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; } + + /// + /// Gets or sets the total_count. + /// + /// The total_count. + [JsonProperty("total_count")] + public uint TotalCount { 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" + + "TotalCount: " + TotalCount + "\n"; + } + } +} \ No newline at end of file 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..dbf0f326 --- /dev/null +++ b/src/Plivo/Resource/Campaign/CampaignMeta.cs @@ -0,0 +1,60 @@ +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; } + + + /// + /// Gets or sets the total_count. + /// + /// The total_count. + [JsonProperty("total_count")] + public uint TotalCount { 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" + + "TotalCount: " + TotalCount + "\n"; + } + } +} \ No newline at end of file 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 diff --git a/src/Plivo/Version.cs b/src/Plivo/Version.cs index 81568ab7..607893da 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.34.0"; + public const string SdkVersion = "5.35.0"; /// /// Plivo API version /// diff --git a/version.json b/version.json index 43be65cc..434a96c4 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "version": "5.34.0", + "version": "5.35.0", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$"