All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mx.emite.sdk.proxy.request.XmlRequest Maven / Gradle / Ivy

package mx.emite.sdk.proxy.request;

import javax.validation.constraints.NotNull;

import lombok.Getter;
import lombok.ToString;
import mx.emite.sdk.cfdi32.anotaciones.Uuid;
import mx.emite.sdk.errores.ApiException;
import mx.emite.sdk.utils.Utilerias;

@ToString
@Getter
public class XmlRequest {

	
	/**
	 * Usuario del Emisor 
	 * -- SETTER --
	 * @param usuario Usuario del Emisor obtenido de Scot©
	 * 
	 */
	@NotNull private String usuario;
	@NotNull private String contrasena;
	
	@NotNull @Uuid
	private String uuid;
	
	
	public static XmlRequestBuilder builder() {
		return new XmlRequestBuilder();
	}

	public static class XmlRequestBuilder {
		private String usuario;
		private String contrasena;
		private String uuid;
		

		
		
		public XmlRequestBuilder usuario(String usuario) {
			this.usuario = usuario;
			return this;
		}

		public XmlRequestBuilder contrasena(String contrasena) {
			this.contrasena = contrasena;
			return this;
		}

		public XmlRequestBuilder uuid(String uuid) {
			this.uuid=uuid;
			return this;
		}

		

		public XmlRequest build() throws ApiException {
			return new XmlRequest(this);
		}

		
	}

	private XmlRequest(XmlRequestBuilder builder) throws ApiException {
		this.usuario = builder.usuario;
		this.contrasena = builder.contrasena;
		this.uuid = builder.uuid;
		Utilerias.valida(this);
	}
	

	 
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy