nfse-carioca 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (21) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/lib/nfse_carioca.rb +4 -0
  4. data/lib/nfse_carioca/gerar_nfse.rb +4 -0
  5. data/lib/nfse_carioca/gerar_nfse_xml.rb +121 -85
  6. data/lib/nfse_carioca/version.rb +1 -1
  7. data/nfse_carioca.gemspec +3 -2
  8. data/spec/fixtures/vcr_cassettes/NFSeCarioca_CancelarNFSe/_execute_/when_NFSeCarioca_rps_number_does_not_exist/returns_error_message.yml +4 -4
  9. data/spec/fixtures/vcr_cassettes/NFSeCarioca_CancelarNFSe/_execute_/when_NFSeCarioca_rps_number_does_not_exist/returns_false.yml +4 -4
  10. data/spec/fixtures/vcr_cassettes/NFSeCarioca_CancelarNFSe/_execute_/when_NFSeCarioca_rps_number_exist/returns_false.yml +8 -8
  11. data/spec/fixtures/vcr_cassettes/NFSeCarioca_GerarNFSe/_call/when_NFSeCarioca_rps_number_already_exist/responds_with_error.yml +14 -66
  12. data/spec/fixtures/vcr_cassettes/NFSeCarioca_GerarNFSe/_call/when_NFSeCarioca_rps_number_already_exist/responds_with_error_code_E10_.yml +248 -0
  13. data/spec/fixtures/vcr_cassettes/NFSeCarioca_GerarNFSe/_call/when_NFSeCarioca_rps_number_already_exist/responds_with_error_message_E10_.yml +248 -0
  14. data/spec/fixtures/vcr_cassettes/NFSeCarioca_GerarNFSe/_call/when_NFSeCarioca_rps_number_already_exist/responds_with_message_error_E10_.yml +14 -66
  15. data/spec/fixtures/vcr_cassettes/NFSeCarioca_GerarNFSe/_call/when_NFSeCarioca_rps_number_does_not_exist_yet/generates_NFSeCarioca.yml +22 -74
  16. data/spec/fixtures/vcr_cassettes/NFSeCarioca_GerarNFSe/_call/when_NfseCarioca_has_only_the_minimum_values/generates_NfseCarioca.yml +20 -59
  17. data/spec/lib/nfse_carioca/cancelar_nfse_spec.rb +1 -9
  18. data/spec/lib/nfse_carioca/gerar_nfse_spec.rb +58 -52
  19. data/spec/spec_helper.rb +17 -0
  20. metadata +23 -8
  21. data/spec/support/helpers.rb +0 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 144bc1c5f40f4761c53549cd2b02af153018a37f
4
- data.tar.gz: 464eaa251f98e347b641e7c77496919ac773b124
3
+ metadata.gz: 6282479d661761e2fe03193f119ad2566db6b95b
4
+ data.tar.gz: 63b0cef1b5d02b174b4173039a4d8838133acd8f
5
5
  SHA512:
6
- metadata.gz: 9d623d7da2ece8080bf77720cc54737ec0bf61d70aa78055b874f7fa95a2f0192d07bd5693e8963946b35c6c2fe53756a8ddf0dba37b9182c7dcd5d6c0a3ee95
7
- data.tar.gz: e32dd235ca75c34bc29a67e717619d0bf33f6a84a35a26854f77a0491846deb5fd27acf427fa6c712dfdb068e1c9b914812bde3e2a9927ec8e3fa42d333223f4
6
+ metadata.gz: ab2714d18995c0600253b61301e69ff52446b535d3814f32b374ff3e009c8db5caf89ed62059dfa0a2d74c1270deb1684ffc3293a5f78c9a91f1def502e24023
7
+ data.tar.gz: cb1492eb526f16c7826e2dfc3e725a75659a43a92c57b098f2105c391544de2f8a3d819a94e7b38e3c633ad802e0f3ac260b3512730f7e0cac9d7514dd779fae
data/.gitignore CHANGED
@@ -17,5 +17,6 @@ mkmf.log
17
17
  *.pfx
18
18
  *.gem
19
19
 
20
+ .env
20
21
  .ruby-version
21
22
  .ruby-gemset
data/lib/nfse_carioca.rb CHANGED
@@ -1,4 +1,6 @@
1
1
  require "ostruct"
2
+ require "active_model"
3
+
2
4
  require "nfse_carioca/version"
3
5
  require "nfse_carioca/configuration"
4
6
  require "nfse_carioca/client"
@@ -6,6 +8,8 @@ require "nfse_carioca/response"
6
8
  require "nfse_carioca/gerar_nfse"
