-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: analise financeira para proposta
- Loading branch information
1 parent
e3ab71e
commit 4daaff5
Showing
10 changed files
with
136 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/main/java/br/com/zupacademy/william/proposta/proposta/PropostaEstado.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package br.com.zupacademy.william.proposta.proposta; | ||
|
||
public enum PropostaEstado { | ||
|
||
ELEGIVEL, | ||
NAO_ELEGIVEL | ||
} |
12 changes: 12 additions & 0 deletions
12
...r/com/zupacademy/william/proposta/proposta/analisefinanceira/AnaliseFinanceiraClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package br.com.zupacademy.william.proposta.proposta.analisefinanceira; | ||
|
||
import org.springframework.cloud.openfeign.FeignClient; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
|
||
@FeignClient(value = "financeiro", url = "http://localhost:9999/api") | ||
public interface AnaliseFinanceiraClient { | ||
|
||
@PostMapping(value = "/solicitacao") | ||
AnaliseFinanceiraResponse avaliarProposta(@RequestBody AnaliseFinanceiraRequest analiseFinanceiraRequest); | ||
} |
30 changes: 30 additions & 0 deletions
30
.../com/zupacademy/william/proposta/proposta/analisefinanceira/AnaliseFinanceiraRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package br.com.zupacademy.william.proposta.proposta.analisefinanceira; | ||
|
||
public class AnaliseFinanceiraRequest { | ||
|
||
/** | ||
* descomentar jsonproperty caso spring.jackson.property-naming-strategy=SNAKE_CASE | ||
*/ | ||
// @JsonProperty("idProposta") | ||
private String idProposta; | ||
private String documento; | ||
private String nome; | ||
|
||
public AnaliseFinanceiraRequest(String idProposta, String documento, String nome) { | ||
this.idProposta = idProposta; | ||
this.documento = documento; | ||
this.nome = nome; | ||
} | ||
|
||
public String getIdProposta() { | ||
return idProposta; | ||
} | ||
|
||
public String getDocumento() { | ||
return documento; | ||
} | ||
|
||
public String getNome() { | ||
return nome; | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...com/zupacademy/william/proposta/proposta/analisefinanceira/AnaliseFinanceiraResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package br.com.zupacademy.william.proposta.proposta.analisefinanceira; | ||
|
||
public class AnaliseFinanceiraResponse { | ||
|
||
private String idProposta; | ||
private String documento; | ||
private String nome; | ||
private AnaliseFinanceiraResultado resultadoSolicitacao; | ||
|
||
public AnaliseFinanceiraResponse(String idProposta, String documento, String nome, AnaliseFinanceiraResultado resultadoSolicitacao) { | ||
this.idProposta = idProposta; | ||
this.documento = documento; | ||
this.nome = nome; | ||
this.resultadoSolicitacao = resultadoSolicitacao; | ||
} | ||
|
||
public String getIdProposta() { | ||
return idProposta; | ||
} | ||
|
||
public String getDocumento() { | ||
return documento; | ||
} | ||
|
||
public String getNome() { | ||
return nome; | ||
} | ||
|
||
public AnaliseFinanceiraResultado getResultadoSolicitacao() { | ||
return resultadoSolicitacao; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...om/zupacademy/william/proposta/proposta/analisefinanceira/AnaliseFinanceiraResultado.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package br.com.zupacademy.william.proposta.proposta.analisefinanceira; | ||
|
||
public enum AnaliseFinanceiraResultado { | ||
|
||
COM_RESTRICAO, | ||
SEM_RESTRICAO | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters