inkr/smartpost-apiclient
最新稳定版本:1.1.2
Composer 安装命令:
composer require inkr/smartpost-apiclient
包简介
Itella SmartPost API client
README 文档
README
How to install
composer require inkr/smartpost-apiclient
How to use
Initialize client
$client = new SmartPost\SmartPostApiClient((new SmartPost\SmartPostApiClientConf()) ->setApiUrl('https://gateway.posti.fi/smartpost/api/ext/v1/') ->setAuthKey('apikey') );
List places
foreach ($client->getPlaces('EE') as $place) { print_r($place); }
Create a new order
$client->createOrders([ (new SmartPost\Model\Order\OrderCreateRequest()) ->setReference('123') ->setContent('new shipment') ->setSource((new OrderCreateRequestSource())->setCountry('EE')) ->setRecipient((new SmartPost\Model\Order\OrderCreateRequestRecipient()) ->setName('John Smith') ->setPhone('55667788') ) ->setDestination((new SmartPost\Model\Order\OrderCreateRequestDestination()) ->setCountry('EE') ->setPlaceId('01007225') ) ]);
Get tracking info
$client->getTracking(['barcode1', 'barcode2']);
统计信息
- 总下载量: 29
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-04-04