/// <summary>
        /// Retrieve a specific Asset.
        /// </summary>
        /// <param name="options"> Fetch Asset parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Asset </returns>
        public static AssetResource Fetch(FetchAssetOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
        /// <summary>
        /// Retrieve a specific Asset.
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="pathSid"> Asset Sid. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Asset </returns>
        public static async System.Threading.Tasks.Task <AssetResource> FetchAsync(string pathServiceSid,
                                                                                   string pathSid,
                                                                                   ITwilioRestClient client = null)
        {
            var options = new FetchAssetOptions(pathServiceSid, pathSid);

            return(await FetchAsync(options, client));
        }
        /// <summary>
        /// Retrieve a specific Asset.
        /// </summary>
        /// <param name="options"> Fetch Asset parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Asset </returns>
        public static async System.Threading.Tasks.Task <AssetResource> FetchAsync(FetchAssetOptions options,
                                                                                   ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
 private static Request BuildFetchRequest(FetchAssetOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Serverless,
                "/v1/Services/" + options.PathServiceSid + "/Assets/" + options.PathSid + "",
                queryParams: options.GetParams()
                ));
 }
        /// <summary>
        /// Retrieve a specific Asset.
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="pathSid"> Asset Sid. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Asset </returns>
        public static AssetResource Fetch(string pathServiceSid, string pathSid, ITwilioRestClient client = null)
        {
            var options = new FetchAssetOptions(pathServiceSid, pathSid);

            return(Fetch(options, client));
        }