client/jsonapi/src/Client/JsonApi/Subscription/Standard.php
public function delete( ServerRequestInterface $request, ResponseInterface $response )
	{
		$view = $this->getView();

		try
		{
			$cntl = \Aimeos\Controller\Frontend::create( $this->getContext(), 'subscription' );

			$view->items = $cntl->cancel( $view->param( 'id' ) );
			$view->total = 1;

			$status = 200;
		}
		catch( \Aimeos\Controller\Frontend\Exception $e )
		{
			$status = 403;
			$view->errors = $this->getErrorDetails( $e, 'controller/frontend' );
		}
		catch( \Aimeos\MShop\Exception $e )
		{
			$status = 404;
			$view->errors = $this->getErrorDetails( $e, 'mshop' );
		}
		catch( \Exception $e )
		{
			$status = 500;
			$view->errors = $this->getErrorDetails( $e );
		}

		return $this->render( $response, $view, $status );
	}
public function delete( ServerRequestInterface $request, ResponseInterface $response )
	{
		$view = $this->getView();

		try
		{
			$cntl = \Aimeos\Controller\Frontend::create( $this->getContext(), 'subscription' );

			$view->items = $cntl->cancel( $view->param( 'id' ) );
			$view->total = 1;

			$status = 200;
		}
		catch( \Aimeos\Controller\Frontend\Exception $e )
		{
			$status = 403;
			$view->errors = $this->getErrorDetails( $e, 'controller/frontend' );
		}
		catch( \Aimeos\MShop\Exception $e )
		{
			$status = 404;
			$view->errors = $this->getErrorDetails( $e, 'mshop' );
		}
		catch( \Exception $e )
		{
			$status = 500;
			$view->errors = $this->getErrorDetails( $e );
		}

		return $this->render( $response, $view, $status );
	}
public function delete ( ServerRequestInterface $ request , ResponseInterface $ response ) { $ view = $ this -> getView ( ) ; try { $ cntl = \ Aimeos \ Controller \ Frontend :: create ( $ this -> getContext ( ) , 'subscription' ) ; $ view -> items = $ cntl -> cancel ( $ view -> param ( 'id' ) ) ; $ view -> total = 1 ; $ status = 200 ; } catch ( \ Aimeos \ Controller \ Frontend \ Exception $ e ) { $ status = 403 ; $ view -> errors = $ this -> getErrorDetails ( $ e , 'controller/frontend' ) ; } catch ( \ Aimeos \ MShop \ Exception $ e ) { $ status = 404 ; $ view -> errors = $ this -> getErrorDetails ( $ e , 'mshop' ) ; } catch ( \ Exception $ e ) { $ status = 500 ; $ view -> errors = $ this -> getErrorDetails ( $ e ) ; } return $ this -> render ( $ response , $ view , $ status ) ; }
Cancels the subscription

@param \Psr\Http\Message\ServerRequestInterface $request Request object
@param \Psr\Http\Message\ResponseInterface $response Response object
@return \Psr\Http\Message\ResponseInterface Modified response object
Cancels the subscription