br_nfe 1.1.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (257) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +5 -0
  3. data/.travis.yml +8 -0
  4. data/Gemfile +16 -0
  5. data/Gemfile.lock +27 -3
  6. data/LICENSE +1 -1
  7. data/README.markdown +10 -12
  8. data/Rakefile +13 -0
  9. data/br_nfe.gemspec +18 -21
  10. data/lib/br_nfe/active_model_base.rb +7 -1
  11. data/lib/br_nfe/base.rb +175 -37
  12. data/lib/br_nfe/endereco.rb +7 -1
  13. data/lib/br_nfe/helper/have_rps.rb +1 -1
  14. data/lib/br_nfe/helper/values_ts/service_v1.rb +313 -0
  15. data/lib/br_nfe/response/service/build_response.rb +286 -0
  16. data/lib/br_nfe/response/service/default.rb +185 -0
  17. data/lib/br_nfe/{servico/response → response/service}/nota_fiscal.rb +11 -10
  18. data/lib/br_nfe/response/service/paths/base.rb +93 -0
  19. data/lib/br_nfe/response/service/paths/v1/servico_cancelar_nfse_resposta.rb +22 -0
  20. data/lib/br_nfe/response/service/paths/v1/servico_consultar_lote_rps_resposta.rb +25 -0
  21. data/lib/br_nfe/response/service/paths/v1/servico_consultar_nfse_resposta.rb +25 -0
  22. data/lib/br_nfe/response/service/paths/v1/servico_consultar_nfse_rps_resposta.rb +25 -0
  23. data/lib/br_nfe/response/service/paths/v1/servico_consultar_situacao_lote_rps_resposta.rb +31 -0
  24. data/lib/br_nfe/response/service/paths/v1/servico_enviar_lote_rps_resposta.rb +36 -0
  25. data/lib/br_nfe/response/service/paths/v1/tc_nfse.rb +127 -0
  26. data/lib/br_nfe/service/base.rb +59 -0
  27. data/lib/br_nfe/service/betha/base.rb +8 -0
  28. data/lib/br_nfe/service/betha/v1/cancelamento_nfs.rb +39 -0
  29. data/lib/br_nfe/service/betha/v1/consulta_lote_rps.rb +34 -0
  30. data/lib/br_nfe/service/betha/v1/consulta_nfs_por_rps.rb +32 -0
  31. data/lib/br_nfe/service/betha/v1/consulta_nfse.rb +32 -0
  32. data/lib/br_nfe/service/betha/v1/consulta_situacao_lote_rps.rb +30 -0
  33. data/lib/br_nfe/service/betha/v1/gateway.rb +21 -0
  34. data/lib/br_nfe/service/betha/v1/recepcao_lote_rps.rb +37 -0
  35. data/lib/br_nfe/service/betha/v1/response_paths/servico_consultar_lote_rps_resposta.rb +19 -0
  36. data/lib/br_nfe/service/betha/v1/response_paths/servico_consultar_nfse_resposta.rb +17 -0
  37. data/lib/br_nfe/service/betha/v1/response_paths/servico_consultar_nfse_rps_resposta.rb +17 -0
  38. data/lib/br_nfe/service/concerns/rules/cancelamento_nfs.rb +20 -0
  39. data/lib/br_nfe/service/concerns/rules/consulta_nfs_por_rps.rb +18 -0
  40. data/lib/br_nfe/service/concerns/rules/consulta_nfse.rb +29 -0
  41. data/lib/br_nfe/service/concerns/rules/recepcao_lote_rps.rb +50 -0
  42. data/lib/br_nfe/{servico → service}/intermediario.rb +1 -1
  43. data/lib/br_nfe/service/item.rb +70 -0
  44. data/lib/br_nfe/service/rps.rb +231 -0
  45. data/lib/br_nfe/service/sc/florianopolis/base.rb +25 -0
  46. data/lib/br_nfe/service/sc/florianopolis/cancellation.rb +30 -0
  47. data/lib/br_nfe/service/sc/florianopolis/emission_rps.rb +19 -0
  48. data/lib/br_nfe/service/sc/florianopolis/xml/_address.xml.slim +21 -0
  49. data/lib/br_nfe/service/sc/florianopolis/xml/_contact.xml.slim +3 -0
  50. data/lib/br_nfe/service/sc/florianopolis/xml/_service_item.xml.slim +9 -0
  51. data/lib/br_nfe/service/sc/florianopolis/xml/cancellation.xml.slim +6 -0
  52. data/lib/br_nfe/service/sc/florianopolis/xml/inf_requisicao.xml.slim +55 -0
  53. data/lib/br_nfe/service/sc/gaspar/cancela_nfse.rb +13 -0
  54. data/lib/br_nfe/service/sc/gaspar/consulta_lote_rps.rb +13 -0
  55. data/lib/br_nfe/service/sc/gaspar/consulta_nfs_por_rps.rb +13 -0
  56. data/lib/br_nfe/service/sc/gaspar/consulta_nfse.rb +17 -0
  57. data/lib/br_nfe/service/sc/gaspar/consulta_situacao_lote_rps.rb +13 -0
  58. data/lib/br_nfe/service/sc/gaspar/recepcao_lote_rps.rb +13 -0
  59. data/lib/br_nfe/service/sc/gaspar/recepcao_lote_rps_limitado.rb +13 -0
  60. data/lib/br_nfe/service/thema/v1/base.rb +55 -0
  61. data/lib/br_nfe/service/thema/v1/cancela_nfse.rb +48 -0
  62. data/lib/br_nfe/service/thema/v1/consulta_lote_rps.rb +49 -0
  63. data/lib/br_nfe/service/thema/v1/consulta_nfs_por_rps.rb +48 -0
  64. data/lib/br_nfe/service/thema/v1/consulta_nfse.rb +47 -0
  65. data/lib/br_nfe/service/thema/v1/consulta_situacao_lote_rps.rb +46 -0
  66. data/lib/br_nfe/service/thema/v1/recepcao_lote_rps.rb +51 -0
  67. data/lib/br_nfe/service/thema/v1/recepcao_lote_rps_limitado.rb +30 -0
  68. data/lib/br_nfe/service/xml/v1/_tc_contato.xml.slim +7 -0
  69. data/lib/br_nfe/service/xml/v1/_tc_cpf_cnpj.xml.slim +5 -0
  70. data/lib/br_nfe/service/xml/v1/_tc_dados_construcao_civil.xml.slim +2 -0
  71. data/lib/br_nfe/service/xml/v1/_tc_dados_prestador.xml.slim +15 -0
  72. data/lib/br_nfe/service/xml/v1/_tc_dados_servico.xml.slim +14 -0
  73. data/lib/br_nfe/service/xml/v1/_tc_dados_tomador.xml.slim +15 -0
  74. data/lib/br_nfe/service/xml/v1/_tc_endereco.xml.slim +13 -0
  75. data/lib/br_nfe/service/xml/v1/_tc_identificacao_intermediario_servico.xml.slim +7 -0
  76. data/lib/br_nfe/service/xml/v1/_tc_identificacao_nfse.xml.slim +7 -0
  77. data/lib/br_nfe/service/xml/v1/_tc_identificacao_orgao_gerador.xml.slim +8 -0
  78. data/lib/br_nfe/service/xml/v1/_tc_identificacao_prestador.xml.slim +3 -0
  79. data/lib/br_nfe/service/xml/v1/_tc_identificacao_rps.xml.slim +16 -0
  80. data/lib/br_nfe/service/xml/v1/_tc_identificacao_tomador.xml.slim +4 -0
  81. data/lib/br_nfe/service/xml/v1/_tc_inf_pedido_cancelamento.xml.slim +4 -0
  82. data/lib/br_nfe/service/xml/v1/_tc_inf_rps.xml.slim +47 -0
  83. data/lib/br_nfe/service/xml/v1/_tc_lote_rps.xml.slim +9 -0
  84. data/lib/br_nfe/service/xml/v1/_tc_pedido_cancelamento.xml.slim +4 -0
  85. data/lib/br_nfe/service/xml/v1/_tc_rps.xml.slim +8 -0
  86. data/lib/br_nfe/service/xml/v1/_tc_valores.xml.slim +48 -0
  87. data/lib/br_nfe/service/xml/v1/servico_cancelar_nfse_envio.xml.slim +9 -0
  88. data/lib/br_nfe/service/xml/v1/servico_consultar_lote_rps_envio.xml.slim +4 -0
  89. data/lib/br_nfe/service/xml/v1/servico_consultar_nfse_envio.xml.slim +19 -0
  90. data/lib/br_nfe/service/xml/v1/servico_consultar_nfse_rps_envio.xml.slim +5 -0
  91. data/lib/br_nfe/service/xml/v1/servico_consultar_situacao_lote_rps_envio.xml.slim +4 -0
  92. data/lib/br_nfe/service/xml/v1/servico_enviar_lote_rps_envio.xml.slim +9 -0
  93. data/lib/br_nfe/version.rb +2 -2
  94. data/lib/br_nfe/xml/_signed_info_sh1.xml.slim +9 -0
  95. data/lib/br_nfe/xml/signature_sh1.xml.slim +12 -0
  96. data/lib/br_nfe/xml/soap_env.xml.slim +3 -0
  97. data/lib/br_nfe.rb +72 -20
  98. data/test/br_nfe/base_test.rb +257 -108
  99. data/test/br_nfe/helper/have_intermediario_test.rb +2 -2
  100. data/test/br_nfe/helper/have_rps_test.rb +4 -4
  101. data/test/br_nfe/response/service/build_response_test.rb +377 -0
  102. data/test/br_nfe/response/service/default_test.rb +218 -0
  103. data/test/br_nfe/{servico/response → response/service}/nota_fiscal_test.rb +2 -2
  104. data/test/br_nfe/response/service/paths/base_test.rb +199 -0
  105. data/test/br_nfe/response/service/paths/v1/servico_cancelar_nfse_resposta_test.rb +25 -0
  106. data/test/br_nfe/response/service/paths/v1/servico_consultar_lote_rps_resposta_test.rb +30 -0
  107. data/test/br_nfe/response/service/paths/v1/servico_consultar_nfse_resposta_test.rb +30 -0
  108. data/test/br_nfe/response/service/paths/v1/servico_consultar_nfse_rps_resposta_test.rb +30 -0
  109. data/test/br_nfe/response/service/paths/v1/servico_consultar_situacao_lote_rps_resposta_test.rb +30 -0
  110. data/test/br_nfe/response/service/paths/v1/servico_enviar_lote_rps_resposta_test.rb +34 -0
  111. data/test/br_nfe/response/service/paths/v1/tc_nfse_test.rb +122 -0
  112. data/test/br_nfe/service/base_test.rb +138 -0
  113. data/test/br_nfe/service/betha/base_test.rb +9 -0
  114. data/test/br_nfe/service/betha/v1/cancelamento_nfs_test.rb +60 -0
  115. data/test/br_nfe/service/betha/v1/consulta_lote_rps_test.rb +55 -0
  116. data/test/br_nfe/service/betha/v1/consulta_nfs_por_rps_test.rb +55 -0
  117. data/test/br_nfe/service/betha/v1/consulta_nfse_test.rb +53 -0
  118. data/test/br_nfe/service/betha/v1/consulta_situacao_lote_rps_test.rb +49 -0
  119. data/test/br_nfe/service/betha/v1/gateway_test.rb +35 -0
  120. data/test/br_nfe/service/betha/v1/recepcao_lote_rps_test.rb +84 -0
  121. data/test/br_nfe/service/betha/v1/response_paths/servico_consultar_lote_rps_resposta_test.rb +16 -0
  122. data/test/br_nfe/service/betha/v1/response_paths/servico_consultar_nfse_resposta_test.rb +16 -0
  123. data/test/br_nfe/service/betha/v1/response_paths/servico_consultar_nfse_rps_resposta_test.rb +16 -0
  124. data/test/br_nfe/service/betha/v1/xsd/TiposNFe_v01.xsd +583 -0
  125. data/test/br_nfe/service/betha/v1/xsd/nfse_v01.xsd +652 -0
  126. data/test/br_nfe/service/betha/v1/xsd/servico_cancelar_nfse_envio_v01.xsd +17 -0
  127. data/test/br_nfe/service/betha/v1/xsd/servico_consultar_lote_rps_envio_v01.xsd +16 -0
  128. data/test/br_nfe/service/betha/v1/xsd/servico_consultar_nfse_envio_v01.xsd +28 -0
  129. data/test/br_nfe/service/betha/v1/xsd/servico_consultar_nfse_rps_envio_v01.xsd +16 -0
  130. data/test/br_nfe/service/betha/v1/xsd/servico_consultar_situacao_lote_rps_envio_v01.xsd +16 -0
  131. data/test/br_nfe/service/betha/v1/xsd/servico_enviar_lote_rps_envio_v01.xsd +17 -0
  132. data/test/br_nfe/service/betha/v1/xsd/xmldsig-core-schema.xsd +308 -0
  133. data/test/br_nfe/service/betha/v1/xsd/xmldsig-core-schema_v01.xsd +95 -0
  134. data/test/br_nfe/service/concerns/rules/cancelamento_nfs_test.rb +15 -0
  135. data/test/br_nfe/service/concerns/rules/consulta_nfs_por_rps_test.rb +36 -0
  136. data/test/br_nfe/service/concerns/rules/consulta_nfse_test.rb +42 -0
  137. data/test/br_nfe/{servico/base_test.rb → service/concerns/rules/recepcao_lote_rps_test.rb} +12 -4
  138. data/test/br_nfe/{servico → service}/intermediario_test.rb +1 -1
  139. data/test/br_nfe/service/item_test.rb +34 -0
  140. data/test/br_nfe/{servico → service}/rps_test.rb +191 -43
  141. data/test/br_nfe/service/sc/florianopolis/XSD/TiposNFSe_v2.0.xsd +863 -0
  142. data/test/br_nfe/service/sc/florianopolis/XSD/xmldsig-core-schema.xsd +309 -0
  143. data/test/br_nfe/service/sc/florianopolis/base_test.rb +20 -0
  144. data/test/br_nfe/service/sc/florianopolis/cancellation_test.rb +36 -0
  145. data/test/br_nfe/service/sc/florianopolis/emission_rps_test.rb +145 -0
  146. data/test/br_nfe/service/sc/gaspar/cancela_nfse_test.rb +21 -0
  147. data/test/br_nfe/service/sc/gaspar/consulta_nfs_por_rps_test.rb +21 -0
  148. data/test/br_nfe/service/sc/gaspar/consulta_nfse_test.rb +21 -0
  149. data/test/br_nfe/service/sc/gaspar/consulta_situacao_lote_rps_test.rb +21 -0
  150. data/test/br_nfe/service/sc/gaspar/recepcao_lote_rps_limitado_test.rb +22 -0
  151. data/test/br_nfe/service/sc/gaspar/recepcao_lote_rps_test.rb +22 -0
  152. data/test/br_nfe/service/thema/v1/base_test.rb +65 -0
  153. data/test/br_nfe/service/thema/v1/cancela_nfse_test.rb +56 -0
  154. data/test/br_nfe/service/thema/v1/consulta_lote_rps_test.rb +47 -0
  155. data/test/br_nfe/service/thema/v1/consulta_nfs_por_rps_test.rb +50 -0
  156. data/test/br_nfe/service/thema/v1/consulta_nfse_test.rb +50 -0
  157. data/test/br_nfe/service/thema/v1/consulta_situacao_lote_rps_test.rb +47 -0
  158. data/test/br_nfe/service/thema/v1/recepcao_lote_rps_test.rb +62 -0
  159. data/test/br_nfe/service/thema/v1/recepcao_lote_rps_test_limitado.rb +50 -0
  160. data/test/br_nfe/service/thema/v1/xsd/nfse.xsd +656 -0
  161. data/test/br_nfe/service/thema/v1/xsd/xmldsig-core-schema20020212.xsd +318 -0
  162. data/test/br_nfe/service/xsd/v1/nfse.xsd +779 -0
  163. data/test/br_nfe/service/xsd/v1/xmldsig-core-schema20020212.xsd +316 -0
  164. data/test/cert.pfx +0 -0
  165. data/test/factories/base.rb +2 -0
  166. data/test/factories/destinatario.rb +3 -3
  167. data/test/factories/response/service/build_response.rb +5 -0
  168. data/test/factories/response/service/default.rb +10 -0
  169. data/test/factories/{servico/response → response/service}/nota_fiscal.rb +9 -9
  170. data/test/factories/service/base.rb +6 -0
  171. data/test/factories/service/betha/base.rb +4 -0
  172. data/test/factories/service/betha/v1/cancelamento_nfs.rb +9 -0
  173. data/test/factories/{servico → service}/betha/v1/consulta_lote_rps.rb +2 -2
  174. data/test/factories/{servico → service}/betha/v1/consulta_nfs_por_rps.rb +1 -1
  175. data/test/factories/service/betha/v1/consulta_nfse.rb +8 -0
  176. data/test/factories/{servico → service}/betha/v1/consulta_situacao_lote_rps.rb +2 -2
  177. data/test/factories/{servico → service}/betha/v1/gateway.rb +1 -1
  178. data/test/factories/service/betha/v1/recepcao_lote_rps.rb +8 -0
  179. data/test/factories/{servico → service}/intermediario.rb +2 -2
  180. data/test/factories/service/item.rb +12 -0
  181. data/test/factories/service/rps.rb +50 -0
  182. data/test/factories/service/sc/florianopolis/base.rb +5 -0
  183. data/test/factories/service/sc/florianopolis/cancellation.rb +7 -0
  184. data/test/factories/service/sc/florianopolis/emission_rps.rb +7 -0
  185. data/test/factories/service/sc/gaspar/cancela_nfse.rb +9 -0
  186. data/test/factories/service/sc/gaspar/consulta_lote_rps.rb +7 -0
  187. data/test/factories/service/sc/gaspar/consulta_nfs_por_rps.rb +6 -0
  188. data/test/factories/service/sc/gaspar/consulta_nfse.rb +8 -0
  189. data/test/factories/service/sc/gaspar/consulta_situacao_lote_rps.rb +6 -0
  190. data/test/factories/service/sc/gaspar/recepcao_lote_rps.rb +9 -0
  191. data/test/factories/service/sc/gaspar/recepcao_lote_rps_limitado.rb +9 -0
  192. data/test/factories/service/thema/v1/base.rb +7 -0
  193. data/test/factories/service/thema/v1/cancela_nfse.rb +9 -0
  194. data/test/factories/service/thema/v1/consulta_lote_rps.rb +7 -0
  195. data/test/factories/service/thema/v1/consulta_nfs_por_rps.rb +6 -0
  196. data/test/factories/service/thema/v1/consulta_nfse.rb +8 -0
  197. data/test/factories/service/thema/v1/consulta_situacao_lote_rps.rb +6 -0
  198. data/test/factories/service/thema/v1/recepcao_lote_rps.rb +9 -0
  199. data/test/factories/service/thema/v1/recepcao_lote_rps_limitado.rb +8 -0
  200. data/test/test_helper.rb +42 -0
  201. metadata +338 -121
  202. data/lib/br_nfe/servico/base.rb +0 -35
  203. data/lib/br_nfe/servico/betha/base.rb +0 -85
  204. data/lib/br_nfe/servico/betha/build_response.rb +0 -141
  205. data/lib/br_nfe/servico/betha/v1/build_response.rb +0 -121
  206. data/lib/br_nfe/servico/betha/v1/cancelamento_nfs.rb +0 -52
  207. data/lib/br_nfe/servico/betha/v1/consulta_lote_rps.rb +0 -33
  208. data/lib/br_nfe/servico/betha/v1/consulta_nfs_por_rps.rb +0 -37
  209. data/lib/br_nfe/servico/betha/v1/consulta_nfse.rb +0 -51
  210. data/lib/br_nfe/servico/betha/v1/consulta_situacao_lote_rps.rb +0 -18
  211. data/lib/br_nfe/servico/betha/v1/gateway.rb +0 -125
  212. data/lib/br_nfe/servico/betha/v1/recepcao_lote_rps.rb +0 -97
  213. data/lib/br_nfe/servico/betha/v2/build_response.rb +0 -159
  214. data/lib/br_nfe/servico/betha/v2/cancelamento_nfs.rb +0 -30
  215. data/lib/br_nfe/servico/betha/v2/consulta_lote_rps.rb +0 -30
  216. data/lib/br_nfe/servico/betha/v2/consulta_nfse_por_rps.rb +0 -27
  217. data/lib/br_nfe/servico/betha/v2/envio_lote_rps_sincrono.rb +0 -30
  218. data/lib/br_nfe/servico/betha/v2/gateway.rb +0 -230
  219. data/lib/br_nfe/servico/betha/v2/gera_nfse.rb +0 -30
  220. data/lib/br_nfe/servico/betha/v2/recepcao_lote_rps.rb +0 -52
  221. data/lib/br_nfe/servico/betha/v2/substituicao_nfse.rb +0 -43
  222. data/lib/br_nfe/servico/response/default.rb +0 -34
  223. data/lib/br_nfe/servico/rps.rb +0 -108
  224. data/test/br_nfe/servico/betha/base_test.rb +0 -135
  225. data/test/br_nfe/servico/betha/v1/build_response_test.rb +0 -557
  226. data/test/br_nfe/servico/betha/v1/cancelamento_nfs_test.rb +0 -72
  227. data/test/br_nfe/servico/betha/v1/consulta_lote_rps_test.rb +0 -46
  228. data/test/br_nfe/servico/betha/v1/consulta_nfs_por_rps_test.rb +0 -68
  229. data/test/br_nfe/servico/betha/v1/consulta_nfse_test.rb +0 -74
  230. data/test/br_nfe/servico/betha/v1/consulta_situacao_lote_rps_test.rb +0 -27
  231. data/test/br_nfe/servico/betha/v1/gateway_test.rb +0 -151
  232. data/test/br_nfe/servico/betha/v1/recepcao_lote_rps_test.rb +0 -249
  233. data/test/br_nfe/servico/betha/v2/cancelamento_nfs_test.rb +0 -44
  234. data/test/br_nfe/servico/betha/v2/consulta_lote_rps_test.rb +0 -38
  235. data/test/br_nfe/servico/betha/v2/consulta_nfse_por_rps_test.rb +0 -36
  236. data/test/br_nfe/servico/betha/v2/envio_lote_rps_sincrono_test.rb +0 -51
  237. data/test/br_nfe/servico/betha/v2/gateway_test.rb +0 -372
  238. data/test/br_nfe/servico/betha/v2/gera_nfse_test.rb +0 -62
  239. data/test/br_nfe/servico/betha/v2/recepcao_lote_rps_test.rb +0 -108
  240. data/test/br_nfe/servico/betha/v2/substituicao_nfse_test.rb +0 -84
  241. data/test/br_nfe/servico/response/default_test.rb +0 -54
  242. data/test/factories/servico/base.rb +0 -5
  243. data/test/factories/servico/betha/base.rb +0 -5
  244. data/test/factories/servico/betha/v1/build_response.rb +0 -6
  245. data/test/factories/servico/betha/v1/cancelamento_nfs.rb +0 -7
  246. data/test/factories/servico/betha/v1/consulta_nfse.rb +0 -8
  247. data/test/factories/servico/betha/v1/recepcao_lote_rps.rb +0 -6
  248. data/test/factories/servico/betha/v2/cancelamento_nfs.rb +0 -7
  249. data/test/factories/servico/betha/v2/consulta_lote_rps.rb +0 -6
  250. data/test/factories/servico/betha/v2/consulta_nfse_por_rps.rb +0 -6
  251. data/test/factories/servico/betha/v2/envio_lote_rps_sincrono.rb +0 -5
  252. data/test/factories/servico/betha/v2/gateway.rb +0 -5
  253. data/test/factories/servico/betha/v2/gera_nfse.rb +0 -6
  254. data/test/factories/servico/betha/v2/recepcao_lote_rps.rb +0 -5
  255. data/test/factories/servico/betha/v2/substituicao_nfse.rb +0 -8
  256. data/test/factories/servico/response/default.rb +0 -10
  257. data/test/factories/servico/rps.rb +0 -44
