/** * Executes the prepared request and returns * the Response object on success. * * @return The request's response. * * @throws \plenigo\PlenigoException on request error. */ public function execute() { try { $response = parent::execute(); } catch (\Exception $exc) { throw new PlenigoException('Product Service execution failed!', $exc->getCode(), $exc); } return $response; }
/** * The constructor for the TokenService instance. * * @param RestClient $request The RestClient request to execute. * @param string $csrfToken The CSRF Token to use for the request. * * @return TokenService instance. */ public function __construct($request, $csrfToken = null) { parent::__construct($request); $this->csrfToken = $csrfToken; }