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;
    }