7
9
  require "nfse_carioca/cancelar_nfse"
8
10
 
11
+ HTTPI.adapter = :net_http
12
+
9
13
  module NfseCarioca
10
14
  def self.configure(&block)
11
15
  yield configuration
@@ -32,6 +32,10 @@ module NfseCarioca
32
32
  def error_message
33
33
  content["ListaMensagemRetorno"]["MensagemRetorno"]["Mensagem"] if error?
34
34
  end
35
+
36
+ def error_code
37
+ content["ListaMensagemRetorno"]["MensagemRetorno"]["Codigo"] if error?
38
+ end
35
39
  end
36
40
  end
37
41
  end
@@ -5,93 +5,129 @@ module NfseCarioca
5
5
  end
6
6
 
7
7
  def to_xml
8
- xml = Builder::XmlMarkup.new(indent: 2)
9
- xml.instruct!
10
- xml.GerarNfseEnvio(xmlns: "http://notacarioca.rio.gov.br/WSNacional/XSD/1/nfse_pcrj_v01.xsd") do |gerar_nfse_envio|
11
- gerar_nfse_envio.Rps do |rps|
12
- rps.InfRps(xmlns: "http://www.abrasf.org.br/ABRASF/arquivos/nfse.xsd", Id: @invoice[:identification_number]) do |inf_rps|
13
- inf_rps.IdentificacaoRps do |identificacao_rps|
14
- identificacao_rps.Numero @invoice[:identification_number]
15
- identificacao_rps.Serie NfseCarioca.configuration.rps_serie
16
- identificacao_rps.Tipo NfseCarioca.configuration.rps_tipo
17
- end
18
-
19
- inf_rps.DataEmissao Time.now.strftime("%Y-%m-%dT%H:%M:%S")
20
- inf_rps.NaturezaOperacao NfseCarioca.configuration.rps_natureza_operacao
21
- inf_rps.OptanteSimplesNacional NfseCarioca.configuration.rps_optante_simples_nacional
22
- inf_rps.IncentivadorCultural NfseCarioca.configuration.rps_incentivador_cultural
23
- inf_rps.Status 1
24
- inf_rps.Servico do |servico|
25
- servico.Valores do |valores|
26
- valores.ValorServicos @invoice[:total]
27
- valores.ValorPis NfseCarioca.configuration.valor_pis
28
- valores.ValorCofins NfseCarioca.configuration.valor_cofins
29
- valores.ValorInss NfseCarioca.configuration.valor_inss
30
- valores.ValorIr NfseCarioca.configuration.valor_ir
31
- valores.ValorCsll NfseCarioca.configuration.valor_csll
32
- valores.IssRetido NfseCarioca.configuration.iss_retido
33
- valores.ValorIss NfseCarioca.configuration.valor_iss
34
- valores.Aliquota NfseCarioca.configuration.valor_aliquota
35
- end
36
- servico.ItemListaServico NfseCarioca.configuration.item_lista_servico
37
-
38
- tributacao = NfseCarioca.configuration.codigo_tributacao_municipio
39
-
40
- if @invoice[:tax_benefit]
41
- "#{@invoice[:tax_benefit]}#{tributacao}"
42
- end
43
-
44
- servico.CodigoTributacaoMunicipio tributacao
45
- servico.Discriminacao @invoice[:description]
46
- servico.CodigoMunicipio NfseCarioca.configuration.codigo_municipio
47
- end
48
- inf_rps.Prestador do |prestador|
49
- prestador.Cnpj NfseCarioca.configuration.cnpj
50
- prestador.InscricaoMunicipal NfseCarioca.configuration.inscricao_municipal
51
- end
52
-
53
- inf_rps.Tomador do |tomador|
54
- if @invoice[:customer][:document_type]
55
- tomador.IdentificacaoTomador do |identificacao_tomador|
56
- identificacao_tomador.CpfCnpj do |cpf_cnpj|
57
- cpf_cnpj.tag!(@invoice[:customer][:document_type], @invoice[:customer][:document_number])
58
- end
59
- end
60
- end
61
-
62
- tomador.RazaoSocial @invoice[:customer][:name]
63
-
64
- if @invoice[:customer][:address]
65
- tomador.Endereco do |endereco|
66
- endereco.Endereco @invoice[:customer][:address][:street]
67
- endereco.Numero @invoice[:customer][:address][:number]
68
-
69
- complement = @invoice[:customer][:address][:complement]
70
-
71
- if !(complement.nil? || complement.empty?)
72
- endereco.Complemento complement
73
- end
74
-
75
- endereco.Bairro @invoice[:customer][:address][:neighborhood]
76
- endereco.CodigoMunicipio @invoice[:customer][:address][:city_ibge_code]
77
- endereco.Uf @invoice[:customer][:address][:state_code]
78
- endereco.Cep @invoice[:customer][:address][:zipcode]
79
- end
80
- end
81
-
82
- tomador.Contato do |contato|
83
- phone_number = @invoice[:customer][:phone_number]
84
-
85
- if !(phone_number.nil? || phone_number.empty?)
86
- contato.Telefone phone_number
87
- end
88
-
89
- contato.Email @invoice[:customer][:email]
90
- end
91
- end
92
- end
8
+ Gyoku.xml(
9
+ "GerarNfseEnvio" => {
10
+ "@xmlns" => "http://notacarioca.rio.gov.br/WSNacional/XSD/1/nfse_pcrj_v01.xsd",
11
+ "Rps" => {
12
+ "InfRps" => {
13
+ "@xmlns" => "http://www.abrasf.org.br/ABRASF/arquivos/nfse.xsd",
14
+ "@Id" => @invoice[:identification_number],
15
+ "IdentificacaoRps" => {
16
+ "Numero" => @invoice[:identification_number],
17
+ "Serie" => NfseCarioca.configuration.rps_serie,
18
+ "Tipo" => NfseCarioca.configuration.rps_tipo
19
+ },
20
+
21
+ "DataEmissao" => Time.now.strftime("%Y-%m-%dT%H:%M:%S"),
22
+ "NaturezaOperacao" => NfseCarioca.configuration.rps_natureza_operacao,
23
+ "OptanteSimplesNacional" => NfseCarioca.configuration.rps_optante_simples_nacional,
24
+ "IncentivadorCultural" => NfseCarioca.configuration.rps_incentivador_cultural,
25
+ "Status" => 1,
26
+
27
+ "Servico" => {
28
+ "Valores" => {
29
+ "ValorServicos" => @invoice[:total],
30
+ "ValorPis" => NfseCarioca.configuration.valor_pis,
31
+ "ValorCofins" => NfseCarioca.configuration.valor_cofins,
32
+ "ValorInss" => NfseCarioca.configuration.valor_inss,
33
+ "ValorIr" => NfseCarioca.configuration.valor_ir,
34
+ "ValorCsll" => NfseCarioca.configuration.valor_csll,
35
+ "IssRetido" => NfseCarioca.configuration.iss_retido,
36
+ "ValorIss" => NfseCarioca.configuration.valor_iss,
37
+ "Aliquota" => NfseCarioca.configuration.valor_aliquota
38
+ },
39
+
40
+ "ItemListaServico" => NfseCarioca.configuration.item_lista_servico,
41
+
42
+ "CodigoTributacaoMunicipio" => tributacao,
43
+ "Discriminacao" => @invoice[:description],
44
+ "CodigoMunicipio" => NfseCarioca.configuration.codigo_municipio
45
+ },
46
+
47
+ "Prestador" => {
48
+ "Cnpj" => NfseCarioca.configuration.cnpj,
49
+ "InscricaoMunicipal" => NfseCarioca.configuration.inscricao_municipal
50
+ },
51
+
52
+ "Tomador" => tomador
53
+ }
54
+ }
55
+ }
56
+ )
57
+ end
58
+
59
+ def tributacao
60
+ tributacao = NfseCarioca.configuration.codigo_tributacao_municipio
61
+
62
+ if @invoice[:tax_benefit]
63
+ "#{@invoice[:tax_benefit]}#{tributacao}"
64
+ else
65
+ tributacao
66
+ end
67
+ end
68
+
69
+ def phone_number
70
+ number = @invoice[:customer][:phone_number].to_s.scan(/\d/).join.to_i.to_s
71
+
72
+ if number.size > 11
73
+ limit = number.size - 10
74
+ number[limit..11]
75
+ else
76
+ number
77
+ end
78
+ end
79
+
80
+ def complement
81
+
82
+ end
83
+
84
+ def document_type
85
+ @invoice[:customer][:document_type]
86
+ end
87
+
88
+ def document_number
89
+ @invoice[:customer][:document_number]
90
+ end
91
+
92
+ def tomador
93
+ xml = {}
94
+
95
+ if document_type.present?
96
+ xml["IdentificacaoTomador"] = {
97
+ "CpfCnpj" => { document_type => document_number }
98
+ }
99
+ end
100
+
101
+ if @invoice[:customer][:name].present?
102
+ xml["RazaoSocial"] = @invoice[:customer][:name]
103
+ end
104
+
105
+ if @invoice[:customer][:address].present?
106
+ xml["Endereco"] = {
107
+ "Endereco" => @invoice[:customer][:address][:street],
108
+ "Numero" => @invoice[:customer][:address][:number]
109
+ }
110
+
111
+ if @invoice[:customer][:address][:complement].present?
112
+ xml["Endereco"]["Complemento"] = @invoice[:customer][:address][:complement]
93
113
  end
