/// <summary> /// read /// </summary> /// /// <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 RatePlan </returns> public static ResourceSet <RatePlanResource> Read(int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadRatePlanOptions { PageSize = pageSize, Limit = limit }; return(Read(options, client)); }
/// <summary> /// read /// </summary> /// /// <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 RatePlan </returns> public static async System.Threading.Tasks.Task <ResourceSet <RatePlanResource> > ReadAsync(int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadRatePlanOptions { PageSize = pageSize, Limit = limit }; return(await ReadAsync(options, client)); }
/// <summary> /// read /// </summary> /// <param name="options"> Read RatePlan parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of RatePlan </returns> public static ResourceSet <RatePlanResource> Read(ReadRatePlanOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildReadRequest(options, client)); var page = Page <RatePlanResource> .FromJson("rate_plans", response.Content); return(new ResourceSet <RatePlanResource>(page, options, client)); }
private static Request BuildReadRequest(ReadRatePlanOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Wireless, "/v1/RatePlans", queryParams: options.GetParams() )); }
/// <summary> /// read /// </summary> /// <param name="options"> Read RatePlan parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of RatePlan </returns> public static async System.Threading.Tasks.Task <ResourceSet <RatePlanResource> > ReadAsync(ReadRatePlanOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildReadRequest(options, client)); var page = Page <RatePlanResource> .FromJson("rate_plans", response.Content); return(new ResourceSet <RatePlanResource>(page, options, client)); }