Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
account.php
1<?
2
4
10
11abstract class Account extends Retargeting\Account
12{
21 abstract public function getExpenses($accountId, Date $dateFrom = null, Date $dateTo = null);
22
23
33 public function getExpensesReport($accountId, Date $dateFrom = null, Date $dateTo = null)
34 {
35 throw new NotImplementedException();
36 }
37
38
44 public function hasExpensesReport()
45 {
46 return false;
47 }
48
54 public function hasAccounts()
55 {
56 return true;
57 }
58
62 public function hasPublicPages()
63 {
64 return false;
65 }
66
73 abstract public function updateAnalyticParams($accountId, array $params, array $publicPageIds = []);
74
81 public function getPublicPages($accountId)
82 {
83 return new Result();
84 }
85
96 public function manageAdKeyword($accountId, $groupId, $id, $active = true)
97 {
98 if (!$this->hasExpensesReport())
99 {
100 throw new NotSupportedException('Not supported.');
101 }
102
103 $response = $this->getRequest()->send([
104 'methodName' => 'analytics.keyword.manage',
105 'parameters' => [
106 'accountId' => $accountId,
107 'groupId' => $groupId,
108 'id' => $id,
109 'active' => $active ? 1 : 0,
110 ]
111 ]);
112
113 return $response;
114 }
115
125 public function manageAdGroup($accountId, $id, $active = true)
126 {
127 if (!$this->hasExpensesReport())
128 {
129 throw new NotSupportedException('Not supported.');
130 }
131
132 $response = $this->getRequest()->send([
133 'methodName' => 'analytics.group.manage',
134 'parameters' => [
135 'accountId' => $accountId,
136 'id' => $id,
137 'active' => $active ? 1 : 0,
138 ]
139 ]);
140
141 return $response;
142 }
143
153 public function manageAdCampaign($accountId, $id, $active = true)
154 {
155 if (!$this->hasExpensesReport())
156 {
157 throw new NotSupportedException('Not supported.');
158 }
159
160 $response = $this->getRequest()->send([
161 'methodName' => 'analytics.campaign.manage',
162 'parameters' => [
163 'accountId' => $accountId,
164 'id' => $id,
165 'active' => $active ? 1 : 0,
166 ]
167 ]);
168
169 return $response;
170 }
171}
updateAnalyticParams($accountId, array $params, array $publicPageIds=[])
getExpensesReport($accountId, Date $dateFrom=null, Date $dateTo=null)
Definition account.php:33
manageAdGroup($accountId, $id, $active=true)
Definition account.php:125
manageAdCampaign($accountId, $id, $active=true)
Definition account.php:153
manageAdKeyword($accountId, $groupId, $id, $active=true)
Definition account.php:96
getExpenses($accountId, Date $dateFrom=null, Date $dateTo=null)