/// <summary>
        /// fetch
        /// </summary>
        /// <param name="options"> Fetch SyncListItem parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SyncListItem </returns>
        public static SyncListItemResource Fetch(FetchSyncListItemOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Sync Service with the Sync List Item resource to fetch </param>
        /// <param name="pathListSid"> The SID of the Sync List with the Sync List Item resource to fetch </param>
        /// <param name="pathIndex"> The index of the Sync List Item resource to fetch </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SyncListItem </returns>
        public static SyncListItemResource Fetch(string pathServiceSid,
                                                 string pathListSid,
                                                 int?pathIndex,
                                                 ITwilioRestClient client = null)
        {
            var options = new FetchSyncListItemOptions(pathServiceSid, pathListSid, pathIndex);

            return(Fetch(options, client));
        }
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Sync Service with the Sync List Item resource to fetch </param>
        /// <param name="pathListSid"> The SID of the Sync List with the Sync List Item resource to fetch </param>
        /// <param name="pathIndex"> The index of the Sync List Item resource to fetch </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of SyncListItem </returns>
        public static async System.Threading.Tasks.Task <SyncListItemResource> FetchAsync(string pathServiceSid,
                                                                                          string pathListSid,
                                                                                          int?pathIndex,
                                                                                          ITwilioRestClient client = null)
        {
            var options = new FetchSyncListItemOptions(pathServiceSid, pathListSid, pathIndex);

            return(await FetchAsync(options, client));
        }
 private static Request BuildFetchRequest(FetchSyncListItemOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Sync,
                "/v1/Services/" + options.PathServiceSid + "/Lists/" + options.PathListSid + "/Items/" + options.PathIndex + "",
                queryParams: options.GetParams()
                ));
 }
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="options"> Fetch SyncListItem parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of SyncListItem </returns>
        public static async System.Threading.Tasks.Task <SyncListItemResource> FetchAsync(FetchSyncListItemOptions options,
                                                                                          ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }