Skip to content

Commit

Permalink
Update 1.5.5
Browse files Browse the repository at this point in the history
Updated Waybill 3.0 add-on examples
  • Loading branch information
rafa-dx committed Mar 20, 2024
1 parent 0543f41 commit ba087c6
Showing 19 changed files with 582 additions and 129 deletions.
2 changes: 1 addition & 1 deletion Facturama/Facturama.csproj
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net452</TargetFrameworks>
<Version>1.5.4</Version>
<Version>1.5.5</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
5 changes: 3 additions & 2 deletions Facturama/FacturamaApi.cs
Original file line number Diff line number Diff line change
@@ -10,8 +10,9 @@ public FacturamaApi(string user, string password, string url)
{
var httpClient = new RestClient(url)
{
Authenticator = new HttpBasicAuthenticator(user, password)
};
Authenticator = new HttpBasicAuthenticator(user, password),
UserAgent = user
};

Clients = new ClientService(httpClient);
Cfdis = new CfdiService(httpClient);
5 changes: 5 additions & 0 deletions Facturama/Models/Complement.cs
Original file line number Diff line number Diff line change
@@ -29,6 +29,11 @@ public class Complement
/// </summary>
public ComplementoCartaPorte20 CartaPorte20 { get; set; }

/// <summary>
/// Complemento de carta porte 3.0
/// </summary>
public ComplementoCartaPorte30 CartaPorte30 { get; set; }

/// <summary>
/// Complemento leyendas fiscales
/// </summary>
61 changes: 61 additions & 0 deletions Facturama/Models/Complements/Waybill/ComplementoCartaPorte30.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
using System;
using Facturama.Services;
using Newtonsoft.Json;
using System.Runtime.Serialization;

namespace Facturama.Models.Complements.Waybill
{
public enum RegistroISTMO
{
[EnumMember(Value = "Sí")]
Si,

[EnumMember(Value = "No")]
No,
}

public class ComplementoCartaPorte30
{
[JsonProperty("IdCCP")]
public string IdCCP { get; set; }

[JsonProperty("TranspInternac")]
public TranspInternac TranspInternac { get; set; }

[JsonProperty("RegimenAduanero")]
public string RegimenAduanero { get; set; }

[JsonProperty("EntradaSalidaMerc")]
public string EntradaSalidaMerc { get; set; }

[JsonProperty("PaisOrigenDestino")]
public string PaisOrigenDestino { get; set; }

[JsonProperty("ViaEntradaSalida")]
public string ViaEntradaSalida { get; set; }

[JsonProperty("TotalDistRec")]
public decimal? TotalDistRec { get; set; }

[JsonProperty("RegistroISTMO")]
public RegistroISTMO RegistroISTMO { get; set; }

[JsonProperty("UbicacionPoloOrigen")]
public string UbicacionPoloOrigen { get; set; }

[JsonProperty("UbicacionPoloDestino")]
public string UbicacionPoloDestino { get; set; }

[JsonProperty("Ubicaciones")]
public Ubicacion[] Ubicaciones { get; set; }

[JsonProperty("Mercancias")]
public Mercancias Mercancias { get; set; }

[JsonProperty("FiguraTransporte")]
public TiposFigura[] FiguraTransporte { get; set; }


}
}

7 changes: 6 additions & 1 deletion Facturama/Models/Complements/Waybill/Contenedor.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@

using System;

namespace Facturama.Models.Complements.Waybill
{
public class Contenedor
{
public string MatriculaContenedor { get; set; }
public string TipoContenedor { get; set; }
public string NumPrecinto { get; set; }
}
public string IdCCPRelacionado { get; set; }
public string PlacaVMCCP { get; set; }
public DateTime FechaCertificacionCCP { get; set; }
}
}
23 changes: 23 additions & 0 deletions Facturama/Models/Complements/Waybill/DocumentacionAduanera.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Facturama.Services;
using Newtonsoft.Json;
using System;

