/// <summary> /// Retrieve a list of all Steps for an Engagement. /// </summary> /// <param name="options"> Read Step parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Step </returns> public static ResourceSet <StepResource> Read(ReadStepOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildReadRequest(options, client)); var page = Page <StepResource> .FromJson("steps", response.Content); return(new ResourceSet <StepResource>(page, options, client)); }
private static Request BuildReadRequest(ReadStepOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Preview, "/Studio/Flows/" + options.PathFlowSid + "/Engagements/" + options.PathEngagementSid + "/Steps", client.Region, queryParams: options.GetParams() )); }
/// <summary> /// Retrieve a list of all Steps for an Engagement. /// </summary> /// <param name="pathFlowSid"> Flow Sid. </param> /// <param name="pathEngagementSid"> Engagement Sid. </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 Step </returns> public static ResourceSet <StepResource> Read(string pathFlowSid, string pathEngagementSid, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadStepOptions(pathFlowSid, pathEngagementSid) { PageSize = pageSize, Limit = limit }; return(Read(options, client)); }
/// <summary> /// Retrieve a list of all Steps for an Engagement. /// </summary> /// <param name="pathFlowSid"> Flow Sid. </param> /// <param name="pathEngagementSid"> Engagement Sid. </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 Step </returns> public static async System.Threading.Tasks.Task <ResourceSet <StepResource> > ReadAsync(string pathFlowSid, string pathEngagementSid, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadStepOptions(pathFlowSid, pathEngagementSid) { PageSize = pageSize, Limit = limit }; return(await ReadAsync(options, client)); }
/// <summary> /// Retrieve a list of all Steps for an Engagement. /// </summary> /// <param name="options"> Read Step parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Step </returns> public static async System.Threading.Tasks.Task <ResourceSet <StepResource> > ReadAsync(ReadStepOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildReadRequest(options, client)); var page = Page <StepResource> .FromJson("steps", response.Content); return(new ResourceSet <StepResource>(page, options, client)); }