@param array $params

@throws \SphereMall\MS\Exceptions\EntityNotFoundException
551801
public function update(array $params = [])
    {
        $params = array_intersect_key(
            $params,
            array_flip([
                'statusId',
                'orderId',
                'paymentStatusId',
                'additionalInfo',
                'paymentStatusDescription'
            ])
        );

        //Update current order with params
        $order = $this->client
            ->orders($this->client->getVersion())
            ->update($this->getId(), $params);

        //Get order by current orderId with items
        $orderWithItems = $this->client->orders($this->client->getVersion())->byId($this->getId());
        $order->items = $orderWithItems->items;

        //Set data to current order
        $this->setOrderData($order);
    }
1239721
protected function setParams($params)
    {
        $this->params = $this->default_params;
        foreach ($params as $name => $value) {
            $method = 'set' . str_replace(' ', '', ucwords(str_replace('_', ' ', strtolower($name))));
            if (!method_exists($this, $method)) {
                throw new Exception\InvalidArgumentException(__METHOD__ . " Parameter '$name' does not exists.");
            }
            $this->$method($value);
        }
    }
1276598
private function formatSqlByParams(array $params)
    {
        if (empty($params)) {
            return;
        }
        foreach ($params as $key => $value) {
            $this->sql .= " $key=" . $value;
        }
    }
1164309
public function map(array $params)
	{
		if (!isset($params['ientifier'])) {
			throw new MissingArgumentException('identifier');
		}

		if (!isset($params['primaryKey'])) {
			throw new MissingArgumentException('primaryKey');
		}

		if (!isset($params['format'])) {
			$params['format'] = 'json';
		}

		return $this->post('map', $params);
	}
1069814
public function configureEvent(array $params = []) : void
    {
        $params = array_merge($this->defaultParams, $params);
        foreach ($params as $name => $value) {
            $method = 'set' . ucfirst((string)$name);
            if (method_exists($this, $method) && is_callable([$this, $method])) {
                $this->$method($value);
            }
        }
    }
894960
public function setQueryParams(array $params)
    {
        $uri = $this->guzzleRequest->getUri()->withQuery(\GuzzleHttp\Psr7\build_query($params));
        $this->guzzleRequest = $this->guzzleRequest->withUri($uri);
    }
1344095
public function params($params) {

		if(false === is_array($params)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($data)), E_USER_ERROR);
		}

		$this -> params = $params;

		return $this;
	}
1232064
private function load(array $entities, callable $queryBuilderCallback = null)
    {
        foreach ($entities as $key => $entity) {
            $hash = spl_object_hash($entity);

            if (!empty($queryBuilderCallback)) {
                /** @var callable|object $queryBuilderCallback */
                $hash .= spl_object_hash($queryBuilderCallback);
            }
            if (isset($this->processedHashes[$hash])) {
                unset($entities[$key]);

                continue;
            }

            $this->processedHashes[$hash] = true;

            $entityClass = ClassUtils::getClass($entity);

            if (!$this->customObjectsLoadable($entityClass)) {
                $message = sprintf(
                    'Class "%s" must be annotated with "%s" annotation in order to load custom objects.',
                    $entityClass,
                    CustomObject::class
                );

                throw new CustomObjectException($message);
            }
        }

        $customEntitiesMap = $this->buildCustomEntitiesMap($entities);

        $queriesMap = $this->buildQueriesMap($customEntitiesMap);

        $customEntities = $this->fetchCustomEntities($queriesMap, $queryBuilderCallback);

        $this->setCustomEntities($entities, $customEntities, $customEntitiesMap);
    }
506889
protected function setParams(array $params) {
		parent::setParams($params);
		$ref = $this->relative ? str_replace('(%s)://', '(?:(%s)://)?', $this->ref) : $this->ref;
		$this->ref = sprintf($ref, implode('|', $this->protocols));
	}
882932
public function findOneBy (array $params)
    {
        $entity = $this->er->findOneBy($params);

        if (NULL == $entity) {
            return NULL;
        }

        return $this->getModel($entity);
    }
1260808
public function bind(array $params)
    {
        foreach ($params as $key => $value) {
            $this->addParam($value, $key);
        }
        return $this;
    }
726073
public function setParams(array $params = [])
    {

        //Process Params
        $params = $this->processParams($params);

        //Set the params
        $this->params = $params;

        return $this;
    }
897493
private static function transferParams($params): array
    {
        $newParams = [];
        foreach ($params as $key => $value) {
            list($nkey, $nvalue) = EntityHelper::transferParameter($key, $value, null);
            $newParams[$nkey] = $nvalue;
        }

        return $newParams;
    }
1227764
public function setAppDefinedData(array $params)
    {
        $items = [];
        foreach ($params as $key => $value) {
            $items[] = ['Tag' => $key, 'Value' => $value];
        }
        $this->items['AppDefinedData'] = $items;
        return $this;
    }
10321
public function bind($params = null)
    {

        if (is_array($params)) {
            foreach ($params as $k => $v) {
                $this->bindParam($k, $v);
            }
        }

        return $this;
    }
930026
public function setParams($params)
    {
        if (!is_array($params) && !is_object($params)) {
            throw new Exception\InvalidArgumentException(
                sprintf('Event parameters must be an array or object; received "%s"', gettype($params))
            );
        }

        foreach ($params as $name => $value) {
            $this->setParam($name, $value);
        }

        return $this;
    }
232903
private function extractFields(array $params)
    {
        if (false === $this->issetNotEmpty(self::PARAM_FIELDSETS, $params)) {
            return $this;
        }
        $fields = $params[self::PARAM_FIELDSETS];
        if (!is_array($fields)) {
            throw RestException::invalidQueryParam(self::PARAM_FIELDSETS, 'The field parameter must be an array of entity type keys to fields.');
        }
        foreach ($fields as $entityType => $string) {
            $this->fields[$entityType] = explode(',', $string);
        }
        return $this;
    }