namespace Facturama.Models.Complements.Waybill
{
public class DocumentacionAduanera
{
[JsonProperty("TipoDocumento")]
public string TipoDocumento { get; set; }

[JsonProperty("NumPedimento")]
public string NumPedimento { get; set; }

[JsonProperty("IdentDocAduanero")]
public string IdentDocAduanero { get; set; }

[JsonProperty("RFCImpo")]
public string RFCImpo { get; set; }


}
}
Original file line number Diff line number Diff line change
@@ -6,6 +6,8 @@ public class IdentificacionVehicular
{
[JsonProperty("ConfigVehicular")]
public string ConfigVehicular { get; set; }
[JsonProperty("PesoBrutoVehicular")]
public string PesoBrutoVehicular { get; set; }

[JsonProperty("PlacaVM")]
public string PlacaVM { get; set; }
75 changes: 74 additions & 1 deletion Facturama/Models/Complements/Waybill/Mercancia.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Newtonsoft.Json;
using Facturama.Services;
using Newtonsoft.Json;
using System;

namespace Facturama.Models.Complements.Waybill
{
@@ -37,6 +39,68 @@ public class Mercancia
[JsonProperty("DescripEmbalaje")]
public string DescripEmbalaje { get; set; }

[JsonProperty("SectorCOFEPRIS")]
public string SectorCOFEPRIS { get; set; }

[JsonProperty("NombreIngredienteActivo")]
public string NombreIngredienteActivo { get; set; }

[JsonProperty("NomQuimico")]
public string NomQuimico { get; set; }

[JsonProperty("DenominacionGenericaProd")]
public string DenominacionGenericaProd { get; set; }

[JsonProperty("DenominacionDistintivaProd")]
public string DenominacionDistintivaProd { get; set; }

[JsonProperty("Fabricante")]
public string Fabricante { get; set; }

[JsonProperty("FechaCaducidad")]
[JsonConverter(typeof(DateFormatConverter), "yyyy-MM-ddTHH:mm:ss")]
public DateTime FechaCaducidad { get; set; }

[JsonProperty("LoteMedicamento")]
public string LoteMedicamento { get; set; }

[JsonProperty("FormaFarmaceutica")]
public string FormaFarmaceutica { get; set; }

[JsonProperty("CondicionesEspTransp")]
public string CondicionesEspTransp { get; set; }

[JsonProperty("RegistroSanitarioFolioAutorizacion")]
public string RegistroSanitarioFolioAutorizacion { get; set; }

[JsonProperty("PermisoImportacion")]
public string PermisoImportacion { get; set; }

[JsonProperty("FolioImpoVUCEM")]
public string FolioImpoVUCEM { get; set; }

[JsonProperty("NumCAS")]
public string NumCas { get; set; }

[JsonProperty("RazonSocialEmpImp")]
public string RazonSocialEmpImp { get; set; }

[JsonProperty("NumRegSanPlagCOFEPRIS")]
public string NumRegSanPlagCOFEPRIS { get; set; }

[JsonProperty("DatosFabricante")]
public string DatosFabricante { get; set; }

[JsonProperty("DatosFormulador")]
public string DatosFormulador { get; set; }

[JsonProperty("DatosMaquilador")]
public string DatosMaquilador { get; set; }

[JsonProperty("UsoAutorizado")]
public string UsoAutorizado { get; set; }


[JsonProperty("PesoEnKg")]
public decimal PesoEnKg { get; set; }

@@ -51,6 +115,15 @@ public class Mercancia

[JsonProperty("UUIDComercioExt")]
public string UUIDComercioExt { get; set; }
[JsonProperty("TipoMaterial")]
public string TipoMaterial { get; set; }

[JsonProperty("DescripcionMaterial")]
public string DescripcionMaterial { get; set; }

[JsonProperty("DocumentacionAduanera")]
public DocumentacionAduanera[] DocumentacionAduanera { get; set; }


[JsonProperty("Pedimentos")]
public Pedimentos[] Pedimentos { get; set; }
3 changes: 3 additions & 0 deletions Facturama/Models/Complements/Waybill/Mercancias.cs
Original file line number Diff line number Diff line change
@@ -20,6 +20,9 @@ public class Mercancias
[JsonProperty("CargoPorTasacion")]
public decimal CargoPorTasacion { get; set; }

[JsonProperty("LogisticaInversaRecoleccionDevolucion")]
public string LogisticaInversaRecoleccionDevolucion { get; set; }


[JsonProperty("Mercancia")]
public Mercancia[] Mercancia { get; set; }
13 changes: 13 additions & 0 deletions Facturama/Models/Complements/Waybill/RemolquesCCP.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Facturama.Models.Complements.Waybill
{
public class RemolquesCCP
{
public string SubTipoRemCCP { get; set; }
public string PlacaCCP { get; set; }
}
}

Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ namespace Facturama.Models.Complements.Waybill
public class TransporteFerroviario
{
public string TipoDeServicio { get; set; }
public string TipoDeTrafico { get; set; }
public string NombreAseg { get; set; }
public string NumPolizaSeguro { get; set; }
public string Concesionario { get; set; }
6 changes: 6 additions & 0 deletions Facturama/Models/Complements/Waybill/TransporteMaritimo.cs
Original file line number Diff line number Diff line change
@@ -26,6 +26,8 @@ public class TransporteMaritimo
public decimal Eslora { get; set; }
public decimal Manga { get; set; }
public decimal Calado { get; set; }

public decimal Puntal { get; set; }
public string LineaNaviera { get; set; }

public string NombreAgenteNaviero { get; set; }
@@ -34,7 +36,11 @@ public class TransporteMaritimo
public string NumViaje { get; set; }
public string NumConocEmbarc { get; set; }

public string PermisoTempNavegacion { get; set; }

public Contenedor[] Contenedor { get; set; }

public RemolquesCCP[] RemolquesCCP { get; set; }

}
}
6 changes: 3 additions & 3 deletions Facturama/Services/CfdiLiteService.cs
Original file line number Diff line number Diff line change
@@ -30,12 +30,12 @@ public CfdiLiteService(RestClient httpClient) :

}

[Obsolete(" El método 'Create' está OBSOLETO, por favor utiliza 'Create3'.")]
public override Cfdi Create(Models.Request.CfdiMulti model)
{
//return Post(model, "api-lite/3/cfdis"); // Disponible el 01/07/2022
return Post(model, "api-lite/2/cfdis"); // Vigente hasta el 30/06/2022
return Post(model, "api-lite/2/cfdis");
}
public override Cfdi Create3(Models.Request.CfdiMulti model) // Metodo de prueba para CFDI 4.0
public override Cfdi Create3(Models.Request.CfdiMulti model)
{
return Post(model, "api-lite/3/cfdis");
}
2 changes: 1 addition & 1 deletion Samples/MultiIssuerExamples/MultiIssuerExamples.cs
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ public static void RunExamples()
//TestCreatePaymentCfdi40(facturamaMultiEmisor); // Complemento de Pago 20

//new EducationalInstitutionComplementExampleMultiemisor(facturamaMultiEmisor).Run(); // Complemento IEDU - Instituciones educativas
//new WaybillComplementExampleMulti(facturamaMultiEmisor).Run(); // Complemento IEDU - Instituciones educativas
new WaybillComplementExampleMulti(facturamaMultiEmisor).Run(); // Complemento IEDU - Instituciones educativas

Console.ReadKey();
}
Loading
Oops, something went wrong.

0 comments on commit ba087c6

Please sign in to comment.