/// <summary> /// read /// </summary> /// <param name="pathServiceSid"> The SID of the Service to read the resources from </param> /// <param name="type"> The visibility of the channel 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 Channel </returns> public static ResourceSet <ChannelResource> Read(string pathServiceSid, List <ChannelResource.ChannelTypeEnum> type = null, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadChannelOptions(pathServiceSid) { Type = type, PageSize = pageSize, Limit = limit }; return(Read(options, client)); }
/// <summary> /// read /// </summary> /// <param name="pathServiceSid"> The SID of the Service to read the resources from </param> /// <param name="type"> The visibility of the channel 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 Channel </returns> public static async System.Threading.Tasks.Task <ResourceSet <ChannelResource> > ReadAsync(string pathServiceSid, List <ChannelResource.ChannelTypeEnum> type = null, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadChannelOptions(pathServiceSid) { Type = type, PageSize = pageSize, Limit = limit }; return(await ReadAsync(options, client)); }
/// <summary> /// read /// </summary> /// /// <param name="options"> Read Channel parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Channel </returns> public static async System.Threading.Tasks.Task <ResourceSet <ChannelResource> > ReadAsync(ReadChannelOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildReadRequest(options, client)); var page = Page <ChannelResource> .FromJson("channels", response.Content); return(new ResourceSet <ChannelResource>(page, options, client)); }