2017 © Pedro Peláez
 

library closeio-api-wrapper

A PHP wrapper for the Close.io Api

image

loopline-systems/closeio-api-wrapper

A PHP wrapper for the Close.io Api

  • Tuesday, June 19, 2018
  • by marco.rossdeutscher
  • Repository
  • 12 Watchers
  • 10 Stars
  • 13,993 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 10 Forks
  • 10 Open issues
  • 25 Versions
  • 12 % Grown

The README.md

closeio-api-wrapper

PHP Wrapper to use the Close.io API, (*1)

License Build Status Coverage Status, (*2)

Packagist Packagist Packagist Packagist, (*3)

Installation and Configuration

Require via Composer
, (*4)

composer require loopline-systems/closeio-api-wrapper

Usage

// you can optionally pass in close.io api endpoint as init argument (it defaults to 'https://app.close.io/api/v1')
$closeIoConfig = new CloseIoConfig();
$closeIoConfig->setApiKey('yourApiKey');

$closeIoApiWrapper = new CloseIoApiWrapper($closeIoConfig);
$leadsApi = $closeIoApiWrapper->getLeadApi();

// create lead
$lead = new Lead();
$lead->setName('Test Company');
$lead->setDescription('Company description');
$lead->setUrl('www.test-company.com');

// address
$address = new Address();
$address->setCountry('DE');
$address->setCity('Berlin');
$address->setAddress1('Main Street');
$address->setAddress2('Mitte');

// contacts
$contact = new Contact();
$contact->setName('Testy Testersson');
$contact->setTitle('Chief Tester');

// emails
$email = new Email();
$email->setEmail('testy-testersson@test-company.com');
$email->setType(Email::EMAIL_TYPE_OFFICE);
$contact->addEmail($email);

// phones
$phone = new Phone();
$phone->setPhone('+491234567890');
$phone->setType(Phone::PHONE_TYPE_MOBILE);
$contact->addPhone($phone);

$lead->addAddress($address);
$lead->addContact($contact);

$response = $leadsApi->addLead($lead);

Adding Opportunities

$opportunity = new Opportunity();
$opportunity->setValue(500);
$opportunity->setNote('My note on this opportunity');
$opportunity->setConfidence(85);
$opportunity->setValuePeriod(Opportunity::OPPORTUNITY_FREQUENCY_MONTHLY);

// you can use the leadApi to get ID for leads
$opportunity->setLeadId(<lead-id>);

$opportunityApi = $this->apiWrapper->getOpportunityApi();
$result = $opportunityApi->addOpportunity($opportunity);

Activities

$activityApi = $this->apiWrapper->getActivityApi();
// SMS
$sms = new SmsActivity();
$sms->setLocalPhone('12345');
$sms->setRemotePhone('23456');
$sms->setText('first sms');
$sms->setStatus(SmsActivity::STATUS_SCHEDULED);

$activityApi->addSms($sms);
// EMails
$email = new EmailActivity();
$email->setStatus(EmailActivity::STATUS_INBOX);
$email->setSubject('RE: Support');
$email->setSender('Support <support@nowhere.net>');
$email->setTo('Customer <customer@nowhere.net>');

$activityApi->addEmail($sms);

Updating custom fields

$customField = new CustomField();
$customField->setId('Custom field id')
$customField->addChoice('Value for choices list');

$customFieldApi = $this->apiWrapper->getCustomFieldApi();
$result = $customFieldApi->updateCustomField($customField);

Info

Right now just a few request are implemented, because the main need was to create leads. Feel free to add requests and create pull requests or go on forking the repo., (*5)

We use https://github.com/btford/adj-noun for our release names, so don`t worry they have no special meaning :), (*6)

Requirements

PHP 5.6.0 or above, (*7)

Authors

Michael Devery - michaeldevery@gmail.com
Marco Roßdeutscher - marco.rossdeutscher@loopline-systems.com
Marc Zahn - marc.zahn@loopline-systems.com
, (*8)

See also the list of contributors who participated in this project., (*9)

License

The Close.io API Wrapper is licensed under the MIT License - see the LICENSE file for details
! We are not affiliated with Close.io itself., (*10)

The Versions

19/06 2018

dev-develop

dev-develop

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher
by Marc Zahn

closeio php wrapper

22/05 2018

dev-feature/TECH-array-short-syntax

dev-feature/TECH-array-short-syntax

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher
by Marc Zahn

closeio php wrapper

22/05 2018

dev-feature/74-remove-console-application-used-for-test

dev-feature/74-remove-console-application-used-for-test

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher
by Marc Zahn

closeio php wrapper

22/05 2018

dev-feature/TECH-test-refactoring

dev-feature/TECH-test-refactoring

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher
by Marc Zahn

closeio php wrapper

21/05 2018

dev-feature/TECH-hide-unrequired-methods

dev-feature/TECH-hide-unrequired-methods

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher
by Marc Zahn

closeio php wrapper

18/05 2018

dev-feature/TECH-remove-unrequired-gitignored-files

dev-feature/TECH-remove-unrequired-gitignored-files

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher
by Marc Zahn

closeio php wrapper

18/05 2018

dev-feature/TECH-remove-unrequired-inclusion

dev-feature/TECH-remove-unrequired-inclusion

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher
by Marc Zahn

closeio php wrapper

18/05 2018

dev-feature/TECH-license-and-minor-changes

dev-feature/TECH-license-and-minor-changes

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher
by Marc Zahn

closeio php wrapper

18/05 2018

dev-feature/add-some-more-tests

dev-feature/add-some-more-tests

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher
by Marc Zahn

closeio php wrapper

28/04 2018

dev-pr/67

dev-pr/67

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher
by Marc Zahn

closeio php wrapper

21/04 2018

dev-feature/45-test-on-windows-using-appveyor

dev-feature/45-test-on-windows-using-appveyor

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher
by Marc Zahn

closeio php wrapper

04/04 2018

dev-feature/remove_organization_from_invalid_properties

dev-feature/remove_organization_from_invalid_properties

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher
by Marc Zahn

closeio php wrapper

18/11 2017

dev-master

9999999-dev

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher
by Marc Zahn

closeio php wrapper

18/11 2017

v0.6.0

0.6.0.0

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher
by Marc Zahn

closeio php wrapper

08/11 2017

v0.5.0

0.5.0.0

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher
by Marc Zahn

closeio php wrapper

14/10 2016

v0.4.0

0.4.0.0

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher
by Marc Zahn

closeio php wrapper

24/05 2016

v0.3.3

0.3.3.0

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher

closeio php wrapper

21/04 2016

v0.3.2

0.3.2.0

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher

closeio php wrapper

15/04 2016

v0.3.1

0.3.1.0

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher

closeio php wrapper

24/03 2016

v0.3.0

0.3.0.0

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher

closeio php wrapper

08/03 2016

v0.2.0

0.2.0.0

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher

closeio php wrapper

11/01 2016

v0.1.1

0.1.1.0

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher

closeio php wrapper

19/01 2015

v0.1.0

0.1.0.0

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher

closeio php wrapper

09/12 2014

v0.0.2

0.0.2.0

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher

closeio php wrapper

09/12 2014

0.0.1

0.0.1.0

A PHP wrapper for the Close.io Api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Devery
by Marco Roßdeutscher

closeio php wrapper