/// <summary> /// Retrieve a specific Flow. /// </summary> /// <param name="pathSid"> A string that uniquely identifies this Flow. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Flow </returns> public static async System.Threading.Tasks.Task <FlowResource> FetchAsync(string pathSid, ITwilioRestClient client = null) { var options = new FetchFlowOptions(pathSid); return(await FetchAsync(options, client)); }
/// <summary> /// Retrieve a specific Flow. /// </summary> /// <param name="options"> Fetch Flow parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Flow </returns> public static FlowResource Fetch(FetchFlowOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// Retrieve a specific Flow. /// </summary> /// <param name="options"> Fetch Flow parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Flow </returns> public static async System.Threading.Tasks.Task <FlowResource> FetchAsync(FetchFlowOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildFetchRequest(FetchFlowOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Studio, "/v1/Flows/" + options.PathSid + "", queryParams: options.GetParams() )); }
/// <summary> /// Retrieve a specific Flow. /// </summary> /// <param name="pathSid"> A string that uniquely identifies this Flow. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Flow </returns> public static FlowResource Fetch(string pathSid, ITwilioRestClient client = null) { var options = new FetchFlowOptions(pathSid); return(Fetch(options, client)); }