Skip to content

Commit

Permalink
Merge pull request #267 from plivo/SMS-5858
Browse files Browse the repository at this point in the history
Added params for GET/LIST Campaign APIs
  • Loading branch information
renoldthomas-plivo authored Dec 14, 2023
2 parents 28c3229 + 3beca44 commit 73130bf
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 12 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Change Log

## [5.41.0](https://github.com/plivo/plivo-dotnet/tree/v5.41.1) (2023-12-13)
## [5.42.0](https://github.com/plivo/plivo-dotnet/tree/v5.42.0) (2023-12-14)
**Feature - added two fields vertical and campaign_alias**
- Added response fields `vertical and campaign_alias`for LIST / GET Campaign APIs

## [5.41.1](https://github.com/plivo/plivo-dotnet/tree/v5.41.1) (2023-12-13)
**Support from_number and to_number filters for List Message**
- Supporting from_number and to_number params for List Message filtering

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.41.1
PM> Install-Package Plivo -Version 5.42.0
```

You can also use the .NET CLI to install this package as follows

```
> dotnet add package Plivo --version 5.41.1
> dotnet add package Plivo --version 5.42.0
```

## Getting started
Expand Down
2 changes: 1 addition & 1 deletion src/Plivo/Plivo.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard1.3</TargetFrameworks>
<ReleaseVersion>5.41.1</ReleaseVersion>
<ReleaseVersion>5.42.0</ReleaseVersion>
<Version />
<Authors>Plivo SDKs Team</Authors>
<Owners>Plivo Inc.</Owners>
Expand Down
3 changes: 2 additions & 1 deletion src/Plivo/Plivo.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
<summary>A .NET SDK to make voice calls and send SMS using Plivo and to generate Plivo XML</summary>
<description>A .NET SDK to make voice calls and send SMS using Plivo and to generate Plivo XML</description>
<id>Plivo</id>
<version>5.41.1</version>
<version>5.42.0</version>
<title>Plivo</title>
<authors>Plivo SDKs Team</authors>
<owners>Plivo, Inc.</owners>
<licenseUrl>https://github.com/plivo/plivo-dotnet/blob/master/LICENSE.txt</licenseUrl>
<projectUrl>http://github.com/plivo/plivo-dotnet</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<releaseNotes>
* 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.
* 5.40.0 Added New Params `registration_status`.
Expand Down
12 changes: 12 additions & 0 deletions src/Plivo/Resource/Campaign/Campaign.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ public class CampaignResponse

[JsonProperty("error_reason")]
public string ErrorReason { get; set; }

[JsonProperty("vertical")]
public string Vertical { get; set; }

[JsonProperty("campaign_alias")]
public string CampaignAlias { get; set; }
}

[JsonObject(MemberSerialization.OptIn)]
Expand Down Expand Up @@ -231,6 +237,12 @@ public class ListCampaigns: Resource
[JsonProperty("error_reason")]
public string ErrorReason { get; set; }

[JsonProperty("vertical")]
public string Vertical { get; set; }

[JsonProperty("campaign_alias")]
public string CampaignAlias { get; set; }

public override string ToString()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
Expand Down
2 changes: 1 addition & 1 deletion src/Plivo/Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class Version
/// <summary>
/// DotNet SDK version
/// </summary>
public const string SdkVersion = "5.41.1";
public const string SdkVersion = "5.42.0";
/// <summary>
/// Plivo API version
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
},
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
}
}
16 changes: 12 additions & 4 deletions tests_netcore/Plivo.NetCore.Test/Mocks/campaignListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
"usecase": "MIXED",
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
},
{
"brand_id": "BHYYNCK",
Expand All @@ -59,7 +61,9 @@
"usecase": "2FA",
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
},
{
"brand_id": "BHYYNCK",
Expand All @@ -80,7 +84,9 @@
"usecase": "MIXED",
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
},
{
"brand_id": "BRPXS6E",
Expand All @@ -99,7 +105,9 @@
"usecase": "ACCOUNT_NOTIFICATION",
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
}
]
}
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "5.41.1",
"version": "5.42.0",
"publicReleaseRefSpec": [
"^refs/heads/master$",
"^refs/heads/v\\d+(?:\\.\\d+)?$"
Expand Down

0 comments on commit 73130bf

Please sign in to comment.