/// <summary> /// Fetch a specific Customer-Profile instance. /// </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 CustomerProfiles </returns> public static async System.Threading.Tasks.Task <CustomerProfilesResource> FetchAsync(string pathSid, ITwilioRestClient client = null) { var options = new FetchCustomerProfilesOptions(pathSid); return(await FetchAsync(options, client)); }
/// <summary> /// Fetch a specific Customer-Profile instance. /// </summary> /// <param name="options"> Fetch CustomerProfiles parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of CustomerProfiles </returns> public static CustomerProfilesResource Fetch(FetchCustomerProfilesOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildFetchRequest(FetchCustomerProfilesOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Trusthub, "/v1/CustomerProfiles/" + options.PathSid + "", queryParams: options.GetParams(), headerParams: null )); }
/// <summary> /// Fetch a specific Customer-Profile instance. /// </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 CustomerProfiles </returns> public static CustomerProfilesResource Fetch(string pathSid, ITwilioRestClient client = null) { var options = new FetchCustomerProfilesOptions(pathSid); return(Fetch(options, client)); }
/// <summary> /// Fetch a specific Customer-Profile instance. /// </summary> /// <param name="options"> Fetch CustomerProfiles parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of CustomerProfiles </returns> public static async System.Threading.Tasks.Task <CustomerProfilesResource> FetchAsync(FetchCustomerProfilesOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }