patryk-sawicki / apaczka
API client for aPaczka service.
Requires
- php: ^8.2
- laravel/framework: ^8.00 || ^9.00 || ^10.00 || ^11.00
Requires (Dev)
- phpunit/phpunit: ^9.5
README
API client for aPaczka service.
Based on aPaczka api doc.
Requirements
- PHP 8.0 or higher with json extensions.
Installation
The recommended way to install is through Composer.
$ composer require patryk-sawicki/apaczka
Usage
Class declaration.
$aPaczka = new Apaczka();
Services
Return an array with a list of services.
$aPaczka->services();
Pickup type
Return an array with a list of pickup type.
$aPaczka->pickupType();
Options
Return an array with a list of options.
$aPaczka->options();
Points type
Return an array with a list of points type.
$aPaczka->pointsType();
Package type
Return an array with a list of package type.
$aPaczka->packageType();
Orders
Return json response with the latest orders.
$aPaczka->orders(int $page = 0, int $limit = 10);
Order
Return json response with the order details.
$aPaczka->order(int $orderId);
Waybill
Download waybill.
$aPaczka->downloadWaybill(int $orderId);
Store waybill.
$aPaczka->storeWaybill(int $orderId, $path);
Service structure
Return json response with the service structure.
$aPaczka->serviceStructure();
Postage points
Return json response with the list of postage points.
$aPaczka->spoints(string $type);
Turn In
Download turn in.
$aPaczka->downloadTurnIn(array $orderIds);
Store turn in.
$aPaczka->storeTurnIn(array $orderIds, $path);
Pickup hours
Return json response with the pickup hours.
$aPaczka->pickupHours(string $postalCode, int $serviceId = null, bool $removeIndex = false);
Order valuation
Return json response of the order valuation.
$aPaczka->orderValuation(array $order);
Send order
Return json response of the order send.
$aPaczka->sendOrder(array $order);
Cancel order
Return json response of the order cancel.
$aPaczka->cancelOrder(int $orderId);
Changelog
Changelog is available here.