forked from pionl/smart-emailing-v3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContactLists.php
42 lines (39 loc) · 1005 Bytes
/
ContactLists.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
namespace SmartEmailing\v3\Request\Import\Holder;
use SmartEmailing\v3\Models\AbstractMapHolder;
use SmartEmailing\v3\Request\Import\ContactList;
/**
* Class ContactLists
*
* @package SmartEmailing\v3\Request\Import\Holder
*/
class ContactLists extends AbstractMapHolder
{
/**
* Inserts contact list into the items. Unique items only.
*
* @param ContactList $list
*
* @return $this
*/
public function add(ContactList $list)
{
$this->insertEntry($list);
return $this;
}
/**
* Creates ContactList entry and inserts it to the array
*
* @param int $id
* @param string|null $status Contact's status in Contactlist. Allowed values: "confirmed", "unsubscribed",
* "removed"
*
* @return ContactList
*/
public function create($id, $status = null)
{
$list = new ContactList($id, $status);
$this->add($list);
return $list;
}
}