Exemplo n.º 1
0
        /// <summary>
        /// Fetch a specific instance of an IP Access Control List mapping
        /// </summary>
        /// <param name="options"> Fetch AuthCallsIpAccessControlListMapping parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of AuthCallsIpAccessControlListMapping </returns>
        public static AuthCallsIpAccessControlListMappingResource Fetch(FetchAuthCallsIpAccessControlListMappingOptions options,
                                                                        ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
 private static Request BuildFetchRequest(FetchAuthCallsIpAccessControlListMappingOptions options,
                                          ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Api,
                "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/SIP/Domains/" + options.PathDomainSid + "/Auth/Calls/IpAccessControlListMappings/" + options.PathSid + ".json",
                queryParams: options.GetParams()
                ));
 }
Exemplo n.º 3
0
        /// <summary>
        /// Fetch a specific instance of an IP Access Control List mapping
        /// </summary>
        /// <param name="pathDomainSid"> The SID of the SIP domain that contains the resource to fetch </param>
        /// <param name="pathSid"> The unique string that identifies the resource </param>
        /// <param name="pathAccountSid"> The SID of the Account that created the resource to fetch </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of AuthCallsIpAccessControlListMapping </returns>
        public static async System.Threading.Tasks.Task <AuthCallsIpAccessControlListMappingResource> FetchAsync(string pathDomainSid,
                                                                                                                 string pathSid,
                                                                                                                 string pathAccountSid    = null,
                                                                                                                 ITwilioRestClient client = null)
        {
            var options = new FetchAuthCallsIpAccessControlListMappingOptions(pathDomainSid, pathSid)
            {
                PathAccountSid = pathAccountSid
            };

            return(await FetchAsync(options, client));
        }
Exemplo n.º 4
0
        /// <summary>
        /// Fetch a specific instance of an IP Access Control List mapping
        /// </summary>
        /// <param name="pathDomainSid"> The SID of the SIP domain that contains the resource to fetch </param>
        /// <param name="pathSid"> The unique string that identifies the resource </param>
        /// <param name="pathAccountSid"> The SID of the Account that created the resource to fetch </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of AuthCallsIpAccessControlListMapping </returns>
        public static AuthCallsIpAccessControlListMappingResource Fetch(string pathDomainSid,
                                                                        string pathSid,
                                                                        string pathAccountSid    = null,
                                                                        ITwilioRestClient client = null)
        {
            var options = new FetchAuthCallsIpAccessControlListMappingOptions(pathDomainSid, pathSid)
            {
                PathAccountSid = pathAccountSid
            };

            return(Fetch(options, client));
        }
Exemplo n.º 5
0
        /// <summary>
        /// Fetch a specific instance of an IP Access Control List mapping
        /// </summary>
        /// <param name="options"> Fetch AuthCallsIpAccessControlListMapping parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of AuthCallsIpAccessControlListMapping </returns>
        public static async System.Threading.Tasks.Task <AuthCallsIpAccessControlListMappingResource> FetchAsync(FetchAuthCallsIpAccessControlListMappingOptions options,
                                                                                                                 ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }