public RestResponse <CRMFetchXML> GetEntities(CRMFetchXML crmFetch, K2CRMConfig config)
        {
            var client = new RestClient(config.RESTUrl);

            var request = new RestRequest();

            request.Method = Method.POST;
            if (config.CredentialCache != null)
            {
                request.Credentials = config.CredentialCache;
            }
            request.RequestFormat = RestSharp.DataFormat.Json;
            request.Resource      = "K2CRM/CRMGetEntities";

            request.AddBody(crmFetch);

            RestResponse <CRMFetchXML> response = client.Execute <CRMFetchXML>(request);

            return(response);
        }
        public RestResponse<CRMFetchXML> GetEntities(CRMFetchXML crmFetch, K2CRMConfig config)
        {
            var client = new RestClient(config.RESTUrl);

            var request = new RestRequest();
            request.Method = Method.POST;
            if (config.CredentialCache != null)
            {
                request.Credentials = config.CredentialCache;
            }
            request.RequestFormat = RestSharp.DataFormat.Json;
            request.Resource = "K2CRM/CRMGetEntities";

            request.AddBody(crmFetch);

            RestResponse<CRMFetchXML> response = client.Execute<CRMFetchXML>(request);

            return response;
        }