├── .gitignore ├── Hello └── src │ └── teste │ ├── MinhaAnotacao.java │ └── Pessoa.java ├── README.md ├── annotation-test ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── javaparainiciantes │ │ │ └── boot │ │ │ ├── AnnotationTestApplication.java │ │ │ └── service │ │ │ ├── CachedTestService.java │ │ │ ├── ITestService.java │ │ │ ├── TestService.java │ │ │ └── TimedTestService.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── javaparainiciantes │ └── boot │ └── AnnotationTestApplicationTests.java ├── bacen-pix-client-gerencianet ├── .swagger-codegen-ignore ├── .swagger-codegen │ └── VERSION ├── README.md ├── docs │ ├── AbatimentoAplicado.md │ ├── AllOfCobVValorDesconto.md │ ├── AllOfCobsConsultadasCobsItems.md │ ├── AllOfCobsVConsultadasCobsItems.md │ ├── AllOfDadosDevedorDevedor.md │ ├── AllOfDadosRecebedorRecebedor.md │ ├── AllOfLotesCobVConsultadosLotesItems.md │ ├── AllOfParametrosConsultaPixTxid.md │ ├── AllOfPayloadLocationConsultadasLocItems.md │ ├── AllOfPixConsultadosPixItems.md │ ├── AllOfPixTxid.md │ ├── AllOfWebhooksConsultadosWebhooksItems.md │ ├── CobApi.md │ ├── CobApresentacao.md │ ├── CobBase.md │ ├── CobBaseInfoAdicionais.md │ ├── CobCompleta.md │ ├── CobCriacao.md │ ├── CobDataDeVencimento.md │ ├── CobExpiracao.md │ ├── CobGerada.md │ ├── CobPayload.md │ ├── CobPayloadApi.md │ ├── CobPayloadValor.md │ ├── CobRevisada.md │ ├── CobSolicitada.md │ ├── CobVApi.md │ ├── CobVCompleta.md │ ├── CobVGerada.md │ ├── CobVPayload.md │ ├── CobVPayloadValor.md │ ├── CobVRevisada.md │ ├── CobVSolicitada.md │ ├── CobVValor.md │ ├── CobValor.md │ ├── CobsConsultadas.md │ ├── CobsVConsultadas.md │ ├── DadosComplementaresPessoa.md │ ├── DadosDevedor.md │ ├── DadosRecebedor.md │ ├── Devolucao.md │ ├── DevolucaoHorario.md │ ├── DevolucaoSolicitada.md │ ├── JuroAplicado.md │ ├── LoteCobVApi.md │ ├── LoteCobVConsultado.md │ ├── LoteCobVConsultadoCobsv.md │ ├── LoteCobVGerado.md │ ├── LotesCobVConsultados.md │ ├── MultaAplicada.md │ ├── Paginacao.md │ ├── ParametrosConsultaCob.md │ ├── ParametrosConsultaLote.md │ ├── ParametrosConsultaPayloadLocation.md │ ├── ParametrosConsultaPix.md │ ├── ParametrosConsultaWebhooks.md │ ├── PayloadLocation.md │ ├── PayloadLocationApi.md │ ├── PayloadLocationCob.md │ ├── PayloadLocationCompleta.md │ ├── PayloadLocationConsultadas.md │ ├── PayloadLocationSolicitada.md │ ├── PessoaFisica.md │ ├── PessoaJuridica.md │ ├── Pix.md │ ├── PixApi.md │ ├── PixConsultados.md │ ├── Problema.md │ ├── Txid.md │ ├── Violacao.md │ ├── WebhookApi.md │ ├── WebhookCompleto.md │ ├── WebhookSolicitado.md │ └── WebhooksConsultados.md ├── pom.xml └── src │ ├── main │ └── java │ │ └── com │ │ └── pedrocavalero │ │ └── pix │ │ └── client │ │ ├── api │ │ ├── CobApi.java │ │ ├── CobPayloadApi.java │ │ ├── CobVApi.java │ │ ├── LoteCobVApi.java │ │ ├── PayloadLocationApi.java │ │ ├── PixApi.java │ │ └── WebhookApi.java │ │ ├── invoker │ │ ├── ApiClient.java │ │ ├── CustomInstantDeserializer.java │ │ ├── RFC3339DateFormat.java │ │ └── auth │ │ │ ├── ApiKeyAuth.java │ │ │ ├── Authentication.java │ │ │ ├── HttpBasicAuth.java │ │ │ ├── OAuth.java │ │ │ └── OAuthFlow.java │ │ └── model │ │ ├── AbatimentoAplicado.java │ │ ├── AllOfCobsConsultadasCobsItems.java │ │ ├── AllOfCobsVConsultadasCobsItems.java │ │ ├── AllOfDadosDevedorDevedor.java │ │ ├── AllOfDadosRecebedorRecebedor.java │ │ ├── AllOfLotesCobVConsultadosLotesItems.java │ │ ├── AllOfParametrosConsultaPixTxid.java │ │ ├── AllOfPayloadLocationConsultadasLocItems.java │ │ ├── AllOfPixConsultadosPixItems.java │ │ ├── AllOfPixTxid.java │ │ ├── AllOfWebhooksConsultadosWebhooksItems.java │ │ ├── CobApresentacao.java │ │ ├── CobBase.java │ │ ├── CobBaseInfoAdicionais.java │ │ ├── CobCompleta.java │ │ ├── CobCriacao.java │ │ ├── CobDataDeVencimento.java │ │ ├── CobExpiracao.java │ │ ├── CobGerada.java │ │ ├── CobPayload.java │ │ ├── CobPayloadValor.java │ │ ├── CobRevisada.java │ │ ├── CobSolicitada.java │ │ ├── CobVCompleta.java │ │ ├── CobVGerada.java │ │ ├── CobVPayload.java │ │ ├── CobVPayloadValor.java │ │ ├── CobVRevisada.java │ │ ├── CobVSolicitada.java │ │ ├── CobVValor.java │ │ ├── CobValor.java │ │ ├── CobsConsultadas.java │ │ ├── CobsVConsultadas.java │ │ ├── DadosComplementaresPessoa.java │ │ ├── DadosDevedor.java │ │ ├── DadosRecebedor.java │ │ ├── DescontoDataFixa.java │ │ ├── DescontosAplicados.java │ │ ├── Devolucao.java │ │ ├── DevolucaoHorario.java │ │ ├── DevolucaoSolicitada.java │ │ ├── JuroAplicado.java │ │ ├── LoteCobVConsultado.java │ │ ├── LoteCobVConsultadoCobsv.java │ │ ├── LoteCobVGerado.java │ │ ├── LotesCobVConsultados.java │ │ ├── MultaAplicada.java │ │ ├── Paginacao.java │ │ ├── ParametrosConsultaCob.java │ │ ├── ParametrosConsultaLote.java │ │ ├── ParametrosConsultaPayloadLocation.java │ │ ├── ParametrosConsultaPix.java │ │ ├── ParametrosConsultaWebhooks.java │ │ ├── PayloadLocation.java │ │ ├── PayloadLocationCob.java │ │ ├── PayloadLocationCompleta.java │ │ ├── PayloadLocationConsultadas.java │ │ ├── PayloadLocationQrCode.java │ │ ├── PayloadLocationSolicitada.java │ │ ├── PessoaFisica.java │ │ ├── PessoaJuridica.java │ │ ├── Pix.java │ │ ├── PixConsultados.java │ │ ├── Problema.java │ │ ├── Txid.java │ │ ├── Violacao.java │ │ ├── WebhookCompleto.java │ │ ├── WebhookSolicitado.java │ │ └── WebhooksConsultados.java │ └── test │ └── java │ └── com │ └── pedrocavalero │ └── pix │ └── client │ └── api │ ├── CobApiTest.java │ ├── CobPayloadApiTest.java │ ├── CobVApiTest.java │ ├── LoteCobVApiTest.java │ ├── PayloadLocationApiTest.java │ ├── PixApiTest.java │ └── WebhookApiTest.java ├── boot-pix-client ├── openapi.yaml ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── javaparainiciantes │ │ │ └── boot │ │ │ ├── BootPixClientApplication.java │ │ │ ├── BootPixClientConfig.java │ │ │ └── pix │ │ │ ├── api │ │ │ ├── CobApi.java │ │ │ ├── CobPayloadApi.java │ │ │ ├── PixApi.java │ │ │ └── WebhookApi.java │ │ │ ├── invoker │ │ │ ├── ApiClient.java │ │ │ ├── CustomInstantDeserializer.java │ │ │ ├── RFC3339DateFormat.java │ │ │ └── auth │ │ │ │ ├── ApiKeyAuth.java │ │ │ │ ├── Authentication.java │ │ │ │ ├── HttpBasicAuth.java │ │ │ │ ├── HttpBearerAuth.java │ │ │ │ ├── OAuth.java │ │ │ │ └── OAuthFlow.java │ │ │ └── model │ │ │ ├── Cob.java │ │ │ ├── CobApresentacao.java │ │ │ ├── CobBase.java │ │ │ ├── CobBaseInfoAdicionais.java │ │ │ ├── CobBaseValor.java │ │ │ ├── CobCompleta.java │ │ │ ├── CobCriacao.java │ │ │ ├── CobExpiracao.java │ │ │ ├── CobGerada.java │ │ │ ├── CobGeradaAllOf.java │ │ │ ├── CobPayload.java │ │ │ ├── CobPayloadAllOf.java │ │ │ ├── CobRevisada.java │ │ │ ├── CobRevisadaAllOf.java │ │ │ ├── CobSolicitada.java │ │ │ ├── CobSolicitadaAllOf.java │ │ │ ├── CobStatus.java │ │ │ ├── CobsConsultadas.java │ │ │ ├── Devolucao.java │ │ │ ├── DevolucaoHorario.java │ │ │ ├── InlineObject.java │ │ │ ├── Paginacao.java │ │ │ ├── ParametrosConsultaCob.java │ │ │ ├── ParametrosConsultaPix.java │ │ │ ├── Pessoa.java │ │ │ ├── PessoaFisica.java │ │ │ ├── PessoaJuridica.java │ │ │ ├── Pix.java │ │ │ ├── PixConsultados.java │ │ │ └── Webhook.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── javaparainiciantes │ └── boot │ └── BootPixClientApplicationTests.java ├── crud-example ├── pom.xml └── src │ ├── main │ ├── java │ │ └── br │ │ │ └── com │ │ │ └── example │ │ │ └── demo │ │ │ ├── CrudExampleApplication.java │ │ │ ├── model │ │ │ └── Person.java │ │ │ └── repository │ │ │ └── PersonRepository.java │ └── resources │ │ ├── Presentation │ │ └── application.properties │ └── test │ └── java │ └── com │ └── example │ └── demo │ └── CrudExampleApplicationTests.java ├── demo-runner ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── demo │ │ │ └── DemoRunnerApplication.java │ └── resources │ │ ├── application-dev.properties │ │ ├── application-test.properties │ │ ├── application.properties │ │ └── teste.txt │ └── test │ └── java │ └── com │ └── example │ └── demo │ └── DemoRunnerApplicationTests.java ├── demo ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── demo │ │ │ ├── DemoApplication.java │ │ │ ├── SpringFoxConfig.java │ │ │ ├── controller │ │ │ ├── HelloController.java │ │ │ ├── InboundAdapter.java │ │ │ └── PessoaController.java │ │ │ ├── model │ │ │ └── Pessoa.java │ │ │ ├── repository │ │ │ └── PessoaRepository.java │ │ │ └── service │ │ │ ├── MeuServico.java │ │ │ ├── NiceComponent.java │ │ │ └── PessoaService.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── example │ └── demo │ ├── DemoApplicationTests.java │ └── controller │ ├── HelloControllerIntTest.java │ ├── HelloControllerTest.java │ ├── PessoaControllerIntTest.java │ └── PessoaControllerTest.java ├── lombok-example ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── demo │ │ │ ├── LombokExampleApplication.java │ │ │ └── Person.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── example │ └── demo │ └── LombokExampleApplicationTests.java ├── oauth2-client ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── javaparainiciantes │ │ │ └── boot │ │ │ ├── OAuth2ClientApplication.java │ │ │ ├── OAuth2ClientConfig.java │ │ │ ├── client │ │ │ └── HelloRestClient.java │ │ │ └── controller │ │ │ └── HelloRestController.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── javaparainiciantes │ └── boot │ └── OAuth2ClientApplicationTests.java ├── rest-api-crud-example ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── javaparainiciantes │ │ │ └── boot │ │ │ ├── Carro.java │ │ │ ├── CarroController.java │ │ │ ├── CarroRepository.java │ │ │ └── RestApiCrudExampleApplication.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── javaparainiciantes │ └── boot │ └── RestApiCrudExampleApplicationTests.java ├── security-demo ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── javaparainiciantes │ │ │ └── boot │ │ │ ├── SecurityDemoApplication.java │ │ │ └── controller │ │ │ └── HelloController.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── javaparainiciantes │ └── boot │ └── SecurityDemoApplicationTests.java ├── security-example ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── demo │ │ │ ├── BasicConfiguration.java │ │ │ ├── SecurityExampleApplication.java │ │ │ └── controller │ │ │ └── HelloController.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── example │ └── demo │ ├── BasicConfigurationIntegrationTest.java │ └── SecurityExampleApplicationTests.java ├── spring-swagger-codegen-api-client ├── .swagger-codegen-ignore ├── .swagger-codegen │ └── VERSION ├── .travis.yml ├── README.md ├── build.gradle ├── build.sbt ├── docs │ ├── Cobranca.md │ ├── CobrancaPatchRequest.md │ ├── CobrancaPatchResponse.md │ ├── CobrancaPatchResponseCalendario.md │ ├── CobrancaPutRequest.md │ ├── CobrancaPutRequestCalendario.md │ ├── CobrancaPutResponse.md │ ├── Cobrancas.md │ ├── CobrancasCalendario.md │ ├── CobrancasCobs.md │ ├── CobrancasDevedor.md │ ├── CobrancasInfoAdicionais.md │ ├── CobrancasParametros.md │ ├── CobrancasParametrosPaginacao.md │ ├── CobrancasValor.md │ ├── DefaultApi.md │ ├── DevolucaoPix.md │ ├── DevolucaoPutRequest.md │ ├── DevolucaoPutResponse.md │ ├── DevolucaoPutResponseHorario.md │ ├── Pix.md │ ├── Pixs.md │ ├── PixsDevolucoes.md │ ├── PixsHorario.md │ ├── PixsPagador.md │ ├── PixsParametros.md │ ├── PixsParametrosPaginacao.md │ ├── PixsPix.md │ ├── Qrcode.md │ ├── Webhook.md │ ├── Webhooks.md │ ├── WebhooksParametros.md │ ├── WebhooksParametrosPaginacao.md │ └── WebhooksWebhooks.md ├── git_push.sh ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── pom.xml ├── settings.gradle └── src │ ├── main │ ├── AndroidManifest.xml │ └── java │ │ └── com │ │ └── pedrocavalero │ │ └── pix │ │ ├── DefaultApi.java │ │ ├── Main.java │ │ ├── invoker │ │ ├── ApiClient.java │ │ ├── CustomInstantDeserializer.java │ │ ├── RFC3339DateFormat.java │ │ └── auth │ │ │ ├── ApiKeyAuth.java │ │ │ ├── Authentication.java │ │ │ ├── HttpBasicAuth.java │ │ │ ├── OAuth.java │ │ │ └── OAuthFlow.java │ │ └── model │ │ ├── Cobranca.java │ │ ├── CobrancaPatchRequest.java │ │ ├── CobrancaPatchResponse.java │ │ ├── CobrancaPatchResponseCalendario.java │ │ ├── CobrancaPutRequest.java │ │ ├── CobrancaPutRequestCalendario.java │ │ ├── CobrancaPutResponse.java │ │ ├── Cobrancas.java │ │ ├── CobrancasCalendario.java │ │ ├── CobrancasCobs.java │ │ ├── CobrancasDevedor.java │ │ ├── CobrancasInfoAdicionais.java │ │ ├── CobrancasParametros.java │ │ ├── CobrancasParametrosPaginacao.java │ │ ├── CobrancasValor.java │ │ ├── DevolucaoPix.java │ │ ├── DevolucaoPutRequest.java │ │ ├── DevolucaoPutResponse.java │ │ ├── DevolucaoPutResponseHorario.java │ │ ├── Pix.java │ │ ├── Pixs.java │ │ ├── PixsDevolucoes.java │ │ ├── PixsHorario.java │ │ ├── PixsPagador.java │ │ ├── PixsParametros.java │ │ ├── PixsParametrosPaginacao.java │ │ ├── PixsPix.java │ │ ├── Qrcode.java │ │ ├── Webhook.java │ │ ├── Webhooks.java │ │ ├── WebhooksParametros.java │ │ ├── WebhooksParametrosPaginacao.java │ │ └── WebhooksWebhooks.java │ └── test │ └── java │ └── com │ └── pedrocavalero │ └── pix │ └── DefaultApiTest.java ├── webclient-demo ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── javaparainiciantes │ │ │ └── boot │ │ │ ├── WebclientDemoApplication.java │ │ │ └── WebclientDemoConfig.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── javaparainiciantes │ └── boot │ └── WebclientDemoApplicationTests.java ├── webclient-oauth2 ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── javaparainiciantes │ │ │ └── boot │ │ │ ├── WebClientOAuth2Config.java │ │ │ ├── WebClientOAuth2Controller.java │ │ │ └── WebclientOauth2Application.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── javaparainiciantes │ └── boot │ └── WebclientOauth2ApplicationTests.java ├── webflux-hello ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── javaparainiciantes │ │ │ └── boot │ │ │ ├── WebFluxHelloController.java │ │ │ ├── WebfluxHelloApplication.java │ │ │ └── WebfluxHelloWebSecurityConfig.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── javaparainiciantes │ └── boot │ └── WebfluxHelloApplicationTests.java └── webhook ├── pom.xml └── src ├── main ├── java │ └── com │ │ └── javaparainiciantes │ │ └── boot │ │ ├── WebhookApplication.java │ │ └── pix │ │ └── webhook │ │ └── controller │ │ └── WebhookController.java └── resources │ └── application.properties └── test └── java └── com └── javaparainiciantes └── boot └── WebhookApplicationTests.java /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.nar 17 | *.ear 18 | *.zip 19 | *.tar.gz 20 | *.rar 21 | 22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 23 | hs_err_pid* 24 | #eclipse 25 | .classpath 26 | .project 27 | .settings 28 | #maven 29 | .mvn 30 | mvnw 31 | mvnw.cmd 32 | .gitignore 33 | -------------------------------------------------------------------------------- /Hello/src/teste/MinhaAnotacao.java: -------------------------------------------------------------------------------- 1 | package teste; 2 | 3 | import static java.lang.annotation.ElementType.TYPE; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | @Retention(RUNTIME) 10 | @Target(TYPE) 11 | public @interface MinhaAnotacao { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /Hello/src/teste/Pessoa.java: -------------------------------------------------------------------------------- 1 | package teste; 2 | 3 | @MinhaAnotacao 4 | public class Pessoa { 5 | 6 | String nome; 7 | 8 | } 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # springboot-tests 2 | teste 3 3 | -------------------------------------------------------------------------------- /annotation-test/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.3.3.RELEASE 9 | 10 | 11 | com.javaparainiciantes.boot 12 | annotation-test 13 | 0.0.1-SNAPSHOT 14 | annotation-test 15 | Testando anotações com delegação 16 | 17 | 18 | 1.8 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-cache 25 | 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-devtools 30 | runtime 31 | true 32 | 33 | 34 | org.projectlombok 35 | lombok 36 | true 37 | 38 | 39 | org.springframework.boot 40 | spring-boot-starter-test 41 | test 42 | 43 | 44 | org.junit.vintage 45 | junit-vintage-engine 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | org.springframework.boot 55 | spring-boot-maven-plugin 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /annotation-test/src/main/java/com/javaparainiciantes/boot/AnnotationTestApplication.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.beans.factory.annotation.Qualifier; 5 | import org.springframework.boot.ApplicationArguments; 6 | import org.springframework.boot.ApplicationRunner; 7 | import org.springframework.boot.SpringApplication; 8 | import org.springframework.boot.autoconfigure.SpringBootApplication; 9 | import org.springframework.cache.annotation.EnableCaching; 10 | import org.springframework.stereotype.Component; 11 | 12 | import com.javaparainiciantes.boot.service.ITestService; 13 | 14 | @SpringBootApplication 15 | @EnableCaching 16 | public class AnnotationTestApplication { 17 | 18 | public static void main(String[] args) { 19 | SpringApplication.run(AnnotationTestApplication.class, args); 20 | } 21 | 22 | } 23 | 24 | @Component 25 | class Runner implements ApplicationRunner { 26 | 27 | @Autowired 28 | @Qualifier("timedTestService") 29 | ITestService testService; 30 | 31 | @Override 32 | public void run(ApplicationArguments args) throws Exception { 33 | System.out.println(testService); 34 | System.out.println("1:"+testService.hello()); 35 | System.out.println("2:"+testService.hello()); 36 | System.out.println("3:"+testService.hello()); 37 | System.out.println("4:"+testService.hello()); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /annotation-test/src/main/java/com/javaparainiciantes/boot/service/CachedTestService.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot.service; 2 | 3 | import org.springframework.beans.factory.annotation.Qualifier; 4 | import org.springframework.cache.annotation.Cacheable; 5 | import org.springframework.stereotype.Service; 6 | 7 | import lombok.AllArgsConstructor; 8 | 9 | @Service 10 | @AllArgsConstructor 11 | @Cacheable("testService") 12 | public class CachedTestService implements ITestService{ 13 | 14 | TestService testService; 15 | 16 | public String hello() { 17 | return testService.hello(); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /annotation-test/src/main/java/com/javaparainiciantes/boot/service/ITestService.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot.service; 2 | 3 | public interface ITestService { 4 | 5 | String hello(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /annotation-test/src/main/java/com/javaparainiciantes/boot/service/TestService.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot.service; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | @Service 6 | public class TestService implements ITestService{ 7 | 8 | public String hello() { 9 | System.out.println("Imprimindo Hello World Sem Cache"); 10 | delay(); 11 | return "Hello World"; 12 | } 13 | 14 | private void delay() { 15 | try { 16 | Thread.sleep(100); 17 | } catch (InterruptedException e) { 18 | // TODO Auto-generated catch block 19 | e.printStackTrace(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /annotation-test/src/main/java/com/javaparainiciantes/boot/service/TimedTestService.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot.service; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.beans.factory.annotation.Qualifier; 5 | import org.springframework.stereotype.Service; 6 | 7 | @Service 8 | public class TimedTestService implements ITestService{ 9 | 10 | @Autowired 11 | @Qualifier("cachedTestService") 12 | ITestService testService; 13 | 14 | public String hello() { 15 | long initialTime = System.nanoTime(); 16 | String result = testService.hello(); 17 | long finalTime = System.nanoTime(); 18 | System.out.printf("A chamada levou %f ms\n", (finalTime-initialTime)/1000000.0); 19 | return result; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /annotation-test/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /annotation-test/src/test/java/com/javaparainiciantes/boot/AnnotationTestApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class AnnotationTestApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/.swagger-codegen-ignore: -------------------------------------------------------------------------------- 1 | # Swagger Codegen Ignore 2 | # Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/.swagger-codegen/VERSION: -------------------------------------------------------------------------------- 1 | 3.0.25 -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/AbatimentoAplicado.md: -------------------------------------------------------------------------------- 1 | # AbatimentoAplicado 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **modalidade** | **Integer** | ##### Modalidade de abatimentos, conforme tabela de domínios. <table><tr><th>Descrição</th><th>Domínio</th></tr><tr><td>Valor Fixo</td><td>1</td></tr><tr><td>Percentual</td><td>2</td></tr></table> | 7 | **valorPerc** | **String** | Abatimentos ou outras deduções aplicadas ao documento, em valor absoluto ou percentual do valor original do documento. | 8 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/AllOfCobVValorDesconto.md: -------------------------------------------------------------------------------- 1 | # AllOfCobVValorDesconto 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/AllOfCobsConsultadasCobsItems.md: -------------------------------------------------------------------------------- 1 | # AllOfCobsConsultadasCobsItems 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/AllOfCobsVConsultadasCobsItems.md: -------------------------------------------------------------------------------- 1 | # AllOfCobsVConsultadasCobsItems 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/AllOfDadosDevedorDevedor.md: -------------------------------------------------------------------------------- 1 | # AllOfDadosDevedorDevedor 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **logradouro** | **String** | Logradouro do usuário. | [optional] 7 | **cidade** | **String** | Cidade do usuário. | [optional] 8 | **uf** | **String** | UF do usuário. | [optional] 9 | **cep** | **String** | CEP do usuário. | [optional] 10 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/AllOfDadosRecebedorRecebedor.md: -------------------------------------------------------------------------------- 1 | # AllOfDadosRecebedorRecebedor 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **logradouro** | **String** | Logradouro do usuário. | [optional] 7 | **cidade** | **String** | Cidade do usuário. | [optional] 8 | **uf** | **String** | UF do usuário. | [optional] 9 | **cep** | **String** | CEP do usuário. | [optional] 10 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/AllOfLotesCobVConsultadosLotesItems.md: -------------------------------------------------------------------------------- 1 | # AllOfLotesCobVConsultadosLotesItems 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/AllOfParametrosConsultaPixTxid.md: -------------------------------------------------------------------------------- 1 | # AllOfParametrosConsultaPixTxid 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/AllOfPayloadLocationConsultadasLocItems.md: -------------------------------------------------------------------------------- 1 | # AllOfPayloadLocationConsultadasLocItems 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/AllOfPixConsultadosPixItems.md: -------------------------------------------------------------------------------- 1 | # AllOfPixConsultadosPixItems 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/AllOfPixTxid.md: -------------------------------------------------------------------------------- 1 | # AllOfPixTxid 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/AllOfWebhooksConsultadosWebhooksItems.md: -------------------------------------------------------------------------------- 1 | # AllOfWebhooksConsultadosWebhooksItems 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobApresentacao.md: -------------------------------------------------------------------------------- 1 | # CobApresentacao 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **apresentacao** | [**OffsetDateTime**](OffsetDateTime.md) | Timestamp que indica o momento em que o payload JSON que representa a cobrança foi recuperado. Ou seja, idealmente, é o momento em que o usuário realizou a captura do QR Code para verificar os dados de pagamento. Respeita o formato definido na RFC 3339. | 7 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobBase.md: -------------------------------------------------------------------------------- 1 | # CobBase 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **chave** | **String** | # Formato do campo chave * O campo chave determina a chave Pix registrada no DICT que será utilizada para a cobrança. Essa chave será lida pelo aplicativo do PSP do pagador para consulta ao DICT, que retornará a informação que identificará o recebedor da cobrança. * Os tipos de chave podem ser: telefone, e-mail, cpf/cnpj ou EVP. * O formato das chaves pode ser encontrado na seção \"Formatação das chaves do DICT no BR Code\" do [Manual de Padrões para iniciação do Pix](https://www.bcb.gov.br/estabilidadefinanceira/pagamentosinstantaneos). | [optional] 7 | **solicitacaoPagador** | **String** | O campo solicitacaoPagador, opcional, determina um texto a ser apresentado ao pagador para que ele possa digitar uma informação correlata, em formato livre, a ser enviada ao recebedor. Esse texto será preenchido, na pacs.008, pelo PSP do pagador, no campo RemittanceInformation <RmtInf>. O tamanho do campo <RmtInf> na pacs.008 está limitado a 140 caracteres. | [optional] 8 | **infoAdicionais** | [**List<CobBaseInfoAdicionais>**](CobBaseInfoAdicionais.md) | Cada respectiva informação adicional contida na lista (nome e valor) deve ser apresentada ao pagador. | [optional] 9 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobBaseInfoAdicionais.md: -------------------------------------------------------------------------------- 1 | # CobBaseInfoAdicionais 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **nome** | **String** | Nome do campo. | 7 | **valor** | **String** | Dados do campo. | 8 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobCompleta.md: -------------------------------------------------------------------------------- 1 | # CobCompleta 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **devedor** | **Object** | Os campos aninhados sob o objeto devedor são opcionais e identificam o devedor, ou seja, a pessoa ou a instituição a quem a cobrança está endereçada. Não identifica, necessariamente, quem irá efetivamente realizar o pagamento. Um CPF pode ser o devedor de uma cobrança, mas pode acontecer de outro CPF realizar, efetivamente, o pagamento do documento. Não é permitido que o campo devedor.cpf e campo devedor.cnpj estejam preenchidos ao mesmo tempo. Se o campo devedor.cnpj está preenchido, então o campo devedor.cpf não pode estar preenchido, e vice-versa. Se o campo devedor.nome está preenchido, então deve existir ou um devedor.cpf ou um campo devedor.cnpj preenchido. | [optional] 7 | **loc** | **Object** | | [optional] 8 | **location** | **String** | Localização do Payload a ser informada na criação da cobrança. | [optional] 9 | **status** | [**StatusEnum**](#StatusEnum) | | 10 | **valor** | **Object** | | 11 | **chave** | **String** | # Formato do campo chave * O campo chave determina a chave Pix registrada no DICT que será utilizada para a cobrança. Essa chave será lida pelo aplicativo do PSP do pagador para consulta ao DICT, que retornará a informação que identificará o recebedor da cobrança. * Os tipos de chave podem ser: telefone, e-mail, cpf/cnpj ou EVP. * O formato das chaves pode ser encontrado na seção \"Formatação das chaves do DICT no BR Code\" do [Manual de Padrões para iniciação do Pix](https://www.bcb.gov.br/estabilidadefinanceira/pagamentosinstantaneos). | 12 | **solicitacaoPagador** | **String** | O campo solicitacaoPagador, opcional, determina um texto a ser apresentado ao pagador para que ele possa digitar uma informação correlata, em formato livre, a ser enviada ao recebedor. Esse texto será preenchido, na pacs.008, pelo PSP do pagador, no campo RemittanceInformation <RmtInf>. O tamanho do campo <RmtInf> na pacs.008 está limitado a 140 caracteres. | [optional] 13 | **infoAdicionais** | [**List<CobBaseInfoAdicionais>**](CobBaseInfoAdicionais.md) | Cada respectiva informação adicional contida na lista (nome e valor) deve ser apresentada ao pagador. | [optional] 14 | **pix** | **List<Object>** | | [optional] 15 | 16 | 17 | ## Enum: StatusEnum 18 | Name | Value 19 | ---- | ----- 20 | ATIVA | "ATIVA" 21 | CONCLUIDA | "CONCLUIDA" 22 | REMOVIDA_PELO_USUARIO_RECEBEDOR | "REMOVIDA_PELO_USUARIO_RECEBEDOR" 23 | REMOVIDA_PELO_PSP | "REMOVIDA_PELO_PSP" 24 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobCriacao.md: -------------------------------------------------------------------------------- 1 | # CobCriacao 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **criacao** | [**OffsetDateTime**](OffsetDateTime.md) | Timestamp que indica o momento em que foi criada a cobrança. Respeita o formato definido na RFC 3339. | 7 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobExpiracao.md: -------------------------------------------------------------------------------- 1 | # CobExpiracao 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **expiracao** | **Integer** | Tempo de vida da cobrança, especificado em segundos a partir da data de criação (Calendario.criacao) | [optional] 7 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobGerada.md: -------------------------------------------------------------------------------- 1 | # CobGerada 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **chave** | **String** | # Formato do campo chave * O campo chave determina a chave Pix registrada no DICT que será utilizada para a cobrança. Essa chave será lida pelo aplicativo do PSP do pagador para consulta ao DICT, que retornará a informação que identificará o recebedor da cobrança. * Os tipos de chave podem ser: telefone, e-mail, cpf/cnpj ou EVP. * O formato das chaves pode ser encontrado na seção \"Formatação das chaves do DICT no BR Code\" do [Manual de Padrões para iniciação do Pix](https://www.bcb.gov.br/estabilidadefinanceira/pagamentosinstantaneos). | 7 | **solicitacaoPagador** | **String** | O campo solicitacaoPagador, opcional, determina um texto a ser apresentado ao pagador para que ele possa digitar uma informação correlata, em formato livre, a ser enviada ao recebedor. Esse texto será preenchido, na pacs.008, pelo PSP do pagador, no campo RemittanceInformation <RmtInf>. O tamanho do campo <RmtInf> na pacs.008 está limitado a 140 caracteres. | [optional] 8 | **infoAdicionais** | [**List<CobBaseInfoAdicionais>**](CobBaseInfoAdicionais.md) | Cada respectiva informação adicional contida na lista (nome e valor) deve ser apresentada ao pagador. | [optional] 9 | **devedor** | **Object** | Os campos aninhados sob o objeto devedor são opcionais e identificam o devedor, ou seja, a pessoa ou a instituição a quem a cobrança está endereçada. Não identifica, necessariamente, quem irá efetivamente realizar o pagamento. Um CPF pode ser o devedor de uma cobrança, mas pode acontecer de outro CPF realizar, efetivamente, o pagamento do documento. Não é permitido que o campo devedor.cpf e campo devedor.cnpj estejam preenchidos ao mesmo tempo. Se o campo devedor.cnpj está preenchido, então o campo devedor.cpf não pode estar preenchido, e vice-versa. Se o campo devedor.nome está preenchido, então deve existir ou um devedor.cpf ou um campo devedor.cnpj preenchido. | [optional] 10 | **loc** | **Object** | | [optional] 11 | **location** | **String** | Localização do Payload a ser informada na criação da cobrança. | [optional] 12 | **status** | [**StatusEnum**](#StatusEnum) | | 13 | **valor** | **Object** | | 14 | 15 | 16 | ## Enum: StatusEnum 17 | Name | Value 18 | ---- | ----- 19 | ATIVA | "ATIVA" 20 | CONCLUIDA | "CONCLUIDA" 21 | REMOVIDA_PELO_USUARIO_RECEBEDOR | "REMOVIDA_PELO_USUARIO_RECEBEDOR" 22 | REMOVIDA_PELO_PSP | "REMOVIDA_PELO_PSP" 23 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobPayload.md: -------------------------------------------------------------------------------- 1 | # CobPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **chave** | **String** | # Formato do campo chave * O campo chave determina a chave Pix registrada no DICT que será utilizada para a cobrança. Essa chave será lida pelo aplicativo do PSP do pagador para consulta ao DICT, que retornará a informação que identificará o recebedor da cobrança. * Os tipos de chave podem ser: telefone, e-mail, cpf/cnpj ou EVP. * O formato das chaves pode ser encontrado na seção \"Formatação das chaves do DICT no BR Code\" do [Manual de Padrões para iniciação do Pix](https://www.bcb.gov.br/estabilidadefinanceira/pagamentosinstantaneos). | 7 | **solicitacaoPagador** | **String** | O campo solicitacaoPagador, opcional, determina um texto a ser apresentado ao pagador para que ele possa digitar uma informação correlata, em formato livre, a ser enviada ao recebedor. Esse texto será preenchido, na pacs.008, pelo PSP do pagador, no campo RemittanceInformation <RmtInf>. O tamanho do campo <RmtInf> na pacs.008 está limitado a 140 caracteres. | [optional] 8 | **infoAdicionais** | [**List<CobBaseInfoAdicionais>**](CobBaseInfoAdicionais.md) | Cada respectiva informação adicional contida na lista (nome e valor) deve ser apresentada ao pagador. | [optional] 9 | **devedor** | **Object** | Os campos aninhados sob o objeto devedor são opcionais e identificam o devedor, ou seja, a pessoa ou a instituição a quem a cobrança está endereçada. Não identifica, necessariamente, quem irá efetivamente realizar o pagamento. Um CPF pode ser o devedor de uma cobrança, mas pode acontecer de outro CPF realizar, efetivamente, o pagamento do documento. Não é permitido que o campo devedor.cpf e campo devedor.cnpj estejam preenchidos ao mesmo tempo. Se o campo devedor.cnpj está preenchido, então o campo devedor.cpf não pode estar preenchido, e vice-versa. Se o campo devedor.nome está preenchido, então deve existir ou um devedor.cpf ou um campo devedor.cnpj preenchido. | [optional] 10 | **status** | [**StatusEnum**](#StatusEnum) | | 11 | **valor** | [**CobPayloadValor**](CobPayloadValor.md) | | 12 | 13 | 14 | ## Enum: StatusEnum 15 | Name | Value 16 | ---- | ----- 17 | ATIVA | "ATIVA" 18 | CONCLUIDA | "CONCLUIDA" 19 | REMOVIDA_PELO_USUARIO_RECEBEDOR | "REMOVIDA_PELO_USUARIO_RECEBEDOR" 20 | REMOVIDA_PELO_PSP | "REMOVIDA_PELO_PSP" 21 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobPayloadValor.md: -------------------------------------------------------------------------------- 1 | # CobPayloadValor 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **original** | **String** | Valor original da cobrança. | 7 | **modalidadeAlteracao** | **Integer** | Trata-se de um campo que determina se o valor final do documento pode ser alterado pelo pagador. Na ausência desse campo, assume-se que não se pode alterar o valor do documento de cobrança, ou seja, assume-se o valor 0. Se o campo estiver presente e com valor 1, então está determinado que o valor final da cobrança pode ter seu valor alterado pelo pagador. | [optional] 8 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobRevisada.md: -------------------------------------------------------------------------------- 1 | # CobRevisada 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **chave** | **String** | # Formato do campo chave * O campo chave determina a chave Pix registrada no DICT que será utilizada para a cobrança. Essa chave será lida pelo aplicativo do PSP do pagador para consulta ao DICT, que retornará a informação que identificará o recebedor da cobrança. * Os tipos de chave podem ser: telefone, e-mail, cpf/cnpj ou EVP. * O formato das chaves pode ser encontrado na seção \"Formatação das chaves do DICT no BR Code\" do [Manual de Padrões para iniciação do Pix](https://www.bcb.gov.br/estabilidadefinanceira/pagamentosinstantaneos). | [optional] 7 | **solicitacaoPagador** | **String** | O campo solicitacaoPagador, opcional, determina um texto a ser apresentado ao pagador para que ele possa digitar uma informação correlata, em formato livre, a ser enviada ao recebedor. Esse texto será preenchido, na pacs.008, pelo PSP do pagador, no campo RemittanceInformation <RmtInf>. O tamanho do campo <RmtInf> na pacs.008 está limitado a 140 caracteres. | [optional] 8 | **infoAdicionais** | [**List<CobBaseInfoAdicionais>**](CobBaseInfoAdicionais.md) | Cada respectiva informação adicional contida na lista (nome e valor) deve ser apresentada ao pagador. | [optional] 9 | **devedor** | **Object** | Os campos aninhados sob o objeto devedor são opcionais e identificam o devedor, ou seja, a pessoa ou a instituição a quem a cobrança está endereçada. Não identifica, necessariamente, quem irá efetivamente realizar o pagamento. Um CPF pode ser o devedor de uma cobrança, mas pode acontecer de outro CPF realizar, efetivamente, o pagamento do documento. Não é permitido que o campo devedor.cpf e campo devedor.cnpj estejam preenchidos ao mesmo tempo. Se o campo devedor.cnpj está preenchido, então o campo devedor.cpf não pode estar preenchido, e vice-versa. Se o campo devedor.nome está preenchido, então deve existir ou um devedor.cpf ou um campo devedor.cnpj preenchido. | [optional] 10 | **loc** | **Object** | | [optional] 11 | **status** | [**StatusEnum**](#StatusEnum) | | [optional] 12 | **valor** | [**CobValor**](CobValor.md) | | [optional] 13 | 14 | 15 | ## Enum: StatusEnum 16 | Name | Value 17 | ---- | ----- 18 | RECEBEDOR | "REMOVIDA_PELO_USUARIO_RECEBEDOR" 19 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobSolicitada.md: -------------------------------------------------------------------------------- 1 | # CobSolicitada 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **chave** | **String** | # Formato do campo chave * O campo chave determina a chave Pix registrada no DICT que será utilizada para a cobrança. Essa chave será lida pelo aplicativo do PSP do pagador para consulta ao DICT, que retornará a informação que identificará o recebedor da cobrança. * Os tipos de chave podem ser: telefone, e-mail, cpf/cnpj ou EVP. * O formato das chaves pode ser encontrado na seção \"Formatação das chaves do DICT no BR Code\" do [Manual de Padrões para iniciação do Pix](https://www.bcb.gov.br/estabilidadefinanceira/pagamentosinstantaneos). | 7 | **solicitacaoPagador** | **String** | O campo solicitacaoPagador, opcional, determina um texto a ser apresentado ao pagador para que ele possa digitar uma informação correlata, em formato livre, a ser enviada ao recebedor. Esse texto será preenchido, na pacs.008, pelo PSP do pagador, no campo RemittanceInformation <RmtInf>. O tamanho do campo <RmtInf> na pacs.008 está limitado a 140 caracteres. | [optional] 8 | **infoAdicionais** | [**List<CobBaseInfoAdicionais>**](CobBaseInfoAdicionais.md) | Cada respectiva informação adicional contida na lista (nome e valor) deve ser apresentada ao pagador. | [optional] 9 | **devedor** | **Object** | Os campos aninhados sob o objeto devedor são opcionais e identificam o devedor, ou seja, a pessoa ou a instituição a quem a cobrança está endereçada. Não identifica, necessariamente, quem irá efetivamente realizar o pagamento. Um CPF pode ser o devedor de uma cobrança, mas pode acontecer de outro CPF realizar, efetivamente, o pagamento do documento. Não é permitido que o campo devedor.cpf e campo devedor.cnpj estejam preenchidos ao mesmo tempo. Se o campo devedor.cnpj está preenchido, então o campo devedor.cpf não pode estar preenchido, e vice-versa. Se o campo devedor.nome está preenchido, então deve existir ou um devedor.cpf ou um campo devedor.cnpj preenchido. | [optional] 10 | **loc** | **Object** | | [optional] 11 | **valor** | **Object** | | 12 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobVCompleta.md: -------------------------------------------------------------------------------- 1 | # CobVCompleta 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **devedor** | **Object** | O objeto devedor organiza as informações sobre o devedor da cobrança. | 7 | **recebedor** | **Object** | O objeto recebedor organiza as informações sobre o credor da cobrança. | 8 | **loc** | **Object** | | [optional] 9 | **status** | [**StatusEnum**](#StatusEnum) | | 10 | **valor** | **Object** | | 11 | **chave** | **String** | # Formato do campo chave * O campo chave determina a chave Pix registrada no DICT que será utilizada para a cobrança. Essa chave será lida pelo aplicativo do PSP do pagador para consulta ao DICT, que retornará a informação que identificará o recebedor da cobrança. * Os tipos de chave podem ser: telefone, e-mail, cpf/cnpj ou EVP. * O formato das chaves pode ser encontrado na seção \"Formatação das chaves do DICT no BR Code\" do [Manual de Padrões para iniciação do Pix](https://www.bcb.gov.br/estabilidadefinanceira/pagamentosinstantaneos). | 12 | **solicitacaoPagador** | **String** | O campo solicitacaoPagador, opcional, determina um texto a ser apresentado ao pagador para que ele possa digitar uma informação correlata, em formato livre, a ser enviada ao recebedor. Esse texto será preenchido, na pacs.008, pelo PSP do pagador, no campo RemittanceInformation <RmtInf>. O tamanho do campo <RmtInf> na pacs.008 está limitado a 140 caracteres. | [optional] 13 | **infoAdicionais** | [**List<CobBaseInfoAdicionais>**](CobBaseInfoAdicionais.md) | Cada respectiva informação adicional contida na lista (nome e valor) deve ser apresentada ao pagador. | [optional] 14 | **pix** | **List<Object>** | | [optional] 15 | 16 | 17 | ## Enum: StatusEnum 18 | Name | Value 19 | ---- | ----- 20 | ATIVA | "ATIVA" 21 | CONCLUIDA | "CONCLUIDA" 22 | REMOVIDA_PELO_USUARIO_RECEBEDOR | "REMOVIDA_PELO_USUARIO_RECEBEDOR" 23 | REMOVIDA_PELO_PSP | "REMOVIDA_PELO_PSP" 24 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobVGerada.md: -------------------------------------------------------------------------------- 1 | # CobVGerada 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **devedor** | **Object** | O objeto devedor organiza as informações sobre o devedor da cobrança. | 7 | **recebedor** | **Object** | O objeto recebedor organiza as informações sobre o credor da cobrança. | 8 | **chave** | **String** | # Formato do campo chave * O campo chave determina a chave Pix registrada no DICT que será utilizada para a cobrança. Essa chave será lida pelo aplicativo do PSP do pagador para consulta ao DICT, que retornará a informação que identificará o recebedor da cobrança. * Os tipos de chave podem ser: telefone, e-mail, cpf/cnpj ou EVP. * O formato das chaves pode ser encontrado na seção \"Formatação das chaves do DICT no BR Code\" do [Manual de Padrões para iniciação do Pix](https://www.bcb.gov.br/estabilidadefinanceira/pagamentosinstantaneos). | 9 | **solicitacaoPagador** | **String** | O campo solicitacaoPagador, opcional, determina um texto a ser apresentado ao pagador para que ele possa digitar uma informação correlata, em formato livre, a ser enviada ao recebedor. Esse texto será preenchido, na pacs.008, pelo PSP do pagador, no campo RemittanceInformation <RmtInf>. O tamanho do campo <RmtInf> na pacs.008 está limitado a 140 caracteres. | [optional] 10 | **infoAdicionais** | [**List<CobBaseInfoAdicionais>**](CobBaseInfoAdicionais.md) | Cada respectiva informação adicional contida na lista (nome e valor) deve ser apresentada ao pagador. | [optional] 11 | **loc** | **Object** | | [optional] 12 | **status** | [**StatusEnum**](#StatusEnum) | | 13 | **valor** | **Object** | | 14 | 15 | 16 | ## Enum: StatusEnum 17 | Name | Value 18 | ---- | ----- 19 | ATIVA | "ATIVA" 20 | CONCLUIDA | "CONCLUIDA" 21 | REMOVIDA_PELO_USUARIO_RECEBEDOR | "REMOVIDA_PELO_USUARIO_RECEBEDOR" 22 | REMOVIDA_PELO_PSP | "REMOVIDA_PELO_PSP" 23 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobVPayload.md: -------------------------------------------------------------------------------- 1 | # CobVPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **recebedor** | **Object** | O objeto recebedor organiza as informações sobre o credor da cobrança. | 7 | **chave** | **String** | # Formato do campo chave * O campo chave determina a chave Pix registrada no DICT que será utilizada para a cobrança. Essa chave será lida pelo aplicativo do PSP do pagador para consulta ao DICT, que retornará a informação que identificará o recebedor da cobrança. * Os tipos de chave podem ser: telefone, e-mail, cpf/cnpj ou EVP. * O formato das chaves pode ser encontrado na seção \"Formatação das chaves do DICT no BR Code\" do [Manual de Padrões para iniciação do Pix](https://www.bcb.gov.br/estabilidadefinanceira/pagamentosinstantaneos). | 8 | **solicitacaoPagador** | **String** | O campo solicitacaoPagador, opcional, determina um texto a ser apresentado ao pagador para que ele possa digitar uma informação correlata, em formato livre, a ser enviada ao recebedor. Esse texto será preenchido, na pacs.008, pelo PSP do pagador, no campo RemittanceInformation <RmtInf>. O tamanho do campo <RmtInf> na pacs.008 está limitado a 140 caracteres. | [optional] 9 | **infoAdicionais** | [**List<CobBaseInfoAdicionais>**](CobBaseInfoAdicionais.md) | Cada respectiva informação adicional contida na lista (nome e valor) deve ser apresentada ao pagador. | [optional] 10 | **devedor** | **Object** | Os campos aninhados sob o objeto devedor são opcionais e identificam o devedor, ou seja, a pessoa ou a instituição a quem a cobrança está endereçada. Não identifica, necessariamente, quem irá efetivamente realizar o pagamento. Um CPF pode ser o devedor de uma cobrança, mas pode acontecer de outro CPF realizar, efetivamente, o pagamento do documento. Não é permitido que o campo devedor.cpf e campo devedor.cnpj estejam preenchidos ao mesmo tempo. Se o campo devedor.cnpj está preenchido, então o campo devedor.cpf não pode estar preenchido, e vice-versa. Se o campo devedor.nome está preenchido, então deve existir ou um devedor.cpf ou um campo devedor.cnpj preenchido. | 11 | **txid** | **String** | | 12 | **revisao** | **Integer** | | 13 | **status** | [**StatusEnum**](#StatusEnum) | | 14 | **valor** | [**CobVPayloadValor**](CobVPayloadValor.md) | | 15 | 16 | 17 | ## Enum: StatusEnum 18 | Name | Value 19 | ---- | ----- 20 | ATIVA | "ATIVA" 21 | CONCLUIDA | "CONCLUIDA" 22 | REMOVIDA_PELO_USUARIO_RECEBEDOR | "REMOVIDA_PELO_USUARIO_RECEBEDOR" 23 | REMOVIDA_PELO_PSP | "REMOVIDA_PELO_PSP" 24 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobVPayloadValor.md: -------------------------------------------------------------------------------- 1 | # CobVPayloadValor 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **original** | **String** | Valor original da cobrança. | [optional] 7 | **multa** | **String** | Multa aplicada à cobrança | [optional] 8 | **juros** | **String** | Juro aplicado à cobrança | [optional] 9 | **abatimento** | **String** | Abatimento aplicado à cobrança | [optional] 10 | **desconto** | **String** | Descontos aplicados à cobrança | [optional] 11 | **_final** | **String** | Valor final da cobrança. | 12 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobVRevisada.md: -------------------------------------------------------------------------------- 1 | # CobVRevisada 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **devedor** | **Object** | O objeto devedor organiza as informações sobre o devedor da cobrança. | [optional] 7 | **chave** | **String** | # Formato do campo chave * O campo chave determina a chave Pix registrada no DICT que será utilizada para a cobrança. Essa chave será lida pelo aplicativo do PSP do pagador para consulta ao DICT, que retornará a informação que identificará o recebedor da cobrança. * Os tipos de chave podem ser: telefone, e-mail, cpf/cnpj ou EVP. * O formato das chaves pode ser encontrado na seção \"Formatação das chaves do DICT no BR Code\" do [Manual de Padrões para iniciação do Pix](https://www.bcb.gov.br/estabilidadefinanceira/pagamentosinstantaneos). | [optional] 8 | **solicitacaoPagador** | **String** | O campo solicitacaoPagador, opcional, determina um texto a ser apresentado ao pagador para que ele possa digitar uma informação correlata, em formato livre, a ser enviada ao recebedor. Esse texto será preenchido, na pacs.008, pelo PSP do pagador, no campo RemittanceInformation <RmtInf>. O tamanho do campo <RmtInf> na pacs.008 está limitado a 140 caracteres. | [optional] 9 | **infoAdicionais** | [**List<CobBaseInfoAdicionais>**](CobBaseInfoAdicionais.md) | Cada respectiva informação adicional contida na lista (nome e valor) deve ser apresentada ao pagador. | [optional] 10 | **loc** | **Object** | | [optional] 11 | **status** | [**StatusEnum**](#StatusEnum) | | [optional] 12 | **valor** | [**CobVValor**](CobVValor.md) | | [optional] 13 | 14 | 15 | ## Enum: StatusEnum 16 | Name | Value 17 | ---- | ----- 18 | RECEBEDOR | "REMOVIDA_PELO_USUARIO_RECEBEDOR" 19 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobVSolicitada.md: -------------------------------------------------------------------------------- 1 | # CobVSolicitada 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **devedor** | **Object** | O objeto devedor organiza as informações sobre o devedor da cobrança. | 7 | **chave** | **String** | # Formato do campo chave * O campo chave determina a chave Pix registrada no DICT que será utilizada para a cobrança. Essa chave será lida pelo aplicativo do PSP do pagador para consulta ao DICT, que retornará a informação que identificará o recebedor da cobrança. * Os tipos de chave podem ser: telefone, e-mail, cpf/cnpj ou EVP. * O formato das chaves pode ser encontrado na seção \"Formatação das chaves do DICT no BR Code\" do [Manual de Padrões para iniciação do Pix](https://www.bcb.gov.br/estabilidadefinanceira/pagamentosinstantaneos). | 8 | **solicitacaoPagador** | **String** | O campo solicitacaoPagador, opcional, determina um texto a ser apresentado ao pagador para que ele possa digitar uma informação correlata, em formato livre, a ser enviada ao recebedor. Esse texto será preenchido, na pacs.008, pelo PSP do pagador, no campo RemittanceInformation <RmtInf>. O tamanho do campo <RmtInf> na pacs.008 está limitado a 140 caracteres. | [optional] 9 | **infoAdicionais** | [**List<CobBaseInfoAdicionais>**](CobBaseInfoAdicionais.md) | Cada respectiva informação adicional contida na lista (nome e valor) deve ser apresentada ao pagador. | [optional] 10 | **loc** | **Object** | | [optional] 11 | **valor** | **Object** | | 12 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobVValor.md: -------------------------------------------------------------------------------- 1 | # CobVValor 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **original** | **String** | Valor original da cobrança. | [optional] 7 | **multa** | [**MultaAplicada**](MultaAplicada.md) | | [optional] 8 | **juros** | [**JuroAplicado**](JuroAplicado.md) | | [optional] 9 | **abatimento** | [**AbatimentoAplicado**](AbatimentoAplicado.md) | | [optional] 10 | **desconto** | **AllOfCobVValorDesconto** | Descontos aplicados à cobrança | [optional] 11 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobValor.md: -------------------------------------------------------------------------------- 1 | # CobValor 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **original** | **String** | Valor original da cobrança. | [optional] 7 | **modalidadeAlteracao** | **Integer** | Trata-se de um campo que determina se o valor final do documento pode ser alterado pelo pagador. Na ausência desse campo, assume-se que não se pode alterar o valor do documento de cobrança, ou seja, assume-se o valor 0. Se o campo estiver presente e com valor 1, então está determinado que o valor final da cobrança pode ter seu valor alterado pelo pagador. | [optional] 8 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobsConsultadas.md: -------------------------------------------------------------------------------- 1 | # CobsConsultadas 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **parametros** | [**ParametrosConsultaCob**](ParametrosConsultaCob.md) | | 7 | **cobs** | **List<AllOfCobsConsultadasCobsItems>** | | 8 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/CobsVConsultadas.md: -------------------------------------------------------------------------------- 1 | # CobsVConsultadas 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **parametros** | [**ParametrosConsultaCob**](ParametrosConsultaCob.md) | | 7 | **cobs** | **List<AllOfCobsVConsultadasCobsItems>** | | 8 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/DadosComplementaresPessoa.md: -------------------------------------------------------------------------------- 1 | # DadosComplementaresPessoa 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **logradouro** | **String** | Logradouro do usuário. | [optional] 7 | **cidade** | **String** | Cidade do usuário. | [optional] 8 | **uf** | **String** | UF do usuário. | [optional] 9 | **cep** | **String** | CEP do usuário. | [optional] 10 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/DadosDevedor.md: -------------------------------------------------------------------------------- 1 | # DadosDevedor 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **devedor** | **AllOfDadosDevedorDevedor** | O objeto devedor organiza as informações sobre o devedor da cobrança. | [optional] 7 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/DadosRecebedor.md: -------------------------------------------------------------------------------- 1 | # DadosRecebedor 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **recebedor** | **AllOfDadosRecebedorRecebedor** | O objeto recebedor organiza as informações sobre o credor da cobrança. | [optional] 7 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/Devolucao.md: -------------------------------------------------------------------------------- 1 | # Devolucao 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **String** | | 7 | **rtrId** | **String** | ReturnIdentification que transita na PACS004. | 8 | **valor** | **String** | Valor a devolver. | 9 | **horario** | [**DevolucaoHorario**](DevolucaoHorario.md) | | 10 | **status** | [**StatusEnum**](#StatusEnum) | Status da devolução. | 11 | **motivo** | **String** | # Status da Devolução Campo opcional que pode ser utilizado pelo PSP recebedor para detalhar os motivos de a devolução ter atingido o status em questão. Pode ser utilizado, por exemplo, para detalhar o motivo de a devolução não ter sido realizada. | [optional] 12 | 13 | 14 | ## Enum: StatusEnum 15 | Name | Value 16 | ---- | ----- 17 | EM_PROCESSAMENTO | "EM_PROCESSAMENTO" 18 | DEVOLVIDO | "DEVOLVIDO" 19 | NAO_REALIZADO | "NAO_REALIZADO" 20 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/DevolucaoHorario.md: -------------------------------------------------------------------------------- 1 | # DevolucaoHorario 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **solicitacao** | [**OffsetDateTime**](OffsetDateTime.md) | Horário no qual a devolução foi solicitada no PSP. | [optional] 7 | **liquidacao** | [**OffsetDateTime**](OffsetDateTime.md) | Horário no qual a devolução foi liquidada no PSP. | [optional] 8 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/DevolucaoSolicitada.md: -------------------------------------------------------------------------------- 1 | # DevolucaoSolicitada 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **valor** | **String** | Valor solicitado para devolução. A soma dos valores de todas as devolucões não podem ultrapassar o valor total do Pix. | 7 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/JuroAplicado.md: -------------------------------------------------------------------------------- 1 | # JuroAplicado 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **modalidade** | **Integer** | ##### Modalidade de juros, conforme tabela de domínios. <table><tr><th>Descrição</th><th>Domínio</th></tr><tr><td>Valor (dias corridos)</td><td>1</td></tr><tr><td>Percentual ao dia (dias corridos)</td><td>2</td></tr><tr><td>Percentual ao mês (dias corridos)</td><td>3</td></tr><tr><td>Percentual ao ano (dias corridos)</td><td>4</td></tr><tr><td>Valor (dias úteis)</td><td>5</td></tr><tr><td>Percentual ao dia (dias úteis)</td><td>6</td></tr><tr><td>Percentual ao mês (dias úteis)</td><td>7</td></tr><tr><td>Percentual ao ano (dias úteis)</td><td>8</td></tr></table> | 7 | **valorPerc** | **String** | | 8 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/LoteCobVConsultado.md: -------------------------------------------------------------------------------- 1 | # LoteCobVConsultado 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **Long** | | 7 | **descricao** | **String** | | 8 | **criacao** | [**OffsetDateTime**](OffsetDateTime.md) | Timestamp que indica o momento em que foi criado o lote. Respeita o formato definido na RFC 3339. | 9 | **cobsv** | [**List<LoteCobVConsultadoCobsv>**](LoteCobVConsultadoCobsv.md) | | 10 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/LoteCobVConsultadoCobsv.md: -------------------------------------------------------------------------------- 1 | # LoteCobVConsultadoCobsv 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **txid** | **String** | | 7 | **status** | [**StatusEnum**](#StatusEnum) | | 8 | **problema** | [**Problema**](Problema.md) | | [optional] 9 | **criacao** | [**OffsetDateTime**](OffsetDateTime.md) | Data e hora em que a cobrança foi criada. Respeita RFC 3339. | [optional] 10 | 11 | 12 | ## Enum: StatusEnum 13 | Name | Value 14 | ---- | ----- 15 | EM_PROCESSAMENTO | "EM_PROCESSAMENTO" 16 | CRIADA | "CRIADA" 17 | NEGADA | "NEGADA" 18 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/LoteCobVGerado.md: -------------------------------------------------------------------------------- 1 | # LoteCobVGerado 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **Long** | | 7 | **descricao** | **String** | | 8 | **criacao** | [**OffsetDateTime**](OffsetDateTime.md) | Timestamp que indica o momento em que foi criado o lote. Respeita o formato definido na RFC 3339. | 9 | **cobsv** | [**List<CobVGerada>**](CobVGerada.md) | | 10 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/LotesCobVConsultados.md: -------------------------------------------------------------------------------- 1 | # LotesCobVConsultados 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **parametros** | [**ParametrosConsultaLote**](ParametrosConsultaLote.md) | | 7 | **lotes** | **List<AllOfLotesCobVConsultadosLotesItems>** | | 8 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/MultaAplicada.md: -------------------------------------------------------------------------------- 1 | # MultaAplicada 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **modalidade** | **Integer** | ##### Modalidade da multa, conforme tabela de domínios. <table><tr><th>Descrição</th><th>Domínio</th></tr><tr><td>Valor Fixo</td><td>1</td></tr><tr><td>Percentual</td><td>2</td></tr></table> | 7 | **valorPerc** | **String** | Multa do documento em valor absoluto ou percentual, conforme \"valor.multa.modalidade\". | 8 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/Paginacao.md: -------------------------------------------------------------------------------- 1 | # Paginacao 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **paginaAtual** | **Integer** | Número da página recuperada. | 7 | **itensPorPagina** | **Integer** | Quantidade de registros retornado na página. | 8 | **quantidadeDePaginas** | **Integer** | Quantidade de páginas disponíveis para consulta. | 9 | **quantidadeTotalDeItens** | **Integer** | Quantidade total de itens disponíveis de acordo com os parâmetros informados. | 10 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/ParametrosConsultaCob.md: -------------------------------------------------------------------------------- 1 | # ParametrosConsultaCob 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **inicio** | [**OffsetDateTime**](OffsetDateTime.md) | Data inicial utilizada na consulta. Respeita RFC 3339. | 7 | **fim** | [**OffsetDateTime**](OffsetDateTime.md) | Data de fim utilizada na consulta. Respeita RFC 3339. | 8 | **cpf** | **String** | Filtro pelo CPF do devedor. Não pode ser utilizado ao mesmo tempo que o CNPJ. | [optional] 9 | **cnpj** | **String** | Filtro pelo CNPJ do devedor. Não pode ser utilizado ao mesmo tempo que o CPF. | [optional] 10 | **locationPresente** | **Boolean** | Filtro pela existência de location vinculada. | [optional] 11 | **status** | **String** | Filtro pelo status das cobranças. | [optional] 12 | **paginacao** | [**Paginacao**](Paginacao.md) | | 13 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/ParametrosConsultaLote.md: -------------------------------------------------------------------------------- 1 | # ParametrosConsultaLote 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **inicio** | [**OffsetDateTime**](OffsetDateTime.md) | Data inicial utilizada na consulta. Respeita RFC 3339. | 7 | **fim** | [**OffsetDateTime**](OffsetDateTime.md) | Data de fim utilizada na consulta. Respeita RFC 3339. | 8 | **paginacao** | [**Paginacao**](Paginacao.md) | | 9 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/ParametrosConsultaPayloadLocation.md: -------------------------------------------------------------------------------- 1 | # ParametrosConsultaPayloadLocation 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **inicio** | [**OffsetDateTime**](OffsetDateTime.md) | Data inicial utilizada na consulta. Respeita RFC 3339. | 7 | **fim** | [**OffsetDateTime**](OffsetDateTime.md) | Data de fim utilizada na consulta. Respeita RFC 3339. | 8 | **txIdPresente** | **Boolean** | Filtro pela existência de txid. | [optional] 9 | **tipoCob** | [**TipoCobEnum**](#TipoCobEnum) | | [optional] 10 | **paginacao** | [**Paginacao**](Paginacao.md) | | 11 | 12 | 13 | ## Enum: TipoCobEnum 14 | Name | Value 15 | ---- | ----- 16 | COB | "cob" 17 | COBV | "cobv" 18 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/ParametrosConsultaPix.md: -------------------------------------------------------------------------------- 1 | # ParametrosConsultaPix 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **inicio** | [**OffsetDateTime**](OffsetDateTime.md) | Data inicial utilizada na consulta. Respeita RFC 3339. | 7 | **fim** | [**OffsetDateTime**](OffsetDateTime.md) | Data de fim utilizada na consulta. Respeita RFC 3339. | 8 | **txid** | **AllOfParametrosConsultaPixTxid** | | [optional] 9 | **txIdPresente** | **Boolean** | Filtro pela existência de txid. | [optional] 10 | **devolucaoPresente** | **Boolean** | Filtro pela existência de devolução. | [optional] 11 | **cpf** | **String** | CPF | [optional] 12 | **cnpj** | **String** | CNPJ | [optional] 13 | **paginacao** | [**Paginacao**](Paginacao.md) | | 14 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/ParametrosConsultaWebhooks.md: -------------------------------------------------------------------------------- 1 | # ParametrosConsultaWebhooks 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **inicio** | [**OffsetDateTime**](OffsetDateTime.md) | Data inicial utilizada na consulta. Respeita RFC 3339. | [optional] 7 | **fim** | [**OffsetDateTime**](OffsetDateTime.md) | Data de fim utilizada na consulta. Respeita RFC 3339. | [optional] 8 | **paginacao** | [**Paginacao**](Paginacao.md) | | [optional] 9 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/PayloadLocation.md: -------------------------------------------------------------------------------- 1 | # PayloadLocation 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **Long** | | 7 | **location** | **String** | Localização do Payload a ser informada na criação da cobrança. | 8 | **tipoCob** | [**TipoCobEnum**](#TipoCobEnum) | | 9 | **criacao** | [**OffsetDateTime**](OffsetDateTime.md) | Data e hora em que a location foi criada. Respeita RFC 3339. | 10 | 11 | 12 | ## Enum: TipoCobEnum 13 | Name | Value 14 | ---- | ----- 15 | COB | "cob" 16 | COBV | "cobv" 17 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/PayloadLocationCob.md: -------------------------------------------------------------------------------- 1 | # PayloadLocationCob 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **Long** | | 7 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/PayloadLocationCompleta.md: -------------------------------------------------------------------------------- 1 | # PayloadLocationCompleta 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **Long** | | 7 | **txid** | **String** | | [optional] 8 | **location** | **String** | Localização do Payload a ser informada na criação da cobrança. | 9 | **tipoCob** | [**TipoCobEnum**](#TipoCobEnum) | | 10 | **criacao** | [**OffsetDateTime**](OffsetDateTime.md) | Data e hora em que a location foi criada. Respeita RFC 3339. | 11 | 12 | 13 | ## Enum: TipoCobEnum 14 | Name | Value 15 | ---- | ----- 16 | COB | "cob" 17 | COBV | "cobv" 18 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/PayloadLocationConsultadas.md: -------------------------------------------------------------------------------- 1 | # PayloadLocationConsultadas 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **parametros** | [**ParametrosConsultaPayloadLocation**](ParametrosConsultaPayloadLocation.md) | | 7 | **loc** | **List<AllOfPayloadLocationConsultadasLocItems>** | | 8 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/PayloadLocationSolicitada.md: -------------------------------------------------------------------------------- 1 | # PayloadLocationSolicitada 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **tipoCob** | [**TipoCobEnum**](#TipoCobEnum) | | 7 | 8 | 9 | ## Enum: TipoCobEnum 10 | Name | Value 11 | ---- | ----- 12 | COB | "cob" 13 | COBV | "cobv" 14 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/PessoaFisica.md: -------------------------------------------------------------------------------- 1 | # PessoaFisica 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **cpf** | **String** | CPF do usuário. | 7 | **nome** | **String** | Nome do usuário. | 8 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/PessoaJuridica.md: -------------------------------------------------------------------------------- 1 | # PessoaJuridica 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **cnpj** | **String** | CNPJ do usuário. | 7 | **nome** | **String** | Nome do usuário. | 8 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/Pix.md: -------------------------------------------------------------------------------- 1 | # Pix 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **endToEndId** | **String** | | 7 | **txid** | **AllOfPixTxid** | | [optional] 8 | **valor** | **String** | Valor do Pix. | 9 | **chave** | **String** | # Formato do campo chave * Campo chave do recebedor conforme atribuído na respectiva PACS008. * Os tipos de chave podem ser: telefone, e-mail, cpf/cnpj ou EVP. * O formato das chaves pode ser encontrado na seção \"Formatação das chaves do DICT no BR Code\" do [Manual de Padrões para iniciação do Pix](https://www.bcb.gov.br/estabilidadefinanceira/pagamentosinstantaneos). | [optional] 10 | **horario** | [**OffsetDateTime**](OffsetDateTime.md) | Horário em que o Pix foi processado no PSP. | 11 | **infoPagador** | **String** | | [optional] 12 | **devolucoes** | [**List<Devolucao>**](Devolucao.md) | | [optional] 13 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/PixConsultados.md: -------------------------------------------------------------------------------- 1 | # PixConsultados 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **parametros** | [**ParametrosConsultaPix**](ParametrosConsultaPix.md) | | 7 | **pix** | **List<AllOfPixConsultadosPixItems>** | | [optional] 8 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/Problema.md: -------------------------------------------------------------------------------- 1 | # Problema 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **type** | **String** | URI de referência que identifica o tipo de problema. De acordo com a RFC 7807. | 7 | **title** | **String** | Descrição resumida do problema. | 8 | **status** | **Integer** | Código HTTP do status retornado. | 9 | **detail** | **String** | Descrição completa do problema. | [optional] 10 | **correlationId** | **String** | Identificador de correlação do problema para fins de suporte | [optional] 11 | **violacoes** | [**List<Violacao>**](Violacao.md) | | [optional] 12 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/Txid.md: -------------------------------------------------------------------------------- 1 | # Txid 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/Violacao.md: -------------------------------------------------------------------------------- 1 | # Violacao 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **razao** | **String** | Descrição do erro | [optional] 7 | **propriedade** | **String** | Nome da propriedade | [optional] 8 | **valor** | **String** | Valor da propriedade | [optional] 9 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/WebhookCompleto.md: -------------------------------------------------------------------------------- 1 | # WebhookCompleto 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **webhookUrl** | **String** | | 7 | **chave** | **String** | # Formato do campo chave * O campo chave determina a chave Pix registrada no DICT que será utilizada para a cobrança. Essa chave será lida pelo aplicativo do PSP do pagador para consulta ao DICT, que retornará a informação que identificará o recebedor da cobrança. * Os tipos de chave podem ser: telefone, e-mail, cpf/cnpj ou EVP. * O formato das chaves pode ser encontrado na seção \"Formatação das chaves do DICT no BR Code\" do [Manual de Padrões para iniciação do Pix](https://www.bcb.gov.br/estabilidadefinanceira/pagamentosinstantaneos). | 8 | **criacao** | [**OffsetDateTime**](OffsetDateTime.md) | Data e hora em que o webhook foi cadastrado. Respeita RFC 3339. | 9 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/WebhookSolicitado.md: -------------------------------------------------------------------------------- 1 | # WebhookSolicitado 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **webhookUrl** | **String** | | 7 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/docs/WebhooksConsultados.md: -------------------------------------------------------------------------------- 1 | # WebhooksConsultados 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **parametros** | [**ParametrosConsultaWebhooks**](ParametrosConsultaWebhooks.md) | | [optional] 7 | **webhooks** | **List<AllOfWebhooksConsultadosWebhooksItems>** | | 8 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/src/main/java/com/pedrocavalero/pix/client/invoker/auth/ApiKeyAuth.java: -------------------------------------------------------------------------------- 1 | package com.pedrocavalero.pix.client.invoker.auth; 2 | 3 | import org.springframework.http.HttpHeaders; 4 | import org.springframework.util.MultiValueMap; 5 | 6 | @javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2021-05-15T12:12:45.130232200-03:00[America/Sao_Paulo]")public class ApiKeyAuth implements Authentication { 7 | private final String location; 8 | private final String paramName; 9 | 10 | private String apiKey; 11 | private String apiKeyPrefix; 12 | 13 | public ApiKeyAuth(String location, String paramName) { 14 | this.location = location; 15 | this.paramName = paramName; 16 | } 17 | 18 | public String getLocation() { 19 | return location; 20 | } 21 | 22 | public String getParamName() { 23 | return paramName; 24 | } 25 | 26 | public String getApiKey() { 27 | return apiKey; 28 | } 29 | 30 | public void setApiKey(String apiKey) { 31 | this.apiKey = apiKey; 32 | } 33 | 34 | public String getApiKeyPrefix() { 35 | return apiKeyPrefix; 36 | } 37 | 38 | public void setApiKeyPrefix(String apiKeyPrefix) { 39 | this.apiKeyPrefix = apiKeyPrefix; 40 | } 41 | 42 | @Override 43 | public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { 44 | if (apiKey == null) { 45 | return; 46 | } 47 | String value; 48 | if (apiKeyPrefix != null) { 49 | value = apiKeyPrefix + " " + apiKey; 50 | } else { 51 | value = apiKey; 52 | } 53 | if (location.equals("query")) { 54 | queryParams.add(paramName, value); 55 | } else if (location.equals("header")) { 56 | headerParams.add(paramName, value); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/src/main/java/com/pedrocavalero/pix/client/invoker/auth/Authentication.java: -------------------------------------------------------------------------------- 1 | package com.pedrocavalero.pix.client.invoker.auth; 2 | 3 | import org.springframework.http.HttpHeaders; 4 | import org.springframework.util.MultiValueMap; 5 | 6 | public interface Authentication { 7 | /** 8 | * Apply authentication settings to header and / or query parameters. 9 | * @param queryParams The query parameters for the request 10 | * @param headerParams The header parameters for the request 11 | */ 12 | public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams); 13 | } 14 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/src/main/java/com/pedrocavalero/pix/client/invoker/auth/HttpBasicAuth.java: -------------------------------------------------------------------------------- 1 | package com.pedrocavalero.pix.client.invoker.auth; 2 | 3 | import java.io.UnsupportedEncodingException; 4 | import java.nio.charset.StandardCharsets; 5 | 6 | import org.springframework.http.HttpHeaders; 7 | import org.springframework.util.Base64Utils; 8 | import org.springframework.util.MultiValueMap; 9 | 10 | @javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2021-05-15T12:12:45.130232200-03:00[America/Sao_Paulo]")public class HttpBasicAuth implements Authentication { 11 | private String username; 12 | private String password; 13 | 14 | public String getUsername() { 15 | return username; 16 | } 17 | 18 | public void setUsername(String username) { 19 | this.username = username; 20 | } 21 | 22 | public String getPassword() { 23 | return password; 24 | } 25 | 26 | public void setPassword(String password) { 27 | this.password = password; 28 | } 29 | 30 | @Override 31 | public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { 32 | if (username == null && password == null) { 33 | return; 34 | } 35 | String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); 36 | headerParams.add(HttpHeaders.AUTHORIZATION, "Basic " + Base64Utils.encodeToString(str.getBytes(StandardCharsets.UTF_8))); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/src/main/java/com/pedrocavalero/pix/client/invoker/auth/OAuth.java: -------------------------------------------------------------------------------- 1 | package com.pedrocavalero.pix.client.invoker.auth; 2 | 3 | import org.springframework.http.HttpHeaders; 4 | import org.springframework.util.MultiValueMap; 5 | 6 | @javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2021-05-15T12:12:45.130232200-03:00[America/Sao_Paulo]")public class OAuth implements Authentication { 7 | private String accessToken; 8 | 9 | public String getAccessToken() { 10 | return accessToken; 11 | } 12 | 13 | public void setAccessToken(String accessToken) { 14 | this.accessToken = accessToken; 15 | } 16 | 17 | @Override 18 | public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { 19 | if (accessToken != null) { 20 | headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/src/main/java/com/pedrocavalero/pix/client/invoker/auth/OAuthFlow.java: -------------------------------------------------------------------------------- 1 | package com.pedrocavalero.pix.client.invoker.auth; 2 | 3 | public enum OAuthFlow { 4 | accessCode, implicit, password, application 5 | } -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/src/main/java/com/pedrocavalero/pix/client/model/DescontoDataFixa.java: -------------------------------------------------------------------------------- 1 | package com.pedrocavalero.pix.client.model; 2 | 3 | import java.util.Objects; 4 | 5 | import org.threeten.bp.LocalDate; 6 | 7 | import com.fasterxml.jackson.annotation.JsonProperty; 8 | 9 | import io.swagger.v3.oas.annotations.media.Schema; 10 | 11 | @Schema(description = "Descontos aplicados à cobrança") 12 | public class DescontoDataFixa { 13 | 14 | @JsonProperty("valorPerc") 15 | private String valorPerc = null; 16 | 17 | @JsonProperty("data") 18 | private LocalDate data = null; 19 | 20 | public String getValorPerc() { 21 | return valorPerc; 22 | } 23 | 24 | public void setValorPerc(String valorPerc) { 25 | this.valorPerc = valorPerc; 26 | } 27 | 28 | public LocalDate getData() { 29 | return data; 30 | } 31 | 32 | public void setData(LocalDate data) { 33 | this.data = data; 34 | } 35 | 36 | @Override 37 | public int hashCode() { 38 | return Objects.hash(data, valorPerc); 39 | } 40 | 41 | @Override 42 | public boolean equals(Object obj) { 43 | if (this == obj) 44 | return true; 45 | if (obj == null) 46 | return false; 47 | if (getClass() != obj.getClass()) 48 | return false; 49 | DescontoDataFixa other = (DescontoDataFixa) obj; 50 | return Objects.equals(data, other.data) && Objects.equals(valorPerc, other.valorPerc); 51 | } 52 | 53 | @Override 54 | public String toString() { 55 | StringBuilder sb = new StringBuilder(); 56 | sb.append("class DescontoDataFixa {\n"); 57 | 58 | sb.append(" data: ").append(toIndentedString(data)).append("\n"); 59 | sb.append(" valorPerc: ").append(toIndentedString(valorPerc)).append("\n"); 60 | sb.append("}"); 61 | return sb.toString(); 62 | } 63 | 64 | /** 65 | * Convert the given object to string with each line indented by 4 spaces 66 | * (except the first line). 67 | */ 68 | private String toIndentedString(java.lang.Object o) { 69 | if (o == null) { 70 | return "null"; 71 | } 72 | return o.toString().replace("\n", "\n "); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /bacen-pix-client-gerencianet/src/main/java/com/pedrocavalero/pix/client/model/PayloadLocationQrCode.java: -------------------------------------------------------------------------------- 1 | package com.pedrocavalero.pix.client.model; 2 | 3 | import java.util.Objects; 4 | 5 | public class PayloadLocationQrCode { 6 | 7 | private String qrcode; 8 | private String imagemQrcode; 9 | public PayloadLocationQrCode(String qrcode, String imagemQrcode) { 10 | super(); 11 | this.qrcode = qrcode; 12 | this.imagemQrcode = imagemQrcode; 13 | } 14 | 15 | public PayloadLocationQrCode() { 16 | } 17 | 18 | public String getQrcode() { 19 | return qrcode; 20 | } 21 | 22 | public void setQrcode(String qrcode) { 23 | this.qrcode = qrcode; 24 | } 25 | 26 | public String getImagemQrcode() { 27 | return imagemQrcode; 28 | } 29 | 30 | public void setImagemQrcode(String imagemQrcode) { 31 | this.imagemQrcode = imagemQrcode; 32 | } 33 | 34 | @Override 35 | public int hashCode() { 36 | return Objects.hash(imagemQrcode, qrcode); 37 | } 38 | 39 | @Override 40 | public boolean equals(Object obj) { 41 | if (this == obj) 42 | return true; 43 | if (obj == null) 44 | return false; 45 | if (getClass() != obj.getClass()) 46 | return false; 47 | PayloadLocationQrCode other = (PayloadLocationQrCode) obj; 48 | return Objects.equals(imagemQrcode, other.imagemQrcode) && Objects.equals(qrcode, other.qrcode); 49 | } 50 | 51 | @Override 52 | public String toString() { 53 | StringBuilder sb = new StringBuilder(); 54 | sb.append("class CobrancaPayloadLocationQrcode {\n"); 55 | 56 | sb.append(" qrcode: ").append(toIndentedString(qrcode)).append("\n"); 57 | sb.append(" imagemQrcode: ").append(toIndentedString(imagemQrcode)).append("\n"); 58 | sb.append("}"); 59 | return sb.toString(); 60 | } 61 | 62 | /** 63 | * Convert the given object to string with each line indented by 4 spaces 64 | * (except the first line). 65 | */ 66 | private String toIndentedString(java.lang.Object o) { 67 | if (o == null) { 68 | return "null"; 69 | } 70 | return o.toString().replace("\n", "\n "); 71 | } 72 | 73 | } -------------------------------------------------------------------------------- /boot-pix-client/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.3.4.RELEASE 9 | 10 | 11 | com.javaparainiciantes.boot 12 | boot-pix-client 13 | 0.0.1-SNAPSHOT 14 | boot-pix-client 15 | Demo project for Spring Boot 16 | 17 | 18 | 11 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-web 25 | 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-devtools 30 | runtime 31 | true 32 | 33 | 34 | org.projectlombok 35 | lombok 36 | true 37 | 38 | 39 | org.springframework.boot 40 | spring-boot-starter-test 41 | test 42 | 43 | 44 | org.junit.vintage 45 | junit-vintage-engine 46 | 47 | 48 | 49 | 50 | io.swagger 51 | swagger-annotations 52 | 1.6.2 53 | 54 | 55 | com.github.joschi.jackson 56 | jackson-datatype-threetenbp 57 | ${jackson-bom.version} 58 | 59 | 60 | 61 | 62 | 63 | 64 | org.springframework.boot 65 | spring-boot-maven-plugin 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /boot-pix-client/src/main/java/com/javaparainiciantes/boot/BootPixClientApplication.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import java.time.OffsetDateTime; 4 | import java.time.ZoneOffset; 5 | 6 | import org.springframework.boot.ApplicationArguments; 7 | import org.springframework.boot.ApplicationRunner; 8 | import org.springframework.boot.SpringApplication; 9 | import org.springframework.boot.autoconfigure.SpringBootApplication; 10 | import org.springframework.stereotype.Component; 11 | 12 | import com.javaparainiciantes.boot.pix.api.CobApi; 13 | import com.javaparainiciantes.boot.pix.api.PixApi; 14 | import com.javaparainiciantes.boot.pix.model.CobsConsultadas; 15 | 16 | import lombok.AllArgsConstructor; 17 | 18 | @SpringBootApplication 19 | public class BootPixClientApplication { 20 | 21 | public static void main(String[] args) { 22 | SpringApplication.run(BootPixClientApplication.class, args); 23 | } 24 | 25 | } 26 | @AllArgsConstructor 27 | @Component 28 | class Runner implements ApplicationRunner { 29 | 30 | private final PixApi pixApi; 31 | private final CobApi cobApi; 32 | @Override 33 | public void run(ApplicationArguments args) throws Exception { 34 | OffsetDateTime inicio = OffsetDateTime.of(2020, 4, 1, 0, 0, 0, 0, ZoneOffset.UTC); 35 | OffsetDateTime fim = OffsetDateTime.of(2020, 4, 1, 0, 0, 0, 0, ZoneOffset.UTC); 36 | CobsConsultadas cobGet = cobApi.cobGet(inicio, fim, null, null, null, null, null); 37 | System.out.println(cobGet); 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /boot-pix-client/src/main/java/com/javaparainiciantes/boot/BootPixClientConfig.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.web.client.RestTemplate; 6 | 7 | @Configuration 8 | public class BootPixClientConfig { 9 | 10 | // @Bean 11 | // RestTemplate restTemplate() { 12 | // return new RestTemplate(); 13 | // } 14 | } 15 | -------------------------------------------------------------------------------- /boot-pix-client/src/main/java/com/javaparainiciantes/boot/pix/invoker/RFC3339DateFormat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * API Pix 3 | * A API Pix padroniza serviços oferecidos pelo PSP recebedor no contexto do arranjo Pix, como criação de cobrança, verificação de Pix recebidos, devolução e conciliação. Os serviços expostos pelo PSP recebedor permitem ao usuário recebedor estabelecer integração de sua automação com os serviços PIX do PSP. # Evolução da API Pix As seguintes mudanças são esperadas e consideradas retro-compatíveis (_backwards-compatibility_): - Adição de novos recursos na API Pix. - Adição de novos parâmetros opcionais a cobranças. - Adição de novos campos em respostas da API Pix. - Alteração da ordem de campos. - Adição de novos elementos em enumerações Mudanças compatíveis não geram nova versão da API Pix. Clientes devem estar preparados para lidar com essas mudanças sem quebrar. Mudanças incompatíveis geram nova versão da API Pix. 4 | * 5 | * The version of the OpenAPI document: 2.0.0 6 | * Contact: suporte.ti@bcb.gov.br 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | package com.javaparainiciantes.boot.pix.invoker; 14 | 15 | import com.fasterxml.jackson.databind.util.ISO8601DateFormat; 16 | import com.fasterxml.jackson.databind.util.ISO8601Utils; 17 | 18 | import java.text.FieldPosition; 19 | import java.util.Date; 20 | 21 | 22 | public class RFC3339DateFormat extends ISO8601DateFormat { 23 | 24 | // Same as ISO8601DateFormat but serializing milliseconds. 25 | @Override 26 | public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { 27 | String value = ISO8601Utils.format(date, true); 28 | toAppendTo.append(value); 29 | return toAppendTo; 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /boot-pix-client/src/main/java/com/javaparainiciantes/boot/pix/invoker/auth/ApiKeyAuth.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot.pix.invoker.auth; 2 | 3 | import org.springframework.http.HttpHeaders; 4 | import org.springframework.util.MultiValueMap; 5 | 6 | @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-10-06T23:21:02.042427800-03:00[America/Sao_Paulo]") 7 | public class ApiKeyAuth implements Authentication { 8 | private final String location; 9 | private final String paramName; 10 | 11 | private String apiKey; 12 | private String apiKeyPrefix; 13 | 14 | public ApiKeyAuth(String location, String paramName) { 15 | this.location = location; 16 | this.paramName = paramName; 17 | } 18 | 19 | public String getLocation() { 20 | return location; 21 | } 22 | 23 | public String getParamName() { 24 | return paramName; 25 | } 26 | 27 | public String getApiKey() { 28 | return apiKey; 29 | } 30 | 31 | public void setApiKey(String apiKey) { 32 | this.apiKey = apiKey; 33 | } 34 | 35 | public String getApiKeyPrefix() { 36 | return apiKeyPrefix; 37 | } 38 | 39 | public void setApiKeyPrefix(String apiKeyPrefix) { 40 | this.apiKeyPrefix = apiKeyPrefix; 41 | } 42 | 43 | @Override 44 | public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { 45 | if (apiKey == null) { 46 | return; 47 | } 48 | String value; 49 | if (apiKeyPrefix != null) { 50 | value = apiKeyPrefix + " " + apiKey; 51 | } else { 52 | value = apiKey; 53 | } 54 | if (location.equals("query")) { 55 | queryParams.add(paramName, value); 56 | } else if (location.equals("header")) { 57 | headerParams.add(paramName, value); 58 | } else if (location.equals("cookie")) { 59 | cookieParams.add(paramName, value); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /boot-pix-client/src/main/java/com/javaparainiciantes/boot/pix/invoker/auth/Authentication.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot.pix.invoker.auth; 2 | 3 | import org.springframework.http.HttpHeaders; 4 | import org.springframework.util.MultiValueMap; 5 | 6 | public interface Authentication { 7 | /** 8 | * Apply authentication settings to header and / or query parameters. 9 | * @param queryParams The query parameters for the request 10 | * @param headerParams The header parameters for the request 11 | * @param cookieParams The cookie parameters for the request 12 | */ 13 | public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams); 14 | } 15 | -------------------------------------------------------------------------------- /boot-pix-client/src/main/java/com/javaparainiciantes/boot/pix/invoker/auth/HttpBasicAuth.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot.pix.invoker.auth; 2 | 3 | import java.io.UnsupportedEncodingException; 4 | import java.nio.charset.StandardCharsets; 5 | 6 | import org.springframework.http.HttpHeaders; 7 | import org.springframework.util.Base64Utils; 8 | import org.springframework.util.MultiValueMap; 9 | 10 | @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-10-06T23:21:02.042427800-03:00[America/Sao_Paulo]") 11 | public class HttpBasicAuth implements Authentication { 12 | private String username; 13 | private String password; 14 | 15 | public String getUsername() { 16 | return username; 17 | } 18 | 19 | public void setUsername(String username) { 20 | this.username = username; 21 | } 22 | 23 | public String getPassword() { 24 | return password; 25 | } 26 | 27 | public void setPassword(String password) { 28 | this.password = password; 29 | } 30 | 31 | @Override 32 | public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { 33 | if (username == null && password == null) { 34 | return; 35 | } 36 | String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); 37 | headerParams.add(HttpHeaders.AUTHORIZATION, "Basic " + Base64Utils.encodeToString(str.getBytes(StandardCharsets.UTF_8))); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /boot-pix-client/src/main/java/com/javaparainiciantes/boot/pix/invoker/auth/HttpBearerAuth.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot.pix.invoker.auth; 2 | 3 | import java.io.UnsupportedEncodingException; 4 | import java.nio.charset.StandardCharsets; 5 | 6 | import org.springframework.http.HttpHeaders; 7 | import org.springframework.util.Base64Utils; 8 | import org.springframework.util.MultiValueMap; 9 | 10 | @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-10-06T23:21:02.042427800-03:00[America/Sao_Paulo]") 11 | public class HttpBearerAuth implements Authentication { 12 | private final String scheme; 13 | private String bearerToken; 14 | 15 | public HttpBearerAuth(String scheme) { 16 | this.scheme = scheme; 17 | } 18 | 19 | public String getBearerToken() { 20 | return bearerToken; 21 | } 22 | 23 | public void setBearerToken(String bearerToken) { 24 | this.bearerToken = bearerToken; 25 | } 26 | 27 | @Override 28 | public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { 29 | if (bearerToken == null) { 30 | return; 31 | } 32 | headerParams.add(HttpHeaders.AUTHORIZATION, (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); 33 | } 34 | 35 | private static String upperCaseBearer(String scheme) { 36 | return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /boot-pix-client/src/main/java/com/javaparainiciantes/boot/pix/invoker/auth/OAuth.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot.pix.invoker.auth; 2 | 3 | import org.springframework.http.HttpHeaders; 4 | import org.springframework.util.MultiValueMap; 5 | 6 | @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-10-06T23:21:02.042427800-03:00[America/Sao_Paulo]") 7 | public class OAuth implements Authentication { 8 | private String accessToken; 9 | 10 | public String getAccessToken() { 11 | return accessToken; 12 | } 13 | 14 | public void setAccessToken(String accessToken) { 15 | this.accessToken = accessToken; 16 | } 17 | 18 | @Override 19 | public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { 20 | if (accessToken != null) { 21 | headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /boot-pix-client/src/main/java/com/javaparainiciantes/boot/pix/invoker/auth/OAuthFlow.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot.pix.invoker.auth; 2 | 3 | public enum OAuthFlow { 4 | accessCode, implicit, password, application 5 | } -------------------------------------------------------------------------------- /boot-pix-client/src/main/java/com/javaparainiciantes/boot/pix/model/CobStatus.java: -------------------------------------------------------------------------------- 1 | /* 2 | * API Pix 3 | * A API Pix padroniza serviços oferecidos pelo PSP recebedor no contexto do arranjo Pix, como criação de cobrança, verificação de Pix recebidos, devolução e conciliação. Os serviços expostos pelo PSP recebedor permitem ao usuário recebedor estabelecer integração de sua automação com os serviços PIX do PSP. # Evolução da API Pix As seguintes mudanças são esperadas e consideradas retro-compatíveis (_backwards-compatibility_): - Adição de novos recursos na API Pix. - Adição de novos parâmetros opcionais a cobranças. - Adição de novos campos em respostas da API Pix. - Alteração da ordem de campos. - Adição de novos elementos em enumerações Mudanças compatíveis não geram nova versão da API Pix. Clientes devem estar preparados para lidar com essas mudanças sem quebrar. Mudanças incompatíveis geram nova versão da API Pix. 4 | * 5 | * The version of the OpenAPI document: 2.0.0 6 | * Contact: suporte.ti@bcb.gov.br 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.javaparainiciantes.boot.pix.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import com.fasterxml.jackson.annotation.JsonPropertyOrder; 19 | 20 | import com.fasterxml.jackson.annotation.JsonCreator; 21 | import com.fasterxml.jackson.annotation.JsonValue; 22 | 23 | /** 24 | * Gets or Sets CobStatus 25 | */ 26 | public enum CobStatus { 27 | 28 | ATIVA("ATIVA"), 29 | 30 | CONCLUIDA("CONCLUIDA"), 31 | 32 | REMOVIDA_PELO_USUARIO_RECEBEDOR("REMOVIDA_PELO_USUARIO_RECEBEDOR"), 33 | 34 | REMOVIDA_PELO_PSP("REMOVIDA_PELO_PSP"); 35 | 36 | private String value; 37 | 38 | CobStatus(String value) { 39 | this.value = value; 40 | } 41 | 42 | @JsonValue 43 | public String getValue() { 44 | return value; 45 | } 46 | 47 | @Override 48 | public String toString() { 49 | return String.valueOf(value); 50 | } 51 | 52 | @JsonCreator 53 | public static CobStatus fromValue(String value) { 54 | for (CobStatus b : CobStatus.values()) { 55 | if (b.value.equals(value)) { 56 | return b; 57 | } 58 | } 59 | throw new IllegalArgumentException("Unexpected value '" + value + "'"); 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /boot-pix-client/src/main/java/com/javaparainiciantes/boot/pix/model/Pessoa.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot.pix.model; 2 | 3 | public interface Pessoa { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /boot-pix-client/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | logging.level.org.springframework.web.client=DEBUG 2 | -------------------------------------------------------------------------------- /boot-pix-client/src/test/java/com/javaparainiciantes/boot/BootPixClientApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class BootPixClientApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /crud-example/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.3.2.RELEASE 9 | 10 | 11 | com.example 12 | crud-example 13 | 0.0.1-SNAPSHOT 14 | crud-example 15 | Demo project for Spring Boot 16 | 17 | 18 | 1.8 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-data-jpa 25 | 26 | 27 | 28 | 29 | org.projectlombok 30 | lombok 31 | true 32 | 33 | 34 | org.springframework.boot 35 | spring-boot-starter-test 36 | test 37 | 38 | 39 | org.junit.vintage 40 | junit-vintage-engine 41 | 42 | 43 | 44 | 45 | org.springframework.boot 46 | spring-boot-devtools 47 | 48 | 49 | mysql 50 | mysql-connector-java 51 | runtime 52 | 53 | 54 | 55 | 56 | 57 | 58 | org.springframework.boot 59 | spring-boot-maven-plugin 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /crud-example/src/main/java/br/com/example/demo/CrudExampleApplication.java: -------------------------------------------------------------------------------- 1 | package br.com.example.demo; 2 | 3 | import org.springframework.boot.ApplicationArguments; 4 | import org.springframework.boot.ApplicationRunner; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | import org.springframework.stereotype.Component; 8 | 9 | import br.com.example.demo.model.Person; 10 | import br.com.example.demo.repository.PersonRepository; 11 | import lombok.AllArgsConstructor; 12 | 13 | @SpringBootApplication 14 | public class CrudExampleApplication { 15 | 16 | public static void main(String[] args) { 17 | SpringApplication.run(CrudExampleApplication.class, args); 18 | } 19 | 20 | } 21 | 22 | @Component 23 | @AllArgsConstructor 24 | class Runner implements ApplicationRunner { 25 | 26 | PersonRepository repository; //TODO terminar 27 | 28 | @Override 29 | public void run(ApplicationArguments args) throws Exception { 30 | Person person = new Person(null, "Pedro", 41); 31 | repository.save(person); 32 | repository.findByNomeContaining("Pedro").forEach(System.out::println); 33 | 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /crud-example/src/main/java/br/com/example/demo/model/Person.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.model; 2 | 3 | import javax.persistence.Entity; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.GenerationType; 6 | import javax.persistence.Id; 7 | 8 | import lombok.AllArgsConstructor; 9 | import lombok.Data; 10 | import lombok.NoArgsConstructor; 11 | 12 | @Entity 13 | @Data 14 | @AllArgsConstructor 15 | @NoArgsConstructor 16 | public class Person { 17 | 18 | @Id 19 | @GeneratedValue(strategy = GenerationType.IDENTITY) 20 | private Long id; 21 | private String nome; 22 | private int age; 23 | } 24 | -------------------------------------------------------------------------------- /crud-example/src/main/java/br/com/example/demo/repository/PersonRepository.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.repository; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import com.example.demo.model.Person; 8 | 9 | public interface PersonRepository extends JpaRepository{ 10 | 11 | Person findByNome(String nome); 12 | Person findByAge(int age); 13 | List findByAgeGreaterThanEqual(int age); 14 | List findByNomeLike(String nome); 15 | List findByNomeContaining(String nome); 16 | } 17 | -------------------------------------------------------------------------------- /crud-example/src/main/resources/Presentation: -------------------------------------------------------------------------------- 1 | Criando queries (buscas) com Spring Boot sem SQL! 2 | 3 | 0) O que é Query? 4 | 1) Relembrando Spring Data 5 | 2) Interface Repository 6 | 3) Criando queries através do nome dos métodos 7 | 4) Próximos capítulos -------------------------------------------------------------------------------- /crud-example/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.username=root 2 | spring.datasource.password=pass 3 | spring.datasource.url=jdbc:mysql://localhost:3306/db 4 | spring.jpa.show-sql=true 5 | spring.jpa.hibernate.ddl-auto=update -------------------------------------------------------------------------------- /crud-example/src/test/java/com/example/demo/CrudExampleApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class CrudExampleApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /demo-runner/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | org.springframework.boot 8 | spring-boot-starter-parent 9 | 2.3.1.RELEASE 10 | 11 | 12 | com.example 13 | demo-runner 14 | 0.0.1-SNAPSHOT 15 | demo-runner 16 | Demo project for Spring Boot 17 | 18 | 19 | 1.8 20 | 21 | 22 | 23 | 24 | org.springframework.boot 25 | spring-boot-starter 26 | 27 | 28 | 29 | org.springframework.boot 30 | spring-boot-starter-test 31 | test 32 | 33 | 34 | org.junit.vintage 35 | junit-vintage-engine 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | org.springframework.boot 45 | spring-boot-maven-plugin 46 | 47 | 48 | true 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /demo-runner/src/main/java/com/example/demo/DemoRunnerApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import org.springframework.beans.factory.annotation.Value; 4 | import org.springframework.boot.ApplicationArguments; 5 | import org.springframework.boot.ApplicationRunner; 6 | import org.springframework.boot.SpringApplication; 7 | import org.springframework.boot.autoconfigure.SpringBootApplication; 8 | import org.springframework.stereotype.Component; 9 | 10 | @SpringBootApplication 11 | public class DemoRunnerApplication { 12 | 13 | public static void main(String[] args) { 14 | SpringApplication.run(DemoRunnerApplication.class, args); 15 | } 16 | 17 | 18 | } 19 | 20 | @Component 21 | class Runner implements ApplicationRunner { 22 | 23 | @Value("${hello:Hello from code}") 24 | String hello; 25 | 26 | @Override 27 | public void run(ApplicationArguments args) throws Exception { 28 | System.out.println("Propriedade hello2: " + hello); 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /demo-runner/src/main/resources/application-dev.properties: -------------------------------------------------------------------------------- 1 | hello=Hello from dev application.properties -------------------------------------------------------------------------------- /demo-runner/src/main/resources/application-test.properties: -------------------------------------------------------------------------------- 1 | hello=Hello from test application.properties -------------------------------------------------------------------------------- /demo-runner/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.profiles.active=test 2 | hello=Hello from application.properties 3 | -------------------------------------------------------------------------------- /demo-runner/src/main/resources/teste.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pedrocavalero/springboot-tests/ffeffbc449175b888fdc2fb873f56d31d8dd6cf1/demo-runner/src/main/resources/teste.txt -------------------------------------------------------------------------------- /demo-runner/src/test/java/com/example/demo/DemoRunnerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class DemoRunnerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /demo/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | org.springframework.boot 8 | spring-boot-starter-parent 9 | 2.5.6 10 | 11 | 12 | com.example 13 | demo 14 | 0.0.1-SNAPSHOT 15 | demo 16 | Demo project for Spring Boot 17 | 18 | 19 | 1.8 20 | 21 | 22 | 23 | 24 | org.springframework.boot 25 | spring-boot-starter-web 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-devtools 30 | runtime 31 | true 32 | 33 | 34 | org.springframework.boot 35 | spring-boot-starter-test 36 | test 37 | 38 | 39 | org.junit.vintage 40 | junit-vintage-engine 41 | 42 | 43 | 44 | 45 | org.springframework.boot 46 | spring-boot-starter-data-jpa 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | com.h2database 56 | h2 57 | runtime 58 | 59 | 60 | io.springfox 61 | springfox-boot-starter 62 | 3.0.0 63 | 64 | 65 | io.springfox 66 | springfox-swagger-ui 67 | 3.0.0 68 | 69 | 70 | 71 | 72 | 73 | 74 | org.springframework.boot 75 | spring-boot-maven-plugin 76 | 77 | false 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /demo/src/main/java/com/example/demo/DemoApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class DemoApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(DemoApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /demo/src/main/java/com/example/demo/SpringFoxConfig.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | 6 | import springfox.documentation.builders.PathSelectors; 7 | import springfox.documentation.builders.RequestHandlerSelectors; 8 | import springfox.documentation.spi.DocumentationType; 9 | import springfox.documentation.spring.web.plugins.Docket; 10 | 11 | @Configuration 12 | public class SpringFoxConfig { 13 | @Bean 14 | public Docket swagger() { 15 | return new Docket(DocumentationType.SWAGGER_2) 16 | .select() 17 | .apis(RequestHandlerSelectors.any()) 18 | .paths(PathSelectors.any()) 19 | .build(); 20 | } 21 | } -------------------------------------------------------------------------------- /demo/src/main/java/com/example/demo/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | public class HelloController { 8 | 9 | @GetMapping("/hello") 10 | public String hello() { 11 | return "Hello Universe 2"; 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /demo/src/main/java/com/example/demo/controller/InboundAdapter.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.controller; 2 | 3 | import static java.lang.annotation.ElementType.TYPE; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | import org.springframework.core.annotation.AliasFor; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | @Retention(RUNTIME) 13 | @Target(TYPE) 14 | @RestController 15 | public @interface InboundAdapter { 16 | @AliasFor(annotation = RestController.class) 17 | String value() default ""; 18 | } 19 | -------------------------------------------------------------------------------- /demo/src/main/java/com/example/demo/controller/PessoaController.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.controller; 2 | 3 | import java.util.List; 4 | import java.util.Optional; 5 | 6 | import org.springframework.web.bind.annotation.PathVariable; 7 | import org.springframework.web.bind.annotation.RequestBody; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RequestMethod; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import com.example.demo.model.Pessoa; 13 | import com.example.demo.service.PessoaService; 14 | 15 | @InboundAdapter 16 | public class PessoaController { 17 | 18 | PessoaService pessoaService; 19 | 20 | public PessoaController(PessoaService pessoaService) { 21 | super(); 22 | this.pessoaService = pessoaService; 23 | } 24 | 25 | @RequestMapping(path="/pessoa", method = RequestMethod.POST) 26 | public Pessoa salvarPessoa(@RequestBody Pessoa pessoa) { 27 | return pessoaService.salvar(pessoa); 28 | } 29 | 30 | @RequestMapping(path="/pessoa", method = RequestMethod.GET) 31 | public List buscarTodas(){ 32 | return pessoaService.listar(); 33 | } 34 | 35 | @RequestMapping(path="/pessoa/cpf/{cpf}", method = RequestMethod.GET) 36 | public List buscarPorCpf(@PathVariable String cpf){ 37 | return pessoaService.buscaPorCpf(cpf); 38 | } 39 | 40 | @RequestMapping(path="/pessoa/{id}", method = RequestMethod.GET) 41 | public Optional buscarPorCpf(@PathVariable Long id){ 42 | return pessoaService.buscaPorId(id); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /demo/src/main/java/com/example/demo/model/Pessoa.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.model; 2 | 3 | import javax.persistence.Entity; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.Id; 6 | 7 | @Entity 8 | public class Pessoa { 9 | 10 | @Id 11 | @GeneratedValue 12 | private Long id; 13 | private String nome; 14 | private String cpf; 15 | 16 | 17 | public Pessoa() { 18 | super(); 19 | } 20 | public Pessoa(Long id, String nome, String cpf) { 21 | super(); 22 | this.id = id; 23 | this.nome = nome; 24 | this.cpf = cpf; 25 | } 26 | public Pessoa(String nome, String cpf) { 27 | super(); 28 | this.nome = nome; 29 | this.cpf = cpf; 30 | } 31 | public Long getId() { 32 | return id; 33 | } 34 | public void setId(Long id) { 35 | this.id = id; 36 | } 37 | public String getNome() { 38 | return nome; 39 | } 40 | public void setNome(String nome) { 41 | this.nome = nome; 42 | } 43 | public String getCpf() { 44 | return cpf; 45 | } 46 | public void setCpf(String cpf) { 47 | this.cpf = cpf; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /demo/src/main/java/com/example/demo/repository/PessoaRepository.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.repository; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.stereotype.Repository; 7 | 8 | import com.example.demo.model.Pessoa; 9 | 10 | @Repository 11 | public interface PessoaRepository extends JpaRepository{ 12 | 13 | List findByCpf(String cpf); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /demo/src/main/java/com/example/demo/service/MeuServico.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.service; 2 | 3 | import static java.lang.annotation.ElementType.TYPE; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | import org.springframework.stereotype.Service; 10 | 11 | @Retention(RUNTIME) 12 | @Target(TYPE) 13 | @Service 14 | public @interface MeuServico { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo/src/main/java/com/example/demo/service/NiceComponent.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.service; 2 | 3 | import org.springframework.stereotype.Component; 4 | 5 | @Component 6 | public class NiceComponent { 7 | 8 | public String doSomethingNice(String parameter) { 9 | return parameter + " ok"; 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /demo/src/main/java/com/example/demo/service/PessoaService.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.service; 2 | 3 | import java.util.List; 4 | import java.util.Optional; 5 | 6 | import com.example.demo.model.Pessoa; 7 | import com.example.demo.repository.PessoaRepository; 8 | 9 | @MeuServico 10 | public class PessoaService { 11 | 12 | PessoaRepository repository; 13 | NiceComponent component; 14 | 15 | public PessoaService(PessoaRepository repository, NiceComponent component) { 16 | super(); 17 | this.repository = repository; 18 | this.component = component; 19 | } 20 | 21 | public Pessoa salvar(Pessoa pessoa) { 22 | List pessoas = repository.findByCpf(pessoa.getCpf()); 23 | if(pessoas.size()>0) { 24 | throw new RuntimeException("Pessoa com este cpf já existe."); 25 | } 26 | return repository.save(pessoa); 27 | } 28 | 29 | public List listar(){ 30 | System.out.println(component.doSomethingNice("Listar")); 31 | return repository.findAll(); 32 | } 33 | 34 | public List buscaPorCpf(String cpf){ 35 | return repository.findByCpf(cpf); 36 | } 37 | 38 | public Optional buscaPorId(Long id){ 39 | return repository.findById(id); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /demo/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #spring.datasource.url=jdbc:mysql://localhost:3306/pessoa 2 | #spring.datasource.username=root 3 | #spring.datasource.password=pass 4 | spring.jpa.hibernate.ddl-auto=create 5 | spring.devtools.remote.secret=secret 6 | logging.level.org.springframework=DEBUG 7 | -------------------------------------------------------------------------------- /demo/src/test/java/com/example/demo/DemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class DemoApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /demo/src/test/java/com/example/demo/controller/HelloControllerIntTest.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.controller; 2 | 3 | import static org.junit.jupiter.api.Assertions.*; 4 | import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; 5 | import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; 6 | 7 | import org.junit.jupiter.api.Test; 8 | import org.junit.jupiter.api.extension.ExtendWith; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; 11 | import org.springframework.test.context.junit.jupiter.SpringExtension; 12 | import org.springframework.test.web.servlet.MockMvc; 13 | 14 | @WebMvcTest(HelloController.class) 15 | @ExtendWith(SpringExtension.class) 16 | class HelloControllerIntTest { 17 | 18 | @Autowired 19 | private MockMvc mvc; 20 | 21 | @Test 22 | void testHello() throws Exception { 23 | mvc.perform(get("/hello")).andExpect(content().string("Hello Universe 2")); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /demo/src/test/java/com/example/demo/controller/HelloControllerTest.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.controller; 2 | 3 | import static org.junit.jupiter.api.Assertions.*; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | class HelloControllerTest { 8 | 9 | @Test 10 | void testHello() { 11 | HelloController hc = new HelloController(); 12 | assertEquals("Hello Universe 2", hc.hello()); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /demo/src/test/java/com/example/demo/controller/PessoaControllerIntTest.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.controller; 2 | 3 | import static org.mockito.Mockito.when; 4 | import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; 5 | import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; 6 | 7 | import java.util.List; 8 | 9 | import org.junit.jupiter.api.Test; 10 | import org.junit.jupiter.api.extension.ExtendWith; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; 13 | import org.springframework.boot.test.mock.mockito.MockBean; 14 | import org.springframework.test.context.junit.jupiter.SpringExtension; 15 | import org.springframework.test.web.servlet.MockMvc; 16 | 17 | import com.example.demo.model.Pessoa; 18 | import com.example.demo.service.PessoaService; 19 | 20 | @WebMvcTest(PessoaController.class) 21 | @ExtendWith(SpringExtension.class) 22 | class PessoaControllerIntTest { 23 | 24 | @Autowired 25 | private MockMvc mvc; 26 | 27 | @MockBean 28 | private PessoaService pessoaService; 29 | 30 | @Test 31 | void testBuscaPorCpf() throws Exception { 32 | when(pessoaService.buscaPorCpf("1")).thenReturn(List.of(new Pessoa("Pedro", "1"))); 33 | mvc.perform(get("/pessoa/cpf/1")).andExpect(content().json("[{\"nome\":\"Pedro\",\"cpf\":\"1\"}]")); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /demo/src/test/java/com/example/demo/controller/PessoaControllerTest.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.controller; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | import static org.mockito.Mockito.when; 5 | 6 | import java.util.List; 7 | 8 | import org.junit.jupiter.api.Test; 9 | import org.junit.jupiter.api.extension.ExtendWith; 10 | import org.mockito.InjectMocks; 11 | import org.mockito.Mock; 12 | import org.mockito.junit.jupiter.MockitoExtension; 13 | 14 | import com.example.demo.model.Pessoa; 15 | import com.example.demo.service.PessoaService; 16 | 17 | @ExtendWith(MockitoExtension.class) 18 | class PessoaControllerTest { 19 | 20 | @Mock 21 | private PessoaService pessoaService; 22 | @InjectMocks 23 | private PessoaController pessoaController; 24 | 25 | 26 | @Test 27 | void testBuscaPorCpf() { 28 | Pessoa pessoa = new Pessoa("Pedro", "1"); 29 | when(pessoaService.buscaPorCpf("1")).thenReturn(List.of(pessoa)); 30 | List resultado = pessoaController.buscarPorCpf("1"); 31 | assertEquals(1, resultado.size()); 32 | assertEquals(pessoa, resultado.get(0)); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /lombok-example/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.3.2.RELEASE 9 | 10 | 11 | com.example 12 | lombok-example 13 | 0.0.1-SNAPSHOT 14 | lombok-example 15 | Demo project for Spring Boot 16 | 17 | 18 | 1.8 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter 25 | 26 | 27 | 28 | org.projectlombok 29 | lombok 30 | true 31 | 32 | 33 | org.springframework.boot 34 | spring-boot-starter-test 35 | test 36 | 37 | 38 | org.junit.vintage 39 | junit-vintage-engine 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | org.springframework.boot 49 | spring-boot-maven-plugin 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /lombok-example/src/main/java/com/example/demo/LombokExampleApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class LombokExampleApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(LombokExampleApplication.class, args); 11 | 12 | Person p1 = new Person("Pedro", 39); 13 | System.out.println(p1); 14 | System.out.println(p1.getName()); 15 | System.out.println(p1.getAge()); 16 | 17 | Person p2 = Person.builder().name("Pedro").age(38).build(); 18 | System.out.println(p2); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /lombok-example/src/main/java/com/example/demo/Person.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | 7 | @Data 8 | @AllArgsConstructor 9 | @Builder 10 | public class Person { 11 | 12 | private String name; 13 | private int age; 14 | } 15 | -------------------------------------------------------------------------------- /lombok-example/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lombok-example/src/test/java/com/example/demo/LombokExampleApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class LombokExampleApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /oauth2-client/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.3.4.RELEASE 9 | 10 | 11 | com.javaparainiciantes.boot 12 | oauth2-client 13 | 0.0.1-SNAPSHOT 14 | oauth2-client 15 | Testando anotações com delegação 16 | 17 | 18 | 11 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-oauth2-client 25 | 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-devtools 30 | runtime 31 | true 32 | 33 | 34 | org.projectlombok 35 | lombok 36 | true 37 | 38 | 39 | org.springframework.boot 40 | spring-boot-starter-test 41 | test 42 | 43 | 44 | org.junit.vintage 45 | junit-vintage-engine 46 | 47 | 48 | 49 | 50 | org.springframework.boot 51 | spring-boot-starter-webflux 52 | 53 | 54 | io.projectreactor 55 | reactor-test 56 | test 57 | 58 | 59 | 60 | 61 | 62 | 63 | org.springframework.boot 64 | spring-boot-maven-plugin 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /oauth2-client/src/main/java/com/javaparainiciantes/boot/OAuth2ClientApplication.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.springframework.boot.ApplicationArguments; 4 | import org.springframework.boot.ApplicationRunner; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | import org.springframework.stereotype.Component; 8 | 9 | import com.javaparainiciantes.boot.client.HelloRestClient; 10 | 11 | import lombok.AllArgsConstructor; 12 | 13 | @SpringBootApplication 14 | public class OAuth2ClientApplication { 15 | 16 | public static void main(String[] args) { 17 | SpringApplication.run(OAuth2ClientApplication.class, args); 18 | } 19 | 20 | } 21 | 22 | @AllArgsConstructor 23 | @Component 24 | class Runner implements ApplicationRunner { 25 | 26 | HelloRestClient client; 27 | 28 | @Override 29 | public void run(ApplicationArguments args) throws Exception { 30 | client.getHello().subscribe(System.out::println); 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /oauth2-client/src/main/java/com/javaparainiciantes/boot/OAuth2ClientConfig.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.security.config.web.server.ServerHttpSecurity; 6 | import org.springframework.security.oauth2.client.AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager; 7 | import org.springframework.security.oauth2.client.ReactiveOAuth2AuthorizedClientService; 8 | import org.springframework.security.oauth2.client.registration.ReactiveClientRegistrationRepository; 9 | import org.springframework.security.oauth2.client.web.reactive.function.client.ServerOAuth2AuthorizedClientExchangeFilterFunction; 10 | import org.springframework.security.web.server.SecurityWebFilterChain; 11 | import org.springframework.web.reactive.function.client.WebClient; 12 | 13 | @Configuration 14 | public class OAuth2ClientConfig { 15 | 16 | @Bean 17 | WebClient webClient(ReactiveClientRegistrationRepository clientRegistrations, 18 | ReactiveOAuth2AuthorizedClientService clientService) { 19 | ServerOAuth2AuthorizedClientExchangeFilterFunction oauth = 20 | new ServerOAuth2AuthorizedClientExchangeFilterFunction( 21 | //clientRegistrations, 22 | //new UnAuthenticatedServerOAuth2AuthorizedClientRepository()); 23 | new AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager( 24 | clientRegistrations, clientService)); 25 | oauth.setDefaultClientRegistrationId("teste"); 26 | return WebClient.builder() 27 | .filter(oauth) 28 | .build(); 29 | } 30 | 31 | @Bean 32 | public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { 33 | http.authorizeExchange() 34 | .anyExchange() 35 | .authenticated() 36 | .and() 37 | .httpBasic(); 38 | return http.build(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /oauth2-client/src/main/java/com/javaparainiciantes/boot/client/HelloRestClient.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot.client; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.security.oauth2.client.OAuth2AuthorizedClient; 5 | import org.springframework.security.oauth2.client.annotation.RegisteredOAuth2AuthorizedClient; 6 | import org.springframework.security.oauth2.client.web.reactive.function.client.ServerOAuth2AuthorizedClientExchangeFilterFunction; 7 | import org.springframework.stereotype.Component; 8 | import org.springframework.web.reactive.function.client.WebClient; 9 | 10 | import reactor.core.publisher.Mono; 11 | 12 | @Component 13 | public class HelloRestClient { 14 | 15 | @Autowired 16 | private WebClient webClient; 17 | 18 | public Mono getHello() { 19 | return webClient 20 | .get() 21 | .uri("http://localhost:8081/hello") 22 | .retrieve() 23 | .bodyToMono(String.class); 24 | } 25 | 26 | public Mono getHelloUsingAuthorizedClient(OAuth2AuthorizedClient authorizedClient) { 27 | return webClient 28 | .get() 29 | .uri("http://localhost:8081/hello") 30 | .attributes(ServerOAuth2AuthorizedClientExchangeFilterFunction.oauth2AuthorizedClient(authorizedClient)) 31 | .retrieve() 32 | .bodyToMono(String.class) 33 | .map(string -> "Resource: " + string 34 | + " - Principal associated: " + authorizedClient.getPrincipalName() 35 | + " - Token will expire at: " + authorizedClient.getAccessToken().getExpiresAt()); 36 | 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /oauth2-client/src/main/java/com/javaparainiciantes/boot/controller/HelloRestController.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot.controller; 2 | 3 | import org.springframework.security.oauth2.client.OAuth2AuthorizedClient; 4 | import org.springframework.security.oauth2.client.annotation.RegisteredOAuth2AuthorizedClient; 5 | import org.springframework.security.oauth2.client.web.reactive.function.client.ServerOAuth2AuthorizedClientExchangeFilterFunction; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.RestController; 9 | import org.springframework.web.reactive.function.client.WebClient; 10 | 11 | import com.javaparainiciantes.boot.client.HelloRestClient; 12 | 13 | import lombok.AllArgsConstructor; 14 | import reactor.core.publisher.Mono; 15 | 16 | @AllArgsConstructor 17 | @RestController 18 | public class HelloRestController { 19 | 20 | HelloRestClient client; 21 | 22 | @GetMapping("/external-hello") 23 | Mono getExternalHello() { 24 | return client.getHello(); 25 | } 26 | 27 | @GetMapping("/external-hello-with-client") 28 | Mono getExternalHelloUsingAuthorizedClient( 29 | @RegisteredOAuth2AuthorizedClient("teste") OAuth2AuthorizedClient authorizedClient) { 30 | return client.getHelloUsingAuthorizedClient(authorizedClient); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /oauth2-client/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8082 2 | spring.security.oauth2.client.registration.teste.authorization-grant-type=client_credentials 3 | spring.security.oauth2.client.registration.teste.client-id=teste 4 | spring.security.oauth2.client.registration.teste.client-secret=989aaa7a-9a89-4fb4-93e8-cb791597b0f9 5 | spring.security.oauth2.client.provider.teste.token-uri=http://localhost:8180/auth/realms/demo/protocol/openid-connect/token 6 | 7 | logging.level.org.springframework.security=DEBUG 8 | 9 | spring.security.user.password=password -------------------------------------------------------------------------------- /oauth2-client/src/test/java/com/javaparainiciantes/boot/OAuth2ClientApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class OAuth2ClientApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /rest-api-crud-example/src/main/java/com/javaparainiciantes/boot/Carro.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import javax.persistence.Entity; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.GenerationType; 6 | import javax.persistence.Id; 7 | 8 | import lombok.AllArgsConstructor; 9 | import lombok.Data; 10 | import lombok.NoArgsConstructor; 11 | 12 | @Entity 13 | @Data 14 | @AllArgsConstructor 15 | @NoArgsConstructor 16 | public class Carro { 17 | 18 | @Id 19 | @GeneratedValue(strategy = GenerationType.AUTO) 20 | Long id; 21 | String marca; 22 | String modelo; 23 | Integer ano; 24 | } 25 | -------------------------------------------------------------------------------- /rest-api-crud-example/src/main/java/com/javaparainiciantes/boot/CarroController.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.web.bind.annotation.DeleteMapping; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.PathVariable; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.RequestBody; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import lombok.AllArgsConstructor; 13 | 14 | @RestController 15 | @AllArgsConstructor 16 | public class CarroController { 17 | 18 | CarroRepository repository; 19 | 20 | @GetMapping("/carro") 21 | public List getAllCarros(){ 22 | return repository.findAll(); 23 | } 24 | 25 | @GetMapping("/carro/{id}") 26 | public Carro getCarroById(@PathVariable Long id) { 27 | return repository.findById(id).get(); 28 | } 29 | 30 | @PostMapping("/carro") 31 | public Carro saveCarro(@RequestBody Carro carro) { 32 | return repository.save(carro); 33 | } 34 | 35 | @DeleteMapping("/carro/{id}") 36 | public void deleteCarro(@PathVariable Long id) { 37 | repository.deleteById(id); 38 | } 39 | 40 | 41 | } 42 | -------------------------------------------------------------------------------- /rest-api-crud-example/src/main/java/com/javaparainiciantes/boot/CarroRepository.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | public interface CarroRepository extends JpaRepository{ 6 | 7 | } 8 | -------------------------------------------------------------------------------- /rest-api-crud-example/src/main/java/com/javaparainiciantes/boot/RestApiCrudExampleApplication.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class RestApiCrudExampleApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(RestApiCrudExampleApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /rest-api-crud-example/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /rest-api-crud-example/src/test/java/com/javaparainiciantes/boot/RestApiCrudExampleApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class RestApiCrudExampleApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /security-demo/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.3.3.RELEASE 9 | 10 | 11 | com.javaparainiciantes.boot 12 | security-demo 13 | 0.0.1-SNAPSHOT 14 | security-demo 15 | Demo project for Spring Boot 16 | 17 | 18 | 1.8 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-web 25 | 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-starter-test 30 | test 31 | 32 | 33 | org.junit.vintage 34 | junit-vintage-engine 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | org.springframework.boot 44 | spring-boot-maven-plugin 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /security-demo/src/main/java/com/javaparainiciantes/boot/SecurityDemoApplication.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SecurityDemoApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SecurityDemoApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /security-demo/src/main/java/com/javaparainiciantes/boot/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | @RestController 8 | @RequestMapping("/hello") 9 | public class HelloController { 10 | 11 | @GetMapping 12 | public String hello() { 13 | return "Hello"; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /security-demo/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /security-demo/src/test/java/com/javaparainiciantes/boot/SecurityDemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SecurityDemoApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /security-example/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.3.3.RELEASE 9 | 10 | 11 | com.example 12 | security-example 13 | 0.0.1-SNAPSHOT 14 | security-example 15 | Demo project for Spring Boot 16 | 17 | 18 | 1.8 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-security 25 | 26 | 27 | org.springframework.boot 28 | spring-boot-starter-web 29 | 30 | 31 | 32 | org.springframework.boot 33 | spring-boot-starter-test 34 | test 35 | 36 | 37 | org.junit.vintage 38 | junit-vintage-engine 39 | 40 | 41 | 42 | 43 | org.springframework.security 44 | spring-security-test 45 | test 46 | 47 | 48 | org.springframework.boot 49 | 50 | spring-boot-starter-oauth2-resource-server 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | org.springframework.boot 59 | spring-boot-maven-plugin 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /security-example/src/main/java/com/example/demo/BasicConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.http.HttpMethod; 5 | import org.springframework.security.config.annotation.web.builders.HttpSecurity; 6 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; 7 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; 8 | import org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationConverter; 9 | import org.springframework.security.oauth2.server.resource.authentication.JwtGrantedAuthoritiesConverter; 10 | 11 | @Configuration 12 | @EnableWebSecurity 13 | public class BasicConfiguration extends WebSecurityConfigurerAdapter { 14 | 15 | @Override 16 | protected void configure(HttpSecurity http) throws Exception { 17 | http.cors() 18 | .and() 19 | .authorizeRequests() 20 | .antMatchers(HttpMethod.GET, "/hello") 21 | .hasAuthority("ROLE_USER") 22 | .anyRequest() 23 | .authenticated() 24 | .and() 25 | .oauth2ResourceServer() 26 | .jwt() 27 | .jwtAuthenticationConverter(getJwtAuthenticationConverter()); 28 | } 29 | 30 | JwtAuthenticationConverter getJwtAuthenticationConverter() { 31 | JwtGrantedAuthoritiesConverter converter = new JwtGrantedAuthoritiesConverter(); 32 | converter.setAuthoritiesClaimName("authorities"); 33 | converter.setAuthorityPrefix(""); 34 | JwtAuthenticationConverter authenticationConverter = new JwtAuthenticationConverter(); 35 | authenticationConverter.setJwtGrantedAuthoritiesConverter(converter); 36 | return authenticationConverter; 37 | } 38 | } -------------------------------------------------------------------------------- /security-example/src/main/java/com/example/demo/SecurityExampleApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SecurityExampleApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SecurityExampleApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /security-example/src/main/java/com/example/demo/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.controller; 2 | 3 | import org.springframework.web.bind.annotation.RequestMapping; 4 | import org.springframework.web.bind.annotation.RequestMethod; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | @RestController 8 | public class HelloController { 9 | 10 | @RequestMapping(value="/hello", method = RequestMethod.GET) 11 | public String hello() { 12 | return "hello"; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /security-example/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #spring.security.user.name=admin 2 | #spring.security.user.password=admin 3 | 4 | server.port=8081 5 | spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:8180/auth/realms/demo 6 | spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://localhost:8180/auth/realms/demo/protocol/openid-connect/certs 7 | 8 | logging.level.org.springframework.security=DEBUG 9 | -------------------------------------------------------------------------------- /security-example/src/test/java/com/example/demo/BasicConfigurationIntegrationTest.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | import static org.junit.jupiter.api.Assertions.assertEquals; 5 | import static org.junit.jupiter.api.Assertions.assertTrue; 6 | 7 | import java.io.IOException; 8 | import java.net.MalformedURLException; 9 | import java.net.URL; 10 | 11 | import org.junit.jupiter.api.BeforeEach; 12 | import org.junit.jupiter.api.Test; 13 | import org.springframework.boot.test.context.SpringBootTest; 14 | import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; 15 | import org.springframework.boot.test.web.client.TestRestTemplate; 16 | import org.springframework.boot.web.server.LocalServerPort; 17 | import org.springframework.http.HttpStatus; 18 | import org.springframework.http.ResponseEntity; 19 | 20 | @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) 21 | public class BasicConfigurationIntegrationTest { 22 | 23 | TestRestTemplate restTemplate; 24 | URL base; 25 | @LocalServerPort 26 | int port; 27 | 28 | @BeforeEach 29 | public void setUp() throws MalformedURLException { 30 | restTemplate = new TestRestTemplate("user", "password"); 31 | base = new URL("http://localhost:" + port+ "/hello"); 32 | } 33 | 34 | @Test 35 | public void greetingShouldReturnDefaultMessage() throws Exception { 36 | assertThat(this.restTemplate.getForObject(base.toURI(), 37 | String.class)).contains("hello"); 38 | } 39 | @Test 40 | public void whenLoggedUserRequestsHomePage_ThenSuccess() 41 | throws IllegalStateException, IOException { 42 | ResponseEntity response = 43 | restTemplate.getForEntity(base.toString(), String.class); 44 | 45 | assertEquals(HttpStatus.OK, response.getStatusCode()); 46 | assertTrue(response.getBody().contains("hello")); 47 | } 48 | 49 | @Test 50 | public void whenUserWithWrongCredentials_thenUnauthorizedPage() 51 | throws Exception { 52 | 53 | restTemplate = new TestRestTemplate("user", "wrongpassword"); 54 | ResponseEntity response = 55 | restTemplate.getForEntity(base.toString(), String.class); 56 | 57 | assertEquals(HttpStatus.UNAUTHORIZED, response.getStatusCode()); 58 | } 59 | } -------------------------------------------------------------------------------- /security-example/src/test/java/com/example/demo/SecurityExampleApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | 5 | import org.junit.jupiter.api.Test; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.boot.test.context.SpringBootTest; 8 | 9 | import com.example.demo.controller.HelloController; 10 | 11 | @SpringBootTest 12 | class SecurityExampleApplicationTests { 13 | 14 | @Autowired 15 | HelloController controller; 16 | 17 | @Test 18 | void contextLoads() { 19 | assertThat(controller).isNotNull(); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/.swagger-codegen-ignore: -------------------------------------------------------------------------------- 1 | # Swagger Codegen Ignore 2 | # Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/.swagger-codegen/VERSION: -------------------------------------------------------------------------------- 1 | 2.4.18 -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/.travis.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Generated by: https://github.com/swagger-api/swagger-codegen.git 3 | # 4 | language: java 5 | jdk: 6 | - oraclejdk8 7 | - oraclejdk7 8 | before_install: 9 | # ensure gradlew has proper permission 10 | - chmod a+x ./gradlew 11 | script: 12 | # test using maven 13 | - mvn test 14 | # uncomment below to test using gradle 15 | # - gradle test 16 | # uncomment below to test using sbt 17 | # - sbt test 18 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/build.sbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pedrocavalero/springboot-tests/ffeffbc449175b888fdc2fb873f56d31d8dd6cf1/spring-swagger-codegen-api-client/build.sbt -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/Cobranca.md: -------------------------------------------------------------------------------- 1 | 2 | # Cobranca 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **devedor** | [**CobrancasDevedor**](CobrancasDevedor.md) | | [optional] 8 | **valor** | [**CobrancasValor**](CobrancasValor.md) | | 9 | **chave** | **String** | Chave Pix do Sistema DICT - BACEN | 10 | **calendario** | [**CobrancasCalendario**](CobrancasCalendario.md) | | 11 | **txid** | **String** | ID de identificação do documento entre os bancos e o cliente emissor.O campo txid é obrigatório e determina o identificador da transação.O objetivo desse campo é ser um elemento que possibilite a conciliação de pagamentos. O txid é criado exclusivamente pelo usuário recebedor e está sob sua responsabilidade. Deve ser único por CNPJ do recebedor. Apesar de possuir o tamanho de 35 posições (PAC008), para QR Code Estático o tamanho máximo permitido é de 25 posições (limitação EMV). No caso do QR Code dinâmico o campo deve possuir de 26 posição até 35 posições. Os caracteres permitidos no contexto do Pix para o campo txId são:Letras minúsculas, de ‘a’ a ‘z’, Letras maiúsculas, de ‘A’ a ‘Z’, Dígitos decimais, de ‘0’ a ‘9’ | 12 | **infoAdicionais** | [**List<CobrancasInfoAdicionais>**](CobrancasInfoAdicionais.md) | Cada respectiva informação adicional contida na lista (nome e valor) deve ser apresentada ao pagador | [optional] 13 | **location** | **String** | URL com a Localização do Payload informado na criação da cobrança | 14 | **revisao** | [**BigDecimal**](BigDecimal.md) | Quantidade de revisões da cobrança | 15 | **solicitacaoPagador** | **String** | O campo solicitacaoPagador, determina um texto a ser apresentado ao pagador para que ele possa digitar uma informação correlata, em formato livre, a ser enviada ao recebedor | [optional] 16 | **pix** | [**List<PixsPix>**](PixsPix.md) | Lista de Pix recebidos | [optional] 17 | **status** | **String** | Status da Cobrança. Pode ser: ATIVA, CONCLUIDA, REMOVIDA_PELO_USUARIO_RECEBEDOR, REMOVIDA_PELO_PSP | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/CobrancaPatchRequest.md: -------------------------------------------------------------------------------- 1 | 2 | # CobrancaPatchRequest 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **devedor** | [**CobrancasDevedor**](CobrancasDevedor.md) | | [optional] 8 | **valor** | [**CobrancasValor**](CobrancasValor.md) | | [optional] 9 | **calendario** | [**CobrancaPutRequestCalendario**](CobrancaPutRequestCalendario.md) | | [optional] 10 | **infoAdicionais** | [**List<CobrancasInfoAdicionais>**](CobrancasInfoAdicionais.md) | Cada respectiva informação adicional contida na lista (nome e valor) deve ser apresentada ao pagador | [optional] 11 | **solicitacaoPagador** | **String** | O campo solicitacaoPagador, determina um texto a ser apresentado ao pagador para que ele possa digitar uma informação correlata, em formato livre, a ser enviada ao recebedor | [optional] 12 | **status** | **String** | Status da Cobrança | [optional] 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/CobrancaPatchResponse.md: -------------------------------------------------------------------------------- 1 | 2 | # CobrancaPatchResponse 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **devedor** | [**CobrancasDevedor**](CobrancasDevedor.md) | | [optional] 8 | **valor** | [**CobrancasValor**](CobrancasValor.md) | | [optional] 9 | **chave** | **String** | Chave Pix do Sistema DICT - BACEN | 10 | **txid** | **String** | ID de identificação do documento entre os bancos e o cliente emissor.O campo txid é obrigatório e determina o identificador da transação.O objetivo desse campo é ser um elemento que possibilite a conciliação de pagamentos. O txid é criado exclusivamente pelo usuário recebedor e está sob sua responsabilidade. Deve ser único por CNPJ do recebedor. Apesar de possuir o tamanho de 35 posições (PAC008), para QR Code Estático o tamanho máximo permitido é de 25 posições (limitação EMV). No caso do QR Code dinâmico o campo deve possuir de 26 posição até 35 posições. Os caracteres permitidos no contexto do Pix para o campo txId são:Letras minúsculas, de ‘a’ a ‘z’, Letras maiúsculas, de ‘A’ a ‘Z’, Dígitos decimais, de ‘0’ a ‘9’ | 11 | **calendario** | [**CobrancaPatchResponseCalendario**](CobrancaPatchResponseCalendario.md) | | [optional] 12 | **infoAdicionais** | [**List<CobrancasInfoAdicionais>**](CobrancasInfoAdicionais.md) | Cada respectiva informação adicional contida na lista (nome e valor) deve ser apresentada ao pagador | [optional] 13 | **location** | **String** | URL com a Localização do Payload informado na criação da cobrança | 14 | **revisao** | [**BigDecimal**](BigDecimal.md) | Quantidade de revisões da cobrança | 15 | **solicitacaoPagador** | **String** | O campo solicitacaoPagador, determina um texto a ser apresentado ao pagador para que ele possa digitar uma informação correlata, em formato livre, a ser enviada ao recebedor | [optional] 16 | **status** | **String** | Status da Cobrança | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/CobrancaPatchResponseCalendario.md: -------------------------------------------------------------------------------- 1 | 2 | # CobrancaPatchResponseCalendario 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **expiracao** | **Integer** | Tempo de vida da cobrança, especificado em segundos | [optional] 8 | **criacao** | [**OffsetDateTime**](OffsetDateTime.md) | Data e Hora de criação da cobrança | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/CobrancaPutRequest.md: -------------------------------------------------------------------------------- 1 | 2 | # CobrancaPutRequest 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **devedor** | [**CobrancasDevedor**](CobrancasDevedor.md) | | [optional] 8 | **valor** | [**CobrancasValor**](CobrancasValor.md) | | 9 | **chave** | **String** | Chave Pix do Sistema DICT - BACEN | 10 | **calendario** | [**CobrancaPutRequestCalendario**](CobrancaPutRequestCalendario.md) | | [optional] 11 | **infoAdicionais** | [**List<CobrancasInfoAdicionais>**](CobrancasInfoAdicionais.md) | Cada respectiva informação adicional contida na lista (nome e valor) deve ser apresentada ao pagador | [optional] 12 | **solicitacaoPagador** | **String** | O campo solicitacaoPagador, determina um texto a ser apresentado ao pagador para que ele possa digitar uma informação correlata, em formato livre, a ser enviada ao recebedor | [optional] 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/CobrancaPutRequestCalendario.md: -------------------------------------------------------------------------------- 1 | 2 | # CobrancaPutRequestCalendario 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **expiracao** | **Integer** | Tempo de vida da cobrança, especificado em segundos | [optional] 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/CobrancaPutResponse.md: -------------------------------------------------------------------------------- 1 | 2 | # CobrancaPutResponse 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **devedor** | [**CobrancasDevedor**](CobrancasDevedor.md) | | [optional] 8 | **valor** | [**CobrancasValor**](CobrancasValor.md) | | 9 | **chave** | **String** | Chave Pix do Sistema DICT - BACEN | 10 | **txid** | **String** | ID de identificação do documento entre os bancos e o cliente emissor.O campo txid é obrigatório e determina o identificador da transação.O objetivo desse campo é ser um elemento que possibilite a conciliação de pagamentos. O txid é criado exclusivamente pelo usuário recebedor e está sob sua responsabilidade. Deve ser único por CNPJ do recebedor. Apesar de possuir o tamanho de 35 posições (PAC008), para QR Code Estático o tamanho máximo permitido é de 25 posições (limitação EMV). No caso do QR Code dinâmico o campo deve possuir de 26 posição até 35 posições. Os caracteres permitidos no contexto do Pix para o campo txId são:Letras minúsculas, de ‘a’ a ‘z’, Letras maiúsculas, de ‘A’ a ‘Z’, Dígitos decimais, de ‘0’ a ‘9’ | 11 | **calendario** | [**CobrancaPatchResponseCalendario**](CobrancaPatchResponseCalendario.md) | | [optional] 12 | **infoAdicionais** | [**List<CobrancasInfoAdicionais>**](CobrancasInfoAdicionais.md) | Cada respectiva informação adicional contida na lista (nome e valor) deve ser apresentada ao pagador | [optional] 13 | **location** | **String** | URL com a Localização do Payload informado na criação da cobrança | 14 | **revisao** | [**BigDecimal**](BigDecimal.md) | Quantidade de revisões da cobrança | 15 | **solicitacaoPagador** | **String** | O campo solicitacaoPagador, determina um texto a ser apresentado ao pagador para que ele possa digitar uma informação correlata, em formato livre, a ser enviada ao recebedor | [optional] 16 | **status** | **String** | Status da Cobrança | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/Cobrancas.md: -------------------------------------------------------------------------------- 1 | 2 | # Cobrancas 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **cobs** | [**List<CobrancasCobs>**](CobrancasCobs.md) | Estrutura com informações referentes a cobranca do documento | 8 | **parametros** | [**CobrancasParametros**](CobrancasParametros.md) | | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/CobrancasCalendario.md: -------------------------------------------------------------------------------- 1 | 2 | # CobrancasCalendario 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **expiracao** | **Integer** | Tempo de vida da cobrança, especificado em segundos | [optional] 8 | **criacao** | [**OffsetDateTime**](OffsetDateTime.md) | Data e Hora de criação da cobrança | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/CobrancasCobs.md: -------------------------------------------------------------------------------- 1 | 2 | # CobrancasCobs 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **devedor** | [**CobrancasDevedor**](CobrancasDevedor.md) | | [optional] 8 | **valor** | [**CobrancasValor**](CobrancasValor.md) | | 9 | **chave** | **String** | Chave Pix do Sistema DICT - BACEN | 10 | **calendario** | [**CobrancasCalendario**](CobrancasCalendario.md) | | 11 | **txid** | **String** | ID de identificação do documento entre os bancos e o cliente emissor.O campo txid é obrigatório e determina o identificador da transação.O objetivo desse campo é ser um elemento que possibilite a conciliação de pagamentos. O txid é criado exclusivamente pelo usuário recebedor e está sob sua responsabilidade. Deve ser único por CNPJ do recebedor. Apesar de possuir o tamanho de 35 posições (PAC008), para QR Code Estático o tamanho máximo permitido é de 25 posições (limitação EMV). No caso do QR Code dinâmico o campo deve possuir de 26 posição até 35 posições. Os caracteres permitidos no contexto do Pix para o campo txId são:Letras minúsculas, de ‘a’ a ‘z’, Letras maiúsculas, de ‘A’ a ‘Z’, Dígitos decimais, de ‘0’ a ‘9’ | 12 | **infoAdicionais** | [**List<CobrancasInfoAdicionais>**](CobrancasInfoAdicionais.md) | Cada respectiva informação adicional contida na lista (nome e valor) deve ser apresentada ao pagador | [optional] 13 | **location** | **String** | URL com a Localização do Payload informado na criação da cobrança | 14 | **revisao** | [**BigDecimal**](BigDecimal.md) | Quantidade de revisões da cobrança | 15 | **solicitacaoPagador** | **String** | O campo solicitacaoPagador, determina um texto a ser apresentado ao pagador para que ele possa digitar uma informação correlata, em formato livre, a ser enviada ao recebedor | [optional] 16 | **pix** | [**List<PixsPix>**](PixsPix.md) | Lista de Pix recebidos | [optional] 17 | **status** | **String** | Status da Cobrança. Pode ser: ATIVA, CONCLUIDA, REMOVIDA_PELO_USUARIO_RECEBEDOR, REMOVIDA_PELO_PSP | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/CobrancasDevedor.md: -------------------------------------------------------------------------------- 1 | 2 | # CobrancasDevedor 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **cpf** | **String** | Número do Documento Cadastro de Pessoa Física. (Apenas CPF, não enviar CNPJ) | 8 | **nome** | **String** | Nome do pagador da Cobrança. Necessário preencher o campo CNPJ ou o campo CPF. | 9 | **cnpj** | **String** | Número do Cadastro Nacional da Pessoa Jurídica. (Apenas CNPJ, não enviar CPF) | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/CobrancasInfoAdicionais.md: -------------------------------------------------------------------------------- 1 | 2 | # CobrancasInfoAdicionais 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **valor** | **String** | Valor ou dados à serem apresentados ao pagador. | 8 | **nome** | **String** | Nome do campo, que se queira dar a informação apresentada. | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/CobrancasParametros.md: -------------------------------------------------------------------------------- 1 | 2 | # CobrancasParametros 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **paginacao** | [**CobrancasParametrosPaginacao**](CobrancasParametrosPaginacao.md) | | 8 | **inicio** | **String** | Data início da criação da cobrança, no formato '2020-06-01T09:00'. | 9 | **fim** | **String** | Data fim da criação da Cobrança, no formato '2020-06-01T09:00'. | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/CobrancasParametrosPaginacao.md: -------------------------------------------------------------------------------- 1 | 2 | # CobrancasParametrosPaginacao 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **paginaAtual** | [**BigDecimal**](BigDecimal.md) | Numero da Página que deseja realizar o acesso, valor considerado por default 0 | 8 | **quantidadeTotalDeItens** | [**BigDecimal**](BigDecimal.md) | Quantidade total de itens disponíveis de acordo com os parâmetros informados. | 9 | **itensPorPagina** | [**BigDecimal**](BigDecimal.md) | Quantidade de ocorrência retornadas por pagina, valor por default 100 | 10 | **quantidadeDePaginas** | [**BigDecimal**](BigDecimal.md) | Quantidade de páginas disponíveis para consulta. | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/CobrancasValor.md: -------------------------------------------------------------------------------- 1 | 2 | # CobrancasValor 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **original** | **String** | Valor nominal/original da cobrança. | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/DevolucaoPix.md: -------------------------------------------------------------------------------- 1 | 2 | # DevolucaoPix 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **horario** | [**PixsHorario**](PixsHorario.md) | | 8 | **rtrId** | **String** | ReturnIdentification | 9 | **valor** | **String** | Valor da devolução | 10 | **id** | **String** | Id da devolução | 11 | **status** | **String** | Status da Devolução. Pode ser: EM_PROCESSAMENTO, DEVOLVIDO ou NAO_REALIZADO | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/DevolucaoPutRequest.md: -------------------------------------------------------------------------------- 1 | 2 | # DevolucaoPutRequest 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **valor** | **String** | Valor da devolução | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/DevolucaoPutResponse.md: -------------------------------------------------------------------------------- 1 | 2 | # DevolucaoPutResponse 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **horario** | [**DevolucaoPutResponseHorario**](DevolucaoPutResponseHorario.md) | | 8 | **rtrId** | **String** | ReturnIdentification | 9 | **valor** | **String** | Valor da devolução | 10 | **id** | **String** | Id da devolução | 11 | **status** | **String** | Status da Devolução. Pode ser: EM PROCESSAMENTO, DEVOLVIDO ou NAO_REALIZADO | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/DevolucaoPutResponseHorario.md: -------------------------------------------------------------------------------- 1 | 2 | # DevolucaoPutResponseHorario 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **solicitacao** | [**OffsetDateTime**](OffsetDateTime.md) | Horário no qual a devolução foi solicitada no PSP. | 8 | **liquidacao** | [**OffsetDateTime**](OffsetDateTime.md) | Horário no qual a devolução foi liquidada no PSP. | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/Pix.md: -------------------------------------------------------------------------------- 1 | 2 | # Pix 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **horario** | [**OffsetDateTime**](OffsetDateTime.md) | Horário do pagamento. | 8 | **devolucoes** | [**List<PixsDevolucoes>**](PixsDevolucoes.md) | Devolucoes registradas no documento | [optional] 9 | **pagador** | [**PixsPagador**](PixsPagador.md) | | [optional] 10 | **valor** | **String** | Valor do pagamento. | 11 | **txid** | **String** | ID de identificação do documento entre os bancos e o cliente emissor.O campo txid é obrigatório e determina o identificador da transação.O objetivo desse campo é ser um elemento que possibilite a conciliação de pagamentos. O txid é criado exclusivamente pelo usuário recebedor e está sob sua responsabilidade. Deve ser único por CNPJ do recebedor. Apesar de possuir o tamanho de 35 posições (PAC008), para QR Code Estático o tamanho máximo permitido é de 25 posições (limitação EMV). No caso do QR Code dinâmico o campo deve possuir de 26 posição até 35 posições. Os caracteres permitidos no contexto do Pix para o campo txId são:Letras minúsculas, de ‘a’ a ‘z’, Letras maiúsculas, de ‘A’ a ‘Z’, Dígitos decimais, de ‘0’ a ‘9’ | [optional] 12 | **infoPagador** | **String** | Informação livre do pagador. | [optional] 13 | **endToEndId** | **String** | Id fim a fim da transação.Esse campo é o 'id do pagamento'. Transita nas mensagens de recebimento dos QR Codes e transferências. | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/Pixs.md: -------------------------------------------------------------------------------- 1 | 2 | # Pixs 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **parametros** | [**PixsParametros**](PixsParametros.md) | | 8 | **pix** | [**List<PixsPix>**](PixsPix.md) | Devolucoes registradas no documento | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/PixsDevolucoes.md: -------------------------------------------------------------------------------- 1 | 2 | # PixsDevolucoes 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **horario** | [**PixsHorario**](PixsHorario.md) | | 8 | **rtrId** | **String** | ReturnIdentification | 9 | **valor** | **String** | Valor da devolução | 10 | **id** | **String** | Id da devolução | 11 | **status** | **String** | Status da Devolução. Pode ser: EM_PROCESSAMENTO, DEVOLVIDO ou NAO_REALIZADO | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/PixsHorario.md: -------------------------------------------------------------------------------- 1 | 2 | # PixsHorario 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **solicitacao** | [**OffsetDateTime**](OffsetDateTime.md) | Data hora em que foi efetuada a devolução | 8 | **liquidacao** | [**OffsetDateTime**](OffsetDateTime.md) | Horário no qual a devolução foi liquidada no PSP. | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/PixsPagador.md: -------------------------------------------------------------------------------- 1 | 2 | # PixsPagador 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **cpf** | **String** | Número do Documento Cadastro de Pessoa Física. (Apenas CPF, não enviar CNPJ) | 8 | **nome** | **String** | Nome do pagador da Cobrança. Necessário preencher o campo CNPJ ou o campo CPF. | 9 | **cnpj** | **String** | Número do Cadastro Nacional da Pessoa Jurídica. (Apenas CNPJ, não enviar CPF) | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/PixsParametros.md: -------------------------------------------------------------------------------- 1 | 2 | # PixsParametros 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **paginacao** | [**PixsParametrosPaginacao**](PixsParametrosPaginacao.md) | | 8 | **inicio** | **String** | Data início da criação da cobrança, no formato '2020-06-01T09:00 | [optional] 9 | **fim** | **String** | Data fim da criação da Cobrança, no formato '2020-06-01T09:00'. | [optional] 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/PixsParametrosPaginacao.md: -------------------------------------------------------------------------------- 1 | 2 | # PixsParametrosPaginacao 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **paginaAtual** | [**BigDecimal**](BigDecimal.md) | Numero da Página que deseja realizar o acesso, valor considerado por default 0 | [optional] 8 | **quantidadeTotalDeItens** | [**BigDecimal**](BigDecimal.md) | Quantidade total de itens consultados | [optional] 9 | **itensPorPagina** | [**BigDecimal**](BigDecimal.md) | Quantidade de ocorrência retornadas por pagina, valor por default 100 | [optional] 10 | **quantidadeDePaginas** | [**BigDecimal**](BigDecimal.md) | Quantidade de páginas disponíveis para consulta. | [optional] 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/PixsPix.md: -------------------------------------------------------------------------------- 1 | 2 | # PixsPix 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **horario** | [**OffsetDateTime**](OffsetDateTime.md) | Horário do pagamento. | 8 | **devolucoes** | [**List<PixsDevolucoes>**](PixsDevolucoes.md) | Devolucoes registradas no documento | [optional] 9 | **pagador** | [**PixsPagador**](PixsPagador.md) | | [optional] 10 | **valor** | **String** | Valor do pagamento. | 11 | **txid** | **String** | ID de identificação do documento entre os bancos e o cliente emissor.O campo txid é obrigatório e determina o identificador da transação.O objetivo desse campo é ser um elemento que possibilite a conciliação de pagamentos. O txid é criado exclusivamente pelo usuário recebedor e está sob sua responsabilidade. Deve ser único por CNPJ do recebedor. Apesar de possuir o tamanho de 35 posições (PAC008), para QR Code Estático o tamanho máximo permitido é de 25 posições (limitação EMV). No caso do QR Code dinâmico o campo deve possuir de 26 posição até 35 posições. Os caracteres permitidos no contexto do Pix para o campo txId são:Letras minúsculas, de ‘a’ a ‘z’, Letras maiúsculas, de ‘A’ a ‘Z’, Dígitos decimais, de ‘0’ a ‘9’ | [optional] 12 | **infoPagador** | **String** | Informação livre do pagador. | [optional] 13 | **endToEndId** | **String** | Id fim a fim da transação.Esse campo é o 'id do pagamento'. Transita nas mensagens de recebimento dos QR Codes e transferências. | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/Qrcode.md: -------------------------------------------------------------------------------- 1 | 2 | # Qrcode 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **imagemBase64** | **String** | Imagem em base64 do QRCODE PIX | [optional] 8 | **pixLink** | **String** | URL do PIX para consulta do payload criptografado - Pix Link BACEN | [optional] 9 | **emv** | **String** | Texto do QR CODE no padrao EMVco | [optional] 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/Webhook.md: -------------------------------------------------------------------------------- 1 | 2 | # Webhook 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **chave** | **String** | Chave de endereçamento do recebedor cadastrada na DICT | [optional] 8 | **criacao** | **String** | Data e hora de criação do webhook em formato de acordo com RFC 3339 | [optional] 9 | **webhookUrl** | **String** | URL para chamada webhook de aviso de recebimento pix | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/Webhooks.md: -------------------------------------------------------------------------------- 1 | 2 | # Webhooks 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **webhooks** | [**List<WebhooksWebhooks>**](WebhooksWebhooks.md) | Webhooks cadastrados para o cliente | 8 | **parametros** | [**WebhooksParametros**](WebhooksParametros.md) | | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/WebhooksParametros.md: -------------------------------------------------------------------------------- 1 | 2 | # WebhooksParametros 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **paginacao** | [**WebhooksParametrosPaginacao**](WebhooksParametrosPaginacao.md) | | 8 | **inicio** | **String** | Data início da criação do webhook, no formato de acordo com RFC 3339 | [optional] 9 | **fim** | **String** | Data fim da criação do webhook, em formato de acordo com RFC 3339. | [optional] 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/WebhooksParametrosPaginacao.md: -------------------------------------------------------------------------------- 1 | 2 | # WebhooksParametrosPaginacao 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **paginaAtual** | [**BigDecimal**](BigDecimal.md) | Numero da Página que deseja realizar o acesso, valor considerado por default 0 | [optional] 8 | **quantidadeTotalDeItens** | [**BigDecimal**](BigDecimal.md) | Quantidade total de itens consultados | [optional] 9 | **itensPorPagina** | [**BigDecimal**](BigDecimal.md) | Quantidade de ocorrência retornadas por pagina, valor por default 100 | [optional] 10 | **quantidadeDePaginas** | [**BigDecimal**](BigDecimal.md) | Quantidade de páginas disponíveis para consulta. | [optional] 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/docs/WebhooksWebhooks.md: -------------------------------------------------------------------------------- 1 | 2 | # WebhooksWebhooks 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **chave** | **String** | Chave de endereçamento do recebedor cadastrada na DICT | [optional] 8 | **criacao** | **String** | Data e hora de criação do webhook em formato de acordo com RFC 3339 | [optional] 9 | **webhookUrl** | **String** | URL para chamada webhook de aviso de recebimento pix | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/git_push.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ 3 | # 4 | # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" 5 | 6 | git_user_id=$1 7 | git_repo_id=$2 8 | release_note=$3 9 | 10 | if [ "$git_user_id" = "" ]; then 11 | git_user_id="GIT_USER_ID" 12 | echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" 13 | fi 14 | 15 | if [ "$git_repo_id" = "" ]; then 16 | git_repo_id="GIT_REPO_ID" 17 | echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" 18 | fi 19 | 20 | if [ "$release_note" = "" ]; then 21 | release_note="Minor update" 22 | echo "[INFO] No command line input provided. Set \$release_note to $release_note" 23 | fi 24 | 25 | # Initialize the local directory as a Git repository 26 | git init 27 | 28 | # Adds the files in the local repository and stages them for commit. 29 | git add . 30 | 31 | # Commits the tracked changes and prepares them to be pushed to a remote repository. 32 | git commit -m "$release_note" 33 | 34 | # Sets the new remote 35 | git_remote=`git remote` 36 | if [ "$git_remote" = "" ]; then # git remote not defined 37 | 38 | if [ "$GIT_TOKEN" = "" ]; then 39 | echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." 40 | git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git 41 | else 42 | git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git 43 | fi 44 | 45 | fi 46 | 47 | git pull origin master 48 | 49 | # Pushes (Forces) the changes in the local repository up to the remote repository 50 | echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" 51 | git push origin master 2>&1 | grep -v 'To https' 52 | 53 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/gradle.properties: -------------------------------------------------------------------------------- 1 | # Uncomment to build for Android 2 | #target = android -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pedrocavalero/springboot-tests/ffeffbc449175b888fdc2fb873f56d31d8dd6cf1/spring-swagger-codegen-api-client/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue May 17 23:08:05 CST 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip 7 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = "pix-client" -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/src/main/java/com/pedrocavalero/pix/Main.java: -------------------------------------------------------------------------------- 1 | package com.pedrocavalero.pix; 2 | 3 | import com.pedrocavalero.pix.invoker.ApiClient; 4 | import com.pedrocavalero.pix.model.Cobranca; 5 | 6 | public class Main { 7 | 8 | public static void main(String[] args) { 9 | ApiClient client = new ApiClient(); 10 | client.setAccessToken(""); 11 | DefaultApi api = new DefaultApi(client); 12 | Cobranca cobranca = api.gETCobtxid("1", "", ""); 13 | //System.out.println(cobranca); 14 | System.out.println(cobranca.getStatus()); 15 | 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/src/main/java/com/pedrocavalero/pix/invoker/RFC3339DateFormat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * pix_recebimentos 3 | * APis Pix Recebimentos para Clientes (regulatórias). 4 | * 5 | * OpenAPI spec version: 1.40.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | package com.pedrocavalero.pix.invoker; 14 | 15 | import com.fasterxml.jackson.databind.util.ISO8601DateFormat; 16 | import com.fasterxml.jackson.databind.util.ISO8601Utils; 17 | 18 | import java.text.FieldPosition; 19 | import java.util.Date; 20 | 21 | 22 | public class RFC3339DateFormat extends ISO8601DateFormat { 23 | 24 | // Same as ISO8601DateFormat but serializing milliseconds. 25 | @Override 26 | public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { 27 | String value = ISO8601Utils.format(date, true); 28 | toAppendTo.append(value); 29 | return toAppendTo; 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/src/main/java/com/pedrocavalero/pix/invoker/auth/ApiKeyAuth.java: -------------------------------------------------------------------------------- 1 | package com.pedrocavalero.pix.invoker.auth; 2 | 3 | import org.springframework.http.HttpHeaders; 4 | import org.springframework.util.MultiValueMap; 5 | 6 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-02-20T11:54:19.646-03:00") 7 | public class ApiKeyAuth implements Authentication { 8 | private final String location; 9 | private final String paramName; 10 | 11 | private String apiKey; 12 | private String apiKeyPrefix; 13 | 14 | public ApiKeyAuth(String location, String paramName) { 15 | this.location = location; 16 | this.paramName = paramName; 17 | } 18 | 19 | public String getLocation() { 20 | return location; 21 | } 22 | 23 | public String getParamName() { 24 | return paramName; 25 | } 26 | 27 | public String getApiKey() { 28 | return apiKey; 29 | } 30 | 31 | public void setApiKey(String apiKey) { 32 | this.apiKey = apiKey; 33 | } 34 | 35 | public String getApiKeyPrefix() { 36 | return apiKeyPrefix; 37 | } 38 | 39 | public void setApiKeyPrefix(String apiKeyPrefix) { 40 | this.apiKeyPrefix = apiKeyPrefix; 41 | } 42 | 43 | @Override 44 | public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { 45 | if (apiKey == null) { 46 | return; 47 | } 48 | String value; 49 | if (apiKeyPrefix != null) { 50 | value = apiKeyPrefix + " " + apiKey; 51 | } else { 52 | value = apiKey; 53 | } 54 | if (location.equals("query")) { 55 | queryParams.add(paramName, value); 56 | } else if (location.equals("header")) { 57 | headerParams.add(paramName, value); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/src/main/java/com/pedrocavalero/pix/invoker/auth/Authentication.java: -------------------------------------------------------------------------------- 1 | package com.pedrocavalero.pix.invoker.auth; 2 | 3 | import org.springframework.http.HttpHeaders; 4 | import org.springframework.util.MultiValueMap; 5 | 6 | public interface Authentication { 7 | /** 8 | * Apply authentication settings to header and / or query parameters. 9 | * @param queryParams The query parameters for the request 10 | * @param headerParams The header parameters for the request 11 | */ 12 | public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams); 13 | } 14 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/src/main/java/com/pedrocavalero/pix/invoker/auth/HttpBasicAuth.java: -------------------------------------------------------------------------------- 1 | package com.pedrocavalero.pix.invoker.auth; 2 | 3 | import java.io.UnsupportedEncodingException; 4 | import java.nio.charset.StandardCharsets; 5 | 6 | import org.springframework.http.HttpHeaders; 7 | import org.springframework.util.Base64Utils; 8 | import org.springframework.util.MultiValueMap; 9 | 10 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-02-20T11:54:19.646-03:00") 11 | public class HttpBasicAuth implements Authentication { 12 | private String username; 13 | private String password; 14 | 15 | public String getUsername() { 16 | return username; 17 | } 18 | 19 | public void setUsername(String username) { 20 | this.username = username; 21 | } 22 | 23 | public String getPassword() { 24 | return password; 25 | } 26 | 27 | public void setPassword(String password) { 28 | this.password = password; 29 | } 30 | 31 | @Override 32 | public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { 33 | if (username == null && password == null) { 34 | return; 35 | } 36 | String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); 37 | headerParams.add(HttpHeaders.AUTHORIZATION, "Basic " + Base64Utils.encodeToString(str.getBytes(StandardCharsets.UTF_8))); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/src/main/java/com/pedrocavalero/pix/invoker/auth/OAuth.java: -------------------------------------------------------------------------------- 1 | package com.pedrocavalero.pix.invoker.auth; 2 | 3 | import org.springframework.http.HttpHeaders; 4 | import org.springframework.util.MultiValueMap; 5 | 6 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-02-20T11:54:19.646-03:00") 7 | public class OAuth implements Authentication { 8 | private String accessToken; 9 | 10 | public String getAccessToken() { 11 | return accessToken; 12 | } 13 | 14 | public void setAccessToken(String accessToken) { 15 | this.accessToken = accessToken; 16 | } 17 | 18 | @Override 19 | public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams) { 20 | if (accessToken != null) { 21 | headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/src/main/java/com/pedrocavalero/pix/invoker/auth/OAuthFlow.java: -------------------------------------------------------------------------------- 1 | package com.pedrocavalero.pix.invoker.auth; 2 | 3 | public enum OAuthFlow { 4 | accessCode, implicit, password, application 5 | } -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/src/main/java/com/pedrocavalero/pix/model/CobrancasValor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * pix_recebimentos 3 | * APis Pix Recebimentos para Clientes (regulatórias). 4 | * 5 | * OpenAPI spec version: 1.40.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.pedrocavalero.pix.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import com.fasterxml.jackson.annotation.JsonProperty; 19 | import com.fasterxml.jackson.annotation.JsonCreator; 20 | import com.fasterxml.jackson.annotation.JsonValue; 21 | import io.swagger.annotations.ApiModel; 22 | import io.swagger.annotations.ApiModelProperty; 23 | 24 | /** 25 | * Estrutura com valores referentes a cobrança do documento 26 | */ 27 | @ApiModel(description = "Estrutura com valores referentes a cobrança do documento") 28 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-02-20T11:54:19.646-03:00") 29 | public class CobrancasValor { 30 | @JsonProperty("original") 31 | private String original = null; 32 | 33 | public CobrancasValor original(String original) { 34 | this.original = original; 35 | return this; 36 | } 37 | 38 | /** 39 | * Valor nominal/original da cobrança. 40 | * @return original 41 | **/ 42 | @ApiModelProperty(example = "567.89", required = true, value = "Valor nominal/original da cobrança.") 43 | public String getOriginal() { 44 | return original; 45 | } 46 | 47 | public void setOriginal(String original) { 48 | this.original = original; 49 | } 50 | 51 | 52 | @Override 53 | public boolean equals(java.lang.Object o) { 54 | if (this == o) { 55 | return true; 56 | } 57 | if (o == null || getClass() != o.getClass()) { 58 | return false; 59 | } 60 | CobrancasValor cobrancasValor = (CobrancasValor) o; 61 | return Objects.equals(this.original, cobrancasValor.original); 62 | } 63 | 64 | @Override 65 | public int hashCode() { 66 | return Objects.hash(original); 67 | } 68 | 69 | 70 | @Override 71 | public String toString() { 72 | StringBuilder sb = new StringBuilder(); 73 | sb.append("class CobrancasValor {\n"); 74 | 75 | sb.append(" original: ").append(toIndentedString(original)).append("\n"); 76 | sb.append("}"); 77 | return sb.toString(); 78 | } 79 | 80 | /** 81 | * Convert the given object to string with each line indented by 4 spaces 82 | * (except the first line). 83 | */ 84 | private String toIndentedString(java.lang.Object o) { 85 | if (o == null) { 86 | return "null"; 87 | } 88 | return o.toString().replace("\n", "\n "); 89 | } 90 | 91 | } 92 | 93 | -------------------------------------------------------------------------------- /spring-swagger-codegen-api-client/src/main/java/com/pedrocavalero/pix/model/DevolucaoPutRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * pix_recebimentos 3 | * APis Pix Recebimentos para Clientes (regulatórias). 4 | * 5 | * OpenAPI spec version: 1.40.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.pedrocavalero.pix.model; 15 | 16 | import java.util.Objects; 17 | import java.util.Arrays; 18 | import com.fasterxml.jackson.annotation.JsonProperty; 19 | import com.fasterxml.jackson.annotation.JsonCreator; 20 | import com.fasterxml.jackson.annotation.JsonValue; 21 | import io.swagger.annotations.ApiModel; 22 | import io.swagger.annotations.ApiModelProperty; 23 | 24 | /** 25 | * DevolucaoPutRequest 26 | */ 27 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-02-20T11:54:19.646-03:00") 28 | public class DevolucaoPutRequest { 29 | @JsonProperty("valor") 30 | private String valor = null; 31 | 32 | public DevolucaoPutRequest valor(String valor) { 33 | this.valor = valor; 34 | return this; 35 | } 36 | 37 | /** 38 | * Valor da devolução 39 | * @return valor 40 | **/ 41 | @ApiModelProperty(example = "150.00", required = true, value = "Valor da devolução") 42 | public String getValor() { 43 | return valor; 44 | } 45 | 46 | public void setValor(String valor) { 47 | this.valor = valor; 48 | } 49 | 50 | 51 | @Override 52 | public boolean equals(java.lang.Object o) { 53 | if (this == o) { 54 | return true; 55 | } 56 | if (o == null || getClass() != o.getClass()) { 57 | return false; 58 | } 59 | DevolucaoPutRequest devolucaoPutRequest = (DevolucaoPutRequest) o; 60 | return Objects.equals(this.valor, devolucaoPutRequest.valor); 61 | } 62 | 63 | @Override 64 | public int hashCode() { 65 | return Objects.hash(valor); 66 | } 67 | 68 | 69 | @Override 70 | public String toString() { 71 | StringBuilder sb = new StringBuilder(); 72 | sb.append("class DevolucaoPutRequest {\n"); 73 | 74 | sb.append(" valor: ").append(toIndentedString(valor)).append("\n"); 75 | sb.append("}"); 76 | return sb.toString(); 77 | } 78 | 79 | /** 80 | * Convert the given object to string with each line indented by 4 spaces 81 | * (except the first line). 82 | */ 83 | private String toIndentedString(java.lang.Object o) { 84 | if (o == null) { 85 | return "null"; 86 | } 87 | return o.toString().replace("\n", "\n "); 88 | } 89 | 90 | } 91 | 92 | -------------------------------------------------------------------------------- /webclient-demo/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.3.4.RELEASE 9 | 10 | 11 | com.javaparainiciantes.boot 12 | webclient-demo 13 | 0.0.1-SNAPSHOT 14 | webclient-demo 15 | Demo project for Spring Boot 16 | 17 | 18 | 11 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-oauth2-client 25 | 26 | 27 | org.springframework.boot 28 | spring-boot-starter-webflux 29 | 30 | 31 | 32 | org.springframework.boot 33 | spring-boot-devtools 34 | runtime 35 | true 36 | 37 | 38 | org.projectlombok 39 | lombok 40 | true 41 | 42 | 43 | org.springframework.boot 44 | spring-boot-starter-test 45 | test 46 | 47 | 48 | org.junit.vintage 49 | junit-vintage-engine 50 | 51 | 52 | 53 | 54 | io.projectreactor 55 | reactor-test 56 | test 57 | 58 | 59 | 60 | 61 | 62 | 63 | org.springframework.boot 64 | spring-boot-maven-plugin 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /webclient-demo/src/main/java/com/javaparainiciantes/boot/WebclientDemoApplication.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.springframework.boot.ApplicationArguments; 4 | import org.springframework.boot.ApplicationRunner; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | import org.springframework.stereotype.Component; 8 | import org.springframework.web.reactive.function.client.WebClient; 9 | 10 | import lombok.AllArgsConstructor; 11 | 12 | @SpringBootApplication 13 | public class WebclientDemoApplication { 14 | 15 | public static void main(String[] args) { 16 | SpringApplication.run(WebclientDemoApplication.class, args); 17 | } 18 | 19 | } 20 | 21 | @AllArgsConstructor 22 | @Component 23 | class Runner implements ApplicationRunner { 24 | 25 | WebClient webClient; 26 | 27 | @Override 28 | public void run(ApplicationArguments args) throws Exception { 29 | webClient 30 | .get() 31 | .uri("http://localhost:8081/hello") 32 | .retrieve() 33 | .bodyToMono(String.class) 34 | .subscribe(System.out::println); 35 | } 36 | 37 | } -------------------------------------------------------------------------------- /webclient-demo/src/main/java/com/javaparainiciantes/boot/WebclientDemoConfig.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.security.oauth2.client.AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager; 6 | import org.springframework.security.oauth2.client.ReactiveOAuth2AuthorizedClientService; 7 | import org.springframework.security.oauth2.client.registration.ReactiveClientRegistrationRepository; 8 | import org.springframework.security.oauth2.client.web.reactive.function.client.ServerOAuth2AuthorizedClientExchangeFilterFunction; 9 | import org.springframework.web.reactive.function.client.WebClient; 10 | 11 | @Configuration 12 | public class WebclientDemoConfig { 13 | 14 | @Bean 15 | WebClient webClient(ReactiveClientRegistrationRepository clientRegistrations, 16 | ReactiveOAuth2AuthorizedClientService clientService) { 17 | ServerOAuth2AuthorizedClientExchangeFilterFunction oauth = 18 | new ServerOAuth2AuthorizedClientExchangeFilterFunction( 19 | new AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager( 20 | clientRegistrations, clientService)); 21 | oauth.setDefaultClientRegistrationId("teste"); 22 | return WebClient.builder() 23 | .filter(oauth) 24 | .build(); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /webclient-demo/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | server.port=8082 3 | spring.security.oauth2.client.registration.teste.authorization-grant-type=client_credentials 4 | spring.security.oauth2.client.registration.teste.client-id=teste 5 | spring.security.oauth2.client.registration.teste.client-secret=989aaa7a-9a89-4fb4-93e8-cb791597b0f9 6 | spring.security.oauth2.client.provider.teste.token-uri=http://localhost:8180/auth/realms/demo/protocol/openid-connect/token 7 | 8 | logging.level.org.springframework.security=DEBUG 9 | 10 | -------------------------------------------------------------------------------- /webclient-demo/src/test/java/com/javaparainiciantes/boot/WebclientDemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class WebclientDemoApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /webclient-oauth2/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.3.4.RELEASE 9 | 10 | 11 | com.javaparainiciantes.boot 12 | webclient-oauth2 13 | 0.0.1-SNAPSHOT 14 | webclient-oauth2 15 | Demo project for Spring Boot 16 | 17 | 18 | 11 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-oauth2-client 25 | 26 | 27 | org.springframework.boot 28 | spring-boot-starter-webflux 29 | 30 | 31 | 32 | org.springframework.boot 33 | spring-boot-devtools 34 | runtime 35 | true 36 | 37 | 38 | org.projectlombok 39 | lombok 40 | true 41 | 42 | 43 | org.springframework.boot 44 | spring-boot-starter-test 45 | test 46 | 47 | 48 | org.junit.vintage 49 | junit-vintage-engine 50 | 51 | 52 | 53 | 54 | io.projectreactor 55 | reactor-test 56 | test 57 | 58 | 59 | 60 | 61 | 62 | 63 | org.springframework.boot 64 | spring-boot-maven-plugin 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /webclient-oauth2/src/main/java/com/javaparainiciantes/boot/WebClientOAuth2Config.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.security.config.web.server.ServerHttpSecurity; 6 | import org.springframework.security.oauth2.client.AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager; 7 | import org.springframework.security.oauth2.client.ReactiveOAuth2AuthorizedClientService; 8 | import org.springframework.security.oauth2.client.registration.ReactiveClientRegistrationRepository; 9 | import org.springframework.security.oauth2.client.web.reactive.function.client.ServerOAuth2AuthorizedClientExchangeFilterFunction; 10 | import org.springframework.security.web.server.SecurityWebFilterChain; 11 | import org.springframework.web.reactive.function.client.WebClient; 12 | 13 | @Configuration 14 | public class WebClientOAuth2Config { 15 | 16 | @Bean 17 | WebClient webClient(ReactiveClientRegistrationRepository clientRegistrations, 18 | ReactiveOAuth2AuthorizedClientService clientService) { 19 | ServerOAuth2AuthorizedClientExchangeFilterFunction oauth = 20 | new ServerOAuth2AuthorizedClientExchangeFilterFunction( 21 | new AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager( 22 | clientRegistrations, clientService)); 23 | oauth.setDefaultClientRegistrationId("teste"); 24 | return WebClient.builder() 25 | .filter(oauth) 26 | .build(); 27 | } 28 | 29 | @Bean 30 | public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { 31 | http.authorizeExchange() 32 | .anyExchange() 33 | .authenticated() 34 | .and() 35 | .httpBasic(); 36 | return http.build(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /webclient-oauth2/src/main/java/com/javaparainiciantes/boot/WebClientOAuth2Controller.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.springframework.web.bind.annotation.RequestMapping; 4 | import org.springframework.web.bind.annotation.RequestMethod; 5 | import org.springframework.web.bind.annotation.RestController; 6 | import org.springframework.web.reactive.function.client.WebClient; 7 | 8 | import lombok.AllArgsConstructor; 9 | import reactor.core.publisher.Mono; 10 | 11 | @RestController 12 | @AllArgsConstructor 13 | public class WebClientOAuth2Controller { 14 | 15 | WebClient webClient; 16 | 17 | @RequestMapping(method = RequestMethod.GET, value = "/external-hello") 18 | Mono getExternalHello() { 19 | return webClient 20 | .get() 21 | .uri("http://localhost:8081/hello") 22 | .retrieve() 23 | .bodyToMono(String.class) 24 | .map(retorno -> "Eu recebi externamente um " + retorno); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /webclient-oauth2/src/main/java/com/javaparainiciantes/boot/WebclientOauth2Application.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.springframework.boot.ApplicationArguments; 4 | import org.springframework.boot.ApplicationRunner; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | import org.springframework.stereotype.Component; 8 | import org.springframework.web.reactive.function.client.WebClient; 9 | 10 | import lombok.AllArgsConstructor; 11 | 12 | @SpringBootApplication 13 | public class WebclientOauth2Application { 14 | 15 | public static void main(String[] args) { 16 | SpringApplication.run(WebclientOauth2Application.class, args); 17 | } 18 | 19 | } 20 | 21 | @Component 22 | @AllArgsConstructor 23 | class Runner implements ApplicationRunner { 24 | 25 | WebClient webClient; 26 | 27 | @Override 28 | public void run(ApplicationArguments args) throws Exception { 29 | webClient 30 | .get() 31 | .uri("http://localhost:8081/hello") 32 | .retrieve() 33 | .bodyToMono(String.class) 34 | .subscribe(System.out::println); 35 | } 36 | 37 | } -------------------------------------------------------------------------------- /webclient-oauth2/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.security.oauth2.client.registration.teste.authorization-grant-type=client_credentials 2 | spring.security.oauth2.client.registration.teste.client-id=teste 3 | spring.security.oauth2.client.registration.teste.client-secret=989aaa7a-9a89-4fb4-93e8-cb791597b0f9 4 | spring.security.oauth2.client.provider.teste.token-uri=http://localhost:8180/auth/realms/demo/protocol/openid-connect/token 5 | logging.level.org.springframework.security=DEBUG 6 | server.port=8082 7 | spring.security.user.password=password 8 | 9 | -------------------------------------------------------------------------------- /webclient-oauth2/src/test/java/com/javaparainiciantes/boot/WebclientOauth2ApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class WebclientOauth2ApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /webflux-hello/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.3.4.RELEASE 9 | 10 | 11 | com.javaparainiciantes.boot 12 | webflux-hello 13 | 0.0.1-SNAPSHOT 14 | webflux-hello 15 | Demo project for Spring Boot 16 | 17 | 18 | 11 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-webflux 25 | 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-starter-test 30 | test 31 | 32 | 33 | org.junit.vintage 34 | junit-vintage-engine 35 | 36 | 37 | 38 | 39 | io.projectreactor 40 | reactor-test 41 | test 42 | 43 | 44 | org.springframework.boot 45 | spring-boot-starter-security 46 | 47 | 48 | org.springframework.security 49 | spring-security-test 50 | test 51 | 52 | 53 | 54 | 55 | 56 | 57 | org.springframework.boot 58 | spring-boot-maven-plugin 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /webflux-hello/src/main/java/com/javaparainiciantes/boot/WebFluxHelloController.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | import reactor.core.publisher.Mono; 8 | 9 | @RestController 10 | @RequestMapping("/hello-flux") 11 | public class WebFluxHelloController { 12 | 13 | @GetMapping 14 | private Mono hello(){ 15 | return Mono.just("Hello Flux"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /webflux-hello/src/main/java/com/javaparainiciantes/boot/WebfluxHelloApplication.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class WebfluxHelloApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(WebfluxHelloApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /webflux-hello/src/main/java/com/javaparainiciantes/boot/WebfluxHelloWebSecurityConfig.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.http.HttpMethod; 5 | import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity; 6 | import org.springframework.security.config.web.server.ServerHttpSecurity; 7 | import org.springframework.security.web.server.SecurityWebFilterChain; 8 | 9 | @EnableWebFluxSecurity 10 | public class WebfluxHelloWebSecurityConfig { 11 | 12 | @Bean 13 | public SecurityWebFilterChain springSecurityFilterChain( 14 | ServerHttpSecurity http) { 15 | http.csrf().disable() 16 | .authorizeExchange() 17 | .pathMatchers(HttpMethod.GET, "/hello-flux").permitAll() 18 | .and() 19 | .httpBasic(); 20 | return http.build(); 21 | } 22 | } -------------------------------------------------------------------------------- /webflux-hello/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8083 2 | -------------------------------------------------------------------------------- /webflux-hello/src/test/java/com/javaparainiciantes/boot/WebfluxHelloApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class WebfluxHelloApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /webhook/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.5.0 9 | 10 | 11 | com.javaparainiciantes.boot.pix 12 | webhook 13 | 0.0.1-SNAPSHOT 14 | webhook 15 | Demo project for Spring Boot 16 | 17 | 11 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-web 23 | 24 | 25 | 26 | org.projectlombok 27 | lombok 28 | true 29 | 30 | 31 | org.springframework.boot 32 | spring-boot-starter-test 33 | test 34 | 35 | 36 | 37 | 38 | 39 | 40 | org.springframework.boot 41 | spring-boot-maven-plugin 42 | 43 | 44 | 45 | org.projectlombok 46 | lombok 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /webhook/src/main/java/com/javaparainiciantes/boot/WebhookApplication.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class WebhookApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(WebhookApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /webhook/src/main/java/com/javaparainiciantes/boot/pix/webhook/controller/WebhookController.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot.pix.webhook.controller; 2 | 3 | import org.springframework.http.ResponseEntity; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | import org.springframework.web.bind.annotation.PostMapping; 6 | import org.springframework.web.bind.annotation.RequestBody; 7 | import org.springframework.web.bind.annotation.RestController; 8 | 9 | import lombok.extern.slf4j.Slf4j; 10 | 11 | @RestController 12 | @Slf4j 13 | public class WebhookController { 14 | 15 | @GetMapping("/") 16 | public String hello() { 17 | log.info("Recebendo GET Hello /"); 18 | return "Webhook Hello"; 19 | } 20 | 21 | @PostMapping("/webhook/pix") 22 | public ResponseEntity webhookPix(@RequestBody String body) { 23 | log.info("Recebendo um Post no /webhook/pix body {}",body); 24 | return ResponseEntity.ok().build(); 25 | } 26 | 27 | @PostMapping("/webhook") 28 | public ResponseEntity webhook(@RequestBody String body) { 29 | log.info("Recebendo um Post no /webhook body {}",body); 30 | return ResponseEntity.ok().build(); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /webhook/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webhook/src/test/java/com/javaparainiciantes/boot/WebhookApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.javaparainiciantes.boot; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class WebhookApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | --------------------------------------------------------------------------------