Skip to content

Commit

Permalink
Merge pull request #291 from plivo/SMS-7107
Browse files Browse the repository at this point in the history
SMS-7107: Add fraud_check param support
  • Loading branch information
mohsin-plivo authored Oct 23, 2024
2 parents f4dcc5c + 59dbcd8 commit d70d295
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Change Log
## [5.49.2](https://github.com/plivo/plivo-dotnet/tree/v5.49.2) (2024-10-23)
**Feature - FraudCheck param in Create, Get and List Session**
- Support for the `fraud_check` parameter in sms verify session request
- Added support for `fraud_check` in GET and LIST verify session

## [5.49.1](https://github.com/plivo/plivo-dotnet/tree/v5.49.1) (2024-10-10)
**Feature - Dtmf param in Create, Get and List Session**
- Support for the `dtmf` parameter in voice verify session request
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ run:

start:
docker-compose up --build --remove-orphans --detach
docker attach $(shell docker-compose ps -q dotnetSDK)
# Wait for the container to be running before attaching
@while [ -z "$$(docker-compose ps -q dotnetSDK)" ]; do \
sleep 1; \
done
docker attach $$(docker-compose ps -q dotnetSDK)
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.49.1
PM> Install-Package Plivo -Version 5.49.2
```

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

```
> dotnet add package Plivo --version 5.49.1
> dotnet add package Plivo --version 5.49.2
```

## 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.49.1</ReleaseVersion>
<ReleaseVersion>5.49.2</ReleaseVersion>
<Version />
<Authors>Plivo SDKs Team</Authors>
<Owners>Plivo Inc.</Owners>
Expand Down
2 changes: 1 addition & 1 deletion src/Plivo/Plivo.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<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.49.1</version>
<version>5.49.2</version>
<title>Plivo</title>
<authors>Plivo SDKs Team</authors>
<owners>Plivo, Inc.</owners>
Expand Down
2 changes: 2 additions & 0 deletions src/Plivo/Resource/VerifySession/VerifySession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public class AttemptDetail {
public int CodeLength {get; set;}
[JsonProperty("dtmf")]
public int? Dtmf {get; set;}
[JsonProperty("fraud_check")]
public string FraudCheck {get; set;}
}

[JsonObject(MemberSerialization.OptIn)]
Expand Down
14 changes: 9 additions & 5 deletions src/Plivo/Resource/VerifySession/VerifySessionInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ public VerifySessionInterface(HttpClient client) : base(client)
/// <param name="app_hash">AppHash.</param>
/// <param name="code_length">CodeLength.</param>
/// <param name="dtmf">dtmf.</param>
/// <param name="fraud_check">FraudCheck.</param>

public VerifySessionCreateResponse Create(
string recipient, string app_uuid = null, string channel = null, string url = null,
string method = null, string locale = null, string brand_name = null, string app_hash = null, int code_length = 0, int? dtmf = null)
string method = null, string locale = null, string brand_name = null, string app_hash = null, int code_length = 0, int? dtmf = null, string fraud_check = null)
{
Dictionary<string, object> data = null;
var mandatoryParams = new List<string> { "recipient" };
Expand All @@ -57,7 +58,8 @@ public VerifySessionCreateResponse Create(
brand_name,
app_hash,
code_length,
dtmf
dtmf,
fraud_check
});

return ExecuteWithExceptionUnwrap(() =>
Expand All @@ -81,11 +83,12 @@ public VerifySessionCreateResponse Create(
/// <param name="brand_name">BrandName.</param>
/// <param name="app_hash">AppHash.</param>
/// <param name="code_length">CodeLength.</param>
///<param name="dtmf">dtmf.</param>
/// <param name="dtmf">dtmf.</param>
/// <param name="fraud_check">FraudCheck.</param>

public async Task<VerifySessionCreateResponse> CreateAsync(
string recipient, string app_uuid = null, string channel = null, string url = null,
string method = null, string locale = null, string brand_name = null, string app_hash = null, int code_length = 0, int? dtmf = null)
string method = null, string locale = null, string brand_name = null, string app_hash = null, int code_length = 0, int? dtmf = null, string fraud_check = null)
{
Dictionary<string, object> data = null;
var mandatoryParams = new List<string> { "recipient" };
Expand All @@ -102,7 +105,8 @@ public async Task<VerifySessionCreateResponse> CreateAsync(
brand_name,
app_hash,
code_length,
dtmf
dtmf,
fraud_check
});

var result = await Client.Update<VerifySessionCreateResponse>(Uri, data);
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.49.1";
public const string SdkVersion = "5.49.2";
/// <summary>
/// Plivo API version
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "5.49.1",
"version": "5.49.2",
"publicReleaseRefSpec": [
"^refs/heads/master$",
"^refs/heads/v\\d+(?:\\.\\d+)?$"
Expand Down

0 comments on commit d70d295

Please sign in to comment.