public RestResponse<CRMEntityOwnership> ChangeOwner(CRMEntityOwnership crmEntityOwnership, 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/CRMChangeOwner"; request.AddBody(crmEntityOwnership); RestResponse<CRMEntityOwnership> response = client.Execute<CRMEntityOwnership>(request); return response; }
public RestResponse <CRMEntityOwnership> ChangeOwner(CRMEntityOwnership crmEntityOwnership, 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/CRMChangeOwner"; request.AddBody(crmEntityOwnership); RestResponse <CRMEntityOwnership> response = client.Execute <CRMEntityOwnership>(request); return(response); }