public function capture($data = false)
{
$request = new PagarMe_Request(self::getUrl() . '/' . $this->id . '/capture', 'POST');
if (gettype($data) == 'array') {
$request->setParameters($data);
} else {
if ($data) {
$request->setParameters(array('amount' => $data));
}
}
$response = $request->run();
$this->refresh($response);
}