diff --git a/CHANGELOG.md b/CHANGELOG.md index 809b1ff6..3bbcfbe2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [5.36.0](https://github.com/plivo/plivo-dotnet/tree/v5.36.0) (2023-10-20) +**Feature - campaign_source field** +- Added new param `campaign_source` in LIST / GET Campaign APIs + ## [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 diff --git a/README.md b/README.md index eec0059a..98764d87 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.35.0 +PM> Install-Package Plivo -Version 5.36.0 ``` You can also use the .NET CLI to install this package as follows ``` -> dotnet add package Plivo --version 5.35.0 +> dotnet add package Plivo --version 5.36.0 ``` ## Getting started diff --git a/src/Plivo/Plivo.csproj b/src/Plivo/Plivo.csproj index f64d0d8a..000489bb 100644 --- a/src/Plivo/Plivo.csproj +++ b/src/Plivo/Plivo.csproj @@ -1,7 +1,7 @@ netstandard2.0;netstandard1.3 - 5.35.0 + 5.36.0 Plivo SDKs Team Plivo Inc. diff --git a/src/Plivo/Plivo.nuspec b/src/Plivo/Plivo.nuspec index 126d586d..e2181317 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.35.0 + 5.36.0 Plivo Plivo SDKs Team Plivo, Inc. @@ -12,6 +12,7 @@ http://github.com/plivo/plivo-dotnet false + * 5.36.0 Added New Params `campaign_source`. * 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`. diff --git a/src/Plivo/Resource/Campaign/Campaign.cs b/src/Plivo/Resource/Campaign/Campaign.cs index 3aabf21c..259f5e33 100644 --- a/src/Plivo/Resource/Campaign/Campaign.cs +++ b/src/Plivo/Resource/Campaign/Campaign.cs @@ -100,6 +100,10 @@ public class CampaignResponse [JsonProperty("created_at")] public string CreatedAt { get; set; } + + [JsonProperty("campaign_source")] + public string CampaignSource { get; set; } + } [JsonObject(MemberSerialization.OptIn)] @@ -207,6 +211,9 @@ public class ListCampaigns: Resource [JsonProperty("created_at")] public string CreatedAt { get; set; } + [JsonProperty("campaign_source")] + public string CampaignSource { get; set; } + public override string ToString() { return JsonConvert.SerializeObject(this, Formatting.Indented); diff --git a/src/Plivo/Resource/Campaign/CampaignInterface.cs b/src/Plivo/Resource/Campaign/CampaignInterface.cs index 8f81cb3c..e88c2ca3 100644 --- a/src/Plivo/Resource/Campaign/CampaignInterface.cs +++ b/src/Plivo/Resource/Campaign/CampaignInterface.cs @@ -51,9 +51,10 @@ public async Task GetAsync(string campaignID) /// List campaign list type and status. /// /// The list. - /// brand. + /// brand_id. /// usecase. - public CampaignListResponse List(uint? limit = null, uint? offset = null) + /// campaign_source + public CampaignListResponse List(uint? limit = null, uint? offset = null, string brand_id =null, string usecase=null, string campaign_source="plivo") { var mandatoryParams = new List {""}; var data = CreateData( @@ -61,7 +62,10 @@ public CampaignListResponse List(uint? limit = null, uint? offset new { limit, - offset + offset, + campaign_source, + brand_id, + usecase }); return ExecuteWithExceptionUnwrap(() => @@ -78,9 +82,10 @@ public CampaignListResponse List(uint? limit = null, uint? offset /// List Brand list type and status. /// /// The list. - /// brand. - /// status. - public async Task> ListAsync(uint? limit = null, uint? offset = null) + /// brand_id. + /// usercase. + /// campaign_source + public async Task> ListAsync(uint? limit = null, uint? offset = null, string brand_id =null, string usecase=null, string campaign_source="plivo") { var mandatoryParams = new List {""}; var data = CreateData( @@ -88,7 +93,10 @@ public async Task> ListAsync(uint? limit = n new { limit, - offset + offset, + campaign_source, + brand_id, + usecase }); var resources = await ListResources>("10dlc/Campaign", data); diff --git a/src/Plivo/Version.cs b/src/Plivo/Version.cs index 607893da..fac6e4b1 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.35.0"; + public const string SdkVersion = "5.36.0"; /// /// Plivo API version /// diff --git a/tests_netcore/Plivo.NetCore.Test/Mocks/campaignGetResponse.json b/tests_netcore/Plivo.NetCore.Test/Mocks/campaignGetResponse.json index e7f43ace..d075e1f8 100644 --- a/tests_netcore/Plivo.NetCore.Test/Mocks/campaignGetResponse.json +++ b/tests_netcore/Plivo.NetCore.Test/Mocks/campaignGetResponse.json @@ -33,6 +33,7 @@ "subscriber_optout": false, "subscriber_help": false, "affiliate_marketing": false - } + }, + "campaign_source": "plivo" } } \ No newline at end of file diff --git a/tests_netcore/Plivo.NetCore.Test/Mocks/campaignListResponse.json b/tests_netcore/Plivo.NetCore.Test/Mocks/campaignListResponse.json index c5b8aba7..f8cfaade 100644 --- a/tests_netcore/Plivo.NetCore.Test/Mocks/campaignListResponse.json +++ b/tests_netcore/Plivo.NetCore.Test/Mocks/campaignListResponse.json @@ -30,7 +30,8 @@ "Verizon Wireless": {} }, "reseller_id": "", - "usecase": "MIXED" + "usecase": "MIXED", + "campaign_source": "plivo" }, { "brand_id": "BHYYNCK", @@ -46,13 +47,15 @@ "Verizon Wireless": {} }, "reseller_id": "RPDPPUM", - "usecase": "ACCOUNT_NOTIFICATION" + "usecase": "ACCOUNT_NOTIFICATION", + "campaign_source": "plivo" }, { "brand_id": "B8OD95Z", "campaign_id": "CWOOIAT", "reseller_id": "", - "usecase": "2FA" + "usecase": "2FA", + "campaign_source": "plivo" }, { "brand_id": "BHYYNCK", @@ -70,7 +73,8 @@ } }, "reseller_id": "", - "usecase": "MIXED" + "usecase": "MIXED", + "campaign_source": "plivo" }, { "brand_id": "BRPXS6E", @@ -86,7 +90,8 @@ "Verizon Wireless": {} }, "reseller_id": "", - "usecase": "ACCOUNT_NOTIFICATION" + "usecase": "ACCOUNT_NOTIFICATION", + "campaign_source": "plivo" } ] } \ No newline at end of file diff --git a/version.json b/version.json index 434a96c4..248ed26f 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "version": "5.35.0", + "version": "5.36.0", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$"