_apiKey); $url = $this->instanceUrl() . '/refund'; list($response, $apiKey) = $requestor->request('post', $url, $params); $this->refreshFrom($response, $apiKey); return $this; } /** * @param array|null $params * * @return Stripe_Charge The captured charge. */ public function capture($params=null) { $requestor = new Stripe_ApiRequestor($this->_apiKey); $url = $this->instanceUrl() . '/capture'; list($response, $apiKey) = $requestor->request('post', $url, $params); $this->refreshFrom($response, $apiKey); return $this; } /** * @param array|null $params * * @return array The updated dispute. */ public function updateDispute($params=null) { $requestor = new Stripe_ApiRequestor($this->_apiKey); $url = $this->instanceUrl() . '/dispute'; list($response, $apiKey) = $requestor->request('post', $url, $params); $this->refreshFrom(array('dispute' => $response), $apiKey, true); return $this->dispute; } /** * @return Stripe_Charge The updated charge. */ public function closeDispute() { $requestor = new Stripe_ApiRequestor($this->_apiKey); $url = $this->instanceUrl() . '/dispute/close'; list($response, $apiKey) = $requestor->request('post', $url); $this->refreshFrom($response, $apiKey); return $this; } }