meta data de esta página
  •  

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anterior Revisión previa
Próxima revisión
Revisión previa
ejemploenviarfactura [2022/03/29 19:58]
scastillo
ejemploenviarfactura [2024/03/30 08:56] (actual)
47.128.21.134 se ha restaurado la vieja versión (2022/03/29 19:44)
Línea 4: Línea 4:
  
 <code csharp Enviar> <code csharp Enviar>
-        try +var url "https://testemision.thefactoryhka.com.do/api/Autenticacion";
-            { +
-                Cuerpo cuerpo new Cuerpo() +
-                { +
-                    token = textBox161.Text, +
-                    documentoElectronico = new DocumentoElectronico()+
  
-                }; 
  
-                cuerpo.documentoElectronico.encabezado = new Encabezado(+            Autent autenticacion = new Autent()
-                { +
-                    identificacionDocumento = new IdentificacionDocumento() +
-                    { +
-                        tipoDocumento = textBox4.Text, +
-                        ncf = textBox5.Text, +
-                        fechaVencimientoSecuencia = textBox6.Text, +
-                        indicadorEnvioDiferido = textBox7.Text, +
-                        indicadorMontoGravado = textBox8.Text, +
-                        tipoIngresos = textBox10.Text, +
-                        tipoPago = textBox11.Text, +
-                        tablaFormasPago = new List<TablaFormasPago>() +
-                         +
- +
-                    }, +
-                    emisor = new Emisor() +
-                    { +
-                        rnc = textBox19.Text, +
-                        razonSocial = textBox20.Text, +
-                        nombreComercial = textBox21.Text, +
-                        sucursal = textBox22.Text, +
-                        direccion = textBox23.Text, +
-                        municipio = textBox24.Text, +
-                        provincia = textBox25.Text, +
-                        tablaTelefono = new List<string>(), +
-                        correo = textBox26.Text, +
-                        webSite = textBox27.Text, +
-                        codigoVendedor = textBox29.Text, +
-                        numeroFacturaInterna = textBox30.Text, +
-                        numeroPedidoInterno = textBox31.Text, +
-                        zonaVenta = textBox32.Text, +
-                        //fechaEmision = textBox35.Text; +
-                        fechaEmision = dateTimePicker1.Value.ToShortDateString().Replace("/","-"+
-                    }, +
-                     +
- +
-                    comprador = new Comprador() +
-                    { +
-                        rnc = textBox39.Text, +
-                        razonSocial = textBox41.Text, +
-                        contacto = textBox42.Text, +
-                        correo = textBox43.Text, +
-                        direccion = textBox44.Text, +
-                        municipio = textBox45.Text, +
-                        provincia = textBox46.Text, +
-                        pais = textBox47.Text, +
-                        fechaEntrega = textBox48.Text, +
-                        fechaOrden = textBox52.Text, +
-                        numeroOrden = textBox53.Text, +
-                        codigoInterno = textBox54.Text, +
- +
-                    }, +
-                    informacionesAdicionales = new InformacionesAdicionales() +
-                    { +
-                        numeroContenedor = textBox59.Text, +
-                        numeroReferencia = textBox60.Text, +
-                    }, +
- +
-                    totales = new Totales() +
-                    { +
-                        montoGravadoTotal = textBox94.Text, +
-                        montoGravadoI1 = textBox95.Text, +
-                        itbiS1 = textBox99.Text, +
-                        totalITBIS = textBox102.Text, +
-                        totalITBIS1 = textBox103.Text, +
-                        montoTotal = textBox107.Text, +
-                    }, +
- +
-                }; +
-                TablaFormasPago item = new TablaFormasPago() +
-                { +
-                    forma = "1", +
-                    monto = textBox107.Text +
-                }; +
- +
-               +
-                cuerpo.documentoElectronico.encabezado.identificacionDocumento.tablaFormasPago.Add(item); +
- +
- +
-                cuerpo.documentoElectronico.encabezado.emisor.tablaTelefono.Add("809-472-7676"); +
-                cuerpo.documentoElectronico.encabezado.emisor.tablaTelefono.Add("809-491-1918"); +
- +
-                DetallesItem detalles = new DetallesItem() +
-                { +
-                    numeroLinea = "1", +
-                    indicadorFacturacion = "1", +
-                    nombre = "ASW DTU", +
-                    indicadorBienoServicio = "1", +
-                    cantidad = "15", +
-                    unidadMedida = "31", +
-                    precioUnitario = "400.00", +
-                    monto = "6000.00", +
-                    descripcion="Una descripcion normal" +
-                     +
-                }; +
-                 +
-               DataGridViewButtonColumn edit=new DataGridViewButtonColumn(); +
-                edit.Visible = true; +
-                edit.Name = "Editar"; +
-                edit.Text = "Editar"; +
-                edit.UseColumnTextForButtonValue = true; +
- +
-                dataGridView1.Columns.Add(edit); +
- +
-                detallesItemBindingSource.DataSource = detalles; +
-                cuerpo.documentoElectronico.detallesItems = new List<DetallesItem>(); +
-                cuerpo.documentoElectronico.detallesItems.Add(detalles); +
-                HttpClient cliente = new HttpClient(); +
-                cliente.BaseAddress = new Uri("https://testemision.thefactoryhka.com.do"); +
-                cliente.DefaultRequestHeaders.Add("Authorization", "Bearer " + textBox161.Text); +
-                string jsonObject = JsonSerializer.Serialize(cuerpo); +
-                var content = new StringContent(jsonObject.ToString(), Encoding.UTF8, "application/json"); +
-                var resp = cliente.PostAsync("api/Enviar", content).Result;                +
-                var resultado = resp.Content.ReadAsStringAsync();                   +
-                string dame = resultado.Result; +
-                var Respuesta = JsonSerializer.Deserialize<Recibido>(dame); +
-                if (Respuesta.procesado == true) +
-                { +
-                    richTextBox1.Text = Respuesta.codigo.ToString() + "\r\n" + Respuesta.mensaje + "\r\n" + Respuesta.procesado.ToString() + "\r\n" + Encoding.UTF8.GetString(Convert.FromBase64String(Respuesta.xmlBase64)); +
-                } +
-                else +
-                { +
-                    richTextBox1.Text = Respuesta.codigo.ToString() + "\r\n" + Respuesta.mensaje + "\r\n" + Respuesta.procesado.ToString(); +
- +
-                } +
-     +
- +
-               +
- +
-            } +
-             +
-            catch (Exception b)+
             {             {
-                MessageBox.Show(b.ToString()); +                rnc = "130960054", 
-                 +                clave = "130960054", 
-            } +                usuario = "130960054_int"
- +
- +
-</code> +
- +
-Donde se encuentran las siguientes clases: +
- +
-<code csharp Clases > +
-using System; +
-using System.Collections.Generic; +
-using System.Linq; +
-using System.Text; +
-using System.Threading.Tasks; +
- +
-namespace TU_NAMESPACE +
-+
-    class Cuerpo +
-    { +
- +
-        public string token { get; set; } +
-        public DocumentoElectronico documentoElectronico { get; set; } +
-    } +
- +
-    public class credencial +
-    { +
-        public string token { get; set; } +
-        public string expira { get; set; } +
-        public string expedido { get; set; } +
- +
-    } +
- +
-    public class RespRecep +
-    { +
- +
-        public string trackId { get; set; } +
-        public string error { get; set; } +
- +
-        public string mensaje { get; set; } +
- +
- +
-+
- +
- +
-    public class Mensajes +
-    { +
-        public string valor { get; set; } +
-        public int codigo { get; set; } +
-    } +
- +
-    public class RespConsulta +
-    { +
-        public string trackId { get; set; } +
-        public string codigo { get; set; } +
-        public string estado { get; set; } +
-        public string rnc { get; set; } +
-        public string fechaRecepcion { get; set; } +
-        public List<Mensajes> mensajes { get; set; } +
-    } +
- +
- +
- +
- +
- +
-    class Recibido +
-    { +
-        public int codigo { get; set; } +
-        public string mensaje { get; set; } +
- +
-        public string xmlBase64 { get; set; } +
-        public bool procesado { get; set; } +
- +
- +
- +
-    } +
- +
-    class Aut +
-    { +
- +
-        public string usuario { get; set; } +
-        public string clave { get; set; } +
-        public string rnc { get; set; } +
-    } +
- +
-    class Anulacion +
-    { +
-        public string token { get; set; } +
-        public string Rnc { get; set; } +
-        public List<string> secuencias { get; set; } +
- +
-    } +
- +
- +
- +
-    class Enviocorreo +
-    { +
-        public string token { get; set; } +
-        public string documento { get; set; } +
- +
-        public string Rnc { get; set; } +
-        public List<string> correos { get; set; } +
- +
-    } +
- +
- +
-    class Estatus +
-    { +
-        public string token { get; set; } +
-        public string documento { get; set; } +
-        public string Rnc { get; set; } +
- +
-    } +
- +
- +
-    public class VerifLic +
-    { +
-        public string token { get; set; } +
-        public string rnc { get; set; } +
-        public string nombre { get; set; } +
-        public string marca { get; set; } +
-        public string modelo { get; set; } +
-        public string idDispositivo { get; set; } +
-        public string serial { get; set; } +
-        public string tipo { get; set; } +
-    } +
- +
-    public class EstatusLic +
-    { +
-        public string token { get; set; } +
-        public string rnc { get; set; } +
-        public string serial { get; set; } +
-    } +
- +
-    public class CargaCert +
-    { +
-        public string token { get; set; } +
-        public string rnc { get; set; } +
-        public string cerificadoBase64 { get; set; } +
-        public string claveBase64 { get; set; } +
-    } +
- +
-    public class DescargaArch +
-    { +
-        public string token { get; set; } +
-        public string rnc { get; set; } +
-        public string documento { get; set; } +
-        public string extension { get; set; } +
-    } +
- +
- +
- +
- +
-    class RespondAut +
-    { +
-        public int codigo { get; set; } +
-        public string mensaje { get; set; } +
-        public string token { get; set; } +
-        public string fechaExpiracion { get; set; } +
-    } +
- +
-    class RespondAnu +
-    { +
-        public int codigo { get; set; } +
-        public string mensaje { get; set; } +
-        public bool procesado { get; set; } +
-    } +
- +
-    class RecibToken +
-    { +
-        public string token { get; set; } +
- +
-        public string expira { get; set; } +
-        public bool expedido { get; set; } +
- +
- +
- +
-    } +
- +
-     +
-    class RespondLic +
-    { +
-        public int codigo { get; set; } +
-        public string mensaje { get; set; } +
-        public string tipo { get; set; } +
- +
-    } +
- +
-    public class RespondEstatusLic +
-    { +
-        public int codigo { get; set; } +
-        public string mensaje { get; set; } +
-        public string servicio { get; set; } +
-        public string codigoLicencia { get; set; } +
-        public string fechaLicencia { get; set; } +
-        public int cadencia { get; set; } +
-        public int tiempo { get; set; } +
-        public string etapa { get; set; } +
-        public string cicloLicencia { get; set; } +
-        public int utilizadosCiclo { get; set; } +
-        public int total { get; set; } +
-        public int disponible { get; set; } +
-    } +
- +
-    public class RespondArch +
-    { +
-        public int codigo { get; set; } +
-        public string mensaje { get; set; } +
-        public string archivo { get; set; } +
-        public bool procesado { get; set; } +
-    } +
- +
-    public class Autent +
-    { +
-        public string rnc { get; set; } +
-        public string clave { get; set; } +
-        public string usuario { get; set; } +
- +
-    } +
- +
- +
-    public class RespAutent +
-    { +
-        public string token { get; set; } +
-        public string fechaExpiracion { get; set; } +
- +
-        public double codigo { get; set; } +
-        public string mensaje { get; set; } +
- +
- +
- +
-    } +
- +
- +
-    //**************************CLASE CLIMA************************************ +
-    public class Request +
-    { +
-        public string Type { get; set; } +
-        public string Query { get; set; } +
-        public string Language { get; set; } +
-        public string Unit { get; set; } +
-    } +
- +
-    public class Location +
-    { +
-        public string Name { get; set; } +
-        public string Country { get; set; } +
-        public string Region { get; set; } +
-        public string Lat { get; set; } +
-        public string Lon { get; set; } +
-        public string Timezone_id { get; set; } +
-        public string Localtime { get; set; } +
-        public int Localtime_epoch { get; set; } +
-        public string Utc_offset { get; set; } +
-    } +
- +
-    public class Current +
-    { +
-        public string observation_time { get; set; } +
-        public int temperature { get; set; } +
-        public int weather_code { get; set; } +
-        public List<string> weather_icons { get; set; } +
-        public List<string> weather_descriptions { get; set; } +
-        public int wind_speed { get; set; } +
-        public int wind_degree { get; set; } +
-        public string wind_dir { get; set; } +
-        public int pressure { get; set; } +
-        public double precip { get; set; } +
-        public int humidity { get; set; } +
-        public int cloudcover { get; set; } +
-        public int feelslike { get; set; } +
-        public int uv_index { get; set; } +
-        public int visibility { get; set; } +
-        public string is_day { get; set; } +
-    } +
- +
-    public class Clima +
-    { +
-        public Request request { get; set; } +
-        public Location location { get; set; } +
-        public Current current { get; set; } +
-    } +
- +
- +
-    public class TablaFormasPago +
-    { +
-        public string forma { get; set; } +
-        public string monto { get; set; } +
-    } +
- +
-    public class IdentificacionDocumento +
-    { +
-        public string tipoDocumento { get; set; } +
-        public string ncf { get; set; } +
-        public string fechaVencimientoSecuencia { get; set; } +
-        public string indicadorEnvioDiferido { get; set; } +
-        public string indicadorMontoGravado { get; set; } +
-        public string indicadorNotaCredito { get; set; } +
-        public string tipoIngresos { get; set; } +
-        public string tipoPago { get; set; } +
-        public string fechaLimitePago { get; set; } +
-        public string terminoPago { get; set; } +
-        public List<TablaFormasPago> tablaFormasPago { get; set; } +
-        public string tipoCuentaPago { get; set; } +
-        public string numeroCuentaPago { get; set; } +
-        public string bancoPago { get; set; } +
-        public string fechaDesde { get; set; } +
-        public string fechaHasta { get; set; } +
-    } +
- +
-    public class Emisor +
-    { +
-        public string rnc { get; set; } +
-        public string razonSocial { get; set; } +
-        public string nombreComercial { get; set; } +
-        public string sucursal { get; set; } +
-        public string direccion { get; set; } +
-        public string municipio { get; set; } +
-        public string provincia { get; set; } +
-        public List<string> tablaTelefono { get; set; } +
-        public string correo { get; set; } +
-        public string webSite { get; set; } +
-        public string actividadEconomica { get; set; } +
-        public string codigoVendedor { get; set; } +
-        public string numeroFacturaInterna { get; set; } +
-        public string numeroPedidoInterno { get; set; } +
-        public string zonaVenta { get; set; } +
-        public string rutaVenta { get; set; } +
-        public string informacionAdicional { get; set; } +
-        public string fechaEmision { get; set; } +
-    } +
- +
-    public class Comprador +
-    { +
-        public string rnc { get; set; } +
-        public string identificacionExtranjero { get; set; } +
-        public string razonSocial { get; set; } +
-        public string contacto { get; set; } +
-        public string correo { get; set; } +
-        public string direccion { get; set; } +
-        public string municipio { get; set; } +
-        public string provincia { get; set; } +
-        public string pais { get; set; } +
-        public string fechaEntrega { get; set; } +
-        public string contactoEntrega { get; set; } +
-        public string direccionEntrega { get; set; } +
-        public string telefonoAdicional { get; set; } +
-        public string fechaOrden { get; set; } +
-        public string numeroOrden { get; set; } +
-        public string codigoInterno { get; set; } +
-        public string responsablePago { get; set; } +
-        public string informacionAdicional { get; set; } +
-    } +
- +
-    public class InformacionesAdicionales +
-    { +
-        public string fechaEmbarque { get; set; } +
-        public string numeroEmbarque { get; set; } +
-        public string numeroContenedor { get; set; } +
-        public string numeroReferencia { get; set; } +
-        public string pesoBruto { get; set; } +
-        public string pesoNeto { get; set; } +
-        public string unidadPesoBruto { get; set; } +
-        public string unidadPesoNeto { get; set; } +
-        public string cantidadBulto { get; set; } +
-        public string unidadBulto { get; set; } +
-        public string volumenBulto { get; set; } +
-        public string unidadVolumen { get; set; } +
-        public string nombrePuertoEmbarque { get; set; } +
-        public string condicionesEntrega { get; set; } +
-        public string totalFob { get; set; } +
-        public string seguro { get; set; } +
-        public string flete { get; set; } +
-        public string otrosGastos { get; set; } +
-        public string totalCif { get; set; } +
-        public string regimenAduanero { get; set; } +
-        public string nombrePuertoSalida { get; set; } +
-        public string nombrePuertoDesembarque { get; set; } +
-    } +
- +
-    public class Transporte +
-    { +
-        public string conductor { get; set; } +
-        public int documento { get; set; } +
-        public string ficha { get; set; } +
-        public string placa { get; set; } +
-        public string ruta { get; set; } +
-        public string zona { get; set; } +
-        public string numeroAlbaran { get; set; } +
-        public string via { get; set; } +
-        public string paisOrigen { get; set; } +
-        public string direccionDestino { get; set; } +
-        public string paisDestino { get; set; } +
-        public string rncIdentificacionCompaniaTransportista { get; set; } +
-        public string nombreCompaniaTransportista { get; set; } +
-        public string numeroViaje { get; set; } +
-    } +
- +
-    public class ImpuestosAdicionale +
-    { +
-        public string tipoImpuesto { get; set; } +
-        public string tasaImpuestoAdicional { get; set; } +
-        public string montoImpuestoSelectivoConsumoEspecifico { get; set; } +
-        public string montoImpuestoSelectivoConsumoAdvalorem { get; set; } +
-        public string otrosImpuestosAdicionales { get; set; } +
-        public string tipo { get; set; } +
-        public string tasa { get; set; } +
-        public string montoSelectivoConsumoEspecifico { get; set; } +
-        public string montoSelectivoConsumoAdvalorem { get; set; } +
-    } +
- +
-    public class Totales +
-    { +
-        public string montoGravadoTotal { get; set; } +
-        public string montoGravadoI1 { get; set; } +
-        public string montoGravadoI2 { get; set; } +
-        public string montoGravadoI3 { get; set; } +
-        public string montoExento { get; set; } +
-        public string itbiS1 { get; set; } +
-        public string itbiS2 { get; set; } +
-        public string itbiS3 { get; set; } +
-        public string totalITBIS { get; set; } +
-        public string totalITBIS1 { get; set; } +
-        public string totalITBIS2 { get; set; } +
-        public string totalITBIS3 { get; set; } +
-        public string montoImpuestoAdicional { get; set; } +
-        public List<ImpuestosAdicionale> impuestosAdicionales { get; set; } +
-        public string montoTotal { get; set; } +
-        public string montoNoFacturable { get; set; } +
-        public string montoPeriodo { get; set; } +
-        public string saldoAnterior { get; set; } +
-        public string montoAvancePago { get; set; } +
-        public string valorPagar { get; set; } +
-        public string totalITBISRetenido { get; set; } +
-        public string totalISRRetencion { get; set; } +
-        public string totalITBISPercepcion { get; set; } +
-        public string totalISRPercepcion { get; set; } +
-    } +
- +
-    public class OtraMoneda +
-    { +
-        public string tipoMoneda { get; set; } +
-        public string tipoCambio { get; set; } +
-        public string montoGravadoTotal { get; set; } +
-        public string montoGravado1 { get; set; } +
-        public string montoGravado2 { get; set; } +
-        public string montoGravado3 { get; set; } +
-        public string montoExento { get; set; } +
-        public string montoExentoOtraMoneda { get; set; } +
-        public string totalITBIS { get; set; } +
-        public string totalITBIS1 { get; set; } +
-        public string totalITBIS2 { get; set; } +
-        public string totalITBIS3 { get; set; } +
-        public string montoImpuestoAdicional { get; set; } +
-        public List<ImpuestosAdicionale> impuestosAdicionales { get; set; } +
-        public string montoTotal { get; set; } +
-    } +
- +
-    public class Encabezado +
-    { +
-        public IdentificacionDocumento identificacionDocumento { get; set; } +
-        public Emisor emisor { get; set; } +
-        public Comprador comprador { get; set; } +
-        public InformacionesAdicionales informacionesAdicionales { get; set; } +
-        public Transporte transporte { get; set; } +
-        public Totales totales { get; set; } +
-        public OtraMoneda otraMoneda { get; set; } +
-    } +
- +
-    public class TablaCodigo +
-    { +
-        public string tipo { get; set; } +
-        public string codigo { get; set; } +
-    } +
- +
-    public class Retencion +
-    { +
-        public string indicadorAgente { get; set; } +
-        public string montoITBIS { get; set; } +
-        public string montoISR { get; set; } +
-    } +
- +
-    public class TablaSubcantidad +
-    { +
-        public string subcantidad { get; set; } +
-        public string codigo { get; set; } +
-    } +
- +
-    public class Mineria +
-    { +
-        public string pesoNetoKilogramo { get; set; } +
-        public string pesoNeto { get; set; } +
-        public string tipoAfiliacion { get; set; } +
-        public string liquidacion { get; set; } +
-    } +
- +
-    public class TablaSubDescuento +
-    { +
-        public string tipo { get; set; } +
-        public string porcentaje { get; set; } +
-        public string monto { get; set; } +
-    } +
- +
-    public class TablaSubRecargo +
-    { +
-        public string tipo { get; set; } +
-        public string porcentaje { get; set; } +
-        public string monto { get; set; } +
-    } +
- +
-    public class TablaImpuestoAdicional +
-    { +
-        public string tipoImpuesto { get; set; } +
-    } +
- +
-    public class OtraMonedaDetalle +
-    { +
-        public string precio { get; set; } +
-        public string descuento { get; set; } +
-        public string recargo { get; set; } +
-        public string monto { get; set; } +
-    } +
- +
-    public class DetallesItem +
-    { +
-        public string numeroLinea { get; set; } +
-        public List<TablaCodigo> tablaCodigos { get; set; } +
-        public string indicadorFacturacion { get; set; } +
-        public Retencion retencion { get; set; } +
-        public string nombre { get; set; } +
-        public string indicadorBienoServicio { get; set; } +
-        public string descripcion { get; set; } +
-        public string cantidad { get; set; } +
-        public string unidadMedida { get; set; } +
-        public string cantidadReferencia { get; set; } +
-        public string unidadReferencia { get; set; } +
-        public List<TablaSubcantidad> tablaSubcantidad { get; set; } +
-        public string gradosAlcohol { get; set; } +
-        public string precioUnitarioReferencia { get; set; } +
-        public string fechaElaboracion { get; set; } +
-        public string fechaVencimiento { get; set; } +
-        public List<Mineria> mineria { get; set; } +
-        public string precioUnitario { get; set; } +
-        public string descuentoMonto { get; set; } +
-        public List<TablaSubDescuento> tablaSubDescuento { get; set; } +
-        public string recargoMonto { get; set; } +
-        public List<TablaSubRecargo> tablaSubRecargo { get; set; } +
-        public List<TablaImpuestoAdicional> tablaImpuestoAdicional { get; set; } +
-        public OtraMonedaDetalle otraMonedaDetalle { get; set; } +
-        public string monto { get; set; } +
-    } +
- +
-    public class Subtotale +
-    { +
-        public int numero { get; set; } +
-        public string descripcion { get; set; } +
-        public int orden { get; set; } +
-        public string montoGravadoTotal { get; set; } +
-        public string montoGravadoI1 { get; set; } +
-        public string montoGravadoI2 { get; set; } +
-        public string montoGravadoI3 { get; set; } +
-        public string itbiS { get; set; } +
-        public string itbiS1 { get; set; } +
-        public string itbiS2 { get; set; } +
-        public string itbiS3 { get; set; } +
-        public string impuestoAdicional { get; set; } +
-        public string exento { get; set; } +
-        public string monto { get; set; } +
-        public int lineas { get; set; } +
-    } +
- +
-    public class DescuentosORecargo +
-    { +
-        public int numeroLinea { get; set; } +
-        public string tipoAjuste { get; set; } +
-        public string indicadorNorma1007 { get; set; } +
-        public string descripcion { get; set; } +
-        public string tipoValor { get; set; } +
-        public string valor { get; set; } +
-        public string monto { get; set; } +
-        public string montoOtraMoneda { get; set; } +
-        public string indicadorFacturacion { get; set; } +
-    } +
- +
-    public class InformacionReferencia +
-    { +
-        public string ncfModificado { get; set; } +
-        public string rncOtroContribuyente { get; set; } +
-        public string fechaNCFModificado { get; set; } +
-        public string codigoModificacion { get; set; } +
-        public string razonModificacion { get; set; } +
-    } +
- +
-    public class DocumentoElectronico +
-    { +
-        public Encabezado encabezado { get; set; } +
-        public List<DetallesItem> detallesItems { get; set; } +
-        public List<Subtotale> subtotales { get; set; } +
-        public List<DescuentosORecargo> descuentosORecargos { get; set; } +
-        public InformacionReferencia informacionReferencia { get; set; } +
-    } +
  
 +            };
  
 +            var resultado = Post(autenticacion, url);
  
 +            RespAutent Respuesta = new RespAutent();
 +            Respuesta = JsonSerializer.Deserialize<RespAutent>(resultado);
  
  
-}+            textBox161.Text = Respuesta.token;
 </code> </code>