nf-e 0.2.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (563) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +19 -0
  3. data/.rspec +1 -0
  4. data/Gemfile +3 -0
  5. data/Gemfile.lock +201 -0
  6. data/Guardfile +8 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +35 -0
  9. data/Rakefile +6 -0
  10. data/circle.yml +7 -0
  11. data/config/locales/commons.yml +15 -0
  12. data/config/locales/models/dest.yml +13 -0
  13. data/config/locales/models/emit.yml +14 -0
  14. data/config/locales/models/ender.yml +13 -0
  15. data/config/locales/models/envi_nfe.yml +7 -0
  16. data/config/locales/models/ide.yml +5 -0
  17. data/config/locales/models/nfe.yml +5 -0
  18. data/config/locales/operations/correction_letter.yml +4 -0
  19. data/config/locales/operations/nfe_cancel.yml +4 -0
  20. data/config/locales/operations/nfe_discard.yml +7 -0
  21. data/config/locales/pt-BR.yml +211 -0
  22. data/lib/nf-e.rb +20 -0
  23. data/lib/nfe/helpers/nfe_key.rb +103 -0
  24. data/lib/nfe/helpers/schema_validator.rb +24 -0
  25. data/lib/nfe/helpers/signer.rb +25 -0
  26. data/lib/nfe/helpers/uf_helper.rb +23 -0
  27. data/lib/nfe/helpers/xml_model/attribute_base.rb +60 -0
  28. data/lib/nfe/helpers/xml_model/attribute_bigdecimal.rb +16 -0
  29. data/lib/nfe/helpers/xml_model/attribute_collection.rb +37 -0
  30. data/lib/nfe/helpers/xml_model/attribute_date.rb +20 -0
  31. data/lib/nfe/helpers/xml_model/attribute_datetime.rb +20 -0
  32. data/lib/nfe/helpers/xml_model/attribute_enumerize.rb +12 -0
  33. data/lib/nfe/helpers/xml_model/attribute_float.rb +20 -0
  34. data/lib/nfe/helpers/xml_model/attribute_integer.rb +12 -0
  35. data/lib/nfe/helpers/xml_model/attribute_node.rb +17 -0
  36. data/lib/nfe/helpers/xml_model/attribute_nodeattribute.rb +16 -0
  37. data/lib/nfe/helpers/xml_model/attribute_text.rb +31 -0
  38. data/lib/nfe/helpers/xml_model/factory.rb +17 -0
  39. data/lib/nfe/helpers/xml_model/nfe_model.rb +120 -0
  40. data/lib/nfe/models/NFe.rb +47 -0
  41. data/lib/nfe/models/avulsa.rb +59 -0
  42. data/lib/nfe/models/bill/cobr.rb +23 -0
  43. data/lib/nfe/models/bill/dup.rb +23 -0
  44. data/lib/nfe/models/bill/fat.rb +36 -0
  45. data/lib/nfe/models/cane/bigdecimal_greater_than_validator.rb +11 -0
  46. data/lib/nfe/models/cane/bigdecimal_less_than_validator.rb +9 -0
  47. data/lib/nfe/models/cane/cana.rb +100 -0
  48. data/lib/nfe/models/cane/deduc.rb +24 -0
  49. data/lib/nfe/models/cane/forDia.rb +33 -0
  50. data/lib/nfe/models/compra.rb +21 -0
  51. data/lib/nfe/models/concerns/cnpj_cpf_validatable.rb +22 -0
  52. data/lib/nfe/models/concerns/ufable.rb +20 -0
  53. data/lib/nfe/models/det.rb +34 -0
  54. data/lib/nfe/models/emitter/emit.rb +56 -0
  55. data/lib/nfe/models/ender.rb +64 -0
  56. data/lib/nfe/models/entrega_retirada.rb +47 -0
  57. data/lib/nfe/models/evento.rb +71 -0
  58. data/lib/nfe/models/exporta.rb +19 -0
  59. data/lib/nfe/models/ide.rb +140 -0
  60. data/lib/nfe/models/infNFe.rb +82 -0
  61. data/lib/nfe/models/information/infAdic.rb +51 -0
  62. data/lib/nfe/models/information/obsContFisco.rb +21 -0
  63. data/lib/nfe/models/information/procRef.rb +25 -0
  64. data/lib/nfe/models/itens/CIDE.rb +32 -0
  65. data/lib/nfe/models/itens/DI.rb +55 -0
  66. data/lib/nfe/models/itens/adi.rb +34 -0
  67. data/lib/nfe/models/itens/arma.rb +31 -0
  68. data/lib/nfe/models/itens/comb.rb +41 -0
  69. data/lib/nfe/models/itens/med.rb +40 -0
  70. data/lib/nfe/models/itens/prod.rb +115 -0
  71. data/lib/nfe/models/itens/veicProd.rb +140 -0
  72. data/lib/nfe/models/nfeProc.rb +29 -0
  73. data/lib/nfe/models/procEventoNFe.rb +29 -0
  74. data/lib/nfe/models/procInutNFe.rb +28 -0
  75. data/lib/nfe/models/recipient/dest.rb +57 -0
  76. data/lib/nfe/models/referenced/NFref.rb +44 -0
  77. data/lib/nfe/models/referenced/refECF.rb +26 -0
  78. data/lib/nfe/models/referenced/refNF.rb +43 -0
  79. data/lib/nfe/models/referenced/refNFP.rb +40 -0
  80. data/lib/nfe/models/signature.rb +53 -0
  81. data/lib/nfe/models/taxes/ICMS.rb +100 -0
  82. data/lib/nfe/models/taxes/ICMS00.rb +39 -0
  83. data/lib/nfe/models/taxes/ICMS10.rb +82 -0
  84. data/lib/nfe/models/taxes/ICMS101.rb +26 -0
  85. data/lib/nfe/models/taxes/ICMS102.rb +10 -0
  86. data/lib/nfe/models/taxes/ICMS103.rb +13 -0
  87. data/lib/nfe/models/taxes/ICMS20.rb +46 -0
  88. data/lib/nfe/models/taxes/ICMS201.rb +67 -0
  89. data/lib/nfe/models/taxes/ICMS202.rb +53 -0
  90. data/lib/nfe/models/taxes/ICMS203.rb +13 -0
  91. data/lib/nfe/models/taxes/ICMS30.rb +55 -0
  92. data/lib/nfe/models/taxes/ICMS300.rb +13 -0
  93. data/lib/nfe/models/taxes/ICMS40.rb +24 -0
  94. data/lib/nfe/models/taxes/ICMS400.rb +13 -0
  95. data/lib/nfe/models/taxes/ICMS41.rb +13 -0
  96. data/lib/nfe/models/taxes/ICMS50.rb +13 -0
  97. data/lib/nfe/models/taxes/ICMS500.rb +28 -0
  98. data/lib/nfe/models/taxes/ICMS51.rb +48 -0
  99. data/lib/nfe/models/taxes/ICMS60.rb +28 -0
  100. data/lib/nfe/models/taxes/ICMS70.rb +89 -0
  101. data/lib/nfe/models/taxes/ICMS90.rb +90 -0
  102. data/lib/nfe/models/taxes/ICMS900.rb +100 -0
  103. data/lib/nfe/models/taxes/ICMSBase.rb +21 -0
  104. data/lib/nfe/models/taxes/ICMSNormalBase.rb +15 -0
  105. data/lib/nfe/models/taxes/ICMSPart.rb +112 -0
  106. data/lib/nfe/models/taxes/ICMSSNBase.rb +19 -0
  107. data/lib/nfe/models/taxes/ICMSST.rb +50 -0
  108. data/lib/nfe/models/taxes/ICMSTot.rb +124 -0
  109. data/lib/nfe/models/taxes/II.rb +39 -0
  110. data/lib/nfe/models/taxes/IPI.rb +133 -0
  111. data/lib/nfe/models/taxes/IPINT.rb +17 -0
  112. data/lib/nfe/models/taxes/IPITrib.rb +51 -0
  113. data/lib/nfe/models/taxes/ISSQN.rb +54 -0
  114. data/lib/nfe/models/taxes/ISSQNtot.rb +51 -0
  115. data/lib/nfe/models/taxes/PISCOFINS.rb +173 -0
  116. data/lib/nfe/models/taxes/PISCOFINSAliq.rb +62 -0
  117. data/lib/nfe/models/taxes/PISCOFINSNT.rb +20 -0
  118. data/lib/nfe/models/taxes/PISCOFINSOutr.rb +87 -0
  119. data/lib/nfe/models/taxes/PISCOFINSQtde.rb +56 -0
  120. data/lib/nfe/models/taxes/PISCOFINSST.rb +78 -0
  121. data/lib/nfe/models/taxes/imposto.rb +44 -0
  122. data/lib/nfe/models/taxes/retTrib.rb +67 -0
  123. data/lib/nfe/models/total.rb +23 -0
  124. data/lib/nfe/models/transport/lacres.rb +16 -0
  125. data/lib/nfe/models/transport/retTransp.rb +49 -0
  126. data/lib/nfe/models/transport/transp.rb +50 -0
  127. data/lib/nfe/models/transport/transporta.rb +42 -0
  128. data/lib/nfe/models/transport/veicTransp_reboque.rb +23 -0
  129. data/lib/nfe/models/transport/vol.rb +50 -0
  130. data/lib/nfe/operations/base.rb +101 -0
  131. data/lib/nfe/operations/consult_emitter.rb +62 -0
  132. data/lib/nfe/operations/correction_letter.rb +37 -0
  133. data/lib/nfe/operations/event.rb +117 -0
  134. data/lib/nfe/operations/nfe_cancel.rb +47 -0
  135. data/lib/nfe/operations/nfe_discard.rb +106 -0
  136. data/lib/nfe/operations/nfe_send.rb +125 -0
  137. data/lib/nfe/operations/nfe_situation.rb +46 -0
  138. data/lib/nfe/operations/service_status.rb +44 -0
  139. data/lib/nfe/schemas/CCe_v1.00.xsd +11 -0
  140. data/lib/nfe/schemas/consCad_v2.00.xsd +9 -0
  141. data/lib/nfe/schemas/consReciNFe_v3.10.xsd +9 -0
  142. data/lib/nfe/schemas/consSitNFe_v3.10.xsd +9 -0
  143. data/lib/nfe/schemas/consStatServ_v3.10.xsd +9 -0
  144. data/lib/nfe/schemas/envCCe_v1.00.xsd +10 -0
  145. data/lib/nfe/schemas/envEventoCancNFe_v1.00.xsd +9 -0
  146. data/lib/nfe/schemas/enviNFe_v3.10.xsd +9 -0
  147. data/lib/nfe/schemas/inutNFe_v3.10.xsd +9 -0
  148. data/lib/nfe/schemas/leiauteCCe_v1.00.xsd +423 -0
  149. data/lib/nfe/schemas/leiauteConsSitNFe_v3.10.xsd +502 -0
  150. data/lib/nfe/schemas/leiauteConsStatServ_v3.10.xsd +98 -0
  151. data/lib/nfe/schemas/leiauteConsultaCadastro_v2.00.xsd +404 -0
  152. data/lib/nfe/schemas/leiauteEventoCancNFe_v1.00.xsd +400 -0
  153. data/lib/nfe/schemas/leiauteInutNFe_v3.10.xsd +193 -0
  154. data/lib/nfe/schemas/leiauteNFe_v3.10.xsd +7212 -0
  155. data/lib/nfe/schemas/nfe_v3.10.xsd +9 -0
  156. data/lib/nfe/schemas/procInutNFe_v3.10.xsd +9 -0
  157. data/lib/nfe/schemas/procNFe_v3.10.xsd +9 -0
  158. data/lib/nfe/schemas/retConsReciNFe_v3.10.xsd +9 -0
  159. data/lib/nfe/schemas/retConsSitNFe_v3.10.xsd +9 -0
  160. data/lib/nfe/schemas/retConsStatServ_v3.10.xsd +9 -0
  161. data/lib/nfe/schemas/retEnviNFe_v3.10.xsd +9 -0
  162. data/lib/nfe/schemas/retInutNFe_v3.10.xsd +9 -0
  163. data/lib/nfe/schemas/tiposBasico_v1.03.xsd +791 -0
  164. data/lib/nfe/schemas/tiposBasico_v3.10.xsd +877 -0
  165. data/lib/nfe/schemas/xmldsig-core-schema_v1.01.xsd +98 -0
  166. data/lib/nfe/services/dispatch/consCad.rb +57 -0
  167. data/lib/nfe/services/dispatch/consSitNFe.rb +43 -0
  168. data/lib/nfe/services/dispatch/consStatServ.rb +42 -0
  169. data/lib/nfe/services/dispatch/detEventoCC.rb +55 -0
  170. data/lib/nfe/services/dispatch/detEventoCancel.rb +45 -0
  171. data/lib/nfe/services/dispatch/envEvento.rb +28 -0
  172. data/lib/nfe/services/dispatch/enviNFe.rb +45 -0
  173. data/lib/nfe/services/dispatch/inutNFe.rb +93 -0
  174. data/lib/nfe/services/regress/infCad.rb +34 -0
  175. data/lib/nfe/services/regress/protNFe.rb +54 -0
  176. data/lib/nfe/services/regress/retConsCad.rb +27 -0
  177. data/lib/nfe/services/regress/retConsSitNFe.rb +26 -0
  178. data/lib/nfe/services/regress/retConsStatServ.rb +25 -0
  179. data/lib/nfe/services/regress/retEnvEvento.rb +27 -0
  180. data/lib/nfe/services/regress/retEnviNFe.rb +23 -0
  181. data/lib/nfe/services/regress/retEvento.rb +60 -0
  182. data/lib/nfe/services/regress/retInutNFe.rb +56 -0
  183. data/lib/nfe/version.rb +3 -0
  184. data/lib/nfe/webservices/client_soap.rb +35 -0
  185. data/lib/nfe/webservices/sender.rb +42 -0
  186. data/lib/nfe/webservices/wsinfo/base.rb +35 -0
  187. data/lib/nfe/webservices/wsinfo/consult_emitter.rb +16 -0
  188. data/lib/nfe/webservices/wsinfo/event.rb +20 -0
  189. data/lib/nfe/webservices/wsinfo/factory.rb +31 -0
  190. data/lib/nfe/webservices/wsinfo/nfe_disenable.rb +16 -0
  191. data/lib/nfe/webservices/wsinfo/nfe_send.rb +16 -0
  192. data/lib/nfe/webservices/wsinfo/nfe_situation.rb +16 -0
  193. data/lib/nfe/webservices/wsinfo/production/am.rb +16 -0
  194. data/lib/nfe/webservices/wsinfo/production/ba.rb +21 -0
  195. data/lib/nfe/webservices/wsinfo/production/ce.rb +16 -0
  196. data/lib/nfe/webservices/wsinfo/production/go.rb +16 -0
  197. data/lib/nfe/webservices/wsinfo/production/mg.rb +16 -0
  198. data/lib/nfe/webservices/wsinfo/production/ms.rb +16 -0
  199. data/lib/nfe/webservices/wsinfo/production/mt.rb +16 -0
  200. data/lib/nfe/webservices/wsinfo/production/pe.rb +16 -0
  201. data/lib/nfe/webservices/wsinfo/production/pr.rb +22 -0
  202. data/lib/nfe/webservices/wsinfo/production/rs.rb +21 -0
  203. data/lib/nfe/webservices/wsinfo/production/sp.rb +21 -0
  204. data/lib/nfe/webservices/wsinfo/production/svan.rb +24 -0
  205. data/lib/nfe/webservices/wsinfo/production/svrs.rb +21 -0
  206. data/lib/nfe/webservices/wsinfo/service_status.rb +16 -0
  207. data/lib/nfe/webservices/wsinfo/test/am.rb +16 -0
  208. data/lib/nfe/webservices/wsinfo/test/ba.rb +16 -0
  209. data/lib/nfe/webservices/wsinfo/test/ce.rb +16 -0
  210. data/lib/nfe/webservices/wsinfo/test/go.rb +16 -0
  211. data/lib/nfe/webservices/wsinfo/test/mg.rb +16 -0
  212. data/lib/nfe/webservices/wsinfo/test/ms.rb +16 -0
  213. data/lib/nfe/webservices/wsinfo/test/mt.rb +16 -0
  214. data/lib/nfe/webservices/wsinfo/test/pe.rb +16 -0
  215. data/lib/nfe/webservices/wsinfo/test/pr.rb +16 -0
  216. data/lib/nfe/webservices/wsinfo/test/rs.rb +17 -0
  217. data/lib/nfe/webservices/wsinfo/test/sp.rb +16 -0
  218. data/lib/nfe/webservices/wsinfo/test/svan.rb +20 -0
  219. data/lib/nfe/webservices/wsinfo/test/svrs.rb +18 -0
  220. data/lib/nfe/webservices/wsinfo/wsdl_base.rb +46 -0
  221. data/lib/nfe/webservices/wsinfo/wsdl_finder.rb +31 -0
  222. data/lib/xmldsig/canonicalize.rb +22 -0
  223. data/lib/xmldsig/canonicalizer.rb +27 -0
  224. data/lib/xmldsig/enveloped_signature.rb +10 -0
  225. data/lib/xmldsig/namespaces.rb +6 -0
  226. data/lib/xmldsig/reference.rb +72 -0
  227. data/lib/xmldsig/signature.rb +106 -0
  228. data/lib/xmldsig/signed_document.rb +28 -0
  229. data/lib/xmldsig/transform.rb +10 -0
  230. data/lib/xmldsig/transforms.rb +28 -0
  231. data/lib/xmldsig/xmldsig.rb +12 -0
  232. data/nf-e.gemspec +42 -0
  233. data/spec/nfe/factories/models/NFe.rb +9 -0
  234. data/spec/nfe/factories/models/avulsa.rb +16 -0
  235. data/spec/nfe/factories/models/bill/cobr.rb +14 -0
  236. data/spec/nfe/factories/models/bill/dup.rb +9 -0
  237. data/spec/nfe/factories/models/bill/fat.rb +10 -0
  238. data/spec/nfe/factories/models/cane/cana.rb +26 -0
  239. data/spec/nfe/factories/models/cane/deduc.rb +6 -0
  240. data/spec/nfe/factories/models/cane/forDia.rb +8 -0
  241. data/spec/nfe/factories/models/compra.rb +7 -0
  242. data/spec/nfe/factories/models/det.rb +11 -0
  243. data/spec/nfe/factories/models/emitter/emit.rb +15 -0
  244. data/spec/nfe/factories/models/ender.rb +17 -0
  245. data/spec/nfe/factories/models/entrega_retirada.rb +14 -0
  246. data/spec/nfe/factories/models/evento.rb +15 -0
  247. data/spec/nfe/factories/models/exporta.rb +6 -0
  248. data/spec/nfe/factories/models/ide.rb +43 -0
  249. data/spec/nfe/factories/models/infNFe.rb +26 -0
  250. data/spec/nfe/factories/models/information/infAdic.rb +23 -0
  251. data/spec/nfe/factories/models/information/obsContFisco.rb +8 -0
  252. data/spec/nfe/factories/models/information/procRef.rb +8 -0
  253. data/spec/nfe/factories/models/itens/CIDE.rb +7 -0
  254. data/spec/nfe/factories/models/itens/DI.rb +17 -0
  255. data/spec/nfe/factories/models/itens/adi.rb +8 -0
  256. data/spec/nfe/factories/models/itens/arma.rb +8 -0
  257. data/spec/nfe/factories/models/itens/comb.rb +9 -0
  258. data/spec/nfe/factories/models/itens/med.rb +9 -0
  259. data/spec/nfe/factories/models/itens/prod.rb +48 -0
  260. data/spec/nfe/factories/models/itens/veicProd.rb +28 -0
  261. data/spec/nfe/factories/models/recipient/dest.rb +13 -0
  262. data/spec/nfe/factories/models/referenced/NFref.rb +13 -0
  263. data/spec/nfe/factories/models/referenced/refECF.rb +7 -0
  264. data/spec/nfe/factories/models/referenced/refNF.rb +10 -0
  265. data/spec/nfe/factories/models/referenced/refNFP.rb +12 -0
  266. data/spec/nfe/factories/models/signature.rb +10 -0
  267. data/spec/nfe/factories/models/taxes/ICMS.rb +203 -0
  268. data/spec/nfe/factories/models/taxes/ICMS00.rb +10 -0
  269. data/spec/nfe/factories/models/taxes/ICMS10.rb +16 -0
  270. data/spec/nfe/factories/models/taxes/ICMS101.rb +8 -0
  271. data/spec/nfe/factories/models/taxes/ICMS102.rb +6 -0
  272. data/spec/nfe/factories/models/taxes/ICMS103.rb +6 -0
  273. data/spec/nfe/factories/models/taxes/ICMS20.rb +11 -0
  274. data/spec/nfe/factories/models/taxes/ICMS201.rb +14 -0
  275. data/spec/nfe/factories/models/taxes/ICMS202.rb +12 -0
  276. data/spec/nfe/factories/models/taxes/ICMS203.rb +12 -0
  277. data/spec/nfe/factories/models/taxes/ICMS30.rb +12 -0
  278. data/spec/nfe/factories/models/taxes/ICMS300.rb +6 -0
  279. data/spec/nfe/factories/models/taxes/ICMS40.rb +8 -0
  280. data/spec/nfe/factories/models/taxes/ICMS400.rb +6 -0
  281. data/spec/nfe/factories/models/taxes/ICMS41.rb +8 -0
  282. data/spec/nfe/factories/models/taxes/ICMS50.rb +8 -0
  283. data/spec/nfe/factories/models/taxes/ICMS500.rb +8 -0
  284. data/spec/nfe/factories/models/taxes/ICMS51.rb +11 -0
  285. data/spec/nfe/factories/models/taxes/ICMS60.rb +8 -0
  286. data/spec/nfe/factories/models/taxes/ICMS70.rb +17 -0
  287. data/spec/nfe/factories/models/taxes/ICMS90.rb +17 -0
  288. data/spec/nfe/factories/models/taxes/ICMS900.rb +19 -0
  289. data/spec/nfe/factories/models/taxes/ICMSPart.rb +19 -0
  290. data/spec/nfe/factories/models/taxes/ICMSST.rb +9 -0
  291. data/spec/nfe/factories/models/taxes/ICMSTot.rb +20 -0
  292. data/spec/nfe/factories/models/taxes/II.rb +8 -0
  293. data/spec/nfe/factories/models/taxes/IPI.rb +24 -0
  294. data/spec/nfe/factories/models/taxes/IPINT.rb +5 -0
  295. data/spec/nfe/factories/models/taxes/IPITrib.rb +10 -0
  296. data/spec/nfe/factories/models/taxes/ISSQN.rb +10 -0
  297. data/spec/nfe/factories/models/taxes/ISSQNtot.rb +9 -0
  298. data/spec/nfe/factories/models/taxes/PISCOFINS.rb +72 -0
  299. data/spec/nfe/factories/models/taxes/PISCOFINSAliq.rb +21 -0
  300. data/spec/nfe/factories/models/taxes/PISCOFINSNT.rb +5 -0
  301. data/spec/nfe/factories/models/taxes/PISCOFINSOutr.rb +23 -0
  302. data/spec/nfe/factories/models/taxes/PISCOFINSQtde.rb +17 -0
  303. data/spec/nfe/factories/models/taxes/PISCOFINSST.rb +21 -0
  304. data/spec/nfe/factories/models/taxes/imposto.rb +15 -0
  305. data/spec/nfe/factories/models/taxes/retTrib.rb +11 -0
  306. data/spec/nfe/factories/models/total.rb +7 -0
  307. data/spec/nfe/factories/models/transport/lacres.rb +6 -0
  308. data/spec/nfe/factories/models/transport/retTransp.rb +10 -0
  309. data/spec/nfe/factories/models/transport/transp.rb +18 -0
  310. data/spec/nfe/factories/models/transport/transporta.rb +11 -0
  311. data/spec/nfe/factories/models/transport/veicTranspReboque.rb +8 -0
  312. data/spec/nfe/factories/models/transport/vol.rb +17 -0
  313. data/spec/nfe/factories/services/consCad.rb +10 -0
  314. data/spec/nfe/factories/services/consSitNFe.rb +12 -0
  315. data/spec/nfe/factories/services/consStatServ.rb +7 -0
  316. data/spec/nfe/factories/services/detEventoCC.rb +6 -0
  317. data/spec/nfe/factories/services/detEventoCancel.rb +7 -0
  318. data/spec/nfe/factories/services/envEvento.rb +7 -0
  319. data/spec/nfe/factories/services/enviNFe.rb +11 -0
  320. data/spec/nfe/factories/services/inutNFe.rb +15 -0
  321. data/spec/nfe/factories/services/protNFe.rb +14 -0
  322. data/spec/nfe/factories/services/retEvento.rb +15 -0
  323. data/spec/nfe/factories/services/retInutNFe.rb +19 -0
  324. data/spec/nfe/fixtures/cassettes/correction_letter/error_in_lot.yml +176 -0
  325. data/spec/nfe/fixtures/cassettes/correction_letter/invalid_response.yml +175 -0
  326. data/spec/nfe/fixtures/cassettes/correction_letter/rejected.yml +177 -0
  327. data/spec/nfe/fixtures/cassettes/correction_letter/success.yml +177 -0
  328. data/spec/nfe/fixtures/cassettes/nfe_cancel/error_in_lot.yml +176 -0
  329. data/spec/nfe/fixtures/cassettes/nfe_cancel/invalid_response.yml +174 -0
  330. data/spec/nfe/fixtures/cassettes/nfe_cancel/rejected.yml +177 -0
  331. data/spec/nfe/fixtures/cassettes/nfe_cancel/success.yml +177 -0
  332. data/spec/nfe/fixtures/cassettes/nfe_discard/invalid_response.yml +175 -0
  333. data/spec/nfe/fixtures/cassettes/nfe_discard/rejected.yml +176 -0
  334. data/spec/nfe/fixtures/cassettes/nfe_discard/success.yml +176 -0
  335. data/spec/nfe/fixtures/cassettes/nfe_send/authorized.yml +197 -0
  336. data/spec/nfe/fixtures/cassettes/nfe_send/denied.yml +198 -0
  337. data/spec/nfe/fixtures/cassettes/nfe_send/error_in_lot.yml +195 -0
  338. data/spec/nfe/fixtures/cassettes/nfe_send/invalid_response.yml +193 -0
  339. data/spec/nfe/fixtures/cassettes/nfe_send/rejected.yml +198 -0
  340. data/spec/nfe/fixtures/certificate.pem +16 -0
  341. data/spec/nfe/fixtures/invalid_nfe.xml +1 -0
  342. data/spec/nfe/fixtures/nfe.xml +1 -0
  343. data/spec/nfe/fixtures/private-key.pem +15 -0
  344. data/spec/nfe/helpers/nfe_key_spec.rb +87 -0
  345. data/spec/nfe/helpers/schema_validator_spec.rb +34 -0
  346. data/spec/nfe/helpers/signer_spec.rb +22 -0
  347. data/spec/nfe/helpers/uf_helper_spec.rb +331 -0
  348. data/spec/nfe/helpers/xml_model/attribute_base_spec.rb +63 -0
  349. data/spec/nfe/helpers/xml_model/attribute_bigdecimal_spec.rb +32 -0
  350. data/spec/nfe/helpers/xml_model/attribute_collection_spec.rb +46 -0
  351. data/spec/nfe/helpers/xml_model/attribute_date_spec.rb +40 -0
  352. data/spec/nfe/helpers/xml_model/attribute_datetime_spec.rb +41 -0
  353. data/spec/nfe/helpers/xml_model/attribute_enumerize_spec.rb +34 -0
  354. data/spec/nfe/helpers/xml_model/attribute_float_spec.rb +40 -0
  355. data/spec/nfe/helpers/xml_model/attribute_integer_spec.rb +33 -0
  356. data/spec/nfe/helpers/xml_model/attribute_node_spec.rb +44 -0
  357. data/spec/nfe/helpers/xml_model/attribute_nodeattribute_spec.rb +33 -0
  358. data/spec/nfe/helpers/xml_model/attribute_text_spec.rb +173 -0
  359. data/spec/nfe/helpers/xml_model/factory_spec.rb +102 -0
  360. data/spec/nfe/helpers/xml_model/nfe_model_spec.rb +225 -0
  361. data/spec/nfe/models/NFe_spec.rb +48 -0
  362. data/spec/nfe/models/avulsa_spec.rb +140 -0
  363. data/spec/nfe/models/bigdecimal_greater_than_validator_spec.rb +33 -0
  364. data/spec/nfe/models/bigdecimal_less_than_validator_spec.rb +33 -0
  365. data/spec/nfe/models/bill/cobr_spec.rb +98 -0
  366. data/spec/nfe/models/bill/dup_spec.rb +80 -0
  367. data/spec/nfe/models/bill/fat_spec.rb +129 -0
  368. data/spec/nfe/models/cane/cana_spec.rb +161 -0
  369. data/spec/nfe/models/cane/deduc_spec.rb +40 -0
  370. data/spec/nfe/models/cane/forDia_spec.rb +51 -0
  371. data/spec/nfe/models/compra_spec.rb +78 -0
  372. data/spec/nfe/models/det_spec.rb +94 -0
  373. data/spec/nfe/models/emitter/emit_spec.rb +150 -0
  374. data/spec/nfe/models/ender_spec.rb +129 -0
  375. data/spec/nfe/models/entrega_retirada_spec.rb +159 -0
  376. data/spec/nfe/models/evento_spec.rb +52 -0
  377. data/spec/nfe/models/exporta_spec.rb +54 -0
  378. data/spec/nfe/models/ide_spec.rb +215 -0
  379. data/spec/nfe/models/infNFe_spec.rb +292 -0
  380. data/spec/nfe/models/information/infAdic_spec.rb +126 -0
  381. data/spec/nfe/models/information/obsContFisco_spec.rb +37 -0
  382. data/spec/nfe/models/information/procRef_spec.rb +41 -0
  383. data/spec/nfe/models/itens/CIDE_spec.rb +57 -0
  384. data/spec/nfe/models/itens/DI_spec.rb +67 -0
  385. data/spec/nfe/models/itens/adi_spec.rb +79 -0
  386. data/spec/nfe/models/itens/arma_spec.rb +43 -0
  387. data/spec/nfe/models/itens/comb_spec.rb +103 -0
  388. data/spec/nfe/models/itens/med_spec.rb +52 -0
  389. data/spec/nfe/models/itens/prod_spec.rb +249 -0
  390. data/spec/nfe/models/itens/veicProd_spec.rb +173 -0
  391. data/spec/nfe/models/nfeProc_spec.rb +21 -0
  392. data/spec/nfe/models/procEventoNFe_spec.rb +21 -0
  393. data/spec/nfe/models/procInutNFe_spec.rb +21 -0
  394. data/spec/nfe/models/recipient/dest_spec.rb +152 -0
  395. data/spec/nfe/models/referenced/NFref_spec.rb +102 -0
  396. data/spec/nfe/models/referenced/refECF_spec.rb +59 -0
  397. data/spec/nfe/models/referenced/refNFP_spec.rb +115 -0
  398. data/spec/nfe/models/referenced/refNF_spec.rb +82 -0
  399. data/spec/nfe/models/shared_examples_for_tdec_0302.rb +35 -0
  400. data/spec/nfe/models/shared_examples_for_tdec_0803.rb +21 -0
  401. data/spec/nfe/models/shared_examples_for_tdec_1104.rb +38 -0
  402. data/spec/nfe/models/shared_examples_for_tdec_1204.rb +34 -0
  403. data/spec/nfe/models/shared_examples_for_tdec_1302.rb +34 -0
  404. data/spec/nfe/models/signature_spec.rb +56 -0
  405. data/spec/nfe/models/taxes/ICMS00_spec.rb +27 -0
  406. data/spec/nfe/models/taxes/ICMS101_spec.rb +21 -0
  407. data/spec/nfe/models/taxes/ICMS102_spec.rb +15 -0
  408. data/spec/nfe/models/taxes/ICMS103_spec.rb +15 -0
  409. data/spec/nfe/models/taxes/ICMS10_spec.rb +83 -0
  410. data/spec/nfe/models/taxes/ICMS201_spec.rb +67 -0
  411. data/spec/nfe/models/taxes/ICMS202_spec.rb +61 -0
  412. data/spec/nfe/models/taxes/ICMS203_spec.rb +61 -0
  413. data/spec/nfe/models/taxes/ICMS20_spec.rb +30 -0
  414. data/spec/nfe/models/taxes/ICMS300_spec.rb +16 -0
  415. data/spec/nfe/models/taxes/ICMS30_spec.rb +67 -0
  416. data/spec/nfe/models/taxes/ICMS400_spec.rb +15 -0
  417. data/spec/nfe/models/taxes/ICMS40_spec.rb +51 -0
  418. data/spec/nfe/models/taxes/ICMS41_spec.rb +51 -0
  419. data/spec/nfe/models/taxes/ICMS500_spec.rb +46 -0
  420. data/spec/nfe/models/taxes/ICMS50_spec.rb +51 -0
  421. data/spec/nfe/models/taxes/ICMS51_spec.rb +55 -0
  422. data/spec/nfe/models/taxes/ICMS60_spec.rb +52 -0
  423. data/spec/nfe/models/taxes/ICMS70_spec.rb +84 -0
  424. data/spec/nfe/models/taxes/ICMS900_spec.rb +80 -0
  425. data/spec/nfe/models/taxes/ICMS90_spec.rb +83 -0
  426. data/spec/nfe/models/taxes/ICMSPart_spec.rb +141 -0
  427. data/spec/nfe/models/taxes/ICMSST_spec.rb +60 -0
  428. data/spec/nfe/models/taxes/ICMSTot_spec.rb +119 -0
  429. data/spec/nfe/models/taxes/ICMS_spec.rb +159 -0
  430. data/spec/nfe/models/taxes/II_spec.rb +58 -0
  431. data/spec/nfe/models/taxes/IPINT_spec.rb +39 -0
  432. data/spec/nfe/models/taxes/IPITrib_spec.rb +55 -0
  433. data/spec/nfe/models/taxes/IPI_spec.rb +128 -0
  434. data/spec/nfe/models/taxes/ISSQN_spec.rb +62 -0
  435. data/spec/nfe/models/taxes/ISSQNtot_spec.rb +72 -0
  436. data/spec/nfe/models/taxes/PISCOFINSAliq_spec.rb +22 -0
  437. data/spec/nfe/models/taxes/PISCOFINSNT_spec.rb +12 -0
  438. data/spec/nfe/models/taxes/PISCOFINSOutr_spec.rb +37 -0
  439. data/spec/nfe/models/taxes/PISCOFINSQtde_spec.rb +21 -0
  440. data/spec/nfe/models/taxes/PISCOFINSST_spec.rb +60 -0
  441. data/spec/nfe/models/taxes/PISCOFINS_spec.rb +68 -0
  442. data/spec/nfe/models/taxes/imposto_spec.rb +159 -0
  443. data/spec/nfe/models/taxes/retTrib_spec.rb +78 -0
  444. data/spec/nfe/models/taxes/shared_examples_for_COFINSAliq.rb +41 -0
  445. data/spec/nfe/models/taxes/shared_examples_for_COFINSNT.rb +35 -0
  446. data/spec/nfe/models/taxes/shared_examples_for_COFINSOutr.rb +119 -0
  447. data/spec/nfe/models/taxes/shared_examples_for_COFINSQtde.rb +41 -0
  448. data/spec/nfe/models/taxes/shared_examples_for_ICMS00.rb +45 -0
  449. data/spec/nfe/models/taxes/shared_examples_for_ICMS10.rb +57 -0
  450. data/spec/nfe/models/taxes/shared_examples_for_ICMS101.rb +41 -0
  451. data/spec/nfe/models/taxes/shared_examples_for_ICMS102.rb +37 -0
  452. data/spec/nfe/models/taxes/shared_examples_for_ICMS103.rb +37 -0
  453. data/spec/nfe/models/taxes/shared_examples_for_ICMS20.rb +47 -0
  454. data/spec/nfe/models/taxes/shared_examples_for_ICMS201.rb +53 -0
  455. data/spec/nfe/models/taxes/shared_examples_for_ICMS202.rb +49 -0
  456. data/spec/nfe/models/taxes/shared_examples_for_ICMS203.rb +49 -0
  457. data/spec/nfe/models/taxes/shared_examples_for_ICMS30.rb +49 -0
  458. data/spec/nfe/models/taxes/shared_examples_for_ICMS300.rb +37 -0
  459. data/spec/nfe/models/taxes/shared_examples_for_ICMS40.rb +41 -0
  460. data/spec/nfe/models/taxes/shared_examples_for_ICMS400.rb +37 -0
  461. data/spec/nfe/models/taxes/shared_examples_for_ICMS41.rb +41 -0
  462. data/spec/nfe/models/taxes/shared_examples_for_ICMS50.rb +41 -0
  463. data/spec/nfe/models/taxes/shared_examples_for_ICMS500.rb +41 -0
  464. data/spec/nfe/models/taxes/shared_examples_for_ICMS51.rb +47 -0
  465. data/spec/nfe/models/taxes/shared_examples_for_ICMS60.rb +41 -0
  466. data/spec/nfe/models/taxes/shared_examples_for_ICMS70.rb +59 -0
  467. data/spec/nfe/models/taxes/shared_examples_for_ICMS90.rb +59 -0
  468. data/spec/nfe/models/taxes/shared_examples_for_ICMS900.rb +63 -0
  469. data/spec/nfe/models/taxes/shared_examples_for_PISAliq.rb +41 -0
  470. data/spec/nfe/models/taxes/shared_examples_for_PISNT.rb +35 -0
  471. data/spec/nfe/models/taxes/shared_examples_for_PISOutr.rb +119 -0
  472. data/spec/nfe/models/taxes/shared_examples_for_PISQtde.rb +41 -0
  473. data/spec/nfe/models/total_spec.rb +144 -0
  474. data/spec/nfe/models/transport/lacres_spec.rb +35 -0
  475. data/spec/nfe/models/transport/retTransp_spec.rb +69 -0
  476. data/spec/nfe/models/transport/transp_spec.rb +149 -0
  477. data/spec/nfe/models/transport/transporta_spec.rb +128 -0
  478. data/spec/nfe/models/transport/veicTranspReboque_spec.rb +83 -0
  479. data/spec/nfe/models/transport/vol_spec.rb +97 -0
  480. data/spec/nfe/operations/consult_emitter_spec.rb +31 -0
  481. data/spec/nfe/operations/correction_letter_spec.rb +198 -0
  482. data/spec/nfe/operations/nfe_cancel_spec.rb +223 -0
  483. data/spec/nfe/operations/nfe_discard_spec.rb +172 -0
  484. data/spec/nfe/operations/nfe_send_spec.rb +220 -0
  485. data/spec/nfe/operations/nfe_situation_spec.rb +14 -0
  486. data/spec/nfe/operations/service_status_spec.rb +11 -0
  487. data/spec/nfe/operations/shared_examples_for_operations.rb +84 -0
  488. data/spec/nfe/services/dispatch/consCad_spec.rb +80 -0
  489. data/spec/nfe/services/dispatch/consSitNFe_spec.rb +29 -0
  490. data/spec/nfe/services/dispatch/consStatServ_spec.rb +25 -0
  491. data/spec/nfe/services/dispatch/detEventoCC_spec.rb +45 -0
  492. data/spec/nfe/services/dispatch/detEventoCancel_spec.rb +39 -0
  493. data/spec/nfe/services/dispatch/envEvento_spec.rb +33 -0
  494. data/spec/nfe/services/dispatch/enviNFe_spec.rb +27 -0
  495. data/spec/nfe/services/dispatch/inutNFe_spec.rb +51 -0
  496. data/spec/nfe/services/regress/infCad_spec.rb +61 -0
  497. data/spec/nfe/services/regress/protNFe_spec.rb +56 -0
  498. data/spec/nfe/services/regress/retConsCad_spec.rb +67 -0
  499. data/spec/nfe/services/regress/retConsSitNFe_spec.rb +46 -0
  500. data/spec/nfe/services/regress/retConsStatServ_spec.rb +34 -0
  501. data/spec/nfe/services/regress/retEnvEvento_spec.rb +44 -0
  502. data/spec/nfe/services/regress/retEnviNFe_spec.rb +44 -0
  503. data/spec/nfe/services/regress/retEvento_spec.rb +66 -0
  504. data/spec/nfe/services/regress/retInutNFe_spec.rb +70 -0
  505. data/spec/nfe/webservices/client_soap_spec.rb +32 -0
  506. data/spec/nfe/webservices/fixtures/nfe_status_servico2.wsdl +62 -0
  507. data/spec/nfe/webservices/fixtures/retConsCad.xml +1 -0
  508. data/spec/nfe/webservices/fixtures/retConsSitNFe.xml +1 -0
  509. data/spec/nfe/webservices/fixtures/retConsStatServ.xml +1 -0
  510. data/spec/nfe/webservices/fixtures/retEnvEventoCancNFe.xml +1 -0
  511. data/spec/nfe/webservices/fixtures/retEnviNFe.xml +1 -0
  512. data/spec/nfe/webservices/fixtures/retInutNFe.xml +1 -0
  513. data/spec/nfe/webservices/sender_spec.rb +65 -0
  514. data/spec/nfe/webservices/wsinfo/consult_emitter_spec.rb +37 -0
  515. data/spec/nfe/webservices/wsinfo/event_spec.rb +50 -0
  516. data/spec/nfe/webservices/wsinfo/factory_spec.rb +50 -0
  517. data/spec/nfe/webservices/wsinfo/nfe_disenable_spec.rb +37 -0
  518. data/spec/nfe/webservices/wsinfo/nfe_send_spec.rb +37 -0
  519. data/spec/nfe/webservices/wsinfo/nfe_situation_spec.rb +37 -0
  520. data/spec/nfe/webservices/wsinfo/production/am_spec.rb +21 -0
  521. data/spec/nfe/webservices/wsinfo/production/ba_spec.rb +21 -0
  522. data/spec/nfe/webservices/wsinfo/production/ce_spec.rb +21 -0
  523. data/spec/nfe/webservices/wsinfo/production/go_spec.rb +21 -0
  524. data/spec/nfe/webservices/wsinfo/production/mg_spec.rb +21 -0
  525. data/spec/nfe/webservices/wsinfo/production/ms_spec.rb +21 -0
  526. data/spec/nfe/webservices/wsinfo/production/mt_spec.rb +21 -0
  527. data/spec/nfe/webservices/wsinfo/production/pe_spec.rb +21 -0
  528. data/spec/nfe/webservices/wsinfo/production/pr_spec.rb +21 -0
  529. data/spec/nfe/webservices/wsinfo/production/rs_spec.rb +21 -0
  530. data/spec/nfe/webservices/wsinfo/production/sp_spec.rb +21 -0
  531. data/spec/nfe/webservices/wsinfo/production/svan_spec.rb +26 -0
  532. data/spec/nfe/webservices/wsinfo/production/svrs_spec.rb +21 -0
  533. data/spec/nfe/webservices/wsinfo/service_status_spec.rb +37 -0
  534. data/spec/nfe/webservices/wsinfo/shared_examples_for_wsdl.rb +39 -0
  535. data/spec/nfe/webservices/wsinfo/test/am_spec.rb +21 -0
  536. data/spec/nfe/webservices/wsinfo/test/ba_spec.rb +21 -0
  537. data/spec/nfe/webservices/wsinfo/test/ce_spec.rb +21 -0
  538. data/spec/nfe/webservices/wsinfo/test/go_spec.rb +21 -0
  539. data/spec/nfe/webservices/wsinfo/test/mg_spec.rb +21 -0
  540. data/spec/nfe/webservices/wsinfo/test/ms_spec.rb +21 -0
  541. data/spec/nfe/webservices/wsinfo/test/mt_spec.rb +21 -0
  542. data/spec/nfe/webservices/wsinfo/test/pe_spec.rb +21 -0
  543. data/spec/nfe/webservices/wsinfo/test/pr_spec.rb +21 -0
  544. data/spec/nfe/webservices/wsinfo/test/rs_spec.rb +21 -0
  545. data/spec/nfe/webservices/wsinfo/test/sp_spec.rb +21 -0
  546. data/spec/nfe/webservices/wsinfo/test/svan_spec.rb +26 -0
  547. data/spec/nfe/webservices/wsinfo/test/svrs_spec.rb +21 -0
  548. data/spec/nfe/webservices/wsinfo/wsdl_finder_spec.rb +56 -0
  549. data/spec/spec_helper.rb +33 -0
  550. data/spec/support/utilities.rb +3 -0
  551. data/spec/xmldsig/canonicalizer_spec.rb +43 -0
  552. data/spec/xmldsig/enveloped_signature_spec.rb +19 -0
  553. data/spec/xmldsig/fixtures/certificate.cer +16 -0
  554. data/spec/xmldsig/fixtures/certificate2.cer +16 -0
  555. data/spec/xmldsig/fixtures/key.pem +15 -0
  556. data/spec/xmldsig/fixtures/signed.xml +23 -0
  557. data/spec/xmldsig/fixtures/unsigned.xml +26 -0
  558. data/spec/xmldsig/fixtures/unsigned_multiple_references.xml +43 -0
  559. data/spec/xmldsig/fixtures/unsigned_nested_signature.xml +50 -0
  560. data/spec/xmldsig/reference_spec.rb +62 -0
  561. data/spec/xmldsig/signature_spec.rb +119 -0
  562. data/spec/xmldsig/signed_document_spec.rb +97 -0
  563. metadata +1201 -0
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.portalfiscal.inf.br/nfe" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
3
+ <xs:include schemaLocation="leiauteNFe_v3.10.xsd"/>
4
+ <xs:element name="NFe" type="TNFe">
5
+ <xs:annotation>
6
+ <xs:documentation>Nota Fiscal Eletrônica</xs:documentation>
7
+ </xs:annotation>
8
+ </xs:element>
9
+ </xs:schema>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.portalfiscal.inf.br/nfe" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
3
+ <xs:include schemaLocation="leiauteInutNFe_v3.10.xsd"/>
4
+ <xs:element name="ProcInutNFe" type="TProcInutNFe">
5
+ <xs:annotation>
6
+ <xs:documentation>Pedido de inutilização de númeração de NF-e processado</xs:documentation>
7
+ </xs:annotation>
8
+ </xs:element>
9
+ </xs:schema>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.portalfiscal.inf.br/nfe" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
3
+ <xs:include schemaLocation="leiauteNFe_v3.10.xsd"/>
4
+ <xs:element name="nfeProc" type="TNfeProc">
5
+ <xs:annotation>
6
+ <xs:documentation>NF-e processada</xs:documentation>
7
+ </xs:annotation>
8
+ </xs:element>
9
+ </xs:schema>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns="http://www.portalfiscal.inf.br/nfe" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
3
+ <xs:include schemaLocation="leiauteNFe_v3.10.xsd"/>
4
+ <xs:element name="retConsReciNFe" type="TRetConsReciNFe">
5
+ <xs:annotation>
6
+ <xs:documentation>Schema XML de validação do retorno do Pedido de Consulta do Recido do Lote de Notas Fiscais Eletrônicas</xs:documentation>
7
+ </xs:annotation>
8
+ </xs:element>
9
+ </xs:schema>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns="http://www.portalfiscal.inf.br/nfe" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
3
+ <xs:include schemaLocation="leiauteConsSitNFe_v3.10.xsd"/>
4
+ <xs:element name="retConsSitNFe" type="TRetConsSitNFe">
5
+ <xs:annotation>
6
+ <xs:documentation>Schema XML de validação do retorno da consulta da situação atual da NF-e</xs:documentation>
7
+ </xs:annotation>
8
+ </xs:element>
9
+ </xs:schema>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns="http://www.portalfiscal.inf.br/nfe" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
3
+ <xs:include schemaLocation="leiauteConsStatServ_v3.10.xsd"/>
4
+ <xs:element name="retConsStatServ" type="TRetConsStatServ">
5
+ <xs:annotation>
6
+ <xs:documentation>Schema XML de validação do Resultado da Consulta do Status do Serviço</xs:documentation>
7
+ </xs:annotation>
8
+ </xs:element>
9
+ </xs:schema>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns="http://www.portalfiscal.inf.br/nfe" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
3
+ <xs:include schemaLocation="leiauteNFe_v3.10.xsd"/>
4
+ <xs:element name="retEnviNFe" type="TRetEnviNFe">
5
+ <xs:annotation>
6
+ <xs:documentation>Schema XML de validação do retorno do Pedido de Concessão de Autorização da Nota Fiscal Eletrônica</xs:documentation>
7
+ </xs:annotation>
8
+ </xs:element>
9
+ </xs:schema>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns="http://www.portalfiscal.inf.br/nfe" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
3
+ <xs:include schemaLocation="leiauteInutNFe_v3.10.xsd"/>
4
+ <xs:element name="retInutNFe" type="TRetInutNFe">
5
+ <xs:annotation>
6
+ <xs:documentation>Schema XML de validação do retorno do Pedido de Inutilização de Numeração da Nota Fiscal Eletrônica</xs:documentation>
7
+ </xs:annotation>
8
+ </xs:element>
9
+ </xs:schema>
@@ -0,0 +1,791 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- PL_006h - 13/05/11 - correções da NT 2011/004 // v2.0-->
3
+ <!-- PL_006f - 29/05/10 - correcao do tipo TDec_1504 para limitar a quantidade de decimais para 4 // v2.0-->
4
+ <!-- PL_006f - 09/05/10 - eliminação da possibilidade informar a Inscrição produtor rural na IEDest // v2.0-->
5
+ <!-- PL_006d - 04/10/09 - alterada a ordem do pattern do TIE - adequacao libxml // v2.0-->
6
+ <!-- PL_006d - 20/08/09 - acrescentado o tipo númerico com 10 casas decimais,15 casas inteiras e hora // v2.0-->
7
+ <!-- PL_005d - 11/08/09 - alteração no enumeration do tpais para nova tabela de paises do BACEN-->
8
+ <!-- PL_005b - 24/10/08 - acrescentado a tabela do tpais e outras alterações para eliminar os brancos no início e fim do campo -->
9
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:nfe="http://www.portalfiscal.inf.br/nfe" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
10
+ <xs:simpleType name="TCodUfIBGE">
11
+ <xs:annotation>
12
+ <xs:documentation>Tipo Código da UF da tabela do IBGE</xs:documentation>
13
+ </xs:annotation>
14
+ <xs:restriction base="xs:string">
15
+ <xs:whiteSpace value="preserve"/>
16
+ <xs:enumeration value="11"/>
17
+ <xs:enumeration value="12"/>
18
+ <xs:enumeration value="13"/>
19
+ <xs:enumeration value="14"/>
20
+ <xs:enumeration value="15"/>
21
+ <xs:enumeration value="16"/>
22
+ <xs:enumeration value="17"/>
23
+ <xs:enumeration value="21"/>
24
+ <xs:enumeration value="22"/>
25
+ <xs:enumeration value="23"/>
26
+ <xs:enumeration value="24"/>
27
+ <xs:enumeration value="25"/>
28
+ <xs:enumeration value="26"/>
29
+ <xs:enumeration value="27"/>
30
+ <xs:enumeration value="28"/>
31
+ <xs:enumeration value="29"/>
32
+ <xs:enumeration value="31"/>
33
+ <xs:enumeration value="32"/>
34
+ <xs:enumeration value="33"/>
35
+ <xs:enumeration value="35"/>
36
+ <xs:enumeration value="41"/>
37
+ <xs:enumeration value="42"/>
38
+ <xs:enumeration value="43"/>
39
+ <xs:enumeration value="50"/>
40
+ <xs:enumeration value="51"/>
41
+ <xs:enumeration value="52"/>
42
+ <xs:enumeration value="53"/>
43
+ </xs:restriction>
44
+ </xs:simpleType>
45
+ <xs:simpleType name="TCodMunIBGE">
46
+ <xs:annotation>
47
+ <xs:documentation>Tipo Código do Município da tabela do IBGE</xs:documentation>
48
+ </xs:annotation>
49
+ <xs:restriction base="xs:string">
50
+ <xs:whiteSpace value="preserve"/>
51
+ <xs:pattern value="[0-9]{7}"/>
52
+ </xs:restriction>
53
+ </xs:simpleType>
54
+ <xs:simpleType name="TChNFe">
55
+ <xs:annotation>
56
+ <xs:documentation>Tipo Chave da Nota Fiscal Eletrônica</xs:documentation>
57
+ </xs:annotation>
58
+ <xs:restriction base="xs:string">
59
+ <xs:whiteSpace value="preserve"/>
60
+ <xs:pattern value="[0-9]{44}"/>
61
+ </xs:restriction>
62
+ </xs:simpleType>
63
+ <xs:simpleType name="TProt">
64
+ <xs:annotation>
65
+ <xs:documentation>Tipo Número do Protocolo de Status</xs:documentation>
66
+ </xs:annotation>
67
+ <xs:restriction base="xs:string">
68
+ <xs:whiteSpace value="preserve"/>
69
+ <xs:pattern value="[0-9]{15}"/>
70
+ </xs:restriction>
71
+ </xs:simpleType>
72
+ <xs:simpleType name="TRec">
73
+ <xs:annotation>
74
+ <xs:documentation>Tipo Número do Recibo do envio de lote de NF-e</xs:documentation>
75
+ </xs:annotation>
76
+ <xs:restriction base="xs:string">
77
+ <xs:whiteSpace value="preserve"/>
78
+ <xs:pattern value="[0-9]{15}"/>
79
+ </xs:restriction>
80
+ </xs:simpleType>
81
+ <xs:simpleType name="TStat">
82
+ <xs:annotation>
83
+ <xs:documentation>Tipo Código da Mensagem enviada</xs:documentation>
84
+ </xs:annotation>
85
+ <xs:restriction base="xs:string">
86
+ <xs:whiteSpace value="preserve"/>
87
+ <xs:pattern value="[0-9]{3}"/>
88
+ </xs:restriction>
89
+ </xs:simpleType>
90
+ <xs:simpleType name="TCnpj">
91
+ <xs:annotation>
92
+ <xs:documentation>Tipo Número do CNPJ</xs:documentation>
93
+ </xs:annotation>
94
+ <xs:restriction base="xs:string">
95
+ <xs:whiteSpace value="preserve"/>
96
+ <xs:pattern value="[0-9]{14}"/>
97
+ </xs:restriction>
98
+ </xs:simpleType>
99
+ <xs:simpleType name="TCnpjVar">
100
+ <xs:annotation>
101
+ <xs:documentation>Tipo Número do CNPJ tmanho varíavel (3-14)</xs:documentation>
102
+ </xs:annotation>
103
+ <xs:restriction base="xs:string">
104
+ <xs:whiteSpace value="preserve"/>
105
+ <xs:pattern value="[0-9]{3,14}"/>
106
+ </xs:restriction>
107
+ </xs:simpleType>
108
+ <xs:simpleType name="TCnpjOpc">
109
+ <xs:annotation>
110
+ <xs:documentation>Tipo Número do CNPJ Opcional</xs:documentation>
111
+ </xs:annotation>
112
+ <xs:restriction base="xs:string">
113
+ <xs:whiteSpace value="preserve"/>
114
+ <xs:pattern value="[0-9]{0}|[0-9]{14}"/>
115
+ </xs:restriction>
116
+ </xs:simpleType>
117
+ <xs:simpleType name="TCpf">
118
+ <xs:annotation>
119
+ <xs:documentation>Tipo Número do CPF</xs:documentation>
120
+ </xs:annotation>
121
+ <xs:restriction base="xs:string">
122
+ <xs:whiteSpace value="preserve"/>
123
+ <xs:pattern value="[0-9]{11}"/>
124
+ </xs:restriction>
125
+ </xs:simpleType>
126
+ <xs:simpleType name="TCpfVar">
127
+ <xs:annotation>
128
+ <xs:documentation>Tipo Número do CPF de tamanho variável (3-11)</xs:documentation>
129
+ </xs:annotation>
130
+ <xs:restriction base="xs:string">
131
+ <xs:whiteSpace value="preserve"/>
132
+ <xs:pattern value="[0-9]{3,11}"/>
133
+ </xs:restriction>
134
+ </xs:simpleType>
135
+ <xs:simpleType name="TDec_0302">
136
+ <xs:annotation>
137
+ <xs:documentation>Tipo Decimal com 5 dígitos, sendo 3 de corpo e 2 decimais</xs:documentation>
138
+ </xs:annotation>
139
+ <xs:restriction base="xs:string">
140
+ <xs:whiteSpace value="preserve"/>
141
+ <xs:pattern value="0|0\.[0-9]{2}|[1-9]{1}[0-9]{0,2}(\.[0-9]{2})?"/>
142
+ </xs:restriction>
143
+ </xs:simpleType>
144
+ <xs:simpleType name="TDec_0302Opc">
145
+ <xs:annotation>
146
+ <xs:documentation>Tipo Decimal com 5 dígitos, sendo 3 de corpo e 2 decimais, utilizado em tags opcionais</xs:documentation>
147
+ </xs:annotation>
148
+ <xs:restriction base="xs:string">
149
+ <xs:whiteSpace value="preserve"/>
150
+ <xs:pattern value="0\.[0-9]{1}[1-9]{1}|0\.[1-9]{1}[0-9]{1}|[1-9]{1}[0-9]{0,2}(\.[0-9]{2})?"/>
151
+ </xs:restriction>
152
+ </xs:simpleType>
153
+ <xs:simpleType name="TDec_0803">
154
+ <xs:annotation>
155
+ <xs:documentation>Tipo Decimal com 11 dígitos, sendo 8 de corpo e 3 decimais</xs:documentation>
156
+ </xs:annotation>
157
+ <xs:restriction base="xs:string">
158
+ <xs:whiteSpace value="preserve"/>
159
+ <xs:pattern value="0|0\.[0-9]{3}|[1-9]{1}[0-9]{0,7}(\.[0-9]{3})?"/>
160
+ </xs:restriction>
161
+ </xs:simpleType>
162
+ <xs:simpleType name="TDec_0803Opc">
163
+ <xs:annotation>
164
+ <xs:documentation>Tipo Decimal com 11 dígitos, sendo 8 de corpo e 3 decimais utilizado em tags opcionais</xs:documentation>
165
+ </xs:annotation>
166
+ <xs:restriction base="xs:string">
167
+ <xs:whiteSpace value="preserve"/>
168
+ <xs:pattern value="0\.[1-9]{1}[0-9]{2}|0\.[0-9]{2}[1-9]{1}|0\.[0-9]{1}[1-9]{1}[0-9]{1}|[1-9]{1}[0-9]{0,7}(\.[0-9]{3})?"/>
169
+ </xs:restriction>
170
+ </xs:simpleType>
171
+ <xs:simpleType name="TDec_0804">
172
+ <xs:annotation>
173
+ <xs:documentation>Tipo Decimal com 12 dígitos, sendo 8 de corpo e 4decimais</xs:documentation>
174
+ </xs:annotation>
175
+ <xs:restriction base="xs:string">
176
+ <xs:whiteSpace value="preserve"/>
177
+ <xs:pattern value="0|0\.[0-9]{4}|[1-9]{1}[0-9]{0,7}(\.[0-9]{4})?"/>
178
+ </xs:restriction>
179
+ </xs:simpleType>
180
+ <xs:simpleType name="TDec_0804Opc">
181
+ <xs:annotation>
182
+ <xs:documentation>Tipo Decimal com 12 dígitos, sendo 8 de corpo e 4 decimais, utilizado em tags opcionais</xs:documentation>
183
+ </xs:annotation>
184
+ <xs:restriction base="xs:string">
185
+ <xs:whiteSpace value="preserve"/>
186
+ <xs:pattern value="0\.[1-9]{1}[0-9]{3}|0\.[0-9]{3}[1-9]{1}|0\.[0-9]{2}[1-9]{1}[0-9]{1}|0\.[0-9]{1}[1-9]{1}[0-9]{2}|[1-9]{1}[0-9]{0,7}(\.[0-9]{4})?"/>
187
+ </xs:restriction>
188
+ </xs:simpleType>
189
+ <xs:simpleType name="TDec_1104">
190
+ <xs:annotation>
191
+ <xs:documentation>Tipo Decimal com 15 dígitos, sendo 11 de corpo e 4 decimais</xs:documentation>
192
+ </xs:annotation>
193
+ <xs:restriction base="xs:string">
194
+ <xs:whiteSpace value="preserve"/>
195
+ <xs:pattern value="0|0\.[0-9]{4}|[1-9]{1}[0-9]{0,10}(\.[0-9]{4})?"/>
196
+ </xs:restriction>
197
+ </xs:simpleType>
198
+ <xs:simpleType name="TDec_1104Opc">
199
+ <xs:annotation>
200
+ <xs:documentation>Tipo Decimal com 15 dígitos, sendo 11 de corpo e 4 decimais, utilizado em tags opcionais</xs:documentation>
201
+ </xs:annotation>
202
+ <xs:restriction base="xs:string">
203
+ <xs:whiteSpace value="preserve"/>
204
+ <xs:pattern value="0\.[1-9]{1}[0-9]{3}|0\.[0-9]{3}[1-9]{1}|0\.[0-9]{2}[1-9]{1}[0-9]{1}|0\.[0-9]{1}[1-9]{1}[0-9]{2}|[1-9]{1}[0-9]{0,10}(\.[0-9]{4})?"/>
205
+ </xs:restriction>
206
+ </xs:simpleType>
207
+ <xs:simpleType name="TDec_1203">
208
+ <xs:annotation>
209
+ <xs:documentation>Tipo Decimal com 15 dígitos, sendo 12 de corpo e 3 decimais</xs:documentation>
210
+ </xs:annotation>
211
+ <xs:restriction base="xs:string">
212
+ <xs:whiteSpace value="preserve"/>
213
+ <xs:pattern value="0|0\.[0-9]{3}|[1-9]{1}[0-9]{0,11}(\.[0-9]{3})?"/>
214
+ </xs:restriction>
215
+ </xs:simpleType>
216
+ <xs:simpleType name="TDec_1203Opc">
217
+ <xs:annotation>
218
+ <xs:documentation>Tipo Decimal com 15 dígitos, sendo 12 de corpo e 3 decimais, utilizado em tags opcionais</xs:documentation>
219
+ </xs:annotation>
220
+ <xs:restriction base="xs:string">
221
+ <xs:whiteSpace value="preserve"/>
222
+ <xs:pattern value="0\.[1-9]{1}[0-9]{2}|0\.[0-9]{2}[1-9]{1}|0\.[0-9]{1}[1-9]{1}[0-9]{1}|[1-9]{1}[0-9]{0,11}(\.[0-9]{3})?"/>
223
+ </xs:restriction>
224
+ </xs:simpleType>
225
+ <xs:simpleType name="TDec_1204">
226
+ <xs:annotation>
227
+ <xs:documentation>Tipo Decimal com 16 dígitos, sendo 12 de corpo e 4 decimais</xs:documentation>
228
+ </xs:annotation>
229
+ <xs:restriction base="xs:string">
230
+ <xs:whiteSpace value="preserve"/>
231
+ <xs:pattern value="0|0\.[0-9]{1,4}|[1-9]{1}[0-9]{0,11}|[1-9]{1}[0-9]{0,11}(\.[0-9]{1,4})?"/>
232
+ </xs:restriction>
233
+ </xs:simpleType>
234
+ <xs:simpleType name="TDec_1204Opc">
235
+ <xs:annotation>
236
+ <xs:documentation>Tipo Decimal com 16 dígitos, sendo 12 de corpo e 4 decimais, utilizado em tags opcionais</xs:documentation>
237
+ </xs:annotation>
238
+ <xs:restriction base="xs:string">
239
+ <xs:whiteSpace value="preserve"/>
240
+ <xs:pattern value="0\.[1-9]{1}[0-9]{3}|0\.[0-9]{3}[1-9]{1}|0\.[0-9]{2}[1-9]{1}[0-9]{1}|0\.[0-9]{1}[1-9]{1}[0-9]{2}|[1-9]{1}[0-9]{0,11}(\.[0-9]{4})?"/>
241
+ </xs:restriction>
242
+ </xs:simpleType>
243
+ <xs:simpleType name="TDec_1302">
244
+ <xs:annotation>
245
+ <xs:documentation>Tipo Decimal com 15 dígitos, sendo 13 de corpo e 2 decimais</xs:documentation>
246
+ </xs:annotation>
247
+ <xs:restriction base="xs:string">
248
+ <xs:whiteSpace value="preserve"/>
249
+ <xs:pattern value="0|0\.[0-9]{2}|[1-9]{1}[0-9]{0,12}(\.[0-9]{2})?"/>
250
+ </xs:restriction>
251
+ </xs:simpleType>
252
+ <xs:simpleType name="TDec_1302Opc">
253
+ <xs:annotation>
254
+ <xs:documentation>Tipo Decimal com 15 dígitos, sendo 13 de corpo e 2 decimais, utilizado em tags opcionais</xs:documentation>
255
+ </xs:annotation>
256
+ <xs:restriction base="xs:string">
257
+ <xs:whiteSpace value="preserve"/>
258
+ <xs:pattern value="0\.[0-9]{1}[1-9]{1}|0\.[1-9]{1}[0-9]{1}|[1-9]{1}[0-9]{0,12}(\.[0-9]{2})?"/>
259
+ </xs:restriction>
260
+ </xs:simpleType>
261
+ <xs:simpleType name="TDec_1110">
262
+ <xs:annotation>
263
+ <xs:documentation>Tipo Decimal com até 21 dígitos, sendo 11 de corpo e até 10 decimais // aperfeiçoamento v2.0</xs:documentation>
264
+ </xs:annotation>
265
+ <xs:restriction base="xs:string">
266
+ <xs:whiteSpace value="preserve"/>
267
+ <xs:pattern value="0|0\.[0-9]{1,10}|[1-9]{1}[0-9]{0,10}|[1-9]{1}[0-9]{0,10}(\.[0-9]{1,10})?"/>
268
+ </xs:restriction>
269
+ </xs:simpleType>
270
+ <xs:simpleType name="TDec_1104v">
271
+ <xs:annotation>
272
+ <xs:documentation>Tipo Decimal com até 15 dígitos, sendo 11 de corpo e até 4 decimais // aperfeiçoamento v2.0</xs:documentation>
273
+ </xs:annotation>
274
+ <xs:restriction base="xs:string">
275
+ <xs:whiteSpace value="preserve"/>
276
+ <xs:pattern value="0|0\.[0-9]{1,4}|[1-9]{1}[0-9]{0,10}|[1-9]{1}[0-9]{0,10}(\.[0-9]{1,4})?"/>
277
+ </xs:restriction>
278
+ </xs:simpleType>
279
+ <xs:simpleType name="TIeDest">
280
+ <xs:annotation>
281
+ <xs:documentation>Tipo Inscrição Estadual do Destinatário // alterado para aceitar vazio ou ISENTO - maio/2010 v2.0</xs:documentation>
282
+ </xs:annotation>
283
+ <xs:restriction base="xs:string">
284
+ <xs:whiteSpace value="preserve"/>
285
+ <xs:pattern value="ISENTO|[0-9]{0,14}"/>
286
+ </xs:restriction>
287
+ </xs:simpleType>
288
+ <xs:simpleType name="TIeST">
289
+ <xs:annotation>
290
+ <xs:documentation>Tipo Inscrição Estadual do ST // acrescentado EM 24/10/08</xs:documentation>
291
+ </xs:annotation>
292
+ <xs:restriction base="xs:string">
293
+ <xs:whiteSpace value="preserve"/>
294
+ <xs:pattern value="[0-9]{2,14}"/>
295
+ </xs:restriction>
296
+ </xs:simpleType>
297
+ <xs:simpleType name="TIe">
298
+ <xs:annotation>
299
+ <xs:documentation>Tipo Inscrição Estadual do Emitente // alterado EM 24/10/08 para aceitar ISENTO</xs:documentation>
300
+ </xs:annotation>
301
+ <xs:restriction base="xs:string">
302
+ <xs:whiteSpace value="preserve"/>
303
+ <xs:pattern value="[0-9]{2,14}|ISENTO"/>
304
+ </xs:restriction>
305
+ </xs:simpleType>
306
+ <xs:simpleType name="TMod">
307
+ <xs:annotation>
308
+ <xs:documentation>Tipo Modelo Documento Fiscal</xs:documentation>
309
+ </xs:annotation>
310
+ <xs:restriction base="xs:string">
311
+ <xs:whiteSpace value="preserve"/>
312
+ <xs:enumeration value="55"/>
313
+ </xs:restriction>
314
+ </xs:simpleType>
315
+ <xs:simpleType name="TNF">
316
+ <xs:annotation>
317
+ <xs:documentation>Tipo Número do Documento Fiscal</xs:documentation>
318
+ </xs:annotation>
319
+ <xs:restriction base="xs:string">
320
+ <xs:whiteSpace value="preserve"/>
321
+ <xs:pattern value="[1-9]{1}[0-9]{0,8}"/>
322
+ </xs:restriction>
323
+ </xs:simpleType>
324
+ <xs:simpleType name="TSerie">
325
+ <xs:annotation>
326
+ <xs:documentation>Tipo Série do Documento Fiscal </xs:documentation>
327
+ </xs:annotation>
328
+ <xs:restriction base="xs:string">
329
+ <xs:whiteSpace value="preserve"/>
330
+ <xs:pattern value="0|[1-9]{1}[0-9]{0,2}"/>
331
+ </xs:restriction>
332
+ </xs:simpleType>
333
+ <xs:simpleType name="Tpais">
334
+ <xs:annotation>
335
+ <xs:documentation>Tipo Código do Pais
336
+ // PL_005d - 11/08/09
337
+ eliminado:
338
+ 4235-LEBUAN, ILHAS -
339
+ acrescentado:
340
+ 7200 SAO TOME E PRINCIPE, ILHAS,
341
+ 8958 ZONA DO CANAL DO PANAMA
342
+ 9903 PROVISAO DE NAVIOS E AERONAVES
343
+ 9946 A DESIGNAR
344
+ 9950 BANCOS CENTRAIS
345
+ 9970 ORGANIZACOES INTERNACIONAIS
346
+ // PL_005b - 24/10/08
347
+ // Acrescentado:
348
+ 4235 - LEBUAN,ILHAS
349
+ 4885 - MAYOTTE (ILHAS FRANCESAS)
350
+ // NT2011/004
351
+ acrescentado a tabela de paises</xs:documentation>
352
+ </xs:annotation>
353
+ <xs:restriction base="xs:string">
354
+ <xs:whiteSpace value="preserve"/>
355
+ <xs:enumeration value="132"/>
356
+ <xs:enumeration value="175"/>
357
+ <xs:enumeration value="230"/>
358
+ <xs:enumeration value="310"/>
359
+ <xs:enumeration value="370"/>
360
+ <xs:enumeration value="400"/>
361
+ <xs:enumeration value="418"/>
362
+ <xs:enumeration value="434"/>
363
+ <xs:enumeration value="477"/>
364
+ <xs:enumeration value="531"/>
365
+ <xs:enumeration value="590"/>
366
+ <xs:enumeration value="639"/>
367
+ <xs:enumeration value="647"/>
368
+ <xs:enumeration value="655"/>
369
+ <xs:enumeration value="698"/>
370
+ <xs:enumeration value="728"/>
371
+ <xs:enumeration value="736"/>
372
+ <xs:enumeration value="779"/>
373
+ <xs:enumeration value="809"/>
374
+ <xs:enumeration value="817"/>
375
+ <xs:enumeration value="833"/>
376
+ <xs:enumeration value="850"/>
377
+ <xs:enumeration value="876"/>
378
+ <xs:enumeration value="884"/>
379
+ <xs:enumeration value="906"/>
380
+ <xs:enumeration value="930"/>
381
+ <xs:enumeration value="973"/>
382
+ <xs:enumeration value="981"/>
383
+ <xs:enumeration value="0132"/>
384
+ <xs:enumeration value="0175"/>
385
+ <xs:enumeration value="0230"/>
386
+ <xs:enumeration value="0310"/>
387
+ <xs:enumeration value="0370"/>
388
+ <xs:enumeration value="0400"/>
389
+ <xs:enumeration value="0418"/>
390
+ <xs:enumeration value="0434"/>
391
+ <xs:enumeration value="0477"/>
392
+ <xs:enumeration value="0531"/>
393
+ <xs:enumeration value="0590"/>
394
+ <xs:enumeration value="0639"/>
395
+ <xs:enumeration value="0647"/>
396
+ <xs:enumeration value="0655"/>
397
+ <xs:enumeration value="0698"/>
398
+ <xs:enumeration value="0728"/>
399
+ <xs:enumeration value="0736"/>
400
+ <xs:enumeration value="0779"/>
401
+ <xs:enumeration value="0809"/>
402
+ <xs:enumeration value="0817"/>
403
+ <xs:enumeration value="0833"/>
404
+ <xs:enumeration value="0850"/>
405
+ <xs:enumeration value="0876"/>
406
+ <xs:enumeration value="0884"/>
407
+ <xs:enumeration value="0906"/>
408
+ <xs:enumeration value="0930"/>
409
+ <xs:enumeration value="0973"/>
410
+ <xs:enumeration value="0981"/>
411
+ <xs:enumeration value="1015"/>
412
+ <xs:enumeration value="1058"/>
413
+ <xs:enumeration value="1082"/>
414
+ <xs:enumeration value="1112"/>
415
+ <xs:enumeration value="1155"/>
416
+ <xs:enumeration value="1198"/>
417
+ <xs:enumeration value="1279"/>
418
+ <xs:enumeration value="1376"/>
419
+ <xs:enumeration value="1414"/>
420
+ <xs:enumeration value="1457"/>
421
+ <xs:enumeration value="1490"/>
422
+ <xs:enumeration value="1504"/>
423
+ <xs:enumeration value="1508"/>
424
+ <xs:enumeration value="1511"/>
425
+ <xs:enumeration value="1538"/>
426
+ <xs:enumeration value="1546"/>
427
+ <xs:enumeration value="1589"/>
428
+ <xs:enumeration value="1600"/>
429
+ <xs:enumeration value="1619"/>
430
+ <xs:enumeration value="1635"/>
431
+ <xs:enumeration value="1651"/>
432
+ <xs:enumeration value="1694"/>
433
+ <xs:enumeration value="1732"/>
434
+ <xs:enumeration value="1775"/>
435
+ <xs:enumeration value="1830"/>
436
+ <xs:enumeration value="1872"/>
437
+ <xs:enumeration value="1902"/>
438
+ <xs:enumeration value="1937"/>
439
+ <xs:enumeration value="1953"/>
440
+ <xs:enumeration value="1961"/>
441
+ <xs:enumeration value="1988"/>
442
+ <xs:enumeration value="1996"/>
443
+ <xs:enumeration value="2291"/>
444
+ <xs:enumeration value="2321"/>
445
+ <xs:enumeration value="2356"/>
446
+ <xs:enumeration value="2399"/>
447
+ <xs:enumeration value="2402"/>
448
+ <xs:enumeration value="2437"/>
449
+ <xs:enumeration value="2445"/>
450
+ <xs:enumeration value="2453"/>
451
+ <xs:enumeration value="2461"/>
452
+ <xs:enumeration value="2470"/>
453
+ <xs:enumeration value="2496"/>
454
+ <xs:enumeration value="2518"/>
455
+ <xs:enumeration value="2534"/>
456
+ <xs:enumeration value="2550"/>
457
+ <xs:enumeration value="2593"/>
458
+ <xs:enumeration value="2674"/>
459
+ <xs:enumeration value="2712"/>
460
+ <xs:enumeration value="2755"/>
461
+ <xs:enumeration value="2810"/>
462
+ <xs:enumeration value="2852"/>
463
+ <xs:enumeration value="2895"/>
464
+ <xs:enumeration value="2917"/>
465
+ <xs:enumeration value="2933"/>
466
+ <xs:enumeration value="2976"/>
467
+ <xs:enumeration value="3018"/>
468
+ <xs:enumeration value="3050"/>
469
+ <xs:enumeration value="3093"/>
470
+ <xs:enumeration value="3131"/>
471
+ <xs:enumeration value="3174"/>
472
+ <xs:enumeration value="3255"/>
473
+ <xs:enumeration value="3298"/>
474
+ <xs:enumeration value="3310"/>
475
+ <xs:enumeration value="3344"/>
476
+ <xs:enumeration value="3379"/>
477
+ <xs:enumeration value="3417"/>
478
+ <xs:enumeration value="3450"/>
479
+ <xs:enumeration value="3514"/>
480
+ <xs:enumeration value="3557"/>
481
+ <xs:enumeration value="3573"/>
482
+ <xs:enumeration value="3595"/>
483
+ <xs:enumeration value="3611"/>
484
+ <xs:enumeration value="3654"/>
485
+ <xs:enumeration value="3697"/>
486
+ <xs:enumeration value="3727"/>
487
+ <xs:enumeration value="3751"/>
488
+ <xs:enumeration value="3794"/>
489
+ <xs:enumeration value="3832"/>
490
+ <xs:enumeration value="3867"/>
491
+ <xs:enumeration value="3913"/>
492
+ <xs:enumeration value="3964"/>
493
+ <xs:enumeration value="3999"/>
494
+ <xs:enumeration value="4030"/>
495
+ <xs:enumeration value="4111"/>
496
+ <xs:enumeration value="4200"/>
497
+ <xs:enumeration value="4235"/>
498
+ <xs:enumeration value="4260"/>
499
+ <xs:enumeration value="4278"/>
500
+ <xs:enumeration value="4316"/>
501
+ <xs:enumeration value="4340"/>
502
+ <xs:enumeration value="4383"/>
503
+ <xs:enumeration value="4405"/>
504
+ <xs:enumeration value="4421"/>
505
+ <xs:enumeration value="4456"/>
506
+ <xs:enumeration value="4472"/>
507
+ <xs:enumeration value="4499"/>
508
+ <xs:enumeration value="4502"/>
509
+ <xs:enumeration value="4525"/>
510
+ <xs:enumeration value="4553"/>
511
+ <xs:enumeration value="4588"/>
512
+ <xs:enumeration value="4618"/>
513
+ <xs:enumeration value="4642"/>
514
+ <xs:enumeration value="4677"/>
515
+ <xs:enumeration value="4723"/>
516
+ <xs:enumeration value="4740"/>
517
+ <xs:enumeration value="4766"/>
518
+ <xs:enumeration value="4774"/>
519
+ <xs:enumeration value="4855"/>
520
+ <xs:enumeration value="4880"/>
521
+ <xs:enumeration value="4885"/>
522
+ <xs:enumeration value="4901"/>
523
+ <xs:enumeration value="4936"/>
524
+ <xs:enumeration value="4944"/>
525
+ <xs:enumeration value="4952"/>
526
+ <xs:enumeration value="4979"/>
527
+ <xs:enumeration value="4985"/>
528
+ <xs:enumeration value="4995"/>
529
+ <xs:enumeration value="5010"/>
530
+ <xs:enumeration value="5053"/>
531
+ <xs:enumeration value="5070"/>
532
+ <xs:enumeration value="5088"/>
533
+ <xs:enumeration value="5118"/>
534
+ <xs:enumeration value="5177"/>
535
+ <xs:enumeration value="5215"/>
536
+ <xs:enumeration value="5258"/>
537
+ <xs:enumeration value="5282"/>
538
+ <xs:enumeration value="5312"/>
539
+ <xs:enumeration value="5355"/>
540
+ <xs:enumeration value="5380"/>
541
+ <xs:enumeration value="5428"/>
542
+ <xs:enumeration value="5452"/>
543
+ <xs:enumeration value="5487"/>
544
+ <xs:enumeration value="5517"/>
545
+ <xs:enumeration value="5568"/>
546
+ <xs:enumeration value="5665"/>
547
+ <xs:enumeration value="5738"/>
548
+ <xs:enumeration value="5754"/>
549
+ <xs:enumeration value="5762"/>
550
+ <xs:enumeration value="5800"/>
551
+ <xs:enumeration value="5860"/>
552
+ <xs:enumeration value="5894"/>
553
+ <xs:enumeration value="5932"/>
554
+ <xs:enumeration value="5991"/>
555
+ <xs:enumeration value="6033"/>
556
+ <xs:enumeration value="6076"/>
557
+ <xs:enumeration value="6114"/>
558
+ <xs:enumeration value="6238"/>
559
+ <xs:enumeration value="6254"/>
560
+ <xs:enumeration value="6289"/>
561
+ <xs:enumeration value="6408"/>
562
+ <xs:enumeration value="6475"/>
563
+ <xs:enumeration value="6602"/>
564
+ <xs:enumeration value="6653"/>
565
+ <xs:enumeration value="6700"/>
566
+ <xs:enumeration value="6750"/>
567
+ <xs:enumeration value="6769"/>
568
+ <xs:enumeration value="6777"/>
569
+ <xs:enumeration value="6781"/>
570
+ <xs:enumeration value="6858"/>
571
+ <xs:enumeration value="6874"/>
572
+ <xs:enumeration value="6904"/>
573
+ <xs:enumeration value="6912"/>
574
+ <xs:enumeration value="6955"/>
575
+ <xs:enumeration value="6971"/>
576
+ <xs:enumeration value="7005"/>
577
+ <xs:enumeration value="7056"/>
578
+ <xs:enumeration value="7102"/>
579
+ <xs:enumeration value="7153"/>
580
+ <xs:enumeration value="7200"/>
581
+ <xs:enumeration value="7285"/>
582
+ <xs:enumeration value="7315"/>
583
+ <xs:enumeration value="7358"/>
584
+ <xs:enumeration value="7370"/>
585
+ <xs:enumeration value="7412"/>
586
+ <xs:enumeration value="7447"/>
587
+ <xs:enumeration value="7480"/>
588
+ <xs:enumeration value="7501"/>
589
+ <xs:enumeration value="7544"/>
590
+ <xs:enumeration value="7560"/>
591
+ <xs:enumeration value="7595"/>
592
+ <xs:enumeration value="7641"/>
593
+ <xs:enumeration value="7676"/>
594
+ <xs:enumeration value="7706"/>
595
+ <xs:enumeration value="7722"/>
596
+ <xs:enumeration value="7765"/>
597
+ <xs:enumeration value="7803"/>
598
+ <xs:enumeration value="7820"/>
599
+ <xs:enumeration value="7838"/>
600
+ <xs:enumeration value="7889"/>
601
+ <xs:enumeration value="7919"/>
602
+ <xs:enumeration value="7951"/>
603
+ <xs:enumeration value="8001"/>
604
+ <xs:enumeration value="8052"/>
605
+ <xs:enumeration value="8109"/>
606
+ <xs:enumeration value="8150"/>
607
+ <xs:enumeration value="8206"/>
608
+ <xs:enumeration value="8230"/>
609
+ <xs:enumeration value="8249"/>
610
+ <xs:enumeration value="8273"/>
611
+ <xs:enumeration value="8281"/>
612
+ <xs:enumeration value="8311"/>
613
+ <xs:enumeration value="8338"/>
614
+ <xs:enumeration value="8451"/>
615
+ <xs:enumeration value="8478"/>
616
+ <xs:enumeration value="8486"/>
617
+ <xs:enumeration value="8508"/>
618
+ <xs:enumeration value="8583"/>
619
+ <xs:enumeration value="8630"/>
620
+ <xs:enumeration value="8664"/>
621
+ <xs:enumeration value="8702"/>
622
+ <xs:enumeration value="8737"/>
623
+ <xs:enumeration value="8885"/>
624
+ <xs:enumeration value="8907"/>
625
+ <xs:enumeration value="8958"/>
626
+ <xs:enumeration value="9903"/>
627
+ <xs:enumeration value="9946"/>
628
+ <xs:enumeration value="9950"/>
629
+ <xs:enumeration value="9970"/>
630
+ </xs:restriction>
631
+ </xs:simpleType>
632
+ <xs:simpleType name="TUf">
633
+ <xs:annotation>
634
+ <xs:documentation>Tipo Sigla da UF</xs:documentation>
635
+ </xs:annotation>
636
+ <xs:restriction base="xs:string">
637
+ <xs:whiteSpace value="preserve"/>
638
+ <xs:enumeration value="AC"/>
639
+ <xs:enumeration value="AL"/>
640
+ <xs:enumeration value="AM"/>
641
+ <xs:enumeration value="AP"/>
642
+ <xs:enumeration value="BA"/>
643
+ <xs:enumeration value="CE"/>
644
+ <xs:enumeration value="DF"/>
645
+ <xs:enumeration value="ES"/>
646
+ <xs:enumeration value="GO"/>
647
+ <xs:enumeration value="MA"/>
648
+ <xs:enumeration value="MG"/>
649
+ <xs:enumeration value="MS"/>
650
+ <xs:enumeration value="MT"/>
651
+ <xs:enumeration value="PA"/>
652
+ <xs:enumeration value="PB"/>
653
+ <xs:enumeration value="PE"/>
654
+ <xs:enumeration value="PI"/>
655
+ <xs:enumeration value="PR"/>
656
+ <xs:enumeration value="RJ"/>
657
+ <xs:enumeration value="RN"/>
658
+ <xs:enumeration value="RO"/>
659
+ <xs:enumeration value="RR"/>
660
+ <xs:enumeration value="RS"/>
661
+ <xs:enumeration value="SC"/>
662
+ <xs:enumeration value="SE"/>
663
+ <xs:enumeration value="SP"/>
664
+ <xs:enumeration value="TO"/>
665
+ <xs:enumeration value="EX"/>
666
+ </xs:restriction>
667
+ </xs:simpleType>
668
+ <xs:simpleType name="TUfEmi">
669
+ <xs:annotation>
670
+ <xs:documentation>Tipo Sigla da UF de emissor // acrescentado em 24/10/08 </xs:documentation>
671
+ </xs:annotation>
672
+ <xs:restriction base="xs:string">
673
+ <xs:whiteSpace value="preserve"/>
674
+ <xs:enumeration value="AC"/>
675
+ <xs:enumeration value="AL"/>
676
+ <xs:enumeration value="AM"/>
677
+ <xs:enumeration value="AP"/>
678
+ <xs:enumeration value="BA"/>
679
+ <xs:enumeration value="CE"/>
680
+ <xs:enumeration value="DF"/>
681
+ <xs:enumeration value="ES"/>
682
+ <xs:enumeration value="GO"/>
683
+ <xs:enumeration value="MA"/>
684
+ <xs:enumeration value="MG"/>
685
+ <xs:enumeration value="MS"/>
686
+ <xs:enumeration value="MT"/>
687
+ <xs:enumeration value="PA"/>
688
+ <xs:enumeration value="PB"/>
689
+ <xs:enumeration value="PE"/>
690
+ <xs:enumeration value="PI"/>
691
+ <xs:enumeration value="PR"/>
692
+ <xs:enumeration value="RJ"/>
693
+ <xs:enumeration value="RN"/>
694
+ <xs:enumeration value="RO"/>
695
+ <xs:enumeration value="RR"/>
696
+ <xs:enumeration value="RS"/>
697
+ <xs:enumeration value="SC"/>
698
+ <xs:enumeration value="SE"/>
699
+ <xs:enumeration value="SP"/>
700
+ <xs:enumeration value="TO"/>
701
+ </xs:restriction>
702
+ </xs:simpleType>
703
+ <xs:simpleType name="TAmb">
704
+ <xs:annotation>
705
+ <xs:documentation>Tipo Ambiente</xs:documentation>
706
+ </xs:annotation>
707
+ <xs:restriction base="xs:string">
708
+ <xs:whiteSpace value="preserve"/>
709
+ <xs:enumeration value="1"/>
710
+ <xs:enumeration value="2"/>
711
+ </xs:restriction>
712
+ </xs:simpleType>
713
+ <xs:simpleType name="TVerAplic">
714
+ <xs:annotation>
715
+ <xs:documentation>Tipo Versão do Aplicativo</xs:documentation>
716
+ </xs:annotation>
717
+ <xs:restriction base="nfe:TString">
718
+ <xs:minLength value="1"/>
719
+ <xs:maxLength value="20"/>
720
+ </xs:restriction>
721
+ </xs:simpleType>
722
+ <xs:simpleType name="TMotivo">
723
+ <xs:annotation>
724
+ <xs:documentation>Tipo Motivo</xs:documentation>
725
+ </xs:annotation>
726
+ <xs:restriction base="nfe:TString">
727
+ <xs:maxLength value="255"/>
728
+ <xs:minLength value="1"/>
729
+ </xs:restriction>
730
+ </xs:simpleType>
731
+ <xs:simpleType name="TJust">
732
+ <xs:annotation>
733
+ <xs:documentation>Tipo Justificativa</xs:documentation>
734
+ </xs:annotation>
735
+ <xs:restriction base="nfe:TString">
736
+ <xs:minLength value="15"/>
737
+ <xs:maxLength value="255"/>
738
+ </xs:restriction>
739
+ </xs:simpleType>
740
+ <xs:simpleType name="TServ">
741
+ <xs:annotation>
742
+ <xs:documentation>Tipo Serviço solicitado</xs:documentation>
743
+ </xs:annotation>
744
+ <xs:restriction base="nfe:TString"/>
745
+ </xs:simpleType>
746
+ <xs:simpleType name="Tano">
747
+ <xs:annotation>
748
+ <xs:documentation> Tipo ano</xs:documentation>
749
+ </xs:annotation>
750
+ <xs:restriction base="xs:string">
751
+ <xs:whiteSpace value="preserve"/>
752
+ <xs:pattern value="[0-9]{2}"/>
753
+ </xs:restriction>
754
+ </xs:simpleType>
755
+ <xs:simpleType name="TMed">
756
+ <xs:annotation>
757
+ <xs:documentation> Tipo temp médio em segundos</xs:documentation>
758
+ </xs:annotation>
759
+ <xs:restriction base="xs:string">
760
+ <xs:whiteSpace value="preserve"/>
761
+ <xs:pattern value="[0-9]{1,4}"/>
762
+ </xs:restriction>
763
+ </xs:simpleType>
764
+ <xs:simpleType name="TString">
765
+ <xs:annotation>
766
+ <xs:documentation> Tipo string genérico</xs:documentation>
767
+ </xs:annotation>
768
+ <xs:restriction base="xs:string">
769
+ <xs:whiteSpace value="preserve"/>
770
+ <xs:pattern value="[!-ÿ]{1}[ -ÿ]*[!-ÿ]{1}|[!-ÿ]{1}"/>
771
+ </xs:restriction>
772
+ </xs:simpleType>
773
+ <xs:simpleType name="TData">
774
+ <xs:annotation>
775
+ <xs:documentation> Tipo data AAAA-MM-DD</xs:documentation>
776
+ </xs:annotation>
777
+ <xs:restriction base="xs:string">
778
+ <xs:whiteSpace value="preserve"/>
779
+ <xs:pattern value="(((20(([02468][048])|([13579][26]))-02-29))|(20[0-9][0-9])-((((0[1-9])|(1[0-2]))-((0[1-9])|(1\d)|(2[0-8])))|((((0[13578])|(1[02]))-31)|(((0[1,3-9])|(1[0-2]))-(29|30)))))"/>
780
+ </xs:restriction>
781
+ </xs:simpleType>
782
+ <xs:simpleType name="TTime">
783
+ <xs:annotation>
784
+ <xs:documentation> Tipo hora HH:MM:SS // tipo acrescentado na v2.0</xs:documentation>
785
+ </xs:annotation>
786
+ <xs:restriction base="xs:string">
787
+ <xs:whiteSpace value="preserve"/>
788
+ <xs:pattern value="(([0-1][0-9])|([2][0-3])):([0-5][0-9]):([0-5][0-9])"/>
789
+ </xs:restriction>
790
+ </xs:simpleType>
791
+ </xs:schema>