/**
  * @param OpenpayException $exception
  * @param array $data
  * @return OpenpayException
  */
 public function populate(OpenpayException $exception, array $data)
 {
     $exception->setCategory(isset($data['category']) ? $data['category'] : null);
     $exception->setDescription(isset($data['description']) ? $data['description'] : null);
     $exception->setErrorCode(isset($data['error_code']) ? $data['error_code'] : null);
     $exception->setFraudRules(isset($data['fraud_rules']) ? $data['fraud_rules'] : null);
     $exception->setHttpCode(isset($data['http_code']) ? $data['http_code'] : null);
     $exception->setRequestId(isset($data['request_id']) ? $data['request_id'] : null);
     return $exception;
 }