Skip to content

Commit

Permalink
Merge pull request #146 from plivo/adding-public-uri
Browse files Browse the repository at this point in the history
[VT-2365] Adding public uri support
  • Loading branch information
nixonsam authored Sep 24, 2020
2 parents 4456eea + 5c2718f commit 9d84cac
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

# Change Log

## [v4.12.0](https://github.com/plivo/plivo-dotnet/tree/v4.12.0) (2020-09-24)
- Add "PublicUri" optional param support for Application API

## [v4.11.0](https://github.com/plivo/plivo-dotnet/tree/v4.11.0) (2020-09-07)
- Add Powerpack for MMS

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>4.11.0</ReleaseVersion>
<ReleaseVersion>4.12.0</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>4.11.0</version>
<version>4.12.0</version>
<title>Plivo</title>
<authors>Plivo SDKs Team</authors>
<owners>Plivo, Inc.</owners>
Expand Down
28 changes: 19 additions & 9 deletions src/Plivo/Resource/Application/ApplicationInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@ public ApplicationInterface(HttpClient client) : base(client)
/// <param name="defaultEndpointApp">Default endpoint app.</param>
/// <param name="subaccount">Subaccount.</param>
/// <param name="logIncomingMessages">Log incoming messages.</param>
/// <param name="publicUri">Public URI.</param>

public ApplicationCreateResponse Create(
string appName, string answerUrl = null, string answerMethod = null,
string hangupUrl = null, string hangupMethod = null,
string fallbackAnswerUrl = null, string fallbackMethod = null,
string messageUrl = null, string messageMethod = null,
string defaultNumberApp = null, string defaultEndpointApp = null,
string subaccount = null, bool? logIncomingMessages = null)
string subaccount = null, bool? logIncomingMessages = null, bool? publicUri = null)
{
var mandatoryParams = new List<string> { "appName" }
;
Expand All @@ -72,7 +73,8 @@ public ApplicationCreateResponse Create(
defaultEndpointApp,
subaccount,
logIncomingMessages,
isVoiceRequest
isVoiceRequest,
publicUri
});

return ExecuteWithExceptionUnwrap(() =>
Expand Down Expand Up @@ -100,14 +102,15 @@ public ApplicationCreateResponse Create(
/// <param name="defaultEndpointApp">Default endpoint app.</param>
/// <param name="subaccount">Subaccount.</param>
/// <param name="logIncomingMessages">Log incoming messages.</param>
/// <param name="publicUri">Public URI.</param>

public async Task<ApplicationCreateResponse> CreateAsync(
string appName, string answerUrl = null, string answerMethod = null,
string hangupUrl = null, string hangupMethod = null,
string fallbackAnswerUrl = null, string fallbackMethod = null,
string messageUrl = null, string messageMethod = null,
string defaultNumberApp = null, string defaultEndpointApp = null,
string subaccount = null, bool? logIncomingMessages = null)
string subaccount = null, bool? logIncomingMessages = null, bool? publicUri = null)
{
var mandatoryParams = new List<string> {"appName"}
;
Expand All @@ -129,7 +132,8 @@ public async Task<ApplicationCreateResponse> CreateAsync(
defaultEndpointApp,
subaccount,
logIncomingMessages,
isVoiceRequest
isVoiceRequest,
publicUri
});

var result = await Client.Update<ApplicationCreateResponse>(Uri, data);
Expand Down Expand Up @@ -270,13 +274,15 @@ public async Task<DeleteResponse<Application>> DeleteAsync(string appId, bool? c
/// <param name="defaultEndpointApp">Default endpoint app.</param>
/// <param name="subaccount">Subaccount.</param>
/// <param name="logIncomingMessages">Log incoming messages.</param>
/// <param name="publicUri">Public URI.</param>

public UpdateResponse<Application> Update(
string appId, string answerUrl = null, string answerMethod = null,
string hangupUrl = null, string hangupMethod = null,
string fallbackAnswerUrl = null, string fallbackMethod = null,
string messageUrl = null, string messageMethod = null,
bool? defaultNumberApp = null, bool? defaultEndpointApp = null,
string subaccount = null, bool? logIncomingMessages = null)
string subaccount = null, bool? logIncomingMessages = null, bool? publicUri = null)
{
var mandatoryParams = new List<string> { "" };
bool isVoiceRequest = true;
Expand All @@ -296,7 +302,8 @@ public UpdateResponse<Application> Update(
defaultEndpointApp,
subaccount,
logIncomingMessages,
isVoiceRequest
isVoiceRequest,
publicUri
});

return ExecuteWithExceptionUnwrap(() =>
Expand Down Expand Up @@ -324,13 +331,15 @@ public UpdateResponse<Application> Update(
/// <param name="defaultEndpointApp">Default endpoint app.</param>
/// <param name="subaccount">Subaccount.</param>
/// <param name="logIncomingMessages">Log incoming messages.</param>
/// <param name="publicUri">Public URI.</param>

public async Task<UpdateResponse<Application>> UpdateAsync(
string appId, string answerUrl = null, string answerMethod = null,
string hangupUrl = null, string hangupMethod = null,
string fallbackAnswerUrl = null, string fallbackMethod = null,
string messageUrl = null, string messageMethod = null,
bool? defaultNumberApp = null, bool? defaultEndpointApp = null,
string subaccount = null, bool? logIncomingMessages = null)
string subaccount = null, bool? logIncomingMessages = null, bool? publicUri = null)
{
var mandatoryParams = new List<string> {""};
bool isVoiceRequest = true;
Expand All @@ -350,7 +359,8 @@ public async Task<UpdateResponse<Application>> UpdateAsync(
defaultEndpointApp,
subaccount,
logIncomingMessages,
isVoiceRequest
isVoiceRequest,
publicUri
});

var result = await Client.Update<UpdateResponse<Application>>(Uri + appId + "/", data);
Expand All @@ -359,4 +369,4 @@ public async Task<UpdateResponse<Application>> UpdateAsync(
}
#endregion
}
}
}
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 = "4.11.0";
public const string SdkVersion = "4.12.0";
/// <summary>
/// Plivo API version
/// </summary>
Expand Down

0 comments on commit 9d84cac

Please sign in to comment.