private static string GetResponseMessage(ResponseBody responseBody)
 {
     return string.Format("Error {0}: {1}. {2}", responseBody.Code, responseBody.Message, GetValidationErrorString(responseBody.ValidationErrors));
 }
 private static bool TryParseResponseBody(string content, out ResponseBody responseBody)
 {
     responseBody = null;
     try
     {
         responseBody = JsonConvert.DeserializeObject<ResponseBody>(content);
         return true;
     }
     catch
     {
         return false;
     }
 }
 public DineroApiException(ResponseBody responseBody, HttpStatusCode statusCode)
     : base(GetResponseMessage(responseBody))
 {
     StatusCode = statusCode;
     ResponseBody = responseBody;
 }