/// <summary> /// fetch /// </summary> /// <param name="options"> Fetch Workflow parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Workflow </returns> public static WorkflowResource Fetch(FetchWorkflowOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// fetch /// </summary> /// <param name="pathWorkspaceSid"> The SID of the Workspace with the Workflow to fetch </param> /// <param name="pathSid"> The SID of the resource </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Workflow </returns> public static async System.Threading.Tasks.Task <WorkflowResource> FetchAsync(string pathWorkspaceSid, string pathSid, ITwilioRestClient client = null) { var options = new FetchWorkflowOptions(pathWorkspaceSid, pathSid); return(await FetchAsync(options, client)); }
private static Request BuildFetchRequest(FetchWorkflowOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Taskrouter, "/v1/Workspaces/" + options.PathWorkspaceSid + "/Workflows/" + options.PathSid + "", queryParams: options.GetParams() )); }
/// <summary> /// fetch /// </summary> /// <param name="pathWorkspaceSid"> The SID of the Workspace with the Workflow to fetch </param> /// <param name="pathSid"> The SID of the resource </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Workflow </returns> public static WorkflowResource Fetch(string pathWorkspaceSid, string pathSid, ITwilioRestClient client = null) { var options = new FetchWorkflowOptions(pathWorkspaceSid, pathSid); return(Fetch(options, client)); }
/// <summary> /// fetch /// </summary> /// <param name="options"> Fetch Workflow parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Workflow </returns> public static async System.Threading.Tasks.Task <WorkflowResource> FetchAsync(FetchWorkflowOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }