1 | <?php |
||
5 | class Campaigns extends Endpoint |
||
6 | { |
||
7 | const STATUS_FINISHED = 'finished'; |
||
8 | const DEFAULT_FIELDS = array("name", "amount", "subject", "html", "text", "list_unsubscribe", "send_date", "status", "user_list", "country", "utm_source", "utm_medium", "utm_term", "utm_content", "utm_campaign"); |
||
9 | |||
10 | /* |
||
11 | * Maximum number of returned campaigns. |
||
12 | * 0 means all campaigns with the indicated conditions |
||
13 | */ |
||
14 | const DEFAULT_LIMIT = 10; |
||
15 | |||
16 | /* |
||
17 | * Error messages |
||
18 | */ |
||
19 | const ERROR_NO_ID = 'no campaign id was provided'; |
||
20 | |||
21 | /* |
||
22 | * SoapClient $client |
||
23 | */ |
||
24 | private $client; |
||
25 | |||
26 | /* |
||
27 | * We can retrieve the Campaigns with or without Statistics. |
||
28 | * |
||
29 | * Add statistic extra info |
||
30 | * [0: none, 1: statistics, 2: statistics without unique values (faster)] |
||
31 | */ |
||
32 | private $withStatistics = 1; |
||
33 | |||
34 | public function __construct($client) |
||
39 | |||
40 | /** |
||
41 | * We get the List of Campaigns. |
||
42 | * |
||
43 | * @param $options |
||
44 | * @return array |
||
45 | */ |
||
46 | public function getList($options) |
||
102 | |||
103 | /** |
||
104 | * We get the List of Campaigns. |
||
105 | * |
||
106 | * @param $options |
||
107 | */ |
||
108 | public function getOne($options) |
||
128 | } |
||
129 |