114
+
115
+ xml["Endereco"]["Bairro"] = @invoice[:customer][:address][:neighborhood]
116
+ xml["Endereco"]["CodigoMunicipio"] = @invoice[:customer][:address][:city_ibge_code]
117
+ xml["Endereco"]["Uf"] = @invoice[:customer][:address][:state_code]
118
+ xml["Endereco"]["Cep"] = @invoice[:customer][:address][:zipcode].scan(/\d/).join
119
+ end
120
+
121
+ if phone_number.present?
122
+ xml["Contato"] = {
123
+ "Telefone" => phone_number,
124
+ "Email" => @invoice[:customer][:email]
125
+ }
126
+ else
127
+ xml["Contato"] = { "Email" => @invoice[:customer][:email] }
94
128
  end
129
+
130
+ xml
95
131
  end
96
132
  end
97
133
  end
@@ -1,3 +1,3 @@
1
1
  module NfseCarioca
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
data/nfse_carioca.gemspec CHANGED
@@ -16,8 +16,8 @@ Gem::Specification.new do |s|
16
16
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
17
  s.require_paths = ["lib"]
18
18
 
19
- s.add_dependency "savon", "~> 2.9.0"
20
- s.add_dependency "builder", "~> 3.2.2"
19
+ s.add_dependency "savon", "~> 2.9"
20
+ s.add_dependency "activemodel", "~> 4.0"
21
21
 
