sei 0.1.1 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e6d4981449630389fb3244b7a82e62fdd7464b6c
4
- data.tar.gz: 66d39be097b455eaff3520995c7b9984853f8f68
3
+ metadata.gz: 3ed95cd9a70fe0d7934677c4beb031f77d35ff8e
4
+ data.tar.gz: fcc8765b2b55ac206aa279a34f2b0018ad40acd4
5
5
  SHA512:
6
- metadata.gz: 0f30897b8ad946b8bdeade93d6026a1ec896893f67d3b9de3eb1154ec71a42c2b9bf53bfc57d48e48e9edafc448e520f9804e5ee11b8505de2ab096d217cb402
7
- data.tar.gz: c97bd07f7181fbb2825e56783767ee0ccd5a26b854a7bf7f5a9cc508c079b397b25a79e15cfc471b41ccd8eea4e2b5165c8ae986069c975f7f1fa2ab7fe22fd8
6
+ metadata.gz: 4a0ec22fcf6d595ad5619312cfd5dd44c940a3b709ad916b61c671e6f01341fe67c6c94f045073b59f6d3e302a3cd79ad442f1bbc2ec42bec72d62d5dfc4deda
7
+ data.tar.gz: 51e35c5402899fc822824e3dd137aefbadfd6263b0bb297c48d84212e12685eb25b03b49156eb563aa664f59ed4a022e0600fb22cfa76a2e09bbdf173c232478
Binary file
data/.gitignore CHANGED
@@ -7,3 +7,5 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /test/config.yml
11
+ /sei*.gem
data/README.md CHANGED
@@ -1,6 +1,26 @@
1
1
  # SEI!
2
2
 
3
- Esta gem facilita o acesso ao webservice do SEI!. Ela possui a implementação dos métodos gerar_procedimento e incluir_documento. O retorno do webservice é automaticamente associado às classes de retorno que possuem os atributos retornados por cada serviço. Estes atributos são acessados através de assessores da classe.
3
+ Esta gem facilita o acesso ao webservice do SEI!. Ela possui a implementação dos métodos:
4
+
5
+ * atribuir_processo
6
+ * cancelar_documento
7
+ * concluir_processo
8
+ * consultar_documento
9
+ * consultar_procedimento
10
+ * disponibilizar_bloco
11
+ * excluir_bloco
12
+ * gerar_bloco
13
+ * gerar_procedimento
14
+ * incluir_documento
15
+ * incluir_documento_bloco
16
+ * incluir_processo_bloco
17
+ * listar_unidades
18
+ * listar_usuarios
19
+ * reabrir_processo
20
+ * retirar_documento_bloco
21
+ * retirar_processo_bloco
22
+
23
+ O retorno do webservice é automaticamente associado às classes de retorno que possuem os atributos retornados por cada serviço. Estes atributos são acessados através de assessores da classe.
4
24
 
5
25
  ## Instalação
6
26
 
@@ -25,7 +45,6 @@ A classe test/sei_test.rb possui casos de teste que podem ser utilizados como ex
25
45
  Antes de chamar os métodos dos serviços, é necessário configurar a gem através do comando:
26
46
 
27
47
  ```ruby
28
-
29
48
  Sei.configure do |config|
30
49
  config.wsdl = ENV['SEI_CONFIG_WSDL']
31
50
  config.follow_redirects = true
@@ -33,20 +52,22 @@ Sei.configure do |config|
33
52
  config.sigla = ENV['SEI_CONFIG_SIGLA']
34
53
  config.identificacao = ENV['SEI_CONFIG_IDENTIFICACAO']
35
54
  end
36
-
37
55
  ```
38
56
  onde
39
57
 
40
58
  config.wsdl é o endereço do WSDL do SEI, por exemplo http[s]://[servidor php]/sei/controlador_ws.php?servico=sei';
59
+
41
60
  config.follow_redirects indica para a biblioteca 'savon' que ela deve seguir as respostas 'redirect' devolvidas pelo servidor;
61
+
42
62
  config.pretty_print_xml indica para a biblioteca 'savon' que as mensagens XML geradas devem ser impressas no console de forma formatada;
63
+
43
64
  config.sigla é a sigla do sistema configurada no SEI, através do menu administração -> sistemas;
