예제 #1
0
        /// <summary>
        /// Fetch a specific instance of a credential list mapping
        /// </summary>
        /// <param name="options"> Fetch AuthRegistrationsCredentialListMapping parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of AuthRegistrationsCredentialListMapping </returns>
        public static AuthRegistrationsCredentialListMappingResource Fetch(FetchAuthRegistrationsCredentialListMappingOptions options,
                                                                           ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
 private static Request BuildFetchRequest(FetchAuthRegistrationsCredentialListMappingOptions options,
                                          ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Api,
                "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/SIP/Domains/" + options.PathDomainSid + "/Auth/Registrations/CredentialListMappings/" + options.PathSid + ".json",
                queryParams: options.GetParams()
                ));
 }
예제 #3
0
        /// <summary>
        /// Fetch a specific instance of a credential 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 AuthRegistrationsCredentialListMapping </returns>
        public static async System.Threading.Tasks.Task <AuthRegistrationsCredentialListMappingResource> FetchAsync(string pathDomainSid,
                                                                                                                    string pathSid,
                                                                                                                    string pathAccountSid    = null,
                                                                                                                    ITwilioRestClient client = null)
        {
            var options = new FetchAuthRegistrationsCredentialListMappingOptions(pathDomainSid, pathSid)
            {
                PathAccountSid = pathAccountSid
            };

            return(await FetchAsync(options, client));
        }
예제 #4
0
        /// <summary>
        /// Fetch a specific instance of a credential 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 AuthRegistrationsCredentialListMapping </returns>
        public static AuthRegistrationsCredentialListMappingResource Fetch(string pathDomainSid,
                                                                           string pathSid,
                                                                           string pathAccountSid    = null,
                                                                           ITwilioRestClient client = null)
        {
            var options = new FetchAuthRegistrationsCredentialListMappingOptions(pathDomainSid, pathSid)
            {
                PathAccountSid = pathAccountSid
            };

            return(Fetch(options, client));
        }
예제 #5
0
        /// <summary>
        /// Fetch a specific instance of a credential list mapping
        /// </summary>
        /// <param name="options"> Fetch AuthRegistrationsCredentialListMapping parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of AuthRegistrationsCredentialListMapping </returns>
        public static async System.Threading.Tasks.Task <AuthRegistrationsCredentialListMappingResource> FetchAsync(FetchAuthRegistrationsCredentialListMappingOptions options,
                                                                                                                    ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }