SellSy
Connecter votre site à votre compte Sellsy.
Grâce à l'API Sellsy, vous pouvez connecter votre site à votre compte, mettre à jours et récupérer les contacts, les devis, les factures ou tous les documents disponibles via le Sellsy Api.
La bibliothèque est indépendante de tout framework et peut-être utilisée avec n'importe quelle application PHP. Elle ne nécessite qu'un transport PSR-7, tel Guzzle. Une implémentation par défaut est fournie avec cette bibliothèque.
Fonctionnalités
Framework Free
Indépendant de tout framework ou outil.
PSR-7
Intéroperable avec tout code exploitant la recommandation PSR-7.
Facilement intégrable
Implémenter uniquement les interfaces nécessaires.
Cloner le projet sur GitHub
Projet sous licence open source! Hébergé, développé et maintenu sur GitHub.
Voir le projet sur GitHub
Supporter le projet sur Patreon
Ce projet est logiciel libre et le restera, mais son développement a un coût. Si vous l'appréciez et si vous souhaitez nous aider à le maintenir et à le faire évoluer. N'hésitez pas à nous supporter sur Patreon.
Supporter le p[rojet
Exemple
<?php
declare(strict_types=1);
namespace Acme;
use GuzzleHttp\Client;
use Http\Discovery\HttpAsyncClientDiscovery;
use Http\Discovery\Psr17FactoryDiscovery;
use Teknoo\Sellsy\Client\ResultInterface;
use Teknoo\Sellsy\Guzzle6\Transport\Guzzle6;
use Teknoo\Sellsy\HttpPlug\Transport\HttpPlug;
use Teknoo\Sellsy\Sellsy;
include 'vendor/autoload.php';
//Example with Guzzle6 Create the HTTP client
//$guzzleClient = new Client();
//$transportBridge = new Guzzle6($guzzleClient);
//Create the transport bridge
$transportBridge = new HttpPlug(
HttpAsyncClientDiscovery::find(),
Psr17FactoryDiscovery::findUriFactory(),
Psr17FactoryDiscovery::findRequestFactory(),
Psr17FactoryDiscovery::findStreamFactory(),
);
//Create the front object
$sellsy = new Sellsy(
'https://apifeed.sellsy.com/0/',
'1e5cc50d37e386dcd14858472261d34da0c597ee',
'd9319bec93565830a2af0ae6d04eec5999bb4a65',
'81fbc7a8b3a35f8de9f2d5d324ec8bb47ac7a574',
'd313d3806faf9962b15fa3ae2878e64d7e88093a'
);
$sellsy->setTransport($transportBridge);
//Example of requests, follow the API documentation of Sellsy API.
//Show your ConsumerDatas id, like 9001
print $sellsy->Infos()
->getInfos()
->getResponse()['consumerdatas']['id'];
//Show again your ConsumerDatas id, like 9001
print $sellsy->Infos()
->getInfos()
->consumerdatas
->id;
//Show again your ConsumerDatas id, like 9001
$sellsy->Infos()
->async()
->getInfos()
->then(
static function (ResultInterface $result): void {
print $result->consumerdatas->id . PHP_EOL;
}
)->wait();
//Show your email, like contact@teknoo.software
print $sellsy->AccountPrefs()
->getCorpInfos()
->getResponse()['email'];
//Show your email, like contact@teknoo.software
print $sellsy->AccountPrefs()
->getCorpInfos()
->email;
//Show your email, like contact@teknoo.software
$sellsy->AccountPrefs()
->async()
->getCorpInfos()
->then(
static function (ResultInterface $result): void {
print $result->email . PHP_EOL;
}
)->wait();
//Thrown an exception : Teknoo\Sellsy\Client\Exception\ParameterMissingException: id is missing
$sellsy->AccountDatas()
->deleteTaxe();