65
+
44
66
  config.identificacao é a identificação do serviço configurado no SEI, através do menu administração -> sistemas;
45
67
 
46
68
  Exemplo:
47
69
 
48
70
  ```ruby
49
-
50
71
  procedimento = Sei::Estruturas::Procedimento.new
51
72
  .id_tipo_procedimento(id_tipo_procedimento)
52
73
  .especificacao(especificacao)
@@ -68,7 +89,6 @@ retorno_geracao_procedimento = Sei::Servico.gerar_procedimento(
68
89
  dias_uteis_retorno_programado)
69
90
 
70
91
  puts retorno_geracao_procedimento.id_procedimento
71
-
72
92
  ```
73
93
 
74
94
  ## Desenvolvimento
@@ -85,5 +105,4 @@ Indicação de bugs e pull requests são bem-vindos no GitHub (https://github.co
85
105
 
86
106
  Esta gem está disponível como código aberto dentro dos termos da [MIT License](http://opensource.org/licenses/MIT).
87
107
 
88
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
89
-
108
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/lib/sei.rb CHANGED
@@ -13,6 +13,17 @@ require 'sei/estruturas/documento'
13
13
  require 'sei/estruturas/procedimento'
14
14
  require 'sei/estruturas/retorno_inclusao_documento'
15
15
  require 'sei/estruturas/retorno_geracao_procedimento'
16
+ require 'sei/estruturas/retorno_unidade'
17
+ require 'sei/estruturas/retorno_list_unidades'
18
+ require 'sei/estruturas/retorno_geracao_bloco'
19
+ require 'sei/estruturas/retorno_inclusao_documento_bloco'
20
+ require 'sei/estruturas/retorno_inclusao_processo_bloco'
21
+ require 'sei/estruturas/retorno_conclusao_processo'
22
+ require 'sei/estruturas/retorno_boolean'
23
+ require 'sei/estruturas/retorno_usuario'
24
+ require 'sei/estruturas/retorno_list_usuarios'
25
+ require 'sei/estruturas/retorno_consultar_procedimento'
26
+ require 'sei/estruturas/retorno_consultar_documento'
16
27
 
17
28
  module Sei
18
29
 
@@ -0,0 +1,46 @@
1
+ module Sei
2
+
3
+ module Estruturas
4
+
5
+ class DocumentoBloco
6
+
7
+ def id_unidade(id_unidade)
8
+ @tipo = id_unidade
9
+ self
10
+ end
11
+
12
+ def id_bloco(id_bloco)
13
+ @id_bloco = id_bloco
14
+ self
15
+ end
16
+
17
+ def protocolo_documento(protocolo_documento)
18
+ @protocolo_documento = protocolo_documento
19
+ self
20
+ end
21
+
22
+
23
+ def to_h
24
+ {
25
+ tipo: @tipo,
26
+ id_procedimento: @id_procedimento,
27
+ id_serie: @id_serie,
28
+ numero: @numero,
29
+ data: @data,
30
+ descricao: @descricao,
31
+ remetente: @remetente,
32
+ interessados: @interessados.nil? ? {} : @interessados,
33
+ destinatarios: @destinatarios.nil? ? {} : @destinatarios,
34
+ observacao: @observacao,
35
+ nome_arquivo: @nome_arquivo,
36
+ conteudo: @conteudo,
37
+ conteudo_mtom: @conteudo_mtom,
38
+ nivel_de_acesso: @nivel_de_acesso
39
+ }
40
+ end
41
+
42
+ end
43
+
44
+ end
45
+
46
+ end
@@ -0,0 +1,17 @@
1
+ module Sei
2
+
3
+ module Estruturas
4
+
5
+ class RetornoBoolean < ::Valuable
6
+
7
+ has_value :status
8
+
9
+ def initialize(params)
10
+ self.status = params
11
+ initialize_attributes
12
+ end
13
+ end
14
+
15
+ end
16
+
17
+ end
@@ -0,0 +1,17 @@
1
+ module Sei
2
+
3
+ module Estruturas
4
+
5
+ class RetornoConclusaoProcesso < ::Valuable
6
+
7
+ has_value :status
8
+
9
+ def initialize(params)
10
+ self.status = params
11
+ initialize_attributes
12
+ end
13
+ end
14
+
15
+ end
16
+
17
+ end
@@ -0,0 +1,40 @@
1
+ module Sei
2
+
3
+ module Estruturas
4
+
5
+ class RetornoConsultarDocumento < ::Valuable
6
+
7
+ has_value :id_procedimento
8
+ has_value :procedimento_formatado
9
+ has_value :id_documento
10
+ has_value :documento_formatado
11
+ has_value :link_acesso
12
+ has_value :serie
13
+ has_value :numero
14
+ has_value :data
15
+ has_value :unidade_elaboradora
16
+ has_value :andamento_geracao
17
+ has_value :assinaturas
18
+ has_value :publicacao
19
+
20
+ def initialize(params)
21
+ self.id_procedimento = params[:id_procedimento]
22
+ self.procedimento_formatado = params[:procedimento_formatado]
23
+ self.id_documento = params[:id_documento]
24
+ self.documento_formatado = params[:documento_formatado]
25
+ self.link_acesso = params[:link_acesso]
26
+ self.serie = params[:serie]
27
+ self.numero = params[:numero]
28
+ self.data = params[:data]
29
+ self.unidade_elaboradora = params[:unidade_elaboradora]
30
+ self.andamento_geracao = params[:andamento_geracao]
31
+ self.assinaturas = params[:assinaturas]
32
+ self.publicacao = params[:publicacao]
33
+ initialize_attributes
34
+ end
35
+
36
+ end
37
+
38
+ end
39
+
40
+ end
@@ -0,0 +1,28 @@
1
+ module Sei
2
+
3
+ module Estruturas
4
+
5
+ class RetornoConsultarProcedimento < ::Valuable
6
+
7
+ has_value :id_procedimento
8
+ has_value :procedimento_formatado
9
+ has_value :especificacao
10
+ has_value :data_autuacao
11
+ has_value :link_acesso
12
+ has_value :tipo_procedimento
13
+
14
+ def initialize(params)
15
+ self.id_procedimento = params[:id_procedimento]
16
+ self.procedimento_formatado = params[:procedimento_formatado]
17
+ self.especificacao = params[:especificacao]
18
+ self.data_autuacao = params[:data_autuacao]
19
+ self.link_acesso = params[:link_acesso]
20
+ self.tipo_procedimento = params[:tipo_procedimento]
21
+ initialize_attributes
22
+ end
23
+
24
+ end
25
+
26
+ end
27
+
28
+ end
@@ -0,0 +1,18 @@
1
+ module Sei
2
+
3
+ module Estruturas
4
+
5
+ class RetornoGeracaoBloco < ::Valuable
6
+
7
+ has_value :bloco_gerado
8
+
9
+ def initialize(params)
10
+ self.bloco_gerado = params
11
+ initialize_attributes
12
+ end
13
+
14
+ end
15
+
16
+ end
17
+
18
+ end
@@ -0,0 +1,17 @@
1
+ module Sei
2
+
3
+ module Estruturas
4
+
5
+ class RetornoInclusaoDocumentoBloco < ::Valuable
6
+
7
+ has_value :status
8
+
9
+ def initialize(params)
10
+ self.status = params
11
+ initialize_attributes
12
+ end
13
+ end
14
+
15
+ end
16
+
17
+ end
@@ -0,0 +1,17 @@
1
+ module Sei
2
+
3
+ module Estruturas
4
+
5
+ class RetornoInclusaoProcessoBloco < ::Valuable
6
+
7
+ has_value :status
8
+
9
+ def initialize(params)
10
+ self.status = params
11
+ initialize_attributes
12
+ end
13
+ end
14
+
15
+ end
16
+
17
+ end
@@ -0,0 +1,31 @@
1
+ module Sei
2
+
3
+ module Estruturas
4
+
5
+ class RetornoListUnidades < ::Valuable
6
+
7
+ has_collection :retorno_list_unidades, klass: RetornoUnidade
8
+
9
+ def initialize(params)
10
+
11
+ self.retorno_list_unidades = []
12
+ item = params[:item]
13
+ if item.is_a?(Hash)
14
+ self.retorno_list_unidades << Sei::Estruturas::RetornoUnidade.new(item)
15
+ elsif item.is_a?(Array)
16
+ item.each do |retorno_lista_unidades|
17
+ self.retorno_list_unidades << Sei::Estruturas::RetornoUnidade.new(retorno_lista_unidades)
18
+ end
19
+
20
+ end
21
+
22
+ initialize_attributes
23
+ end
24
+ def teste(params)
25
+ debugger
26
+ end
27
+ end
28
+
29
+ end
30
+
31
+ end
@@ -0,0 +1,26 @@
1
+ module Sei
2
+
3
+ module Estruturas
4
+
5
+ class RetornoListUsuarios < ::Valuable
6
+
7
+ has_collection :retorno_list_usuarios, klass: RetornoUsuario
8
+
9
+ def initialize(params)
10
+ self.retorno_list_usuarios = []
11
+ item = params[:item]
12
+ if item.is_a?(Hash)
13
+ self.retorno_list_usuarios << Sei::Estruturas::RetornoUsuario.new(item)
14
+ elsif item.is_a?(Array)
15
+ item.each do |retorno_lista_unidades|
16
+ self.retorno_list_usuarios << Sei::Estruturas::RetornoUsuario.new(retorno_lista_unidades)
17
+ end
18
+ end
19
+ initialize_attributes
20
+ end
21
+
22
+ end
23
+
24
+ end
25
+
26
+ end
@@ -0,0 +1,22 @@
1
+ module Sei
2
+
3
+ module Estruturas
4
+
5
+ class RetornoUnidade < ::Valuable
6
+
7
+ has_value :id_unidade
8
+ has_value :sigla
9
+ has_value :descricao
10
+
11
+ def initialize(params)
12
+ self.id_unidade = params[:id_unidade]
13
+ self.sigla = params[:sigla]
14
+ self.descricao = params[:descricao]
15
+
16
+ initialize_attributes
17
+ end
18
+ end
19
+
20
+ end
21
+
22
+ end
@@ -0,0 +1,22 @@
1
+ module Sei
2
+
3
+ module Estruturas
4
+
5
+ class RetornoUsuario < ::Valuable
6
+
7
+ has_value :idUsuario
8
+ has_value :sigla
9
+ has_value :nome
10
+
11
+ def initialize(params)
12
+ self.idUsuario = params[:id_usuario]
13
+ self.sigla = params[:sigla]
14
+ self.nome = params[:nome]
15
+ initialize_attributes
16
+ end
17
+
18
+ end
19
+
20
+ end
21
+
22
+ end
@@ -35,6 +35,213 @@ module Sei
35
35
  Sei::Estruturas::RetornoInclusaoDocumento.new body
36
36
  end
37
37
 
38
+
39
+ def self.incluir_documento_bloco(id_unidade,id_bloco,protocolo_documento)
40
+ message = {
41
+ SiglaSistema: Sei.configuration.sigla,
42
+ IdentificacaoServico: Sei.configuration.identificacao,
43
+ IdUnidade: id_unidade,
44
+ IdBloco: id_bloco,
45
+ ProtocoloDocumento: protocolo_documento
46
+ }
47
+
48
+ response = Sei::Connection.instance.call :incluir_documento_bloco, message: message
49
+ body = response.body[:incluir_documento_bloco_response][:parametros]
50
+ Sei::Estruturas::RetornoInclusaoDocumentoBloco.new body
51
+ end
52
+
53
+ def self.incluir_processo_bloco(id_unidade,id_bloco,protocolo_procedimento)
54
+ message = {
55
+ SiglaSistema: Sei.configuration.sigla,
56
+ IdentificacaoServico: Sei.configuration.identificacao,
57
+ IdUnidade: id_unidade,
58
+ IdBloco: id_bloco,
59
+ ProtocoloProcedimento: protocolo_procedimento
60
+ }
61
+
62
+ response = Sei::Connection.instance.call :incluir_processo_bloco, message: message
63
+ body = response.body[:incluir_processo_bloco_response][:parametros]
64
+ Sei::Estruturas::RetornoInclusaoProcessoBloco.new body
65
+ end
66
+
67
+ def self.concluir_processo(id_unidade,protocolo_procedimento)
68
+ message = {
69
+ SiglaSistema: Sei.configuration.sigla,
70
+ IdentificacaoServico: Sei.configuration.identificacao,
71
+ IdUnidade: id_unidade,
72
+ ProtocoloProcedimento: protocolo_procedimento
73
+ }
74
+
75
+ response = Sei::Connection.instance.call :concluir_processo, message: message
76
+ body = response.body[:concluir_processo_response][:parametros]
77
+ Sei::Estruturas::RetornoConclusaoProcesso.new body
78
+
79
+ end
80
+
81
+ def self.reabrir_processo(id_unidade,protocolo_procedimento)
82
+ message = {
83
+ SiglaSistema: Sei.configuration.sigla,
84
+ IdentificacaoServico: Sei.configuration.identificacao,
85
+ IdUnidade: id_unidade,
86
+ ProtocoloProcedimento: protocolo_procedimento
87
+ }
88
+
89
+ response = Sei::Connection.instance.call :reabrir_processo, message: message
90
+ body = response.body[:reabrir_processo_response][:parametros]
91
+ Sei::Estruturas::RetornoBoolean.new body
92
+
93
+ end
94
+
95
+ def self.retirar_processo_bloco(id_unidade, id_bloco, protocolo_procedimento)
96
+ message = {
97
+ SiglaSistema: Sei.configuration.sigla,
98
+ IdentificacaoServico: Sei.configuration.identificacao,
99
+ IdUnidade: id_unidade,
100
+ IdBloco: id_bloco,
101
+ ProtocoloProcedimento: protocolo_procedimento
102
+ }
103
+
104
+ response = Sei::Connection.instance.call :retirar_processo_bloco, message: message
105
+ body = response.body[:retirar_processo_bloco_response][:parametros]
106
+ Sei::Estruturas::RetornoBoolean.new body
107
+ end
108
+
109
+ def self.atribuir_processo(id_unidade, protocolo_procedimento, id_usuario, sin_reabrir = 'N')
110
+ message = {
111
+ SiglaSistema: Sei.configuration.sigla,
112
+ IdentificacaoServico: Sei.configuration.identificacao,
113
+ IdUnidade: id_unidade,
114
+ ProtocoloProcedimento: protocolo_procedimento,
115
+ IdUsuario: id_usuario,
116
+ SinReabrir: sin_reabrir
117
+ }
118
+ response = Sei::Connection.instance.call :atribuir_processo, message: message
119
+ body = response.body[:atribuir_processo_response][:parametros]
120
+ Sei::Estruturas::RetornoBoolean.new body
121
+ end
122
+
123
+ def self.retirar_documento_bloco(id_unidade, id_bloco, protocolo_documento)
124
+ message = {
125
+ SiglaSistema: Sei.configuration.sigla,
126
+ IdentificacaoServico: Sei.configuration.identificacao,
127
+ IdUnidade: id_unidade,
128
+ IdBloco: id_bloco,
129
+ ProtocoloDocumento: protocolo_documento
130
+ }
131
+ response = Sei::Connection.instance.call :retirar_documento_bloco, message: message
132
+ body = response.body[:retirar_documento_bloco_response][:parametros]
133
+ Sei::Estruturas::RetornoBoolean.new body
134
+ end
135
+
136
+ def self.disponibilizar_bloco(id_unidade, id_bloco)
137
+ message = {
138
+ SiglaSistema: Sei.configuration.sigla,
139
+ IdentificacaoServico: Sei.configuration.identificacao,
140
+ IdUnidade: id_unidade,
141
+ IdBloco: id_bloco
142
+ }
143
+
144
+ response = Sei::Connection.instance.call :disponibilizar_bloco, message: message
145
+ body = response.body[:disponibilizar_bloco_response][:parametros]
146
+ Sei::Estruturas::RetornoBoolean.new body
147
+ end
148
+
149
+ def self.excluir_bloco(id_unidade, id_bloco)
150
+ message = {
151
+ SiglaSistema: Sei.configuration.sigla,
152
+ IdentificacaoServico: Sei.configuration.identificacao,
153
+ IdUnidade: id_unidade,
154
+ IdBloco: id_bloco
155
+ }
156
+ response = Sei::Connection.instance.call :excluir_bloco, message: message
157
+ body = response.body[:excluir_bloco_response][:parametros]
158
+ Sei::Estruturas::RetornoBoolean.new body
159
+ end
160
+
161
+ def self.cancelar_documento(id_unidade, protocolo_documento, motivo)
162
+ message = {
163
+ SiglaSistema: Sei.configuration.sigla,
164
+ IdentificacaoServico: Sei.configuration.identificacao,
165
+ IdUnidade: id_unidade,
166
+ ProtocoloDocumento: protocolo_documento,
167
+ Motivo: motivo
168
+ }
169
+ response = Sei::Connection.instance.call :cancelar_documento, message: message
170
+ body = response.body[:cancelar_documento_response][:parametros]
171
+ Sei::Estruturas::RetornoBoolean.new body
172
+ end
173
+
174
+ def self.listar_usuarios(id_unidade, id_usuario = nil)
175
+ message = {
176
+ SiglaSistema: Sei.configuration.sigla,
177
+ IdentificacaoServico: Sei.configuration.identificacao,
178
+ IdUnidade: id_unidade,
179
+ IdUsuario: id_usuario
180
+ }
181
+ response = Sei::Connection.instance.call :listar_usuarios, message: message
182
+ body = response.body[:listar_usuarios_response][:parametros]
183
+ Sei::Estruturas::RetornoListUsuarios.new body
184
+ end
185
+
186
+ def self.consultar_procedimento(id_unidade, protocolo_procedimento, sin_retornar_assuntos = 'N', sin_retornar_interessados = 'N', sin_retornar_observacoes = 'N', sin_retornar_andamento_geracao = 'N', sin_retornar_andamento_conclusao = 'N')
187
+ message = {
188
+ SiglaSistema: Sei.configuration.sigla,
189
+ IdentificacaoServico: Sei.configuration.identificacao,
190
+ IdUnidade: id_unidade,
191
+ ProtocoloProcedimento: protocolo_procedimento,
192
+ SinRetornarAssuntos: sin_retornar_assuntos,
193
+ SinRetornarInteressados: sin_retornar_interessados,
194
+ SinRetornarObservacoes: sin_retornar_observacoes,
195
+ SinRetornarAndamentoGeracao: sin_retornar_andamento_geracao,
196
+ SinRetornarAndamentoConclusao: sin_retornar_andamento_conclusao
197
+ }
198
+ response = Sei::Connection.instance.call :consultar_procedimento, message: message
199
+ body = response.body[:consultar_procedimento_response][:parametros]
200
+ Sei::Estruturas::RetornoConsultarProcedimento.new body
201
+ end
202
+
203
+ def self.listar_unidades(id_tipo_procedimento = nil,id_serie = nil)
204
+ message = {
205
+ SiglaSistema: Sei.configuration.sigla,
206
+ IdentificacaoServico: Sei.configuration.identificacao,
207
+ IdTipoProcedimento: id_tipo_procedimento,
208
+ IdSerie: id_serie
209
+ }
210
+ response = Sei::Connection.instance.call :listar_unidades, message: message
211
+ body = response.body[:listar_unidades_response][:parametros]
212
+ Sei::Estruturas::RetornoListUnidades.new body
213
+ end
214
+
215
+ def self.gerar_bloco(id_unidade, tipo, descricao,unidades_disponibilizacao = [], documentos = [], sin_disponibilizar = 'N')
216
+ message = {
217
+ SiglaSistema: Sei.configuration.sigla,
218
+ IdentificacaoServico: Sei.configuration.identificacao,
219
+ IdUnidade: id_unidade,
220
+ Tipo: tipo,
221
+ Descricao: descricao,
222
+ UnidadesDisponibilizacao: unidades_disponibilizacao,
223
+ SinDisponibilizar: sin_disponibilizar
224
+ }
225
+ response = Sei::Connection.instance.call :gerar_bloco, message: message
226
+ body = response.body[:gerar_bloco_response][:parametros]
227
+ Sei::Estruturas::RetornoGeracaoBloco.new body
228
+ end
229
+
230
+ def self.consultar_documento(id_unidade, protocolo_documento, sin_retornar_andamento_geracao = 'N', sin_retornar_assinaturas = 'N', sin_retornar_publicacao = 'N')
231
+ message = {
232
+ SiglaSistema: Sei.configuration.sigla,
233
+ IdentificacaoServico: Sei.configuration.identificacao,
234
+ IdUnidade: id_unidade,
235
+ ProtocoloDocumento: protocolo_documento,
236
+ SinRetornarAndamentoGeracao: sin_retornar_andamento_geracao,
237
+ SinRetornarAssinaturas: sin_retornar_assinaturas,
238
+ SinRetornarPublicacao: sin_retornar_publicacao
239
+ }
240
+ response = Sei::Connection.instance.call :consultar_documento, message: message
241
+ body = response.body[:consultar_documento_response][:parametros]
242
+ Sei::Estruturas::RetornoConsultarDocumento.new body
243
+ end
244
+
38
245
  end
39
246
 
40
247
  end
@@ -1,3 +1,3 @@
1
1
  module Sei
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = "Integração com a API do SEI."
13
13
  spec.description = "Expõe, através de métodos ruby, as funcionalidades da API do SEI."
14
- spec.homepage = "https://github.com"
14
+ spec.homepage = "https://github.com/tellesleandro/sei"
15
15
  spec.license = "MIT"
16
16
 
17
17
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
@@ -33,8 +33,9 @@ Gem::Specification.new do |spec|
33
33
  spec.add_development_dependency "bundler", "~> 1.13"
34
34
  spec.add_development_dependency "rake", "~> 10.0"
35
35
  spec.add_development_dependency "minitest", "~> 5.0"
36
- spec.add_development_dependency 'gem_config'
37
- spec.add_development_dependency 'savon'
38
- spec.add_development_dependency 'valuable'
36
+
37
+ spec.add_runtime_dependency 'gem_config', '~> 0'
38
+ spec.add_runtime_dependency 'savon', '~> 0'
39
+ spec.add_runtime_dependency 'valuable', '~> 0'
39
40
 
40
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sei
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Telles
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-12 00:00:00.000000000 Z
11
+ date: 2018-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -56,42 +56,42 @@ dependencies:
56
56
  name: gem_config
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
- type: :development
62
+ type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: savon
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
- type: :development
76
+ type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: valuable
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
- type: :development
90
+ type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  description: Expõe, através de métodos ruby, as funcionalidades da API do SEI.
@@ -101,6 +101,7 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
+ - ".DS_Store"
104
105
  - ".gitignore"
105
106
  - ".ruby-gemset"
106
107
  - ".ruby-version"
@@ -115,14 +116,26 @@ files:
115
116
  - lib/sei.rb
116
117
  - lib/sei/connection.rb
117
118
  - lib/sei/estruturas/documento.rb
119
+ - lib/sei/estruturas/documento_bloco.rb
118
120
  - lib/sei/estruturas/procedimento.rb
121
+ - lib/sei/estruturas/retorno_boolean.rb
122
+ - lib/sei/estruturas/retorno_conclusao_processo.rb
123
+ - lib/sei/estruturas/retorno_consultar_documento.rb
124
+ - lib/sei/estruturas/retorno_consultar_procedimento.rb
125
+ - lib/sei/estruturas/retorno_geracao_bloco.rb
119
126
  - lib/sei/estruturas/retorno_geracao_procedimento.rb
120
127
  - lib/sei/estruturas/retorno_inclusao_documento.rb
128
+ - lib/sei/estruturas/retorno_inclusao_documento_bloco.rb
129
+ - lib/sei/estruturas/retorno_inclusao_processo_bloco.rb
130
+ - lib/sei/estruturas/retorno_list_unidades.rb
131
+ - lib/sei/estruturas/retorno_list_usuarios.rb
132
+ - lib/sei/estruturas/retorno_unidade.rb
133
+ - lib/sei/estruturas/retorno_usuario.rb
121
134
  - lib/sei/printer.rb
122
135
  - lib/sei/servico.rb
123
136
  - lib/sei/version.rb
124
137
  - sei.gemspec
125
- homepage: https://github.com
138
+ homepage: https://github.com/tellesleandro/sei
126
139
  licenses:
127
140
  - MIT
128
141
  metadata:
@@ -143,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
156
  version: '0'
144
157
  requirements: []
145
158
  rubyforge_project:
146
- rubygems_version: 2.5.1
159
+ rubygems_version: 2.6.12
147
160
  signing_key:
148
161
  specification_version: 4
149
162
  summary: Integração com a API do SEI.