• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wmixvideo / nfe / #6266

21 Mar 2025 11:46AM UTC coverage: 52.671% (+25.7%) from 26.996%
#6266

push

luciano.antunes
Nota Fiscal Fácil

0 of 21 new or added lines in 2 files covered. (0.0%)

2924 existing lines in 401 files now uncovered.

14002 of 26584 relevant lines covered (52.67%)

0.53 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/com/fincatto/documentofiscal/mdfe3/classes/MDFAutorizador3.java
1
package com.fincatto.documentofiscal.mdfe3.classes;
2

3
import com.fincatto.documentofiscal.DFAmbiente;
4
import com.fincatto.documentofiscal.DFUnidadeFederativa;
5

6
import java.util.Arrays;
7

8
/**
9
 * <h1>URLs dos serviços para MDF-e</h1><br>
10
 *
11
 * @Author Eldevan Nery Junior on 26/05/17.
12
 *
13
 * <p>Pela minha pesquisa, atualmente o serviço de MDF-e encontra-se apenas no  <a href="https://mdfe-portal.sefaz.rs.gov.br/Site/Servicos">RIO GRANDE DO SUL </a>.
14
 * veja no: <a href="https://www.fazenda.sp.gov.br/mdfe/url_webservices/url_webservices.htm"> link SP</a>
15
 *  e <a href="http://boletim.fazenda.pr.gov.br/boletins/item/2015/34"> link PR</a>
16
 *  <p/>
17
 *
18
 *
19
 */
