Skip to content

Commit

Permalink
Merge pull request #141 from Nexmo/CallEditCommandFix
Browse files Browse the repository at this point in the history
Fixed Destination in call command
  • Loading branch information
Rabeb Othmani committed Jan 22, 2019
2 parents 452ffc9 + 5d52ab6 commit 95cf8af
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Nexmo.Api.Test.Integration/CallTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void should_edit_specified_call()
var id = "ffffffff-ffff-ffff-ffff-ffffffffffff";
var results = Call.Edit(id, new Call.CallEditCommand
{
action = "hangup"
Action = "hangup"
});
Assert.AreEqual(id, results.uuid);
}
Expand Down
1 change: 1 addition & 0 deletions Nexmo.Api/Nexmo.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.8" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.0.2" />
<PackageReference Include="System.Collections.Immutable" Version="1.2.*" />
Expand Down
14 changes: 12 additions & 2 deletions Nexmo.Api/Voice/Call.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,21 @@ public class CallEditCommand
/// unearmuff Removes the earmuff effect from this call leg.
/// transfer Transfers this call leg to another NCCO, as specified by the destination parameter.
/// </summary>
public string action { get; set; }
[JsonProperty("action")]
public string Action { get; set; }
/// <summary>
/// Optional. A JSON object pointing to a replacement NCCO, when action is transfer.
/// </summary>
public string destination { get; set; }
[JsonProperty("destination")]
public Destination Destination { get; set; }
}

public class Destination
{
[JsonProperty("type")]
public string Type { get; set; }
[JsonProperty("url")]
public string[] Url { get; set; }
}

public class SearchFilter
Expand Down

0 comments on commit 95cf8af

Please sign in to comment.