Skip to content

Commit

Permalink
Bump library to 5.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jingming committed Mar 31, 2017
1 parent c8446f7 commit 32cf18b
Show file tree
Hide file tree
Showing 20 changed files with 126 additions and 34 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
twilio-csharp Changelog
=======================

[2017-04-01] Version 5.2.0
--------------------------
- Add answering machine detection to Programmable Voice
- Add channel limits to Programmable Chat

[2017-03-21] Version 5.1.1
--------------------------
- Add `Equals` and `GetHashCode` to `StringEnum`
Expand Down
2 changes: 1 addition & 1 deletion src/Twilio/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@

internal class AssemblyInfomation
{
public const string AssemblyInformationalVersion = "5.1.1";
public const string AssemblyInformationalVersion = "5.2.0";
}
18 changes: 18 additions & 0 deletions src/Twilio/Rest/Api/V2010/Account/CallOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ public class CreateCallOptions : IOptions<CallResource>
/// The sip_auth_password
/// </summary>
public string SipAuthPassword { get; set; }
/// <summary>
/// Enable machine detection or end of greeting detection
/// </summary>
public string MachineDetection { get; set; }
/// <summary>
/// Number of miliseconds to wait for machine detection
/// </summary>
public int? MachineDetectionTimeout { get; set; }

/// <summary>
/// Construct a new CreateCallOptions
Expand Down Expand Up @@ -207,6 +215,16 @@ public List<KeyValuePair<string, string>> GetParams()
p.Add(new KeyValuePair<string, string>("SipAuthPassword", SipAuthPassword));
}

if (MachineDetection != null)
{
p.Add(new KeyValuePair<string, string>("MachineDetection", MachineDetection));
}

if (MachineDetectionTimeout != null)
{
p.Add(new KeyValuePair<string, string>("MachineDetectionTimeout", MachineDetectionTimeout.Value.ToString()));
}

