Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alterados métodos não implementados no SystemPro #37

Merged
merged 1 commit into from
Mar 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 34 additions & 28 deletions src/OpenAC.Net.NFSe/Providers/SystemPro/SystemProServiceClient.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// ***********************************************************************
// ***********************************************************************
// Assembly : OpenAC.Net.NFSe
// Author : Felipe Silveira (Transis Software)
// Created : 18-08-2021
//
// Last Modified By : Felipe Silveira (Transis Software)
// Last Modified On : 18-08-2021
// Last Modified On : 30-03-2022
// ***********************************************************************
// <copyright file="SystemProServiceClient.cs" company="OpenAC .Net">
// The MIT License (MIT)
Expand All @@ -29,12 +29,12 @@
// <summary></summary>
// ***********************************************************************

using OpenAC.Net.Core.Extensions;
using OpenAC.Net.DFe.Core;
using System;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Xml.Linq;
using OpenAC.Net.Core.Extensions;
using OpenAC.Net.DFe.Core;

namespace OpenAC.Net.NFSe.Providers
{
Expand All @@ -51,7 +51,7 @@ public SystemProServiceClient(ProviderSystemPro provider, TipoUrl tipoUrl, X509C

#region Methods

public string Enviar(string cabec, string msg) => throw new NotImplementedException();
public string Enviar(string cabec, string msg) => throw new NotImplementedException("Utilize o metodo EnviarSincrono");

public string EnviarSincrono(string cabec, string msg)
{
Expand All @@ -72,34 +72,40 @@ public string EnviarSincrono(string cabec, string msg)

public string ConsultarLoteRps(string cabec, string msg)
{
var message = new StringBuilder();
message.Append("<ns2:ConsultarLoteRps xmlns:ns2=\"http://NFSe.wsservices.systempro.com.br/\">");
message.Append("<nfseCabecMsg>");
message.AppendCData(cabec);
message.Append("</nfseCabecMsg>");
message.Append("<nfseDadosMsg>");
message.AppendCData(msg);
message.Append("</nfseDadosMsg>");
message.Append("</ns2:ConsultarLoteRps>");

return Execute("", message.ToString(), "ConsultarLoteRpsResponse");
throw new NotImplementedException("ConsultarLoteRps nao implementada/suportada para o provedor SystemPro");

//Ate o dia 30/03/22 nao estava disponivel essa consulta pelo provedor
//var message = new StringBuilder();
//message.Append("<ns2:ConsultarLoteRps xmlns:ns2=\"http://NFSe.wsservices.systempro.com.br/\">");
//message.Append("<nfseCabecMsg>");
//message.AppendCData(cabec);
//message.Append("</nfseCabecMsg>");
//message.Append("<nfseDadosMsg>");
//message.AppendCData(msg);
//message.Append("</nfseDadosMsg>");
//message.Append("</ns2:ConsultarLoteRps>");

//return Execute("", message.ToString(), "ConsultarLoteRpsResponse");
}

public string ConsultarSequencialRps(string cabec, string msg) => throw new NotImplementedException();

public string ConsultarNFSeRps(string cabec, string msg)
{
var message = new StringBuilder();
message.Append("<ns2:ConsultarNfseRps xmlns:ns2=\"http://NFSe.wsservices.systempro.com.br/\">");
message.Append("<nfseCabecMsg>");
message.AppendCData(cabec);
message.Append("</nfseCabecMsg>");
message.Append("<nfseDadosMsg>");
message.AppendCData(msg);
message.Append("</nfseDadosMsg>");
message.Append("</ns2:ConsultarNfseRps>");

return Execute("", message.ToString(), "ConsultarNfseRpsResponse");
throw new NotImplementedException("ConsultarNFSeRps nao implementada/suportada para o provedor SystemPro");

//Ate o dia 30/03/22 nao estava disponivel essa consulta pelo provedor
//var message = new StringBuilder();
//message.Append("<ns2:ConsultarNfseRps xmlns:ns2=\"http://NFSe.wsservices.systempro.com.br/\">");
//message.Append("<nfseCabecMsg>");
//message.AppendCData(cabec);
//message.Append("</nfseCabecMsg>");
//message.Append("<nfseDadosMsg>");
//message.AppendCData(msg);
//message.Append("</nfseDadosMsg>");
//message.Append("</ns2:ConsultarNfseRps>");

//return Execute("", message.ToString(), "ConsultarNfseRpsResponse");
}

public string ConsultarNFSe(string cabec, string msg)
Expand Down Expand Up @@ -153,4 +159,4 @@ protected override string TratarRetorno(XElement xmlDocument, string[] responseT

#endregion Methods
}
}
}