2017 © Pedro Peláez
 

library zasilkovna

Zasilkovna SOAP and REST client in PHP

image

salamek/zasilkovna

Zasilkovna SOAP and REST client in PHP

  • Wednesday, November 1, 2017
  • by Salamek
  • Repository
  • 1 Watchers
  • 0 Stars
  • 129 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 22 % Grown

The README.md

Zasilkovna client in PHP using SOAP or REST API

Integrity check Donate, (*1)

This library provides SOAP and REST API implementations. Additionaly Branch implementation to fetch and store branch data and label implementation to generate labels., (*2)

Installation

Install salamek/zasilkovna using Composer, (*3)

$ composer require salamek/zasilkovna

or if you want master branch code:, (*4)

$ composer require salamek/zasilkovna

Documentation

See http://www.zasilkovna.cz/popis-api/ for more info, (*5)

Example code

require "vendor/autoload.php";

$api = new Salamek\Zasilkovna\ApiRest($apiPassword, $apiKey);
// OR Soap implementation $api = new Salamek\Zasilkovna\ApiSoap($apiPassword, $apiKey);
$branch = new Branch($apiKey, new BranchStorageSqLite()); // There are multiple implementations of IBranchStorage BranchStorageSqLite using SQLite, BranchStorageFile using file in /tmp and BranchStorageMemory using simple variable (SLOW), You can implement your own by implementing IBranchStorage interface
$label = new Label($api, $branch);

// To greate new packet
$transporterPackage = new PacketAttributes(
    'ORDERID',
    'FirstName',
    'LastName',
    null,
    'addressId',
    null,
    'Company',
    'Email',
    'Phone',
    null,
    null,
    null,
    'www',
    false,
    'Street',
    'StreetNumber',
    'City',
    'ZipCode'
);

$api->createPacket($transporterPackage);

// Generate A4 label
$label->generateLabelFull($pdf, $transporterPackage);

// Generate A2 label
$label->generateLabelQuarter($pdf, $transporterPackage);

// Get full branch list as array
$branch->getBranchList();

// Returns branch detail by ID
$branch->find($branchId);

The Versions

01/11 2017

dev-master

9999999-dev https://github.com/Salamek/zasilkovna

Zasilkovna SOAP and REST client in PHP

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

api rest soap zasilkovna

01/11 2017

v1.0.1

1.0.1.0 https://github.com/Salamek/zasilkovna

Zasilkovna SOAP and REST client in PHP

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

api rest soap zasilkovna

09/09 2017

v1.0

1.0.0.0 https://github.com/Salamek/zasilkovna

Zasilkovna SOAP and REST client in PHP

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

api rest soap zasilkovna