return p;
}
}
Expand Down
12 changes: 8 additions & 4 deletions src/Twilio/Rest/Api/V2010/Account/CallResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,13 @@ public static async System.Threading.Tasks.Task<CallResource> CreateAsync(Create
/// <param name="recordingStatusCallbackMethod"> The recording_status_callback_method </param>
/// <param name="sipAuthUsername"> The sip_auth_username </param>
/// <param name="sipAuthPassword"> The sip_auth_password </param>
/// <param name="machineDetection"> Enable machine detection or end of greeting detection </param>
/// <param name="machineDetectionTimeout"> Number of miliseconds to wait for machine detection </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> A single instance of Call </returns>
public static CallResource Create(IEndpoint to, Types.PhoneNumber from, string pathAccountSid = null, Uri url = null, string applicationSid = null, Twilio.Http.HttpMethod method = null, Uri fallbackUrl = null, Twilio.Http.HttpMethod fallbackMethod = null, Uri statusCallback = null, List<string> statusCallbackEvent = null, Twilio.Http.HttpMethod statusCallbackMethod = null, string sendDigits = null, string ifMachine = null, int? timeout = null, bool? record = null, string recordingChannels = null, string recordingStatusCallback = null, Twilio.Http.HttpMethod recordingStatusCallbackMethod = null, string sipAuthUsername = null, string sipAuthPassword = null, ITwilioRestClient client = null)
public static CallResource Create(IEndpoint to, Types.PhoneNumber from, string pathAccountSid = null, Uri url = null, string applicationSid = null, Twilio.Http.HttpMethod method = null, Uri fallbackUrl = null, Twilio.Http.HttpMethod fallbackMethod = null, Uri statusCallback = null, List<string> statusCallbackEvent = null, Twilio.Http.HttpMethod statusCallbackMethod = null, string sendDigits = null, string ifMachine = null, int? timeout = null, bool? record = null, string recordingChannels = null, string recordingStatusCallback = null, Twilio.Http.HttpMethod recordingStatusCallbackMethod = null, string sipAuthUsername = null, string sipAuthPassword = null, string machineDetection = null, int? machineDetectionTimeout = null, ITwilioRestClient client = null)
{
var options = new CreateCallOptions(to, from){PathAccountSid = pathAccountSid, Url = url, ApplicationSid = applicationSid, Method = method, FallbackUrl = fallbackUrl, FallbackMethod = fallbackMethod, StatusCallback = statusCallback, StatusCallbackEvent = statusCallbackEvent, StatusCallbackMethod = statusCallbackMethod, SendDigits = sendDigits, IfMachine = ifMachine, Timeout = timeout, Record = record, RecordingChannels = recordingChannels, RecordingStatusCallback = recordingStatusCallback, RecordingStatusCallbackMethod = recordingStatusCallbackMethod, SipAuthUsername = sipAuthUsername, SipAuthPassword = sipAuthPassword};
var options = new CreateCallOptions(to, from){PathAccountSid = pathAccountSid, Url = url, ApplicationSid = applicationSid, Method = method, FallbackUrl = fallbackUrl, FallbackMethod = fallbackMethod, StatusCallback = statusCallback, StatusCallbackEvent = statusCallbackEvent, StatusCallbackMethod = statusCallbackMethod, SendDigits = sendDigits, IfMachine = ifMachine, Timeout = timeout, Record = record, RecordingChannels = recordingChannels, RecordingStatusCallback = recordingStatusCallback, RecordingStatusCallbackMethod = recordingStatusCallbackMethod, SipAuthUsername = sipAuthUsername, SipAuthPassword = sipAuthPassword, MachineDetection = machineDetection, MachineDetectionTimeout = machineDetectionTimeout};
return Create(options, client);
}

Expand Down Expand Up @@ -149,11 +151,13 @@ public static CallResource Create(IEndpoint to, Types.PhoneNumber from, string p
/// <param name="recordingStatusCallbackMethod"> The recording_status_callback_method </param>
/// <param name="sipAuthUsername"> The sip_auth_username </param>
/// <param name="sipAuthPassword"> The sip_auth_password </param>
/// <param name="machineDetection"> Enable machine detection or end of greeting detection </param>
/// <param name="machineDetectionTimeout"> Number of miliseconds to wait for machine detection </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of Call </returns>
public static async System.Threading.Tasks.Task<CallResource> CreateAsync(IEndpoint to, Types.PhoneNumber from, string pathAccountSid = null, Uri url = null, string applicationSid = null, Twilio.Http.HttpMethod method = null, Uri fallbackUrl = null, Twilio.Http.HttpMethod fallbackMethod = null, Uri statusCallback = null, List<string> statusCallbackEvent = null, Twilio.Http.HttpMethod statusCallbackMethod = null, string sendDigits = null, string ifMachine = null, int? timeout = null, bool? record = null, string recordingChannels = null, string recordingStatusCallback = null, Twilio.Http.HttpMethod recordingStatusCallbackMethod = null, string sipAuthUsername = null, string sipAuthPassword = null, ITwilioRestClient client = null)
public static async System.Threading.Tasks.Task<CallResource> CreateAsync(IEndpoint to, Types.PhoneNumber from, string pathAccountSid = null, Uri url = null, string applicationSid = null, Twilio.Http.HttpMethod method = null, Uri fallbackUrl = null, Twilio.Http.HttpMethod fallbackMethod = null, Uri statusCallback = null, List<string> statusCallbackEvent = null, Twilio.Http.HttpMethod statusCallbackMethod = null, string sendDigits = null, string ifMachine = null, int? timeout = null, bool? record = null, string recordingChannels = null, string recordingStatusCallback = null, Twilio.Http.HttpMethod recordingStatusCallbackMethod = null, string sipAuthUsername = null, string sipAuthPassword = null, string machineDetection = null, int? machineDetectionTimeout = null, ITwilioRestClient client = null)
{
var options = new CreateCallOptions(to, from){PathAccountSid = pathAccountSid, Url = url, ApplicationSid = applicationSid, Method = method, FallbackUrl = fallbackUrl, FallbackMethod = fallbackMethod, StatusCallback = statusCallback, StatusCallbackEvent = statusCallbackEvent, StatusCallbackMethod = statusCallbackMethod, SendDigits = sendDigits, IfMachine = ifMachine, Timeout = timeout, Record = record, RecordingChannels = recordingChannels, RecordingStatusCallback = recordingStatusCallback, RecordingStatusCallbackMethod = recordingStatusCallbackMethod, SipAuthUsername = sipAuthUsername, SipAuthPassword = sipAuthPassword};
var options = new CreateCallOptions(to, from){PathAccountSid = pathAccountSid, Url = url, ApplicationSid = applicationSid, Method = method, FallbackUrl = fallbackUrl, FallbackMethod = fallbackMethod, StatusCallback = statusCallback, StatusCallbackEvent = statusCallbackEvent, StatusCallbackMethod = statusCallbackMethod, SendDigits = sendDigits, IfMachine = ifMachine, Timeout = timeout, Record = record, RecordingChannels = recordingChannels, RecordingStatusCallback = recordingStatusCallback, RecordingStatusCallbackMethod = recordingStatusCallbackMethod, SipAuthUsername = sipAuthUsername, SipAuthPassword = sipAuthPassword, MachineDetection = machineDetection, MachineDetectionTimeout = machineDetectionTimeout};
return await CreateAsync(options, client);
}
#endif
Expand Down
5 changes: 5 additions & 0 deletions src/Twilio/Rest/Chat/V1/Service/UserResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,11 @@ public static UserResource FromJson(string json)
[JsonProperty("date_updated")]
public DateTime? DateUpdated { get; private set; }
/// <summary>
/// The joined_channels_count
/// </summary>
[JsonProperty("joined_channels_count")]
public int? JoinedChannelsCount { get; private set; }
/// <summary>
/// The links
/// </summary>
[JsonProperty("links")]
Expand Down
18 changes: 18 additions & 0 deletions src/Twilio/Rest/Chat/V1/ServiceOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,14 @@ public class UpdateServiceOptions : IOptions<ServiceResource>
/// The webhooks.on_member_removed.format
/// </summary>
public string WebhooksOnMemberRemovedFormat { get; set; }
/// <summary>
/// The limits.channel_members
/// </summary>
public int? LimitsChannelMembers { get; set; }
/// <summary>
/// The limits.user_channels
/// </summary>
public int? LimitsUserChannels { get; set; }

/// <summary>
/// Construct a new UpdateServiceOptions
Expand Down Expand Up @@ -760,6 +768,16 @@ public List<KeyValuePair<string, string>> GetParams()
p.Add(new KeyValuePair<string, string>("Webhooks.OnMemberRemoved.Format", WebhooksOnMemberRemovedFormat));
}

if (LimitsChannelMembers != null)
{
p.Add(new KeyValuePair<string, string>("Limits.ChannelMembers", LimitsChannelMembers.Value.ToString()));
}

if (LimitsUserChannels != null)
{
p.Add(new KeyValuePair<string, string>("Limits.UserChannels", LimitsUserChannels.Value.ToString()));
}

return p;
}
}
Expand Down
Loading

0 comments on commit 32cf18b

Please sign in to comment.