Grosse mise à jour de ma librairie PHP Json-heitz

Le logiciel Heitz System expose toujours une API avec laquelle on peux discuter via JSON. Je vous avais déjà présenté la première version de cette class ici.

Elle rencontre un petit succès 162 téléchargements aux dernières nouvelles sur Packagist.

Pour l’invoquer, voici comment faire :

<?php
require_once 'vendor/autoload.php';

    use JsonHeitz\JsonHeitz;
    use JsonHeitzCredential\Credential;
    use JsonHeitz\JsonHeitzException\JsonHeitzException;

try {
        $connect = (new Credential())
                ->setPort(80)
                ->setUserLogin('test1@heitzsystem.com')
                ->setUserPass('1')
                ->setHost('http://heitz.no-ip.com')
                ->setHostPassword('AuthentificationBaseTest')
                ->urlWebServeurHeitz()
        ;
    } catch (JsonHeitzException $exc) {
        echo $exc->getMessage();
    }

    try {

        $call = (new Query($connect))->setConnectHeitzAPI()
            //    ->setDebug(true) //optional
        ;

        $resultat = $call->callWSHeitz();

        $call->setIdSession($resultat->idSession)
                ->setIdClient($resultat->idClient);


        var_dump($call->getOneClient());
        var_dump($call->getTaskList());
        var_dump($call->getTest());
        var_dump($call->getFormTraining());
        var_dump($call->getActiveReservation());
        var_dump($call->getConfigServeur());
        var_dump($call->getBilan());
        var_dump($call->getTest());
        var_dump($call->getClientMessage(10));
        var_dump($call->getListOfActiveAccess());
        var_dump($call->getListOfPassages());
        var_dump($call->getArrowPoints());
        var_dump($call->getTaskGroup());
        var_dump($call->getPlaceForTheTask());
        var_dump($call->getListOfFinancialDeadlines());
        var_dump($call->getListOfLevies());
        var_dump($call->getListOfBills());
        var_dump($call->getListOfFinancial());
        var_dump($call->getListOfFinancialDeadlines());
        var_dump($call->getListOfLevies());
        var_dump($call->getListOfPoints());
        var_dump($call->getListOfCures());
        var_dump($call->getListOfActiveAccess());
        var_dump($call->getAllArticles());
        var_dump($call->getAllCity());
        var_dump($call->getAllCivility());
        var_dump($call->getAllJobs());
        var_dump($call->getAllWhereTheCustomerHasPracticed());
        var_dump($call->getAllMotivation());
        var_dump($call->getAllVAT());
        var_dump($call->getAllPayment());
        var_dump($call->getAllWayToKnowTheInstitution());
        var_dump($call->getAllTypeOfProspects());
        var_dump($call->getAllDiscountLevel());
        var_dump($call->getAllCustomerGroup());
        var_dump($call->getAllEmployee());
        var_dump($call->getAllFamilySituation());
        var_dump($call->getArrowPoints());
        var_dump($call->getDetailOfCures());
        var_dump($call->getCriterion1());
        var_dump($call->getCriterion2());
        var_dump($call->getCriterion3());
        var_dump($call->getCriterion4());
        var_dump($call->getCriterion5());
        var_dump($call->getDashboard('01-03-2012', '01-03-2013'));
        var_dump($call->getDashbordFinancial('01-03-2012'));
        var_dump($call->getFinancial());
        var_dump($call->getFormTraining());
        var_dump($call->getScheduleSEPA());

        $sale = array(
            'vente'     => '{"ventes":[{"idArticle":300024225, "idTva":0, "quantite":3, "prixUnitaire":12.34},
                                                   {"idArticle":300185150, "idTva":0, "quantite":2, "prixUnitaire":987.654}]}',
            'reglement' => '{"reglements":[{"idMode":1, "montant":12.34},
                                        {"idMode":3, "montant":987.654},{"idMode":2, "montant":122.3}]}'
        );
        var_dump($call->addSale($sale));

        $search = array(
            "idClientRecherche" => '',
            "nom"               => 'sa%',
            "prenom"            => '',
            "secondPrenom"      => '',
            "email"             => '',
            "idCivilite"        => '',
            "naissance"         => '',
            "telephone"         => '',
            "portable"          => '',
            "idVille"           => '',
            "idSituation"       => '',
            "idProfession"      => '',
            "dateCreation"      => '',
            "contactSMS"        => '',
            "contactEmail"      => '',
            "contactCourrier"   => '',
            "contactTelephone"  => ''
        );

        var_dump($call->searchClient($search, 1));
        var_dump($call->getClientIdByEmail('toto@toto.fr'));
        var_dump($call->clientWithAnActiveSpecificAccess(1018874, 16485527));
        var_dump($call->accessListForAClient(19435255));
    } catch ( JsonHeitzException $exc) {
        echo $exc->getMessage();
    }

Et voila, @Bientôt Grand Maître L

Laisser un commentaire