From 5109806b2de8df0da3f5f419af831f7a1042b158 Mon Sep 17 00:00:00 2001 From: narayana Date: Mon, 11 Sep 2023 14:07:10 +0530 Subject: [PATCH 1/7] campaign filter based on campaign source --- src/Plivo/Resource/Campaign/Campaign.cs | 7 +++++++ src/Plivo/Resource/Campaign/CampaignInterface.cs | 12 ++++++++---- .../Mocks/campaignGetResponse.json | 3 ++- .../Mocks/campaignListResponse.json | 15 ++++++++++----- 4 files changed, 27 insertions(+), 10 deletions(-) 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..7dc0a359 100644 --- a/src/Plivo/Resource/Campaign/CampaignInterface.cs +++ b/src/Plivo/Resource/Campaign/CampaignInterface.cs @@ -53,7 +53,8 @@ public async Task GetAsync(string campaignID) /// The list. /// brand. /// usecase. - public CampaignListResponse List(uint? limit = null, uint? offset = null) + /// campaign_source + public CampaignListResponse List(uint? limit = null, uint? offset = null, string campaign_source="plivo") { var mandatoryParams = new List {""}; var data = CreateData( @@ -61,7 +62,8 @@ public CampaignListResponse List(uint? limit = null, uint? offset new { limit, - offset + offset, + campaign_source }); return ExecuteWithExceptionUnwrap(() => @@ -80,7 +82,8 @@ public CampaignListResponse List(uint? limit = null, uint? offset /// The list. /// brand. /// status. - public async Task> ListAsync(uint? limit = null, uint? offset = null) + /// campaign_source + public async Task> ListAsync(uint? limit = null, uint? offset = null, string campaign_source="plivo") { var mandatoryParams = new List {""}; var data = CreateData( @@ -88,7 +91,8 @@ public async Task> ListAsync(uint? limit = n new { limit, - offset + offset, + campaign_source }); var resources = await ListResources>("10dlc/Campaign", data); 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 From 4570c98cd87cae674e19f2183ff346be3f129e5e Mon Sep 17 00:00:00 2001 From: narayana Date: Sun, 8 Oct 2023 17:02:13 +0530 Subject: [PATCH 2/7] brand id filter --- .../Resource/Campaign/CampaignInterface.cs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/Plivo/Resource/Campaign/CampaignInterface.cs b/src/Plivo/Resource/Campaign/CampaignInterface.cs index 7dc0a359..e88c2ca3 100644 --- a/src/Plivo/Resource/Campaign/CampaignInterface.cs +++ b/src/Plivo/Resource/Campaign/CampaignInterface.cs @@ -51,10 +51,10 @@ public async Task GetAsync(string campaignID) /// List campaign list type and status. /// /// The list. - /// brand. + /// brand_id. /// usecase. /// campaign_source - public CampaignListResponse List(uint? limit = null, uint? offset = null, string campaign_source="plivo") + 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( @@ -63,7 +63,9 @@ public CampaignListResponse List(uint? limit = null, uint? offset { limit, offset, - campaign_source + campaign_source, + brand_id, + usecase }); return ExecuteWithExceptionUnwrap(() => @@ -80,10 +82,10 @@ public CampaignListResponse List(uint? limit = null, uint? offset /// List Brand list type and status. /// /// The list. - /// brand. - /// status. + /// brand_id. + /// usercase. /// campaign_source - public async Task> ListAsync(uint? limit = null, uint? offset = null, string campaign_source="plivo") + 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( @@ -92,7 +94,9 @@ public async Task> ListAsync(uint? limit = n { limit, offset, - campaign_source + campaign_source, + brand_id, + usecase }); var resources = await ListResources>("10dlc/Campaign", data); From d6bc99eeae0a7c3ecc2d465897a4e3ef322bc855 Mon Sep 17 00:00:00 2001 From: renoldthomas-plivo Date: Mon, 16 Oct 2023 19:32:11 +0530 Subject: [PATCH 3/7] version update --- src/Plivo/Plivo.nuspec | 4 ++++ src/Plivo/Version.cs | 4 ++++ version.json | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/src/Plivo/Plivo.nuspec b/src/Plivo/Plivo.nuspec index 53f05444..4e8fc845 100644 --- a/src/Plivo/Plivo.nuspec +++ b/src/Plivo/Plivo.nuspec @@ -12,7 +12,11 @@ http://github.com/plivo/plivo-dotnet false +<<<<<<< Updated upstream * 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.35.0 Added New Params `DestinationNetwork`, `CarrierFeesRate`, `CarrierFees`. +>>>>>>> Stashed changes * 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 81568ab7..fb155493 100644 --- a/src/Plivo/Version.cs +++ b/src/Plivo/Version.cs @@ -10,7 +10,11 @@ public class Version /// /// DotNet SDK version /// +<<<<<<< Updated upstream public const string SdkVersion = "5.34.0"; +======= + public const string SdkVersion = "5.35.0"; +>>>>>>> Stashed changes /// /// Plivo API version /// diff --git a/version.json b/version.json index 43be65cc..78f8d66f 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,9 @@ { +<<<<<<< Updated upstream "version": "5.34.0", +======= + "version": "5.35.0", +>>>>>>> Stashed changes "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$" From eb7d4ef0941b548b5158a24cd8b2a2cc72b202a7 Mon Sep 17 00:00:00 2001 From: renoldthomas-plivo Date: Mon, 16 Oct 2023 19:34:12 +0530 Subject: [PATCH 4/7] rectified description --- src/Plivo/Plivo.nuspec | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Plivo/Plivo.nuspec b/src/Plivo/Plivo.nuspec index 4e8fc845..4227313f 100644 --- a/src/Plivo/Plivo.nuspec +++ b/src/Plivo/Plivo.nuspec @@ -12,11 +12,8 @@ http://github.com/plivo/plivo-dotnet false -<<<<<<< Updated upstream + * 5.35.0 Added New Params `campaign_source`. * 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.35.0 Added New Params `DestinationNetwork`, `CarrierFeesRate`, `CarrierFees`. ->>>>>>> Stashed changes * 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 From 544fb65d0a4f059f97b5f156e796dbe24b7346c8 Mon Sep 17 00:00:00 2001 From: renoldthomas-plivo Date: Mon, 16 Oct 2023 19:35:37 +0530 Subject: [PATCH 5/7] rectified description --- src/Plivo/Version.cs | 4 ---- version.json | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/Plivo/Version.cs b/src/Plivo/Version.cs index fb155493..607893da 100644 --- a/src/Plivo/Version.cs +++ b/src/Plivo/Version.cs @@ -10,11 +10,7 @@ public class Version /// /// DotNet SDK version /// -<<<<<<< Updated upstream - public const string SdkVersion = "5.34.0"; -======= public const string SdkVersion = "5.35.0"; ->>>>>>> Stashed changes /// /// Plivo API version /// diff --git a/version.json b/version.json index 78f8d66f..434a96c4 100644 --- a/version.json +++ b/version.json @@ -1,9 +1,5 @@ { -<<<<<<< Updated upstream - "version": "5.34.0", -======= "version": "5.35.0", ->>>>>>> Stashed changes "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$" From 8228947ee4d49b9ebf69dffd516d02c4bd389de5 Mon Sep 17 00:00:00 2001 From: renoldthomas-plivo Date: Mon, 16 Oct 2023 19:54:41 +0530 Subject: [PATCH 6/7] updated version --- CHANGELOG.md | 4 ++++ README.md | 4 ++-- src/Plivo/Plivo.csproj | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d76a5010..4842501d 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 - campaign_source field** +- Added new param `campaign_source` in LIST / GET Camapign APIs + ## [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. From 4bcc92ff20ffea0b6462cd061e87f5df0fc5373e Mon Sep 17 00:00:00 2001 From: renoldthomas-plivo Date: Fri, 20 Oct 2023 10:07:42 +0530 Subject: [PATCH 7/7] version update --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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+)?$"