Facturacion/daemonService/internal/models/sincronizacionDatos/response/sincronizarEventoSignificativoModel.go
2025-05-17 11:36:26 -04:00

38 lines
1.1 KiB
Go

package response
import (
"encoding/xml"
)
type SoapEnvelopeEventoSignificativo struct {
XMLName xml.Name `xml:"Envelope"`
Body SoapBodyEventoSignificativo `xml:"Body"`
}
type SoapBodyEventoSignificativo struct {
Response SincronizarResponseEventoSignificativo `xml:"sincronizarParametricaEventosSignificativosResponse"`
}
type SincronizarResponseEventoSignificativo struct {
RespuestaLista RespuestaListaParametricasEventoSignificativo `xml:"RespuestaListaParametricas"`
}
type RespuestaListaParametricasEventoSignificativo struct {
Transaccion bool `xml:"transaccion"`
ListaCodigos []EventoSignificativo `xml:"listaCodigos"`
}
type EventoSignificativo struct {
CodigoClasificador string `xml:"codigoClasificador" json:"codigo"`
Descripcion string `xml:"descripcion" json:"descripcion"`
}
// Implementaciones para cada tipo de envelope
func (e SoapEnvelopeEventoSignificativo) IsTransactionSuccessful() bool {
return e.Body.Response.RespuestaLista.Transaccion
}
func (e SoapEnvelopeEventoSignificativo) GetData() []EventoSignificativo {
return e.Body.Response.RespuestaLista.ListaCodigos
}