22
22
  s.add_development_dependency "bundler", "~> 1.7"
23
23
  s.add_development_dependency "rake", "~> 10.0"
@@ -25,4 +25,5 @@ Gem::Specification.new do |s|
25
25
  s.add_development_dependency "pry"
26
26
  s.add_development_dependency "vcr"
27
27
  s.add_development_dependency "webmock"
28
+ s.add_development_dependency "dotenv"
28
29
  end
@@ -31,7 +31,7 @@ http_interactions:
31
31
  X-Powered-By:
32
32
  - ASP.NET
33
33
  Date:
34
- - Thu, 05 Feb 2015 05:20:38 GMT
34
+ - Mon, 13 Apr 2015 20:45:52 GMT
35
35
  Content-Length:
36
36
  - '1338'
37
37
  body:
@@ -169,7 +169,7 @@ http_interactions:
169
169
  \ <soap:address location=\"https://homologacao.notacarioca.rio.gov.br/WSNacional/nfse.asmx\"
170
170
  />\r\n </wsdl:port>\r\n </wsdl:service>\r\n</wsdl:definitions>"
171
171
  http_version:
172
- recorded_at: Thu, 05 Feb 2015 05:20:37 GMT
172
+ recorded_at: Mon, 13 Apr 2015 20:45:51 GMT
173
173
  - request:
174
174
  method: post
175
175
  uri: https://homologacao.notacarioca.rio.gov.br/WSNacional/nfse.asmx
@@ -222,7 +222,7 @@ http_interactions:
222
222
  X-Powered-By:
223
223
  - ASP.NET
224
224
  Date:
225
- - Thu, 05 Feb 2015 05:20:43 GMT
225
+ - Mon, 13 Apr 2015 20:45:54 GMT
226
226
  Content-Length:
227
227
  - '530'
228
228
  body:
@@ -249,5 +249,5 @@ http_interactions:
249
249
  c2VSZXNwb3N0YSZndDs8L291dHB1dFhNTD48L0NhbmNlbGFyTmZzZVJlc3Bv
250
250
  bnNlPjwvc29hcDpCb2R5Pjwvc29hcDpFbnZlbG9wZT4=
251
251
  http_version:
252
- recorded_at: Thu, 05 Feb 2015 05:20:41 GMT
252
+ recorded_at: Mon, 13 Apr 2015 20:45:52 GMT
253
253
  recorded_with: VCR 2.9.3
@@ -31,7 +31,7 @@ http_interactions:
31
31
  X-Powered-By:
32
32
  - ASP.NET
33
33
  Date:
34
- - Thu, 05 Feb 2015 05:20:37 GMT
34
+ - Mon, 13 Apr 2015 20:45:54 GMT
35
35
  Content-Length:
