src/Yandex/Metrica/Management/GrantsClient.php
public function addGrant($counterId, Models\Grant $grant)
    {
        $resource = 'counter/' . $counterId . '/grants';
        $response = $this->sendPostRequest($resource, ["grant" => $grant->toArray()]);
        $grantResponse = new Models\AddGrantResponse($response);
        return $grantResponse->getGrant();
    }
public function addGrant($counterId, Models\Grant $grant)
    {
        $resource = 'counter/' . $counterId . '/grants';
        $response = $this->sendPostRequest($resource, ["grant" => $grant->toArray()]);
        $grantResponse = new Models\AddGrantResponse($response);
        return $grantResponse->getGrant();
    }
public function addGrant ( $ counterId , Models \ Grant $ grant ) { $ resource = 'counter/' . $ counterId . '/grants' ; $ response = $ this -> sendPostRequest ( $ resource , [ "grant" => $ grant -> toArray ( ) ] ) ; $ grantResponse = new Models \ AddGrantResponse ( $ response ) ; return $ grantResponse -> getGrant ( ) ; }
Add grant to counter

@see http://api.yandex.ru/metrika/doc/beta/management/grants/addgrant.xml

@param int $counterId
@param Models\Grant $grant
@return Models\Grant
Add grant to counter