LibreDteDotNet.RestRequest 1.1.6

There is a newer version of this package available.
See the version list below for details.
dotnet add package LibreDteDotNet.RestRequest --version 1.1.6
NuGet\Install-Package LibreDteDotNet.RestRequest -Version 1.1.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LibreDteDotNet.RestRequest" Version="1.1.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LibreDteDotNet.RestRequest --version 1.1.6
#r "nuget: LibreDteDotNet.RestRequest, 1.1.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install LibreDteDotNet.RestRequest as a Cake Addin
#addin nuget:?package=LibreDteDotNet.RestRequest&version=1.1.6

// Install LibreDteDotNet.RestRequest as a Cake Tool
#tool nuget:?package=LibreDteDotNet.RestRequest&version=1.1.6

alternate text is missing from this package README image

alternate text is missing from this package README image GitHub commit activity GitHub contributors

Nuget Nuget GitHub code size in bytes Lines of code

GitHub tag (latest by date) GitHub all releases

LibreDteDotNet.RestRequest

This solution tries to show how to access the information published by the Servicio de Impuestos Internos through REST services. The services are packaged in "Library Class" and can be accessed through Dependency Injection.

It should be noted that this repository has no relationship with the government entity, only for educational purposes.

📝  Details

Framework .Net 6.0
Autofac 7.0.0
Autofac.Extensions.DependencyInjection 8.0.0
Security.Cryptography.Xml 7.0.1

✅  Requirements

  • Framework .Net >= 5.0.
  • Autofac Framework.

🛠️  RoadMap

At the moment the methods return an response as "html content". In an approximate stage we will use a framework to inspect the DOM and return a specific object of data. The -digital certificate- must be installed in your system, this project does not need to know the password.

🚀  Usage

This Class is accessed via dependency injection:

IHost host = Host.CreateDefaultBuilder()
  .RestRequestBuild() // This is important!
  .ConfigureServices(
    (c, s) => {
      // your config
    }
  )
  .Build();

For calling you needs implements Json Options pattern in your project.

{
 "Rut": "16000555-2"  
}


image Function : GetLibroResumen()

var resumencompras = await restRequest.LibroService.GetLibroResumen(
  tkn, // token
  "99000111", // rut company
  "4", // dv company
  "2023-03", // period
  TipoOperacion.Emitidos
);

Function : GetLibroDetalle()

var detalleventas = await restRequest.LibroService.GetLibroDetalle(
  tkn, // token
  "99000111", // rut company
  "4", // dv company
  "2023-03", // period
  TipoDoc.FacturaAfectaElectronica, // 33-34-61
  TipoOperacion.Recibidos
);

image Function : GetLibroDetalleCsv()

var csvemitidos = await restRequest.LibroService
  .GetLibroDetalleCsv(
    tkn, // token
    "99000111", // rut company
    "4", // dv company
    "2023-03", // period
    TipoDoc.FacturaAfectaElectronica, // 33-34-61
    TipoOperacion.Emitidos
  );
if (csvemitidos!.Data != null) {
  File.WriteAllLines(csvemitidos.NombreArchivo!, csvemitidos!.Data!);
}

image

Function : ConsultaConsumoByDate()

var htmlcontent = await restRequest.FolioService.ConsultaConsumoByDate(
  "2022", // period year inicio
  "03",  // period mes inicio
  "2023", // period year final
  "02",  // period mes final
  "99000111", // rut company
  "4", // dv company
);

image Function : GetInfo()

var info = await restRequest.ContribuyenteService.GetInfo("99000111", "4");

image Function : GetInfoDocumento()

var infodoc = await restRequest.ContribuyenteService.GetInfoDocumento(
  "77888000", // rut emisor
  "0",
  "765005555", // rut receptor
  "4",
  TipoDoc.FacturaAfectaElectronica,
  "5",
  "27022023", // fecha emisión ddMMyyyy
  "929379" // monto total
);

📫  Have a question? Found a Bug?

Feel free to file a new issue with a respective title and description on the LibreDteDotNet.RestRequest/issues repository.

❤️  Community and Contributions

I think that Knowledge Doesn’t Belong to Just Any One Person, and I always intend to share my knowledge with other developers, a voluntary monetary contribution or contribute ideas and/or comments to improve these tools would be appreciated.

PayPal

📘  License

All my repository content is released under the terms of the MIT License.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.7 197 3/29/2023
1.1.6 187 3/28/2023
1.1.5 184 3/28/2023
1.1.4 183 3/27/2023
1.1.3 198 3/27/2023
1.1.2 184 3/27/2023
1.1.1 176 3/27/2023
1.1.0 195 3/27/2023
1.0.0 200 3/27/2023