masmerise / de-ridder-den-hertog-php-sdk
An unofficial PHP SDK for accessing De Ridder & Den Hertog's API.
Installs: 20
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/masmerise/de-ridder-den-hertog-php-sdk
Requires
- php: ~8.5
- saloonphp/saloon: ^3.14
- saloonphp/xml-wrangler: ^1.4
- webmozart/assert: ^1.12
Requires (Dev)
- laravel/pint: ^1.26.0
- phpstan/phpstan: ^2.1.33
- phpunit/phpunit: ^12.5.1
- spatie/ray: ^1.44
- vlucas/phpdotenv: ^5.6.2
This package is auto-updated.
Last update: 2025-12-14 11:09:19 UTC
README
De Ridder & Den Hertog PHP SDK
This SDK provides convenient, fully-typed access to De Ridder & Den Hertog's API.
Installation
You can install the package via composer:
composer require masmerise/de-ridder-den-hertog-php-sdk
Adapters
You may also use one of the available adapters instead:
Getting started
You can always refer to the documentation to examine the various resources that are available.
Setup
use DeRidderDenHertog\Authentication\ApiGuid; use DeRidderDenHertog\DeRidderDenHertog; $guid = ApiGuid::fromString('{4844a45c-33d1-4937-83f4-366d36449eaf}'); $renh = DeRidderDenHertog::authenticate($guid);
Data retrieval
use DeRidderDenHertog\Core\Type\Parameter\Filter; $filter = Filter::fromSql('Klantnummer=123456789'); [$customer] = $renh->getCustomers(filter: $filter);
Resource creation / update
use DeRidderDenHertog\SetCustomer\Type\Parameter\CustomerData; $data = CustomerData::parameters( city: 'Ghent', emailAddress: 'php.sdk@github.action', houseNumber: '40', name: 'PHP SDK', phone: '0470123456', street: 'Teststraat', zipCode: '9000', ); $customerId = $renh->setCustomer($data);
Failures (exception handling)
The SDK uses exceptions as its medium to communicate failures.
DeRidderDenHertogException
├── CouldNotAuthenticate (Authentication Errors)
├── UnknownException (Connection Errors)
└── ValidationException (Request Errors)
├── CouldNotDeleteCustomer
├── CouldNotGetApiFunctions
├── CouldNotGetCustomers
├── CouldNotSetCustomer
└── ...
use DeRidderDenHertog\SetCustomer\Failure\CouldNotSetCustomer; try { $customerId = $renh->setCustomer($data); } catch (CouldNotSetCustomer $ex) { $logger->log($ex->getMessage()); }
Timeouts
The SDK defaults to a 30 second timeout.
Implementation progress
| Action |
|---|
| DeleteCustomer |
| GetAPIFunctions |
| GetCustomers |
| SetCustomer |
While the SDK is battle-tested and production-ready, only a handful of API interactions have been implemented thus far. Please bear in mind this is an unofficial SDK, so we have to prioritize available resources at this time.
However, always feel free to submit a feature or pull request!
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security
If you discover any security related issues, please email support@masmerise.be instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.