private static Request BuildReadRequest(ReadExportCustomJobOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Preview, "/BulkExports/Exports/" + options.PathResourceType + "/Jobs", queryParams: options.GetParams() )); }
/// <summary> /// read /// </summary> /// <param name="options"> Read ExportCustomJob parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of ExportCustomJob </returns> public static ResourceSet <ExportCustomJobResource> Read(ReadExportCustomJobOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildReadRequest(options, client)); var page = Page <ExportCustomJobResource> .FromJson("jobs", response.Content); return(new ResourceSet <ExportCustomJobResource>(page, options, client)); }
/// <summary> /// read /// </summary> /// <param name="pathResourceType"> The type of communication – Messages, Calls, Conferences, and Participants </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 ExportCustomJob </returns> public static ResourceSet <ExportCustomJobResource> Read(string pathResourceType, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadExportCustomJobOptions(pathResourceType) { PageSize = pageSize, Limit = limit }; return(Read(options, client)); }
/// <summary> /// read /// </summary> /// <param name="pathResourceType"> The type of communication – Messages, Calls, Conferences, and Participants </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 ExportCustomJob </returns> public static async System.Threading.Tasks.Task <ResourceSet <ExportCustomJobResource> > ReadAsync(string pathResourceType, int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadExportCustomJobOptions(pathResourceType) { PageSize = pageSize, Limit = limit }; return(await ReadAsync(options, client)); }
/// <summary> /// read /// </summary> /// <param name="options"> Read ExportCustomJob parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of ExportCustomJob </returns> public static async System.Threading.Tasks.Task <ResourceSet <ExportCustomJobResource> > ReadAsync(ReadExportCustomJobOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildReadRequest(options, client)); var page = Page <ExportCustomJobResource> .FromJson("jobs", response.Content); return(new ResourceSet <ExportCustomJobResource>(page, options, client)); }