Skip to content

Commit

Permalink
feat: novo provedor de carteira digital
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidawilliam committed May 12, 2021
1 parent 8b579d7 commit 448170a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,6 @@ public void associarCarteira(Carteira carteira) {

public boolean jaEhAssociadoACarteira(ProvedorCarteira provedor) {
return this.carteiras.stream()
.anyMatch(carteira -> carteira.getCarteira().equals(provedor));
.anyMatch(carteira -> carteira.getProvedor().equals(provedor));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ public class Carteira {
private String email;

@Enumerated(EnumType.STRING)
private ProvedorCarteira carteira;
private ProvedorCarteira provedor;

private Long idCartao;

public Carteira(String identificador, String email, ProvedorCarteira carteira) {
public Carteira(String identificador, String email, ProvedorCarteira provedor) {
this.identificador = identificador;
this.email = email;
this.carteira = carteira;
this.provedor = provedor;
}

public Carteira() {
}

public ProvedorCarteira getCarteira() {
return carteira;
public ProvedorCarteira getProvedor() {
return provedor;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

public enum ProvedorCarteira {

PAYPAL
PAYPAL,
SAMSUNG_PAY
}

0 comments on commit 448170a

Please sign in to comment.