PHP code example of convenia / alelo-vt

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

    

convenia / alelo-vt example snippets



$AleloVt = new AleloVt(
            [
                'orderDate' => '05052016',
                'name' => 'Razão Social Com Caracteres Inválidos',
                'cnpj' => '05315684000134',
            ]
        );

        $AleloVt->addAddress([
            'cnpj' => '05315684000134a',
            'id' => '154',
            'street' => 'Alameda Pamplona',
            'number' => '1427',
            'district' => 'jardim paulista',
            'cep' => '04527001',
            'state' => 'SP',
            'person' => 'José ninguém',
        ]);

        $AleloVt->addUser([
            'cnpj' => '05315684000134a',
            'addressId' => '154',
            'code' => '229247',
            'name' => 'José Alguem',
            'cpf' => '22924742804',
            'rg' => '42421196',
            'rgDigit' => '5',
            'rgState' => 'SSP',
            'birthDate' => '14071987',
            'workedDays' => 22,
        ]);

        $AleloVt->addBenefit([
            'cnpj' => '05315684000134a',
            'userCode' => '229247',
            'id' => '1',
            'name' => 'nome d o benefício',
            'quantity' => '2',
        ]);

        $AleloVt->addResidence([
            'cnpj' => '05315684000134a',
            'userCode' => '229247',
            'street' => 'Alameda Pamplona',
            'number' => '1427',
            'district' => 'jardim paulista',
            'cep' => '04527001',
            'state' => 'SP',

        ]);

        $file = $AleloVt->generate();