"gatewayGK/Infraestructura/Util.cs" did not exist on "17d006dca5bed79897ca95635c0feca5db2d8968"
Commit 56f10e15 authored by bsarmiento31's avatar bsarmiento31
Browse files

Initial commit

parents
using EvaPOS_API_FRAME.DTO;
using EvaPOS_API_FRAME.RespuestasXML.TerminateLane;
using EvaPosSrvDTO;
using EvaPosSrvResp;
using Serilog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using EvaPOS_API_FRAME.RespuestasXML.Printer;
namespace EvaPOS_API_FRAME.Comandos
{
/// <summary>
/// Comando para cerrar la lane
/// </summary>
public class TerminateRequestCmd : IComando
{
public string Referencia { get; set; } = "scsns:Terminate";
/// <summary>
/// DTO con solicitud.
/// </summary>
public TerminateRequestDTO Destroy { get; private set; }
/// <summary>
/// Procesa y responde el evento Terminar.
/// </summary>
public Respuestas Ejecutar()
{
Log.Debug("Cmd TerminateRequestDTO ejecutado. TerminateRequest : {TerminateRequest}", Destroy.DestroySession);
var requestId = Destroy.DestroySession;
TerminateResponse terminateResponse = new TerminateResponse(1, TipoMensaje.Resp, requestId);
return (new Respuestas { terminateResponse });
}
public IComando CreaCopia()
{
return (TerminateRequestCmd)this.MemberwiseClone();
}
public void CargaDTO(DTOBase terminateRequest)
{
Destroy = (TerminateRequestDTO)terminateRequest;
}
}
}
using EvaPOS_API_FRAME.DTO;
using EvaPOS_API_FRAME.RespuestasXML.CancelTransaction;
using EvaPosSrvDTO;
using EvaPosSrvResp;
using Serilog;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EvaPOS_API_FRAME.Comandos
{
///<summary>
/// Comando para cancelar una transacción
/// </summary>
public class VoidTransactionCmd : IComando
{
public string Referencia { get; set; } = "scsns:VoidTransaction";
/// <summary>
/// DTO con solicitud.
/// </summary>
public VoidTransactionDTO Request { get; private set; }
/// <summary>
/// Procesa y responde VoidTransactionRequest.
/// </summary>
public Respuestas Ejecutar()
{
Log.Debug("Cmd VoidTransactionDTO ejecutado. VoidTransactionRequest : {VoidTransactionRequest}", Request.RequestID);
int RequestId = Request.RequestID;
VoidTransactionResponse voidTransactionResponse = new VoidTransactionResponse(1, TipoMensaje.Resp, RequestId);
return (new Respuestas { voidTransactionResponse });
}
public IComando CreaCopia()
{
return (VoidTransactionCmd)this.MemberwiseClone();
}
public void CargaDTO(DTOBase voidTransactionDTO)
{
Request = (VoidTransactionDTO)voidTransactionDTO;
}
}
}
using EvaPosSrvDTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace EvaPOS_API_FRAME.DTO
{
///<summary>
/// DTO que obtiene los valores del XML "Restricción de edad en los productos"
/// </summary>
[XmlRoot(ElementName = "AddCustomerBirthdateRequest")]
public class AddCustomerBirthdateRequest : DTOBase
{
public AddCustomerBirthdateRequest(int idSesion, TipoMensaje tipo) : base(idSesion, tipo)
{
}
public AddCustomerBirthdateRequest() { }
[XmlElement(ElementName = "ParameterExtension")]
public object ParameterExtension { get; set; }
[XmlElement(ElementName = "RequestID")]
public int RequestID { get; set; }
[XmlElement(ElementName = "CustomerBirthdate")]
public string CustomerBirthdate { get; set; }
}
}
using EvaPosSrvDTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace EvaPOS_API_FRAME.DTO
{
///<summary>
/// DTO que obtiene los valores del XML "Agregar Cliente"
/// </summary>
[XmlRoot(ElementName = "ExpirationDate")]
public class ExpirationDate
{
[XmlElement(ElementName = "Date")]
public object Date { get; set; }
}
[XmlRoot(ElementName = "CustomerIdentifier")]
public class CustomerIdentifier
{
[XmlElement(ElementName = "CustomerID")]
public string CustomerID { get; set; }
[XmlElement(ElementName = "Type")]
public string Type { get; set; }
[XmlElement(ElementName = "ExpirationDate")]
public ExpirationDate ExpirationDate { get; set; }
}
[XmlRoot(ElementName = "AddCustomerRequest")]
public class AddCustomerRequest : DTOBase
{
public AddCustomerRequest(int idSesion, TipoMensaje tipo) : base(idSesion, tipo)
{
}
public AddCustomerRequest() { }
[XmlElement(ElementName = "ParameterExtension")]
public object ParameterExtension { get; set; }
[XmlElement(ElementName = "RequestID")]
public int RequestID { get; set; }
[XmlElement(ElementName = "CustomerIdentifier")]
public CustomerIdentifier CustomerIdentifier { get; set; }
}
}
using EvaPosSrvDTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace EvaPOS_API_FRAME.DTO
{
///<summary>
/// DTO que obtiene los valores del XML "Agregar Artículo"
/// </summary>
[XmlRoot(ElementName = "BarCode")]
public class BarCode
{
[XmlElement(ElementName = "ScanDataLabel")]
public long ScanDataLabel { get; set; } = 0;
[XmlElement(ElementName = "ScanDataType")]
public string ScanDataType { get; set; } = null;
}
[XmlRoot(ElementName = "ItemIdentifier")]
public class ItemIdentifier
{
[XmlElement(ElementName = "KeyedItemID")]
public long KeyedItemID { get; set; } = 0;
[XmlElement(ElementName = "ItemIDIncludesCheckDigit")]
public bool ItemIDIncludesCheckDigit { get; set; } = false;
[XmlElement(ElementName = "BarCode")]
public BarCode BarCode { get; set; }
[XmlElement(ElementName = "Quantity")]
public int Quantity { get; set; }
[XmlElement(ElementName = "VoidFlag")]
public bool VoidFlag { get; set; } = false;
[XmlElement(ElementName = "ScaleWeight")]
public double ScaleWeight { get; set; } = 0;
}
[XmlRoot(ElementName = "AddItemRequest")]
public class AddItemRequest : DTOBase
{
public AddItemRequest(int idSesion, TipoMensaje tipo) : base(idSesion, tipo)
{
}
public AddItemRequest()
{
}
[XmlElement(ElementName = "ParameterExtension")]
public object ParameterExtension { get; set; }
[XmlElement(ElementName = "RequestID")]
public int RequestID { get; set; }
[XmlElement(ElementName = "ItemIdentifier")]
public ItemIdentifier ItemIdentifier { get; set; }
}
}
using EvaPosSrvDTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace EvaPOS_API_FRAME.DTO
{
///<summary>
/// DTO que obtiene los valores del XML "Agregar a la bolsa"
/// </summary>
[XmlRoot(ElementName = "OriginalRequest")]
public class OriginalRequest
{
[XmlElement(ElementName = "Group")]
public int Group { get; set; }
[XmlElement(ElementName = "Location")]
public string Location { get; set; }
}
[XmlRoot(ElementName = "TextReceiptLine")]
public class TextReceiptLine
{
[XmlElement(ElementName = "Bold")]
public int Bold { get; set; }
[XmlElement(ElementName = "Text")]
public string Text { get; set; }
}
[XmlRoot(ElementName = "FormattedReceiptLine")]
public class FormattedReceiptLine
{
[XmlElement(ElementName = "Feeds")]
public int Feeds { get; set; }
[XmlElement(ElementName = "Align")]
public string Align { get; set; }
[XmlElement(ElementName = "LineCategory")]
public string LineCategory { get; set; }
[XmlElement(ElementName = "LineType")]
public string LineType { get; set; }
[XmlElement(ElementName = "TextReceiptLine")]
public TextReceiptLine TextReceiptLine { get; set; }
}
[XmlRoot(ElementName = "AddReceiptLinesRequest")]
public class AddReceiptLinesRequest : DTOBase
{
public AddReceiptLinesRequest(int idSesion, TipoMensaje tipo) : base(idSesion, tipo)
{
}
public AddReceiptLinesRequest()
{
}
[XmlElement(ElementName = "ParameterExtension")]
public object ParameterExtension { get; set; }
[XmlElement(ElementName = "RequestID")]
public int RequestID { get; set; }
[XmlElement(ElementName = "Type")]
public string Type { get; set; }
[XmlElement(ElementName = "Index")]
public int Index { get; set; }
[XmlElement(ElementName = "Section")]
public string Section { get; set; }
[XmlElement(ElementName = "OriginalRequest")]
public OriginalRequest OriginalRequest { get; set; }
[XmlElement(ElementName = "FormattedReceiptLine")]
public FormattedReceiptLine FormattedReceiptLine { get; set; }
}
}
using EvaPosSrvDTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace EvaPOS_API_FRAME.DTO
{
///<summary>
/// DTO que obtiene los valores del XML "Pagar con tarjeta débito o crédito"
/// </summary>
[XmlRoot(ElementName = "DebitIdentifier")]
public class DebitIdentifier
{
[XmlElement(ElementName = "Amount")]
public double Amount { get; set; }
[XmlElement(ElementName = "IsVoid")]
public bool IsVoid { get; set; }
[XmlElement(ElementName = "CashBackAmount")]
public int CashBackAmount { get; set; }
}
[XmlRoot(ElementName = "CreditIdentifier")]
public class CreditIdentifier
{
[XmlElement(ElementName = "Amount")]
public double Amount { get; set; }
[XmlElement(ElementName = "Description")]
public string Description { get; set; }
[XmlElement(ElementName = "IsVoid")]
public bool IsVoid { get; set; }
}
[XmlRoot(ElementName = "AddTenderRequest")]
public class AddTenderRequest : DTOBase
{
public AddTenderRequest(int idSesion, TipoMensaje tipo) : base(idSesion, tipo)
{
}
public AddTenderRequest()
{
}
[XmlElement(ElementName = "ParameterExtension")]
public object ParameterExtension { get; set; }
[XmlElement(ElementName = "OperatorID")]
public object OperatorID { get; set; }
[XmlElement(ElementName = "EnableCallback")]
public bool EnableCallback { get; set; }
[XmlElement(ElementName = "RequestID")]
public int RequestID { get; set; }
[XmlElement(ElementName = "DebitIdentifier")]
public DebitIdentifier DebitIdentifier { get; set; }
[XmlElement(ElementName = "CreditIdentifier")]
public CreditIdentifier CreditIdentifier { get; set; }
}
}
using EvaPosSrvDTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace EvaPOS_API_FRAME.DTO
{
///<summary>
/// DTO que obtiene los valores del XML "Cancelar Acción"
/// </summary>
public class CancelActionDTO
{
[XmlRoot(ElementName = "CancelActionRequest")]
public class CancelActionRequest : DTOBase
{
public CancelActionRequest(int idSesion, TipoMensaje tipo) : base(idSesion, tipo)
{
}
public CancelActionRequest() { }
[XmlElement(ElementName = "RequestID")]
public int RequestID { get; set; }
}
}
}
using EvaPosSrvDTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace EvaPOS_API_FRAME.DTO
{
///<summary>
/// DTO que obtiene los valores del XML "Obtener totales"
/// </summary>
[XmlRoot(ElementName = "GetTotalsRequest")]
public class GetTotalsRequest : DTOBase
{
public GetTotalsRequest(int idSesion, TipoMensaje tipo) : base(idSesion, tipo)
{
}
public GetTotalsRequest()
{
}
[XmlElement(ElementName = "ParameterExtension")]
public object ParameterExtension { get; set; }
[XmlElement(ElementName = "EnableCallback")]
public bool EnableCallback { get; set; }
[XmlElement(ElementName = "RequestID")]
public int RequestID { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EvaPOS_API_FRAME.DTO.Intercambio
{
///<summary>
/// Definición de la clase "Agregar artículo"
/// </summary>
public class Articulo
{
public string Descripcion { get; set; }
public string CodigoBarra { get; set; }
public decimal ValorVenta { get; set; }
public decimal Impuesto { get; set; }
public int Cantidad { get; set; }
public bool EsPesable { get; set; }
public bool articuloEncontrado { get; set; }
public bool? RestricionEdad { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EvaPOS_API_FRAME.DTO.Intercambio
{
/// <summary>
/// Objeto que contiene la información del cliente
/// </summary>
public class ClienteSCO
{
public string Id { get; set; }
public string CustomerId { get; set; }
public string Nombre { get; set; }
public long YTDPoints { get; set; }
public bool Resultado { get; set; }
public bool InstanciaRespuestaVenta { get; set; } = false;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EvaPOS_API_FRAME.DTO.Intercambio
{
///<summary>
/// Definición de la clase "Impuestos"
/// </summary>
public class Impuestos
{
public int TipoImpuestoC { get; set; }
public int TipoImpuestoD { get; set; }
public double CompraImpuestoC { get; set; }
public double CompraImpuestoD { get; set; }
public double BaseImpC { get; set; }
public double BaseImpD { get; set; }
public double IMPC { get; set; }
public double IMPD { get; set; }
public double TotalCompra { get; set; }
public double TotalBaseImp { get; set; }
public double TotalImp { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EvaPOS_API_FRAME.DTO.Intercambio
{
///<summary>
/// Definición de la clase "Respuesta del datafono"
/// </summary>
public class RespuestaDatafonoSCO
{
public string CodigoRespuesta { get; set; }
public string ResultadoTransaccion { get; set; }
public long BIN { get; set; }
public string CodigoAutorizacion { get; set; }
public string CodigoEstablecimiento { get; set; }
public string DireccionEstablecimiento { get; set; }
public string FechaTransaccion { get; set; }
public string FechaVencimientoTarjeta { get; set; }
public string Franquicia { get; set; }
public long HoraTransaccion { get; set; }
public long LRC { get; set; }
public int NumeroCuotas { get; set; }
public int NumeroRecibo { get; set; }
public long RRN { get; set; }
public string TipoRespuesta { get; set; }
public int UltimosDigitosTarjeta { get; set; }
public int ValorIva { get; set; }
public int ValorTotalCompra { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EvaPOS_API_FRAME.DTO.Intercambio
{
///<summary>
/// Definición de la clase "Respuesta Impresora"
/// </summary>
public class RespuestaImpresora
{
public bool Valida { get; set; }
public string Mensaje { get; set;}
public string MensajeOperador { get; set; }
}
}
//using Redsis.EVA.Client.Core.Entidades;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EvaPOS_API_FRAME.DTO.Intercambio
{
///<summary>
/// Definición de la clase "Venta"
/// </summary>
public class Venta
{
public decimal TotalVenta { get; set; } = 0;
public decimal TotalImpuesto { get; set; } = 0;
public decimal PorPagar { get; set; } = 0;
public int TotalArticulos { get; set; } = 0;
public string Descripcion { get; set; }
public float Porcentaje { get; set; }
public decimal Valor { get; set; }
public decimal Base { get; set; }
public decimal Impuesto { get; set; }
public decimal SumaCompra { get; set; }
public decimal SumaBase { get; set; }
public decimal SumaImpuesto { get; set; }
//public List<string> Descripciones { get; set; }
//public List<string> Identificadores { get; set; }
//public List<List<decimal>> Montos { get; set; }
//public List<EImpuesto> ImpuestosObtenidos { get; private set; } = new List<EImpuesto>();
public decimal Compra { get; set; }
public float ValorImpuesto { get; set; }
public string TipoImpuesto { get; set; }
public decimal BaseImp { get; set; }
}
}
using EvaPosSrvDTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace EvaPOS_API_FRAME.DTO
{
///<summary>
/// DTO que obtiene los valores del XML "Reimprimir ultima venta"
/// </summary>
[XmlRoot(ElementName = "PrintCurrentReceiptsRequest")]
public class PrintCurrentReceiptsRequest : DTOBase
{
public PrintCurrentReceiptsRequest(int idSesion, TipoMensaje tipo) : base(idSesion, tipo)
{
}
public PrintCurrentReceiptsRequest() { }
[XmlElement(ElementName = "ParameterExtension")]
public object ParameterExtension { get; set; }
[XmlElement(ElementName = "EnableCallback")]
public bool EnableCallback { get; set; }
[XmlElement(ElementName = "RequestID")]
public int RequestID { get; set; }
[XmlElement(ElementName = "PaperCut")]
public bool PaperCut { get; set; }
[XmlElement(ElementName = "Type")]
public string Type { get; set; }
}
}
using EvaPosSrvDTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EvaPOS_API_FRAME.DTO
{
///<summary>
/// DTO que obtiene los valores del XML "Query Status"
/// </summary>
public class QueryStatusRequestDTO : DTOBase
{
/// <summary>
/// Campo QueryStatusRequest
/// </summary>
//Cambio: lo pase a string
public string QueryStatusRequest { get; set; }
public QueryStatusRequestDTO(int sessionId, TipoMensaje messageType) : base(sessionId, messageType) { }
}
}
using EvaPosSrvDTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace EvaPOS_API_FRAME.DTO
{
///<summary>
/// DTO que obtiene los valores del XML "Saltar Empaque"
/// </summary>
public class RemoveReceiptLinesDTO
{
[XmlRoot(ElementName = "OriginalRequest")]
public class OriginalRequest
{
[XmlElement(ElementName = "Group")]
public int Group { get; set; }
[XmlElement(ElementName = "Location")]
public string Location { get; set; }
}
[XmlRoot(ElementName = "RemoveReceiptLinesRequest")]
public class RemoveReceiptLinesRequest : DTOBase
{
public RemoveReceiptLinesRequest(int idSesion, TipoMensaje tipo) : base(idSesion, tipo)
{
}
public RemoveReceiptLinesRequest()
{
}
[XmlElement(ElementName = "ParameterExtension")]
public object ParameterExtension { get; set; }
[XmlElement(ElementName = "RequestID")]
public int RequestID { get; set; }
[XmlElement(ElementName = "Type")]
public string Type { get; set; }
[XmlElement(ElementName = "Index")]
public int Index { get; set; }
[XmlElement(ElementName = "Section")]
public string Section { get; set; }
[XmlElement(ElementName = "OriginalRequest")]
public OriginalRequest OriginalRequest { get; set; }
}
}
}
using EvaPosSrvDTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EvaPOS_API_FRAME.DTO
{
public class ReportStatusEventsRequestDTO : DTOBase
{
/// <summary>
/// Campo RequestID
/// </summary>
public int RequestID { get; set; }
public ReportStatusEventsRequestDTO(int sessionId, TipoMensaje messageType) : base(sessionId, messageType) { }
}
}
using EvaPosSrvDTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace EvaPOS_API_FRAME.DTO
{
///<summary>
/// DTO que obtiene los valores del XML "Reimprimir"
/// </summary>
[XmlRoot(ElementName = "ReprintReceiptsRequest")]
public class ReprintReceiptsRequestDTO: DTOBase
{
public ReprintReceiptsRequestDTO(int idSesion, TipoMensaje tipo) : base(idSesion, tipo)
{
}
public ReprintReceiptsRequestDTO()
{
}
[XmlElement(ElementName = "ParameterExtension")]
public object ParameterExtension { get; set; }
[XmlElement(ElementName = "EnableCallback")]
public bool EnableCallback { get; set; }
[XmlElement(ElementName = "RequestID")]
public int RequestID { get; set; }
[XmlElement(ElementName = "ReverseTransactionIndex")]
public int ReverseTransactionIndex { get; set; }
[XmlElement(ElementName = "Type")]
public string Type { get; set; }
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment