Skip to content

Commit

Permalink
PhoneEndpoint enum rename
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-lethargic committed May 23, 2022
1 parent 7bd3a17 commit a868485
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 23 deletions.
13 changes: 1 addition & 12 deletions Vonage/Voice/EventWebhooks/HumanMachine.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json;

namespace Vonage.Voice.EventWebhooks
{
public class HumanMachine : CallStatusEvent
{
public enum status
{
human,
machine
}

/// <summary>
/// The unique identifier for this call (Note call_uuid, not uuid as in some other endpoints)
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Vonage/Voice/Nccos/Endpoints/AppEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class AppEndpoint : Endpoint

public AppEndpoint()
{
Type = EndpointType.app;
Type = EndpointType.App;
}
}
}
19 changes: 13 additions & 6 deletions Vonage/Voice/Nccos/Endpoints/Endpoint.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Newtonsoft.Json;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace Vonage.Voice.Nccos.Endpoints
Expand All @@ -12,13 +13,19 @@ public abstract class Endpoint
[JsonConverter(typeof(StringEnumConverter))]
public EndpointType Type { get; protected set; }

[JsonConverter(typeof(StringEnumConverter))]
public enum EndpointType
{
phone=1,
app=2,
websocket=3,
sip=4,
vbc=5
[EnumMember(Value="phone")]
Phone=1,
[EnumMember(Value="app")]
App=2,
[EnumMember(Value="websocket")]
Websocket=3,
[EnumMember(Value="sip")]
Sip=4,
[EnumMember(Value="vbc")]
Vbc=5
}
}
}
2 changes: 1 addition & 1 deletion Vonage/Voice/Nccos/Endpoints/PhoneEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class PhoneEndpoint : Endpoint

public PhoneEndpoint()
{
Type = EndpointType.phone;
Type = EndpointType.Phone;
}

public class Answer
Expand Down
2 changes: 1 addition & 1 deletion Vonage/Voice/Nccos/Endpoints/SipEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class SipEndpoint : Endpoint

public SipEndpoint()
{
Type = EndpointType.sip;
Type = EndpointType.Sip;
}
}
}
2 changes: 1 addition & 1 deletion Vonage/Voice/Nccos/Endpoints/VbcEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class VbcEndpoint : Endpoint

public VbcEndpoint()
{
Type = EndpointType.vbc;
Type = EndpointType.Vbc;
}
}
}
2 changes: 1 addition & 1 deletion Vonage/Voice/Nccos/Endpoints/WebsocketEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class WebsocketEndpoint : Endpoint

public WebsocketEndpoint()
{
Type = EndpointType.websocket;
Type = EndpointType.Websocket;
}
}
}

0 comments on commit a868485

Please sign in to comment.