lib/Services/MandateImportsService.php
public function cancel($identity, $params = array())
    {
        $path = Util::subUrl(
            '/mandate_imports/:identity/actions/cancel',
            array(
                
                'identity' => $identity
            )
        );
        if(isset($params['params'])) { 
            $params['body'] = json_encode(array("data" => (object)$params['params']));
        
            unset($params['params']);
        }

        
        try {
            $response = $this->api_client->post($path, $params);
        } catch(InvalidStateException $e) {
            if ($e->isIdempotentCreationConflict()) {
                return $this->get($e->getConflictingResourceId());
            }

            throw $e;
        }
        

        return $this->getResourceForResponse($response);
    }
public function cancel($identity, $params = array())
    {
        $path = Util::subUrl(
            '/mandate_imports/:identity/actions/cancel',
            array(
                
                'identity' => $identity
            )
        );
        if(isset($params['params'])) { 
            $params['body'] = json_encode(array("data" => (object)$params['params']));
        
            unset($params['params']);
        }

        
        try {
            $response = $this->api_client->post($path, $params);
        } catch(InvalidStateException $e) {
            if ($e->isIdempotentCreationConflict()) {
                return $this->get($e->getConflictingResourceId());
            }

            throw $e;
        }
        

        return $this->getResourceForResponse($response);
    }
public function cancel ( $ identity , $ params = array ( ) ) { $ path = Util :: subUrl ( '/mandate_imports/:identity/actions/cancel' , array ( 'identity' => $ identity ) ) ; if ( isset ( $ params [ 'params' ] ) ) { $ params [ 'body' ] = json_encode ( array ( "data" => ( object ) $ params [ 'params' ] ) ) ; unset ( $ params [ 'params' ] ) ; } try { $ response = $ this -> api_client -> post ( $ path , $ params ) ; } catch ( InvalidStateException $ e ) { if ( $ e -> isIdempotentCreationConflict ( ) ) { return $ this -> get ( $ e -> getConflictingResourceId ( ) ) ; } throw $ e ; } return $ this -> getResourceForResponse ( $ response ) ; }
Cancel a mandate import

Example URL: /mandate_imports/:identity/actions/cancel

@param  string        $identity Unique identifier, beginning with "IM".
@param  string[mixed] $params   An associative array for any params
@return MandateImport
Cancel a mandate import