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,863 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <xsd:schema targetNamespace="http://nfe.pmf.sc.gov.br/nfse/versao?tipo=xsd-2_0" xmlns:tipos="http://nfe.pmf.sc.gov.br/nfse/versao?tipo=xsd-2_0"
3
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
4
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd" />
5
+ <!-- Tipos Simples -->
6
+ <xsd:simpleType name="tsIdTag">
7
+ <xsd:annotation>
8
+ <xsd:documentation>Identificador da tag a ser assinada. Concatenação
9
+ da inscrição municipal do prestador com o número da AEDF e o
10
+ número
11
+ serial da
12
+ requisição ou da NFPS-e.
13
+ </xsd:documentation>
14
+ </xsd:annotation>
15
+ <xsd:restriction base="xsd:string">
16
+ <xsd:maxLength value="23" />
17
+ <xsd:whiteSpace value="collapse" />
18
+ </xsd:restriction>
19
+ </xsd:simpleType>
20
+ <xsd:simpleType name="tsNumeroAEDF">
21
+ <xsd:annotation>
22
+ <xsd:documentation>Autorização para Emissão de Documento Fiscal
23
+ Eletrônico.</xsd:documentation>
24
+ </xsd:annotation>
25
+ <xsd:restriction base="xsd:string">
26
+ <xsd:minLength value="6" />
27
+ <xsd:maxLength value="7" />
28
+ <xsd:whiteSpace value="collapse" />
29
+ </xsd:restriction>
30
+ </xsd:simpleType>
31
+ <xsd:simpleType name="tsTipoAedf">
32
+ <xsd:annotation>
33
+ <xsd:documentation>Tipo da AEDF
34
+ </xsd:documentation>
35
+ </xsd:annotation>
36
+ <xsd:restriction base="xsd:string">
37
+ <xsd:enumeration value="NORMAL" />
38
+ <xsd:enumeration value="FATURA" />
39
+ </xsd:restriction>
40
+ </xsd:simpleType>
41
+ <xsd:simpleType name="tsAutenticacao">
42
+ <xsd:annotation>
43
+ <xsd:documentation>Tipo autenticação.</xsd:documentation>
44
+ </xsd:annotation>
45
+ <xsd:restriction base="xsd:string">
46
+ <xsd:length value="40" />
47
+ <xsd:whiteSpace value="collapse" />
48
+ </xsd:restriction>
49
+ </xsd:simpleType>
50
+ <xsd:simpleType name="tsAliquota">
51
+ <xsd:annotation>
52
+ <xsd:documentation>Tipo utilizado para valor de alíquota
53
+ </xsd:documentation>
54
+ </xsd:annotation>
55
+ <xsd:restriction base="xsd:decimal">
56
+ <xsd:totalDigits value="5" />
57
+ <xsd:fractionDigits value="4" />
58
+ <xsd:minInclusive value="0" />
59
+ </xsd:restriction>
60
+ </xsd:simpleType>
61
+ <xsd:simpleType name="tsBairro">
62
+ <xsd:annotation>
63
+ <xsd:documentation>Tipo bairro.</xsd:documentation>
64
+ </xsd:annotation>
65
+ <xsd:restriction base="xsd:string">
66
+ <xsd:minLength value="0" />
67
+ <xsd:maxLength value="60" />
68
+ <xsd:whiteSpace value="collapse" />
69
+ </xsd:restriction>
70
+ </xsd:simpleType>
71
+ <xsd:simpleType name="tsCEP">
72
+ <xsd:annotation>
73
+ <xsd:documentation>Tipo CEP.</xsd:documentation>
74
+ </xsd:annotation>
75
+ <xsd:restriction base="xsd:int">
76
+ <xsd:pattern value="[0-9]{8}" />
77
+ </xsd:restriction>
78
+ </xsd:simpleType>
79
+ <xsd:simpleType name="tsPostalCode">
80
+ <xsd:annotation>
81
+ <xsd:documentation>Tipo código postal para outros países.
82
+ </xsd:documentation>
83
+ </xsd:annotation>
84
+ <xsd:restriction base="xsd:string">
85
+ <xsd:maxLength value="10" />
86
+ <xsd:whiteSpace value="collapse" />
87
+ </xsd:restriction>
88
+ </xsd:simpleType>
89
+ <xsd:simpleType name="tsCodigoAtividade">
90
+ <xsd:annotation>
91
+ <xsd:documentation>Subclasse do CNAE obtida da tabela de Código
92
+ Nacional de Atividade Econômica disponibilizada pela PMF.
93
+ </xsd:documentation>
94
+ </xsd:annotation>
95
+ <xsd:restriction base="xsd:int">
96
+ <xsd:pattern value="[0-9]{7,8}" />
97
+ </xsd:restriction>
98
+ </xsd:simpleType>
99
+ <xsd:simpleType name="tsIdCNAE">
100
+ <xsd:annotation>
101
+ <xsd:documentation>Identificador de CNAE obtido da tabela de Código
102
+ Nacional de Atividade Econômica disponibilizada pela PMF.
103
+ </xsd:documentation>
104
+ </xsd:annotation>
105
+ <xsd:restriction base="xsd:int">
106
+ <xsd:pattern value="[0-9]{1,5}" />
107
+ </xsd:restriction>
108
+ </xsd:simpleType>
109
+ <xsd:simpleType name="tsCNPJ">
110
+ <xsd:annotation>
111
+ <xsd:documentation>Tipo Cadastro Nacional de Pessoa Jurídica.
112
+ </xsd:documentation>
113
+ </xsd:annotation>
114
+ <xsd:restriction base="xsd:string">
115
+ <xsd:length value="14" />
116
+ <xsd:pattern value="\d+" />
117
+ </xsd:restriction>
118
+ </xsd:simpleType>
119
+ <xsd:simpleType name="tsCFPS">
120
+ <xsd:annotation>
121
+ <xsd:documentation>Tipo Código Fiscal de Prestação de Serviço.
122
+ </xsd:documentation>
123
+ </xsd:annotation>
124
+ <xsd:restriction base="xsd:int">
125
+ <xsd:pattern value="[0-9]{1,4}" />
126
+ </xsd:restriction>
127
+ </xsd:simpleType>
128
+ <xsd:simpleType name="tsCodigoCampanha">
129
+ <xsd:annotation>
130
+ <xsd:documentation>Tipo Código de campanha promocional.
131
+ </xsd:documentation>
132
+ </xsd:annotation>
133
+ <xsd:restriction base="xsd:string">
134
+ <xsd:length value="8" />
135
+ <xsd:whiteSpace value="collapse" />
136
+ </xsd:restriction>
137
+ </xsd:simpleType>
138
+ <xsd:simpleType name="tsCodigoVerificacao">
139
+ <xsd:annotation>
140
+ <xsd:documentation>Tipo Código de verificação da NFPS-e. Gerado
141
+ automaticamente pelo sistema de Notas Fiscais de Serviço
142
+ Eletrônicas.
143
+ </xsd:documentation>
144
+ </xsd:annotation>
145
+ <xsd:restriction base="xsd:string">
146
+ <xsd:length value="16" />
147
+ <xsd:whiteSpace value="collapse" />
148
+ </xsd:restriction>
149
+ </xsd:simpleType>
150
+ <xsd:simpleType name="tsComplementoEndereco">
151
+ <xsd:annotation>
152
+ <xsd:documentation>Tipo complemento do endereço.</xsd:documentation>
153
+ </xsd:annotation>
154
+ <xsd:restriction base="xsd:string">
155
+ <xsd:minLength value="0" />
156
+ <xsd:maxLength value="30" />
157
+ <xsd:whiteSpace value="collapse" />
158
+ </xsd:restriction>
159
+ </xsd:simpleType>
160
+ <xsd:simpleType name="tsCPF">
161
+ <xsd:annotation>
162
+ <xsd:documentation>Tipo Cadastro Pessoa Física.</xsd:documentation>
163
+ </xsd:annotation>
164
+ <xsd:restriction base="xsd:string">
165
+ <xsd:length value="11" />
166
+ <xsd:pattern value="\d+" />
167
+ </xsd:restriction>
168
+ </xsd:simpleType>
169
+ <xsd:simpleType name="tsCST">
170
+ <xsd:annotation>
171
+ <xsd:documentation>Tipo Código de Situação Tributária.
172
+ </xsd:documentation>
173
+ </xsd:annotation>
174
+ <xsd:restriction base="xsd:int">
175
+ <xsd:pattern value="[0-9]{1,2}" />
176
+ </xsd:restriction>
177
+ </xsd:simpleType>
178
+ <xsd:simpleType name="tsDadosAdicionais">
179
+ <xsd:annotation>
180
+ <xsd:documentation>Tipo Dados Adicionais. Texto descritivo contendo
181
+ dados adicionais da nota.</xsd:documentation>
182
+ </xsd:annotation>
183
+ <xsd:restriction base="xsd:string">
184
+ <xsd:minLength value="0" />
185
+ <xsd:maxLength value="256" />
186
+ <xsd:whiteSpace value="collapse" />
187
+ </xsd:restriction>
188
+ </xsd:simpleType>
189
+ <xsd:simpleType name="tsDiscriminacao">
190
+ <xsd:annotation>
191
+ <xsd:documentation>Tipo discriminação dos serviços prestados ou
192
+ motivo de cancelamento da NFPS-e.
193
+ </xsd:documentation>
194
+ </xsd:annotation>
195
+ <xsd:restriction base="xsd:string">
196
+ <xsd:minLength value="0" />
197
+ <xsd:maxLength value="1000" />
198
+ <xsd:whiteSpace value="collapse" />
199
+ </xsd:restriction>
200
+ </xsd:simpleType>
201
+ <xsd:simpleType name="tsEmail">
202
+ <xsd:annotation>
203
+ <xsd:documentation>Tipo E-mail.</xsd:documentation>
204
+ </xsd:annotation>
205
+ <xsd:restriction base="xsd:string">
206
+ <xsd:minLength value="6" />
207
+ <xsd:maxLength value="80" />
208
+ <xsd:whiteSpace value="collapse" />
209
+ <xsd:pattern value=".+@.+\..+" />
210
+ </xsd:restriction>
211
+ </xsd:simpleType>
212
+ <xsd:simpleType name="tsIdentificacaoRequisicao">
213
+ <xsd:annotation>
214
+ <xsd:documentation>Identificação da requisição.
215
+ </xsd:documentation>
216
+ </xsd:annotation>
217
+ <xsd:restriction base="xsd:string">
218
+ <xsd:minLength value="1" />
219
+ <xsd:maxLength value="10" />
220
+ <xsd:whiteSpace value="collapse" />
221
+ </xsd:restriction>
222
+ </xsd:simpleType>
223
+ <xsd:simpleType name="tsInscricaoMunicipal">
224
+ <xsd:annotation>
225
+ <xsd:documentation>Tipo Inscrição Municipal.
226
+ </xsd:documentation>
227
+ </xsd:annotation>
228
+ <xsd:restriction base="xsd:string">
229
+ <xsd:minLength value="1" />
230
+ <xsd:maxLength value="7" />
231
+ <xsd:whiteSpace value="collapse" />
232
+ </xsd:restriction>
233
+ </xsd:simpleType>
234
+ <xsd:simpleType name="tsLogradouro">
235
+ <xsd:annotation>
236
+ <xsd:documentation>Tipo Logradouro.
237
+ </xsd:documentation>
238
+ </xsd:annotation>
239
+ <xsd:restriction base="xsd:string">
240
+ <xsd:minLength value="0" />
241
+ <xsd:maxLength value="80" />
242
+ <xsd:whiteSpace value="collapse" />
243
+ </xsd:restriction>
244
+ </xsd:simpleType>
245
+ <xsd:simpleType name="tsMunicipio">
246
+ <xsd:annotation>
247
+ <xsd:documentation>Nome do município.</xsd:documentation>
248
+ </xsd:annotation>
249
+ <xsd:restriction base="xsd:string">
250
+ <xsd:minLength value="0" />
251
+ <xsd:maxLength value="60" />
252
+ <xsd:whiteSpace value="collapse" />
253
+ </xsd:restriction>
254
+ </xsd:simpleType>
255
+ <xsd:simpleType name="tsMunicipioIBGE">
256
+ <xsd:annotation>
257
+ <xsd:documentation>Código do município conforme tabela do IBGE.
258
+ </xsd:documentation>
259
+ </xsd:annotation>
260
+ <xsd:restriction base="xsd:int">
261
+ <xsd:pattern value="[0-9]{1,7}" />
262
+ </xsd:restriction>
263
+ </xsd:simpleType>
264
+ <xsd:simpleType name="tsNumeroSerie">
265
+ <xsd:annotation>
266
+ <xsd:documentation>Tipo Número de Série de uma NFPS-e.
267
+ </xsd:documentation>
268
+ </xsd:annotation>
269
+ <xsd:restriction base="xsd:int">
270
+ <xsd:pattern value="[0-9]{1,6}" />
271
+ </xsd:restriction>
272
+ </xsd:simpleType>
273
+ <xsd:simpleType name="tsNumeroEndereco">
274
+ <xsd:annotation>
275
+ <xsd:documentation>Tipo número do endereço.</xsd:documentation>
276
+ </xsd:annotation>
277
+ <xsd:restriction base="xsd:string">
278
+ <xsd:pattern value="[0-9]{1,9}" />
279
+ </xsd:restriction>
280
+ </xsd:simpleType>
281
+ <xsd:simpleType name="tsOutrosDocIdentificacao">
282
+ <xsd:annotation>
283
+ <xsd:documentation>Documento de identificação.</xsd:documentation>
284
+ </xsd:annotation>
285
+ <xsd:restriction base="xsd:string">
286
+ <xsd:minLength value="1" />
287
+ <xsd:maxLength value="20" />
288
+ <xsd:whiteSpace value="collapse" />
289
+ </xsd:restriction>
290
+ </xsd:simpleType>
291
+ <xsd:simpleType name="tsPais">
292
+ <xsd:annotation>
293
+ <xsd:documentation>Código do país (Tabela do BACEN).
294
+ </xsd:documentation>
295
+ </xsd:annotation>
296
+ <xsd:restriction base="xsd:int">
297
+ <xsd:pattern value="[0-9]{1,5}" />
298
+ </xsd:restriction>
299
+ </xsd:simpleType>
300
+ <xsd:simpleType name="tsQuantidade">
301
+ <xsd:annotation>
302
+ <xsd:documentation>Tipo quantidade de serviços ou de itens de
303
+ serviço.
304
+ </xsd:documentation>
305
+ </xsd:annotation>
306
+ <xsd:restriction base="xsd:int">
307
+ <xsd:pattern value="[0-9]{1,3}" />
308
+ </xsd:restriction>
309
+ </xsd:simpleType>
310
+ <xsd:simpleType name="tsRazaoSocial">
311
+ <xsd:annotation>
312
+ <xsd:documentation>Tipo Razão Social.</xsd:documentation>
313
+ </xsd:annotation>
314
+ <xsd:restriction base="xsd:string">
315
+ <xsd:minLength value="0" />
316
+ <xsd:maxLength value="80" />
317
+ <xsd:whiteSpace value="collapse" />
318
+ </xsd:restriction>
319
+ </xsd:simpleType>
320
+ <xsd:simpleType name="tsStatusNFPSe">
321
+ <xsd:annotation>
322
+ <xsd:documentation>Tipo referente aos possíveis status de NFPS-e.
323
+ </xsd:documentation>
324
+ </xsd:annotation>
325
+ <xsd:restriction base="xsd:int">
326
+ <xsd:enumeration value="0">
327
+ <xsd:annotation>
328
+ <xsd:documentation>Normal.</xsd:documentation>
329
+ </xsd:annotation>
330
+ </xsd:enumeration>
331
+ <xsd:enumeration value="1">
332
+ <xsd:annotation>
333
+ <xsd:documentation>Cancelada.</xsd:documentation>
334
+ </xsd:annotation>
335
+ </xsd:enumeration>
336
+ </xsd:restriction>
337
+ </xsd:simpleType>
338
+ <xsd:simpleType name="tsStatusRequisicao">
339
+ <xsd:annotation>
340
+ <xsd:documentation>Tipo referente aos possíveis status de
341
+ requisições.
342
+ </xsd:documentation>
343
+ </xsd:annotation>
344
+ <xsd:restriction base="xsd:int">
345
+ <xsd:enumeration value="0">
346
+ <xsd:annotation>
347
+ <xsd:documentation>Em edição.</xsd:documentation>
348
+ </xsd:annotation>
349
+ </xsd:enumeration>
350
+ <xsd:enumeration value="1">
351
+ <xsd:annotation>
352
+ <xsd:documentation>Pendente.</xsd:documentation>
353
+ </xsd:annotation>
354
+ </xsd:enumeration>
355
+ <xsd:enumeration value="2">
356
+ <xsd:annotation>
357
+ <xsd:documentation>Recibo Provisório.</xsd:documentation>
358
+ </xsd:annotation>
359
+ </xsd:enumeration>
360
+ </xsd:restriction>
361
+ </xsd:simpleType>
362
+ <xsd:simpleType name="tsTelefone">
363
+ <xsd:annotation>
364
+ <xsd:documentation>Número de telefone com prefixo.
365
+ </xsd:documentation>
366
+ </xsd:annotation>
367
+ <xsd:restriction base="xsd:long">
368
+ <xsd:pattern value="[0-9]{6,14}" />
369
+ </xsd:restriction>
370
+ </xsd:simpleType>
371
+ <xsd:simpleType name="tsTipoSistema">
372
+ <xsd:annotation>
373
+ <xsd:documentation>Tipo do sistema. Homologação ou Produção.
374
+ </xsd:documentation>
375
+ </xsd:annotation>
376
+ <xsd:restriction base="xsd:int">
377
+ <xsd:enumeration value="0">
378
+ <xsd:annotation>
379
+ <xsd:documentation>Homologação.</xsd:documentation>
380
+ </xsd:annotation>
381
+ </xsd:enumeration>
382
+ <xsd:enumeration value="1">
383
+ <xsd:annotation>
384
+ <xsd:documentation>Produção.</xsd:documentation>
385
+ </xsd:annotation>
386
+ </xsd:enumeration>
387
+ </xsd:restriction>
388
+ </xsd:simpleType>
389
+ <xsd:simpleType name="tsUF">
390
+ <xsd:annotation>
391
+ <xsd:documentation>Tipo UF.</xsd:documentation>
392
+ </xsd:annotation>
393
+ <xsd:restriction base="xsd:string">
394
+ <xsd:length value="2" />
395
+ <xsd:whiteSpace value="collapse" />
396
+ </xsd:restriction>
397
+ </xsd:simpleType>
398
+ <xsd:simpleType name="tsValor">
399
+ <xsd:annotation>
400
+ <xsd:documentation>Tipo utilizado para valores com 15 dígitos, sendo
401
+ 13 de corpo e 2 decimais.</xsd:documentation>
402
+ </xsd:annotation>
403
+ <xsd:restriction base="xsd:decimal">
404
+ <xsd:totalDigits value="15" />
405
+ <xsd:fractionDigits value="2" />
406
+ <xsd:minInclusive value="0" />
407
+ <xsd:pattern value="0|0\.[0-9]{0,2}|[1-9]{1}[0-9]{0,13}(\.[0-9]{0,2})?" />
408
+ </xsd:restriction>
409
+ </xsd:simpleType>
410
+ <xsd:simpleType name="tsVersao">
411
+ <xsd:annotation>
412
+ <xsd:documentation>Versão do XML Schema.</xsd:documentation>
413
+ </xsd:annotation>
414
+ <xsd:restriction base="xsd:decimal">
415
+ <xsd:totalDigits value="3" />
416
+ <xsd:fractionDigits value="2" />
417
+ <xsd:minInclusive value="0" />
418
+ </xsd:restriction>
419
+ </xsd:simpleType>
420
+ <!-- Tipos Complexos -->
421
+ <xsd:complexType name="tcCodigoPostal">
422
+ <xsd:annotation>
423
+ <xsd:documentation>Tipo que representa um código postal.
424
+ </xsd:documentation>
425
+ </xsd:annotation>
426
+ <xsd:choice>
427
+ <xsd:element name="CEP" type="tipos:tsCEP" minOccurs="1" maxOccurs="1" />
428
+ <xsd:element name="PostalCode" type="tipos:tsPostalCode" minOccurs="1" maxOccurs="1" />
429
+ </xsd:choice>
430
+ </xsd:complexType>
431
+ <xsd:complexType name="tcInformacaoAEDF">
432
+ <xsd:annotation>
433
+ <xsd:documentation>Dados da AEDF (Autorização para Emissão de
434
+ Documento Fiscal
435
+ Eletrônica).</xsd:documentation>
436
+ </xsd:annotation>
437
+ <xsd:sequence>
438
+ <xsd:element name="AEDF" type="tipos:tsNumeroAEDF" minOccurs="1" maxOccurs="1" />
439
+ <xsd:element name="TipoAedf" type="tipos:tsTipoAedf" minOccurs="1" maxOccurs="1" />
440
+ </xsd:sequence>
441
+ </xsd:complexType>
442
+ <xsd:complexType name="tcMunicipio">
443
+ <xsd:annotation>
444
+ <xsd:documentation>Tipo que representa um município.
445
+ </xsd:documentation>
446
+ </xsd:annotation>
447
+ <xsd:choice>
448
+ <xsd:element name="CodigoMunicipio" type="tipos:tsMunicipioIBGE" minOccurs="1" maxOccurs="1" />
449
+ <xsd:element name="NomeMunicipio" type="tipos:tsMunicipio" minOccurs="1" maxOccurs="1" />
450
+ </xsd:choice>
451
+ </xsd:complexType>
452
+ <xsd:complexType name="tcEndereco">
453
+ <xsd:annotation>
454
+ <xsd:documentation>Tipo Endereço.</xsd:documentation>
455
+ </xsd:annotation>
456
+ <xsd:sequence>
457
+ <xsd:element name="Logradouro" type="tipos:tsLogradouro" minOccurs="1" maxOccurs="1" />
458
+ <xsd:element name="NumeroEndereco" type="tipos:tsNumeroEndereco" minOccurs="0" maxOccurs="1" />
459
+ <xsd:element name="ComplementoEndereco" type="tipos:tsComplementoEndereco" minOccurs="0" maxOccurs="1" />
460
+ <xsd:element name="Bairro" type="tipos:tsBairro" minOccurs="1" maxOccurs="1" />
461
+ <xsd:element name="Municipio" type="tipos:tcMunicipio" minOccurs="1" maxOccurs="1" />
462
+ <xsd:element name="CodigoPostal" type="tipos:tcCodigoPostal" minOccurs="1" maxOccurs="1" />
463
+ <xsd:element name="UF" type="tipos:tsUF" minOccurs="0" maxOccurs="1" />
464
+ <xsd:element name="Pais" type="tipos:tsPais" minOccurs="0" maxOccurs="1" />
465
+ </xsd:sequence>
466
+ </xsd:complexType>
467
+ <xsd:complexType name="tcContato">
468
+ <xsd:annotation>
469
+ <xsd:documentation>Tipo Contato. E-mail e telefone (opcional).
470
+ </xsd:documentation>
471
+ </xsd:annotation>
472
+ <xsd:sequence>
473
+ <xsd:element name="Email" type="tipos:tsEmail" minOccurs="1" maxOccurs="1" />
474
+ <xsd:element name="Telefone" type="tipos:tsTelefone" minOccurs="0" maxOccurs="1" />
475
+ </xsd:sequence>
476
+ </xsd:complexType>
477
+ <xsd:complexType name="tcCPFCNPJ">
478
+ <xsd:annotation>
479
+ <xsd:documentation>Tipo que representa um CPF/CNPJ.
480
+ </xsd:documentation>
481
+ </xsd:annotation>
482
+ <xsd:choice>
483
+ <xsd:element name="CPF" type="tipos:tsCPF" minOccurs="1" maxOccurs="1" />
484
+ <xsd:element name="CNPJ" type="tipos:tsCNPJ" minOccurs="1" maxOccurs="1" />
485
+ </xsd:choice>
486
+ </xsd:complexType>
487
+ <xsd:complexType name="tcDocIdTomador">
488
+ <xsd:annotation>
489
+ <xsd:documentation>Tipo que representa um documento de identificação
490
+ do tomador.
491
+ </xsd:documentation>
492
+ </xsd:annotation>
493
+ <xsd:choice>
494
+ <xsd:element name="CPFCNPJ" type="tipos:tcCPFCNPJ" minOccurs="1" maxOccurs="1" />
495
+ <xsd:element name="Outros" type="tipos:tsOutrosDocIdentificacao" minOccurs="1" maxOccurs="1" />
496
+ </xsd:choice>
497
+ </xsd:complexType>
498
+ <xsd:complexType name="tcIdentificacaoTomador">
499
+ <xsd:annotation>
500
+ <xsd:documentation>Tipo Identificação do Tomador.</xsd:documentation>
501
+ </xsd:annotation>
502
+ <xsd:sequence>
503
+ <xsd:element name="DocIdTomador" type="tipos:tcDocIdTomador" minOccurs="1" maxOccurs="1" />
504
+ <xsd:element name="InscricaoMunicipal" type="tipos:tsInscricaoMunicipal" minOccurs="0" maxOccurs="1" />
505
+ </xsd:sequence>
506
+ </xsd:complexType>
507
+ <xsd:complexType name="tcDadosTomador">
508
+ <xsd:annotation>
509
+ <xsd:documentation>Tipo Dados do Tomador.</xsd:documentation>
510
+ </xsd:annotation>
511
+ <xsd:sequence>
512
+ <xsd:element name="IdentificacaoTomador" type="tipos:tcIdentificacaoTomador" minOccurs="1" maxOccurs="1" />
513
+ <xsd:element name="RazaoSocial" type="tipos:tsRazaoSocial" minOccurs="1" maxOccurs="1" />
514
+ <xsd:element name="Endereco" type="tipos:tcEndereco" minOccurs="1" maxOccurs="1" />
515
+ <xsd:element name="Contato" type="tipos:tcContato" minOccurs="1" maxOccurs="1" />
516
+ </xsd:sequence>
517
+ </xsd:complexType>
518
+ <xsd:complexType name="tcIdentificacaoPrestador">
519
+ <xsd:annotation>
520
+ <xsd:documentation>Tipo Identificação do Prestador.
521
+ </xsd:documentation>
522
+ </xsd:annotation>
523
+ <xsd:sequence>
524
+ <xsd:element name="CNPJ" type="tipos:tsCNPJ" minOccurs="1" maxOccurs="1" />
525
+ <xsd:element name="InscricaoMunicipal" type="tipos:tsInscricaoMunicipal" minOccurs="0" maxOccurs="1" />
526
+ </xsd:sequence>
527
+ </xsd:complexType>
528
+ <xsd:complexType name="tcDadosPrestador">
529
+ <xsd:annotation>
530
+ <xsd:documentation>Tipo Dados do Pretador.</xsd:documentation>
531
+ </xsd:annotation>
532
+ <xsd:sequence>
533
+ <xsd:element name="IdentificacaoPrestador" type="tipos:tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1" />
534
+ <xsd:element name="RazaoSocial" type="tipos:tsRazaoSocial" minOccurs="1" maxOccurs="1" />
535
+ <xsd:element name="Endereco" type="tipos:tcEndereco" minOccurs="1" maxOccurs="1" />
536
+ <xsd:element name="Contato" type="tipos:tcContato" minOccurs="1" maxOccurs="1" />
537
+ </xsd:sequence>
538
+ </xsd:complexType>
539
+ <xsd:complexType name="tcItemServico">
540
+ <xsd:sequence>
541
+ <xsd:annotation>
542
+ <xsd:documentation>Item de serviços.
543
+ </xsd:documentation>
544
+ </xsd:annotation>
545
+ <xsd:sequence>
546
+ <xsd:element name="IdCNAE" type="tipos:tsIdCNAE" minOccurs="1" maxOccurs="1" />
547
+ <xsd:element name="CodigoAtividade" type="tipos:tsCodigoAtividade" minOccurs="1" maxOccurs="1" />
548
+ <xsd:element name="DescricaoServico" type="tipos:tsDiscriminacao" minOccurs="1" maxOccurs="1" />
549
+ <xsd:element name="CST" type="tipos:tsCST" minOccurs="1" maxOccurs="1" />
550
+ <xsd:element name="Aliquota" type="tipos:tsAliquota" minOccurs="1" maxOccurs="1" />
551
+ <xsd:element name="ValorUnitario" type="tipos:tsValor" minOccurs="1" maxOccurs="1" />
552
+ <xsd:element name="Quantidade" type="tipos:tsQuantidade" minOccurs="1" maxOccurs="1" />
553
+ <xsd:element name="ValorTotal" type="tipos:tsValor" minOccurs="1" maxOccurs="1" />
554
+ </xsd:sequence>
555
+ </xsd:sequence>
556
+ </xsd:complexType>
557
+ <xsd:complexType name="tcDadosServico">
558
+ <xsd:sequence>
559
+ <xsd:annotation>
560
+ <xsd:documentation>Dados do(s) serviço(s).
561
+ </xsd:documentation>
562
+ </xsd:annotation>
563
+ <xsd:sequence>
564
+ <xsd:element name="ItemServico" type="tipos:tcItemServico" minOccurs="1" maxOccurs="999" />
565
+ <xsd:element name="BaseCalculo" type="tipos:tsValor" minOccurs="1" maxOccurs="1" />
566
+ <xsd:element name="ValorISSQN" type="tipos:tsValor" minOccurs="1" maxOccurs="1" />
567
+ <xsd:element name="BaseCalculoSubstituicao" type="tipos:tsValor" minOccurs="0" maxOccurs="1" />
568
+ <xsd:element name="ValorISSQNSubstituicao" type="tipos:tsValor" minOccurs="0" maxOccurs="1" />
569
+ <xsd:element name="ValorTotalServicos" type="tipos:tsValor" minOccurs="1" maxOccurs="1" />
570
+ <xsd:element name="DadosAdicionais" type="tipos:tsDadosAdicionais" minOccurs="0" maxOccurs="1" />
571
+ </xsd:sequence>
572
+ </xsd:sequence>
573
+ </xsd:complexType>
574
+ <!-- Elemento raíz InfRequisicao -->
575
+ <xsd:element name="InfRequisicao" type="tipos:tcInfRequisicao" />
576
+ <xsd:complexType name="tcInfRequisicao">
577
+ <xsd:annotation>
578
+ <xsd:documentation>Tipo que representa uma requisição de NFPS-e.
579
+ </xsd:documentation>
580
+ </xsd:annotation>
581
+ <xsd:sequence>
582
+ <xsd:element name="Versao" type="tipos:tsVersao" minOccurs="1" maxOccurs="1">
583
+ <xsd:annotation>
584
+ <xsd:documentation>Versão do XML Schema deste tipo complexo.
585
+ </xsd:documentation>
586
+ </xsd:annotation>
587
+ </xsd:element>
588
+ <xsd:element name="TipoSistema" type="tipos:tsTipoSistema" minOccurs="1" maxOccurs="1">
589
+ <xsd:annotation>
590
+ <xsd:documentation>Homologação ou Produção.</xsd:documentation>
591
+ </xsd:annotation>
592
+ </xsd:element>
593
+ <xsd:element name="Identificacao" type="tipos:tsIdentificacaoRequisicao" minOccurs="0" maxOccurs="1">
594
+ <xsd:annotation>
595
+ <xsd:documentation>Identificação para requisição.
596
+ </xsd:documentation>
597
+ </xsd:annotation>
598
+ </xsd:element>
599
+ <xsd:element name="AEDF" type="tipos:tcInformacaoAEDF" minOccurs="1" maxOccurs="1">
600
+ <xsd:annotation>
601
+ <xsd:documentation>Autorização para Emissão de Documentos Fiscais
602
+ Eletrônicos.</xsd:documentation>
603
+ </xsd:annotation>
604
+ </xsd:element>
605
+ <xsd:element name="CodigoVerificacao" type="tipos:tsCodigoVerificacao" minOccurs="0" maxOccurs="1">
606
+ <xsd:annotation>
607
+ <xsd:documentation>Código de verificação da requisição.
608
+ </xsd:documentation>
609
+ </xsd:annotation>
610
+ </xsd:element>
611
+ <xsd:element name="DataEmissao" type="xsd:date" minOccurs="1" maxOccurs="1">
612
+ <xsd:annotation>
613
+ <xsd:documentation>Data de emissão da NFPS-e.</xsd:documentation>
614
+ </xsd:annotation>
615
+ </xsd:element>
616
+ <xsd:element name="NumeroSerieRequisicao" type="tipos:tsNumeroSerie" minOccurs="0" maxOccurs="1">
617
+ <xsd:annotation>
618
+ <xsd:documentation>Número de série da requisição.
619
+ </xsd:documentation>
620
+ </xsd:annotation>
621
+ </xsd:element>
622
+ <xsd:element name="NumeroSerieSubst" type="tipos:tsNumeroSerie" minOccurs="0" maxOccurs="1">
623
+ <xsd:annotation>
624
+ <xsd:documentation>Número serial da NFPS-e a ser substituída por
625
+ esta.</xsd:documentation>
626
+ </xsd:annotation>
627
+ </xsd:element>
628
+ <xsd:element name="CFPS" type="tipos:tsCFPS" minOccurs="1" maxOccurs="1">
629
+ <xsd:annotation>
630
+ <xsd:documentation>Código Fiscal de Prestação de Serviço.
631
+ </xsd:documentation>
632
+ </xsd:annotation>
633
+ </xsd:element>
634
+ <xsd:element name="StatusRequisicao" type="tipos:tsStatusRequisicao" minOccurs="0" maxOccurs="1">
635
+ <xsd:annotation>
636
+ <xsd:documentation>Status da requisição.</xsd:documentation>
637
+ </xsd:annotation>
638
+ </xsd:element>
639
+ <xsd:element name="DadosServico" type="tipos:tcDadosServico" minOccurs="1" maxOccurs="1">
640
+ <xsd:annotation>
641
+ <xsd:documentation>Dados do(s) Serviço(s).</xsd:documentation>
642
+ </xsd:annotation>
643
+ </xsd:element>
644
+ <xsd:element name="Prestador" type="tipos:tcDadosPrestador" minOccurs="0" maxOccurs="1">
645
+ <xsd:annotation>
646
+ <xsd:documentation>Dados do Prestador. É inserido automaticamente
647
+ pelo emissor de NFPS-e.</xsd:documentation>
648
+ </xsd:annotation>
649
+ </xsd:element>
650
+ <xsd:element name="Tomador" type="tipos:tcDadosTomador" minOccurs="1" maxOccurs="1">
651
+ <xsd:annotation>
652
+ <xsd:documentation>Dados do Tomador.</xsd:documentation>
653
+ </xsd:annotation>
654
+ </xsd:element>
655
+ </xsd:sequence>
656
+ <xsd:attribute name="Id" type="tipos:tsIdTag" use="optional">
657
+ </xsd:attribute>
658
+ </xsd:complexType>
659
+ <!-- Elemento raíz Requisicao -->
660
+ <xsd:element name="Requisicao" type="tipos:tcRequisicao" />
661
+ <xsd:complexType name="tcRequisicao">
662
+ <xsd:annotation>
663
+ <xsd:documentation>Tipo Requisicao.</xsd:documentation>
664
+ </xsd:annotation>
665
+ <xsd:sequence>
666
+ <xsd:element name="InfRequisicao" type="tipos:tcInfRequisicao" minOccurs="1" maxOccurs="1" />
667
+ <xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" />
668
+ <xsd:element name="Autenticacao" type="tipos:tsAutenticacao" minOccurs="0" maxOccurs="1" />
669
+ </xsd:sequence>
670
+ </xsd:complexType>
671
+ <!-- Elemento raíz InfRequisicaoCancelamento -->
672
+ <xsd:element name="InfRequisicaoCancelamento" type="tipos:tcInfRequisicaoCancelamento" />
673
+ <xsd:complexType name="tcInfRequisicaoCancelamento">
674
+ <xsd:annotation>
675
+ <xsd:documentation>Tipo que representa uma requisição de cancelamento
676
+ de NFPS-e.
677
+ </xsd:documentation>
678
+ </xsd:annotation>
679
+ <xsd:sequence>
680
+ <xsd:element name="Versao" type="tipos:tsVersao" minOccurs="1" maxOccurs="1">
681
+ <xsd:annotation>
682
+ <xsd:documentation>Versão do XML Schema deste tipo complexo.
683
+ </xsd:documentation>
684
+ </xsd:annotation>
685
+ </xsd:element>
686
+ <xsd:element name="TipoSistema" type="tipos:tsTipoSistema" minOccurs="1" maxOccurs="1">
687
+ <xsd:annotation>
688
+ <xsd:documentation>Homologação ou Produção.</xsd:documentation>
689
+ </xsd:annotation>
690
+ </xsd:element>
691
+ <xsd:element name="AEDF" type="tipos:tsNumeroAEDF" minOccurs="1" maxOccurs="1">
692
+ <xsd:annotation>
693
+ <xsd:documentation>Número da AEDF da NFPS-e a ser cancelada.
694
+ </xsd:documentation>
695
+ </xsd:annotation>
696
+ </xsd:element>
697
+ <xsd:element name="NumeroSerie" type="tipos:tsNumeroSerie" minOccurs="1" maxOccurs="1">
698
+ <xsd:annotation>
699
+ <xsd:documentation>Número de série da NFPS-e a ser cancelada.
700
+ </xsd:documentation>
701
+ </xsd:annotation>
702
+ </xsd:element>
703
+ <xsd:element name="MotivoCancelamento" type="tipos:tsDiscriminacao" minOccurs="1" maxOccurs="1">
704
+ <xsd:annotation>
705
+ <xsd:documentation>Motivo de cancelamento da NFPS-e.
706
+ </xsd:documentation>
707
+ </xsd:annotation>
708
+ </xsd:element>
709
+ </xsd:sequence>
710
+ <xsd:attribute name="Id" type="tipos:tsIdTag" use="optional">
711
+ </xsd:attribute>
712
+ </xsd:complexType>
713
+ <!-- Elemento raíz RequisicaoCancelamento -->
714
+ <xsd:element name="RequisicaoCancelamento" type="tipos:tcRequisicaoCancelamento" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" />
715
+ <xsd:complexType name="tcRequisicaoCancelamento">
716
+ <xsd:annotation>
717
+ <xsd:documentation>Tipo Requisicao de Cancelamento.
718
+ </xsd:documentation>
719
+ </xsd:annotation>
720
+ <xsd:sequence>
721
+ <xsd:element name="InfRequisicaoCancelamento" type="tipos:tcInfRequisicaoCancelamento" minOccurs="1" maxOccurs="1" />
722
+ <xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" />
723
+ <xsd:element name="Autenticacao" type="tipos:tsAutenticacao" minOccurs="0" maxOccurs="1" />
724
+ </xsd:sequence>
725
+ </xsd:complexType>
726
+ <!-- Elemento raíz InfNFPSe -->
727
+ <xsd:element name="InfNFPSe" type="tipos:tcInfNFPSe" />
728
+ <xsd:complexType name="tcInfNFPSe">
729
+ <xsd:annotation>
730
+ <xsd:documentation>Tipo que representa uma NFPS-e.
731
+ </xsd:documentation>
732
+ </xsd:annotation>
733
+ <xsd:sequence>
734
+ <xsd:element name="Versao" type="tipos:tsVersao" minOccurs="1" maxOccurs="1">
735
+ <xsd:annotation>
736
+ <xsd:documentation>Versão do XML Schema deste tipo complexo.
737
+ </xsd:documentation>
738
+ </xsd:annotation>
739
+ </xsd:element>
740
+ <xsd:element name="TipoSistema" type="tipos:tsTipoSistema" minOccurs="1" maxOccurs="1">
741
+ <xsd:annotation>
742
+ <xsd:documentation>Homologação ou Produção.</xsd:documentation>
743
+ </xsd:annotation>
744
+ </xsd:element>
745
+ <xsd:element name="Identificacao" type="tipos:tsIdentificacaoRequisicao" minOccurs="0" maxOccurs="1">
746
+ <xsd:annotation>
747
+ <xsd:documentation>Identificação para requisição associada.
748
+ </xsd:documentation>
749
+ </xsd:annotation>
750
+ </xsd:element>
751
+ <xsd:element name="AEDF" type="tipos:tcInformacaoAEDF" minOccurs="1" maxOccurs="1">
752
+ <xsd:annotation>
753
+ <xsd:documentation>Informações da Autorização para Emissão de
754
+ Documentos Fiscais Eletrônicos.</xsd:documentation>
755
+ </xsd:annotation>
756
+ </xsd:element>
757
+ <xsd:element name="CodigoVerificacao" type="tipos:tsCodigoVerificacao" minOccurs="0" maxOccurs="1">
758
+ <xsd:annotation>
759
+ <xsd:documentation>Código de verificação da requisição.
760
+ </xsd:documentation>
761
+ </xsd:annotation>
762
+ </xsd:element>
763
+ <xsd:element name="NumeroSerie" type="tipos:tsNumeroSerie" minOccurs="1" maxOccurs="1">
764
+ <xsd:annotation>
765
+ <xsd:documentation>Número de série da NFPS-e.
766
+ </xsd:documentation>
767
+ </xsd:annotation>
768
+ </xsd:element>
769
+ <xsd:element name="NumeroSerieSubst" type="tipos:tsNumeroSerie" minOccurs="0" maxOccurs="1">
770
+ <xsd:annotation>
771
+ <xsd:documentation>Número serial da NFPS-e substituída por esta.
772
+ </xsd:documentation>
773
+ </xsd:annotation>
774
+ </xsd:element>
775
+ <xsd:element name="DataEmissao" type="xsd:date" minOccurs="1" maxOccurs="1">
776
+ <xsd:annotation>
777
+ <xsd:documentation>Data de emissão da NFPS-e</xsd:documentation>
778
+ </xsd:annotation>
779
+ </xsd:element>
780
+ <xsd:element name="DataProcessamento" type="xsd:dateTime" minOccurs="1" maxOccurs="1">
781
+ <xsd:annotation>
782
+ <xsd:documentation>Data de processamento da NFPS-e
783
+ </xsd:documentation>
784
+ </xsd:annotation>
785
+ </xsd:element>
786
+ <xsd:element name="DataCancelamento" type="xsd:dateTime" minOccurs="0" maxOccurs="1">
787
+ <xsd:annotation>
788
+ <xsd:documentation>Data de cancelamento da NFPS-e
789
+ </xsd:documentation>
790
+ </xsd:annotation>
791
+ </xsd:element>
792
+ <xsd:element name="MotivoCancelamento" type="tipos:tsDiscriminacao" minOccurs="0" maxOccurs="1">
793
+ <xsd:annotation>
794
+ <xsd:documentation>Motivo de cancelamento da NFPS-e.
795
+ </xsd:documentation>
796
+ </xsd:annotation>
797
+ </xsd:element>
798
+ <xsd:element name="CFPS" type="tipos:tsCFPS" minOccurs="1" maxOccurs="1">
799
+ <xsd:annotation>
800
+ <xsd:documentation>Código Fiscal de Prestação de Serviço.
801
+ </xsd:documentation>
802
+ </xsd:annotation>
803
+ </xsd:element>
804
+ <xsd:element name="CodigoCampanha" type="tipos:tsCodigoCampanha" minOccurs="0" maxOccurs="1">
805
+ <xsd:annotation>
806
+ <xsd:documentation>Código de campanha promocional.
807
+ </xsd:documentation>
808
+ </xsd:annotation>
809
+ </xsd:element>
810
+ <xsd:element name="StatusNFPSe" type="tipos:tsStatusNFPSe" minOccurs="1" maxOccurs="1">
811
+ <xsd:annotation>
812
+ <xsd:documentation>Status da requisição.</xsd:documentation>
813
+ </xsd:annotation>
814
+ </xsd:element>
815
+ <xsd:element name="DadosServico" type="tipos:tcDadosServico" minOccurs="1" maxOccurs="1">
816
+ <xsd:annotation>
817
+ <xsd:documentation>Dados do(s) Serviço(s).</xsd:documentation>
818
+ </xsd:annotation>
819
+ </xsd:element>
820
+ <xsd:element name="Prestador" type="tipos:tcDadosPrestador" minOccurs="1" maxOccurs="1">
821
+ <xsd:annotation>
822
+ <xsd:documentation>Dados do Prestador.</xsd:documentation>
823
+ </xsd:annotation>
824
+ </xsd:element>
825
+ <xsd:element name="Tomador" type="tipos:tcDadosTomador" minOccurs="1" maxOccurs="1">
826
+ <xsd:annotation>
827
+ <xsd:documentation>Dados do Tomador.</xsd:documentation>
828
+ </xsd:annotation>
829
+ </xsd:element>
830
+ </xsd:sequence>
831
+ <xsd:attribute name="Id" type="tipos:tsIdTag" use="required">
832
+ </xsd:attribute>
833
+ </xsd:complexType>
834
+ <!-- Elemento raíz Protocolo -->
835
+ <xsd:element name="Protocolo" type="tipos:tcProtocolo">
836
+ <xsd:annotation>
837
+ <xsd:documentation>Dados do Protocolo da NFPSe.</xsd:documentation>
838
+ </xsd:annotation>
839
+ </xsd:element>
840
+ <xsd:complexType name="tcProtocolo">
841
+ <xsd:simpleContent>
842
+ <xsd:extension base="xsd:base64Binary">
843
+ <xsd:annotation>
844
+ <xsd:documentation>Contém um carimbo do tempo no padrão
845
+ especificado pela RFC 3161 (http://www.ietf.org/rfc/rfc3161.txt)
846
+ codificado em Base64.</xsd:documentation>
847
+ </xsd:annotation>
848
+ <xsd:attribute name="Id" type="xsd:ID" use="required" />
849
+ </xsd:extension>
850
+ </xsd:simpleContent>
851
+ </xsd:complexType>
852
+ <!-- Elemento raíz NFPSe -->
853
+ <xsd:element name="NFPSe" type="tipos:tcNFPSe" />
854
+ <xsd:complexType name="tcNFPSe">
855
+ <xsd:annotation>
856
+ <xsd:documentation>Tipo NFPSe.</xsd:documentation>
857
+ </xsd:annotation>
858
+ <xsd:sequence>
859
+ <xsd:element name="InfNFPSe" type="tipos:tcInfNFPSe" minOccurs="1" maxOccurs="1" />
860
+ <xsd:element name="Protocolo" type="tipos:tcProtocolo" minOccurs="0" maxOccurs="1" />
861
+ </xsd:sequence>
862
+ </xsd:complexType>
863
+ </xsd:schema>