Skip to content

Instantly share code, notes, and snippets.

@DeRain
Created August 3, 2016 13:19
Show Gist options
  • Save DeRain/3efd5f74dcd6afb144ada2b7448f19e1 to your computer and use it in GitHub Desktop.
Save DeRain/3efd5f74dcd6afb144ada2b7448f19e1 to your computer and use it in GitHub Desktop.
<?php
include_once __DIR__ . '/vendor/autoload.php';
$main = new \DeRain\Primodialer\Api\Main([
'apiUrl' => 'http://ocere.avatardialler.com/adminpanel/api.php',
'username' => 'admin',
'password' => 'dLzo4pny'
]);
$method = new \DeRain\Primodialer\Api\Methods\AddLead();
$model = new \DeRain\Primodialer\Api\Models\Lead();
$model->setListId('999');
$model->setPhoneCode('44');
$model->setPhoneNumber('4245155');
$model->setAddress1('SASDf asdf');
$model->setFirstName('sdf asdf');
$model->setCity('CITY');
$model->setCountryCode('UK');
$model->setDuplicateCheck('DUPLIST');
$response = $main->makeRequest($method, $model);
var_dump($response->getMessage());
var_dump($response->hasError());
var_dump($response->hasNotice());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment