proclame/mikropakket-php

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

This package is auto-updated.

Last update: 2024-10-29 06:19:03 UTC


README

Latest Version on Packagist Total Downloads

This package is a PHP implementation for the Mikropakket API, with it, you can create and track parcels.

Installation

You can install the package via composer:

composer require proclame/mikropakket-php

Notes

  • Each service requires it's own API Key
  • ParcelLabelWebservice has a separate Testing endpoint
  • ParcelStatusService has a separate endpoint for Belgium & Netherlands
  • The use of the Preadvice Webservice is unclear / unnecessary and therefore unimplemented

Usage

// 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

Endpoint Hosts

Endpoints

info for contributors

ParcelLabel Attributes

Testing

  • @todo: Add tests

Contributing

Feel free to contribute by Forking the repo and submitting a pull request.

Security Vulnerabilities

Please submit security vulnerabilities by email to nick@proclame.be

Author

License

The MIT License (MIT). Please see License File for more information.