_request('delete', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } else { $message = "This source object does not appear to be currently attached " . "to a customer object."; throw new Exception\UnexpectedValueException($message); } } /** * @deprecated sourceTransactions is deprecated. Please use Source::allSourceTransactions instead. * * @param array|null $params * @param array|string|null $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return Collection The list of source transactions. */ public function sourceTransactions($params = null, $opts = null) { $url = $this->instanceUrl() . '/source_transactions'; list($response, $opts) = $this->_request('get', $url, $params, $opts); $obj = \Stripe\Util\Util::convertToStripeObject($response, $opts); $obj->setLastResponse($response); return $obj; } /** * @param string $id * @param array|null $params * @param array|string|null $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return Collection The list of source transactions. */ public static function allSourceTransactions($id, $params = null, $opts = null) { return self::_allNestedResources($id, '/source_transactions', $params, $opts); } /** * @param array|null $params * @param array|string|null $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return Source The verified source. */ public function verify($params = null, $opts = null) { $url = $this->instanceUrl() . '/verify'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } }