/// <summary> /// Retrieves a collection of AWS Credentials belonging to the account used to make the request /// </summary> /// <param name="options"> Read Aws parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Aws </returns> public static ResourceSet <AwsResource> Read(ReadAwsOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildReadRequest(options, client)); var page = Page <AwsResource> .FromJson("credentials", response.Content); return(new ResourceSet <AwsResource>(page, options, client)); }
private static Request BuildReadRequest(ReadAwsOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Accounts, "/v1/Credentials/AWS", queryParams: options.GetParams() )); }
/// <summary> /// Retrieves a collection of AWS Credentials belonging to the account used to make the request /// </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 Aws </returns> public static async System.Threading.Tasks.Task <ResourceSet <AwsResource> > ReadAsync(int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadAwsOptions() { PageSize = pageSize, Limit = limit }; return(await ReadAsync(options, client)); }
/// <summary> /// Retrieves a collection of AWS Credentials belonging to the account used to make the request /// </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 Aws </returns> public static ResourceSet <AwsResource> Read(int?pageSize = null, long?limit = null, ITwilioRestClient client = null) { var options = new ReadAwsOptions() { PageSize = pageSize, Limit = limit }; return(Read(options, client)); }
/// <summary> /// Retrieves a collection of AWS Credentials belonging to the account used to make the request /// </summary> /// <param name="options"> Read Aws parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Aws </returns> public static async System.Threading.Tasks.Task <ResourceSet <AwsResource> > ReadAsync(ReadAwsOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildReadRequest(options, client)); var page = Page <AwsResource> .FromJson("credentials", response.Content); return(new ResourceSet <AwsResource>(page, options, client)); }