/// <summary> /// create /// </summary> /// /// <param name="options"> Create IpAccessControlList parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of IpAccessControlList </returns> public static IpAccessControlListResource Create(CreateIpAccessControlListOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildCreateRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// Associate an IP Access Control List with a Trunk /// </summary> /// <param name="pathTrunkSid"> The SID of the Trunk to associate the IP Access Control List with </param> /// <param name="ipAccessControlListSid"> The SID of the IP Access Control List that you want to associate with the /// trunk </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of IpAccessControlList </returns> public static IpAccessControlListResource Create(string pathTrunkSid, string ipAccessControlListSid, ITwilioRestClient client = null) { var options = new CreateIpAccessControlListOptions(pathTrunkSid, ipAccessControlListSid); return(Create(options, client)); }
/// <summary> /// Associate an IP Access Control List with a Trunk /// </summary> /// <param name="pathTrunkSid"> The SID of the Trunk to associate the IP Access Control List with </param> /// <param name="ipAccessControlListSid"> The SID of the IP Access Control List that you want to associate with the /// trunk </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of IpAccessControlList </returns> public static async System.Threading.Tasks.Task <IpAccessControlListResource> CreateAsync(string pathTrunkSid, string ipAccessControlListSid, ITwilioRestClient client = null) { var options = new CreateIpAccessControlListOptions(pathTrunkSid, ipAccessControlListSid); return(await CreateAsync(options, client)); }
private static Request BuildCreateRequest(CreateIpAccessControlListOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Trunking, "/v1/Trunks/" + options.PathTrunkSid + "/IpAccessControlLists", postParams: options.GetParams() )); }
/// <summary> /// create /// </summary> /// /// <param name="options"> Create IpAccessControlList parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of IpAccessControlList </returns> public static async System.Threading.Tasks.Task <IpAccessControlListResource> CreateAsync(CreateIpAccessControlListOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildCreateRequest(options, client)); return(FromJson(response.Content)); }