Skip to content

Commit

Permalink
Merge f206082 into d07cac1
Browse files Browse the repository at this point in the history
  • Loading branch information
enrike1983 committed Oct 14, 2019
2 parents d07cac1 + f206082 commit 88358e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,12 @@ To create a `MailingList` you can follow this example. Please, refer to the [Mai
use Fazland\MailUpRestClient\MailingList;

$email = "owner_of_the_list@email.com";
$list_name = "list_name";
$params = [
// your params...
];

$list = MailingList::create($context, $email, $params);
$list = MailingList::create($context, $list_name, $email, $params);
```

You can also obtain all the existing lists in your MailUp account by calling the static method `MailingList::getAll()`:
Expand Down
12 changes: 6 additions & 6 deletions lib/MailingList.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,13 +342,13 @@ public static function getAll(Context $context): array
* Creates a MailingList.
*
* @param Context $context
* @param string $name
* @param string $ownerEmail
* @param array $options
* @param string $listName
* @param string $ownerEmail
* @param array $options
*
* @return MailingList
*/
public static function create(Context $context, string $name, string $ownerEmail, array $options = []): self
public static function create(Context $context, string $listName, string $ownerEmail, array $options = []): self
{
$options = self::resolveCreateOptions($options);
$params = array_filter([
Expand Down Expand Up @@ -376,7 +376,7 @@ public static function create(Context $context, string $name, string $ownerEmail
'tracking' => $options['enable_tracking'],
'Customer' => $options['is_customers_list'],
'business' => $options['is_business_list'],
'Name' => $name,
'Name' => $listName,
'copyTemplate' => false,
'copyWebhooks' => false,
'idSettings' => '',
Expand All @@ -391,7 +391,7 @@ public static function create(Context $context, string $name, string $ownerEmail

$list = new self($context);
$list->id = $id;
$list->name = $name;
$list->name = $listName;

return $list;
}
Expand Down

0 comments on commit 88358e0

Please sign in to comment.