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

Update SetupOpenNFSe.cs #221

Merged
merged 1 commit into from
Apr 1, 2023
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
31 changes: 29 additions & 2 deletions src/OpenAC.Net.NFSe.Test/SetupOpenNFSe.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using OpenAC.Net.DFe.Core.Common;
using OpenAC.Net.DFe.Core.Common;

namespace OpenAC.Net.NFSe.Test;

Expand All @@ -9,6 +9,7 @@ public class SetupOpenNFSe
private static OpenNFSe ginfes;
private static OpenNFSe sigiss;
private static OpenNFSe abrasf;
private static OpenNFSe ipm;

#endregion Fields

Expand All @@ -20,6 +21,7 @@ public class SetupOpenNFSe

public static OpenNFSe Abrasf => abrasf ??= GetAbrasf();

public static OpenNFSe IPM => ipm ??= GetIPM();
#endregion Properties

#region Setup
Expand Down Expand Up @@ -68,6 +70,31 @@ private static OpenNFSe GetGinfes()
return openNFSe;
}

private static OpenNFSe GetIPM()
{
var openNFSe = new OpenNFSe();

//Salvar os arquivos
openNFSe.Configuracoes.Geral.Salvar = true;
openNFSe.Configuracoes.Arquivos.Salvar = true;

//webservices
//Configure os dados da cidade e do Certificado aqui
openNFSe.Configuracoes.WebServices.Ambiente = DFeTipoAmbiente.Producao;
openNFSe.Configuracoes.WebServices.CodigoMunicipio = 4303103;

openNFSe.Configuracoes.Certificados.Certificado = "4E009FA5F9CABB8F";
openNFSe.Configuracoes.Certificados.Senha = "";

openNFSe.Configuracoes.PrestadorPadrao.CpfCnpj = "03514896000115";
openNFSe.Configuracoes.PrestadorPadrao.InscricaoMunicipal = "85841";

openNFSe.Configuracoes.WebServices.Usuario = "111";
openNFSe.Configuracoes.WebServices.Senha = "123";

return openNFSe;
}

private static OpenNFSe GetSigiss()
{
var openNFSe = new OpenNFSe();
Expand All @@ -91,4 +118,4 @@ private static OpenNFSe GetSigiss()
}

#endregion Setup
}
}