Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
adiciona scripts de exemplos
Browse files Browse the repository at this point in the history
  • Loading branch information
brenomfviana committed Nov 30, 2023
1 parent 2ebed39 commit 3c15b02
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import os
from datetime import date

from examples.utils import dump_response

from bb_wrapper.wrapper import PagamentoLoteBBWrapper

c = PagamentoLoteBBWrapper(cert=("./certs/cert.pem", "./certs/key.pem"))


today = date.today()
bb_fmt = "%d%m%Y"

lote_data = {
"n_requisicao": 580000,
"agencia": 1607,
"conta": 99738672,
"dv_conta": "X",
}
transferencia_data = {
"codigo_banco": 1,
"conta_pagamento_destino": 3066,
"documento": "99391916180",
"data_transferencia": today.strftime(bb_fmt),
"valor_transferencia": 15.50,
"descricao": "string",
}


response = c.cadastrar_transferencia(**lote_data, **transferencia_data)

dump_response(response, os.path.realpath(__file__))
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import os

from examples.utils import dump_response

from bb_wrapper.wrapper import PagamentoLoteBBWrapper

c = PagamentoLoteBBWrapper(cert=("./certs/cert.pem", "./certs/key.pem"))

_id = "90580000731030001"


response = c.consultar_transferencia(
_id,
)

dump_response(response, os.path.realpath(__file__))
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"estadoRequisicao": 3,
"quantidadeTransferencias": 1,
"totalTransferencias": 15.5,
"quantidadeTransferenciasValidas": 0,
"totalTransferenciasValidas": 0,
"transferencias": [
{
"identificadorTransferencia": "90580000731030001",
"numeroCOMPE": 1,
"numeroISPB": 0,
"agenciaCredito": 0,
"contaCorrenteCredito": 0,
"digitoVerificadorContaCorrente": "X",
"contaPagamentoCredito": "3066",
"cpfBeneficiario": 99391916180,
"dataTransferencia": 30112023,
"valorTransferencia": 15.5,
"documentoDebito": 0,
"documentoCredito": 0,
"tipoCredito": 1,
"codigoFinalidadeDOC": "",
"codigoFinalidadeTED": "",
"numeroDepositoJudicial": "",
"descricaoTransferencia": "string",
"indicadorAceite": "N",
"erros": [
23
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"id": 90580000731030000,
"estadoPagamento": "INCONSISTENTE",
"tipoCredito": 1,
"agenciaDebito": 1607,
"contaCorrenteDebito": 99738672,
"digitoVerificadorContaCorrenteDebito": "X",
"inicioCartaoCredito": 0,
"fimCartaoCredito": 0,
"dataPagamento": 30112023,
"valorPagamento": 15.5,
"documentoDebito": 0,
"codigoAutenticacaoPagamento": "",
"numeroDepositoJudicial": "",
"codigoFinalidadeDOC": "",
"codigoFinalidadeTED": "",
"listaPagamentos": [
{
"numeroCOMPE": 1,
"numeroISPB": 0,
"agenciaCredito": 0,
"contaCorrenteCredito": 0,
"digitoVerificadorContaCorrenteCredito": "",
"numeroContaCredito": "3066",
"tipoBeneficiario": 1,
"cpfCnpjBeneficiario": 99391916180,
"nomeBeneficiario": "LUIZ NILO REIS",
"documentoCredito": 0,
"texto": ""
}
],
"listaDevolucao": [
{
"codigoMotivo": 23,
"dataDevolucao": 0,
"valorDevolucao": 0
}
]
}

0 comments on commit 3c15b02

Please sign in to comment.