using EvaPosSrvDTO;
using EvaPosSrvResp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EvaPOS_API_FRAME.RespuestasXML
{
    public class POSReceiptEventItem : Respuesta
    {
        private string _xml;
        public int RequestID { get; set; }
        public POSReceiptEventItem(int sessionId, TipoMensaje tipo, int requestID) : base(sessionId, tipo)
        {
            RequestID = requestID;
        }

        public override string TextoXML
        {
            get => _xml = $"""
                        <?xml version="1.0" encoding="UTF-8"?>
                        <schema:POSReceiptEvent xmlns:schema="http://bc.si.retail.ibm.com/POSBCSchema"
                                                UpdateType="Add">
                          <RequestID>102</RequestID>
                          <Type>Customer</Type>
                          <Index>0</Index>
                          <Section>Body</Section>
                          <Group>102</Group>
                          <FormattedReceiptLineList>
                            <FormattedReceiptLine>
                              <Feeds>1</Feeds>
                              <Align>center</Align>
                              <LineCategory>LineItem</LineCategory>
                              <LineType>ItemSale</LineType>
                              <TextReceiptLine>
                                <Text>        Cheerios                  35500</Text>
                              </TextReceiptLine>
                            </FormattedReceiptLine>
                          </FormattedReceiptLineList>
                        </schema:POSReceiptEvent>
                        """;
        }
    }
}
