PHP code example of wsw / allnations
1. Go to this page and download the library: Download wsw/allnations library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wsw / allnations example snippets
// Consideramos que já existe um autoloader compatível com a PSR-4 registrado
use WSW\AllNations\Credentials;
$credentials = new Credentials(':CodigoCliente', ':Senha');
// Consideramos que já existe um autoloader compatível com a PSR-4 registrado e as credenciais foram configuradas em $credentials
use WSW\AllNations\Products\Products;
use WSW\AllNations\AllNationsException;
try {
$Products = new Products($Credentials);
/**
* use Products::PRODUCT_LIST Para listar todos os produtos relacionandos a data da pesquisa.
* use Products::PRODUCT_STOCK Para listar todos os produtos em estoque relacionados a data da pesquisa
*/
$result = $Products->setDate('10/10/2015')->send(Products::PRODUCT_LIST);
} catch (AllNationsException $e) {
echo $e->getMessage();
}