/// <summary>
        /// Retrieve a list of Evaluations associated to the trust_product resource.
        /// </summary>
        /// <param name="options"> Read TrustProductsEvaluations parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of TrustProductsEvaluations </returns>
        public static ResourceSet <TrustProductsEvaluationsResource> Read(ReadTrustProductsEvaluationsOptions options,
                                                                          ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildReadRequest(options, client));

            var page = Page <TrustProductsEvaluationsResource> .FromJson("results", response.Content);

            return(new ResourceSet <TrustProductsEvaluationsResource>(page, options, client));
        }
 private static Request BuildReadRequest(ReadTrustProductsEvaluationsOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Trusthub,
                "/v1/TrustProducts/" + options.PathTrustProductSid + "/Evaluations",
                queryParams: options.GetParams(),
                headerParams: null
                ));
 }
        /// <summary>
        /// Retrieve a list of Evaluations associated to the trust_product resource.
        /// </summary>
        /// <param name="pathTrustProductSid"> The unique string that identifies the resource </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 TrustProductsEvaluations </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <TrustProductsEvaluationsResource> > ReadAsync(string pathTrustProductSid,
                                                                                                                    int?pageSize             = null,
                                                                                                                    long?limit               = null,
                                                                                                                    ITwilioRestClient client = null)
        {
            var options = new ReadTrustProductsEvaluationsOptions(pathTrustProductSid)
            {
                PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
        /// <summary>
        /// Retrieve a list of Evaluations associated to the trust_product resource.
        /// </summary>
        /// <param name="pathTrustProductSid"> The unique string that identifies the resource </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 TrustProductsEvaluations </returns>
        public static ResourceSet <TrustProductsEvaluationsResource> Read(string pathTrustProductSid,
                                                                          int?pageSize             = null,
                                                                          long?limit               = null,
                                                                          ITwilioRestClient client = null)
        {
            var options = new ReadTrustProductsEvaluationsOptions(pathTrustProductSid)
            {
                PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
        /// <summary>
        /// Retrieve a list of Evaluations associated to the trust_product resource.
        /// </summary>
        /// <param name="options"> Read TrustProductsEvaluations parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of TrustProductsEvaluations </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <TrustProductsEvaluationsResource> > ReadAsync(ReadTrustProductsEvaluationsOptions options,
                                                                                                                    ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildReadRequest(options, client));

            var page = Page <TrustProductsEvaluationsResource> .FromJson("results", response.Content);

            return(new ResourceSet <TrustProductsEvaluationsResource>(page, options, client));
        }