2017 © Pedro Peláez
 

library gls-ade

Web-IT GLS-ADE SDK

image

webit/gls-ade

Web-IT GLS-ADE SDK

  • Sunday, September 24, 2017
  • by dbojdo
  • Repository
  • 1 Watchers
  • 1 Stars
  • 112 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 3 % Grown

The README.md

GLS ADE WebAPI Implementation

The repository provides a client to communicate with GLS SOAP APIs, (*1)

Installation

Add the webit/gls-ade into composer.json, (*2)

{
    "require": {
        "webit/gls-ade": "^2.0.0"
    }
}

Usage

use Webit\GlsAde\Model\AdeAccount;
use \Webit\GlsAde\Api\Factory\ApiFactory;

$adeAccount = new AdeAccount('your-login', 'your-password', 'is-test-env' ? true : false);

$apiFactory = ApiFactory::create();

/** @var \Webit\GlsAde\Api\AuthApi $authApi */
$authApi = $apiFactory->createAuthApi();

/** @var \Webit\GlsAde\Api\ConsignmentPrepareApi $consignemntPrepareApi */
$consignemntPrepareApi = $apiFactory->createConsignmentPrepareApi($adeAccount);

/** @var \Webit\GlsAde\Api\MpkApi $mpkApi */
$mpkApi = $apiFactory->createMpkApi($adeAccount);

/** @var \Webit\GlsAde\Api\PickupApi $pickupApi */
$pickupApi = $apiFactory->createPickupApi($adeAccount);

/** @var \Webit\GlsAde\Api\PostalCodeApi $postalCodeApi */
$postalCodeApi = $apiFactory->createPostalCodeApi($adeAccount);

/** @var \Webit\GlsAde\Api\ProfileApi $profileApi */
$profileApi = $apiFactory->createProfileApi($adeAccount);

/** @var \Webit\GlsAde\Api\SenderAddressApi $senderAddressApi */
$senderAddressApi = $apiFactory->createSenderAddressApi($adeAccount);

/** @var \Webit\GlsAde\Api\ServiceApi $serviceApi */
$serviceApi = $apiFactory->createServiceApi($adeAccount);

Running examples

For real life example see examples directory., (*3)

cd examples
cp config.php.dist config.php

Set your account details in config.php then run examples, (*4)

sh php auth.php php mpk.php php post-codes.php php profile.php php sender.php php services.php, (*5)

Running tests

To run all tests (including real API calls tests), copy phpunit.xml.dist file to phpunit.xml and replace username / password. If you don't do this, API tests will be skipped., (*6)

./vendor/bin/phpunit

The Versions

24/09 2017

dev-master

9999999-dev

Web-IT GLS-ADE SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

24/09 2017
21/09 2017

1.x-dev

1.9999999.9999999.9999999-dev

Web-IT GLS-ADE SDK

  Sources   Download

The Requires

 

The Development Requires