Skip to content

zephia/pilot-api-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pilot API Client

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version Total Downloads License

A PHP Pilot CRM API Client

Installation

composer require zephia/pilot-api-client

Usage

Store

<?php

$config = [
    'app_key' => 'PILOT_APP_KEY',
    'debug' => true
];

$client = new Zephia\PilotApiClient\Client\PilotApiClient($config);

$lead_data = new \Zephia\PilotApiClient\Model\LeadData([
    'contact_type_id' => 1,
    'business_type_id' => 1,
    'suborigin_id' => "FFFF0000",
    'firstname' => 'John',
    'lastname' => 'Doe',
    'phone' => '+543512345678',
    'email' => '[email protected]'
]);

// or programatically
$lead_data = (new \Zephia\PilotApiClient\Model\LeadData())
    ->setContactTypeId(1)
    ->setBusinessTypeId(1)
    ->setSuboriginId("FFFF0000")
    ->setFirstname("John")
    ->setLastname("Doe")
    ->setPhone("+543512345678")
    ->setEmail("[email protected]");

$client->storeLead($lead_data);

// Returns API response object.