Subversion Repositories Integrator Subversion

Rev

Blame | Last modification | View Log | Download | RSS feed

package br.com.ec.domain.model.tipos.nfe;

public enum TipoNotaFiscalStatusRetorno {
       
        STATUS_AUTORIZADO_USO_100(new Long(100), "100: AUTORIZADO O USO DA NF-E"),
        STATUS_DUPLICIDADE_NFE_204(new Long(204), "204: DUPLICIDADE DE NF-E");
       
        private Long tipo;
        private String descricao;

        private TipoNotaFiscalStatusRetorno(Long tipo, String descricao) {
                this.tipo = tipo;
                this.descricao = descricao;
        }
       
        public String getDescricao() {
                return descricao;
        }
       
        public Long getValor() {
                return tipo;
        }
       
        public static TipoNotaFiscalStatusRetorno parse(Long tipo) {
                for (TipoNotaFiscalStatusRetorno item : TipoNotaFiscalStatusRetorno.values()) {
                        if (item.getValor().equals(tipo)) {
                                return item;
                        }
                }
                return null;
        }

}