proclame / mikropakket-php
description
v0.1.3
2021-08-29 13:35 UTC
Requires
- php: ^7.4|^8.0
- ext-json: *
- guzzlehttp/guzzle: ^6.2.1|^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- roave/security-advisories: dev-latest
README
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.