hasExpensesReport()) { throw new NotSupportedException('Not supported.'); } $response = $this->getRequest()->send([ 'methodName' => 'analytics.keyword.manage', 'parameters' => [ 'accountId' => $accountId, 'groupId' => $groupId, 'id' => $id, 'active' => $active ? 1 : 0, ] ]); return $response; } /** * Manage activity of ad group. * * @param string $accountId Account ID. * @param string $id ID. * @param bool $active Active. * @return Result * @throws NotImplementedException */ public function manageAdGroup($accountId, $id, $active = true) { if (!$this->hasExpensesReport()) { throw new NotSupportedException('Not supported.'); } $response = $this->getRequest()->send([ 'methodName' => 'analytics.group.manage', 'parameters' => [ 'accountId' => $accountId, 'id' => $id, 'active' => $active ? 1 : 0, ] ]); return $response; } /** * Manage activity of campaign. * * @param string $accountId Account ID. * @param string $id ID. * @param bool $active Active. * @return Result * @throws NotImplementedException */ public function manageAdCampaign($accountId, $id, $active = true) { if (!$this->hasExpensesReport()) { throw new NotSupportedException('Not supported.'); } $response = $this->getRequest()->send([ 'methodName' => 'analytics.campaign.manage', 'parameters' => [ 'accountId' => $accountId, 'id' => $id, 'active' => $active ? 1 : 0, ] ]); return $response; } }