br.com.swconsultoria.nfe.dom.enuns.AmbienteEnum Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-nfe Show documentation
Show all versions of java-nfe Show documentation
Api java para consumo do webService de nota fiscal eletronica
package br.com.swconsultoria.nfe.dom.enuns;
/**
* @author Samuel Oliveira - [email protected]
* Data: 02/03/2019 - 20:06
*/
public enum AmbienteEnum {
HOMOLOGACAO("2"),
PRODUCAO("1");
private final String codigo;
AmbienteEnum(String codigo) {
this.codigo = codigo;
}
public String getCodigo() {
return codigo;
}
public static AmbienteEnum getByCodigo(String codigo) {
for (AmbienteEnum e : values()) {
if (e.codigo.equals(codigo)) return e;
}
throw new IllegalArgumentException();
}
}