Skip to content

Commit ca44b03

Browse files
committed
Renerate library 5.5.2-alpha1
1 parent 10129f2 commit ca44b03

File tree

193 files changed

+7230
-252
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+7230
-252
lines changed

CHANGES.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
twilio-csharp Changelog
22
=======================
33

4-
[2018-05-24] Version 5.5.1-alpha1
4+
[2017-06-16] Version 5.5.2-alpha1
5+
---------------------------------
6+
- Make url parameter optional in Play Twiml.
7+
- Add support for reentrant paging, fetching a specific page when listing resources.
8+
- Add Gather Twiml input attribute.
9+
- Make url parameter of Message Redirect Twiml the xml tag value.
10+
- Remove max page size coercion from library when listing resources.
11+
- Add `locality` property to available phone numbers and allow filter by `inLocality` option when searching available phone numbers.
12+
- Add `origin` parameter to incoming phone numbers.
13+
- Support `announceUrl` and `announcUrlMethod` properties for conference participants.
14+
- Add new usage categories.
15+
- Alpha Changes:
16+
- Change Wireless usage api list key to `usage_records`
17+
- Add alexa support to notify
18+
19+
[2017-05-24] Version 5.5.1-alpha1
520
----------------------------------
621

722
- Add HostedNumbers preview support.

src/Twilio/Rest/Accounts/V1/Credential/PublicKeyResource.cs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,26 @@ public static async System.Threading.Tasks.Task<ResourceSet<PublicKeyResource>>
9090
}
9191
#endif
9292

93+
/// <summary>
94+
/// Fetch the target page of records
95+
/// </summary>
96+
///
97+
/// <param name="targetUrl"> API-generated URL for the requested results page </param>
98+
/// <param name="client"> Client to make requests to Twilio </param>
99+
/// <returns> The target page of records </returns>
100+
public static Page<PublicKeyResource> GetPage(string targetUrl, ITwilioRestClient client)
101+
{
102+
client = client ?? TwilioClient.GetRestClient();
103+
104+
var request = new Request(
105+
HttpMethod.Get,
106+
targetUrl
107+
);
108+
109+
var response = client.Request(request);
110+
return Page<PublicKeyResource>.FromJson("credentials", response.Content);
111+
}
112+
93113
/// <summary>
94114
/// Fetch the next page of records
95115
/// </summary>
@@ -111,6 +131,27 @@ public static Page<PublicKeyResource> NextPage(Page<PublicKeyResource> page, ITw
111131
return Page<PublicKeyResource>.FromJson("credentials", response.Content);
112132
}
113133

134+
/// <summary>
135+
/// Fetch the previous page of records
136+
/// </summary>
137+
///
138+
/// <param name="page"> current page of records </param>
139+
/// <param name="client"> Client to make requests to Twilio </param>
140+
/// <returns> The previous page of records </returns>
141+
public static Page<PublicKeyResource> PreviousPage(Page<PublicKeyResource> page, ITwilioRestClient client)
142+
{
143+
var request = new Request(
144+
HttpMethod.Get,
145+
page.GetPreviousPageUrl(
146+
Rest.Domain.Accounts,
147+
client.Region
148+
)
149+
);
150+
151+
var response = client.Request(request);
152+
return Page<PublicKeyResource>.FromJson("credentials", response.Content);
153+
}
154+
114155
private static Request BuildCreateRequest(CreatePublicKeyOptions options, ITwilioRestClient client)
115156
{
116157
return new Request(

src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberResource.cs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,26 @@ public static async System.Threading.Tasks.Task<ResourceSet<DependentPhoneNumber
9494
}
9595
#endif
9696

97+
/// <summary>
98+
/// Fetch the target page of records
99+
/// </summary>
100+
///
101+
/// <param name="targetUrl"> API-generated URL for the requested results page </param>
102+
/// <param name="client"> Client to make requests to Twilio </param>
103+
/// <returns> The target page of records </returns>
104+
public static Page<DependentPhoneNumberResource> GetPage(string targetUrl, ITwilioRestClient client)
105+
{
106+
client = client ?? TwilioClient.GetRestClient();
107+
108+
var request = new Request(
109+
HttpMethod.Get,
110+
targetUrl
111+
);
112+
113+
var response = client.Request(request);
114+
return Page<DependentPhoneNumberResource>.FromJson("dependent_phone_numbers", response.Content);
115+
}
116+
97117
/// <summary>
98118
/// Fetch the next page of records
99119
/// </summary>
@@ -115,6 +135,27 @@ public static Page<DependentPhoneNumberResource> NextPage(Page<DependentPhoneNum
115135
return Page<DependentPhoneNumberResource>.FromJson("dependent_phone_numbers", response.Content);
116136
}
117137

138+
/// <summary>
139+
/// Fetch the previous page of records
140+
/// </summary>
141+
///
142+
/// <param name="page"> current page of records </param>
143+
/// <param name="client"> Client to make requests to Twilio </param>
144+
/// <returns> The previous page of records </returns>
145+
public static Page<DependentPhoneNumberResource> PreviousPage(Page<DependentPhoneNumberResource> page, ITwilioRestClient client)
146+
{
147+
var request = new Request(
148+
HttpMethod.Get,
149+
page.GetPreviousPageUrl(
150+
Rest.Domain.Api,
151+
client.Region
152+
)
153+
);
154+
155+
var response = client.Request(request);
156+
return Page<DependentPhoneNumberResource>.FromJson("dependent_phone_numbers", response.Content);
157+
}
158+
118159
/// <summary>
119160
/// Converts a JSON string into a DependentPhoneNumberResource object
120161
/// </summary>

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

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,26 @@ public static async System.Threading.Tasks.Task<ResourceSet<AddressResource>> Re
410410
}
411411
#endif
412412

