2017 © Pedro Peláez
 

library leadclient

Client PHP to send Lead at Servicein/CloudCare

image

servicein/leadclient

Client PHP to send Lead at Servicein/CloudCare

  • Monday, February 5, 2018
  • by servicein
  • Repository
  • 3 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Lead Client

Lead Client is a PHP client that makes it easy to send Lead at Servicein/Cloudcare., (*1)

This library require an additional info for work, you must define three constants: - API_URL - API_KEY - DEFAULT_CAMPAIGN, (*2)

The constant value should be asked to the commercial department., (*3)

define("API_URL", "**asked to the commercial department**");
define("API_KEY", "**asked to the commercial department**");
define("DEFAULT_CAMPAIGN", "**asked to the commercial department**");
//define("PROXY", "tpc://xxx.xxx.xxx.xxx:3128");
$lead = new Lead();
$lead->setFirstname("Tester")
        ->setLastname("Tester")
        ->setMail("tester@test.com")
        ->setPhone("33333333333")
        ->setCity("Roma")
        ->setProvince("RM")
        ->setSex("M")
        ->setNote("Nota");
        # set other campaign 
        ->setCampaign("OTHER_CAMPAIGN") 
try{
    $leadClient = new Client($lead);
    $result = $leadClient->sendLead();
    if($result->isValid()){
        echo "Lead successfully loaded".PHP_EOL;
    }else{
        echo "Error: ".$result->message.PHP_EOL;
    }
} catch (Exception $ex) {
    echo $ex->getMessage().PHP_EOL;
}

Installing Lead Client

The recommended way to install Client is through Composer., (*4)

# Install Composer
curl -sS https://getcomposer.org/installer | php

Next, run the Composer command to install the latest stable version of Client:, (*5)

php composer.phar require servicein/leadclient

After installing, you need to require Composer's autoloader:, (*6)

require 'vendor/autoload.php';

You can then later update Client using composer:, (*7)

bash composer.phar update, (*8)

The Versions

05/02 2018

dev-master

9999999-dev

Client PHP to send Lead at Servicein/CloudCare

  Sources   Download

MIT

The Requires

 

by Corrado Ronci

16/01 2017

1.0.2

1.0.2.0

Client PHP to send Lead at Servicein/CloudCare

  Sources   Download

MIT

The Requires

 

by Corrado Ronci

16/01 2017

1.0.1

1.0.1.0

Client PHP to send Lead at Servicein/CloudCare

  Sources   Download

MIT

The Requires

 

by Corrado Ronci

13/01 2017

1.0

1.0.0.0

Client PHP to send Lead at Servicein/CloudCare

  Sources   Download

MIT

The Requires

 

by Corrado Ronci