Beispiel #1
0
        /// <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));
        }
Beispiel #2
0
        /// <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));
        }
Beispiel #3
0
 private static Request BuildFetchRequest(FetchSourceIpMappingOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Voice,
                "/v1/SourceIpMappings/" + options.PathSid + "",
                queryParams: options.GetParams()
                ));
 }
Beispiel #4
0
        /// <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));
        }
Beispiel #5
0
        /// <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));
        }