2017 © Pedro Peláez
 

library dhlmyapi

DHL myAPI

image

pavolbiely/dhlmyapi

DHL myAPI

  • Thursday, May 31, 2018
  • by pavolbiely
  • Repository
  • 1 Watchers
  • 1 Stars
  • 578 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 189 % Grown

The README.md

DHL myAPI

Build Status Coverage Status Donate, (*1)

Please ask DHL for username, password and Customer ID in order to access their API., (*2)

Installation

Use composer to install this package., (*3)

Example of usage

Create a package and order a courier., (*4)

$dhl = new Dhl('user', 'pass', 1234, __DIR__ . '/temp');
$payment = new Payment('SK4123000000000002045678', 'POBNSKBA', '123456', 100.0);
$sender = NULL;
$recipient = new Address('TEST','TEST','TEST','TEST','SK');
$package = new Package(25183385203, Package::TYPE_SK_COD, Package::DEPO_HQ_BRATISLAVA, $recipient, $sender, $payment, [Package::FLAG_SAT], 'TEST');
$dhl->createPackages([$package]);
$dhl->createPickupOrders([new PickupOrder('TEST','TEST', 1, $recipient, 'info@example.org', NULL, NULL, NULL, 'TEST')])

Generating PDF labels, (*5)

header('Content-Type: application/pdf');
echo PdfLabel::generateLabels($packages, PdfLabel::QUARTER);

How to run tests?

Tests are build with Nette Tester. You can run it like this:, (*6)

php -f tester ./ -c php.ini-mac --coverage coverage.html --coverage-src ../src

Minimum requirements

  • PHP 7.1+

Credits

This code is based and inspired by salamek/ppl-my-api., (*7)

License

MIT License (c) Pavol Biely, (*8)

Read the provided LICENSE file for details., (*9)

The Versions

31/05 2018

dev-master

9999999-dev

DHL myAPI

  Sources   Download

MIT

The Requires

 

by Pavol Biely