UNCOV
20
public enum MDFAutorizador3 {
×
21

UNCOV
22
    RS {
×
23
        @Override
24
        public String getMDFeRecepcao(DFAmbiente ambiente) {
25
            return DFAmbiente.HOMOLOGACAO.equals(ambiente)
×
UNCOV
26
                    ? "https://mdfe-homologacao.svrs.rs.gov.br/ws/MDFerecepcao/MDFeRecepcao.asmx"
×
UNCOV
27
                    : "https://mdfe.svrs.rs.gov.br/ws/MDFerecepcao/MDFeRecepcao.asmx";
×
28
        }
29
        
30
        @Override
31
        public String getMDFeRecepcaoSinc(DFAmbiente ambiente) {
32
            return DFAmbiente.HOMOLOGACAO.equals(ambiente)
×
UNCOV
33
                    ? "https://mdfe-homologacao.svrs.rs.gov.br/ws/MDFeRecepcaoSinc/MDFeRecepcaoSinc.asmx"
×
UNCOV
34
                    : "https://mdfe.svrs.rs.gov.br/ws/MDFeRecepcaoSinc/MDFeRecepcaoSinc.asmx";
×
35
        }
36

37
        @Override
38
        public String getMDFeRetornoRecepcao(DFAmbiente ambiente) {
39
            return DFAmbiente.HOMOLOGACAO.equals(ambiente)
×
UNCOV
40
                    ? "https://mdfe-homologacao.svrs.rs.gov.br/ws/MDFeRetRecepcao/MDFeRetRecepcao.asmx"
×
UNCOV
41
                    : "https://mdfe.svrs.rs.gov.br/ws/MDFeRetRecepcao/MDFeRetRecepcao.asmx";
×
42
        }
43

44
        @Override
45
        public String getMDFeRecepcaoEvento(DFAmbiente ambiente) {
UNCOV
46
            return DFAmbiente.HOMOLOGACAO.equals(ambiente)
×
UNCOV
47
                    ? "https://mdfe-homologacao.svrs.rs.gov.br/ws/MDFeRecepcaoEvento/MDFeRecepcaoEvento.asmx"
×
UNCOV
48
                    : "https://mdfe.svrs.rs.gov.br/ws/MDFeRecepcaoEvento/MDFeRecepcaoEvento.asmx";
×
49
        }
50

51
        @Override
52
        public String getMDFeStatusServico(DFAmbiente ambiente) {
53
            return DFAmbiente.HOMOLOGACAO.equals(ambiente)
×
UNCOV
54
                    ? "https://mdfe-homologacao.svrs.rs.gov.br/ws/MDFeStatusServico/MDFeStatusServico.asmx"
×
UNCOV
55
                    : "https://mdfe.svrs.rs.gov.br/ws/MDFeStatusServico/MDFeStatusServico.asmx";
×
56
        }
57

58
        @Override
59
        public String getMDFeConsulta(DFAmbiente ambiente) {
60
            return DFAmbiente.HOMOLOGACAO.equals(ambiente)
×
UNCOV
61
                    ? "https://mdfe-homologacao.svrs.rs.gov.br/ws/MDFeConsulta/MDFeConsulta.asmx"
×
UNCOV
62
                    : "https://mdfe.svrs.rs.gov.br/ws/MDFeConsulta/MDFeConsulta.asmx";
×
63
        }
64

65
        @Override
66
        public String getMDFeConsNaoEnc(DFAmbiente ambiente) {
67
            return DFAmbiente.HOMOLOGACAO.equals(ambiente)
×
UNCOV
68
                    ? "https://mdfe-homologacao.svrs.rs.gov.br/ws/MDFeConsNaoEnc/MDFeConsNaoEnc.asmx"
×
UNCOV
69
                    : "https://mdfe.svrs.rs.gov.br/ws/MDFeConsNaoEnc/MDFeConsNaoEnc.asmx";
×
70
        }
71

72
        @Override
73
        public String getMDFeDistribuicao(DFAmbiente ambiente) {
UNCOV
74
            return DFAmbiente.HOMOLOGACAO.equals(ambiente)
×
UNCOV
75
                    ? "https://mdfe-homologacao.svrs.rs.gov.br/ws/MDFeDistribuicaoDFe/MDFeDistribuicaoDFe.asmx"
×
UNCOV
76
                    : "https://mdfe.svrs.rs.gov.br/ws/MDFeDistribuicaoDFe/MDFeDistribuicaoDFe.asmx";
×
77
        }
78

79
        @Override
80
        public DFUnidadeFederativa[] getUFs() {
UNCOV
81
            return new DFUnidadeFederativa[]{DFUnidadeFederativa.RS};
×
82
        }
83
    };
84

85
    public abstract String getMDFeRecepcao(final DFAmbiente ambiente);
86
    
87
    public abstract String getMDFeRecepcaoSinc(final DFAmbiente ambiente);
88

89
    public abstract String getMDFeRetornoRecepcao(final DFAmbiente ambiente);
90

91
    public abstract String getMDFeRecepcaoEvento(final DFAmbiente ambiente);
92

93
    public abstract String getMDFeStatusServico(final DFAmbiente ambiente);
94

95
    public abstract String getMDFeConsulta(final DFAmbiente ambiente);
96

97
    public abstract String getMDFeConsNaoEnc(final DFAmbiente ambiente);
98
    
99
    public abstract String getMDFeDistribuicao(final DFAmbiente ambiente);
100

101
    public abstract DFUnidadeFederativa[] getUFs();
102

103
    /**
104
     * Retorna url do Estado ou o padrão (RS)
105
     * Se no futuro surgir novas URL'S para determinado Estado
106
     *  só implementar o enum correspondente.
107
     * @param uf
108
     * @return
109
     */
110
    public static MDFAutorizador3 valueOfCodigoUF(final DFUnidadeFederativa uf) {
UNCOV
111
        for (final MDFAutorizador3 autorizador : MDFAutorizador3.values()) {
×
UNCOV
112
            if (Arrays.asList(autorizador.getUFs()).contains(uf)) {
×
UNCOV
113
                return autorizador;
×
114
            }
115
        }
UNCOV
116
        return RS;
×
117
//        throw new IllegalStateException(String.format("N\u00e3o existe autorizador para a UF %s", uf.getCodigo()));
118
    }
119

120
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc