findforsikring / leadvalidator-clients
There is no license information available for the latest version (1.0.2) of this package.
Wrapper for Leadvalidator API
Package info
github.com/Findforsikring/LeadValidator-Clients
pkg:composer/findforsikring/leadvalidator-clients
1.0.2
2017-05-15 12:51 UTC
README
Installation
$ composer require findforsikring/leadvalidator-clients
Lead source usage
$client = new \LeadValidator\SourceClient("api token"); // List available campaigns $campaigns = $client->getCampaigns(); // Detailed campaign info $campaign = $client->getCampaign(12); /* * Post a lead * 1st parameter is campaign ID. * 2nd parameter must use keys defined in the campaign */ $success = $client->postLead(12, [ 'name' => 'Lead name', 'phone' => '12345678', 'email' => 'test@test.com' ]);
Lead customer usage
$client = new \LeadValidator\CustomerClient("api token"); /* * Get all new leads (not delivered yet) * Optionally limit by campaign or source * Optional pagination */ $leads = $client->getNewLeads(); /* * Get all leads from a period * Limit by creation-time or delivery-time * Optionally limit by campaign or source * Optional pagination */ $leads = $client->getLeadsFromPeriod();