korbeil/dhl-express-php-api
最新稳定版本:v1.0.6
Composer 安装命令:
composer require korbeil/dhl-express-php-api
包简介
An up to date PHP client for DHL Express API
README 文档
README
I found close to nothing related to DHL Express API and needed it for a customer. So here I decided to make it open-source so everybody could use it freely.
This SDK is generated automatically with JanePHP from the official DHL Express specs.
It also provides a full object oriented interface for all the endpoints, requests and responses of the DHL Express REST API.
Installation
This library is made with symfony/http-client as our HTTP
transport. So by installing it, you'll have close to nothing in order to make it work:
composer require korbeil/dhl-express-php-api
Quick start
// $client contains all the methods to interact with the API $clientFactory = new Korbeil\DHLExpress\ClientFactory($dhlExpressUrl, $dhlExpressUsername, $dhlExpressPassword); $client = $clientFactory->getClient(); $pickupRequest = new Korbeil\DHLExpress\Api\Model\SupermodelIoLogisticsExpressPickupRequest(); // ... fill your request contents $response = $client->expApiPickups($pickupRequest); $trackingNumbers = $response->getDispatchConfirmationNumbers();
Tests
If you want to use the DHL Express API in your tests, you can get a client dedicated for this purpose by doing as following:
$testClient = $clientFactory->getMockClient();
License
This library is licensed under the MIT License - see the LICENSE file for details.
统计信息
- 总下载量: 85.76k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-02-22