proclame/mikropakket-php

v0.1.3 2021-08-29 13:35 UTC

This package is auto-updated.

Last update: 2024-08-29 05:54:50 UTC


README

Latest Version on Packagist Total Downloads

此软件包是 Mikropakket API 的 PHP 实现,通过它,您可以创建和跟踪包裹。

安装

您可以通过 composer 安装此软件包

composer require proclame/mikropakket-php

注意

  • 每个服务都需要自己的 API 密钥
  • ParcelLabelWebservice 有一个单独的测试端点
  • ParcelStatusService 有一个针对比利时和荷兰的单独端点
  • Preadvice Webservice 的使用不明确/不必要,因此尚未实现

用法

// Create a parcel
$request = new Mikropakket\ParcelRequest();
$request->setApiKey((string) API_KEY, (bool) $isProduction);
$request->setAttributes($attributes = ["attribute_key" => "attribute_value"]);
$labelResponse = $request->request();

$labelResponse->shipmentParcel->stream("optional-filename.pdf"); // ->download() can be used as well

端点主机

端点

为贡献者提供的信息

包裹标签属性

测试

  • @todo: 添加测试

贡献

请随意通过 Fork 仓库和提交拉取请求来贡献。

安全漏洞

请通过电子邮件提交安全漏洞至 nick@proclame.be

作者

许可

MIT 许可证 (MIT)。请参阅 许可文件 获取更多信息。