-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Criação de transferência em lotes pelo PIX #54
Open
peidrao
wants to merge
142
commits into
main
Choose a base branch
from
imopix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 99 commits
Commits
Show all changes
142 commits
Select commit
Hold shift + click to select a range
9fbd40b
criar transferencia pix
peidrao 2306997
testes de transferencias pix
peidrao e1c6b24
exemplo de transferencia pix
peidrao 5121f2d
formatacao e remocao de pdb
peidrao cbcc864
Update tests/wrapper/test_pagamentos.py
peidrao dca8256
Update tests/wrapper/test_pagamentos.py
peidrao 33b6c34
Update tests/wrapper/test_pagamentos.py
peidrao 216dd29
fmt
peidrao cec80e5
adicao de novos escopo de autorizacao do pix
peidrao dbf4d76
fix testes
peidrao 558871d
fmt
peidrao e9d83cc
Update tests/wrapper/test_pagamentos.py
peidrao f088f9e
adicao de exemplo de trasnferencia usando cpf
peidrao 7168239
adicao de wrapper para consulta de pix
peidrao 08b50a6
testes no service de pix
peidrao 18a7e8b
testes na funcao para criar body da transferencia pix
peidrao 8ab341d
atualizacao de modelo e service transferencia pix
peidrao 3a7e9de
refatorando servico de transferencia pix em lote
peidrao 191b492
refatorando examplo de transferencia pix usando cpf
peidrao 7d8f3d7
servico para verificar se email eh valido
peidrao 5b97b46
testes em DocumentService
peidrao dede79a
fmt em DocumentService
peidrao 01a6dab
Update bb_wrapper/services/pix.py
peidrao 4f0166c
Update bb_wrapper/services/pix.py
peidrao e14abe7
ajustes em testes
peidrao 4c43560
correcoes em teste
peidrao a6e746b
mock em test_retry_request
peidrao 2846d7b
fmt
peidrao f9cff49
atualizacao da versao do py-bdd-context
peidrao 298faf0
adicao de novos testes
peidrao 4f77340
update lock file
peidrao 14e2564
fmt
peidrao e54c317
Update tests/wrapper/test_pagamentos.py
peidrao 857f9a3
refatoracao de testes
peidrao 8947873
fmt
peidrao 19c63e0
Update tests/utils.py
peidrao 585508b
Update examples/lotes_pagamento/consultar_transferencia_pix.py
peidrao b3aa363
Update tests/wrapper/test_request.py
peidrao fdc0250
BDD em PixServiceTesteCase
peidrao 8408423
fmt
peidrao 993dda4
espaco branco no final do arquivo json
peidrao b130142
adicionando bdd em testes
peidrao 6a86e7c
Update tests/services/test_documento.py
peidrao 1afda49
Update tests/services/test_documento.py
peidrao 4b02e21
Update tests/services/test_identify_key_type.py
peidrao 4355f03
Update tests/services/test_identify_key_type.py
peidrao 7b5a905
Update tests/wrapper/test_request.py
peidrao b0575e6
Update tests/services/test_identify_key_type.py
peidrao 100bb9e
ajustes na descricao dos testes
peidrao dbc034f
Update tests/services/test_identify_key_type.py
peidrao 7a13a25
Update tests/wrapper/test_request.py
peidrao 12f174b
Update tests/utils.py
peidrao 0d40ce7
ajustes em test
peidrao f16bd69
Update tests/services/test_identify_key_type.py
peidrao 471d83d
Update tests/services/test_identify_key_type.py
peidrao 5ebe8ce
Update tests/services/test_identify_key_type.py
peidrao f18f7da
Update tests/services/test_identify_key_type.py
peidrao 146b1ec
Update tests/services/test_identify_key_type.py
peidrao 83c5f1e
Update tests/services/test_documento.py
peidrao d50dfa3
Update tests/services/test_documento.py
peidrao 014bff8
Update tests/services/test_documento.py
peidrao 32a309d
Update bb_wrapper/models/pagamentos.py
peidrao e331ce3
ajuste em espaco de teste
peidrao ae5e6d9
Update tests/services/test_identify_key_type.py
peidrao 17faf03
Update tests/services/test_documento.py
peidrao 55103b0
Update tests/services/test_documento.py
peidrao 18f6ad6
Update tests/services/test_documento.py
peidrao 5964dd3
Update tests/services/test_identify_key_type.py
peidrao 59228f8
Update tests/services/test_documento.py
peidrao 545d9a4
Update tests/services/test_documento.py
peidrao 33f4c66
Update tests/services/test_identify_key_type.py
peidrao 3b1c761
Update tests/services/test_identify_key_type.py
peidrao 398adc9
Update tests/services/test_identify_key_type.py
peidrao a7f99e6
Update tests/services/test_identify_key_type.py
peidrao f7a03da
Update tests/services/test_documento.py
peidrao 14bdb29
Update tests/services/test_identify_key_type.py
peidrao 3e2fc28
Update tests/services/test_identify_key_type.py
peidrao 5f13d75
Update bb_wrapper/models/pagamentos.py
peidrao f7c8c76
Melhorar comentários em testes e remoção de método para buscar transf…
peidrao 002c065
Atualizacao de requests
peidrao 605729e
Atualizacao de poetry.lock
peidrao 30bb589
update requests
peidrao 07ee192
atualizacao do poetry.lock
peidrao 03aac77
utilizando requests 2.29.0
peidrao 9f15f13
ajuste no actions
peidrao c1b1472
Debugando CI, ls -al
PedroRegisPOAR 24d7128
Debugando CI, ls -al
PedroRegisPOAR d5316a6
Debugando CI, remove .native -> .venv
PedroRegisPOAR f0f7e3a
Debugando CI, poetry show --tree
PedroRegisPOAR 1d2f8f9
Debugando CI, poetry show --tree
PedroRegisPOAR f9f5bed
Update .github/workflows/pypi.yml
PedroRegisPOAR 86da7f5
Update .github/workflows/tests.yml
PedroRegisPOAR 88d6b8e
Update .github/workflows/tests.yml
PedroRegisPOAR a05ddce
Update .github/workflows/tests.yml
PedroRegisPOAR c9295fb
Fixa requests = "2.30.0"
PedroRegisPOAR a2f84be
Fixa urllib3 = "1.26.15"
PedroRegisPOAR d6243ca
Atualiza poetry da Action
PedroRegisPOAR c5f9ed9
fmt
PedroRegisPOAR 304d4ab
Atualiza poetry usado localmente para 1.4.2
PedroRegisPOAR d5c37ce
Update tests/wrapper/test_pagamentos.py
peidrao b3fd154
atualizacao de nomes cpf e cnpj
peidrao 5174020
alterando nomeacao de pix para PIX em comentarios
peidrao 756df5f
Remove result-bin
PedroRegisPOAR e183604
consultar pix
peidrao 07b044e
teste de consulta de pix
peidrao a158a01
fmt
peidrao 3c23d45
fmt
peidrao 0df0a6f
consultar pix exemplo
peidrao 28796a4
refatoracao de testes usando o bdd
peidrao bc13ca3
alteracao do readme, com novos recursos
peidrao 3767851
Merge branch 'imopix' of github.com:imobanco/bb-wrapper into imopix
peidrao 9a30c81
ajustando comentarios nos testes do BaseBBWrapper
peidrao 2cce1ec
Merge branch 'imopix' of github.com:imobanco/bb-wrapper into imopix
peidrao e3c5b70
adicionando campo de documento para enviar cpf/cnpj
peidrao b2a6a2d
adicionando classmethod em verifica_documento
peidrao 720d3e6
criacao de pasta certs com nix
peidrao c38445b
Update bb_wrapper/wrapper/pagamento_lote.py
peidrao 6691f0c
Update bb_wrapper/models/pagamentos.py
peidrao 7af9f63
ajustes na interface do transferencia pix
peidrao f48d900
Update bb_wrapper/models/pagamentos.py
peidrao eedcbe5
ajustes em testes e ajustes na documentacao
peidrao 2e8895b
merge com main
peidrao 9925265
adiciona pequenas mudanças em nomes de métodos e classes
peidrao 6e4c515
remover tipo de chave pix da docsstring TipoChavePIX
peidrao 9db1079
adiciona verificador de documento no serviço destinado ao pix
peidrao 219ae20
adiciona modelo para transferencia pix via dados bancários
peidrao e58dd32
adiciona serviço de transferencia pix via dados bancários no bb-wrapper
peidrao 012dccc
adiciona testes unitários
peidrao 31cc8ae
adiciona example de chamada de requisição
peidrao c2ff8f4
adiciona numero ISPB
peidrao f59ddc5
adiciona valores bancários como opcionais
peidrao 8934d56
cria exemplo de transferencia pix via dados bancários apenas pela con…
peidrao 310a6e8
Apply suggestions from code review
peidrao a81a5b3
ajustes
peidrao 446e6df
ajustar modelos
peidrao e462efa
ajustar testes em wrapper
peidrao 3ef005e
ajustar testes
peidrao ded5afb
adiciona logging no exemplo!
rodrigondec d1ea125
ajustes
peidrao 9f62125
removendo valores nulos
peidrao 45f0277
adiciona tratamento do COMPE e cpf/cnpj dos dados.
rodrigondec 28f6829
ajustes
rodrigondec File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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
35 changes: 35 additions & 0 deletions
35
examples/lotes_pagamento/data/transferencia_pix_chave_aleatoria.json
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,35 @@ | ||
{ | ||
"numeroRequisicao": 921347, | ||
"estadoRequisicao": 1, | ||
"quantidadeTransferencias": 1, | ||
"valorTransferencias": 15.5, | ||
"quantidadeTransferenciasValidas": 1, | ||
"valorTransferenciasValidas": 15.5, | ||
"listaTransferencias": [ | ||
{ | ||
"identificadorPagamento": 90921347731030000, | ||
"data": 19042023, | ||
"valor": 15.5, | ||
"documentoDebito": 0, | ||
"documentoCredito": 0, | ||
"descricaoPagamento": "nova transferencia", | ||
"descricaoPagamentoInstantaneo": "", | ||
"formaIdentificacao": 4, | ||
"dddTelefone": 0, | ||
"telefone": 0, | ||
"email": "", | ||
"cpf": 0, | ||
"cnpj": 0, | ||
"identificacaoAleatoria": "d14d32de-b3b9-4c31-9f89-8df2cec92c50", | ||
"numeroCOMPE": 0, | ||
"numeroISPB": 0, | ||
"tipoConta": 0, | ||
"agencia": 0, | ||
"conta": 0, | ||
"digitoVerificadorConta": "", | ||
"contaPagamento": "", | ||
"indicadorMovimentoAceito": "S", | ||
"erros": [] | ||
} | ||
] | ||
} |
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,35 @@ | ||
{ | ||
"numeroRequisicao": 9221347, | ||
"estadoRequisicao": 1, | ||
"quantidadeTransferencias": 1, | ||
"valorTransferencias": 7999.99, | ||
"quantidadeTransferenciasValidas": 1, | ||
"valorTransferenciasValidas": 7999.99, | ||
"listaTransferencias": [ | ||
{ | ||
"identificadorPagamento": 99221347731030000, | ||
"data": 20042023, | ||
"valor": 7999.99, | ||
"documentoDebito": 0, | ||
"documentoCredito": 0, | ||
"descricaoPagamento": "transferencia CPF", | ||
"descricaoPagamentoInstantaneo": "", | ||
"formaIdentificacao": 3, | ||
"dddTelefone": 0, | ||
"telefone": 0, | ||
"email": "", | ||
"cpf": 28779295827, | ||
"cnpj": 0, | ||
"identificacaoAleatoria": "", | ||
"numeroCOMPE": 0, | ||
"numeroISPB": 0, | ||
"tipoConta": 0, | ||
"agencia": 0, | ||
"conta": 0, | ||
"digitoVerificadorConta": "", | ||
"contaPagamento": "", | ||
"indicadorMovimentoAceito": "S", | ||
"erros": [] | ||
PedroRegisPOAR marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
] | ||
} |
31 changes: 31 additions & 0 deletions
31
examples/lotes_pagamento/transferencia_pix_chave_aleatoria.py
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,31 @@ | ||
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": 921347, | ||
"agencia": 1607, | ||
"conta": 99738672, | ||
"dv_conta": "X", | ||
PedroRegisPOAR marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
transferencia_data = { | ||
"descricao": "nova transferencia", | ||
"data_transferencia": today.strftime(bb_fmt), | ||
"valor_transferencia": 15.50, | ||
"forma_id": 4, | ||
"chave_aleatoria": "d14d32de-b3b9-4c31-9f89-8df2cec92c50", | ||
} | ||
|
||
response = c.criar_transferencia_pix(**lote_data, **transferencia_data) | ||
dump_response(response, os.path.realpath(__file__)) |
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,30 @@ | ||
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": 9222347, | ||
"agencia": 1607, | ||
"conta": 99738672, | ||
"dv_conta": "X", | ||
} | ||
|
||
transferencia_data = { | ||
"descricao": "transferencia CPF", | ||
"data_transferencia": today.strftime(bb_fmt), | ||
"valor_transferencia": 7999.99, | ||
"chave": "28779295827", | ||
} | ||
|
||
response = c.criar_transferencia_pix(**lote_data, **transferencia_data) | ||
dump_response(response, os.path.realpath(__file__)) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
se não me engano tem que ser int mesmo!
Sim, a API BB é horrível nesse nível. Precisa transformar em int mesmo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ainda está como "str"!