codenet / kk-client
dev-master
2017-01-31 22:29 UTC
Requires
- php: >=5.4
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- symfony/var-dumper: dev-master
This package is not auto-updated.
Last update: 2025-06-05 03:28:15 UTC
README
Implemented methods
Below is the list of implemented API methods
- /api/login
- /api/checkPrices
- /api/checkData
- /api/makeOrder
- /api/orders
- /api/inpostMachines
- /api/label
- /api/labelZebra
Example usage
use CodeNet\KKClient\KKClient; $client = new KKClient($password, $password); $client->setSessionId($sessionId); // optionally reuse previous session identifier if there is one $order = $client->createOrder([ 'courierId' => '5' // ... // order data according to API docs ]); // alternatively, a request could be CreateOrderRequest object $request = new CreateOrderRequest(); $request->setCourier($courier); // where $courier could be Courier object or courier ID // $request->set... $order = $client->createOrder($request); echo "Created order #" . $order->getOrderId() . EOL;
Testing
- copy tests/config.php.dist to tests/config.php
- fill test environment credentials
- run phpunit