Skip to content

Commit

Permalink
Merge pull request #28 from emailplatform/version1.2.3
Browse files Browse the repository at this point in the history
Version1.2.3
  • Loading branch information
emailplatform authored Mar 11, 2019
2 parents 4047f4f + 96ab451 commit 93efb94
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,27 @@ $listid = 23;
$mobileNumber = "20111222";
$mobilePrefix = "45";

$result = $parser->ResubscribeContact(listid, false, $mobileNumber, $mobilePrefix);
$result = $parser->ResubscribeContact($listid, false, $mobileNumber, $mobilePrefix);
```
<hr><br/>

## Changelog:

### _Differences between **v1.2.2** and **v1.2.3**_
#### Method definition changed:

* **ResubscribeContact**
> *Previous:*
> ```php
> public function ResubscribeContact($listid = false, $emailaddress = false, $mobileNumber = false, $mobilePrefix = false, $add_to_autoresponders = false)
>```
> *Now:*
> ```php
> public function ResubscribeContact($listid = false, $emailaddress = false, $mobileNumber = false, $mobilePrefix = false, $add_to_autoresponders = false, $contactFields = array())
>```
> * **Added:** $contactFields.
<hr><br/>
### _Differences between **v1.2.1** and **v1.2.2**_
#### New methods:
Expand Down
6 changes: 4 additions & 2 deletions src/ApiParser.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class ApiParser

var $settings = array ();


/** Production **/
var $URL = 'https://api.mailmailmail.net/v1.1';

Expand Down Expand Up @@ -455,7 +456,7 @@ public function AddSubscriberToList($listid = false, $emailaddress = false, $mob
return self::REQUEST_FAILED;
}

public function ResubscribeContact($listid = false, $emailaddress = false, $mobileNumber = false, $mobilePrefix = false, $add_to_autoresponders = false)
public function ResubscribeContact($listid = false, $emailaddress = false, $mobileNumber = false, $mobilePrefix = false, $add_to_autoresponders = false, $contactFields = array())
{
$url = $this->URL . '/Subscribers/ResubscribeContact';
if($listid && ($emailaddress || ($mobileNumber && $mobilePrefix)))
Expand All @@ -465,7 +466,8 @@ public function ResubscribeContact($listid = false, $emailaddress = false, $mobi
'emailaddress' => $emailaddress,
'mobileNumber' => $mobileNumber,
'mobilePrefix' => $mobilePrefix,
'add_to_autoresponders' => $add_to_autoresponders
'add_to_autoresponders' => $add_to_autoresponders,
'contactFields' => $contactFields
);
return $this->MakePostRequest($url, $params);
}
Expand Down

0 comments on commit 93efb94

Please sign in to comment.