1 | <?php |
||
16 | class Campaign extends Analytics |
||
17 | { |
||
18 | const RESOURCE_COLLECTION = 'accounts/{account_id}/campaigns'; |
||
19 | const RESOURCE = 'accounts/{account_id}/campaigns/{id}'; |
||
20 | const ENTITY = 'CAMPAIGN'; |
||
21 | |||
22 | /** Read Only */ |
||
23 | protected $id; |
||
24 | protected $reasons_not_servable; |
||
25 | protected $servable; |
||
26 | protected $created_at; |
||
27 | protected $updated_at; |
||
28 | protected $deleted; |
||
29 | protected $currency; |
||
30 | |||
31 | protected $properties = [ |
||
32 | CampaignFields::NAME, |
||
33 | CampaignFields::FUNDING_INSTRUMENT_ID, |
||
34 | CampaignFields::START_TIME, |
||
35 | CampaignFields::END_TIME, |
||
36 | CampaignFields::ENTITY_STATUS, |
||
37 | CampaignFields::STANDARD_DELIVERY, |
||
38 | CampaignFields::DAILY_BUDGET_AMOUNT_LOCAL_MICRO, |
||
39 | CampaignFields::TOTAL_BUDGET_AMOUNT_LOCAL_MICRO, |
||
40 | CampaignFields::DURATION_IN_DAYS, |
||
41 | CampaignFields::FREQUENCY_CAP, |
||
42 | ]; |
||
43 | |||
44 | /** Writable */ |
||
45 | protected $name; |
||
46 | protected $funding_instrument_id; |
||
47 | protected $start_time; |
||
48 | protected $end_time; |
||
49 | protected $entity_status; |
||
50 | protected $standard_delivery; |
||
51 | protected $daily_budget_amount_local_micro; |
||
52 | protected $total_budget_amount_local_micro; |
||
53 | protected $duration_in_days; |
||
54 | protected $frequency_cap; |
||
55 | |||
56 | /** |
||
57 | * @param array $params |
||
58 | * @return Cursor|Resource |
||
59 | * @throws BadRequest |
||
60 | * @throws \Hborras\TwitterAdsSDK\TwitterAdsException |
||
61 | * @throws \Hborras\TwitterAdsSDK\TwitterAds\Errors\Forbidden |
||
62 | * @throws \Hborras\TwitterAdsSDK\TwitterAds\Errors\NotAuthorized |
||
63 | * @throws \Hborras\TwitterAdsSDK\TwitterAds\Errors\NotFound |
||
64 | * @throws \Hborras\TwitterAdsSDK\TwitterAds\Errors\RateLimit |
||
65 | * @throws \Hborras\TwitterAdsSDK\TwitterAds\Errors\ServerError |
||
66 | * @throws \Hborras\TwitterAdsSDK\TwitterAds\Errors\ServiceUnavailable |
||
67 | */ |
||
68 | public function getLineItems($params = []) |
||
74 | |||
75 | /** |
||
76 | * @param $metricGroups |
||
77 | * @param array $params |
||
78 | * @param bool $async |
||
79 | * @return mixed |
||
80 | * @throws BadRequest |
||
81 | * @throws \Hborras\TwitterAdsSDK\TwitterAdsException |
||
82 | * @throws \Hborras\TwitterAdsSDK\TwitterAds\Errors\Forbidden |
||
83 | * @throws \Hborras\TwitterAdsSDK\TwitterAds\Errors\NotAuthorized |
||
84 | * @throws \Hborras\TwitterAdsSDK\TwitterAds\Errors\NotFound |
||
85 | * @throws \Hborras\TwitterAdsSDK\TwitterAds\Errors\RateLimit |
||
86 | * @throws \Hborras\TwitterAdsSDK\TwitterAds\Errors\ServerError |
||
87 | * @throws \Hborras\TwitterAdsSDK\TwitterAds\Errors\ServiceUnavailable |
||
88 | */ |
||
89 | public function stats($metricGroups, $params = [], $async = false) |
||
94 | |||
95 | /** |
||
96 | * @return mixed |
||
97 | */ |
||
98 | public function getId() |
||
102 | |||
103 | /** |
||
104 | * @return mixed |
||
105 | */ |
||
106 | public function getReasonsNotServable() |
||
110 | |||
111 | /** |
||
112 | * @return mixed |
||
113 | */ |
||
114 | public function getServable() |
||
118 | |||
119 | /** |
||
120 | * @return DateTime |
||
121 | */ |
||
122 | public function getCreatedAt() |
||
126 | |||
127 | /** |
||
128 | * @return mixed |
||
129 | */ |
||
130 | public function getUpdatedAt() |
||
134 | |||
135 | /** |
||
136 | * @return mixed |
||
137 | */ |
||
138 | public function getDeleted() |
||
142 | |||
143 | /** |
||
144 | * @return mixed |
||
145 | */ |
||
146 | public function getName() |
||
150 | |||
151 | /** |
||
152 | * @param mixed $name |
||
153 | */ |
||
154 | public function setName($name) |
||
158 | |||
159 | /** |
||
160 | * @return mixed |
||
161 | */ |
||
162 | public function getFundingInstrumentId() |
||
166 | |||
167 | /** |
||
168 | * @param mixed $funding_instrument_id |
||
169 | */ |
||
170 | public function setFundingInstrumentId($funding_instrument_id) |
||
174 | |||
175 | /** |
||
176 | * @return mixed |
||
177 | */ |
||
178 | public function getStartTime() |
||
182 | |||
183 | /** |
||
184 | * @param mixed $start_time |
||
185 | */ |
||
186 | public function setStartTime($start_time) |
||
190 | |||
191 | /** |
||
192 | * @return mixed |
||
193 | */ |
||
194 | public function getEndTime() |
||
198 | |||
199 | /** |
||
200 | * @param mixed $end_time |
||
201 | */ |
||
202 | public function setEndTime($end_time) |
||
206 | |||
207 | /** |
||
208 | * @return mixed |
||
209 | */ |
||
210 | public function getEntityStatus() |
||
214 | |||
215 | /** |
||
216 | * @param mixed $entityStatus |
||
217 | */ |
||
218 | public function setEntityStatus($entityStatus) |
||
222 | |||
223 | /** |
||
224 | * @return mixed |
||
225 | */ |
||
226 | public function getCurrency() |
||
230 | |||
231 | /** |
||
232 | * @param mixed $currency |
||
233 | */ |
||
234 | public function setCurrency($currency) |
||
238 | |||
239 | /** |
||
240 | * @return mixed |
||
241 | */ |
||
242 | public function getStandardDelivery() |
||
246 | |||
247 | /** |
||
248 | * @param mixed $standard_delivery |
||
249 | */ |
||
250 | public function setStandardDelivery($standard_delivery) |
||
254 | |||
255 | /** |
||
256 | * @return mixed |
||
257 | */ |
||
258 | public function getDailyBudgetAmountLocalMicro() |
||
262 | |||
263 | /** |
||
264 | * @param mixed $daily_budget_amount_local_micro |
||
265 | */ |
||
266 | public function setDailyBudgetAmountLocalMicro($daily_budget_amount_local_micro) |
||
270 | |||
271 | /** |
||
272 | * @return mixed |
||
273 | */ |
||
274 | public function getTotalBudgetAmountLocalMicro() |
||
278 | |||
279 | /** |
||
280 | * @param mixed $total_budget_amount_local_micro |
||
281 | */ |
||
282 | public function setTotalBudgetAmountLocalMicro($total_budget_amount_local_micro) |
||
286 | |||
287 | /** |
||
288 | * @param array $properties |
||
289 | */ |
||
290 | public function setProperties($properties) |
||
294 | |||
295 | /** |
||
296 | * @return mixed |
||
297 | */ |
||
298 | public function getDurationInDays() |
||
302 | |||
303 | /** |
||
304 | * @param mixed $duration_in_days |
||
305 | */ |
||
306 | public function setDurationInDays($duration_in_days) |
||
310 | |||
311 | /** |
||
312 | * @return mixed |
||
313 | */ |
||
314 | public function getFrequencyCap() |
||
318 | |||
319 | /** |
||
320 | * @param mixed $frequency_cap |
||
321 | */ |
||
322 | public function setFrequencyCap($frequency_cap) |
||
326 | } |
||
327 |