teknoo / sellsy-client
PHP library to connect your applications to your Sellsy account account using the Sellsy API and build your websites and your platforms on the Sellsy technology.
Fund package maintenance!
Patreon
TeknooSoftware
Installs: 143 826
Dependents: 0
Suggesters: 0
Security: 0
Stars: 17
Watchers: 5
Forks: 16
Open Issues: 3
Requires
- php: ^7.4||^8.0
- ext-json: *
- psr/http-factory: ^1.0.2
- psr/http-message: ^1.0.1||^2
- teknoo/immutable: ^2.0.9||^3.0.17
- voku/arrayy: ^7.9
Requires (Dev)
- guzzlehttp/guzzle: ^6.0||^7.8
- guzzlehttp/psr7: ^1.8||^2.6
- php-http/async-client-implementation: ^1.0
- php-http/client-common: ^2.7
- php-http/guzzle7-adapter: ^1
- php-http/multipart-stream-builder: ^1.3
- php-http/promise: ^1.2
- phpstan/phpstan: ^1.12.3
- phpunit/phpunit: ^10.5.10||^11
- roave/security-advisories: dev-latest
- squizlabs/php_codesniffer: ^3.10.2
- symfony/console: 6.3||^7.0
- symfony/property-access: ^6.3||^7.0
- dev-master
- 3.0.28
- 3.0.27
- 3.0.26
- 3.0.25
- 3.0.24
- 3.0.23
- 3.0.22
- 3.0.21
- 3.0.20
- 3.0.19
- 3.0.18
- 3.0.17
- 3.0.16
- 3.0.15
- 3.0.14
- 3.0.13
- 3.0.12
- 3.0.11
- 3.0.10
- 3.0.9
- 3.0.8
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 3.0.0-beta9
- 3.0.0-beta8
- 3.0.0-beta7
- 3.0.0-beta6
- 3.0.0-beta5
- 3.0.0-beta4
- 3.0.0-beta3
- 3.0.0-beta2
- 3.0.0-beta1
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 2.0.0-beta2
- 2.0.0-beta1
- 2.0.0-alpha4
- 2.0.0-alpha3
- 2.0.0-alpha2
- 2.0.0-alpha1
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.8.3-RC
- 0.8.2-beta
- 0.8.1-beta
- 0.8.0-beta
- 0.1.1-beta
- 0.1.0-beta
This package is auto-updated.
Last update: 2024-11-28 20:30:38 UTC
README
PHP library to connect your applications to your Sellsy account account using the Sellsy API and build your websites and your platforms on the Sellsy technology.
Simple Example
<?php
use GuzzleHttp\Client;
use Teknoo\Sellsy\Guzzle6\Transport\Guzzle6;
use Teknoo\Sellsy\Sellsy;
include 'vendor/autoload.php';
//Create the HTTP client
$guzzleClient = new Client();
//Create the transport bridge
$transportBridge = new Guzzle6($guzzleClient);
//Create the front object
$sellsy = new Sellsy(
'https://apifeed.sellsy.com/0/',
$userToken,
$userSecret,
$consumerKey,
$consumerSecret
);
$sellsy->setTransport($transportBridge);
//Example of request, follow the API documentation of Sellsy API.
print $sellsy->infos()->getInfos()->getResponse()['consumerdatas']['id'];
//Show your ConsumerDatas id, like 9001
print $sellsy->Infos()->getInfos()->consumerdatas->id;
//Show again your ConsumerDatas id, like 9001
$sellsy->Infos()->async()->getInfos()->then(function (\Teknoo\Sellsy\Client\ResultInterface $result) {
print $result->consumerdatas->id.PHP_EOL;
})->wait();
//Show again your ConsumerDatas id, like 9001
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(function (\Teknoo\Sellsy\Client\ResultInterface $result) {
print $result->email.PHP_EOL;
})->wait();
//Show your email, like contact@teknoo.software
$sellsy->AccountDatas()->deleteTaxe();
//Thrown an exception : Teknoo\Sellsy\Client\Exception\ParameterMissingException: id is missing
How-to
Quick How-to to learn how use this library : Startup. Manage Sellsy Rate Limiting : Rate Limiting.
Support this project
This project is free and will remain free. It is fully supported by the activities of the EIRL. If you like it and help me maintain it and evolve it, don't hesitate to support me on Patreon or Github.
Thanks :) Richard.
Credits
EIRL Richard Déloge - https://deloge.io - Lead developer. SASU Teknoo Software - https://teknoo.software
About Teknoo Software
Teknoo Software is a PHP software editor, founded by Richard Déloge, as part of EIRL Richard Déloge. Teknoo Software's goals : Provide to our partners and to the community a set of high quality services or software, sharing knowledge and skills.
License
Space is licensed under the MIT License - see the licenses folder for details.
Installation & Requirements
To install this library with composer, run this command :
composer require teknoo/sellsy-client
To use the embedded Guzzle transport
composer require guzzlehttp/guzzle
This library requires :
* PHP 8.1+ (7.4 and 8.0 can works, but there are not supported)
* A PHP autoloader (Composer is recommended)
* Teknoo/Immutable.
* A PSR-7 implementation
News from Teknoo Sellsy Client 3.0
This library requires PHP 7.4 or newer. Some change causes bc breaks :
- PHP 7.4 is the minimum required
- Improve errors management from returns of API. All errors and exceptions thrown by the API are now mapped to an explicit PHP exception
- Improve result management: key/values are directly accessible, as object's property from the result object, thanks to voku/arrayy
- Improve result object, error message is now accessible from dedicated getter.
- Add Asynchronous requests capabilities
- Switch to typed properties
- Remove some PHP useless DockBlocks
- Replace array_merge by "..." operators
- Most methods have been updated to include type hints where applicable. Please check your extension points to make sure the function signatures are correct. _ All files use strict typing. Please make sure to not rely on type coercion.
- Switch to PHPStan in QA Tools and disable PHPMd
Special Thanks
Julien Herr julien@herr.fr : RateLimitTransport and documentation about Sellsy's rate limit in its API.
Contribute :)
You are welcome to contribute to this project. Fork it on Github