413+
/// <summary>
414+
/// Fetch the target page of records
415+
/// </summary>
416+
///
417+
/// <param name="targetUrl"> API-generated URL for the requested results page </param>
418+
/// <param name="client"> Client to make requests to Twilio </param>
419+
/// <returns> The target page of records </returns>
420+
public static Page<AddressResource> GetPage(string targetUrl, ITwilioRestClient client)
421+
{
422+
client = client ?? TwilioClient.GetRestClient();
423+
424+
var request = new Request(
425+
HttpMethod.Get,
426+
targetUrl
427+
);
428+
429+
var response = client.Request(request);
430+
return Page<AddressResource>.FromJson("addresses", response.Content);
431+
}
432+
413433
/// <summary>
414434
/// Fetch the next page of records
415435
/// </summary>
@@ -431,6 +451,27 @@ public static Page<AddressResource> NextPage(Page<AddressResource> page, ITwilio
431451
return Page<AddressResource>.FromJson("addresses", response.Content);
432452
}
433453

454+
/// <summary>
455+
/// Fetch the previous page of records
456+
/// </summary>
457+
///
458+
/// <param name="page"> current page of records </param>
459+
/// <param name="client"> Client to make requests to Twilio </param>
460+
/// <returns> The previous page of records </returns>
461+
public static Page<AddressResource> PreviousPage(Page<AddressResource> page, ITwilioRestClient client)
462+
{
463+
var request = new Request(
464+
HttpMethod.Get,
465+
page.GetPreviousPageUrl(
466+
Rest.Domain.Api,
467+
client.Region
468+
)
469+
);
470+
471+
var response = client.Request(request);
472+
return Page<AddressResource>.FromJson("addresses", response.Content);
473+
}
474+
434475
/// <summary>
435476
/// Converts a JSON string into a AddressResource object
436477
/// </summary>

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

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,26 @@ public static async System.Threading.Tasks.Task<ResourceSet<ApplicationResource>
335335
}
336336
#endif
337337

338+
/// <summary>
339+
/// Fetch the target page of records
340+
/// </summary>
341+
///
342+
/// <param name="targetUrl"> API-generated URL for the requested results page </param>
343+
/// <param name="client"> Client to make requests to Twilio </param>
344+
/// <returns> The target page of records </returns>
345+
public static Page<ApplicationResource> GetPage(string targetUrl, ITwilioRestClient client)
346+
{
347+
client = client ?? TwilioClient.GetRestClient();
348+
349+
var request = new Request(
350+
HttpMethod.Get,
351+
targetUrl
352+
);
353+
354+
var response = client.Request(request);
355+
return Page<ApplicationResource>.FromJson("applications", response.Content);
356+
}
357+
338358
/// <summary>
339359
/// Fetch the next page of records
340360
/// </summary>
@@ -356,6 +376,27 @@ public static Page<ApplicationResource> NextPage(Page<ApplicationResource> page,
356376
return Page<ApplicationResource>.FromJson("applications", response.Content);
357377
}
358378