36
36
  - '1338'
37
37
  body:
@@ -169,7 +169,7 @@ http_interactions:
169
169
  \ <soap:address location=\"https://homologacao.notacarioca.rio.gov.br/WSNacional/nfse.asmx\"
170
170
  />\r\n </wsdl:port>\r\n </wsdl:service>\r\n</wsdl:definitions>"
171
171
  http_version:
172
- recorded_at: Thu, 05 Feb 2015 05:20:35 GMT
172
+ recorded_at: Mon, 13 Apr 2015 20:45:53 GMT
173
173
  - request:
174
174
  method: post
175
175
  uri: https://homologacao.notacarioca.rio.gov.br/WSNacional/nfse.asmx
@@ -222,7 +222,7 @@ http_interactions:
222
222
  X-Powered-By:
223
223
  - ASP.NET
224
224
  Date:
225
- - Thu, 05 Feb 2015 05:20:38 GMT
225
+ - Mon, 13 Apr 2015 20:45:56 GMT
226
226
  Content-Length:
227
227
  - '530'
228
228
  body:
@@ -249,5 +249,5 @@ http_interactions:
249
249
  c2VSZXNwb3N0YSZndDs8L291dHB1dFhNTD48L0NhbmNlbGFyTmZzZVJlc3Bv
250
250
  bnNlPjwvc29hcDpCb2R5Pjwvc29hcDpFbnZlbG9wZT4=
251
251
  http_version:
252
- recorded_at: Thu, 05 Feb 2015 05:20:37 GMT
252
+ recorded_at: Mon, 13 Apr 2015 20:45:55 GMT
253
253
  recorded_with: VCR 2.9.3
@@ -31,7 +31,7 @@ http_interactions:
31
31
  X-Powered-By:
32
32
  - ASP.NET
33
33
  Date:
34
- - Thu, 05 Feb 2015 05:20:43 GMT
34
+ - Mon, 13 Apr 2015 20:46:46 GMT
35
35
  Content-Length:
36
36
  - '1338'
37
37
  body:
@@ -169,7 +169,7 @@ http_interactions:
169
169
  \ <soap:address location=\"https://homologacao.notacarioca.rio.gov.br/WSNacional/nfse.asmx\"
170
170
  />\r\n </wsdl:port>\r\n </wsdl:service>\r\n</wsdl:definitions>"
171
171
  http_version:
172
- recorded_at: Thu, 05 Feb 2015 05:20:42 GMT
172
+ recorded_at: Mon, 13 Apr 2015 20:46:45 GMT
173
173
  - request:
174
174
  method: post
175
175
  uri: https://homologacao.notacarioca.rio.gov.br/WSNacional/nfse.asmx
@@ -179,9 +179,9 @@ http_interactions:
179
179
  <?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://notacarioca.rio.gov.br/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><CancelarNfseRequest><inputXML>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
180
180
  &lt;CancelarNfseEnvio xmlns=&quot;http://www.abrasf.org.br/ABRASF/arquivos/nfse.xsd&quot;&gt;
181
181
  &lt;Pedido xmlns=&quot;http://www.abrasf.org.br/ABRASF/arquivos/nfse.xsd&quot;&gt;
182
- &lt;InfPedidoCancelamento Id=&quot;Cancelamento_NF13&quot;&gt;
182
+ &lt;InfPedidoCancelamento Id=&quot;Cancelamento_NF70&quot;&gt;
183
183
  &lt;IdentificacaoNfse&gt;
184
- &lt;Numero&gt;13&lt;/Numero&gt;
184
+ &lt;Numero&gt;70&lt;/Numero&gt;
185
185
  &lt;Cnpj&gt;12390095000186&lt;/Cnpj&gt;
186
186
  &lt;InscricaoMunicipal&gt;04807995&lt;/InscricaoMunicipal&gt;
187
187
  &lt;CodigoMunicipio&gt;3304557&lt;/CodigoMunicipio&gt;
@@ -222,9 +222,9 @@ http_interactions:
222
222
  X-Powered-By:
223
223
  - ASP.NET
224
224
  Date:
225
- - Thu, 05 Feb 2015 05:20:44 GMT
225
+ - Mon, 13 Apr 2015 20:46:47 GMT
226
226
  Content-Length:
227
- - '587'
227
+ - '588'
228
228
  body:
229
229
  encoding: ASCII-8BIT
230
230
  string: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
@@ -232,7 +232,7 @@ http_interactions:
232
232
  xmlns="http://notacarioca.rio.gov.br/"><outputXML>&lt;CancelarNfseResposta
