Get vendor

Returns vendor of Yandex.Market service matched specified params.

@see https://tech.yandex.ru/market/content-data/doc/dg/reference/vendor-match-docpage/

@param array $params

@return Models\ResponseVendorMatchGet
341241
public function getMatch($params = array())
    {
        $resource = 'vendor/match.json';
        $resource .= '?' . $this->buildQueryString($params);
        $response = $this->getServiceResponse($resource);

        $getVendorMatchResponse = new Models\ResponseVendorMatchGet($response);

        return $getVendorMatchResponse;
    }
201071
public function search($params)
    {
        $query = Item::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        $query->andFilterWhere([
            'id' => $this->id,
            'user_id' => $this->user_id,
            'parent_id' => $this->parent_id,
            'branch_id' => $this->branch_id,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
            'active' => $this->active,
        ]);

        $query->andFilterWhere(['like', 'parent_class', $this->parent_class])
            ->andFilterWhere(['like', 'content', $this->content]);

        return $dataProvider;
    }
583618
public function search($params)
    {
        $query = ProductType::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        $query->andFilterWhere([
            'id' => $this->id,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
            'created_by' => $this->created_by,
            'updated_by' => $this->updated_by,
        ]);

        $query->andFilterWhere(['like', 'name', $this->name])
            ->andFilterWhere(['like', 'slug', $this->slug]);

        return $dataProvider;
    }
638689
public function get(array $params = [])
    {
        $this->getLogger()->info('Getting list of Playlists');
        if (isset($params['embed']))
            $embed = ($params['embed'] != null) ? explode(',', $params['embed']) : [];

        $hydratedWidgets = [];
        $entries = [];

        $response = $this->doGet('/playlist', $params);
        foreach ($response as $item) {
            /** @var XiboPlaylist $playlist */
            $playlist = new XiboPlaylist($this->getEntityProvider());
            $playlist->hydrate($item);
            if (in_array('widgets', $embed) === true) {
                foreach ($playlist->widgets as $widget) {
                    /** @var XiboWidget $widgetObject */
                    $widgetObject = new XiboWidget($this->getEntityProvider());
                    $widgetObject->hydrate($widget);
                    $hydratedWidgets[] = $widgetObject;
                }
                $playlist->widgets = $hydratedWidgets;
            }
            $entries[] = clone $playlist;
        }

        return $entries;
    }
984232
protected function _getIndex(array $params) {
        $model = $this->_normalizeModelName($params['datatype']);
        $contentManager = $this->_getContentManager($model);
        $options = $this->_extractOptionsForFetch($params);
        if (instance($model)->isMultilingual()) {
            $options['joinMultilingualModel'] = true;
        }

        $records = $contentManager->fetch($options);
        $amount = count($records);
        $records = array($params['datatype'] => $records);
        if (isset($options['with'])) {
            $records = $this->_combineRecords($params['datatype'], $records, $options['with']);
        }
        return array(
            array(
                'success' => true,
                'result' => $records,
                'amount' => $amount,
                'total' => intval($contentManager->count($options))
            ),
            200
        );
    }
1308636
public function all(array $params = array())
    {
        $endpoint = '/admin/customers.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createCollection(Customer::class, $response['customers']);
    }
838347
public function get($params = null)
    {
        $curlHandle = $this->prepareGet($params);
        return $this->curlGetResponse($curlHandle);
    }
567629
public static function get(array $params = [])
    {
        if (empty(self::$singleton)) {
            self::$singleton = static::create($params);
        }

        return self::$singleton;
    }
437014
public function search($params)
    {
        $query = Project::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        $query->andFilterWhere([
            'id' => $this->id,
            'status' => $this->status,
            'created' => $this->created,
            'responsible_user' => $this->responsible_user,
        ]);

        $query->andFilterWhere(['like', 'name', $this->name])
            ->andFilterWhere(['like', 'description', $this->description]);

        return $dataProvider;
    }
936556
public function sale($params)
	{
		$requestParams = $this->initRequestParams('sale', $params);
		$this->request('sale', $requestParams);

		return empty($this->error);
	}
