json, $opts); $obj->setLastResponse($response); return $obj; } /** * @return Invoice The paid invoice. */ public function pay($params = null, $opts = null) { $url = $this->instanceUrl() . '/pay'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } }