![JAR search and dependency download from the Maven repository](/logo.png)
com.fincatto.documentofiscal.mdfe3.classes.nota.MDFInfoAutorizacaoDownload Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nfe Show documentation
Show all versions of nfe Show documentation
Biblioteca de comunicacao de nota fiscal eletronica brasileira
package com.fincatto.documentofiscal.mdfe3.classes.nota;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.Namespace;
import org.simpleframework.xml.Root;
import com.fincatto.documentofiscal.DFBase;
import com.fincatto.documentofiscal.validadores.DFStringValidador;
/**
* Created by Eldevan Nery Junior on 03/11/17.
* Autorizados para download do XML do DF-e
*/
@Root(name = "autXML")
@Namespace(reference = "http://www.portalfiscal.inf.br/mdfe")
public class MDFInfoAutorizacaoDownload extends DFBase {
private static final long serialVersionUID = -5711457880712720488L;
private static final String INFO = "Autorizacao Download MDFe";
@Element(name = "CNPJ", required = false)
private String cnpj;
@Element(name = "CPF", required = false)
private String cpf;
public MDFInfoAutorizacaoDownload() {
this.cnpj = null;
this.cpf = null;
}
public String getCnpj() {
return this.cnpj;
}
/**
* CNPJ do autorizado
* Informar zeros não significativos
*/
public void setCnpj(final String cnpj) {
if (this.cpf != null) {
throw new IllegalStateException("Nao deve setar CNPJ se CPF esteja setado em " + MDFInfoAutorizacaoDownload.INFO);
}
this.cnpj = DFStringValidador.cnpj(cnpj, MDFInfoAutorizacaoDownload.INFO);
}
public String getCpf() {
return this.cpf;
}
/**
* CPF do autorizado
* Informar zeros não significativos
*/
public void setCpf(final String cpf) {
if (this.cnpj != null) {
throw new IllegalStateException("Nao deve setar CPF se CNPJ esteja setado em " + MDFInfoAutorizacaoDownload.INFO);
}
this.cpf = DFStringValidador.cpf(cpf, MDFInfoAutorizacaoDownload.INFO);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy