Skip to content

Commit 32cf18b

Browse files
committed
Bump library to 5.2.0
1 parent c8446f7 commit 32cf18b

20 files changed

+126
-34
lines changed

CHANGES.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
twilio-csharp Changelog
22
=======================
33

4+
[2017-04-01] Version 5.2.0
5+
--------------------------
6+
- Add answering machine detection to Programmable Voice
7+
- Add channel limits to Programmable Chat
8+
49
[2017-03-21] Version 5.1.1
510
--------------------------
611
- Add `Equals` and `GetHashCode` to `StringEnum`

src/Twilio/Properties/AssemblyInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414

1515
internal class AssemblyInfomation
1616
{
17-
public const string AssemblyInformationalVersion = "5.1.1";
17+
public const string AssemblyInformationalVersion = "5.2.0";
1818
}

src/Twilio/Rest/Api/V2010/Account/CallOptions.cs

+18
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ public class CreateCallOptions : IOptions<CallResource>
9292
/// The sip_auth_password
9393
/// </summary>
9494
public string SipAuthPassword { get; set; }
95+
/// <summary>
96+
/// Enable machine detection or end of greeting detection
97+
/// </summary>
98+
public string MachineDetection { get; set; }
99+
/// <summary>
100+
/// Number of miliseconds to wait for machine detection
101+
/// </summary>
102+
public int? MachineDetectionTimeout { get; set; }
95103

96104
/// <summary>
97105
/// Construct a new CreateCallOptions
@@ -207,6 +215,16 @@ public List<KeyValuePair<string, string>> GetParams()
207215
p.Add(new KeyValuePair<string, string>("SipAuthPassword", SipAuthPassword));
208216
}
209217

218+
if (MachineDetection != null)
219+
{
220+
p.Add(new KeyValuePair<string, string>("MachineDetection", MachineDetection));
221+
}
222+
223+
if (MachineDetectionTimeout != null)
224+
{
225+
p.Add(new KeyValuePair<string, string>("MachineDetectionTimeout", MachineDetectionTimeout.Value.ToString()));
226+
}
227+
210228
return p;
211229
}
212230
}

src/Twilio/Rest/Api/V2010/Account/CallResource.cs

+8-4
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,13 @@ public static async System.Threading.Tasks.Task<CallResource> CreateAsync(Create
116116
/// <param name="recordingStatusCallbackMethod"> The recording_status_callback_method </param>
117117
/// <param name="sipAuthUsername"> The sip_auth_username </param>
118118
/// <param name="sipAuthPassword"> The sip_auth_password </param>
119+
/// <param name="machineDetection"> Enable machine detection or end of greeting detection </param>
120+
/// <param name="machineDetectionTimeout"> Number of miliseconds to wait for machine detection </param>
119121
/// <param name="client"> Client to make requests to Twilio </param>
120122
/// <returns> A single instance of Call </returns>
121-
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)
123+
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)
122124
{
123-
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};
125+
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};
124126
return Create(options, client);
125127
}
126128

@@ -149,11 +151,13 @@ public static CallResource Create(IEndpoint to, Types.PhoneNumber from, string p
149151
/// <param name="recordingStatusCallbackMethod"> The recording_status_callback_method </param>
150152
/// <param name="sipAuthUsername"> The sip_auth_username </param>
151153
/// <param name="sipAuthPassword"> The sip_auth_password </param>
154+
/// <param name="machineDetection"> Enable machine detection or end of greeting detection </param>
155+
/// <param name="machineDetectionTimeout"> Number of miliseconds to wait for machine detection </param>
152156
/// <param name="client"> Client to make requests to Twilio </param>
153157
/// <returns> Task that resolves to A single instance of Call </returns>
154-
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)
158+
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)
155159
{
156-
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};
160+
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};
157161
return await CreateAsync(options, client);
158162
}
159163
#endif

src/Twilio/Rest/Chat/V1/Service/UserResource.cs

+5
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,11 @@ public static UserResource FromJson(string json)
484484
[JsonProperty("date_updated")]
485485
public DateTime? DateUpdated { get; private set; }
486486
/// <summary>
487+
/// The joined_channels_count
488+
/// </summary>
489+
[JsonProperty("joined_channels_count")]
490+
public int? JoinedChannelsCount { get; private set; }
491+
/// <summary>
487492
/// The links
488493
/// </summary>
489494
[JsonProperty("links")]

src/Twilio/Rest/Chat/V1/ServiceOptions.cs

+18
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,14 @@ public class UpdateServiceOptions : IOptions<ServiceResource>
402402
/// The webhooks.on_member_removed.format
403403
/// </summary>
404404
public string WebhooksOnMemberRemovedFormat { get; set; }
405+
/// <summary>
406+
/// The limits.channel_members
407+
/// </summary>
408+
public int? LimitsChannelMembers { get; set; }
409+
/// <summary>
410+
/// The limits.user_channels
411+
/// </summary>
412+
public int? LimitsUserChannels { get; set; }
405413

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

771+
if (LimitsChannelMembers != null)
772+
{
773+
p.Add(new KeyValuePair<string, string>("Limits.ChannelMembers", LimitsChannelMembers.Value.ToString()));
774+
}
775+
776+
if (LimitsUserChannels != null)
777+
{
778+
p.Add(new KeyValuePair<string, string>("Limits.UserChannels", LimitsUserChannels.Value.ToString()));
779+
}
780+
763781
return p;
764782
}
765783
}

0 commit comments

Comments
 (0)