/// <summary> /// read /// </summary> /// <param name="pathWorkspaceSid"> The SID of the Workspace with the Workflow to read </param> /// <param name="friendlyName"> The friendly_name of the Workflow resources to read </param> /// <param name="pageSize"> Page size </param> /// <param name="limit"> Record limit </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Workflow </returns> public static ResourceSet <WorkflowResource> Read(string pathWorkspaceSid, string friendlyName = null, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadWorkflowOptions(pathWorkspaceSid) { FriendlyName = friendlyName, PageSize = pageSize, Limit = limit }; return(Read(options, client)); }
/// <summary> /// read /// </summary> /// <param name="pathWorkspaceSid"> The SID of the Workspace with the Workflow to read </param> /// <param name="friendlyName"> The friendly_name of the Workflow resources to read </param> /// <param name="pageSize"> Page size </param> /// <param name="limit"> Record limit </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 <ResourceSet <WorkflowResource> > ReadAsync(string pathWorkspaceSid, string friendlyName = null, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadWorkflowOptions(pathWorkspaceSid) { FriendlyName = friendlyName, PageSize = pageSize, Limit = limit }; return(await ReadAsync(options, client)); }
/// <summary> /// read /// </summary> /// <param name="options"> Read 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 <ResourceSet <WorkflowResource> > ReadAsync(ReadWorkflowOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildReadRequest(options, client)); var page = Page <WorkflowResource> .FromJson("workflows", response.Content); return(new ResourceSet <WorkflowResource>(page, options, client)); }