-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9e99ea
commit aa359d9
Showing
4 changed files
with
110 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# 1.0.16 | ||
|
||
- Added: new endpoint (create charge balance sheet) | ||
|
||
# 1.0.15 | ||
|
||
- Added: new endpoint (update plan) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?php | ||
require __DIR__.'/../../vendor/autoload.php'; | ||
use Gerencianet\Exception\GerencianetException; | ||
use Gerencianet\Gerencianet; | ||
$file = file_get_contents(__DIR__.'/../config.json'); | ||
$options = json_decode($file, true); | ||
$params = ['id' => 1]; | ||
$body = [ | ||
'title' => 'Balancete Demonstrativo', | ||
'body' => | ||
[ | ||
0 => | ||
[ | ||
'header' => 'Demonstrativo de Consumo', | ||
'tables' => | ||
[ | ||
0 => | ||
[ | ||
'rows' => | ||
[ | ||
0 => | ||
[ | ||
0 => | ||
[ | ||
'align' => 'left', | ||
'color' => '#000000', | ||
'style' => 'bold', | ||
'text' => 'Exemplo de despesa', | ||
'colspan' => 2, | ||
], | ||
1 => | ||
[ | ||
'align' => 'left', | ||
'color' => '#000000', | ||
'style' => 'bold', | ||
'text' => 'Total lançado', | ||
'colspan' => 2, | ||
], | ||
], | ||
1 => | ||
[ | ||
0 => | ||
[ | ||
'align' => 'left', | ||
'color' => '#000000', | ||
'style' => 'normal', | ||
'text' => 'Instalação', | ||
'colspan' => 2, | ||
], | ||
1 => | ||
[ | ||
'align' => 'left', | ||
'color' => '#000000', | ||
'style' => 'normal', | ||
'text' => 'R$ 100,00', | ||
'colspan' => 2, | ||
], | ||
], | ||
], | ||
], | ||
], | ||
], | ||
1 => | ||
[ | ||
'header' => 'Balancete Geral', | ||
'tables' => | ||
[ | ||
0 => | ||
[ | ||
'rows' => | ||
[ | ||
0 => | ||
[ | ||
0 => | ||
[ | ||
'align' => 'left', | ||
'color' => '#000000', | ||
'style' => 'normal', | ||
'text' => 'Confira na documentação da Gerencianet todas as configurações possíveis de um boleto balancete.', | ||
'colspan' => 4, | ||
], | ||
], | ||
], | ||
], | ||
], | ||
], | ||
], | ||
]; | ||
try { | ||
$api = new Gerencianet($options); | ||
$response = $api->createChargeBalanceSheet($params, $body); | ||
print_r($response); | ||
} catch (GerencianetException $e) { | ||
print_r($e->code); | ||
print_r($e->error); | ||
print_r($e->errorDescription); | ||
} catch (Exception $e) { | ||
print_r($e->getMessage()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters