Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 170 | espaco | 1 | package br.com.ec.domain.model.tipos.nfe; |
| 2 | |||
| 3 | public enum TipoNotaFiscalStatusRetorno { |
||
| 4 | |||
| 5 | STATUS_AUTORIZADO_USO_100(new Long(100), "100: AUTORIZADO O USO DA NF-E"), |
||
| 6 | STATUS_DUPLICIDADE_NFE_204(new Long(204), "204: DUPLICIDADE DE NF-E"); |
||
| 7 | |||
| 8 | private Long tipo; |
||
| 9 | private String descricao; |
||
| 10 | |||
| 11 | private TipoNotaFiscalStatusRetorno(Long tipo, String descricao) { |
||
| 12 | this.tipo = tipo; |
||
| 13 | this.descricao = descricao; |
||
| 14 | } |
||
| 15 | |||
| 16 | public String getDescricao() { |
||
| 17 | return descricao; |
||
| 18 | } |
||
| 19 | |||
| 20 | public Long getValor() { |
||
| 21 | return tipo; |
||
| 22 | } |
||
| 23 | |||
| 24 | public static TipoNotaFiscalStatusRetorno parse(Long tipo) { |
||
| 25 | for (TipoNotaFiscalStatusRetorno item : TipoNotaFiscalStatusRetorno.values()) { |
||
| 26 | if (item.getValor().equals(tipo)) { |
||
| 27 | return item; |
||
| 28 | } |
||
| 29 | } |
||
| 30 | return null; |
||
| 31 | } |
||
| 32 | |||
| 33 | } |