private void Init(string applicationID, string proxomoAPIKey, string version, CommunicationType format, bool validatessl, string url)
{
APIVersion = version;
_applicationID = applicationID;
_proxomoAPIKey = proxomoAPIKey;
this.ValidateSSLCert = validatessl;
this.Format = format;
if (format == CommunicationType.XML)
{
contentType = "text/xml";
if (String.IsNullOrWhiteSpace(url))
{
baseURL = String.Format("https://service.proxomo.com/{0}/xml", APIVersion);
}
else
{
baseURL = String.Format("{0}/{1}/xml", url, APIVersion);
}
}
else if (format == CommunicationType.JSON)
{
contentType = "application/json";
if (String.IsNullOrWhiteSpace(url))
{
baseURL = string.Format("https://service.proxomo.com/{0}/json", APIVersion);
}
else
{
baseURL = String.Format("{0}/{1}/json", url, APIVersion);
}
}
GetAuthToken();
}