379+
/// <summary>
380+
/// Fetch the previous page of records
381+
/// </summary>
382+
///
383+
/// <param name="page"> current page of records </param>
384+
/// <param name="client"> Client to make requests to Twilio </param>
385+
/// <returns> The previous page of records </returns>
386+
public static Page<ApplicationResource> PreviousPage(Page<ApplicationResource> page, ITwilioRestClient client)
387+
{
388+
var request = new Request(
389+
HttpMethod.Get,
390+
page.GetPreviousPageUrl(
391+
Rest.Domain.Api,
392+
client.Region
393+
)
394+
);
395+
396+
var response = client.Request(request);
397+
return Page<ApplicationResource>.FromJson("applications", response.Content);
398+
}
399+
359400
private static Request BuildUpdateRequest(UpdateApplicationOptions options, ITwilioRestClient client)
360401
{
361402
return new Request(

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

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,26 @@ public static async System.Threading.Tasks.Task<ResourceSet<AuthorizedConnectApp
173173
}
174174
#endif
175175

176+
/// <summary>
177+
/// Fetch the target page of records
178+
/// </summary>
179+
///
180+
/// <param name="targetUrl"> API-generated URL for the requested results page </param>
181+
/// <param name="client"> Client to make requests to Twilio </param>
182+
/// <returns> The target page of records </returns>
183+
public static Page<AuthorizedConnectAppResource> GetPage(string targetUrl, ITwilioRestClient client)
184+
{
185+
client = client ?? TwilioClient.GetRestClient();
186+
187+
var request = new Request(
188+
HttpMethod.Get,
189+
targetUrl
190+
);
191+
192+
var response = client.Request(request);
193+
return Page<AuthorizedConnectAppResource>.FromJson("authorized_connect_apps", response.Content);
194+
}
195+
176196
/// <summary>
177197
/// Fetch the next page of records
178198
/// </summary>
@@ -194,6 +214,27 @@ public static Page<AuthorizedConnectAppResource> NextPage(Page<AuthorizedConnect
194214
return Page<AuthorizedConnectAppResource>.FromJson("authorized_connect_apps", response.Content);
195215
}
196216

217+
/// <summary>
218+
/// Fetch the previous page of records
219+
/// </summary>
220+
///
221+
/// <param name="page"> current page of records </param>
222+
/// <param name="client"> Client to make requests to Twilio </param>
223+
/// <returns> The previous page of records </returns>
224+
public static Page<AuthorizedConnectAppResource> PreviousPage(Page<AuthorizedConnectAppResource> page, ITwilioRestClient client)
225+
{
226+
var request = new Request(
227+
HttpMethod.Get,
228+
page.GetPreviousPageUrl(
229+
Rest.Domain.Api,
230+
client.Region
231+
)
232+
);
233+
234+
var response = client.Request(request);
235+
return Page<AuthorizedConnectAppResource>.FromJson("authorized_connect_apps", response.Content);
236+
}
237+
197238
/// <summary>
198239
/// Converts a JSON string into a AuthorizedConnectAppResource object
199240
/// </summary>

src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalOptions.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ public class ReadLocalOptions : ReadOptions<LocalResource>
8282
/// The in_lata
8383
/// </summary>
8484
public string InLata { get; set; }
85+
/// <summary>
86+
/// The in_locality
87+
/// </summary>
88+
public string InLocality { get; set; }
8589

8690
/// <summary>
8791
/// Construct a new ReadLocalOptions
@@ -179,6 +183,11 @@ public override List<KeyValuePair<string, string>> GetParams()
179183
p.Add(new KeyValuePair<string, string>("InLata", InLata));
180184
}
181185

186+
if (InLocality != null)
187+
{
188+
p.Add(new KeyValuePair<string, string>("InLocality", InLocality));
189+
}
190+
182191
if (PageSize != null)
183192
{
184193
p.Add(new KeyValuePair<string, string>("PageSize", PageSize.ToString()));

0 commit comments

Comments
 (0)