json, $opts); $obj->setLastResponse($response); return $obj; } /** * @param array|null $params * @param array|string|null $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return CreditNote The voided credit note. */ public function voidCreditNote($params = null, $opts = null) { $url = $this->instanceUrl() . '/void'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } /** * @param string $id The ID of the credit note on which to retrieve the credit note line items. * @param array|null $params * @param array|string|null $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\Collection The list of credit note line items. */ public static function allLines($id, $params = null, $opts = null) { return self::_allNestedResources($id, static::PATH_LINES, $params, $opts); } }