233
233
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
234
234
  xmlns="http://www.abrasf.org.br/ABRASF/arquivos/nfse.xsd"&gt;&lt;Cancelamento&gt;&lt;Confirmacao
235
- Id="35571"&gt;&lt;Pedido&gt;&lt;InfPedidoCancelamento Id="35571"&gt;&lt;IdentificacaoNfse&gt;&lt;Numero&gt;13&lt;/Numero&gt;&lt;Cnpj&gt;12390095000186&lt;/Cnpj&gt;&lt;InscricaoMunicipal&gt;4807995&lt;/InscricaoMunicipal&gt;&lt;CodigoMunicipio&gt;3304557&lt;/CodigoMunicipio&gt;&lt;/IdentificacaoNfse&gt;&lt;CodigoCancelamento&gt;9&lt;/CodigoCancelamento&gt;&lt;/InfPedidoCancelamento&gt;&lt;/Pedido&gt;&lt;DataHoraCancelamento&gt;2015-02-05T03:20:42&lt;/DataHoraCancelamento&gt;&lt;/Confirmacao&gt;&lt;/Cancelamento&gt;&lt;/CancelarNfseResposta&gt;</outputXML></CancelarNfseResponse></soap:Body></soap:Envelope>
235
+ Id="35903"&gt;&lt;Pedido&gt;&lt;InfPedidoCancelamento Id="35903"&gt;&lt;IdentificacaoNfse&gt;&lt;Numero&gt;70&lt;/Numero&gt;&lt;Cnpj&gt;12390095000186&lt;/Cnpj&gt;&lt;InscricaoMunicipal&gt;4807995&lt;/InscricaoMunicipal&gt;&lt;CodigoMunicipio&gt;3304557&lt;/CodigoMunicipio&gt;&lt;/IdentificacaoNfse&gt;&lt;CodigoCancelamento&gt;9&lt;/CodigoCancelamento&gt;&lt;/InfPedidoCancelamento&gt;&lt;/Pedido&gt;&lt;DataHoraCancelamento&gt;2015-04-13T17:46:46&lt;/DataHoraCancelamento&gt;&lt;/Confirmacao&gt;&lt;/Cancelamento&gt;&lt;/CancelarNfseResposta&gt;</outputXML></CancelarNfseResponse></soap:Body></soap:Envelope>
236
236
  http_version:
237
- recorded_at: Thu, 05 Feb 2015 05:20:43 GMT
237
+ recorded_at: Mon, 13 Apr 2015 20:46:46 GMT
238
238
  recorded_with: VCR 2.9.3
@@ -31,7 +31,7 @@ http_interactions:
31
31
  X-Powered-By:
32
32
  - ASP.NET
33
33
  Date:
34
- - Thu, 05 Feb 2015 19:59:03 GMT
34
+ - Mon, 13 Apr 2015 20:45:45 GMT
35
35
  Content-Length:
36
36
  - '1338'
37
37
  body:
@@ -169,80 +169,28 @@ http_interactions:
169
169
  \ <soap:address location=\"https://homologacao.notacarioca.rio.gov.br/WSNacional/nfse.asmx\"
170
170
  />\r\n </wsdl:port>\r\n </wsdl:service>\r\n</wsdl:definitions>"
171
171
  http_version:
172
- recorded_at: Thu, 05 Feb 2015 19:59:02 GMT
172
+ recorded_at: Mon, 13 Apr 2015 20:45:44 GMT
173
173
  - request:
174
174
  method: post
175
175
  uri: https://homologacao.notacarioca.rio.gov.br/WSNacional/nfse.asmx
176
176
  body:
177
177
  encoding: UTF-8
