Skip to content

Commit

Permalink
Businesses service added
Browse files Browse the repository at this point in the history
Dmitry Gladyshev committed Jul 26, 2020
1 parent a1e1dad commit 0678d0c
Showing 3 changed files with 49 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
3.1.2 - Businesses service

3.1.1 - Fix scrutinizer reflection issue

3.1.0 - Improve params mapping
46 changes: 46 additions & 0 deletions src/Service/Businesses.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php
/**
* @author Dmitry Gladyshev <deel@email.ru>
* @date 26/08/20120 21:16
*/

namespace Yandex\Direct\Service;

use Yandex\Direct\Service;
use function Yandex\Direct\get_param_names;

/**
* Class Businesses
*
* @author Dmitry Gladyshev <gladyshevd@icloud.com>
*
* @see https://yandex.ru/dev/direct/doc/ref-v5/businesses/businesses-docpage/
*/
final class Businesses extends Service
{
/**
* @param array $SelectionCriteria
* @param array $FieldNames
* @param array $Page
*
* @return array|\DOMDocument
*
* @throws \ReflectionException
* @throws \Yandex\Direct\Exception\ErrorResponseException
* @throws \Yandex\Direct\Exception\Exception
*
* @see https://yandex.ru/dev/direct/doc/ref-v5/businesses/get-docpage/
*/
public function get(
$SelectionCriteria,
$FieldNames,
$Page = null
) {
$params = compact(get_param_names(__METHOD__));

return $this->request([
'method' => 'get',
'params' => $params
]);
}
}
1 change: 1 addition & 0 deletions tests/Helper.php
Original file line number Diff line number Diff line change
@@ -60,6 +60,7 @@ public static function getServicesDataset()
['AudienceTargets'],
['BidModifiers'],
['Bids'],
['Businesses'],
['Campaigns'],
['Changes'],
['Clients'],

0 comments on commit 0678d0c

Please sign in to comment.