コード例 #1
0
        /// <summary>
        /// Fetch the details of an associated SIP Domain
        /// </summary>
        /// <param name="pathTrunkSid"> The SID of the Trunk with the resource to fetch </param>
        /// <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 TerminatingSipDomain </returns>
        public static async System.Threading.Tasks.Task <TerminatingSipDomainResource> FetchAsync(string pathTrunkSid,
                                                                                                  string pathSid,
                                                                                                  ITwilioRestClient client = null)
        {
            var options = new FetchTerminatingSipDomainOptions(pathTrunkSid, pathSid);

            return(await FetchAsync(options, client));
        }
コード例 #2
0
        /// <summary>
        /// Fetch the details of an associated SIP Domain
        /// </summary>
        /// <param name="pathTrunkSid"> The SID of the Trunk with the resource to fetch </param>
        /// <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 TerminatingSipDomain </returns>
        public static TerminatingSipDomainResource Fetch(string pathTrunkSid,
                                                         string pathSid,
                                                         ITwilioRestClient client = null)
        {
            var options = new FetchTerminatingSipDomainOptions(pathTrunkSid, pathSid);

            return(Fetch(options, client));
        }
コード例 #3
0
        /// <summary>
        /// Fetch the details of an associated SIP Domain
        /// </summary>
        /// <param name="options"> Fetch TerminatingSipDomain parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of TerminatingSipDomain </returns>
        public static TerminatingSipDomainResource Fetch(FetchTerminatingSipDomainOptions options,
                                                         ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
コード例 #4
0
 private static Request BuildFetchRequest(FetchTerminatingSipDomainOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Trunking,
                "/v1/Trunks/" + options.PathTrunkSid + "/TerminatingSipDomains/" + options.PathSid + "",
                client.Region,
                queryParams: options.GetParams()
                ));
 }
コード例 #5
0
        /// <summary>
        /// Fetch the details of an associated SIP Domain
        /// </summary>
        /// <param name="options"> Fetch TerminatingSipDomain parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of TerminatingSipDomain </returns>
        public static async System.Threading.Tasks.Task <TerminatingSipDomainResource> FetchAsync(FetchTerminatingSipDomainOptions options,
                                                                                                  ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }