public function pauseWorkflow()
    {
        try {
            $this->connection()->post($this->endpoint . '/' . $this->id . '/pause', json_encode([]));
        } catch (ApiException $exception) {
            if (strpos($exception->getMessage(), 'The sales_invoice is already paused') !== false) {
                return true; // Everything is fine since the sales invoice was already paused we don't need an error.
            }

            throw $exception;
        }

        return true;
    }
public function pauseWorkflow()
    {
        try {
            $this->connection()->post($this->endpoint . '/' . $this->id . '/pause', json_encode([]));
        } catch (ApiException $exception) {
            if (strpos($exception->getMessage(), 'The sales_invoice is already paused') !== false) {
                return true; // Everything is fine since the sales invoice was already paused we don't need an error.
            }

            throw $exception;
        }

        return true;
    }
public function pauseWorkflow ( ) { try { $ this -> connection ( ) -> post ( $ this -> endpoint . '/' . $ this -> id . '/pause' , json_encode ( [ ] ) ) ; } catch ( ApiException $ exception ) { if ( strpos ( $ exception -> getMessage ( ) , 'The sales_invoice is already paused' ) !== false ) { return true ; // Everything is fine since the sales invoice was already paused we don't need an error. } throw $ exception ; } return true ; }
Pauses the sales invoice. The automatic workflow steps will not be executed while the sales invoice is paused.

@return bool

@throws \Picqer\Financials\Moneybird\Exceptions\ApiException
Pauses the sales invoice . The automatic workflow steps will not be executed while the sales invoice is paused .