json, $opts); $obj->setLastResponse($response); return $obj; } /** * @param null|array|string $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return static the saved resource */ public function save($opts = null) { $params = $this->serializeParameters(); if (\count($params) > 0) { $url = $this->instanceUrl(); list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); } return $this; } }