定制 masmerise/de-ridder-den-hertog-php-sdk 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

masmerise/de-ridder-den-hertog-php-sdk

最新稳定版本:0.2.0

Composer 安装命令:

composer require masmerise/de-ridder-den-hertog-php-sdk

包简介

An unofficial PHP SDK for accessing De Ridder & Den Hertog's API.

README 文档

README

RenH PHP SDK PHP

Build Status Total Downloads Latest Stable Version License

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
    ├── CouldNotGetDayTurnover
    ├── 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
GetDayTurnover
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.

统计信息

  • 总下载量: 20
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-12