PHP code example of wagnermontanini / deolhonoimposto

1. Go to this page and download the library: Download wagnermontanini/deolhonoimposto 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/ */

    

wagnermontanini / deolhonoimposto example snippets



WagnerMontanini\DeOlhoNoImposto\Product;

$product = new Product("v1", "token");


/**
 * product
 */
echo "<h1>PRODUCT</h1>";

$create = $product->product([
    "CNPJ"=> "",
    "Codigo"=> "",
    "UF"=> "",
    "EX"=> 0,
    "CodigoInterno"=> "",
    "Descricao"=> "",
    "UnidadeMedida"=> "",
    "Valor"=> "",
    "Gtin"=> ""
]);

if ($create->error()) {
    echo "<p class='error'>{$create->error()->message}</p>";
} else {
    var_dump($create->response());
}


WagnerMontanini\DeOlhoNoImposto\Service;

$service = new Service("v1", "token");

/**
 * service
 */
echo "<h1>SERVICE</h1>";

$create = $service->service([
    "CNPJ"=> "",
    "Codigo"=> "",
    "UF"=> "",
    "Descricao"=> "",
    "UnidadeMedida"=> "",
    "Valor"=> ""
]);

if ($create->error()) {
    echo "<p class='error'>{$create->error()->message}</p>";
} else {
    var_dump($create->response());
}