2017 © Pedro Peláez
 

library kk-client

image

codenet/kk-client

  • Tuesday, January 31, 2017
  • by pasi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 29 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Korporacja Kurierska API Client

Implemented methods

Below is the list of implemented API methods, (*1)

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

The Versions

31/01 2017

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

The Development Requires