122514
public function get($params) {
		$curl = curl_init();
		$header[] = "key: $this->api_key";
		$query = http_build_query($params);
		curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
		curl_setopt($curl, CURLOPT_URL, $this->api_url . "/" . $this->endpoint . "?" . $query);
		curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
		curl_setopt($curl, CURLOPT_ENCODING, "");
		curl_setopt($curl, CURLOPT_MAXREDIRS, 10);
		curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
		curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "GET");
		curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
		curl_setopt($curl, CURLOPT_TIMEOUT, 30);
		$request = curl_exec($curl);
		$return = ($request === FALSE) ? curl_error($curl) : $request;
		curl_close($curl);
		return $return;
	}
140896
public function search($params)
    {
        $dataProvider = parent::search($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $dataProvider->query->andWhere(['IS NOT', Seo::tableName() . '.item_id', null])
            ->andFilterWhere([
                Seo::tableName() . '.modelName' => $this->modelName,
                Seo::tableName() . '.item_id' => $this->item_id,
            ]);
        return $dataProvider;
    }
207653
public function search(array $params = array())
    {
        $endpoint = '/admin/customers/search.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createCollection(Customer::class, $response['customers']);
    }
1275112
public function search($params)
    {
        $query = QueueManager::find()->orderBy('id desc');

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        if (!($this->load($params) && $this->validate())) {
            return $dataProvider;
        }

        $query->andFilterWhere([
            'id' => $this->id,
            'ttr' => $this->ttr,
            'delay' => $this->delay,
            'priority' => $this->priority,
            'result_id' => $this->result_id,
//            'created_at' => $this->created_at,
//            'updated_at' => $this->updated_at,
            'start_execute' => $this->start_execute,
            'end_execute' => $this->end_execute,
        ]);

        $this->dayCondition($query, 'created_at');
        $this->dayCondition($query, 'updated_at');

        $query->andFilterWhere(['like', 'name', $this->name])
            ->andFilterWhere(['like', 'sender', $this->sender])
            ->andFilterWhere(['like', 'status', $this->status])
            ->andFilterWhere(['like', 'class', $this->class])
            ->andFilterWhere(['like', 'properties', $this->properties])
            ->andFilterWhere(['like', 'data', $this->data])
            ->andFilterWhere(['like', 'result', $this->result]);


        return $dataProvider;
    }
410278
public function search($params)
    {
        $query = Media::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        $query->andFilterWhere([
            'id' => $this->id,
            'material' => $this->material,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
        ]);

        $query->andFilterWhere(['like', 'mediaId', $this->mediaId])
            ->andFilterWhere(['like', 'post', $this->post])
            ->andFilterWhere(['like', 'result', $this->result])
            ->andFilterWhere(['like', 'type', $this->type]);

        return $dataProvider;
    }
861486
public function getList($params = array())
    {
        $resource = 'category.json';
        $resource .= '?' . $this->buildQueryString($params);
        $response = $this->getServiceResponse($resource);

        $getCategoriesResponse = new Models\ResponseCategoryGetList($response);

        return $getCategoriesResponse;
    }
666469
public function search($params)
    {
        $query = WarehouseVoucher::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        $query->andFilterWhere([
            'id' => $this->id,
            'warehouse_id' => $this->warehouse_id,
            'employee_id' => $this->employee_id,
            'supplier_id' => $this->supplier_id,
            'date' => $this->date,
            'supplier_total_price' => $this->supplier_total_price,
            'total_price' => $this->total_price,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
            'created_by' => $this->created_by,
            'updated_by' => $this->updated_by,
        ]);

        $query->andFilterWhere(['like', 'name', $this->name])
            ->andFilterWhere(['like', 'note', $this->note])
            ->andFilterWhere(['like', 'is_locked', $this->is_locked])
            ->andFilterWhere(['like', 'status', $this->status])
            ->andFilterWhere(['like', 'type', $this->type])
            ->andFilterWhere(['like', 'attachments', $this->attachments]);

        return $dataProvider;
    }