@@ -0,0 +1,652 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3
+ targetNamespace="http://www.betha.com.br/e-nota-contribuinte-ws"
4
+ xmlns="http://www.betha.com.br/e-nota-contribuinte-ws/shema/nfse_v01.xsd"
5
+ xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" attributeFormDefault="unqualified" elementFormDefault="qualified">
6
+
7
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
8
+ <!-- definition of simple elements -->
9
+ <xsd:simpleType name="tsNumeroNfse">
10
+ <xsd:restriction base="xsd:nonNegativeInteger">
11
+ <xsd:totalDigits value="15"/>
12
+ </xsd:restriction>
13
+ </xsd:simpleType>
14
+ <xsd:simpleType name="tsCodigoVerificacao">
15
+ <xsd:restriction base="xsd:string">
16
+ <xsd:maxLength value="9"/>
17
+ <xsd:minLength value="1"/>
18
+ <xsd:whiteSpace value="collapse"/>
19
+ </xsd:restriction>
20
+ </xsd:simpleType>
21
+ <xsd:simpleType name="tsStatusRps">
22
+ <xsd:restriction base="xsd:byte">
23
+ <xsd:pattern value="1|2"/>
24
+ </xsd:restriction>
25
+ </xsd:simpleType>
26
+ <xsd:simpleType name="tsStatusNfse">
27
+ <xsd:restriction base="xsd:byte">
28
+ <xsd:pattern value="1|2"/>
29
+ </xsd:restriction>
30
+ </xsd:simpleType>
31
+ <xsd:simpleType name="tsNaturezaOperacao">
32
+ <xsd:restriction base="xsd:byte">
33
+ <xsd:pattern value="1|2|3|4|5|6|7"/>
34
+ </xsd:restriction>
35
+ </xsd:simpleType>
36
+ <xsd:simpleType name="tsRegimeEspecialTributacao">
37
+ <xsd:restriction base="xsd:byte">
38
+ <xsd:pattern value="1|2|3|4|5|6"/>
39
+ </xsd:restriction>
40
+ </xsd:simpleType>
41
+ <xsd:simpleType name="tsSimNao">
42
+ <xsd:restriction base="xsd:byte">
43
+ <xsd:pattern value="1|2|3"/>
44
+ </xsd:restriction>
45
+ </xsd:simpleType>
46
+ <xsd:simpleType name="tsNumeroRps">
47
+ <xsd:restriction base="xsd:nonNegativeInteger">
48
+ <xsd:totalDigits value="15"/>
49
+ </xsd:restriction>
50
+ </xsd:simpleType>
51
+ <xsd:simpleType name="tsSerieRps">
52
+ <xsd:restriction base="xsd:string">
53
+ <xsd:maxLength value="5"/>
54
+ <xsd:minLength value="1"/>
55
+ <xsd:whiteSpace value="collapse"/>
56
+ </xsd:restriction>
57
+ </xsd:simpleType>
58
+ <xsd:simpleType name="tsTipoRps">
59
+ <xsd:restriction base="xsd:byte">
60
+ <xsd:pattern value="1|2|3"/>
61
+ </xsd:restriction>
62
+ </xsd:simpleType>
63
+ <xsd:simpleType name="tsOutrasInformacoes">
64
+ <xsd:restriction base="xsd:string">
65
+ <xsd:maxLength value="255"/>
66
+ <xsd:minLength value="1"/>
67
+ <xsd:whiteSpace value="collapse"/>
68
+ </xsd:restriction>
69
+ </xsd:simpleType>
70
+ <xsd:simpleType name="tsValor">
71
+ <xsd:restriction base="xsd:decimal">
72
+ <xsd:totalDigits value="15"/>
73
+ <xsd:fractionDigits value="2" fixed="true"/>
74
+ <xsd:minInclusive value="0"/>
75
+ </xsd:restriction>
76
+ </xsd:simpleType>
77
+ <xsd:simpleType name="tsItemListaServico">
78
+ <xsd:restriction base="xsd:string">
79
+ <xsd:maxLength value="5"/>
80
+ <xsd:minLength value="1"/>
81
+ <xsd:whiteSpace value="collapse"/>
82
+ </xsd:restriction>
83
+ </xsd:simpleType>
84
+ <xsd:simpleType name="tsCodigoCnae">
85
+ <xsd:restriction base="xsd:int">
86
+ <xsd:totalDigits value="7"/>
87
+ </xsd:restriction>
88
+ </xsd:simpleType>
89
+ <xsd:simpleType name="tsCodigoTributacao">
90
+ <xsd:restriction base="xsd:string">
91
+ <xsd:maxLength value="20"/>
92
+ <xsd:minLength value="1"/>
93
+ <xsd:whiteSpace value="collapse"/>
94
+ </xsd:restriction>
95
+ </xsd:simpleType>
96
+ <xsd:simpleType name="tsAliquota">
97
+ <xsd:restriction base="xsd:decimal">
98
+ <xsd:totalDigits value="5"/>
99
+ <xsd:fractionDigits value="4"/>
100
+ <xsd:minInclusive value="0"/>
101
+ </xsd:restriction>
102
+ </xsd:simpleType>
103
+ <xsd:simpleType name="tsDiscriminacao">
104
+ <xsd:restriction base="xsd:string">
105
+ <xsd:maxLength value="2000"/>
106
+ <xsd:minLength value="1"/>
107
+ <xsd:whiteSpace value="collapse"/>
108
+ </xsd:restriction>
109
+ </xsd:simpleType>
110
+ <xsd:simpleType name="tsCodigoMunicipioIbge">
111
+ <xsd:restriction base="xsd:int">
112
+ <xsd:totalDigits value="7"/>
113
+ </xsd:restriction>
114
+ </xsd:simpleType>
115
+ <xsd:simpleType name="tsInscricaoMunicipal">
116
+ <xsd:restriction base="xsd:string">
117
+ <xsd:maxLength value="15"/>
118
+ <xsd:minLength value="1"/>
119
+ <xsd:whiteSpace value="collapse"/>
120
+ </xsd:restriction>
121
+ </xsd:simpleType>
122
+ <xsd:simpleType name="tsRazaoSocial">
123
+ <xsd:restriction base="xsd:string">
124
+ <xsd:maxLength value="115"/>
125
+ <xsd:minLength value="1"/>
126
+ <xsd:whiteSpace value="collapse"/>
127
+ </xsd:restriction>
128
+ </xsd:simpleType>
129
+ <xsd:simpleType name="tsNomeFantasia">
130
+ <xsd:restriction base="xsd:string">
131
+ <xsd:maxLength value="60"/>
132
+ <xsd:minLength value="1"/>
133
+ <xsd:whiteSpace value="collapse"/>
134
+ </xsd:restriction>
135
+ </xsd:simpleType>
136
+ <xsd:simpleType name="tsCnpj">
137
+ <xsd:restriction base="xsd:string">
138
+ <xsd:length value="14" fixed="true"/>
139
+ <xsd:whiteSpace value="collapse"/>
140
+ </xsd:restriction>
141
+ </xsd:simpleType>
142
+ <xsd:simpleType name="tsEndereco">
143
+ <xsd:restriction base="xsd:string">
144
+ <xsd:maxLength value="125"/>
145
+ <xsd:minLength value="1"/>
146
+ <xsd:whiteSpace value="collapse"/>
147
+ </xsd:restriction>
148
+ </xsd:simpleType>
149
+ <xsd:simpleType name="tsNumeroEndereco">
150
+ <xsd:restriction base="xsd:string">
151
+ <xsd:maxLength value="10"/>
152
+ <xsd:minLength value="1"/>
153
+ <xsd:whiteSpace value="collapse"/>
154
+ </xsd:restriction>
155
+ </xsd:simpleType>
156
+ <xsd:simpleType name="tsComplementoEndereco">
157
+ <xsd:restriction base="xsd:string">
158
+ <xsd:maxLength value="60"/>
159
+ <xsd:minLength value="1"/>
160
+ <xsd:whiteSpace value="collapse"/>
161
+ </xsd:restriction>
162
+ </xsd:simpleType>
163
+ <xsd:simpleType name="tsBairro">
164
+ <xsd:restriction base="xsd:string">
165
+ <xsd:maxLength value="60"/>
166
+ <xsd:minLength value="1"/>
167
+ <xsd:whiteSpace value="collapse"/>
168
+ </xsd:restriction>
169
+ </xsd:simpleType>
170
+ <xsd:simpleType name="tsUf">
171
+ <xsd:restriction base="xsd:string">
172
+ <xsd:length value="2" fixed="true"/>
173
+ </xsd:restriction>
174
+ </xsd:simpleType>
175
+ <xsd:simpleType name="tsCep">
176
+ <xsd:restriction base="xsd:int">
177
+ <xsd:totalDigits value="8" fixed="true"/>
178
+ </xsd:restriction>
179
+ </xsd:simpleType>
180
+ <xsd:simpleType name="tsEmail">
181
+ <xsd:restriction base="xsd:string">
182
+ <xsd:maxLength value="80"/>
183
+ <xsd:minLength value="1"/>
184
+ <xsd:whiteSpace value="collapse"/>
185
+ </xsd:restriction>
186
+ </xsd:simpleType>
187
+ <xsd:simpleType name="tsTelefone">
188
+ <xsd:restriction base="xsd:string">
189
+ <xsd:maxLength value="11"/>
190
+ <xsd:minLength value="1"/>
191
+ <xsd:whiteSpace value="collapse"/>
192
+ </xsd:restriction>
193
+ </xsd:simpleType>
194
+ <xsd:simpleType name="tsCpf">
195
+ <xsd:restriction base="xsd:string">
196
+ <xsd:length value="11" fixed="true"/>
197
+ </xsd:restriction>
198
+ </xsd:simpleType>
199
+ <xsd:simpleType name="tsIndicacaoCpfCnpj">
200
+ <xsd:restriction base="xsd:byte">
201
+ <xsd:pattern value="1|2|3"/>
202
+ </xsd:restriction>
203
+ </xsd:simpleType>
204
+ <xsd:simpleType name="tsCodigoObra">
205
+ <xsd:restriction base="xsd:string">
206
+ <xsd:maxLength value="15"/>
207
+ <xsd:minLength value="1"/>
208
+ <xsd:whiteSpace value="collapse"/>
209
+ </xsd:restriction>
210
+ </xsd:simpleType>
211
+ <xsd:simpleType name="tsArt">
212
+ <xsd:restriction base="xsd:string">
213
+ <xsd:maxLength value="15"/>
214
+ <xsd:minLength value="1"/>
215
+ <xsd:whiteSpace value="collapse"/>
216
+ </xsd:restriction>
217
+ </xsd:simpleType>
218
+ <xsd:simpleType name="tsNumeroLote">
219
+ <xsd:restriction base="xsd:nonNegativeInteger">
220
+ <xsd:totalDigits value="15"/>
221
+ </xsd:restriction>
222
+ </xsd:simpleType>
223
+ <xsd:simpleType name="tsNumeroProtocolo">
224
+ <xsd:restriction base="xsd:string">
225
+ <xsd:maxLength value="50"/>
226
+ </xsd:restriction>
227
+ </xsd:simpleType>
228
+ <xsd:simpleType name="tsSituacaoLoteRps">
229
+ <xsd:restriction base="xsd:byte">
230
+ <xsd:pattern value="1|2|3|4"/>
231
+ </xsd:restriction>
232
+ </xsd:simpleType>
233
+ <xsd:simpleType name="tsQuantidadeRps">
234
+ <xsd:restriction base="xsd:int">
235
+ </xsd:restriction>
236
+ </xsd:simpleType>
237
+ <xsd:simpleType name="tsCodigoMensagemAlerta">
238
+ <xsd:restriction base="xsd:string">
239
+ <xsd:maxLength value="4"/>
240
+ <xsd:minLength value="1"/>
241
+ <xsd:whiteSpace value="collapse"/>
242
+ </xsd:restriction>
243
+ </xsd:simpleType>
244
+ <xsd:simpleType name="tsDescricaoMensagemAlerta">
245
+ <xsd:restriction base="xsd:string">
246
+ <xsd:maxLength value="200"/>
247
+ <xsd:minLength value="1"/>
248
+ <xsd:whiteSpace value="collapse"/>
249
+ </xsd:restriction>
250
+ </xsd:simpleType>
251
+ <xsd:simpleType name="tsCodigoCancelamentoNfse">
252
+ <xsd:restriction base="xsd:string">
253
+ <xsd:maxLength value="4"/>
254
+ <xsd:minLength value="1"/>
255
+ <xsd:whiteSpace value="collapse"/>
256
+ </xsd:restriction>
257
+ </xsd:simpleType>
258
+ <xsd:simpleType name="tsIdTag">
259
+ <xsd:restriction base="xsd:string">
260
+ <xsd:maxLength value="255"/>
261
+ </xsd:restriction>
262
+ </xsd:simpleType>
263
+
264
+ <!-- definition of complex elements -->
265
+
266
+ <xsd:complexType name="tcCpfCnpj">
267
+ <xsd:choice>
268
+ <xsd:element name="Cpf" type="tsCpf" minOccurs="1" maxOccurs="1"/>
269
+ <xsd:element name="Cnpj" type="tsCnpj" minOccurs="1" maxOccurs="1"/>
270
+ </xsd:choice>
271
+ </xsd:complexType>
272
+ <xsd:complexType name="tcEndereco">
273
+ <xsd:sequence>
274
+ <xsd:element name="Endereco" type="tsEndereco" minOccurs="0" maxOccurs="1"/>
275
+ <xsd:element name="Numero" type="tsNumeroEndereco" minOccurs="0" maxOccurs="1"/>
276
+ <xsd:element name="Complemento" type="tsComplementoEndereco" minOccurs="0" maxOccurs="1"/>
277
+ <xsd:element name="Bairro" type="tsBairro" minOccurs="0" maxOccurs="1"/>
278
+ <xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge" minOccurs="0" maxOccurs="1"/>
279
+ <xsd:element name="Uf" type="tsUf" minOccurs="0" maxOccurs="1"/>
280
+ <xsd:element name="Cep" type="tsCep" minOccurs="0" maxOccurs="1"/>
281
+ </xsd:sequence>
282
+ </xsd:complexType>
283
+ <xsd:complexType name="tcContato">
284
+ <xsd:sequence>
285
+ <xsd:element name="Telefone" type="tsTelefone" minOccurs="0" maxOccurs="1"/>
286
+ <xsd:element name="Email" type="tsEmail" minOccurs="0" maxOccurs="1"/>
287
+ </xsd:sequence>
288
+ </xsd:complexType>
289
+ <xsd:complexType name="tcIdentificacaoOrgaoGerador">
290
+ <xsd:sequence>
291
+ <xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge" minOccurs="1" maxOccurs="1"/>
292
+ <xsd:element name="Uf" type="tsUf" minOccurs="1" maxOccurs="1"/>
293
+ </xsd:sequence>
294
+ </xsd:complexType>
295
+ <xsd:complexType name="tcIdentificacaoRps">
296
+ <xsd:sequence>
297
+ <xsd:element name="Numero" type="tsNumeroRps" minOccurs="1" maxOccurs="1"/>
298
+ <xsd:element name="Serie" type="tsSerieRps" minOccurs="1" maxOccurs="1"/>
299
+ <xsd:element name="Tipo" type="tsTipoRps" minOccurs="1" maxOccurs="1"/>
300
+ </xsd:sequence>
301
+ </xsd:complexType>
302
+ <xsd:complexType name="tcIdentificacaoPrestador">
303
+ <xsd:sequence>
304
+ <xsd:element name="Cnpj" type="tsCnpj" minOccurs="1" maxOccurs="1"/>
305
+ <xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="0" maxOccurs="1"/>
306
+ </xsd:sequence>
307
+ </xsd:complexType>
308
+ <xsd:complexType name="tcIdentificacaoTomador">
309
+ <xsd:sequence>
310
+ <xsd:element name="CpfCnpj" type="tcCpfCnpj" minOccurs="0" maxOccurs="1"/>
311
+ <xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="0" maxOccurs="1"/>
312
+ </xsd:sequence>
313
+ </xsd:complexType>
314
+ <xsd:complexType name="tcDadosTomador">
315
+ <xsd:sequence>
316
+ <xsd:element name="IdentificacaoTomador" type="tcIdentificacaoTomador" minOccurs="0" maxOccurs="1"/>
317
+ <xsd:element name="RazaoSocial" type="tsRazaoSocial" minOccurs="0" maxOccurs="1"/>
318
+ <xsd:element name="Endereco" type="tcEndereco" minOccurs="0" maxOccurs="1"/>
319
+ <xsd:element name="Contato" type="tcContato" minOccurs="0" maxOccurs="1"/>
320
+ </xsd:sequence>
321
+ </xsd:complexType>
322
+ <xsd:complexType name="tcValores">
323
+ <xsd:sequence>
324
+ <xsd:element name="ValorServicos" type="tsValor" minOccurs="1" maxOccurs="1"/>
325
+ <xsd:element name="ValorDeducoes" type="tsValor" minOccurs="0" maxOccurs="1"/>
326
+ <xsd:element name="ValorPis" type="tsValor" minOccurs="0" maxOccurs="1"/>
327
+ <xsd:element name="ValorCofins" type="tsValor" minOccurs="0" maxOccurs="1"/>
328
+ <xsd:element name="ValorInss" type="tsValor" minOccurs="0" maxOccurs="1"/>
329
+ <xsd:element name="ValorIr" type="tsValor" minOccurs="0" maxOccurs="1"/>
330
+ <xsd:element name="ValorCsll" type="tsValor" minOccurs="0" maxOccurs="1"/>
331
+ <xsd:element name="IssRetido" type="tsSimNao" minOccurs="1" maxOccurs="1"/>
332
+ <xsd:element name="ValorIss" type="tsValor" minOccurs="0" maxOccurs="1"/>
333
+ <xsd:element name="ValorIssRetido" type="tsValor" minOccurs="0" maxOccurs="1"/>
334
+ <xsd:element name="OutrasRetencoes" type="tsValor" minOccurs="0" maxOccurs="1"/>
335
+ <xsd:element name="BaseCalculo" type="tsValor" minOccurs="0" maxOccurs="1"/>
336
+ <xsd:element name="Aliquota" type="tsAliquota" minOccurs="0" maxOccurs="1"/>
337
+ <xsd:element name="ValorLiquidoNfse" type="tsValor" minOccurs="0" maxOccurs="1"/>
338
+ <xsd:element name="DescontoIncondicionado" type="tsValor" minOccurs="0" maxOccurs="1"/>
339
+ <xsd:element name="DescontoCondicionado" type="tsValor" minOccurs="0" maxOccurs="1"/>
340
+ </xsd:sequence>
341
+ </xsd:complexType>
342
+ <xsd:complexType name="tcDadosServico">
343
+ <xsd:sequence>
344
+ <xsd:element name="Valores" type="tcValores" minOccurs="1" maxOccurs="1"/>
345
+ <xsd:element name="ItemListaServico" type="tsItemListaServico" minOccurs="1" maxOccurs="1"/>
346
+ <xsd:element name="CodigoCnae" type="tsCodigoCnae" minOccurs="0" maxOccurs="1"/>
347
+ <xsd:element name="CodigoTributacaoMunicipio" type="tsCodigoTributacao" minOccurs="0" maxOccurs="1"/>
348
+ <xsd:element name="Discriminacao" type="tsDiscriminacao" minOccurs="1" maxOccurs="1"/>
349
+ <xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge" minOccurs="1" maxOccurs="1"/>
350
+ </xsd:sequence>
351
+ </xsd:complexType>
352
+ <xsd:complexType name="tcDadosConstrucaoCivil">
353
+ <xsd:sequence>
354
+ <xsd:element name="CodigoObra" type="tsCodigoObra" minOccurs="1" maxOccurs="1"/>
355
+ <xsd:element name="Art" type="tsArt" minOccurs="1" maxOccurs="1"/>
356
+ </xsd:sequence>
357
+ </xsd:complexType>
358
+ <xsd:complexType name="tcDadosPrestador">
359
+ <xsd:sequence>
360
+ <xsd:element name="IdentificacaoPrestador" type="tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1"/>
361
+ <xsd:element name="RazaoSocial" type="tsRazaoSocial" minOccurs="1" maxOccurs="1"/>
362
+ <xsd:element name="NomeFantasia" type="tsNomeFantasia" minOccurs="0" maxOccurs="1"/>
363
+ <xsd:element name="Endereco" type="tcEndereco" minOccurs="1" maxOccurs="1"/>
364
+ <xsd:element name="Contato" type="tcContato" minOccurs="0" maxOccurs="1"/>
365
+ </xsd:sequence>
366
+ </xsd:complexType>
367
+ <xsd:complexType name="tcInfRps">
368
+ <xsd:sequence>
369
+ <xsd:element name="IdentificacaoRps" type="tcIdentificacaoRps" minOccurs="1" maxOccurs="1"/>
370
+ <xsd:element name="DataEmissao" type="xsd:dateTime" minOccurs="1" maxOccurs="1"/>
371
+ <xsd:element name="NaturezaOperacao" type="tsNaturezaOperacao" minOccurs="1" maxOccurs="1"/>
372
+ <xsd:element name="RegimeEspecialTributacao" type="tsRegimeEspecialTributacao" minOccurs="0" maxOccurs="1"/>
373
+ <xsd:element name="OptanteSimplesNacional" type="tsSimNao" minOccurs="1" maxOccurs="1"/>
374
+ <xsd:element name="IncentivadorCultural" type="tsSimNao" minOccurs="1" maxOccurs="1"/>
375
+ <xsd:element name="Status" type="tsStatusRps" minOccurs="1" maxOccurs="1"/>
376
+ <xsd:element name="RpsSubstituido" type="tcIdentificacaoRps" minOccurs="0" maxOccurs="1"/>
377
+ <xsd:element name="Servico" type="tcDadosServico" minOccurs="1" maxOccurs="1"/>
378
+ <xsd:element name="Prestador" type="tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1"/>
379
+ <xsd:element name="Tomador" type="tcDadosTomador" minOccurs="0" maxOccurs="1"/>
380
+ <xsd:element name="IntermediarioServico" type="tcIdentificacaoIntermediarioServico" minOccurs="0" maxOccurs="1"/>
381
+ <xsd:element name="ContrucaoCivil" type="tcDadosConstrucaoCivil" minOccurs="0" maxOccurs="1"/>
382
+ </xsd:sequence>
383
+ <xsd:attribute name="Id" type="xsd:string"/>
384
+ </xsd:complexType>
385
+ <xsd:complexType name="tcRps">
386
+ <xsd:sequence>
387
+ <xsd:element name="InfRps" type="tcInfRps" minOccurs="1" maxOccurs="1"/>
388
+ <xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1"/>
389
+ </xsd:sequence>
390
+ </xsd:complexType>
391
+ <xsd:complexType name="tcIdentificacaoNfse">
392
+ <xsd:sequence>
393
+ <xsd:element name="Numero" type="tsNumeroNfse" minOccurs="1" maxOccurs="1"/>
394
+ <xsd:element name="Cnpj" type="tsCnpj" minOccurs="1" maxOccurs="1"/>
395
+ <xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="0" maxOccurs="1"/>
396
+ <xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge" minOccurs="1" maxOccurs="1"/>
397
+ </xsd:sequence>
398
+ </xsd:complexType>
399
+ <xsd:complexType name="tcInfNfse">
400
+ <xsd:sequence>
401
+ <xsd:element name="Numero" type="tsNumeroNfse" minOccurs="1" maxOccurs="1"/>
402
+ <xsd:element name="CodigoVerificacao" type="tsCodigoVerificacao" minOccurs="1" maxOccurs="1"/>
403
+ <xsd:element name="DataEmissao" type="xsd:dateTime" minOccurs="1" maxOccurs="1"/>
404
+ <xsd:element name="IdentificacaoRps" minOccurs="0" type="tcIdentificacaoRps" maxOccurs="1"/>
405
+ <xsd:element name="DataEmissaoRps" type="xsd:date" minOccurs="0" maxOccurs="1"/>
406
+ <xsd:element name="NaturezaOperacao" type="tsNaturezaOperacao" minOccurs="1" maxOccurs="1"/>
407
+ <xsd:element name="RegimeEspecialTributacao" type="tsRegimeEspecialTributacao" minOccurs="0" maxOccurs="1"/>
408
+ <xsd:element name="OptanteSimplesNacional" type="tsSimNao" minOccurs="1" maxOccurs="1"/>
409
+ <xsd:element name="IncentivadorCultural" type="tsSimNao" minOccurs="1" maxOccurs="1"/>
410
+ <xsd:element name="Competencia" type="xsd:dateTime" minOccurs="1" maxOccurs="1"/>
411
+ <xsd:element name="NfseSubstituida" type="tsNumeroNfse" minOccurs="0" maxOccurs="1"/>
412
+ <xsd:element name="OutrasInformacoes" type="tsOutrasInformacoes" minOccurs="0" maxOccurs="1"/>
413
+ <xsd:element name="Servico" type="tcDadosServico" minOccurs="1" maxOccurs="1"/>
414
+ <xsd:element name="ValorCredito" type="tsValor" minOccurs="0" maxOccurs="1"/>
415
+ <xsd:element name="PrestadorServico" type="tcDadosPrestador" minOccurs="1" maxOccurs="1"/>
416
+ <xsd:element name="TomadorServico" type="tcDadosTomador" minOccurs="0" maxOccurs="1"/>
417
+ <xsd:element name="IntermediarioServico" type="tcIdentificacaoIntermediarioServico" minOccurs="0" maxOccurs="1"/>
418
+ <xsd:element name="OrgaoGerador" type="tcIdentificacaoOrgaoGerador" minOccurs="1" maxOccurs="1"/>
419
+ <xsd:element name="ContrucaoCivil" type="tcDadosConstrucaoCivil" minOccurs="0" maxOccurs="1"/>
420
+ </xsd:sequence>
421
+ <xsd:attribute name="Id" type="xsd:string"/>
422
+ </xsd:complexType>
423
+ <xsd:complexType name="tcNfse">
424
+ <xsd:sequence>
425
+ <xsd:element name="InfNfse" type="tcInfNfse" minOccurs="1" maxOccurs="1"/>
426
+ <xsd:element ref="dsig:Signature" minOccurs="1" maxOccurs="2"/>
427
+ </xsd:sequence>
428
+ </xsd:complexType>
429
+
430
+ <xsd:complexType name="tcInfPedidoCancelamento">
431
+ <xsd:sequence>
432
+ <xsd:element name="IdentificacaoNfse" type="tcIdentificacaoNfse" minOccurs="1" maxOccurs="1"/>
433
+ <xsd:element name="CodigoCancelamento" type="tsCodigoCancelamentoNfse" minOccurs="1" maxOccurs="1"/>
434
+ </xsd:sequence>
435
+ <xsd:attribute name="Id" type="xsd:string"/>
436
+ </xsd:complexType>
437
+ <xsd:complexType name="tcPedidoCancelamento">
438
+ <xsd:sequence>
439
+ <xsd:element name="InfPedidoCancelamento" type="tcInfPedidoCancelamento" minOccurs="1" maxOccurs="1"/>
440
+ <xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1"/>
441
+ </xsd:sequence>
442
+ </xsd:complexType>
443
+ <xsd:complexType name="tcConfirmacaoCancelamento">
444
+ <xsd:sequence>
445
+ <xsd:element name="Pedido" type="tcPedidoCancelamento" minOccurs="1" maxOccurs="1"/>
446
+ <xsd:element name="DataHoraCancelamento" type="xsd:dateTime" minOccurs="1" maxOccurs="1"/>
447
+ </xsd:sequence>
448
+ <xsd:attribute name="Id" type="xsd:string"/>
449
+ </xsd:complexType>
450
+
451
+ <xsd:complexType name="tcCancelamentoNfse">
452
+ <xsd:sequence>
453
+ <xsd:element name="Confirmacao" type="tcConfirmacaoCancelamento" minOccurs="1" maxOccurs="1"/>
454
+ <xsd:element ref="dsig:Signature" minOccurs="1" maxOccurs="1"/>
455
+ </xsd:sequence>
456
+ </xsd:complexType>
457
+
458
+ <xsd:complexType name="tcInfSubstituicaoNfse">
459
+ <xsd:sequence>
460
+ <xsd:element name="NfseSubstituidora" type="tsNumeroNfse" minOccurs="1" maxOccurs="1"/>
461
+ </xsd:sequence>
462
+ <xsd:attribute name="Id" type="xsd:string"/>
463
+ </xsd:complexType>
464
+ <xsd:complexType name="tcSubstituicaoNfse">
465
+ <xsd:sequence>
466
+ <xsd:element name="SubstituicaoNfse" type="tcInfSubstituicaoNfse" minOccurs="1" maxOccurs="1"/>
467
+ <xsd:element ref="dsig:Signature" minOccurs="1" maxOccurs="2"/>
468
+ </xsd:sequence>
469
+ </xsd:complexType>
470
+ <xsd:complexType name="tcCompNfse">
471
+ <xsd:sequence>
472
+ <xsd:element name="Nfse" type="tcNfse" minOccurs="1" maxOccurs="1"/>
473
+ <xsd:element name="NfseCancelamento" type="tcCancelamentoNfse" minOccurs="0" maxOccurs="1"/>
474
+ <xsd:element name="NfseSubstituicao" type="tcSubstituicaoNfse" minOccurs="0" maxOccurs="1"/>
475
+ </xsd:sequence>
476
+ </xsd:complexType>
477
+
478
+ <xsd:element name="ListaMensagemRetorno">
479
+ <xsd:complexType>
480
+ <xsd:sequence>
481
+ <xsd:element name="MensagemRetorno" type="tcMensagemRetorno" minOccurs="1" maxOccurs="unbounded"/>
482
+ </xsd:sequence>
483
+ </xsd:complexType>
484
+ </xsd:element>
485
+ <xsd:complexType name="tcMensagemRetorno">
486
+ <xsd:sequence>
487
+ <xsd:element name="Codigo" type="tsCodigoMensagemAlerta" minOccurs="1" maxOccurs="1"/>
488
+ <xsd:element name="Mensagem" type="tsDescricaoMensagemAlerta" minOccurs="1" maxOccurs="1"/>
489
+ <xsd:element name="Correcao" type="tsDescricaoMensagemAlerta" minOccurs="0"/>
490
+ </xsd:sequence>
491
+ </xsd:complexType>
492
+ <xsd:complexType name="tcMensagemRetornoLote">
493
+ <xsd:sequence>
494
+ <xsd:element name="IdentificacaoRps" type="tcIdentificacaoRps" minOccurs="1" maxOccurs="1"/>
495
+ <xsd:element name="Codigo" type="tsCodigoMensagemAlerta" minOccurs="1" maxOccurs="1"/>
496
+ <xsd:element name="Mensagem" type="tsDescricaoMensagemAlerta" minOccurs="1" maxOccurs="1"/>
497
+ </xsd:sequence>
498
+ </xsd:complexType>
499
+ <xsd:complexType name="tcLoteRps">
500
+ <xsd:sequence>
501
+ <xsd:element name="NumeroLote" type="tsNumeroLote" minOccurs="1" maxOccurs="1"/>
502
+ <xsd:element name="Cnpj" type="tsCnpj" minOccurs="1" maxOccurs="1"/>
503
+ <xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="1" maxOccurs="1"/>
504
+ <xsd:element name="QuantidadeRps" type="tsQuantidadeRps" minOccurs="1" maxOccurs="1"/>
505
+ <xsd:element name="ListaRps" minOccurs="1" maxOccurs="1">
506
+ <xsd:complexType>
507
+ <xsd:sequence>
508
+ <xsd:element name="Rps" maxOccurs="unbounded" type="tcRps" minOccurs="1">
509
+ </xsd:element>
510
+ </xsd:sequence>
511
+ </xsd:complexType>
512
+ </xsd:element>
513
+ </xsd:sequence>
514
+ <xsd:attribute name="Id" type="xsd:string"/>
515
+ </xsd:complexType>
516
+
517
+ <xsd:element name="EnviarLoteRpsResposta">
518
+ <xsd:complexType>
519
+ <xsd:choice>
520
+ <xsd:sequence>
521
+ <xsd:element name="NumeroLote" type="tsNumeroLote" minOccurs="1" maxOccurs="1"/>
522
+ <xsd:element name="DataRecebimento" type="xsd:dateTime" minOccurs="1" maxOccurs="1"/>
523
+ <xsd:element name="Protocolo" type="tsNumeroProtocolo" minOccurs="1" maxOccurs="1"/>
524
+ </xsd:sequence>
525
+ <xsd:element ref="ListaMensagemRetorno" minOccurs="1" maxOccurs="1"/>
526
+ </xsd:choice>
527
+ </xsd:complexType>
528
+ </xsd:element>
529
+
530
+ <xsd:element name="EnviarLoteRpsEnvio">
531
+ <xsd:complexType>
532
+ <xsd:sequence>
533
+ <xsd:element name="LoteRps" type="tcLoteRps"/>
534
+ <xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1"/>
535
+ </xsd:sequence>
536
+ </xsd:complexType>
537
+ </xsd:element>
538
+
539
+ <xsd:element name="ConsultarSituacaoLoteRpsResposta">
540
+ <xsd:complexType>
541
+ <xsd:choice>
542
+ <xsd:sequence>
543
+ <xsd:element name="NumeroLote" type="tsNumeroLote" minOccurs="1" maxOccurs="1"/>
544
+ <xsd:element name="Situacao" type="tsSituacaoLoteRps" minOccurs="1" maxOccurs="1"/>
545
+ </xsd:sequence>
546
+ <xsd:element ref="ListaMensagemRetorno" minOccurs="1" maxOccurs="1"/>
547
+ </xsd:choice>
548
+ </xsd:complexType>
549
+ </xsd:element>
550
+
551
+ <xsd:element name="ConsultarSituacaoLoteRpsEnvio">
552
+ <xsd:complexType>
553
+ <xsd:sequence>
554
+ <xsd:element name="Prestador" type="tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1"/>
555
+ <xsd:element name="Protocolo" type="tsNumeroProtocolo" minOccurs="1" maxOccurs="1"/>
556
+ </xsd:sequence>
557
+ </xsd:complexType>
558
+ </xsd:element>
559
+
560
+ <xsd:element name="ConsultarNfseRpsResposta">
561
+ <xsd:complexType>
562
+ <xsd:choice>
563
+ <xsd:element name="CompNfse" type="tcCompNfse" minOccurs="1" maxOccurs="1"/>
564
+ <xsd:element ref="ListaMensagemRetorno" minOccurs="1" maxOccurs="1"/>
565
+ </xsd:choice>
566
+ </xsd:complexType>
567
+ </xsd:element>
568
+
569
+ <xsd:element name="ConsultarNfseRpsEnvio">
570
+ <xsd:complexType>
571
+ <xsd:sequence>
572
+ <xsd:element name="IdentificacaoRps" type="tcIdentificacaoRps" minOccurs="1" maxOccurs="1"/>
573
+ <xsd:element name="Prestador" type="tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1"/>
574
+ </xsd:sequence>
575
+ </xsd:complexType>
576
+ </xsd:element>
577
+
578
+ <xsd:element name="ConsultarNfseResposta">
579
+ <xsd:complexType>
580
+ <xsd:choice>
581
+ <xsd:element name="ListaNfse" minOccurs="1" maxOccurs="1">
582
+ <xsd:complexType>
583
+ <xsd:sequence>
584
+ <xsd:element name="CompNfse" maxOccurs="unbounded" type="tcCompNfse" minOccurs="0"/>
585
+ </xsd:sequence>
586
+ </xsd:complexType>
587
+ </xsd:element>
588
+ <xsd:element ref="ListaMensagemRetorno" minOccurs="1" maxOccurs="1"/>
589
+ </xsd:choice>
590
+ </xsd:complexType>
591
+ </xsd:element>
592
+
593
+ <xsd:element name="ConsultarNfseEnvio">
594
+ <xsd:complexType>
595
+ <xsd:sequence>
596
+ <xsd:element name="Prestador" type="tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1"/>
597
+ <xsd:element name="NumeroNfse" type="tsNumeroNfse" minOccurs="0" maxOccurs="1"/>
598
+ <xsd:element name="PeriodoEmissao" minOccurs="0" maxOccurs="1">
599
+ <xsd:complexType>
600
+ <xsd:sequence>
601
+ <xsd:element name="DataInicial" type="xsd:date" minOccurs="1" maxOccurs="1"/>
602
+ <xsd:element name="DataFinal" type="xsd:date" minOccurs="1" maxOccurs="1"/>
603
+ </xsd:sequence>
604
+ </xsd:complexType>
605
+ </xsd:element>
606
+ <xsd:element name="Tomador" type="tcIdentificacaoTomador" minOccurs="0" maxOccurs="1"/>
607
+ <xsd:element name="IntermediarioServico" type="tcIdentificacaoIntermediarioServico" minOccurs="0" maxOccurs="1"/>
608
+ </xsd:sequence>
609
+ </xsd:complexType>
610
+ </xsd:element>
611
+
612
+ <xsd:element name="ConsultarLoteRpsResposta">
613
+ <xsd:complexType>
614
+ <xsd:choice>
615
+ <xsd:element name="ListaNfse" minOccurs="1" maxOccurs="1">
616
+ <xsd:complexType>
617
+ <xsd:sequence>
618
+ <xsd:element name="CompNfse" maxOccurs="unbounded" type="tcCompNfse" minOccurs="1"/>
619
+ </xsd:sequence>
620
+ </xsd:complexType>
621
+ </xsd:element>
622
+ <xsd:element ref="ListaMensagemRetorno" minOccurs="1" maxOccurs="1"/>
623
+ </xsd:choice>
624
+ </xsd:complexType>
625
+ </xsd:element>
626
+
627
+ <xsd:element name="ConsultarLoteRpsEnvio">
628
+ <xsd:complexType>
629
+ <xsd:sequence>
630
+ <xsd:element name="Prestador" type="tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1"/>
631
+ <xsd:element name="Protocolo" type="tsNumeroProtocolo" minOccurs="1" maxOccurs="1"/>
632
+ </xsd:sequence>
633
+ </xsd:complexType>
634
+ </xsd:element>
635
+
636
+ <xsd:element name="CancelarNfseResposta">
637
+ <xsd:complexType>
638
+ <xsd:choice>
639
+ <xsd:element name="Cancelamento" type="tcCancelamentoNfse"/>
640
+ <xsd:element ref="ListaMensagemRetorno" minOccurs="1" maxOccurs="1"/>
641
+ </xsd:choice>
642
+ </xsd:complexType>
643
+ </xsd:element>
644
+
645
+ <xsd:element name="CancelarNfseEnvio">
646
+ <xsd:complexType>
647
+ <xsd:sequence>
648
+ <xsd:element name="Pedido" type="tcPedidoCancelamento"/>
649
+ </xsd:sequence>
650
+ </xsd:complexType>
651
+ </xsd:element>
652
+ </xsd:schema>