/// <summary> /// Create a bulk update request to change voice dialing country permissions of one or more countries identified by the /// corresponding [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) /// </summary> /// <param name="updateRequest"> URL encoded JSON array of update objects </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of BulkCountryUpdate </returns> public static async System.Threading.Tasks.Task <BulkCountryUpdateResource> CreateAsync(string updateRequest, ITwilioRestClient client = null) { var options = new CreateBulkCountryUpdateOptions(updateRequest); return(await CreateAsync(options, client)); }
/// <summary> /// Create a bulk update request to change voice dialing country permissions of one or more countries identified by the /// corresponding [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) /// </summary> /// <param name="options"> Create BulkCountryUpdate parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of BulkCountryUpdate </returns> public static BulkCountryUpdateResource Create(CreateBulkCountryUpdateOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildCreateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildCreateRequest(CreateBulkCountryUpdateOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Voice, "/v1/DialingPermissions/BulkCountryUpdates", client.Region, postParams: options.GetParams() )); }
/// <summary> /// Create a bulk update request to change voice dialing country permissions of one or more countries identified by the /// corresponding [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) /// </summary> /// <param name="updateRequest"> URL encoded JSON array of update objects </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of BulkCountryUpdate </returns> public static BulkCountryUpdateResource Create(string updateRequest, ITwilioRestClient client = null) { var options = new CreateBulkCountryUpdateOptions(updateRequest); return(Create(options, client)); }
/// <summary> /// Create a bulk update request to change voice dialing country permissions of one or more countries identified by the /// corresponding [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) /// </summary> /// <param name="options"> Create BulkCountryUpdate parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of BulkCountryUpdate </returns> public static async System.Threading.Tasks.Task <BulkCountryUpdateResource> CreateAsync(CreateBulkCountryUpdateOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildCreateRequest(options, client)); return(FromJson(response.Content)); }