├── VERSION.txt
├── bootstrap.php
├── src
├── Certificado.php
├── Gnre.php
├── Util.php
├── Emitente.php
├── Base.php
├── Sintegra.php
├── Averbacao.php
├── Webhook.php
├── Softhouse.php
├── Dfe.php
├── Nfcom.php
├── Services.php
├── Client.php
├── Nfce.php
├── Cte.php
├── CteOS.php
├── Nfse.php
├── Mdfe.php
└── Nfe.php
├── sdk-nativo
├── IClass.php
└── Services.php
├── pjpunit.xml.disp
├── composer.json
├── README.md
└── .sensiolabs.yml
/VERSION.txt:
--------------------------------------------------------------------------------
1 | 1.0.x-dev
2 |
--------------------------------------------------------------------------------
/bootstrap.php:
--------------------------------------------------------------------------------
1 | client->send("POST", "/certificado", $payload);
15 | }
16 |
17 | /**
18 | * @return \stdClass
19 | * @throws \Exception
20 | */
21 | public function mostra()
22 | {
23 | return $this->client->send("GET", "/certificado", []);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Gnre.php:
--------------------------------------------------------------------------------
1 | client->send("GET", "/gnre/{$key}", []);
16 | }
17 |
18 | /**
19 | * @param array $payload
20 | * @return \stdClass
21 | * @throws \Exception
22 | */
23 | public function cria($payload)
24 | {
25 | return $this->client->send("POST", "/gnre", $payload);
26 | }
27 |
28 | /**
29 | * @param array $payload
30 | * @return \stdClass
31 | * @throws \Exception
32 | */
33 | public function configUf($payload)
34 | {
35 | return $this->client->send("POST", "/gnre/configuf", $payload);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/Util.php:
--------------------------------------------------------------------------------
1 | client->send("GET", "/emitente/token", []);
14 | }
15 |
16 | /**
17 | * @param array $payload
18 | * @return \stdClass
19 | * @throws \Exception
20 | */
21 | public function atualiza($payload)
22 | {
23 | return $this->client->send("PUT", "/emitente", $payload);
24 | }
25 |
26 | /**
27 | * @return \stdClass
28 | * @throws \Exception
29 | */
30 | public function mostra()
31 | {
32 | return $this->client->send("GET", "/emitente", []);
33 | }
34 |
35 | /**
36 | * @param array $payload
37 | * @return \stdClass
38 | * @throws \Exception
39 | */
40 | public function webhook($payload)
41 | {
42 | return $this->client->send("POST", "/webhook", $payload);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/sdk-nativo/IClass.php:
--------------------------------------------------------------------------------
1 | services = new IServicesNFe($ambiente, $token);
9 | }
10 |
11 | public static function checkKey($payload)
12 | {
13 | if (!isset($payload["chave"])) {
14 | throw new \Exception("A chave não foi informada.");
15 | }
16 |
17 | $key = preg_replace("/[^0-9]/", "", $payload["chave"]);
18 |
19 | if (empty($key) || strlen($key) != 44) {
20 | throw new \Exception("A chave deve ter 44 dígitos numéricos.");
21 | }
22 |
23 | return $key;
24 | }
25 |
26 | public function exemplo_post($payload)
27 | {
28 | return $this->services->request("POST", "/rota", $payload);
29 | }
30 |
31 | public function exemple_consulta($payload)
32 | {
33 | $key = self::checkKey($payload);
34 | return $this->services->request("GET", "/rota/{$key}", []);
35 | }
36 |
37 | }
--------------------------------------------------------------------------------
/src/Base.php:
--------------------------------------------------------------------------------
1 | $params["token"] ?? null,
17 | "ambiente" => $params["ambiente"] ?? null,
18 | "timeout" => $params["timeout"] ?? null,
19 | "port" => $params["port"] ?? null,
20 | "http_version" => $params["http_version"] ?? null,
21 | "debug" => $params["debug"] ?? null,
22 | "options" => $params["options"] ?? null
23 | ];
24 |
25 | $this->client = new Client($config);
26 | }
27 |
28 | // @param array $payload
29 | // @return \stdClass
30 | protected static function checkKey($payload)
31 | {
32 | $key = preg_replace("/[^0-9]/", "", $payload["chave"]);
33 | if (empty($key) || strlen($key) != 44) {
34 | throw new \Exception("A chave deve ter 44 digitos numericos");
35 | }
36 | return $key;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/Sintegra.php:
--------------------------------------------------------------------------------
1 | client = new Client($params, "sintegra");
19 | }
20 |
21 | /**
22 | * Send post request to uploads
23 | * @param array $payload
24 | * @return \stdClass
25 | */
26 | public function upload($payload)
27 | {
28 | return $this->client->sendMultipart("/upload", $payload);
29 | }
30 |
31 | /**
32 | * Send json port request to gerar
33 | * @param array $payload
34 | * @return \stdClass
35 | */
36 | public function gerar($payload)
37 | {
38 | return $this->client->send("POST", "/gerar", $payload);
39 | }
40 |
41 | /**
42 | * Send json port request to consular
43 | * @param array $payload
44 | * @return \stdClass
45 | */
46 | public function consultar($payload)
47 | {
48 | return $this->client->send("POST", "/consulta", $payload);
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/pjpunit.xml.disp:
--------------------------------------------------------------------------------
1 |
2 |
"; 45 | print_r($resp); 46 | echo ""; 47 | 48 | } catch (\Exception $e) { 49 | echo $e->getMessage(); 50 | } 51 | 52 | ``` 53 | 54 | ### Sobre dados de envio e retornos 55 | 56 | Para saber os detalhes referente ao dados de envio e os retornos consulte nossa documentação [IntegraNotas Documentação](https://integranotas.com.br/doc). 57 | 58 | ### Veja alguns exemplos de consumi de nossa API nos link abaixo: 59 | 60 | [Pasta de Exemplos](https://github.com/cloud-dfe/sdk-php/tree/master/examples) 61 | 62 | [Utilitários](https://github.com/cloud-dfe/sdk-php/tree/master/examples/util) 63 | 64 | [Averbação](https://github.com/cloud-dfe/sdk-php/tree/master/examples/averbacao) 65 | 66 | [Certificado Digital](https://github.com/cloud-dfe/sdk-php/tree/master/examples/certificado) 67 | 68 | [CT-e](https://github.com/cloud-dfe/sdk-php/tree/master/examples/cte) 69 | 70 | [CT-e OS](https://github.com/cloud-dfe/sdk-php/tree/master/examples/cteos) 71 | 72 | [DF-e](https://github.com/cloud-dfe/sdk-php/tree/master/examples/dfe) 73 | 74 | [Emitente](https://github.com/cloud-dfe/sdk-php/tree/master/examples/emitente) 75 | 76 | [GNR-e](https://github.com/cloud-dfe/sdk-php/tree/master/examples/gnre) 77 | 78 | [MDF-e](https://github.com/cloud-dfe/sdk-php/tree/master/examples/mdfe) 79 | 80 | [NFC-e](https://github.com/cloud-dfe/sdk-php/tree/master/examples/nfce) 81 | 82 | [NFCom](https://github.com/cloud-dfe/sdk-php/tree/master/examples/nfcom) 83 | 84 | [NF-e](https://github.com/cloud-dfe/sdk-php/tree/master/examples/nfe) 85 | 86 | [NFS-e](https://github.com/cloud-dfe/sdk-php/tree/master/examples/nfse) 87 | 88 | [Softhouse](https://github.com/cloud-dfe/sdk-php/tree/master/examples/softhouse) 89 | 90 | [ico-version]: https://img.shields.io/packagist/v/cloud-dfe/sdk-php.svg?style=flat-square 91 | [link-packagist]: https://packagist.org/packages/cloud-dfe/sdk-php 92 | -------------------------------------------------------------------------------- /src/Nfce.php: -------------------------------------------------------------------------------- 1 | client->send("POST", "/nfce", $payload); 15 | } 16 | 17 | /** 18 | * @param array $payload 19 | * @return \stdClass 20 | * @throws \Exception 21 | */ 22 | public function preview($payload) 23 | { 24 | return $this->client->send("POST", "/nfce/preview", $payload); 25 | } 26 | 27 | /** 28 | * @return \stdClass 29 | * @throws \Exception 30 | */ 31 | public function status() 32 | { 33 | return $this->client->send("GET", "/nfce/status", []); 34 | } 35 | 36 | /** 37 | * @param array $payload 38 | * @return \stdClass 39 | * @throws \Exception 40 | */ 41 | public function consulta($payload) 42 | { 43 | $key = self::checkKey($payload); 44 | return $this->client->send("GET", "/nfce/{$key}", []); 45 | } 46 | 47 | /** 48 | * @param array $payload 49 | * @return \stdClass 50 | * @throws \Exception 51 | */ 52 | public function busca($payload) 53 | { 54 | return $this->client->send("POST", "/nfce/busca", $payload); 55 | } 56 | 57 | /** 58 | * @param array $payload 59 | * @return \stdClass 60 | * @throws \Exception 61 | */ 62 | public function cancela($payload) 63 | { 64 | return $this->client->send("POST", "/nfce/cancela", $payload); 65 | } 66 | 67 | /** 68 | * @return \stdClass 69 | * @throws \Exception 70 | */ 71 | public function offline() 72 | { 73 | return $this->client->send("GET", "/nfce/offline", []); 74 | } 75 | 76 | /** 77 | * @param array $payload 78 | * @return \stdClass 79 | * @throws \Exception 80 | */ 81 | public function inutiliza($payload) 82 | { 83 | return $this->client->send("POST", "/nfce/inutiliza", $payload); 84 | } 85 | 86 | /** 87 | * @param array $payload 88 | * @return \stdClass 89 | * @throws \Exception 90 | */ 91 | public function pdf($payload) 92 | { 93 | $key = self::checkKey($payload); 94 | return $this->client->send("GET", "/nfce/pdf/{$key}", []); 95 | } 96 | 97 | /** 98 | * @param array $payload 99 | * @return \stdClass 100 | * @throws \Exception 101 | */ 102 | public function substitui($payload) 103 | { 104 | return $this->client->send("POST", "/nfce/substitui", $payload); 105 | } 106 | 107 | /** 108 | * @param array $payload 109 | * @return \stdClass 110 | * @throws \Exception 111 | */ 112 | public function backup($payload) 113 | { 114 | return $this->client->send("POST", "/nfce/backup", $payload); 115 | } 116 | 117 | /** 118 | * @param array $payload 119 | * @return \stdClass 120 | * @throws \Exception 121 | */ 122 | public function importa($payload) 123 | { 124 | return $this->client->send("POST", "/nfce/importa", $payload); 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /src/Cte.php: -------------------------------------------------------------------------------- 1 | client->send("GET", "/cte/status", []); 14 | } 15 | 16 | /** 17 | * @param array $payload 18 | * @return \stdClass 19 | * @throws \Exception 20 | */ 21 | public function consulta($payload) 22 | { 23 | $key = self::checkKey($payload); 24 | return $this->client->send("GET", "/cte/{$key}", []); 25 | } 26 | 27 | /** 28 | * @param array $payload 29 | * @return \stdClass 30 | * @throws \Exception 31 | */ 32 | public function pdf($payload) 33 | { 34 | $key = self::checkKey($payload); 35 | return $this->client->send("GET", "/cte/pdf/{$key}", []); 36 | } 37 | 38 | /** 39 | * @param array $payload 40 | * @return \stdClass 41 | * @throws \Exception 42 | */ 43 | public function cria($payload) 44 | { 45 | return $this->client->send("POST", "/cte", $payload); 46 | } 47 | 48 | /** 49 | * @param array $payload 50 | * @return \stdClass 51 | * @throws \Exception 52 | */ 53 | public function busca($payload) 54 | { 55 | return $this->client->send("POST", "/cte/busca", $payload); 56 | } 57 | 58 | /** 59 | * @param array $payload 60 | * @return \stdClass 61 | * @throws \Exception 62 | */ 63 | public function cancela($payload) 64 | { 65 | return $this->client->send("POST", "/cte/cancela", $payload); 66 | } 67 | 68 | /** 69 | * @param array $payload 70 | * @return \stdClass 71 | * @throws \Exception 72 | */ 73 | public function correcao($payload) 74 | { 75 | return $this->client->send("POST", "/cte/correcao", $payload); 76 | } 77 | 78 | /** 79 | * @param array $payload 80 | * @return \stdClass 81 | * @throws \Exception 82 | */ 83 | public function inutiliza($payload) 84 | { 85 | return $this->client->send("POST", "/cte/inutiliza", $payload); 86 | } 87 | 88 | /** 89 | * @param array $payload 90 | * @return \stdClass 91 | * @throws \Exception 92 | */ 93 | public function backup($payload) 94 | { 95 | return $this->client->send("POST", "/cte/backup", $payload); 96 | } 97 | 98 | /** 99 | * @param array $payload 100 | * @return \stdClass 101 | * @throws \Exception 102 | */ 103 | public function importa($payload) 104 | { 105 | return $this->client->send("POST", "/cte/importa", $payload); 106 | } 107 | 108 | /** 109 | * @param array $payload 110 | * @return \stdClass 111 | * @throws \Exception 112 | */ 113 | public function preview($payload) 114 | { 115 | return $this->client->send("POST", "/cte/preview", $payload); 116 | } 117 | 118 | /** 119 | * @param array $payload 120 | * @return \stdClass 121 | * @throws \Exception 122 | */ 123 | public function desacordo($payload) 124 | { 125 | return $this->client->send("POST", "/cte/desacordo", $payload); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /src/CteOS.php: -------------------------------------------------------------------------------- 1 | client->send("GET", "/cteos/status", []); 14 | } 15 | 16 | /** 17 | * @param array $payload 18 | * @return \stdClass 19 | * @throws \Exception 20 | */ 21 | public function consulta($payload) 22 | { 23 | $key = self::checkKey($payload); 24 | return $this->client->send("GET", "/cteos/{$key}", []); 25 | } 26 | 27 | /** 28 | * @param array $payload 29 | * @return \stdClass 30 | * @throws \Exception 31 | */ 32 | public function pdf($payload) 33 | { 34 | $key = self::checkKey($payload); 35 | return $this->client->send("GET", "/cteos/pdf/{$key}", []); 36 | } 37 | 38 | /** 39 | * @param array $payload 40 | * @return \stdClass 41 | * @throws \Exception 42 | */ 43 | public function cria($payload) 44 | { 45 | return $this->client->send("POST", "/cteos", $payload); 46 | } 47 | 48 | /** 49 | * @param array $payload 50 | * @return \stdClass 51 | * @throws \Exception 52 | */ 53 | public function busca($payload) 54 | { 55 | return $this->client->send("POST", "/cteos/busca", $payload); 56 | } 57 | 58 | /** 59 | * @param array $payload 60 | * @return \stdClass 61 | * @throws \Exception 62 | */ 63 | public function cancela($payload) 64 | { 65 | return $this->client->send("POST", "/cteos/cancela", $payload); 66 | } 67 | 68 | /** 69 | * @param array $payload 70 | * @return \stdClass 71 | * @throws \Exception 72 | */ 73 | public function correcao($payload) 74 | { 75 | return $this->client->send("POST", "/cteos/correcao", $payload); 76 | } 77 | 78 | /** 79 | * @param array $payload 80 | * @return \stdClass 81 | * @throws \Exception 82 | */ 83 | public function inutiliza($payload) 84 | { 85 | return $this->client->send("POST", "/cteos/inutiliza", $payload); 86 | } 87 | 88 | /** 89 | * @param array $payload 90 | * @return \stdClass 91 | * @throws \Exception 92 | */ 93 | public function backup($payload) 94 | { 95 | return $this->client->send("POST", "/cteos/backup", $payload); 96 | } 97 | 98 | /** 99 | * @param array $payload 100 | * @return \stdClass 101 | * @throws \Exception 102 | */ 103 | public function importa($payload) 104 | { 105 | return $this->client->send("POST", "/cteos/importa", $payload); 106 | } 107 | 108 | /** 109 | * @param array $payload 110 | * @return \stdClass 111 | * @throws \Exception 112 | */ 113 | public function preview($payload) 114 | { 115 | return $this->client->send("POST", "/cteos/preview", $payload); 116 | } 117 | 118 | /** 119 | * @param array $payload 120 | * @return \stdClass 121 | * @throws \Exception 122 | */ 123 | public function desacordo($payload) 124 | { 125 | return $this->client->send("POST", "/cteos/desacordo", $payload); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /src/Nfse.php: -------------------------------------------------------------------------------- 1 | client->send("POST", "/nfse", $payload); 15 | } 16 | 17 | /** 18 | * @param array $payload 19 | * @return \stdClass 20 | * @throws \Exception 21 | */ 22 | public function preview($payload) 23 | { 24 | return $this->client->send("POST", "/nfse/preview", $payload); 25 | } 26 | 27 | /** 28 | * @param array $payload 29 | * @return \stdClass 30 | * @throws \Exception 31 | */ 32 | public function pdf($payload) 33 | { 34 | $key = self::checkKey($payload); 35 | return $this->client->send("GET", "/nfse/pdf/{$key}", []); 36 | } 37 | 38 | /** 39 | * @param array $payload 40 | * @return \stdClass 41 | * @throws \Exception 42 | */ 43 | public function consulta($payload) 44 | { 45 | $key = self::checkKey($payload); 46 | return $this->client->send("GET", "/nfse/{$key}", []); 47 | } 48 | 49 | /** 50 | * @param array $payload 51 | * @return \stdClass 52 | * @throws \Exception 53 | */ 54 | public function cancela($payload) 55 | { 56 | return $this->client->send("POST", "/nfse/cancela", $payload); 57 | } 58 | 59 | /** 60 | * @param array $payload 61 | * @return \stdClass 62 | * @throws \Exception 63 | */ 64 | public function substitui($payload) 65 | { 66 | return $this->client->send("POST", "/nfse/substitui", $payload); 67 | } 68 | 69 | /** 70 | * @param array $payload 71 | * @return \stdClass 72 | * @throws \Exception 73 | */ 74 | public function busca($payload) 75 | { 76 | return $this->client->send("POST", "/nfse/busca", $payload); 77 | } 78 | 79 | /** 80 | * @param array $payload 81 | * @return \stdClass 82 | * @throws \Exception 83 | */ 84 | public function backup($payload) 85 | { 86 | return $this->client->send("POST", "/nfse/backup", $payload); 87 | } 88 | 89 | /** 90 | * @param array $payload 91 | * @return \stdClass 92 | * @throws \Exception 93 | */ 94 | public function localiza($payload) 95 | { 96 | return $this->client->send("POST", "/nfse/consulta", $payload); 97 | } 98 | 99 | /** 100 | * @param array $payload 101 | * @return \stdClass 102 | * @throws \Exception 103 | */ 104 | public function info($payload) 105 | { 106 | return $this->client->send("GET", "/nfse/info/{$payload["ibge"]}", []); 107 | } 108 | 109 | /** 110 | * @param array $payload 111 | * @return \stdClass 112 | * @throws \Exception 113 | */ 114 | public function conflito($payload) 115 | { 116 | return $this->client->send("POST", "/nfse/conflito", $payload); 117 | } 118 | 119 | /** 120 | * @return \stdClass 121 | * @throws \Exception 122 | */ 123 | public function offline() 124 | { 125 | return $this->client->send("GET", "/nfse/offline", []); 126 | } 127 | 128 | /** 129 | * @param array $payload 130 | * @return \stdClass 131 | * @throws \Exception 132 | */ 133 | public function resolve($payload) 134 | { 135 | $key = self::checkKey($payload); 136 | return $this->client->send("GET", "/nfse/resolve/{$key}", []); 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /src/Mdfe.php: -------------------------------------------------------------------------------- 1 | client->send("POST", "/mdfe", $payload); 15 | } 16 | 17 | /** 18 | * @param array $payload 19 | * @return \stdClass 20 | * @throws \Exception 21 | */ 22 | public function preview($payload) 23 | { 24 | return $this->client->send("POST", "/mdfe/preview", $payload); 25 | } 26 | 27 | /** 28 | * @return \stdClass 29 | * @throws \Exception 30 | */ 31 | public function status() 32 | { 33 | return $this->client->send("GET", "/mdfe/status", []); 34 | } 35 | 36 | /** 37 | * @param array $payload 38 | * @return \stdClass 39 | * @throws \Exception 40 | */ 41 | public function consulta($payload) 42 | { 43 | $key = self::checkKey($payload); 44 | return $this->client->send("GET", "/mdfe/{$key}", []); 45 | } 46 | 47 | /** 48 | * @param array $payload 49 | * @return \stdClass 50 | * @throws \Exception 51 | */ 52 | public function busca($payload) 53 | { 54 | return $this->client->send("POST", "/mdfe/busca", $payload); 55 | } 56 | 57 | /** 58 | * @param array $payload 59 | * @return \stdClass 60 | * @throws \Exception 61 | */ 62 | public function cancela($payload) 63 | { 64 | return $this->client->send("POST", "/mdfe/cancela", $payload); 65 | } 66 | 67 | /** 68 | * @param array $payload 69 | * @return \stdClass 70 | * @throws \Exception 71 | */ 72 | public function encerra($payload) 73 | { 74 | return $this->client->send("POST", "/mdfe/encerra", $payload); 75 | } 76 | 77 | /** 78 | * @param array $payload 79 | * @return \stdClass 80 | * @throws \Exception 81 | */ 82 | public function condutor($payload) 83 | { 84 | return $this->client->send("POST", "/mdfe/condutor", $payload); 85 | } 86 | 87 | /** 88 | * @return \stdClass 89 | * @throws \Exception 90 | */ 91 | public function offline() 92 | { 93 | return $this->client->send("GET", "/mdfe/offline", []); 94 | } 95 | 96 | /** 97 | * @param array $payload 98 | * @return \stdClass 99 | * @throws \Exception 100 | */ 101 | public function pdf($payload) 102 | { 103 | $key = self::checkKey($payload); 104 | return $this->client->send("GET", "/mdfe/pdf/{$key}", []); 105 | } 106 | 107 | /** 108 | * @param array $payload 109 | * @return \stdClass 110 | * @throws \Exception 111 | */ 112 | public function backup($payload) 113 | { 114 | return $this->client->send("POST", "/mdfe/backup", $payload); 115 | } 116 | 117 | /** 118 | * @param array $payload 119 | * @return \stdClass 120 | * @throws \Exception 121 | */ 122 | public function nfe($payload) 123 | { 124 | return $this->client->send("POST", "/mdfe/nfe", $payload); 125 | } 126 | 127 | /** 128 | * @return \stdClass 129 | * @throws \Exception 130 | */ 131 | public function abertos() 132 | { 133 | return $this->client->send("GET", "/mdfe/abertos", []); 134 | } 135 | 136 | /** 137 | * @param array $payload 138 | * @return \stdClass 139 | * @throws \Exception 140 | */ 141 | public function importa($payload) 142 | { 143 | return $this->client->send("POST", "/mdfe/importa", $payload); 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /src/Nfe.php: -------------------------------------------------------------------------------- 1 | client->send("POST", "/nfe", $payload); 13 | } 14 | 15 | // @param array $payload 16 | // @return \stdClass 17 | // @throws \Exception 18 | public function preview($payload) 19 | { 20 | return $this->client->send("POST", "/nfe/preview", $payload); 21 | } 22 | 23 | // @return \stdClass 24 | // @throws \Exception 25 | public function status() 26 | { 27 | return $this->client->send("GET", "/nfe/status", []); 28 | } 29 | 30 | // @param array $payload 31 | // @return \stdClass 32 | // @throws \Exception 33 | public function consulta($payload) 34 | { 35 | $key = self::checkKey($payload); 36 | return $this->client->send("GET", "/nfe/{$key}", []); 37 | } 38 | 39 | // @param array $payload 40 | // @return \stdClass 41 | // @throws \Exception 42 | public function busca($payload) 43 | { 44 | return $this->client->send("POST", "/nfe/busca", $payload); 45 | } 46 | 47 | // @param array $payload 48 | // @return \stdClass 49 | // @throws \Exception 50 | public function cancela($payload) 51 | { 52 | return $this->client->send("POST", "/nfe/cancela", $payload); 53 | } 54 | 55 | // @param array $payload 56 | // @return \stdClass 57 | // @throws \Exception 58 | public function correcao($payload) 59 | { 60 | return $this->client->send("POST", "/nfe/correcao", $payload); 61 | } 62 | 63 | // @param array $payload 64 | // @return \stdClass 65 | // @throws \Exception 66 | public function inutiliza($payload) 67 | { 68 | return $this->client->send("POST", "/nfe/inutiliza", $payload); 69 | } 70 | 71 | // @param array $payload 72 | // @return \stdClass 73 | // @throws \Exception 74 | public function pdf($payload) 75 | { 76 | $key = self::checkKey($payload); 77 | return $this->client->send("GET", "/nfe/pdf/{$key}", []); 78 | } 79 | 80 | // @param array $payload 81 | // @return \stdClass 82 | // @throws \Exception 83 | public function etiqueta($payload) 84 | { 85 | $key = self::checkKey($payload); 86 | return $this->client->send("GET", "/nfe/pdf/etiqueta/{$key}", []); 87 | } 88 | 89 | // @param array $payload 90 | // @return \stdClass 91 | // @throws \Exception 92 | public function simples($payload) 93 | { 94 | $key = self::checkKey($payload); 95 | return $this->client->send("GET", "/nfe/pdf/simples/{$key}", []); 96 | } 97 | 98 | // @param array $payload 99 | // @return \stdClass 100 | // @throws \Exception 101 | public function manifesta($payload) 102 | { 103 | return $this->client->send("POST", "/nfe/manifesta", $payload); 104 | } 105 | 106 | // @param array $payload 107 | // @return \stdClass 108 | // @throws \Exception 109 | public function backup($payload) 110 | { 111 | return $this->client->send("POST", "/nfe/backup", $payload); 112 | } 113 | 114 | // @param array $payload 115 | // @return \stdClass 116 | // @throws \Exception 117 | public function download($payload) 118 | { 119 | $key = self::checkKey($payload); 120 | return $this->client->send("GET", "/nfe/download/{$key}", []); 121 | } 122 | 123 | // @param array $payload 124 | // @return \stdClass 125 | // @throws \Exception 126 | public function recebidas($payload) 127 | { 128 | return $this->client->send("POST", "/nfe/recebidas", $payload); 129 | } 130 | 131 | // @param array $payload 132 | // @return \stdClass 133 | // @throws \Exception 134 | public function interessado($payload) 135 | { 136 | return $this->client->send("POST", "/nfe/interessado", $payload); 137 | } 138 | 139 | // @param array $payload 140 | // @return \stdClass 141 | // @throws \Exception 142 | public function importa($payload) 143 | { 144 | return $this->client->send("POST", "/nfe/importa", $payload); 145 | } 146 | 147 | // @param array $payload 148 | // @return \stdClass 149 | // @throws \Exception 150 | public function comprovante($payload) 151 | { 152 | return $this->client->send("POST", "/nfe/comprovante", $payload); 153 | } 154 | 155 | // @param array $payload 156 | // @return \stdClass 157 | // @throws \Exception 158 | public function cadastro($payload) 159 | { 160 | return $this->client->send("POST", "/nfe/cadastro", $payload); 161 | } 162 | } 163 | -------------------------------------------------------------------------------- /.sensiolabs.yml: -------------------------------------------------------------------------------- 1 | global_exclude_dirs: 2 | - vendor 3 | - examples 4 | - test 5 | 6 | exclude_patterns: 7 | 8 | rules: 9 | composer.apc_class_loader_should_be_enabled: 10 | enabled: true 11 | composer.dependencies_not_installable: 12 | enabled: true 13 | composer.invalid_file: 14 | enabled: true 15 | composer.security_issue_in_composer: 16 | enabled: true 17 | composer.unfixed_dependency_version: 18 | enabled: true 19 | composer.warning: 20 | enabled: true 21 | git.user_specific_ignored_file: 22 | enabled: false 23 | php.absolute_path_present: 24 | enabled: true 25 | allowed_paths: [/dev, /etc, /proc] 26 | php.bad_mutator_method_name_for_boolean_property: 27 | enabled: true 28 | php.class_too_long: 29 | enabled: true 30 | max_length: 500 31 | threshold: 5 32 | php.commented_out_code: 33 | enabled: true 34 | php.contaminant_third_party_component_license: 35 | enabled: true 36 | php.debug_statements: 37 | enabled: true 38 | php.dynamically_change_configuration: 39 | enabled: true 40 | php.file_contains_more_than_one_class: 41 | enabled: true 42 | php.for_loop_uses_test_function: 43 | enabled: true 44 | php.method_too_long: 45 | enabled: true 46 | max_length: 50 47 | threshold: 5 48 | php.missing_use_statement: 49 | enabled: true 50 | php.neglected_tests: 51 | enabled: true 52 | php.object_parameter_not_type_hinted: 53 | enabled: true 54 | php.php_magic_methods: 55 | enabled: true 56 | php.php_syntax_error: 57 | enabled: true 58 | php.too_many_files_per_folder_for_performance: 59 | enabled: true 60 | max_count: 10000 61 | php.too_permissive_file_permissions: 62 | enabled: true 63 | allowed_dirs: [bin, scripts] 64 | php.unreachable_code: 65 | enabled: true 66 | php.unused_local_variable_or_private_member: 67 | enabled: true 68 | php.unused_use_statement: 69 | enabled: true 70 | php.use_deprecated_function: 71 | enabled: true 72 | php.use_exit_function: 73 | enabled: true 74 | php.use_global_variable_or_function: 75 | enabled: true 76 | php.use_php_ereg_function: 77 | enabled: true 78 | php.use_php_eval_function: 79 | enabled: true 80 | php.use_php_sleep_function: 81 | enabled: true 82 | symfony.acme_bundle_found: 83 | enabled: true 84 | symfony.app.cache_or_log_file_in_repository: 85 | enabled: true 86 | symfony.app.confidential_parameters_file_present_in_repository: 87 | enabled: true 88 | symfony.app.first_level_service: 89 | enabled: true 90 | symfony.app.sensitive_data_found_in_application_configuration: 91 | enabled: true 92 | symfony.application_not_bootable: 93 | enabled: true 94 | symfony.configuration.yaml_syntax_error: 95 | enabled: true 96 | symfony.controller.action_method_too_long: 97 | enabled: true 98 | max_length: 20 99 | threshold: 10 100 | symfony.controller.get_action_mutates_resource: 101 | enabled: true 102 | symfony.controller.missing_redirect_after_post: 103 | enabled: true 104 | symfony.controller.non_action_public_method_in_controller_class: 105 | enabled: true 106 | symfony.controller.too_many_actions_per_controller: 107 | enabled: true 108 | max_count: 10 109 | threshold: 5 110 | symfony.controller.too_many_template_variables: 111 | enabled: true 112 | max_count: 6 113 | threshold: 5 114 | symfony.dependency_injection.no_container_as_parameter: 115 | enabled: true 116 | symfony.dependency_injection.no_entity_manager_as_parameter: 117 | enabled: true 118 | symfony.dependency_injection.use_dir_file_constant: 119 | enabled: true 120 | symfony.exceptions_enabled_in_production: 121 | enabled: true 122 | symfony.form.form_type_not_in_type_form_folder: 123 | enabled: true 124 | symfony.include_statement_used: 125 | enabled: true 126 | symfony.inject_request_service: 127 | enabled: true 128 | symfony.obvious_csrf_key: 129 | enabled: true 130 | symfony.print_statements: 131 | enabled: true 132 | symfony.request.session_cookie_default_name: 133 | enabled: true 134 | symfony.request.use_create_from_globals: 135 | enabled: true 136 | symfony.routing.action_not_restricted_by_method: 137 | enabled: true 138 | symfony.routing.route_references_non_existent_action: 139 | enabled: true 140 | symfony.routing.route_resource_not_loadable: 141 | enabled: true 142 | symfony.security.insecure_password_hashing_algorithm: 143 | enabled: true 144 | symfony.security.throw_access_denied_http_exception: 145 | enabled: true 146 | symfony.templating.too_many_esi_inclusions: 147 | enabled: true 148 | symfony.twig_not_bootable: 149 | enabled: true 150 | symfony.use_php_database_function: 151 | enabled: true 152 | symfony.use_php_response_function: 153 | enabled: true 154 | symfony.use_php_session_function: 155 | enabled: true 156 | symfony.use_super_globals: 157 | enabled: true 158 | symfony.verbose_logging_in_production: 159 | enabled: true 160 | symfony.version.end_of_life: 161 | enabled: true 162 | symfony.version.latest_stable: 163 | enabled: true 164 | symfony.version.out_of_maintenance: 165 | enabled: true 166 | symfony.web.contains_php_files: 167 | enabled: true 168 | symfony.web.web_bundle_folder_present_in_repository: 169 | enabled: true 170 | symfony.web_config_should_not_be_present: 171 | enabled: true 172 | task_fixme_comment: 173 | enabled: true 174 | task_todo_comment: 175 | enabled: true 176 | task_xxx_comment: 177 | enabled: true 178 | third_party.use_deprecated_class: 179 | enabled: true 180 | third_party.use_deprecated_service: 181 | enabled: true 182 | xml.syntax_error: 183 | enabled: true 184 | --------------------------------------------------------------------------------