private RestClient GetRestClient()
{
if (String.IsNullOrEmpty(_apiEndpoint) || String.IsNullOrEmpty(_companyId) ||
String.IsNullOrEmpty(_apiKey))
throw new ApplicationException(
"API Client is not properly Initialized. Please set credentials and environment");
var client = new RestClient
{
BaseUrl = new Uri(_apiEndpoint),
Authenticator = new HttpBasicAuthenticator(_companyId, _apiKey)
};
client.AddDefaultHeader("Accept-Version", _apiVersion);
return client;
}