Rev 296 | Rev 386 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 296 | Rev 353 | ||
|---|---|---|---|
| Line 28... | Line 28... | ||
| 28 | private static final long FORMAPAGAMENTO_15X = 21; |
28 | private static final long FORMAPAGAMENTO_15X = 21; |
| 29 | private static final long FORMAPAGAMENTO_16X = 22; |
29 | private static final long FORMAPAGAMENTO_16X = 22; |
| 30 | private static final long FORMAPAGAMENTO_17X = 23; |
30 | private static final long FORMAPAGAMENTO_17X = 23; |
| 31 | private static final long FORMAPAGAMENTO_18X = 24; |
31 | private static final long FORMAPAGAMENTO_18X = 24; |
| 32 | private static final long FORMAPAGAMENTO_PIX = 18; |
32 | private static final long FORMAPAGAMENTO_PIX = 18; |
| - | 33 | private static final long FORMAPAGAMENTO_TRANSFERENCIA = 25; |
|
| 33 | 34 | ||
| 34 | private static final long FORMAPAGAMENTO_CUPOM = 16; |
35 | private static final long FORMAPAGAMENTO_CUPOM = 16; |
| 35 | 36 | ||
| 36 | private Long codigo; |
37 | private Long codigo; |
| 37 | private String descricao; |
38 | private String descricao; |
| Line 93... | Line 94... | ||
| 93 | return getCodigo().equals(FORMAPAGAMENTO_PAGSEGURO); |
94 | return getCodigo().equals(FORMAPAGAMENTO_PAGSEGURO); |
| 94 | }
|
95 | }
|
| 95 | 96 | ||
| 96 | public boolean formaPagamentoEhPix() { |
97 | public boolean formaPagamentoEhPix() { |
| 97 | return getCodigo().equals(FORMAPAGAMENTO_PIX); |
98 | return getCodigo().equals(FORMAPAGAMENTO_PIX); |
| - | 99 | }
|
|
| - | 100 | ||
| - | 101 | public boolean formaPagamentoEhTransferencia() { |
|
| - | 102 | return getCodigo().equals(FORMAPAGAMENTO_TRANSFERENCIA); |
|
| 98 | }
|
103 | }
|
| 99 | 104 | ||
| 100 | public boolean formaPagamentoEhCredito() { |
105 | public boolean formaPagamentoEhCredito() { |
| 101 | return !(formaPagamentoEhDinheiro() || formaPagamentoEhDebito() || formaPagamentoEhPagseguro() || formaPagamentoEhCupom() || formaPagamentoEhOutros() || formaPagamentoEhPix()); |
106 | return !(formaPagamentoEhDinheiro() || formaPagamentoEhDebito() || formaPagamentoEhPagseguro() || formaPagamentoEhCupom() || formaPagamentoEhOutros() || formaPagamentoEhPix()); |
| 102 | }
|
107 | }
|
| Line 269... | Line 274... | ||
| 269 | }
|
274 | }
|
| 270 | 275 | ||
| 271 | public static List<FormaPagamentoDTO> formasDePagamentoViaPix() { |
276 | public static List<FormaPagamentoDTO> formasDePagamentoViaPix() { |
| 272 | List<FormaPagamentoDTO> formasPreenchidas = new ArrayList<FormaPagamentoDTO>(); |
277 | List<FormaPagamentoDTO> formasPreenchidas = new ArrayList<FormaPagamentoDTO>(); |
| 273 | formasPreenchidas.add(new FormaPagamentoDTO(FORMAPAGAMENTO_PIX, "PIX")); |
278 | formasPreenchidas.add(new FormaPagamentoDTO(FORMAPAGAMENTO_PIX, "PIX")); |
| - | 279 | return formasPreenchidas; |
|
| - | 280 | }
|
|
| - | 281 | ||
| - | 282 | public static List<FormaPagamentoDTO> formasDePagamentoViaTransferencia() { |
|
| - | 283 | List<FormaPagamentoDTO> formasPreenchidas = new ArrayList<FormaPagamentoDTO>(); |
|
| - | 284 | formasPreenchidas.add(new FormaPagamentoDTO(FORMAPAGAMENTO_TRANSFERENCIA, "TRANSFERÊNCIA")); |
|
| 274 | return formasPreenchidas; |
285 | return formasPreenchidas; |
| 275 | }
|
286 | }
|
| 276 | 287 | ||
| 277 | public static List<FormaPagamentoDTO> formasDePagamentoSemCupom() { |
288 | public static List<FormaPagamentoDTO> formasDePagamentoSemCupom() { |
| 278 | List<FormaPagamentoDTO> formasPreenchidas = new ArrayList<FormaPagamentoDTO>(); |
289 | List<FormaPagamentoDTO> formasPreenchidas = new ArrayList<FormaPagamentoDTO>(); |
| 279 | formasPreenchidas.add(new FormaPagamentoDTO(FORMAPAGAMENTO_DINHEIRO, "DINHEIRO")); |
290 | formasPreenchidas.add(new FormaPagamentoDTO(FORMAPAGAMENTO_DINHEIRO, "DINHEIRO")); |
| 280 | formasPreenchidas.addAll(formasDePagamentoViaCartaoDebito()); |
291 | formasPreenchidas.addAll(formasDePagamentoViaCartaoDebito()); |
| 281 | formasPreenchidas.addAll(formasDePagamentoViaCartaoCredito()); |
292 | formasPreenchidas.addAll(formasDePagamentoViaCartaoCredito()); |
| 282 | formasPreenchidas.add(new FormaPagamentoDTO(FORMAPAGAMENTO_PIX, "PIX")); |
293 | formasPreenchidas.add(new FormaPagamentoDTO(FORMAPAGAMENTO_PIX, "PIX")); |
| - | 294 | formasPreenchidas.add(new FormaPagamentoDTO(FORMAPAGAMENTO_TRANSFERENCIA, "TRANSFERÊNCIA")); |
|
| 283 | formasPreenchidas.add(new FormaPagamentoDTO(FORMAPAGAMENTO_PAGSEGURO, "PAGSEGURO")); |
295 | formasPreenchidas.add(new FormaPagamentoDTO(FORMAPAGAMENTO_PAGSEGURO, "PAGSEGURO")); |
| 284 | formasPreenchidas.add(new FormaPagamentoDTO(FORMAPAGAMENTO_OUTROS, "OUTROS")); |
296 | formasPreenchidas.add(new FormaPagamentoDTO(FORMAPAGAMENTO_OUTROS, "OUTROS")); |
| 285 | return formasPreenchidas; |
297 | return formasPreenchidas; |
| 286 | }
|
298 | }
|
| 287 | 299 | ||