public function create($account, $repo, $params = array())
    {
        // allow developer to directly specify params as json if (s)he wants.
        if ('array' !== gettype($params)) {
            if (empty($params)) {
                throw new \InvalidArgumentException('Invalid JSON provided.');
            }

            $params = $this->decodeJSON($params);
        }

        return $this->getClient()->setApiVersion('2.0')->post(
            sprintf('repositories/%s/%s/pipelines/', $account, $repo),
            json_encode($params),
            array('Content-Type' => 'application/json')
        );
    }