/// <summary> /// fetch /// </summary> /// <param name="pathSid"> The unique string that identifies the resource </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of SourceIpMapping </returns> public static async System.Threading.Tasks.Task <SourceIpMappingResource> FetchAsync(string pathSid, ITwilioRestClient client = null) { var options = new FetchSourceIpMappingOptions(pathSid); return(await FetchAsync(options, client)); }
/// <summary> /// fetch /// </summary> /// <param name="options"> Fetch SourceIpMapping parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SourceIpMapping </returns> public static SourceIpMappingResource Fetch(FetchSourceIpMappingOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildFetchRequest(FetchSourceIpMappingOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Voice, "/v1/SourceIpMappings/" + options.PathSid + "", queryParams: options.GetParams() )); }
/// <summary> /// fetch /// </summary> /// <param name="pathSid"> The unique string that identifies the resource </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SourceIpMapping </returns> public static SourceIpMappingResource Fetch(string pathSid, ITwilioRestClient client = null) { var options = new FetchSourceIpMappingOptions(pathSid); return(Fetch(options, client)); }
/// <summary> /// fetch /// </summary> /// <param name="options"> Fetch SourceIpMapping parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of SourceIpMapping </returns> public static async System.Threading.Tasks.Task <SourceIpMappingResource> FetchAsync(FetchSourceIpMappingOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }