Call to undefined method Infusionsoft\Api\Rest\ContactService::addWithDupCheck()

319 Views Asked by At

This was working all this while with no issues and updates.

$user_id = $infusionsoft->contacts->addWithDupCheck($contact, 'Email');

Now all of a sudden it isn't

PHP Fatal error: Uncaught Error: Call to undefined method Infusionsoft\Api\Rest\ContactService::addWithDupCheck() in /home/user/public_html/infusionsoft/addContact.cli.php:29

~/public_html/infusionsoft$ cat composer.json
{
    "require": {
        "infusionsoft/php-sdk": "^1.0"
    }
}
1

There are 1 best solutions below

0
anjanesh On

InfusionSoft has replaced their older XML-RPC API with REST. REST is now default. So I had to do :
$user_id = $infusionsoft->contacts('xml')->addWithDupCheck($contact, 'Email');