rnfse 0.0.2 → 0.0.3
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/rnfse.rb +1 -0
- data/lib/rnfse/api/abrasf_1_0.rb +43 -20
- data/lib/rnfse/api/abrasf_1_0/consultar_lote_rps.json +13 -0
- data/lib/rnfse/api/abrasf_1_0/consultar_situacao_lote_rps.json +13 -0
- data/lib/rnfse/api/abrasf_1_0/definitions.json +22 -7
- data/lib/rnfse/api/iss_net_1_0.rb +12 -0
- data/lib/rnfse/call_chain.rb +22 -0
- data/lib/rnfse/version.rb +1 -1
- data/lib/rnfse/xml_builder/abrasf_1_0.rb +51 -12
- data/lib/rnfse/xml_builder/iss_net_1_0.rb +31 -4
- data/spec/api/iss_net_1_0_spec.rb +51 -3
- data/spec/fixtures/abrasf_1_0/consultar_lote_rps_envio.xml +10 -0
- data/spec/fixtures/abrasf_1_0/consultar_situacao_lote_rps_envio.xml +10 -0
- data/spec/fixtures/abrasf_1_0/teste.xml +8 -0
- data/spec/fixtures/iss_net_1_0/consultar_lote_rps_envio.xml +13 -0
- data/spec/fixtures/iss_net_1_0/consultar_situacao_lote_rps_envio.xml +12 -0
- data/spec/fixtures/vcr_cassettes/iss_net_1_0_consultar_lote_rps.yml +85 -0
- data/spec/fixtures/vcr_cassettes/iss_net_1_0_consultar_situacao_lote_rps.yml +62 -0
- data/spec/fixtures/vcr_cassettes/iss_net_1_0_recepcionar_lote_rps.yml +19 -42
- data/spec/xml_builder/abrasf_1_0_spec.rb +43 -6
- data/spec/xml_builder/iss_net_1_0_spec.rb +44 -6
- metadata +19 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57bacd30d14f244a516b1450692d899e4a6c9405
|
4
|
+
data.tar.gz: fbc533a265e6f06a51a307b1f209ee0910e183c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59501202f33fc9ebc1be6caef1d394dad00cab1ca6dbaf7dc2206aabf7cf884593152d060bce7ba677aa1f8f3f847b36f27e5d689e28bc9e478054ea3e664e73
|
7
|
+
data.tar.gz: adcbf584b8962aec828bc70784bc41709a020aa554b13b31b07ddc25917e60c0cf69669c9014cd726bcd91211e17c00a8fbfb32263993d5990c92170a4e45e89
|
data/CHANGELOG.md
CHANGED
data/lib/rnfse.rb
CHANGED
data/lib/rnfse/api/abrasf_1_0.rb
CHANGED
@@ -6,32 +6,55 @@ module Rnfse::API::Abrasf10
|
|
6
6
|
module ClassMethods
|
7
7
|
|
8
8
|
def recepcionar_lote_rps(hash = {})
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
9
|
+
validate(hash)
|
10
|
+
xml = xml_builder.build_recepcionar_lote_rps_xml(hash)
|
11
|
+
xml.sign!(certificate: File.read(self.certificate), key: File.read(self.key))
|
12
|
+
response = self.soap_client.call(
|
13
|
+
:recepcionar_lote_rps,
|
14
|
+
soap_action: 'RecepcionarLoteRps',
|
15
|
+
message_tag: 'RecepcionarLoteRps',
|
16
|
+
message: { :'xml!' => "<![CDATA[#{xml}]]>" })
|
17
|
+
parse_response(response)
|
18
|
+
end
|
19
|
+
|
20
|
+
def consultar_lote_rps(hash = {})
|
21
|
+
validate(hash)
|
22
|
+
xml = xml_builder.build_consultar_lote_rps_xml(hash)
|
23
|
+
response = self.soap_client.call(
|
24
|
+
:consultar_lote_rps,
|
25
|
+
soap_action: 'ConsultarLoteRps',
|
26
|
+
message_tag: 'ConsultarLoteRps',
|
27
|
+
message: { :'xml!' => "<![CDATA[#{xml}]]>" })
|
28
|
+
parse_response(response)
|
29
|
+
end
|
30
|
+
|
31
|
+
def consultar_situacao_lote_rps(hash = {})
|
32
|
+
validate(hash)
|
33
|
+
xml = xml_builder.build_consultar_situacao_lote_rps_xml(hash)
|
34
|
+
response = self.soap_client.call(
|
35
|
+
:consultar_situacao_lote_rps,
|
36
|
+
soap_action: 'ConsultarSituacaoLoteRps',
|
37
|
+
message_tag: 'ConsultarSituacaoLoteRps',
|
38
|
+
message: { :'xml!' => "<![CDATA[#{xml}]]>" })
|
39
|
+
parse_response(response)
|
24
40
|
end
|
25
41
|
|
26
42
|
private
|
27
43
|
|
44
|
+
def validate(hash)
|
45
|
+
file = get_filepath("#{Rnfse::CallChain.caller_method}.json")
|
46
|
+
json = Rnfse::Hash.camelize_and_symbolize_keys(hash, false).to_json
|
47
|
+
errors = JSON::Validator.fully_validate(file, json)
|
48
|
+
raise ArgumentError, errors, caller unless errors.empty?
|
49
|
+
end
|
50
|
+
|
28
51
|
def parse_response(response)
|
29
52
|
hash = Rnfse::Hash.new(response.body)
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
hash[
|
34
|
-
|
53
|
+
response_key = hash.keys.select { |k| k =~ /response$/ }.first
|
54
|
+
result_key = hash[response_key].keys.select { |k| k =~ /result$/ }.first
|
55
|
+
if !hash[response_key].nil? and hash[response_key]
|
56
|
+
xml = hash[response_key][result_key]
|
57
|
+
hash[response_key][result_key] = Nori.new.parse(xml)
|
35
58
|
end
|
36
59
|
hash.underscore_and_symbolize_keys
|
37
60
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
+
"title": "Consulta de Lote de RPS",
|
4
|
+
"description": "Esse serviço permite ao contribuinte obter as NFS-e que foram geradas a partir do Lote de RPS enviado, quando o processamento ocorrer sem problemas; ou obter a lista de erros e/ou inconsistências encontradas nos RPS. Na validação do lote, devem ser retornados todos os erros verificados. Excepcionalmente, havendo uma excessiva quantidade de erros, poderá ser definido um limitador para a quantidade de erros retornados.",
|
5
|
+
|
6
|
+
"type": "object",
|
7
|
+
"properties": {
|
8
|
+
"prestador": { "$ref": "definitions.json#/identificacaoPrestador"},
|
9
|
+
"protocolo": { "$ref": "definitions.json#/numeroProtocolo"}
|
10
|
+
},
|
11
|
+
"required": ["prestador", "protocolo"],
|
12
|
+
"additionalProperties": false
|
13
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
+
"title": "Consulta de Situação de Lote de RPS",
|
4
|
+
"description": "Esse serviço efetua a consulta da situação de um lote de RPS já enviado.",
|
5
|
+
|
6
|
+
"type": "object",
|
7
|
+
"properties": {
|
8
|
+
"prestador": { "$ref": "definitions.json#/identificacaoPrestador"},
|
9
|
+
"protocolo": { "$ref": "definitions.json#/numeroProtocolo"}
|
10
|
+
},
|
11
|
+
"required": ["prestador", "protocolo"],
|
12
|
+
"additionalProperties": false
|
13
|
+
}
|
@@ -192,6 +192,7 @@
|
|
192
192
|
},
|
193
193
|
"numeroProtocolo": {
|
194
194
|
"description": "Número do protocolo de recebimento do RPS",
|
195
|
+
"type": "string",
|
195
196
|
"maxLength": 50
|
196
197
|
},
|
197
198
|
"situacaoLoteRps": {
|
@@ -275,13 +276,26 @@
|
|
275
276
|
},
|
276
277
|
"identificacaoPrestador": {
|
277
278
|
"description": "Representa dados para identificação do prestador de serviço",
|
278
|
-
"
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
279
|
+
"oneOf": [
|
280
|
+
{
|
281
|
+
"type": "object",
|
282
|
+
"properties": {
|
283
|
+
"inscricaoMunicipal": { "$ref": "#/inscricaoMunicipal" },
|
284
|
+
"cnpj": { "$ref": "#/cnpj" }
|
285
|
+
},
|
286
|
+
"required": ["cnpj"],
|
287
|
+
"additionalProperties": false
|
288
|
+
},
|
289
|
+
{
|
290
|
+
"type": "object",
|
291
|
+
"properties": {
|
292
|
+
"inscricaoMunicipal": { "$ref": "#/inscricaoMunicipal" },
|
293
|
+
"cpf": { "$ref": "#/cpf" }
|
294
|
+
},
|
295
|
+
"required": ["cpf"],
|
296
|
+
"additionalProperties": false
|
297
|
+
}
|
298
|
+
]
|
285
299
|
},
|
286
300
|
"dadosTomador": {
|
287
301
|
"description": "Representa dados do tomador de serviço",
|
@@ -364,6 +378,7 @@
|
|
364
378
|
},
|
365
379
|
"dadosConstrucaoCivil": {
|
366
380
|
"description": "Representa dados para identificação de intermediário do serviço",
|
381
|
+
"type": "object",
|
367
382
|
"properties": {
|
368
383
|
"codigoObra": { "$ref": "#/codigoObra" },
|
369
384
|
"art": { "$ref": "#/art" }
|
@@ -3,4 +3,16 @@ require 'json-schema'
|
|
3
3
|
|
4
4
|
module Rnfse::API::IssNet10
|
5
5
|
include Rnfse::API::Abrasf10
|
6
|
+
|
7
|
+
def consultar_situacao_lote_rps(hash = {})
|
8
|
+
validate(hash)
|
9
|
+
xml = xml_builder.build_consultar_situacao_lote_rps_xml(hash)
|
10
|
+
response = self.soap_client.call(
|
11
|
+
:consultar_situacao_lote_rps,
|
12
|
+
soap_action: 'ConsultarSituacaoLoteRPS',
|
13
|
+
message_tag: 'ConsultarSituacaoLoteRPS',
|
14
|
+
message: { :'xml!' => "<![CDATA[#{xml}]]>" })
|
15
|
+
parse_response(response)
|
16
|
+
end
|
17
|
+
|
6
18
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Rnfse
|
2
|
+
|
3
|
+
class CallChain
|
4
|
+
def self.caller_method(depth=1)
|
5
|
+
parse_caller(caller(depth+1).first).last
|
6
|
+
end
|
7
|
+
|
8
|
+
private
|
9
|
+
|
10
|
+
# Stolen from ActionMailer, where this was used but was not made
|
11
|
+
# reusable
|
12
|
+
def self.parse_caller(at)
|
13
|
+
if /^(.+?):(\d+)(?::in `(.*)')?/ =~ at
|
14
|
+
file = Regexp.last_match[1]
|
15
|
+
line = Regexp.last_match[2].to_i
|
16
|
+
method = Regexp.last_match[3]
|
17
|
+
[file, line, method]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
data/lib/rnfse/version.rb
CHANGED
@@ -5,13 +5,25 @@ module Rnfse::XMLBuilder::Abrasf10
|
|
5
5
|
module ClassMethods
|
6
6
|
|
7
7
|
def build_recepcionar_lote_rps_xml(hash = {})
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
build_xml('EnviarLoteRpsEnvio', hash)
|
9
|
+
end
|
10
|
+
|
11
|
+
def build_consultar_lote_rps_xml(hash = {})
|
12
|
+
build_xml('ConsultarLoteRpsEnvio', hash)
|
13
|
+
end
|
14
|
+
|
15
|
+
def build_consultar_situacao_lote_rps_xml(hash = {})
|
16
|
+
build_xml('ConsultarSituacaoLoteRpsEnvio', hash)
|
11
17
|
end
|
12
18
|
|
13
19
|
private
|
14
20
|
|
21
|
+
def build_xml(wrapper, hash = {})
|
22
|
+
hash = prepare_hash(hash)
|
23
|
+
inner_xml = ::Gyoku.xml(hash, key_converter: :none)
|
24
|
+
xml_builder(wrapper, inner_xml).doc
|
25
|
+
end
|
26
|
+
|
15
27
|
# prepara um hash para ser convertido a xml com o Gyoku
|
16
28
|
def prepare_hash(hash)
|
17
29
|
hash = camelize_hash(hash)
|
@@ -53,29 +65,56 @@ module Rnfse::XMLBuilder::Abrasf10
|
|
53
65
|
def wrap_rps(hash)
|
54
66
|
hash[:LoteRps][:ListaRps] = {
|
55
67
|
:Rps => { :InfRps => hash[:LoteRps][:ListaRps] }
|
56
|
-
}
|
68
|
+
} if hash[:LoteRps]
|
57
69
|
hash
|
58
70
|
end
|
59
71
|
|
60
|
-
# adiciona o namespace tc nas tags dentro de loteRps
|
72
|
+
# adiciona o namespace tc nas tags dentro de loteRps ou prestador
|
61
73
|
def add_tc_namespace(hash)
|
62
|
-
|
74
|
+
tag = case
|
75
|
+
when !hash[:LoteRps].nil? then :LoteRps
|
76
|
+
when !hash[:Prestador].nil? then :Prestador
|
77
|
+
end
|
78
|
+
if hash[tag]
|
79
|
+
hash[tag] = Rnfse::Hash.transform_keys(hash[tag]) { |key| "tc:#{key}".to_sym }
|
80
|
+
end
|
63
81
|
hash
|
64
82
|
end
|
65
83
|
|
66
|
-
def xmlns
|
67
|
-
'http://www.abrasf.org.br/servico_enviar_lote_rps_envio.xsd'
|
68
|
-
end
|
69
|
-
|
70
84
|
# namespace dos tipos complexos
|
71
85
|
def xmlns_tc
|
72
86
|
'http://www.abrasf.org.br/tipos_complexos.xsd'
|
73
87
|
end
|
74
88
|
|
89
|
+
# namespaces do xml recepcionar_lote_rps
|
90
|
+
def build_recepcionar_lote_rps_xmlns
|
91
|
+
{
|
92
|
+
'xmlns' => 'http://www.abrasf.org.br/servico_enviar_lote_rps_envio.xsd',
|
93
|
+
'xmlns:tc' => xmlns_tc
|
94
|
+
}
|
95
|
+
end
|
96
|
+
|
97
|
+
# namespaces do xml consultar_lote_rps
|
98
|
+
def build_consultar_lote_rps_xmlns
|
99
|
+
{
|
100
|
+
'xmlns' => 'http://www.abrasf.org.br/servico_consultar_lote_rps_envio.xsd',
|
101
|
+
'xmlns:tc' => xmlns_tc
|
102
|
+
}
|
103
|
+
end
|
104
|
+
|
105
|
+
# namespaces do xml consultar_situacao_lote_rps
|
106
|
+
def build_consultar_situacao_lote_rps_xmlns
|
107
|
+
{
|
108
|
+
'xmlns' => 'http://www.abrasf.org.br/servico_consultar_situacao_lote_rps_envio.xsd',
|
109
|
+
'xmlns:tc' => xmlns_tc
|
110
|
+
}
|
111
|
+
end
|
112
|
+
|
75
113
|
# instancia o builder a ser utilizado na geracao do xml
|
76
|
-
def xml_builder(root, inner_xml)
|
114
|
+
def xml_builder(root, inner_xml, xmlns = {})
|
115
|
+
xmlns = self.send("#{Rnfse::CallChain.caller_method(2)}ns") if xmlns.empty?
|
77
116
|
Nokogiri::XML::Builder.new(encoding: 'utf-8') do |xml|
|
78
|
-
xml.send(root.to_sym,
|
117
|
+
xml.send(root.to_sym, xmlns) do
|
79
118
|
xml << inner_xml
|
80
119
|
end
|
81
120
|
end
|
@@ -59,12 +59,39 @@ module Rnfse::XMLBuilder::IssNet10
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
-
|
63
|
-
'http://www.issnetonline.com.br/webserviceabrasf/vsd/servico_enviar_lote_rps_envio.xsd'
|
64
|
-
end
|
65
|
-
|
62
|
+
# namespace dos tipos complexos
|
66
63
|
def xmlns_tc
|
67
64
|
'http://www.issnetonline.com.br/webserviceabrasf/vsd/tipos_complexos.xsd'
|
68
65
|
end
|
69
66
|
|
67
|
+
# namespace dos tipos simples
|
68
|
+
def xmlns_ts
|
69
|
+
'http://www.issnetonline.com.br/webserviceabrasf/vsd/tipos_simples.xsd'
|
70
|
+
end
|
71
|
+
|
72
|
+
# namespaces do xml recepcionar_lote_rps
|
73
|
+
def build_recepcionar_lote_rps_xmlns
|
74
|
+
{
|
75
|
+
'xmlns' => 'http://www.issnetonline.com.br/webserviceabrasf/vsd/servico_enviar_lote_rps_envio.xsd',
|
76
|
+
'xmlns:tc' => xmlns_tc
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
# namespaces do xml consultar_situacao_lote_rps
|
81
|
+
def build_consultar_situacao_lote_rps_xmlns
|
82
|
+
{
|
83
|
+
'xmlns' => 'http://www.issnetonline.com.br/webserviceabrasf/vsd/servico_consultar_situacao_lote_rps_envio.xsd',
|
84
|
+
'xmlns:tc' => xmlns_tc
|
85
|
+
}
|
86
|
+
end
|
87
|
+
|
88
|
+
# namespaces do xml consultar_lote_rps
|
89
|
+
def build_consultar_lote_rps_xmlns
|
90
|
+
{
|
91
|
+
'xmlns' => 'http://www.issnetonline.com.br/webserviceabrasf/vsd/servico_consultar_lote_rps_envio.xsd',
|
92
|
+
'xmlns:tc' => xmlns_tc,
|
93
|
+
'xmlns:ts' => xmlns_ts
|
94
|
+
}
|
95
|
+
end
|
96
|
+
|
70
97
|
end
|
@@ -5,6 +5,7 @@ describe Rnfse::API::IssNet10 do
|
|
5
5
|
let(:certificate) { File.join($ROOT, 'spec', 'fixtures', 'certificate.pem') }
|
6
6
|
let(:key) { File.join($ROOT, 'spec', 'fixtures', 'key.pem') }
|
7
7
|
|
8
|
+
|
8
9
|
let(:client) do
|
9
10
|
Rnfse::API.new(padrao: :iss_net_1_0,
|
10
11
|
namespace: 'http://www.issnetonline.com.br/webservice/nfd',
|
@@ -27,7 +28,7 @@ describe Rnfse::API::IssNet10 do
|
|
27
28
|
lote_rps: {
|
28
29
|
numero_lote: 1,
|
29
30
|
cnpj: "14.576.582/0001-63",
|
30
|
-
inscricao_municipal: "
|
31
|
+
inscricao_municipal: "124762",
|
31
32
|
quantidade_rps: 1,
|
32
33
|
lista_rps: [
|
33
34
|
{
|
@@ -62,7 +63,7 @@ describe Rnfse::API::IssNet10 do
|
|
62
63
|
codigo_municipio: 999
|
63
64
|
},
|
64
65
|
prestador: {
|
65
|
-
cnpj: "
|
66
|
+
cnpj: "14.576.582/0001-63",
|
66
67
|
inscricao_municipal: "124762"
|
67
68
|
},
|
68
69
|
tomador: {
|
@@ -91,9 +92,56 @@ describe Rnfse::API::IssNet10 do
|
|
91
92
|
it { should be_kind_of(Hash) }
|
92
93
|
end
|
93
94
|
|
95
|
+
describe '#consultar_lote_rps' do
|
96
|
+
context 'quando parametros errados são passados,' do
|
97
|
+
it { expect{ client.consultar_lote_rps(bogus: :data) }.to raise_error(ArgumentError) }
|
98
|
+
end
|
99
|
+
|
100
|
+
it { expect(client).to respond_to(:consultar_lote_rps) }
|
101
|
+
|
102
|
+
subject do
|
103
|
+
VCR.use_cassette('iss_net_1_0_consultar_lote_rps') do
|
104
|
+
client.consultar_lote_rps({
|
105
|
+
prestador: {
|
106
|
+
cpf: "301.463.748-35",
|
107
|
+
inscricao_municipal: "124762"
|
108
|
+
},
|
109
|
+
protocolo: "db1c3e91-6aea-4450-a3fc-5b6a7fba7dc7"
|
110
|
+
})
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
it { should_not be_nil }
|
115
|
+
it { should be_kind_of(Hash) }
|
116
|
+
end
|
117
|
+
|
118
|
+
describe '#consultar_situacao_lote_rps' do
|
119
|
+
context 'quando parametros errados são passados,' do
|
120
|
+
it { expect{ client.consultar_situacao_lote_rps(bogus: :data) }.to raise_error(ArgumentError) }
|
121
|
+
end
|
122
|
+
|
123
|
+
it { expect(client).to respond_to(:consultar_situacao_lote_rps) }
|
124
|
+
|
125
|
+
subject do
|
126
|
+
VCR.use_cassette('iss_net_1_0_consultar_situacao_lote_rps') do
|
127
|
+
client.consultar_situacao_lote_rps({
|
128
|
+
prestador: {
|
129
|
+
cnpj: "14.576.582/0001-63",
|
130
|
+
inscricao_municipal: "124762"
|
131
|
+
},
|
132
|
+
protocolo: "79be6415-5562-4728-b6cf-e9388b804c76"
|
133
|
+
})
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
it { should_not be_nil }
|
138
|
+
it { should be_kind_of(Hash) }
|
139
|
+
end
|
140
|
+
|
94
141
|
describe '#cancelar_nfse'
|
95
142
|
describe '#consultar_nfse_por_rps'
|
96
|
-
describe '#
|
143
|
+
describe '#consultar_nfse'
|
97
144
|
describe '#consultar_url_visualizacao_nfse'
|
98
145
|
describe '#consultar_url_visualizacao_nfse_serie'
|
146
|
+
describe '#consulta_situacao_lote_rps'
|
99
147
|
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<ConsultarLoteRpsEnvio
|
3
|
+
xmlns="http://www.abrasf.org.br/servico_consultar_lote_rps_envio.xsd"
|
4
|
+
xmlns:tc="http://www.abrasf.org.br/tipos_complexos.xsd">
|
5
|
+
<Prestador>
|
6
|
+
<tc:Cpf>97004731120</tc:Cpf>
|
7
|
+
<tc:InscricaoMunicipal>812005</tc:InscricaoMunicipal>
|
8
|
+
</Prestador>
|
9
|
+
<Protocolo>5afd8f42-cc1e-4657-9249-8fbc3f133ebf</Protocolo>
|
10
|
+
</ConsultarLoteRpsEnvio>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<ConsultarSituacaoLoteRpsEnvio
|
3
|
+
xmlns="http://www.abrasf.org.br/servico_consultar_situacao_lote_rps_envio.xsd"
|
4
|
+
xmlns:tc="http://www.abrasf.org.br/tipos_complexos.xsd">
|
5
|
+
<Prestador>
|
6
|
+
<tc:Cnpj>14576582000163</tc:Cnpj>
|
7
|
+
<tc:InscricaoMunicipal>124762</tc:InscricaoMunicipal>
|
8
|
+
</Prestador>
|
9
|
+
<Protocolo>db1c3e91-6aea-4450-a3fc-5b6a7fba7dc7</Protocolo>
|
10
|
+
</ConsultarSituacaoLoteRpsEnvio>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<ConsultarSituacaoLoteRpsEnvio xmlns="http://www.abrasf.org.br/servico_consultar_situacao_lote_rps_envio.xsd" xmlns:tc="http://www.abrasf.org.br/tipos_complexos.xsd">
|
3
|
+
<Prestador>
|
4
|
+
<tc:Cnpj>14576582000163</tc:Cnpj>
|
5
|
+
<tc:InscricaoMunicipal>124762</tc:InscricaoMunicipal>
|
6
|
+
</Prestador>
|
7
|
+
<Protocolo>db1c3e91-6aea-4450-a3fc-5b6a7fba7dc7</Protocolo>
|
8
|
+
</ConsultarSituacaoLoteRpsEnvio>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<ConsultarLoteRpsEnvio
|
3
|
+
xmlns="http://www.issnetonline.com.br/webserviceabrasf/vsd/servico_consultar_lote_rps_envio.xsd"
|
4
|
+
xmlns:ts="http://www.issnetonline.com.br/webserviceabrasf/vsd/tipos_simples.xsd"
|
5
|
+
xmlns:tc="http://www.issnetonline.com.br/webserviceabrasf/vsd/tipos_complexos.xsd">
|
6
|
+
<Prestador>
|
7
|
+
<tc:CpfCnpj>
|
8
|
+
<tc:Cpf>97004731120</tc:Cpf>
|
9
|
+
</tc:CpfCnpj>
|
10
|
+
<tc:InscricaoMunicipal>812005</tc:InscricaoMunicipal>
|
11
|
+
</Prestador>
|
12
|
+
<Protocolo>5afd8f42-cc1e-4657-9249-8fbc3f133ebf</Protocolo>
|
13
|
+
</ConsultarLoteRpsEnvio>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<ConsultarSituacaoLoteRpsEnvio
|
3
|
+
xmlns="http://www.issnetonline.com.br/webserviceabrasf/vsd/servico_consultar_situacao_lote_rps_envio.xsd"
|
4
|
+
xmlns:tc="http://www.issnetonline.com.br/webserviceabrasf/vsd/tipos_complexos.xsd">
|
5
|
+
<Prestador>
|
6
|
+
<tc:CpfCnpj>
|
7
|
+
<tc:Cnpj>14576582000163</tc:Cnpj>
|
8
|
+
</tc:CpfCnpj>
|
9
|
+
<tc:InscricaoMunicipal>124762</tc:InscricaoMunicipal>
|
10
|
+
</Prestador>
|
11
|
+
<Protocolo>db1c3e91-6aea-4450-a3fc-5b6a7fba7dc7</Protocolo>
|
12
|
+
</ConsultarSituacaoLoteRpsEnvio>
|
@@ -0,0 +1,85 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://www.issnetonline.com.br/webserviceabrasf/homologacao/servicos.asmx
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: |-
|
9
|
+
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.issnetonline.com.br/webservice/nfd" xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Body><ConsultarLoteRps><xml><![CDATA[<?xml version="1.0" encoding="utf-8"?>
|
10
|
+
<ConsultarLoteRpsEnvio xmlns="http://www.issnetonline.com.br/webserviceabrasf/vsd/servico_consultar_lote_rps_envio.xsd" xmlns:tc="http://www.issnetonline.com.br/webserviceabrasf/vsd/tipos_complexos.xsd" xmlns:ts="http://www.issnetonline.com.br/webserviceabrasf/vsd/tipos_simples.xsd">
|
11
|
+
<Prestador>
|
12
|
+
<tc:CpfCnpj>
|
13
|
+
<tc:Cpf>30146374835</tc:Cpf>
|
14
|
+
</tc:CpfCnpj>
|
15
|
+
<tc:InscricaoMunicipal>124762</tc:InscricaoMunicipal>
|
16
|
+
</Prestador>
|
17
|
+
<Protocolo>db1c3e91-6aea-4450-a3fc-5b6a7fba7dc7</Protocolo>
|
18
|
+
</ConsultarLoteRpsEnvio>
|
19
|
+
]]></xml></ConsultarLoteRps></soap:Body></soap:Envelope>
|
20
|
+
headers:
|
21
|
+
Soapaction:
|
22
|
+
- '"ConsultarLoteRps"'
|
23
|
+
Content-Type:
|
24
|
+
- application/soap+xml;charset=UTF-8
|
25
|
+
Content-Length:
|
26
|
+
- '926'
|
27
|
+
Accept-Encoding:
|
28
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
29
|
+
Accept:
|
30
|
+
- "*/*"
|
31
|
+
User-Agent:
|
32
|
+
- Ruby
|
33
|
+
response:
|
34
|
+
status:
|
35
|
+
code: 200
|
36
|
+
message: OK
|
37
|
+
headers:
|
38
|
+
Date:
|
39
|
+
- Fri, 18 Jul 2014 05:56:20 GMT
|
40
|
+
Server:
|
41
|
+
- Microsoft-IIS/6.0
|
42
|
+
X-Powered-By:
|
43
|
+
- ASP.NET
|
44
|
+
X-Aspnet-Version:
|
45
|
+
- 2.0.50727
|
46
|
+
Cache-Control:
|
47
|
+
- private, max-age=0
|
48
|
+
Content-Type:
|
49
|
+
- application/soap+xml; charset=utf-8
|
50
|
+
Content-Length:
|
51
|
+
- '1221'
|
52
|
+
body:
|
53
|
+
encoding: ASCII-8BIT
|
54
|
+
string: !binary |-
|
55
|
+
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c29hcDpF
|
56
|
+
bnZlbG9wZSB4bWxuczpzb2FwPSJodHRwOi8vd3d3LnczLm9yZy8yMDAzLzA1
|
57
|
+
L3NvYXAtZW52ZWxvcGUiIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcv
|
58
|
+
MjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhtbG5zOnhzZD0iaHR0cDovL3d3
|
59
|
+
dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiPjxzb2FwOkJvZHk+PENvbnN1bHRh
|
60
|
+
ckxvdGVScHNSZXNwb25zZSB4bWxucz0iaHR0cDovL3d3dy5pc3NuZXRvbmxp
|
61
|
+
bmUuY29tLmJyL3dlYnNlcnZpY2UvbmZkIj48Q29uc3VsdGFyTG90ZVJwc1Jl
|
62
|
+
c3VsdD4mbHQ7P3htbCB2ZXJzaW9uPSIxLjAiIGVuY29kaW5nPSJ1dGYtOCI/
|
63
|
+
Jmd0Ow0KJmx0O0NvbnN1bHRhckxvdGVScHNSZXNwb3N0YSB4bWxucz0iaHR0
|
64
|
+
cDovL3d3dy5pc3NuZXRvbmxpbmUuY29tLmJyL3dlYnNlcnZpY2VhYnJhc2Yv
|
65
|
+
dnNkL3NlcnZpY29fY29uc3VsdGFyX2xvdGVfcnBzX3Jlc3Bvc3RhLnhzZCIg
|
66
|
+
eG1sbnM6dGM9Imh0dHA6Ly93d3cuaXNzbmV0b25saW5lLmNvbS5ici93ZWJz
|
67
|
+
ZXJ2aWNlYWJyYXNmL3ZzZC90aXBvc19jb21wbGV4b3MueHNkIiZndDsNCiAg
|
68
|
+
Jmx0O0xpc3RhTWVuc2FnZW1SZXRvcm5vJmd0Ow0KICAgICZsdDtNZW5zYWdl
|
69
|
+
bVJldG9ybm8mZ3Q7DQogICAgICAmbHQ7dGM6SWRlbnRpZmljYWNhb1JwcyZn
|
70
|
+
dDsNCiAgICAgICAgJmx0O3RjOk51bWVybyZndDsxNSZsdDsvdGM6TnVtZXJv
|
71
|
+
Jmd0Ow0KICAgICAgICAmbHQ7dGM6U2VyaWUmZ3Q7OCZsdDsvdGM6U2VyaWUm
|
72
|
+
Z3Q7DQogICAgICAgICZsdDt0YzpUaXBvJmd0OzEmbHQ7L3RjOlRpcG8mZ3Q7
|
73
|
+
DQogICAgICAmbHQ7L3RjOklkZW50aWZpY2FjYW9ScHMmZ3Q7DQogICAgICAm
|
74
|
+
bHQ7dGM6Q29kaWdvJmd0O0wwMTgmbHQ7L3RjOkNvZGlnbyZndDsNCiAgICAg
|
75
|
+
ICZsdDt0YzpNZW5zYWdlbSZndDsgQSBlbXByZXNhIG7Do28gZXN0w6EgaGFi
|
76
|
+
aWxpdGFkYSBubyBhbWJpZW50ZSBkZSBpbnRlZ3Jhw6fDo28uICBOw7ptZXJv
|
77
|
+
IGRvIFJQUyBlbSBxdWUgb2NvcnJldSBvIGVycm86IDE1Jmx0Oy90YzpNZW5z
|
78
|
+
YWdlbSZndDsNCiAgICAmbHQ7L01lbnNhZ2VtUmV0b3JubyZndDsNCiAgJmx0
|
79
|
+
Oy9MaXN0YU1lbnNhZ2VtUmV0b3JubyZndDsNCiZsdDsvQ29uc3VsdGFyTG90
|
80
|
+
ZVJwc1Jlc3Bvc3RhJmd0OzwvQ29uc3VsdGFyTG90ZVJwc1Jlc3VsdD48L0Nv
|
81
|
+
bnN1bHRhckxvdGVScHNSZXNwb25zZT48L3NvYXA6Qm9keT48L3NvYXA6RW52
|
82
|
+
ZWxvcGU+
|
83
|
+
http_version:
|
84
|
+
recorded_at: Fri, 18 Jul 2014 05:56:21 GMT
|
85
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,62 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://www.issnetonline.com.br/webserviceabrasf/homologacao/servicos.asmx
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: |-
|
9
|
+
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.issnetonline.com.br/webservice/nfd" xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Body><ConsultarSituacaoLoteRPS><xml><![CDATA[<?xml version="1.0" encoding="utf-8"?>
|
10
|
+
<ConsultarSituacaoLoteRpsEnvio xmlns="http://www.issnetonline.com.br/webserviceabrasf/vsd/servico_consultar_situacao_lote_rps_envio.xsd" xmlns:tc="http://www.issnetonline.com.br/webserviceabrasf/vsd/tipos_complexos.xsd">
|
11
|
+
<Prestador>
|
12
|
+
<tc:CpfCnpj>
|
13
|
+
<tc:Cnpj>14576582000163</tc:Cnpj>
|
14
|
+
</tc:CpfCnpj>
|
15
|
+
<tc:InscricaoMunicipal>124762</tc:InscricaoMunicipal>
|
16
|
+
</Prestador>
|
17
|
+
<Protocolo>79be6415-5562-4728-b6cf-e9388b804c76</Protocolo>
|
18
|
+
</ConsultarSituacaoLoteRpsEnvio>
|
19
|
+
]]></xml></ConsultarSituacaoLoteRPS></soap:Body></soap:Envelope>
|
20
|
+
headers:
|
21
|
+
Soapaction:
|
22
|
+
- '"ConsultarSituacaoLoteRPS"'
|
23
|
+
Content-Type:
|
24
|
+
- application/soap+xml;charset=UTF-8
|
25
|
+
Content-Length:
|
26
|
+
- '891'
|
27
|
+
Accept-Encoding:
|
28
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
29
|
+
Accept:
|
30
|
+
- "*/*"
|
31
|
+
User-Agent:
|
32
|
+
- Ruby
|
33
|
+
response:
|
34
|
+
status:
|
35
|
+
code: 200
|
36
|
+
message: OK
|
37
|
+
headers:
|
38
|
+
Date:
|
39
|
+
- Fri, 18 Jul 2014 06:33:38 GMT
|
40
|
+
Server:
|
41
|
+
- Microsoft-IIS/6.0
|
42
|
+
X-Powered-By:
|
43
|
+
- ASP.NET
|
44
|
+
X-Aspnet-Version:
|
45
|
+
- 2.0.50727
|
46
|
+
Cache-Control:
|
47
|
+
- private, max-age=0
|
48
|
+
Content-Type:
|
49
|
+
- application/soap+xml; charset=utf-8
|
50
|
+
Content-Length:
|
51
|
+
- '751'
|
52
|
+
body:
|
53
|
+
encoding: UTF-8
|
54
|
+
string: "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\"
|
55
|
+
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><soap:Body><ConsultarSituacaoLoteRPSResponse
|
56
|
+
xmlns=\"http://www.issnetonline.com.br/webservice/nfd\"><ConsultarSituacaoLoteRPSResult><?xml
|
57
|
+
version=\"1.0\" encoding=\"utf-8\"?>\r\n<ConsultarSituacaoLoteRpsResposta
|
58
|
+
xmlns=\"http://www.issnetonline.com.br/webserviceabrasf/vsd/servico_consultar_situacao_lote_rps_resposta.xsd\">\r\n
|
59
|
+
\ <NumeroLote>23</NumeroLote>\r\n <Situacao>4</Situacao>\r\n</ConsultarSituacaoLoteRpsResposta></ConsultarSituacaoLoteRPSResult></ConsultarSituacaoLoteRPSResponse></soap:Body></soap:Envelope>"
|
60
|
+
http_version:
|
61
|
+
recorded_at: Fri, 18 Jul 2014 06:33:38 GMT
|
62
|
+
recorded_with: VCR 2.9.2
|
@@ -13,7 +13,7 @@ http_interactions:
|
|
13
13
|
<tc:CpfCnpj>
|
14
14
|
<tc:Cnpj>14576582000163</tc:Cnpj>
|
15
15
|
</tc:CpfCnpj>
|
16
|
-
<tc:InscricaoMunicipal>
|
16
|
+
<tc:InscricaoMunicipal>124762</tc:InscricaoMunicipal>
|
17
17
|
<tc:QuantidadeRps>1</tc:QuantidadeRps>
|
18
18
|
<tc:ListaRps>
|
19
19
|
<tc:Rps>
|
@@ -53,7 +53,7 @@ http_interactions:
|
|
53
53
|
</tc:Servico>
|
54
54
|
<tc:Prestador>
|
55
55
|
<tc:CpfCnpj>
|
56
|
-
<tc:Cnpj>
|
56
|
+
<tc:Cnpj>14576582000163</tc:Cnpj>
|
57
57
|
</tc:CpfCnpj>
|
58
58
|
<tc:InscricaoMunicipal>124762</tc:InscricaoMunicipal>
|
59
59
|
</tc:Prestador>
|
@@ -87,15 +87,15 @@ http_interactions:
|
|
87
87
|
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
|
88
88
|
</Transforms>
|
89
89
|
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
|
90
|
-
<DigestValue>
|
90
|
+
<DigestValue>8AXJf2h4iLh6Q5wv9ELO2WRmH9s=</DigestValue>
|
91
91
|
</Reference>
|
92
92
|
</SignedInfo>
|
93
|
-
<SignatureValue>
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
93
|
+
<SignatureValue>kQXJoLSYxFZriX113XrVKICb1DTI3rHHgtXEUKab08Nc3DMNyyUu07YYlpEVvXEE
|
94
|
+
mkCxDNXOLzDCRLC7+jaKwEIAlOX3G8ikD9GQFqX+j7AT3J99zMULmst8g09ERGJB
|
95
|
+
FFmM7SH/R1rdgfavUyWWRQjjOXe9t7z3hyUF+V0CJR2zO/q/gJqz2K4ZBRvf5am6
|
96
|
+
P7/sSNsq6y/u7d34iZlcEK16KVtNz+eLa5hvJKQaQMyF3ri5H79sVpaWEIbBSbST
|
97
|
+
q2GyP2neYzU4CFfcuTBO7OBWa0B54+BjAERslQRqaG9btc+7KXkQaVA6bJJstIZx
|
98
|
+
L/dlRyxXXJKSCQbcIlmUyA==</SignatureValue>
|
99
99
|
<KeyInfo>
|
100
100
|
<X509Data>
|
101
101
|
<X509Certificate>MIIH7jCCBdagAwIBAgIIebwmN9dD4mUwDQYJKoZIhvcNAQELBQAwTDELMAkGA1UE
|
@@ -165,7 +165,7 @@ http_interactions:
|
|
165
165
|
message: OK
|
166
166
|
headers:
|
167
167
|
Date:
|
168
|
-
- Fri, 11 Jul 2014
|
168
|
+
- Fri, 11 Jul 2014 08:56:56 GMT
|
169
169
|
Server:
|
170
170
|
- Microsoft-IIS/6.0
|
171
171
|
X-Powered-By:
|
@@ -177,38 +177,15 @@ http_interactions:
|
|
177
177
|
Content-Type:
|
178
178
|
- application/soap+xml; charset=utf-8
|
179
179
|
Content-Length:
|
180
|
-
- '
|
180
|
+
- '799'
|
181
181
|
body:
|
182
|
-
encoding:
|
183
|
-
string:
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
bmFyTG90ZVJwc1Jlc3BvbnNlIHhtbG5zPSJodHRwOi8vd3d3Lmlzc25ldG9u
|
190
|
-
bGluZS5jb20uYnIvd2Vic2VydmljZS9uZmQiPjxSZWNlcGNpb25hckxvdGVS
|
191
|
-
cHNSZXN1bHQ+Jmx0Oz94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRm
|
192
|
-
LTgiPyZndDsNCiZsdDtFbnZpYXJMb3RlUnBzUmVzcG9zdGEgeG1sbnM9Imh0
|
193
|
-
dHA6Ly93d3cuaXNzbmV0b25saW5lLmNvbS5ici93ZWJzZXJ2aWNlYWJyYXNm
|
194
|
-
L3ZzZC9zZXJ2aWNvX2Vudmlhcl9sb3RlX3Jwc19yZXNwb3N0YS54c2QiJmd0
|
195
|
-
Ow0KICAmbHQ7TGlzdGFNZW5zYWdlbVJldG9ybm8mZ3Q7DQogICAgJmx0O01l
|
196
|
-
bnNhZ2VtUmV0b3JubyZndDsNCiAgICAgICZsdDtDb2RpZ28geG1sbnM9Imh0
|
197
|
-
dHA6Ly93d3cuaXNzbmV0b25saW5lLmNvbS5ici93ZWJzZXJ2aWNlYWJyYXNm
|
198
|
-
L3ZzZC90aXBvc19jb21wbGV4b3MueHNkIiZndDtFMTU3Jmx0Oy9Db2RpZ28m
|
199
|
-
Z3Q7DQogICAgICAmbHQ7TWVuc2FnZW0geG1sbnM9Imh0dHA6Ly93d3cuaXNz
|
200
|
-
bmV0b25saW5lLmNvbS5ici93ZWJzZXJ2aWNlYWJyYXNmL3ZzZC90aXBvc19j
|
201
|
-
b21wbGV4b3MueHNkIiZndDsgVXN1w6FyaW8gbsOjbyBlc3TDoSBhdXRvcml6
|
202
|
-
YWRvIGEgdXRpbGl6YXIgZXNzZSBzZXJ2acOnbyBwYXJhIGVzc2UgY29udHJp
|
203
|
-
YnVpbnRlLiAmbHQ7L01lbnNhZ2VtJmd0Ow0KICAgICAgJmx0O0NvcnJlY2Fv
|
204
|
-
IHhtbG5zPSJodHRwOi8vd3d3Lmlzc25ldG9ubGluZS5jb20uYnIvd2Vic2Vy
|
205
|
-
dmljZWFicmFzZi92c2QvdGlwb3NfY29tcGxleG9zLnhzZCImZ3Q7U29saWNp
|
206
|
-
dGUgYW8gY29udHJpYnVpbnRlIGF1dG9yaXphw6fDo28gcGFyYSB1dGlsaXph
|
207
|
-
ciBvIHNlcnZpw6dvIGVtIHNldSBub21lLiZsdDsvQ29ycmVjYW8mZ3Q7DQog
|
208
|
-
ICAgJmx0Oy9NZW5zYWdlbVJldG9ybm8mZ3Q7DQogICZsdDsvTGlzdGFNZW5z
|
209
|
-
YWdlbVJldG9ybm8mZ3Q7DQombHQ7L0VudmlhckxvdGVScHNSZXNwb3N0YSZn
|
210
|
-
dDs8L1JlY2VwY2lvbmFyTG90ZVJwc1Jlc3VsdD48L1JlY2VwY2lvbmFyTG90
|
211
|
-
ZVJwc1Jlc3BvbnNlPjwvc29hcDpCb2R5Pjwvc29hcDpFbnZlbG9wZT4=
|
182
|
+
encoding: UTF-8
|
183
|
+
string: "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\"
|
184
|
+
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><soap:Body><RecepcionarLoteRpsResponse
|
185
|
+
xmlns=\"http://www.issnetonline.com.br/webservice/nfd\"><RecepcionarLoteRpsResult><?xml
|
186
|
+
version=\"1.0\" encoding=\"utf-8\"?>\r\n<EnviarLoteRpsResposta xmlns=\"http://www.issnetonline.com.br/webserviceabrasf/vsd/servico_enviar_lote_rps_resposta.xsd\">\r\n
|
187
|
+
\ <NumeroLote>1</NumeroLote>\r\n <DataRecebimento>2014-07-11T05:56:56</DataRecebimento>\r\n
|
188
|
+
\ <Protocolo>db1c3e91-6aea-4450-a3fc-5b6a7fba7dc7</Protocolo>\r\n</EnviarLoteRpsResposta></RecepcionarLoteRpsResult></RecepcionarLoteRpsResponse></soap:Body></soap:Envelope>"
|
212
189
|
http_version:
|
213
|
-
recorded_at: Fri, 11 Jul 2014
|
190
|
+
recorded_at: Fri, 11 Jul 2014 08:56:58 GMT
|
214
191
|
recorded_with: VCR 2.9.2
|
@@ -5,14 +5,51 @@ describe Rnfse::XMLBuilder::Abrasf10 do
|
|
5
5
|
|
6
6
|
let(:builder) { Rnfse::XMLBuilder.new(padrao: :abrasf_1_0) }
|
7
7
|
|
8
|
+
|
9
|
+
describe '#build_consultar_situacao_lote_rps_xml' do
|
10
|
+
let(:xml) do
|
11
|
+
Nokogiri::XML(File.read(File.join($ROOT, 'spec', 'fixtures', 'abrasf_1_0',
|
12
|
+
'consultar_situacao_lote_rps_envio.xml')))
|
13
|
+
end
|
14
|
+
|
15
|
+
subject do
|
16
|
+
builder.build_consultar_situacao_lote_rps_xml({
|
17
|
+
prestador: {
|
18
|
+
cnpj: "14.576.582/0001-63",
|
19
|
+
inscricao_municipal: "124762"
|
20
|
+
},
|
21
|
+
protocolo: "db1c3e91-6aea-4450-a3fc-5b6a7fba7dc7"
|
22
|
+
})
|
23
|
+
end
|
24
|
+
|
25
|
+
it { should be_equivalent_to(xml) }
|
26
|
+
it { should be_kind_of(Nokogiri::XML::Document) }
|
27
|
+
end
|
28
|
+
|
29
|
+
describe "#build_consultar_lote_rps_xml" do
|
30
|
+
let(:xml) do
|
31
|
+
Nokogiri::XML(File.read(File.join($ROOT, 'spec', 'fixtures', 'abrasf_1_0',
|
32
|
+
'consultar_lote_rps_envio.xml')))
|
33
|
+
end
|
34
|
+
|
35
|
+
subject do
|
36
|
+
builder.build_consultar_lote_rps_xml({
|
37
|
+
prestador: {
|
38
|
+
cpf: "970.047.311-20",
|
39
|
+
inscricao_municipal: "812005"
|
40
|
+
},
|
41
|
+
protocolo: "5afd8f42-cc1e-4657-9249-8fbc3f133ebf"
|
42
|
+
})
|
43
|
+
end
|
44
|
+
|
45
|
+
it { should be_equivalent_to(xml) }
|
46
|
+
it { should be_kind_of(Nokogiri::XML::Document) }
|
47
|
+
end
|
48
|
+
|
8
49
|
describe "#build_recepcionar_lote_rps_xml" do
|
9
50
|
let(:xml) do
|
10
|
-
Nokogiri::XML(
|
11
|
-
|
12
|
-
File.join($ROOT, 'spec', 'fixtures', 'abrasf_1_0',
|
13
|
-
'enviar_lote_rps_envio.xml')
|
14
|
-
)
|
15
|
-
)
|
51
|
+
Nokogiri::XML(File.read(File.join($ROOT, 'spec', 'fixtures', 'abrasf_1_0',
|
52
|
+
'enviar_lote_rps_envio.xml')))
|
16
53
|
end
|
17
54
|
|
18
55
|
subject do
|
@@ -5,14 +5,52 @@ describe Rnfse::XMLBuilder::IssNet10 do
|
|
5
5
|
|
6
6
|
let(:builder) { Rnfse::XMLBuilder.new(padrao: :iss_net_1_0) }
|
7
7
|
|
8
|
+
describe '#build_consultar_situacao_lote_rps_xml' do
|
9
|
+
let(:xml) do
|
10
|
+
Nokogiri::XML(File.read(File.join($ROOT, 'spec', 'fixtures', 'iss_net_1_0',
|
11
|
+
'consultar_situacao_lote_rps_envio.xml')))
|
12
|
+
end
|
13
|
+
|
14
|
+
subject do
|
15
|
+
builder.build_consultar_situacao_lote_rps_xml({
|
16
|
+
prestador: {
|
17
|
+
cnpj: "14.576.582/0001-63",
|
18
|
+
inscricao_municipal: "124762"
|
19
|
+
},
|
20
|
+
protocolo: "db1c3e91-6aea-4450-a3fc-5b6a7fba7dc7"
|
21
|
+
})
|
22
|
+
end
|
23
|
+
|
24
|
+
it { should be_equivalent_to(xml) }
|
25
|
+
it { should be_kind_of(Nokogiri::XML::Document) }
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
describe "#build_consultar_lote_rps_xml" do
|
30
|
+
let(:xml) do
|
31
|
+
Nokogiri::XML(File.read(File.join($ROOT, 'spec', 'fixtures', 'iss_net_1_0',
|
32
|
+
'consultar_lote_rps_envio.xml')))
|
33
|
+
end
|
34
|
+
|
35
|
+
subject do
|
36
|
+
builder.build_consultar_lote_rps_xml({
|
37
|
+
prestador: {
|
38
|
+
cpf: "970.047.311-20",
|
39
|
+
inscricao_municipal: "812005"
|
40
|
+
},
|
41
|
+
protocolo: "5afd8f42-cc1e-4657-9249-8fbc3f133ebf"
|
42
|
+
})
|
43
|
+
end
|
44
|
+
|
45
|
+
it { should be_equivalent_to(xml) }
|
46
|
+
it { should be_kind_of(Nokogiri::XML::Document) }
|
47
|
+
end
|
48
|
+
|
49
|
+
|
8
50
|
describe "#build_recepcionar_lote_rps_xml" do
|
9
51
|
let(:xml) do
|
10
|
-
Nokogiri::XML(
|
11
|
-
|
12
|
-
File.join($ROOT, 'spec', 'fixtures', 'iss_net_1_0',
|
13
|
-
'enviar_lote_rps_envio.xml')
|
14
|
-
)
|
15
|
-
)
|
52
|
+
Nokogiri::XML(File.read(File.join($ROOT, 'spec', 'fixtures', 'iss_net_1_0',
|
53
|
+
'enviar_lote_rps_envio.xml')))
|
16
54
|
end
|
17
55
|
|
18
56
|
subject do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rnfse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Renan Mendes Carvalho
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -369,9 +369,12 @@ files:
|
|
369
369
|
- lib/rnfse.rb
|
370
370
|
- lib/rnfse/api.rb
|
371
371
|
- lib/rnfse/api/abrasf_1_0.rb
|
372
|
+
- lib/rnfse/api/abrasf_1_0/consultar_lote_rps.json
|
373
|
+
- lib/rnfse/api/abrasf_1_0/consultar_situacao_lote_rps.json
|
372
374
|
- lib/rnfse/api/abrasf_1_0/definitions.json
|
373
375
|
- lib/rnfse/api/abrasf_1_0/recepcionar_lote_rps.json
|
374
376
|
- lib/rnfse/api/iss_net_1_0.rb
|
377
|
+
- lib/rnfse/call_chain.rb
|
375
378
|
- lib/rnfse/configuration.rb
|
376
379
|
- lib/rnfse/core.rb
|
377
380
|
- lib/rnfse/hash.rb
|
@@ -386,11 +389,18 @@ files:
|
|
386
389
|
- spec/api/iss_net_1_0_spec.rb
|
387
390
|
- spec/api_spec.rb
|
388
391
|
- spec/core_spec.rb
|
392
|
+
- spec/fixtures/abrasf_1_0/consultar_lote_rps_envio.xml
|
393
|
+
- spec/fixtures/abrasf_1_0/consultar_situacao_lote_rps_envio.xml
|
389
394
|
- spec/fixtures/abrasf_1_0/enviar_lote_rps_envio.xml
|
390
395
|
- spec/fixtures/abrasf_1_0/nfse.xsd
|
396
|
+
- spec/fixtures/abrasf_1_0/teste.xml
|
391
397
|
- spec/fixtures/certificate.pem
|
398
|
+
- spec/fixtures/iss_net_1_0/consultar_lote_rps_envio.xml
|
399
|
+
- spec/fixtures/iss_net_1_0/consultar_situacao_lote_rps_envio.xml
|
392
400
|
- spec/fixtures/iss_net_1_0/enviar_lote_rps_envio.xml
|
393
401
|
- spec/fixtures/key.pem
|
402
|
+
- spec/fixtures/vcr_cassettes/iss_net_1_0_consultar_lote_rps.yml
|
403
|
+
- spec/fixtures/vcr_cassettes/iss_net_1_0_consultar_situacao_lote_rps.yml
|
394
404
|
- spec/fixtures/vcr_cassettes/iss_net_1_0_recepcionar_lote_rps.yml
|
395
405
|
- spec/hash_spec.rb
|
396
406
|
- spec/spec_helper.rb
|
@@ -431,11 +441,18 @@ test_files:
|
|
431
441
|
- spec/api/iss_net_1_0_spec.rb
|
432
442
|
- spec/api_spec.rb
|
433
443
|
- spec/core_spec.rb
|
444
|
+
- spec/fixtures/abrasf_1_0/consultar_lote_rps_envio.xml
|
445
|
+
- spec/fixtures/abrasf_1_0/consultar_situacao_lote_rps_envio.xml
|
434
446
|
- spec/fixtures/abrasf_1_0/enviar_lote_rps_envio.xml
|
435
447
|
- spec/fixtures/abrasf_1_0/nfse.xsd
|
448
|
+
- spec/fixtures/abrasf_1_0/teste.xml
|
436
449
|
- spec/fixtures/certificate.pem
|
450
|
+
- spec/fixtures/iss_net_1_0/consultar_lote_rps_envio.xml
|
451
|
+
- spec/fixtures/iss_net_1_0/consultar_situacao_lote_rps_envio.xml
|
437
452
|
- spec/fixtures/iss_net_1_0/enviar_lote_rps_envio.xml
|
438
453
|
- spec/fixtures/key.pem
|
454
|
+
- spec/fixtures/vcr_cassettes/iss_net_1_0_consultar_lote_rps.yml
|
455
|
+
- spec/fixtures/vcr_cassettes/iss_net_1_0_consultar_situacao_lote_rps.yml
|
439
456
|
- spec/fixtures/vcr_cassettes/iss_net_1_0_recepcionar_lote_rps.yml
|
440
457
|
- spec/hash_spec.rb
|
441
458
|
- spec/spec_helper.rb
|