/// <summary> /// Fetch a specific instance of a credential list mapping /// </summary> /// <param name="options"> Fetch AuthCallsCredentialListMapping parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of AuthCallsCredentialListMapping </returns> public static AuthCallsCredentialListMappingResource Fetch(FetchAuthCallsCredentialListMappingOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildFetchRequest(FetchAuthCallsCredentialListMappingOptions 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/CredentialListMappings/" + options.PathSid + ".json", queryParams: options.GetParams() )); }
/// <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 AuthCallsCredentialListMapping </returns> public static async System.Threading.Tasks.Task <AuthCallsCredentialListMappingResource> FetchAsync(string pathDomainSid, string pathSid, string pathAccountSid = null, ITwilioRestClient client = null) { var options = new FetchAuthCallsCredentialListMappingOptions(pathDomainSid, pathSid) { PathAccountSid = pathAccountSid }; return(await FetchAsync(options, client)); }
/// <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 AuthCallsCredentialListMapping </returns> public static AuthCallsCredentialListMappingResource Fetch(string pathDomainSid, string pathSid, string pathAccountSid = null, ITwilioRestClient client = null) { var options = new FetchAuthCallsCredentialListMappingOptions(pathDomainSid, pathSid) { PathAccountSid = pathAccountSid }; return(Fetch(options, client)); }
/// <summary> /// Fetch a specific instance of a credential list mapping /// </summary> /// <param name="options"> Fetch AuthCallsCredentialListMapping parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of AuthCallsCredentialListMapping </returns> public static async System.Threading.Tasks.Task <AuthCallsCredentialListMappingResource> FetchAsync(FetchAuthCallsCredentialListMappingOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }