Git Product home page Git Product logo

colissimo-sdk's Introduction

sengentobv/colissimo-sdk

Unofficial Colissimo API PHP SDK

Simple wrapper around the Colissimo SOAP APIs.

Installation & Usage

Requirements

PHP 7.4 or later.

Check composer.json for a list of all the requirements.

Composer

The recommended way to install this library is through Composer.

composer require sengentobv/colissimo-sdk

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/colissimo-sdk/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure the authentication
$authentication = new \SengentoBV\ColissimoSdk\ColissimoAuthentication($CONTRACT_NUMBER, $PASSWORD);

// Create an instance of the client
$apiClient = new \SengentoBV\ColissimoSdk\ColissimoApiClient($authentication);

try {
    // Get an instance of the SLS service
    $slsService = $apiClient->getSlsService();
        
    // Perform a call
    // NOTE: You have to leave the contract number/password empty as the authentication information will be (over)written automatically!
    $result = $slsService->checkGenerateLabel(new \SengentoBV\ColissimoSdk\Soap\SlsService\Structs\ColissimoApiCheckGenerateLabel(...))
    print_r($result);
    
} catch (\Exception $e) {
    echo $e->getMessage();
}

API Endpoints

The following webservices have been wrapped/mapped.

Authorization

The Colissimo API uses a custom method to authenticate (using the same set of credentials).

This library aims to aid you in this!

Whenever you create a new request object, you can (should) leave the fields meant for authentication empty as this library will do the heavy lifting for you by filling in (or overwriting) these fields automatically.

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

colissimo-sdk's People

Contributors

mylemans avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.