178
- string: |-
179
- <?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://notacarioca.rio.gov.br/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><GerarNfseRequest><inputXML>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
180
- &lt;GerarNfseEnvio xmlns=&quot;http://notacarioca.rio.gov.br/WSNacional/XSD/1/nfse_pcrj_v01.xsd&quot;&gt;
181
- &lt;Rps&gt;
182
- &lt;InfRps xmlns=&quot;http://www.abrasf.org.br/ABRASF/arquivos/nfse.xsd&quot; Id=&quot;1030&quot;&gt;
183
- &lt;IdentificacaoRps&gt;
184
- &lt;Numero&gt;1030&lt;/Numero&gt;
185
- &lt;Serie&gt;A&lt;/Serie&gt;
186
- &lt;Tipo&gt;1&lt;/Tipo&gt;
187
- &lt;/IdentificacaoRps&gt;
188
- &lt;DataEmissao&gt;2015-02-05T17:59:01&lt;/DataEmissao&gt;
189
- &lt;NaturezaOperacao&gt;1&lt;/NaturezaOperacao&gt;
190
- &lt;OptanteSimplesNacional&gt;1&lt;/OptanteSimplesNacional&gt;
191
- &lt;IncentivadorCultural&gt;2&lt;/IncentivadorCultural&gt;
192
- &lt;Status&gt;1&lt;/Status&gt;
193
- &lt;Servico&gt;
194
- &lt;Valores&gt;
195
- &lt;ValorServicos&gt;12.0&lt;/ValorServicos&gt;
196
- &lt;ValorPis&gt;0&lt;/ValorPis&gt;
197
- &lt;ValorCofins&gt;0&lt;/ValorCofins&gt;
198
- &lt;ValorInss&gt;0&lt;/ValorInss&gt;
199
- &lt;ValorIr&gt;0&lt;/ValorIr&gt;
200
- &lt;ValorCsll&gt;0&lt;/ValorCsll&gt;
201
- &lt;IssRetido&gt;2&lt;/IssRetido&gt;
202
- &lt;ValorIss&gt;0&lt;/ValorIss&gt;
203
- &lt;Aliquota&gt;0&lt;/Aliquota&gt;
204
- &lt;/Valores&gt;
205
- &lt;ItemListaServico&gt;0105&lt;/ItemListaServico&gt;
206
- &lt;CodigoTributacaoMunicipio&gt;010501&lt;/CodigoTributacaoMunicipio&gt;
207
- &lt;Discriminacao&gt;Venda do Serviço XYZ.&lt;/Discriminacao&gt;
208
- &lt;CodigoMunicipio&gt;3304557&lt;/CodigoMunicipio&gt;
209
- &lt;/Servico&gt;
210
- &lt;Prestador&gt;
211
- &lt;Cnpj&gt;12390095000186&lt;/Cnpj&gt;
212
- &lt;InscricaoMunicipal&gt;04807995&lt;/InscricaoMunicipal&gt;
213
- &lt;/Prestador&gt;
214
- &lt;Tomador&gt;
215
- &lt;IdentificacaoTomador&gt;
216
- &lt;CpfCnpj&gt;
217
- &lt;Cnpj&gt;98924674000187&lt;/Cnpj&gt;
218
- &lt;/CpfCnpj&gt;
219
- &lt;/IdentificacaoTomador&gt;
220
- &lt;RazaoSocial&gt;XPTO Tecnologia Ltda.&lt;/RazaoSocial&gt;
221
- &lt;Endereco&gt;
222
- &lt;Endereco&gt;Rua qualquer nome&lt;/Endereco&gt;
223
- &lt;Numero&gt;33&lt;/Numero&gt;
224
- &lt;Complemento&gt;Sala 1&lt;/Complemento&gt;
225
- &lt;Bairro&gt;Seu bairro&lt;/Bairro&gt;
226
- &lt;CodigoMunicipio&gt;3550308&lt;/CodigoMunicipio&gt;
227
- &lt;Uf&gt;SP&lt;/Uf&gt;
228
- &lt;Cep&gt;22255777&lt;/Cep&gt;
229
- &lt;/Endereco&gt;
230
- &lt;Contato&gt;
231
- &lt;Telefone&gt;2222-2222&lt;/Telefone&gt;
232
- &lt;Email&gt;customer@example.com&lt;/Email&gt;
233
- &lt;/Contato&gt;
234
- &lt;/Tomador&gt;
235
- &lt;/InfRps&gt;
236
- &lt;/Rps&gt;
237
- &lt;/GerarNfseEnvio&gt;
238
- </inputXML></GerarNfseRequest></soap:Body></soap:Envelope>
178
+ string: <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
179
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://notacarioca.rio.gov.br/"
180
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><GerarNfseRequest><inputXML>&lt;GerarNfseEnvio
181
+ xmlns=&quot;http://notacarioca.rio.gov.br/WSNacional/XSD/1/nfse_pcrj_v01.xsd&quot;&gt;&lt;Rps&gt;&lt;InfRps
182
+ xmlns=&quot;http://www.abrasf.org.br/ABRASF/arquivos/nfse.xsd&quot; Id=&quot;1030&quot;&gt;&lt;IdentificacaoRps&gt;&lt;Numero&gt;1030&lt;/Numero&gt;&lt;Serie&gt;A&lt;/Serie&gt;&lt;Tipo&gt;1&lt;/Tipo&gt;&lt;/IdentificacaoRps&gt;&lt;DataEmissao&gt;2015-04-13T17:45:43&lt;/DataEmissao&gt;&lt;NaturezaOperacao&gt;1&lt;/NaturezaOperacao&gt;&lt;OptanteSimplesNacional&gt;1&lt;/OptanteSimplesNacional&gt;&lt;IncentivadorCultural&gt;2&lt;/IncentivadorCultural&gt;&lt;Status&gt;1&lt;/Status&gt;&lt;Servico&gt;&lt;Valores&gt;&lt;ValorServicos&gt;12.0&lt;/ValorServicos&gt;&lt;ValorPis&gt;0&lt;/ValorPis&gt;&lt;ValorCofins&gt;0&lt;/ValorCofins&gt;&lt;ValorInss&gt;0&lt;/ValorInss&gt;&lt;ValorIr&gt;0&lt;/ValorIr&gt;&lt;ValorCsll&gt;0&lt;/ValorCsll&gt;&lt;IssRetido&gt;2&lt;/IssRetido&gt;&lt;ValorIss&gt;0&lt;/ValorIss&gt;&lt;Aliquota&gt;0&lt;/Aliquota&gt;&lt;/Valores&gt;&lt;ItemListaServico&gt;0105&lt;/ItemListaServico&gt;&lt;CodigoTributacaoMunicipio&gt;010501&lt;/CodigoTributacaoMunicipio&gt;&lt;Discriminacao&gt;Venda
183
+ do Serviço XYZ.&lt;/Discriminacao&gt;&lt;CodigoMunicipio&gt;3304557&lt;/CodigoMunicipio&gt;&lt;/Servico&gt;&lt;Prestador&gt;&lt;Cnpj&gt;12390095000186&lt;/Cnpj&gt;&lt;InscricaoMunicipal&gt;04807995&lt;/InscricaoMunicipal&gt;&lt;/Prestador&gt;&lt;Tomador&gt;&lt;IdentificacaoTomador&gt;&lt;CpfCnpj&gt;&lt;Cnpj&gt;98924674000187&lt;/Cnpj&gt;&lt;/CpfCnpj&gt;&lt;/IdentificacaoTomador&gt;&lt;RazaoSocial&gt;XPTO
184
+ Tecnologia Ltda.&lt;/RazaoSocial&gt;&lt;Endereco&gt;&lt;Endereco&gt;Rua qualquer
185
+ nome&lt;/Endereco&gt;&lt;Numero&gt;33&lt;/Numero&gt;&lt;Complemento&gt;Sala
186
+ 1&lt;/Complemento&gt;&lt;Bairro&gt;Seu bairro&lt;/Bairro&gt;&lt;CodigoMunicipio&gt;3550308&lt;/CodigoMunicipio&gt;&lt;Uf&gt;SP&lt;/Uf&gt;&lt;Cep&gt;22255777&lt;/Cep&gt;&lt;/Endereco&gt;&lt;Contato&gt;&lt;Telefone&gt;2222-2222&lt;/Telefone&gt;&lt;Email&gt;customer@example.com&lt;/Email&gt;&lt;/Contato&gt;&lt;/Tomador&gt;&lt;/InfRps&gt;&lt;/Rps&gt;&lt;/GerarNfseEnvio&gt;</inputXML></GerarNfseRequest></soap:Body></soap:Envelope>
239
187
  headers:
240
188
  Soapaction:
241
189
  - '"http://notacarioca.rio.gov.br/GerarNfse"'
242
190
  Content-Type:
243
191
  - text/xml;charset=UTF-8
244
192
  Content-Length:
245
- - '2989'
193
+ - '2420'
246
194
  Accept-Encoding:
247
195
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
248
196
  Accept:
@@ -267,7 +215,7 @@ http_interactions:
267
215
  X-Powered-By:
268
216
  - ASP.NET
269
217
  Date:
270
- - Thu, 05 Feb 2015 19:59:03 GMT
218
+ - Mon, 13 Apr 2015 20:45:45 GMT
271
219
  Content-Length:
272
220
  - '575'
273
221
  body:
@@ -296,5 +244,5 @@ http_interactions:
296
244
  PC9HZXJhck5mc2VSZXNwb25zZT48L3NvYXA6Qm9keT48L3NvYXA6RW52ZWxv
297
245
  cGU+
298
246
  http_version:
299
- recorded_at: Thu, 05 Feb 2015 19:59:02 GMT
247
+ recorded_at: Mon, 13 Apr 2015 20:45:45 GMT
300
248
  recorded_with: VCR 2.9.3