bannerstop/gls-ade
Composer 安装命令:
composer require bannerstop/gls-ade
包简介
Fork of Web-IT GLS-ADE SDK
README 文档
README
Fork of webit/gls-ade with updated dependencies. So far we have only updated the dependencies and fixed the code to work with the new versions. There is still some work to be done, like restoring the tests and implementing strict typing.
The repository provides a client to communicate with GLS SOAP APIs.
Installation
Add the bannerstop/gls-ade into composer.json
{
"require": {
"bannerstop/gls-ade": "^3.0.0"
}
}
Usage
use \Webit\GlsAde\Model\AdeAccount; use \Webit\GlsAde\Api\Factory\ApiFactory; $adeAccount = new AdeAccount('your-login', 'your-password', 'is-test-env' ? true : false); $apiFactory = ApiFactory::create(); /** @var \Webit\GlsAde\Api\AuthApi $authApi */ $authApi = $apiFactory->createAuthApi(); /** @var \Webit\GlsAde\Api\ConsignmentPrepareApi $consignemntPrepareApi */ $consignemntPrepareApi = $apiFactory->createConsignmentPrepareApi($adeAccount); /** @var \Webit\GlsAde\Api\MpkApi $mpkApi */ $mpkApi = $apiFactory->createMpkApi($adeAccount); /** @var \Webit\GlsAde\Api\PickupApi $pickupApi */ $pickupApi = $apiFactory->createPickupApi($adeAccount); /** @var \Webit\GlsAde\Api\PostalCodeApi $postalCodeApi */ $postalCodeApi = $apiFactory->createPostalCodeApi($adeAccount); /** @var \Webit\GlsAde\Api\ProfileApi $profileApi */ $profileApi = $apiFactory->createProfileApi($adeAccount); /** @var \Webit\GlsAde\Api\SenderAddressApi $senderAddressApi */ $senderAddressApi = $apiFactory->createSenderAddressApi($adeAccount); /** @var \Webit\GlsAde\Api\ServiceApi $serviceApi */ $serviceApi = $apiFactory->createServiceApi($adeAccount);
Running examples
For real life example see examples directory.
cd examples
cp config.php.dist config.php
Set your account details in config.php then run examples
sh php auth.php php mpk.php php post-codes.php php profile.php php sender.php php services.php
TODO
- Implement strict typing
- Restore tests
统计信息
- 总下载量: 469
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-24