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