Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify caller id Feature #265

Merged
merged 3 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Change Log

## [v5.39.0](https://github.com/plivo/plivo-dotnet/tree/v5.39.0) (2023-11-10)
**Feature - Verify Caller Id API support**
- API support for verifying, updating, getting and deleting caller IDs.

## [5.38.0](https://github.com/plivo/plivo-dotnet/tree/v5.38.0) (2023-11-08)
**Verify Service**
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.38.0
PM> Install-Package Plivo -Version 5.39.0
```

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

```
> dotnet add package Plivo --version 5.38.0
> dotnet add package Plivo --version 5.39.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.38.0</ReleaseVersion>
<ReleaseVersion>5.39.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.38.0</version>
<version>5.39.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.39.0 API support for verifying, updating, getting and deleting caller IDs.
* 5.38.0 Adding verify service APIs.
* 5.37.0 API support for Create, Update, Get, Delete and List Tollfree Verification.
* 5.36.0 Added New Params `campaign_source`.
Expand Down
5 changes: 5 additions & 0 deletions src/Plivo/PlivoApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
using Plivo.Resource.Profile;
using Plivo.Resource.Token;
using Plivo.Resource.TollfreeVerification;
using Plivo.Resource.VerifyCallerId;

namespace Plivo
{
Expand Down Expand Up @@ -80,6 +81,7 @@ public class PlivoApi

private readonly Lazy<MultiPartyCallInterface> _multiPartyCall;
private readonly Lazy<TollfreeVerificationInterface> _tollfreeVerification;
private readonly Lazy<VerifyCallerIdInterface> _verifyCallerId;

/// <summary>
/// Gets the account.
Expand Down Expand Up @@ -202,6 +204,8 @@ public class PlivoApi
public MultiPartyCallInterface MultiPartyCall => _multiPartyCall.Value;

public TollfreeVerificationInterface TollfreeVerification => _tollfreeVerification.Value;

public VerifyCallerIdInterface VerifyCallerId => _verifyCallerId.Value;


/// <summary>
Expand Down Expand Up @@ -255,6 +259,7 @@ public PlivoApi(
new Lazy<ComplianceApplicationInterface>(() => new ComplianceApplicationInterface(Client));
_multiPartyCall = new Lazy<MultiPartyCallInterface>(() => new MultiPartyCallInterface(Client));
_tollfreeVerification = new Lazy<TollfreeVerificationInterface>(() => new TollfreeVerificationInterface(Client));
_verifyCallerId = new Lazy<VerifyCallerIdInterface>(() => new VerifyCallerIdInterface(Client));
}
}
}
7 changes: 7 additions & 0 deletions src/Plivo/Resource/VerifyCallerId/AsyncResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Plivo.Resource.VerifyCallerId
{
public class AsyncResponse : BaseResponse
{

}
}
37 changes: 37 additions & 0 deletions src/Plivo/Resource/VerifyCallerId/GetVerifiedCallerIdResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using Newtonsoft.Json;

namespace Plivo.Resource.VerifyCallerId
{
[JsonObject(MemberSerialization.OptIn)]
public class GetVerifiedCallerIdResponse : Resource
{
[JsonProperty("api_id")]
public string ApiID { get; set; }

[JsonProperty("alias")]
public string Alias { get; set; }

[JsonProperty("country")]
public string Country { get; set; }

[JsonProperty("created_at")]
public string CreatedAt { get; set; }

[JsonProperty("modified_at")]
public string ModifiedAt { get; set; }

[JsonProperty("phone_number")]
public string PhoneNumber { get; set; }

[JsonProperty("subaccount")]
public string Subaccount { get; set; }

[JsonProperty("verification_uuid")]
public string VerificationUuid { get; set; }

public override string ToString()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
31 changes: 31 additions & 0 deletions src/Plivo/Resource/VerifyCallerId/InitiateVerifyResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Newtonsoft.Json;

namespace Plivo.Resource.VerifyCallerId
{
[JsonObject(MemberSerialization.OptIn)]
public class InitiateVerifyResponse : Resource
{
[JsonProperty("api_id")]
public new string ApiId { get; set; }

[JsonProperty("verification_uuid")]
public new string VerificationUuid { get; set; }

[JsonProperty("message")]
public new string Message { get; set; }

[JsonProperty("error", NullValueHandling = NullValueHandling.Ignore)] // Ignore null values for "error"
public string Error { get; set; }

public override string ToString()
{
var settings = new JsonSerializerSettings
{
Formatting = Formatting.Indented,
NullValueHandling = NullValueHandling.Ignore // Ignore null values globally
};

return JsonConvert.SerializeObject(this, settings);
}
}
}
37 changes: 37 additions & 0 deletions src/Plivo/Resource/VerifyCallerId/ListVerifiedCallerIdResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using Newtonsoft.Json;

namespace Plivo.Resource.VerifyCallerId
{
[JsonObject(MemberSerialization.OptIn)]
public class ListVerifiedCallerIdResponse : Resource
{
[JsonProperty("alias")]
public string Alias { get; set; }

[JsonProperty("country")]
public string Country { get; set; }

[JsonProperty("created_at")]
public string CreatedAt { get; set; }

[JsonProperty("modified_at")]
public string ModifiedAt { get; set; }

[JsonProperty("phone_number")]
public string PhoneNumber { get; set; }

[JsonProperty("resource_uri")]
public string ResourceUri { get; set; }

[JsonProperty("subaccount")]
public string Subaccount { get; set; }

[JsonProperty("verification_uuid")]
public string VerificationUuid { get; set; }

public override string ToString()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
38 changes: 38 additions & 0 deletions src/Plivo/Resource/VerifyCallerId/VerifyCallerId.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using Newtonsoft.Json;

namespace Plivo.Resource.VerifyCallerId
{

[JsonObject(MemberSerialization.OptIn)]
public class VerifyCallerId : Resource
{
[JsonProperty("api_id")]
public string ApiID { get; set; }

[JsonProperty("alias")]
public string Alias { get; set; }

[JsonProperty("channel")]
public string Channel { get; set; }

[JsonProperty("country")]
public string Country { get; set; }

[JsonProperty("created_at")]
public string CreatedAt { get; set; }

[JsonProperty("phone_number")]
public string PhoneNumber { get; set; }

[JsonProperty("subaccount")]
public string Subaccount { get; set; }

[JsonProperty("verification_uuid")]
public string VerificationUuid { get; set; }

public override string ToString()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
Loading
Loading