52 lines
1.3 KiB
Python
52 lines
1.3 KiB
Python
import json
|
|
from src.Models.payload import validate_payload
|
|
|
|
payload = {
|
|
"fila": "empresa",
|
|
"metodo": "POST",
|
|
"cliente": "tray",
|
|
"url_base": "https://api.sandbox.plugnotas.com.br",
|
|
"config": {
|
|
"x_api_key": "2da392a6-79d2-4304-a8b7-959572c7e44d",
|
|
"user_postgres": "tecnospeed",
|
|
"pass_postgres": "u7QimG7E%21SF%2F%2FJC2c8",
|
|
"host_postgres": "postgres",
|
|
"port_postgres": "5432",
|
|
"database_postgres": "tecnospeed"
|
|
},
|
|
"dados": {
|
|
"cpfCnpj": "94074986000198",
|
|
"razaoSocial": "Tech nux",
|
|
"nomeFantasia": "Tech nux ltda",
|
|
"inscricaoMunicipal": "0001",
|
|
"simplesNacional": True,
|
|
"regimeTributario": 1,
|
|
"regimeTributarioEspecial": 1,
|
|
"incentivadorCultural": False,
|
|
"incentivoFiscal": True,
|
|
"certificado": "cert-mock-01",
|
|
"endereco": {
|
|
"codigoPais": "1058",
|
|
"descricaoPais": "BRASIL",
|
|
"tipoLogradouro": "Avenida",
|
|
"logradouro": "Avenida",
|
|
"numero": "123",
|
|
"complemento": "Casa",
|
|
"tipoBairro": "Bairro",
|
|
"bairro": "Centro",
|
|
"codigoCidade": "5200175",
|
|
"descricaoCidade": "ÁGUA FRIA DE GOIÁS",
|
|
"estado": "GO",
|
|
"cep": "68907-460"
|
|
},
|
|
"nfe": { "ativo": True },
|
|
"nfse": { "ativo": False }
|
|
}
|
|
}
|
|
|
|
try:
|
|
env = validate_payload(payload)
|
|
print("VALIDO")
|
|
except Exception as e:
|
|
print("ERRO:", type(e))
|
|
print(e)
|