2017 © Pedro Peláez
 

library konnektive-api

A PHP implementation of the Konnektive CRM v2 API

image

fitboxmedia/konnektive-api

A PHP implementation of the Konnektive CRM v2 API

  • Tuesday, July 17, 2018
  • by progjp
  • Repository
  • 2 Watchers
  • 0 Stars
  • 50 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 21 Versions
  • 19 % Grown

The README.md

Konnektive CRM API Integration

Latest Stable Version Latest Unstable Version Total Downloads License, (*1)


What It Is

A simple API integration that allows developers to interact with Konnektive CRM's v2 API. All methods are implemented and fully validated as of September 24, 2018, (*2)

Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php, (*3)

Why Use This

When processing transactions and customer data through offers, marketers can benefit substantially from the use of a well tested and consistent 3rd party API integration., (*4)

Installation

Use composer require fitboxmedia/konnektive-api or add it manually to composer.json (See latest version in badges)., (*5)

Getting Started

Konnektive crm integration can be implemented easily by simply filling up one of the request classes and handing it off to the dispatcher for processing like so:, (*6)

use Konnektive\Dispatcher;

class OfferProcessor {
    public function addCustomerNote(){
        $dispatcher = new Dispatcher();
        /**
        * @var $request \Konnektive\Request\Customer\AddCustomerNoteRequest;
        */
        $request = new AddCustomerNoteRequest();
        $request->loginId = "SomeValidStringForID";
        $request->password = "SomeValidPassword";
        $request->customerId = "123123";
        $request->message = "TestMessage";
        /**
        * @var $response \Konnektive\Response\Response;
        */
        $response = $dispatcher->handle($request);
        if($response->isSuccessful()){
            //Do the thing.
        }
    }
}

Note: Custom handlers can be created and passed to Dispatcher during construction., (*7)

Custom Handlers

If you would like to use a custom handler for the dispatch of your request, you can create a new Handler class that implements the IHandler interface:, (*8)

use Konnektive\Contracts\IHandler;

class CustomHandler implements IHandler
{
    /**
    * @var $request \Konnektive\Request\Request
    * @return \Konnektive\Response\Response
    */
    public function handle(Request $request){
        //Handle that request
        return new Response(/* Some response data from cUrl */);
    }
}

The new CustomHandler can be passed into the dispatcher at construction or later:, (*9)

$dispatcher = new Dispatcher(new CustomHandler());
////
$dispatcher->setHandler(new CustomHandler());

Validation

All requests will be validated prior to executing the handler. All validation failures are provided through the \Illuminate\Validation\ValidationException. These exceptions are not caught and must be handled in your own code! Validation can also be done prior to dispatch by calling validate() on the request object:, (*10)

/**
* @var $request \Konnektive\Request\Customer\AddCustomerNoteRequest;
*/
$request = new AddCustomerNoteRequest();
$request->loginId = "SomeValidStringForID";
$request->message = "TestMessage";
try {
    $request->validate();
} catch(ValidationException $ex){
    //Fails for customerId and password
}

Requirements

  • PHP 7.0+

The Versions

17/07 2018

dev-master

9999999-dev

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rzavyalov

17/07 2018

1.9.3

1.9.3.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rzavyalov

04/05 2018

1.9.2

1.9.2.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rzavyalov

16/04 2018

1.9.1

1.9.1.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rzavyalov

28/03 2018

1.9

1.9.0.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rzavyalov

23/03 2018

1.8

1.8.0.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rzavyalov

23/03 2018

1.7

1.7.0.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rzavyalov

14/03 2018

1.6

1.6.0.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rzavyalov

12/03 2018

1.5

1.5.0.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rzavyalov

28/02 2018

1.3

1.3.0.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rzavyalov

28/02 2018

1.4

1.4.0.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rzavyalov

30/01 2018

1.1

1.1.0.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rzavyalov

09/10 2017

1.0

1.0.0.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rzavyalov

21/09 2017

0.7

0.7.0.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rzavyalov

12/07 2017

0.6

0.6.0.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rzavyalov

19/01 2017

0.5.5

0.5.5.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar hassletauf

13/11 2016

0.5.4

0.5.4.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar hassletauf

05/11 2016

0.5.3

0.5.3.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar hassletauf

24/10 2016

0.5.2

0.5.2.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar hassletauf

09/10 2016

0.5.1

0.5.1.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar hassletauf

08/10 2016

0.5.0

0.5.0.0

A PHP implementation of the Konnektive CRM v2 API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar hassletauf