nf-e 0.2.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.rspec +1 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +201 -0
- data/Guardfile +8 -0
- data/LICENSE.txt +22 -0
- data/README.md +35 -0
- data/Rakefile +6 -0
- data/circle.yml +7 -0
- data/config/locales/commons.yml +15 -0
- data/config/locales/models/dest.yml +13 -0
- data/config/locales/models/emit.yml +14 -0
- data/config/locales/models/ender.yml +13 -0
- data/config/locales/models/envi_nfe.yml +7 -0
- data/config/locales/models/ide.yml +5 -0
- data/config/locales/models/nfe.yml +5 -0
- data/config/locales/operations/correction_letter.yml +4 -0
- data/config/locales/operations/nfe_cancel.yml +4 -0
- data/config/locales/operations/nfe_discard.yml +7 -0
- data/config/locales/pt-BR.yml +211 -0
- data/lib/nf-e.rb +20 -0
- data/lib/nfe/helpers/nfe_key.rb +103 -0
- data/lib/nfe/helpers/schema_validator.rb +24 -0
- data/lib/nfe/helpers/signer.rb +25 -0
- data/lib/nfe/helpers/uf_helper.rb +23 -0
- data/lib/nfe/helpers/xml_model/attribute_base.rb +60 -0
- data/lib/nfe/helpers/xml_model/attribute_bigdecimal.rb +16 -0
- data/lib/nfe/helpers/xml_model/attribute_collection.rb +37 -0
- data/lib/nfe/helpers/xml_model/attribute_date.rb +20 -0
- data/lib/nfe/helpers/xml_model/attribute_datetime.rb +20 -0
- data/lib/nfe/helpers/xml_model/attribute_enumerize.rb +12 -0
- data/lib/nfe/helpers/xml_model/attribute_float.rb +20 -0
- data/lib/nfe/helpers/xml_model/attribute_integer.rb +12 -0
- data/lib/nfe/helpers/xml_model/attribute_node.rb +17 -0
- data/lib/nfe/helpers/xml_model/attribute_nodeattribute.rb +16 -0
- data/lib/nfe/helpers/xml_model/attribute_text.rb +31 -0
- data/lib/nfe/helpers/xml_model/factory.rb +17 -0
- data/lib/nfe/helpers/xml_model/nfe_model.rb +120 -0
- data/lib/nfe/models/NFe.rb +47 -0
- data/lib/nfe/models/avulsa.rb +59 -0
- data/lib/nfe/models/bill/cobr.rb +23 -0
- data/lib/nfe/models/bill/dup.rb +23 -0
- data/lib/nfe/models/bill/fat.rb +36 -0
- data/lib/nfe/models/cane/bigdecimal_greater_than_validator.rb +11 -0
- data/lib/nfe/models/cane/bigdecimal_less_than_validator.rb +9 -0
- data/lib/nfe/models/cane/cana.rb +100 -0
- data/lib/nfe/models/cane/deduc.rb +24 -0
- data/lib/nfe/models/cane/forDia.rb +33 -0
- data/lib/nfe/models/compra.rb +21 -0
- data/lib/nfe/models/concerns/cnpj_cpf_validatable.rb +22 -0
- data/lib/nfe/models/concerns/ufable.rb +20 -0
- data/lib/nfe/models/det.rb +34 -0
- data/lib/nfe/models/emitter/emit.rb +56 -0
- data/lib/nfe/models/ender.rb +64 -0
- data/lib/nfe/models/entrega_retirada.rb +47 -0
- data/lib/nfe/models/evento.rb +71 -0
- data/lib/nfe/models/exporta.rb +19 -0
- data/lib/nfe/models/ide.rb +140 -0
- data/lib/nfe/models/infNFe.rb +82 -0
- data/lib/nfe/models/information/infAdic.rb +51 -0
- data/lib/nfe/models/information/obsContFisco.rb +21 -0
- data/lib/nfe/models/information/procRef.rb +25 -0
- data/lib/nfe/models/itens/CIDE.rb +32 -0
- data/lib/nfe/models/itens/DI.rb +55 -0
- data/lib/nfe/models/itens/adi.rb +34 -0
- data/lib/nfe/models/itens/arma.rb +31 -0
- data/lib/nfe/models/itens/comb.rb +41 -0
- data/lib/nfe/models/itens/med.rb +40 -0
- data/lib/nfe/models/itens/prod.rb +115 -0
- data/lib/nfe/models/itens/veicProd.rb +140 -0
- data/lib/nfe/models/nfeProc.rb +29 -0
- data/lib/nfe/models/procEventoNFe.rb +29 -0
- data/lib/nfe/models/procInutNFe.rb +28 -0
- data/lib/nfe/models/recipient/dest.rb +57 -0
- data/lib/nfe/models/referenced/NFref.rb +44 -0
- data/lib/nfe/models/referenced/refECF.rb +26 -0
- data/lib/nfe/models/referenced/refNF.rb +43 -0
- data/lib/nfe/models/referenced/refNFP.rb +40 -0
- data/lib/nfe/models/signature.rb +53 -0
- data/lib/nfe/models/taxes/ICMS.rb +100 -0
- data/lib/nfe/models/taxes/ICMS00.rb +39 -0
- data/lib/nfe/models/taxes/ICMS10.rb +82 -0
- data/lib/nfe/models/taxes/ICMS101.rb +26 -0
- data/lib/nfe/models/taxes/ICMS102.rb +10 -0
- data/lib/nfe/models/taxes/ICMS103.rb +13 -0
- data/lib/nfe/models/taxes/ICMS20.rb +46 -0
- data/lib/nfe/models/taxes/ICMS201.rb +67 -0
- data/lib/nfe/models/taxes/ICMS202.rb +53 -0
- data/lib/nfe/models/taxes/ICMS203.rb +13 -0
- data/lib/nfe/models/taxes/ICMS30.rb +55 -0
- data/lib/nfe/models/taxes/ICMS300.rb +13 -0
- data/lib/nfe/models/taxes/ICMS40.rb +24 -0
- data/lib/nfe/models/taxes/ICMS400.rb +13 -0
- data/lib/nfe/models/taxes/ICMS41.rb +13 -0
- data/lib/nfe/models/taxes/ICMS50.rb +13 -0
- data/lib/nfe/models/taxes/ICMS500.rb +28 -0
- data/lib/nfe/models/taxes/ICMS51.rb +48 -0
- data/lib/nfe/models/taxes/ICMS60.rb +28 -0
- data/lib/nfe/models/taxes/ICMS70.rb +89 -0
- data/lib/nfe/models/taxes/ICMS90.rb +90 -0
- data/lib/nfe/models/taxes/ICMS900.rb +100 -0
- data/lib/nfe/models/taxes/ICMSBase.rb +21 -0
- data/lib/nfe/models/taxes/ICMSNormalBase.rb +15 -0
- data/lib/nfe/models/taxes/ICMSPart.rb +112 -0
- data/lib/nfe/models/taxes/ICMSSNBase.rb +19 -0
- data/lib/nfe/models/taxes/ICMSST.rb +50 -0
- data/lib/nfe/models/taxes/ICMSTot.rb +124 -0
- data/lib/nfe/models/taxes/II.rb +39 -0
- data/lib/nfe/models/taxes/IPI.rb +133 -0
- data/lib/nfe/models/taxes/IPINT.rb +17 -0
- data/lib/nfe/models/taxes/IPITrib.rb +51 -0
- data/lib/nfe/models/taxes/ISSQN.rb +54 -0
- data/lib/nfe/models/taxes/ISSQNtot.rb +51 -0
- data/lib/nfe/models/taxes/PISCOFINS.rb +173 -0
- data/lib/nfe/models/taxes/PISCOFINSAliq.rb +62 -0
- data/lib/nfe/models/taxes/PISCOFINSNT.rb +20 -0
- data/lib/nfe/models/taxes/PISCOFINSOutr.rb +87 -0
- data/lib/nfe/models/taxes/PISCOFINSQtde.rb +56 -0
- data/lib/nfe/models/taxes/PISCOFINSST.rb +78 -0
- data/lib/nfe/models/taxes/imposto.rb +44 -0
- data/lib/nfe/models/taxes/retTrib.rb +67 -0
- data/lib/nfe/models/total.rb +23 -0
- data/lib/nfe/models/transport/lacres.rb +16 -0
- data/lib/nfe/models/transport/retTransp.rb +49 -0
- data/lib/nfe/models/transport/transp.rb +50 -0
- data/lib/nfe/models/transport/transporta.rb +42 -0
- data/lib/nfe/models/transport/veicTransp_reboque.rb +23 -0
- data/lib/nfe/models/transport/vol.rb +50 -0
- data/lib/nfe/operations/base.rb +101 -0
- data/lib/nfe/operations/consult_emitter.rb +62 -0
- data/lib/nfe/operations/correction_letter.rb +37 -0
- data/lib/nfe/operations/event.rb +117 -0
- data/lib/nfe/operations/nfe_cancel.rb +47 -0
- data/lib/nfe/operations/nfe_discard.rb +106 -0
- data/lib/nfe/operations/nfe_send.rb +125 -0
- data/lib/nfe/operations/nfe_situation.rb +46 -0
- data/lib/nfe/operations/service_status.rb +44 -0
- data/lib/nfe/schemas/CCe_v1.00.xsd +11 -0
- data/lib/nfe/schemas/consCad_v2.00.xsd +9 -0
- data/lib/nfe/schemas/consReciNFe_v3.10.xsd +9 -0
- data/lib/nfe/schemas/consSitNFe_v3.10.xsd +9 -0
- data/lib/nfe/schemas/consStatServ_v3.10.xsd +9 -0
- data/lib/nfe/schemas/envCCe_v1.00.xsd +10 -0
- data/lib/nfe/schemas/envEventoCancNFe_v1.00.xsd +9 -0
- data/lib/nfe/schemas/enviNFe_v3.10.xsd +9 -0
- data/lib/nfe/schemas/inutNFe_v3.10.xsd +9 -0
- data/lib/nfe/schemas/leiauteCCe_v1.00.xsd +423 -0
- data/lib/nfe/schemas/leiauteConsSitNFe_v3.10.xsd +502 -0
- data/lib/nfe/schemas/leiauteConsStatServ_v3.10.xsd +98 -0
- data/lib/nfe/schemas/leiauteConsultaCadastro_v2.00.xsd +404 -0
- data/lib/nfe/schemas/leiauteEventoCancNFe_v1.00.xsd +400 -0
- data/lib/nfe/schemas/leiauteInutNFe_v3.10.xsd +193 -0
- data/lib/nfe/schemas/leiauteNFe_v3.10.xsd +7212 -0
- data/lib/nfe/schemas/nfe_v3.10.xsd +9 -0
- data/lib/nfe/schemas/procInutNFe_v3.10.xsd +9 -0
- data/lib/nfe/schemas/procNFe_v3.10.xsd +9 -0
- data/lib/nfe/schemas/retConsReciNFe_v3.10.xsd +9 -0
- data/lib/nfe/schemas/retConsSitNFe_v3.10.xsd +9 -0
- data/lib/nfe/schemas/retConsStatServ_v3.10.xsd +9 -0
- data/lib/nfe/schemas/retEnviNFe_v3.10.xsd +9 -0
- data/lib/nfe/schemas/retInutNFe_v3.10.xsd +9 -0
- data/lib/nfe/schemas/tiposBasico_v1.03.xsd +791 -0
- data/lib/nfe/schemas/tiposBasico_v3.10.xsd +877 -0
- data/lib/nfe/schemas/xmldsig-core-schema_v1.01.xsd +98 -0
- data/lib/nfe/services/dispatch/consCad.rb +57 -0
- data/lib/nfe/services/dispatch/consSitNFe.rb +43 -0
- data/lib/nfe/services/dispatch/consStatServ.rb +42 -0
- data/lib/nfe/services/dispatch/detEventoCC.rb +55 -0
- data/lib/nfe/services/dispatch/detEventoCancel.rb +45 -0
- data/lib/nfe/services/dispatch/envEvento.rb +28 -0
- data/lib/nfe/services/dispatch/enviNFe.rb +45 -0
- data/lib/nfe/services/dispatch/inutNFe.rb +93 -0
- data/lib/nfe/services/regress/infCad.rb +34 -0
- data/lib/nfe/services/regress/protNFe.rb +54 -0
- data/lib/nfe/services/regress/retConsCad.rb +27 -0
- data/lib/nfe/services/regress/retConsSitNFe.rb +26 -0
- data/lib/nfe/services/regress/retConsStatServ.rb +25 -0
- data/lib/nfe/services/regress/retEnvEvento.rb +27 -0
- data/lib/nfe/services/regress/retEnviNFe.rb +23 -0
- data/lib/nfe/services/regress/retEvento.rb +60 -0
- data/lib/nfe/services/regress/retInutNFe.rb +56 -0
- data/lib/nfe/version.rb +3 -0
- data/lib/nfe/webservices/client_soap.rb +35 -0
- data/lib/nfe/webservices/sender.rb +42 -0
- data/lib/nfe/webservices/wsinfo/base.rb +35 -0
- data/lib/nfe/webservices/wsinfo/consult_emitter.rb +16 -0
- data/lib/nfe/webservices/wsinfo/event.rb +20 -0
- data/lib/nfe/webservices/wsinfo/factory.rb +31 -0
- data/lib/nfe/webservices/wsinfo/nfe_disenable.rb +16 -0
- data/lib/nfe/webservices/wsinfo/nfe_send.rb +16 -0
- data/lib/nfe/webservices/wsinfo/nfe_situation.rb +16 -0
- data/lib/nfe/webservices/wsinfo/production/am.rb +16 -0
- data/lib/nfe/webservices/wsinfo/production/ba.rb +21 -0
- data/lib/nfe/webservices/wsinfo/production/ce.rb +16 -0
- data/lib/nfe/webservices/wsinfo/production/go.rb +16 -0
- data/lib/nfe/webservices/wsinfo/production/mg.rb +16 -0
- data/lib/nfe/webservices/wsinfo/production/ms.rb +16 -0
- data/lib/nfe/webservices/wsinfo/production/mt.rb +16 -0
- data/lib/nfe/webservices/wsinfo/production/pe.rb +16 -0
- data/lib/nfe/webservices/wsinfo/production/pr.rb +22 -0
- data/lib/nfe/webservices/wsinfo/production/rs.rb +21 -0
- data/lib/nfe/webservices/wsinfo/production/sp.rb +21 -0
- data/lib/nfe/webservices/wsinfo/production/svan.rb +24 -0
- data/lib/nfe/webservices/wsinfo/production/svrs.rb +21 -0
- data/lib/nfe/webservices/wsinfo/service_status.rb +16 -0
- data/lib/nfe/webservices/wsinfo/test/am.rb +16 -0
- data/lib/nfe/webservices/wsinfo/test/ba.rb +16 -0
- data/lib/nfe/webservices/wsinfo/test/ce.rb +16 -0
- data/lib/nfe/webservices/wsinfo/test/go.rb +16 -0
- data/lib/nfe/webservices/wsinfo/test/mg.rb +16 -0
- data/lib/nfe/webservices/wsinfo/test/ms.rb +16 -0
- data/lib/nfe/webservices/wsinfo/test/mt.rb +16 -0
- data/lib/nfe/webservices/wsinfo/test/pe.rb +16 -0
- data/lib/nfe/webservices/wsinfo/test/pr.rb +16 -0
- data/lib/nfe/webservices/wsinfo/test/rs.rb +17 -0
- data/lib/nfe/webservices/wsinfo/test/sp.rb +16 -0
- data/lib/nfe/webservices/wsinfo/test/svan.rb +20 -0
- data/lib/nfe/webservices/wsinfo/test/svrs.rb +18 -0
- data/lib/nfe/webservices/wsinfo/wsdl_base.rb +46 -0
- data/lib/nfe/webservices/wsinfo/wsdl_finder.rb +31 -0
- data/lib/xmldsig/canonicalize.rb +22 -0
- data/lib/xmldsig/canonicalizer.rb +27 -0
- data/lib/xmldsig/enveloped_signature.rb +10 -0
- data/lib/xmldsig/namespaces.rb +6 -0
- data/lib/xmldsig/reference.rb +72 -0
- data/lib/xmldsig/signature.rb +106 -0
- data/lib/xmldsig/signed_document.rb +28 -0
- data/lib/xmldsig/transform.rb +10 -0
- data/lib/xmldsig/transforms.rb +28 -0
- data/lib/xmldsig/xmldsig.rb +12 -0
- data/nf-e.gemspec +42 -0
- data/spec/nfe/factories/models/NFe.rb +9 -0
- data/spec/nfe/factories/models/avulsa.rb +16 -0
- data/spec/nfe/factories/models/bill/cobr.rb +14 -0
- data/spec/nfe/factories/models/bill/dup.rb +9 -0
- data/spec/nfe/factories/models/bill/fat.rb +10 -0
- data/spec/nfe/factories/models/cane/cana.rb +26 -0
- data/spec/nfe/factories/models/cane/deduc.rb +6 -0
- data/spec/nfe/factories/models/cane/forDia.rb +8 -0
- data/spec/nfe/factories/models/compra.rb +7 -0
- data/spec/nfe/factories/models/det.rb +11 -0
- data/spec/nfe/factories/models/emitter/emit.rb +15 -0
- data/spec/nfe/factories/models/ender.rb +17 -0
- data/spec/nfe/factories/models/entrega_retirada.rb +14 -0
- data/spec/nfe/factories/models/evento.rb +15 -0
- data/spec/nfe/factories/models/exporta.rb +6 -0
- data/spec/nfe/factories/models/ide.rb +43 -0
- data/spec/nfe/factories/models/infNFe.rb +26 -0
- data/spec/nfe/factories/models/information/infAdic.rb +23 -0
- data/spec/nfe/factories/models/information/obsContFisco.rb +8 -0
- data/spec/nfe/factories/models/information/procRef.rb +8 -0
- data/spec/nfe/factories/models/itens/CIDE.rb +7 -0
- data/spec/nfe/factories/models/itens/DI.rb +17 -0
- data/spec/nfe/factories/models/itens/adi.rb +8 -0
- data/spec/nfe/factories/models/itens/arma.rb +8 -0
- data/spec/nfe/factories/models/itens/comb.rb +9 -0
- data/spec/nfe/factories/models/itens/med.rb +9 -0
- data/spec/nfe/factories/models/itens/prod.rb +48 -0
- data/spec/nfe/factories/models/itens/veicProd.rb +28 -0
- data/spec/nfe/factories/models/recipient/dest.rb +13 -0
- data/spec/nfe/factories/models/referenced/NFref.rb +13 -0
- data/spec/nfe/factories/models/referenced/refECF.rb +7 -0
- data/spec/nfe/factories/models/referenced/refNF.rb +10 -0
- data/spec/nfe/factories/models/referenced/refNFP.rb +12 -0
- data/spec/nfe/factories/models/signature.rb +10 -0
- data/spec/nfe/factories/models/taxes/ICMS.rb +203 -0
- data/spec/nfe/factories/models/taxes/ICMS00.rb +10 -0
- data/spec/nfe/factories/models/taxes/ICMS10.rb +16 -0
- data/spec/nfe/factories/models/taxes/ICMS101.rb +8 -0
- data/spec/nfe/factories/models/taxes/ICMS102.rb +6 -0
- data/spec/nfe/factories/models/taxes/ICMS103.rb +6 -0
- data/spec/nfe/factories/models/taxes/ICMS20.rb +11 -0
- data/spec/nfe/factories/models/taxes/ICMS201.rb +14 -0
- data/spec/nfe/factories/models/taxes/ICMS202.rb +12 -0
- data/spec/nfe/factories/models/taxes/ICMS203.rb +12 -0
- data/spec/nfe/factories/models/taxes/ICMS30.rb +12 -0
- data/spec/nfe/factories/models/taxes/ICMS300.rb +6 -0
- data/spec/nfe/factories/models/taxes/ICMS40.rb +8 -0
- data/spec/nfe/factories/models/taxes/ICMS400.rb +6 -0
- data/spec/nfe/factories/models/taxes/ICMS41.rb +8 -0
- data/spec/nfe/factories/models/taxes/ICMS50.rb +8 -0
- data/spec/nfe/factories/models/taxes/ICMS500.rb +8 -0
- data/spec/nfe/factories/models/taxes/ICMS51.rb +11 -0
- data/spec/nfe/factories/models/taxes/ICMS60.rb +8 -0
- data/spec/nfe/factories/models/taxes/ICMS70.rb +17 -0
- data/spec/nfe/factories/models/taxes/ICMS90.rb +17 -0
- data/spec/nfe/factories/models/taxes/ICMS900.rb +19 -0
- data/spec/nfe/factories/models/taxes/ICMSPart.rb +19 -0
- data/spec/nfe/factories/models/taxes/ICMSST.rb +9 -0
- data/spec/nfe/factories/models/taxes/ICMSTot.rb +20 -0
- data/spec/nfe/factories/models/taxes/II.rb +8 -0
- data/spec/nfe/factories/models/taxes/IPI.rb +24 -0
- data/spec/nfe/factories/models/taxes/IPINT.rb +5 -0
- data/spec/nfe/factories/models/taxes/IPITrib.rb +10 -0
- data/spec/nfe/factories/models/taxes/ISSQN.rb +10 -0
- data/spec/nfe/factories/models/taxes/ISSQNtot.rb +9 -0
- data/spec/nfe/factories/models/taxes/PISCOFINS.rb +72 -0
- data/spec/nfe/factories/models/taxes/PISCOFINSAliq.rb +21 -0
- data/spec/nfe/factories/models/taxes/PISCOFINSNT.rb +5 -0
- data/spec/nfe/factories/models/taxes/PISCOFINSOutr.rb +23 -0
- data/spec/nfe/factories/models/taxes/PISCOFINSQtde.rb +17 -0
- data/spec/nfe/factories/models/taxes/PISCOFINSST.rb +21 -0
- data/spec/nfe/factories/models/taxes/imposto.rb +15 -0
- data/spec/nfe/factories/models/taxes/retTrib.rb +11 -0
- data/spec/nfe/factories/models/total.rb +7 -0
- data/spec/nfe/factories/models/transport/lacres.rb +6 -0
- data/spec/nfe/factories/models/transport/retTransp.rb +10 -0
- data/spec/nfe/factories/models/transport/transp.rb +18 -0
- data/spec/nfe/factories/models/transport/transporta.rb +11 -0
- data/spec/nfe/factories/models/transport/veicTranspReboque.rb +8 -0
- data/spec/nfe/factories/models/transport/vol.rb +17 -0
- data/spec/nfe/factories/services/consCad.rb +10 -0
- data/spec/nfe/factories/services/consSitNFe.rb +12 -0
- data/spec/nfe/factories/services/consStatServ.rb +7 -0
- data/spec/nfe/factories/services/detEventoCC.rb +6 -0
- data/spec/nfe/factories/services/detEventoCancel.rb +7 -0
- data/spec/nfe/factories/services/envEvento.rb +7 -0
- data/spec/nfe/factories/services/enviNFe.rb +11 -0
- data/spec/nfe/factories/services/inutNFe.rb +15 -0
- data/spec/nfe/factories/services/protNFe.rb +14 -0
- data/spec/nfe/factories/services/retEvento.rb +15 -0
- data/spec/nfe/factories/services/retInutNFe.rb +19 -0
- data/spec/nfe/fixtures/cassettes/correction_letter/error_in_lot.yml +176 -0
- data/spec/nfe/fixtures/cassettes/correction_letter/invalid_response.yml +175 -0
- data/spec/nfe/fixtures/cassettes/correction_letter/rejected.yml +177 -0
- data/spec/nfe/fixtures/cassettes/correction_letter/success.yml +177 -0
- data/spec/nfe/fixtures/cassettes/nfe_cancel/error_in_lot.yml +176 -0
- data/spec/nfe/fixtures/cassettes/nfe_cancel/invalid_response.yml +174 -0
- data/spec/nfe/fixtures/cassettes/nfe_cancel/rejected.yml +177 -0
- data/spec/nfe/fixtures/cassettes/nfe_cancel/success.yml +177 -0
- data/spec/nfe/fixtures/cassettes/nfe_discard/invalid_response.yml +175 -0
- data/spec/nfe/fixtures/cassettes/nfe_discard/rejected.yml +176 -0
- data/spec/nfe/fixtures/cassettes/nfe_discard/success.yml +176 -0
- data/spec/nfe/fixtures/cassettes/nfe_send/authorized.yml +197 -0
- data/spec/nfe/fixtures/cassettes/nfe_send/denied.yml +198 -0
- data/spec/nfe/fixtures/cassettes/nfe_send/error_in_lot.yml +195 -0
- data/spec/nfe/fixtures/cassettes/nfe_send/invalid_response.yml +193 -0
- data/spec/nfe/fixtures/cassettes/nfe_send/rejected.yml +198 -0
- data/spec/nfe/fixtures/certificate.pem +16 -0
- data/spec/nfe/fixtures/invalid_nfe.xml +1 -0
- data/spec/nfe/fixtures/nfe.xml +1 -0
- data/spec/nfe/fixtures/private-key.pem +15 -0
- data/spec/nfe/helpers/nfe_key_spec.rb +87 -0
- data/spec/nfe/helpers/schema_validator_spec.rb +34 -0
- data/spec/nfe/helpers/signer_spec.rb +22 -0
- data/spec/nfe/helpers/uf_helper_spec.rb +331 -0
- data/spec/nfe/helpers/xml_model/attribute_base_spec.rb +63 -0
- data/spec/nfe/helpers/xml_model/attribute_bigdecimal_spec.rb +32 -0
- data/spec/nfe/helpers/xml_model/attribute_collection_spec.rb +46 -0
- data/spec/nfe/helpers/xml_model/attribute_date_spec.rb +40 -0
- data/spec/nfe/helpers/xml_model/attribute_datetime_spec.rb +41 -0
- data/spec/nfe/helpers/xml_model/attribute_enumerize_spec.rb +34 -0
- data/spec/nfe/helpers/xml_model/attribute_float_spec.rb +40 -0
- data/spec/nfe/helpers/xml_model/attribute_integer_spec.rb +33 -0
- data/spec/nfe/helpers/xml_model/attribute_node_spec.rb +44 -0
- data/spec/nfe/helpers/xml_model/attribute_nodeattribute_spec.rb +33 -0
- data/spec/nfe/helpers/xml_model/attribute_text_spec.rb +173 -0
- data/spec/nfe/helpers/xml_model/factory_spec.rb +102 -0
- data/spec/nfe/helpers/xml_model/nfe_model_spec.rb +225 -0
- data/spec/nfe/models/NFe_spec.rb +48 -0
- data/spec/nfe/models/avulsa_spec.rb +140 -0
- data/spec/nfe/models/bigdecimal_greater_than_validator_spec.rb +33 -0
- data/spec/nfe/models/bigdecimal_less_than_validator_spec.rb +33 -0
- data/spec/nfe/models/bill/cobr_spec.rb +98 -0
- data/spec/nfe/models/bill/dup_spec.rb +80 -0
- data/spec/nfe/models/bill/fat_spec.rb +129 -0
- data/spec/nfe/models/cane/cana_spec.rb +161 -0
- data/spec/nfe/models/cane/deduc_spec.rb +40 -0
- data/spec/nfe/models/cane/forDia_spec.rb +51 -0
- data/spec/nfe/models/compra_spec.rb +78 -0
- data/spec/nfe/models/det_spec.rb +94 -0
- data/spec/nfe/models/emitter/emit_spec.rb +150 -0
- data/spec/nfe/models/ender_spec.rb +129 -0
- data/spec/nfe/models/entrega_retirada_spec.rb +159 -0
- data/spec/nfe/models/evento_spec.rb +52 -0
- data/spec/nfe/models/exporta_spec.rb +54 -0
- data/spec/nfe/models/ide_spec.rb +215 -0
- data/spec/nfe/models/infNFe_spec.rb +292 -0
- data/spec/nfe/models/information/infAdic_spec.rb +126 -0
- data/spec/nfe/models/information/obsContFisco_spec.rb +37 -0
- data/spec/nfe/models/information/procRef_spec.rb +41 -0
- data/spec/nfe/models/itens/CIDE_spec.rb +57 -0
- data/spec/nfe/models/itens/DI_spec.rb +67 -0
- data/spec/nfe/models/itens/adi_spec.rb +79 -0
- data/spec/nfe/models/itens/arma_spec.rb +43 -0
- data/spec/nfe/models/itens/comb_spec.rb +103 -0
- data/spec/nfe/models/itens/med_spec.rb +52 -0
- data/spec/nfe/models/itens/prod_spec.rb +249 -0
- data/spec/nfe/models/itens/veicProd_spec.rb +173 -0
- data/spec/nfe/models/nfeProc_spec.rb +21 -0
- data/spec/nfe/models/procEventoNFe_spec.rb +21 -0
- data/spec/nfe/models/procInutNFe_spec.rb +21 -0
- data/spec/nfe/models/recipient/dest_spec.rb +152 -0
- data/spec/nfe/models/referenced/NFref_spec.rb +102 -0
- data/spec/nfe/models/referenced/refECF_spec.rb +59 -0
- data/spec/nfe/models/referenced/refNFP_spec.rb +115 -0
- data/spec/nfe/models/referenced/refNF_spec.rb +82 -0
- data/spec/nfe/models/shared_examples_for_tdec_0302.rb +35 -0
- data/spec/nfe/models/shared_examples_for_tdec_0803.rb +21 -0
- data/spec/nfe/models/shared_examples_for_tdec_1104.rb +38 -0
- data/spec/nfe/models/shared_examples_for_tdec_1204.rb +34 -0
- data/spec/nfe/models/shared_examples_for_tdec_1302.rb +34 -0
- data/spec/nfe/models/signature_spec.rb +56 -0
- data/spec/nfe/models/taxes/ICMS00_spec.rb +27 -0
- data/spec/nfe/models/taxes/ICMS101_spec.rb +21 -0
- data/spec/nfe/models/taxes/ICMS102_spec.rb +15 -0
- data/spec/nfe/models/taxes/ICMS103_spec.rb +15 -0
- data/spec/nfe/models/taxes/ICMS10_spec.rb +83 -0
- data/spec/nfe/models/taxes/ICMS201_spec.rb +67 -0
- data/spec/nfe/models/taxes/ICMS202_spec.rb +61 -0
- data/spec/nfe/models/taxes/ICMS203_spec.rb +61 -0
- data/spec/nfe/models/taxes/ICMS20_spec.rb +30 -0
- data/spec/nfe/models/taxes/ICMS300_spec.rb +16 -0
- data/spec/nfe/models/taxes/ICMS30_spec.rb +67 -0
- data/spec/nfe/models/taxes/ICMS400_spec.rb +15 -0
- data/spec/nfe/models/taxes/ICMS40_spec.rb +51 -0
- data/spec/nfe/models/taxes/ICMS41_spec.rb +51 -0
- data/spec/nfe/models/taxes/ICMS500_spec.rb +46 -0
- data/spec/nfe/models/taxes/ICMS50_spec.rb +51 -0
- data/spec/nfe/models/taxes/ICMS51_spec.rb +55 -0
- data/spec/nfe/models/taxes/ICMS60_spec.rb +52 -0
- data/spec/nfe/models/taxes/ICMS70_spec.rb +84 -0
- data/spec/nfe/models/taxes/ICMS900_spec.rb +80 -0
- data/spec/nfe/models/taxes/ICMS90_spec.rb +83 -0
- data/spec/nfe/models/taxes/ICMSPart_spec.rb +141 -0
- data/spec/nfe/models/taxes/ICMSST_spec.rb +60 -0
- data/spec/nfe/models/taxes/ICMSTot_spec.rb +119 -0
- data/spec/nfe/models/taxes/ICMS_spec.rb +159 -0
- data/spec/nfe/models/taxes/II_spec.rb +58 -0
- data/spec/nfe/models/taxes/IPINT_spec.rb +39 -0
- data/spec/nfe/models/taxes/IPITrib_spec.rb +55 -0
- data/spec/nfe/models/taxes/IPI_spec.rb +128 -0
- data/spec/nfe/models/taxes/ISSQN_spec.rb +62 -0
- data/spec/nfe/models/taxes/ISSQNtot_spec.rb +72 -0
- data/spec/nfe/models/taxes/PISCOFINSAliq_spec.rb +22 -0
- data/spec/nfe/models/taxes/PISCOFINSNT_spec.rb +12 -0
- data/spec/nfe/models/taxes/PISCOFINSOutr_spec.rb +37 -0
- data/spec/nfe/models/taxes/PISCOFINSQtde_spec.rb +21 -0
- data/spec/nfe/models/taxes/PISCOFINSST_spec.rb +60 -0
- data/spec/nfe/models/taxes/PISCOFINS_spec.rb +68 -0
- data/spec/nfe/models/taxes/imposto_spec.rb +159 -0
- data/spec/nfe/models/taxes/retTrib_spec.rb +78 -0
- data/spec/nfe/models/taxes/shared_examples_for_COFINSAliq.rb +41 -0
- data/spec/nfe/models/taxes/shared_examples_for_COFINSNT.rb +35 -0
- data/spec/nfe/models/taxes/shared_examples_for_COFINSOutr.rb +119 -0
- data/spec/nfe/models/taxes/shared_examples_for_COFINSQtde.rb +41 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS00.rb +45 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS10.rb +57 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS101.rb +41 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS102.rb +37 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS103.rb +37 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS20.rb +47 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS201.rb +53 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS202.rb +49 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS203.rb +49 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS30.rb +49 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS300.rb +37 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS40.rb +41 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS400.rb +37 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS41.rb +41 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS50.rb +41 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS500.rb +41 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS51.rb +47 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS60.rb +41 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS70.rb +59 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS90.rb +59 -0
- data/spec/nfe/models/taxes/shared_examples_for_ICMS900.rb +63 -0
- data/spec/nfe/models/taxes/shared_examples_for_PISAliq.rb +41 -0
- data/spec/nfe/models/taxes/shared_examples_for_PISNT.rb +35 -0
- data/spec/nfe/models/taxes/shared_examples_for_PISOutr.rb +119 -0
- data/spec/nfe/models/taxes/shared_examples_for_PISQtde.rb +41 -0
- data/spec/nfe/models/total_spec.rb +144 -0
- data/spec/nfe/models/transport/lacres_spec.rb +35 -0
- data/spec/nfe/models/transport/retTransp_spec.rb +69 -0
- data/spec/nfe/models/transport/transp_spec.rb +149 -0
- data/spec/nfe/models/transport/transporta_spec.rb +128 -0
- data/spec/nfe/models/transport/veicTranspReboque_spec.rb +83 -0
- data/spec/nfe/models/transport/vol_spec.rb +97 -0
- data/spec/nfe/operations/consult_emitter_spec.rb +31 -0
- data/spec/nfe/operations/correction_letter_spec.rb +198 -0
- data/spec/nfe/operations/nfe_cancel_spec.rb +223 -0
- data/spec/nfe/operations/nfe_discard_spec.rb +172 -0
- data/spec/nfe/operations/nfe_send_spec.rb +220 -0
- data/spec/nfe/operations/nfe_situation_spec.rb +14 -0
- data/spec/nfe/operations/service_status_spec.rb +11 -0
- data/spec/nfe/operations/shared_examples_for_operations.rb +84 -0
- data/spec/nfe/services/dispatch/consCad_spec.rb +80 -0
- data/spec/nfe/services/dispatch/consSitNFe_spec.rb +29 -0
- data/spec/nfe/services/dispatch/consStatServ_spec.rb +25 -0
- data/spec/nfe/services/dispatch/detEventoCC_spec.rb +45 -0
- data/spec/nfe/services/dispatch/detEventoCancel_spec.rb +39 -0
- data/spec/nfe/services/dispatch/envEvento_spec.rb +33 -0
- data/spec/nfe/services/dispatch/enviNFe_spec.rb +27 -0
- data/spec/nfe/services/dispatch/inutNFe_spec.rb +51 -0
- data/spec/nfe/services/regress/infCad_spec.rb +61 -0
- data/spec/nfe/services/regress/protNFe_spec.rb +56 -0
- data/spec/nfe/services/regress/retConsCad_spec.rb +67 -0
- data/spec/nfe/services/regress/retConsSitNFe_spec.rb +46 -0
- data/spec/nfe/services/regress/retConsStatServ_spec.rb +34 -0
- data/spec/nfe/services/regress/retEnvEvento_spec.rb +44 -0
- data/spec/nfe/services/regress/retEnviNFe_spec.rb +44 -0
- data/spec/nfe/services/regress/retEvento_spec.rb +66 -0
- data/spec/nfe/services/regress/retInutNFe_spec.rb +70 -0
- data/spec/nfe/webservices/client_soap_spec.rb +32 -0
- data/spec/nfe/webservices/fixtures/nfe_status_servico2.wsdl +62 -0
- data/spec/nfe/webservices/fixtures/retConsCad.xml +1 -0
- data/spec/nfe/webservices/fixtures/retConsSitNFe.xml +1 -0
- data/spec/nfe/webservices/fixtures/retConsStatServ.xml +1 -0
- data/spec/nfe/webservices/fixtures/retEnvEventoCancNFe.xml +1 -0
- data/spec/nfe/webservices/fixtures/retEnviNFe.xml +1 -0
- data/spec/nfe/webservices/fixtures/retInutNFe.xml +1 -0
- data/spec/nfe/webservices/sender_spec.rb +65 -0
- data/spec/nfe/webservices/wsinfo/consult_emitter_spec.rb +37 -0
- data/spec/nfe/webservices/wsinfo/event_spec.rb +50 -0
- data/spec/nfe/webservices/wsinfo/factory_spec.rb +50 -0
- data/spec/nfe/webservices/wsinfo/nfe_disenable_spec.rb +37 -0
- data/spec/nfe/webservices/wsinfo/nfe_send_spec.rb +37 -0
- data/spec/nfe/webservices/wsinfo/nfe_situation_spec.rb +37 -0
- data/spec/nfe/webservices/wsinfo/production/am_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/production/ba_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/production/ce_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/production/go_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/production/mg_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/production/ms_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/production/mt_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/production/pe_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/production/pr_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/production/rs_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/production/sp_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/production/svan_spec.rb +26 -0
- data/spec/nfe/webservices/wsinfo/production/svrs_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/service_status_spec.rb +37 -0
- data/spec/nfe/webservices/wsinfo/shared_examples_for_wsdl.rb +39 -0
- data/spec/nfe/webservices/wsinfo/test/am_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/test/ba_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/test/ce_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/test/go_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/test/mg_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/test/ms_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/test/mt_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/test/pe_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/test/pr_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/test/rs_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/test/sp_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/test/svan_spec.rb +26 -0
- data/spec/nfe/webservices/wsinfo/test/svrs_spec.rb +21 -0
- data/spec/nfe/webservices/wsinfo/wsdl_finder_spec.rb +56 -0
- data/spec/spec_helper.rb +33 -0
- data/spec/support/utilities.rb +3 -0
- data/spec/xmldsig/canonicalizer_spec.rb +43 -0
- data/spec/xmldsig/enveloped_signature_spec.rb +19 -0
- data/spec/xmldsig/fixtures/certificate.cer +16 -0
- data/spec/xmldsig/fixtures/certificate2.cer +16 -0
- data/spec/xmldsig/fixtures/key.pem +15 -0
- data/spec/xmldsig/fixtures/signed.xml +23 -0
- data/spec/xmldsig/fixtures/unsigned.xml +26 -0
- data/spec/xmldsig/fixtures/unsigned_multiple_references.xml +43 -0
- data/spec/xmldsig/fixtures/unsigned_nested_signature.xml +50 -0
- data/spec/xmldsig/reference_spec.rb +62 -0
- data/spec/xmldsig/signature_spec.rb +119 -0
- data/spec/xmldsig/signed_document_spec.rb +97 -0
- metadata +1201 -0
@@ -0,0 +1,98 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- PL_006f versao com correcoes no xServ para tornar a literal STATUS obrigatoria 21/05/2010 -->
|
3
|
+
<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">
|
4
|
+
<xs:include schemaLocation="tiposBasico_v3.10.xsd"/>
|
5
|
+
<xs:complexType name="TConsStatServ">
|
6
|
+
<xs:annotation>
|
7
|
+
<xs:documentation>Tipo Pedido de Consulta do Status do Serviço</xs:documentation>
|
8
|
+
</xs:annotation>
|
9
|
+
<xs:sequence>
|
10
|
+
<xs:element name="tpAmb" type="TAmb">
|
11
|
+
<xs:annotation>
|
12
|
+
<xs:documentation>Identificação do Ambiente:
|
13
|
+
1 - Produção
|
14
|
+
2 - Homologação</xs:documentation>
|
15
|
+
</xs:annotation>
|
16
|
+
</xs:element>
|
17
|
+
<xs:element name="cUF" type="TCodUfIBGE">
|
18
|
+
<xs:annotation>
|
19
|
+
<xs:documentation>Sigla da UF consultada</xs:documentation>
|
20
|
+
</xs:annotation>
|
21
|
+
</xs:element>
|
22
|
+
<xs:element name="xServ">
|
23
|
+
<xs:annotation>
|
24
|
+
<xs:documentation>Serviço Solicitado</xs:documentation>
|
25
|
+
</xs:annotation>
|
26
|
+
<xs:simpleType>
|
27
|
+
<xs:restriction base="TServ">
|
28
|
+
<xs:enumeration value="STATUS"/>
|
29
|
+
</xs:restriction>
|
30
|
+
</xs:simpleType>
|
31
|
+
</xs:element>
|
32
|
+
</xs:sequence>
|
33
|
+
<xs:attribute name="versao" type="TVerConsStatServ" use="required"/>
|
34
|
+
</xs:complexType>
|
35
|
+
<xs:complexType name="TRetConsStatServ">
|
36
|
+
<xs:annotation>
|
37
|
+
<xs:documentation>Tipo Resultado da Consulta do Status do Serviço</xs:documentation>
|
38
|
+
</xs:annotation>
|
39
|
+
<xs:sequence>
|
40
|
+
<xs:element name="tpAmb" type="TAmb">
|
41
|
+
<xs:annotation>
|
42
|
+
<xs:documentation>Identificação do Ambiente:
|
43
|
+
1 - Produção
|
44
|
+
2 - Homologação</xs:documentation>
|
45
|
+
</xs:annotation>
|
46
|
+
</xs:element>
|
47
|
+
<xs:element name="verAplic" type="TVerAplic">
|
48
|
+
<xs:annotation>
|
49
|
+
<xs:documentation>Versão do Aplicativo que processou a NF-e</xs:documentation>
|
50
|
+
</xs:annotation>
|
51
|
+
</xs:element>
|
52
|
+
<xs:element name="cStat" type="TStat">
|
53
|
+
<xs:annotation>
|
54
|
+
<xs:documentation>Código do status da mensagem enviada.</xs:documentation>
|
55
|
+
</xs:annotation>
|
56
|
+
</xs:element>
|
57
|
+
<xs:element name="xMotivo" type="TMotivo">
|
58
|
+
<xs:annotation>
|
59
|
+
<xs:documentation>Descrição literal do status do serviço solicitado.</xs:documentation>
|
60
|
+
</xs:annotation>
|
61
|
+
</xs:element>
|
62
|
+
<xs:element name="cUF" type="TCodUfIBGE">
|
63
|
+
<xs:annotation>
|
64
|
+
<xs:documentation>Código da UF responsável pelo serviço</xs:documentation>
|
65
|
+
</xs:annotation>
|
66
|
+
</xs:element>
|
67
|
+
<xs:element name="dhRecbto" type="TDateTimeUTC">
|
68
|
+
<xs:annotation>
|
69
|
+
<xs:documentation>Data e hora do recebimento da consulta no formato AAAA-MM-DDTHH:MM:SSTZD</xs:documentation>
|
70
|
+
</xs:annotation>
|
71
|
+
</xs:element>
|
72
|
+
<xs:element name="tMed" type="TMed" minOccurs="0">
|
73
|
+
<xs:annotation>
|
74
|
+
<xs:documentation>Tempo médio de resposta do serviço (em segundos) dos últimos 5 minutos</xs:documentation>
|
75
|
+
</xs:annotation>
|
76
|
+
</xs:element>
|
77
|
+
<xs:element name="dhRetorno" type="TDateTimeUTC" minOccurs="0">
|
78
|
+
<xs:annotation>
|
79
|
+
<xs:documentation>AAAA-MM-DDTHH:MM:SSDeve ser preenchida com data e hora previstas para o retorno dos serviços prestados.</xs:documentation>
|
80
|
+
</xs:annotation>
|
81
|
+
</xs:element>
|
82
|
+
<xs:element name="xObs" type="TMotivo" minOccurs="0">
|
83
|
+
<xs:annotation>
|
84
|
+
<xs:documentation>Campo observação utilizado para incluir informações ao contribuinte</xs:documentation>
|
85
|
+
</xs:annotation>
|
86
|
+
</xs:element>
|
87
|
+
</xs:sequence>
|
88
|
+
<xs:attribute name="versao" type="TVerConsStatServ" use="required"/>
|
89
|
+
</xs:complexType>
|
90
|
+
<xs:simpleType name="TVerConsStatServ">
|
91
|
+
<xs:annotation>
|
92
|
+
<xs:documentation>Tipo versão do leiuate da Consulta Status do Serviço 3.10</xs:documentation>
|
93
|
+
</xs:annotation>
|
94
|
+
<xs:restriction base="xs:token">
|
95
|
+
<xs:pattern value="3\.10"/>
|
96
|
+
</xs:restriction>
|
97
|
+
</xs:simpleType>
|
98
|
+
</xs:schema>
|
@@ -0,0 +1,404 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- PL_006f versao com correcoes no xServ para tornar a literal CONS-CAD obrigatoria 21/05/2010 -->
|
3
|
+
<!-- PL_006c versao com correcoes 24/12/2009 -->
|
4
|
+
<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">
|
5
|
+
<xs:include schemaLocation="tiposBasico_v1.03.xsd"/>
|
6
|
+
<xs:complexType name="TConsCad">
|
7
|
+
<xs:annotation>
|
8
|
+
<xs:documentation>Tipo Pedido de Consulta de cadastro de contribuintes</xs:documentation>
|
9
|
+
</xs:annotation>
|
10
|
+
<xs:sequence>
|
11
|
+
<xs:element name="infCons">
|
12
|
+
<xs:annotation>
|
13
|
+
<xs:documentation>Dados do Pedido de Consulta de cadastro de contribuintes</xs:documentation>
|
14
|
+
</xs:annotation>
|
15
|
+
<xs:complexType>
|
16
|
+
<xs:sequence>
|
17
|
+
<xs:element name="xServ">
|
18
|
+
<xs:annotation>
|
19
|
+
<xs:documentation>Serviço Solicitado</xs:documentation>
|
20
|
+
</xs:annotation>
|
21
|
+
<xs:simpleType>
|
22
|
+
<xs:restriction base="TServ">
|
23
|
+
<xs:enumeration value="CONS-CAD"/>
|
24
|
+
</xs:restriction>
|
25
|
+
</xs:simpleType>
|
26
|
+
</xs:element>
|
27
|
+
<xs:element name="UF" type="TUfCons">
|
28
|
+
<xs:annotation>
|
29
|
+
<xs:documentation>sigla da UF consultada, utilizar SU para SUFRAMA</xs:documentation>
|
30
|
+
</xs:annotation>
|
31
|
+
</xs:element>
|
32
|
+
<xs:choice>
|
33
|
+
<xs:annotation>
|
34
|
+
<xs:documentation>argumento de pesquisa</xs:documentation>
|
35
|
+
</xs:annotation>
|
36
|
+
<xs:element name="IE" type="TIe">
|
37
|
+
<xs:annotation>
|
38
|
+
<xs:documentation>Inscrição Estadual do contribuinte </xs:documentation>
|
39
|
+
</xs:annotation>
|
40
|
+
</xs:element>
|
41
|
+
<xs:element name="CNPJ" type="TCnpjVar">
|
42
|
+
<xs:annotation>
|
43
|
+
<xs:documentation>CNPJ do contribuinte</xs:documentation>
|
44
|
+
</xs:annotation>
|
45
|
+
</xs:element>
|
46
|
+
<xs:element name="CPF" type="TCpfVar">
|
47
|
+
<xs:annotation>
|
48
|
+
<xs:documentation>CPF do contribuinte</xs:documentation>
|
49
|
+
</xs:annotation>
|
50
|
+
</xs:element>
|
51
|
+
</xs:choice>
|
52
|
+
</xs:sequence>
|
53
|
+
</xs:complexType>
|
54
|
+
</xs:element>
|
55
|
+
</xs:sequence>
|
56
|
+
<xs:attribute name="versao" type="TVerConsCad" use="required"/>
|
57
|
+
</xs:complexType>
|
58
|
+
<xs:complexType name="TRetConsCad">
|
59
|
+
<xs:annotation>
|
60
|
+
<xs:documentation>Tipo Retorno Pedido de Consulta de cadastro de contribuintes</xs:documentation>
|
61
|
+
</xs:annotation>
|
62
|
+
<xs:sequence>
|
63
|
+
<xs:element name="infCons">
|
64
|
+
<xs:annotation>
|
65
|
+
<xs:documentation>Dados do Resultado doDados do Pedido de Consulta de cadastro de contribuintes</xs:documentation>
|
66
|
+
</xs:annotation>
|
67
|
+
<xs:complexType>
|
68
|
+
<xs:sequence>
|
69
|
+
<xs:element name="verAplic" type="TVerAplic">
|
70
|
+
<xs:annotation>
|
71
|
+
<xs:documentation>Versão do Aplicativo que processou o pedido de consulta de cadastro</xs:documentation>
|
72
|
+
</xs:annotation>
|
73
|
+
</xs:element>
|
74
|
+
<xs:element name="cStat" type="TStat">
|
75
|
+
<xs:annotation>
|
76
|
+
<xs:documentation>Código do status da mensagem enviada.</xs:documentation>
|
77
|
+
</xs:annotation>
|
78
|
+
</xs:element>
|
79
|
+
<xs:element name="xMotivo" type="TMotivo">
|
80
|
+
<xs:annotation>
|
81
|
+
<xs:documentation>Descrição literal do status do serviço solicitado.</xs:documentation>
|
82
|
+
</xs:annotation>
|
83
|
+
</xs:element>
|
84
|
+
<xs:element name="UF" type="TUfCons">
|
85
|
+
<xs:annotation>
|
86
|
+
<xs:documentation>sigla da UF consultada, utilizar SU para SUFRAMA</xs:documentation>
|
87
|
+
</xs:annotation>
|
88
|
+
</xs:element>
|
89
|
+
<xs:choice>
|
90
|
+
<xs:annotation>
|
91
|
+
<xs:documentation>argumento de pesquisa</xs:documentation>
|
92
|
+
</xs:annotation>
|
93
|
+
<xs:element name="IE" type="TIe">
|
94
|
+
<xs:annotation>
|
95
|
+
<xs:documentation>Inscrição Estadual do contribuinte </xs:documentation>
|
96
|
+
</xs:annotation>
|
97
|
+
</xs:element>
|
98
|
+
<xs:element name="CNPJ" type="TCnpjVar">
|
99
|
+
<xs:annotation>
|
100
|
+
<xs:documentation>CNPJ do contribuinte</xs:documentation>
|
101
|
+
</xs:annotation>
|
102
|
+
</xs:element>
|
103
|
+
<xs:element name="CPF" type="TCpfVar">
|
104
|
+
<xs:annotation>
|
105
|
+
<xs:documentation>CPF do contribuinte</xs:documentation>
|
106
|
+
</xs:annotation>
|
107
|
+
</xs:element>
|
108
|
+
</xs:choice>
|
109
|
+
<xs:element name="dhCons" type="xs:dateTime">
|
110
|
+
<xs:annotation>
|
111
|
+
<xs:documentation>Data da Consulta</xs:documentation>
|
112
|
+
</xs:annotation>
|
113
|
+
</xs:element>
|
114
|
+
<xs:element name="cUF" type="TCodUfIBGE">
|
115
|
+
<xs:annotation>
|
116
|
+
<xs:documentation>código da UF de atendimento</xs:documentation>
|
117
|
+
</xs:annotation>
|
118
|
+
</xs:element>
|
119
|
+
<xs:element name="infCad" minOccurs="0" maxOccurs="unbounded">
|
120
|
+
<xs:annotation>
|
121
|
+
<xs:documentation>Informações cadastrais do contribuinte consultado</xs:documentation>
|
122
|
+
</xs:annotation>
|
123
|
+
<xs:complexType>
|
124
|
+
<xs:sequence>
|
125
|
+
<xs:element name="IE" type="TIe">
|
126
|
+
<xs:annotation>
|
127
|
+
<xs:documentation>Número da Inscrição Estadual do contribuinte</xs:documentation>
|
128
|
+
</xs:annotation>
|
129
|
+
</xs:element>
|
130
|
+
<xs:choice>
|
131
|
+
<xs:element name="CNPJ" type="TCnpjVar">
|
132
|
+
<xs:annotation>
|
133
|
+
<xs:documentation>Número do CNPJ do contribuinte</xs:documentation>
|
134
|
+
</xs:annotation>
|
135
|
+
</xs:element>
|
136
|
+
<xs:element name="CPF" type="TCpfVar">
|
137
|
+
<xs:annotation>
|
138
|
+
<xs:documentation>Número do CPF do contribuinte</xs:documentation>
|
139
|
+
</xs:annotation>
|
140
|
+
</xs:element>
|
141
|
+
</xs:choice>
|
142
|
+
<xs:element name="UF" type="TUf">
|
143
|
+
<xs:annotation>
|
144
|
+
<xs:documentation>Sigla da UF de localização do contribuinte. Em algumas situações, a UF de localização pode ser diferente da UF consultada. Ex. IE de Substituto Tributário.</xs:documentation>
|
145
|
+
</xs:annotation>
|
146
|
+
</xs:element>
|
147
|
+
<xs:element name="cSit">
|
148
|
+
<xs:annotation>
|
149
|
+
<xs:documentation>Situação cadastral do contribuinte:
|
150
|
+
0 - não habilitado
|
151
|
+
1 - habilitado</xs:documentation>
|
152
|
+
</xs:annotation>
|
153
|
+
<xs:simpleType>
|
154
|
+
<xs:restriction base="xs:token">
|
155
|
+
<xs:enumeration value="0"/>
|
156
|
+
<xs:enumeration value="1"/>
|
157
|
+
</xs:restriction>
|
158
|
+
</xs:simpleType>
|
159
|
+
</xs:element>
|
160
|
+
<xs:element name="indCredNFe">
|
161
|
+
<xs:annotation>
|
162
|
+
<xs:documentation>Indicador de contribuinte credenciado a emitir NF-e.
|
163
|
+
0 - Não credenciado para emissão da NF-e;
|
164
|
+
1 - Credenciado;
|
165
|
+
2 - Credenciado com obrigatoriedade para todas operações;
|
166
|
+
3 - Credenciado com obrigatoriedade parcial;
|
167
|
+
4 – a SEFAZ não fornece a informação.
|
168
|
+
Este indicador significa apenas que o contribuinte é credenciado para emitir NF-e na SEFAZ consultada.</xs:documentation>
|
169
|
+
</xs:annotation>
|
170
|
+
<xs:simpleType>
|
171
|
+
<xs:restriction base="xs:string">
|
172
|
+
<xs:whiteSpace value="preserve"/>
|
173
|
+
<xs:enumeration value="0"/>
|
174
|
+
<xs:enumeration value="1"/>
|
175
|
+
<xs:enumeration value="2"/>
|
176
|
+
<xs:enumeration value="3"/>
|
177
|
+
<xs:enumeration value="4"/>
|
178
|
+
</xs:restriction>
|
179
|
+
</xs:simpleType>
|
180
|
+
</xs:element>
|
181
|
+
<xs:element name="indCredCTe">
|
182
|
+
<xs:annotation>
|
183
|
+
<xs:documentation>Indicador de contribuinte credenciado a emitir CT-e.
|
184
|
+
0 - Não credenciado para emissão da CT-e;
|
185
|
+
1 - Credenciado;
|
186
|
+
2 - Credenciado com obrigatoriedade para todas operações;
|
187
|
+
3 - Credenciado com obrigatoriedade parcial;
|
188
|
+
4 – a SEFAZ não fornece a informação.
|
189
|
+
Este indicador significa apenas que o contribuinte é credenciado para emitir CT-e na SEFAZ consultada.</xs:documentation>
|
190
|
+
</xs:annotation>
|
191
|
+
<xs:simpleType>
|
192
|
+
<xs:restriction base="xs:string">
|
193
|
+
<xs:whiteSpace value="preserve"/>
|
194
|
+
<xs:enumeration value="0"/>
|
195
|
+
<xs:enumeration value="1"/>
|
196
|
+
<xs:enumeration value="2"/>
|
197
|
+
<xs:enumeration value="3"/>
|
198
|
+
<xs:enumeration value="4"/>
|
199
|
+
</xs:restriction>
|
200
|
+
</xs:simpleType>
|
201
|
+
</xs:element>
|
202
|
+
<xs:element name="xNome">
|
203
|
+
<xs:annotation>
|
204
|
+
<xs:documentation>Razão Social ou nome do contribuinte</xs:documentation>
|
205
|
+
</xs:annotation>
|
206
|
+
<xs:simpleType>
|
207
|
+
<xs:restriction base="TString">
|
208
|
+
<xs:minLength value="1"/>
|
209
|
+
<xs:maxLength value="60"/>
|
210
|
+
</xs:restriction>
|
211
|
+
</xs:simpleType>
|
212
|
+
</xs:element>
|
213
|
+
<xs:element name="xFant" minOccurs="0">
|
214
|
+
<xs:annotation>
|
215
|
+
<xs:documentation>Razão Social ou nome do contribuinte</xs:documentation>
|
216
|
+
</xs:annotation>
|
217
|
+
<xs:simpleType>
|
218
|
+
<xs:restriction base="TString">
|
219
|
+
<xs:minLength value="1"/>
|
220
|
+
<xs:maxLength value="60"/>
|
221
|
+
</xs:restriction>
|
222
|
+
</xs:simpleType>
|
223
|
+
</xs:element>
|
224
|
+
<xs:element name="xRegApur" minOccurs="0">
|
225
|
+
<xs:annotation>
|
226
|
+
<xs:documentation>Regime de Apuração do ICMS</xs:documentation>
|
227
|
+
</xs:annotation>
|
228
|
+
<xs:simpleType>
|
229
|
+
<xs:restriction base="xs:token">
|
230
|
+
<xs:minLength value="1"/>
|
231
|
+
<xs:maxLength value="60"/>
|
232
|
+
</xs:restriction>
|
233
|
+
</xs:simpleType>
|
234
|
+
</xs:element>
|
235
|
+
<xs:element name="CNAE" minOccurs="0">
|
236
|
+
<xs:annotation>
|
237
|
+
<xs:documentation>CNAE Fiscal do contribuinte</xs:documentation>
|
238
|
+
</xs:annotation>
|
239
|
+
<xs:simpleType>
|
240
|
+
<xs:restriction base="xs:token">
|
241
|
+
<xs:pattern value="[0-9]{6,7}"/>
|
242
|
+
</xs:restriction>
|
243
|
+
</xs:simpleType>
|
244
|
+
</xs:element>
|
245
|
+
<xs:element name="dIniAtiv" type="xs:date" minOccurs="0">
|
246
|
+
<xs:annotation>
|
247
|
+
<xs:documentation>Data de início de atividades do contribuinte</xs:documentation>
|
248
|
+
</xs:annotation>
|
249
|
+
</xs:element>
|
250
|
+
<xs:element name="dUltSit" type="xs:date" minOccurs="0">
|
251
|
+
<xs:annotation>
|
252
|
+
<xs:documentation>Data da última modificação da situação cadastral do contribuinte.</xs:documentation>
|
253
|
+
</xs:annotation>
|
254
|
+
</xs:element>
|
255
|
+
<xs:element name="dBaixa" type="xs:date" minOccurs="0">
|
256
|
+
<xs:annotation>
|
257
|
+
<xs:documentation>Data de ocorrência da baixa do contribuinte.</xs:documentation>
|
258
|
+
</xs:annotation>
|
259
|
+
</xs:element>
|
260
|
+
<xs:element name="IEUnica" type="TIe" minOccurs="0">
|
261
|
+
<xs:annotation>
|
262
|
+
<xs:documentation>Inscrição Estadual Única</xs:documentation>
|
263
|
+
</xs:annotation>
|
264
|
+
</xs:element>
|
265
|
+
<xs:element name="IEAtual" type="TIe" minOccurs="0">
|
266
|
+
<xs:annotation>
|
267
|
+
<xs:documentation>Inscrição Estadual atual</xs:documentation>
|
268
|
+
</xs:annotation>
|
269
|
+
</xs:element>
|
270
|
+
<xs:element name="ender" type="TEndereco" minOccurs="0">
|
271
|
+
<xs:annotation>
|
272
|
+
<xs:documentation>Endereço</xs:documentation>
|
273
|
+
</xs:annotation>
|
274
|
+
</xs:element>
|
275
|
+
</xs:sequence>
|
276
|
+
</xs:complexType>
|
277
|
+
</xs:element>
|
278
|
+
</xs:sequence>
|
279
|
+
</xs:complexType>
|
280
|
+
</xs:element>
|
281
|
+
</xs:sequence>
|
282
|
+
<xs:attribute name="versao" type="TVerConsCad" use="required"/>
|
283
|
+
</xs:complexType>
|
284
|
+
<xs:complexType name="TEndereco">
|
285
|
+
<xs:annotation>
|
286
|
+
<xs:documentation>Tipo Dados do Endereço</xs:documentation>
|
287
|
+
</xs:annotation>
|
288
|
+
<xs:sequence>
|
289
|
+
<xs:element name="xLgr" minOccurs="0">
|
290
|
+
<xs:annotation>
|
291
|
+
<xs:documentation>Logradouro</xs:documentation>
|
292
|
+
</xs:annotation>
|
293
|
+
<xs:simpleType>
|
294
|
+
<xs:restriction base="TString">
|
295
|
+
<xs:minLength value="1"/>
|
296
|
+
<xs:maxLength value="255"/>
|
297
|
+
</xs:restriction>
|
298
|
+
</xs:simpleType>
|
299
|
+
</xs:element>
|
300
|
+
<xs:element name="nro" minOccurs="0">
|
301
|
+
<xs:annotation>
|
302
|
+
<xs:documentation>Número</xs:documentation>
|
303
|
+
</xs:annotation>
|
304
|
+
<xs:simpleType>
|
305
|
+
<xs:restriction base="TString">
|
306
|
+
<xs:maxLength value="60"/>
|
307
|
+
<xs:minLength value="1"/>
|
308
|
+
</xs:restriction>
|
309
|
+
</xs:simpleType>
|
310
|
+
</xs:element>
|
311
|
+
<xs:element name="xCpl" minOccurs="0">
|
312
|
+
<xs:annotation>
|
313
|
+
<xs:documentation>Complemento</xs:documentation>
|
314
|
+
</xs:annotation>
|
315
|
+
<xs:simpleType>
|
316
|
+
<xs:restriction base="TString">
|
317
|
+
<xs:maxLength value="60"/>
|
318
|
+
<xs:minLength value="1"/>
|
319
|
+
</xs:restriction>
|
320
|
+
</xs:simpleType>
|
321
|
+
</xs:element>
|
322
|
+
<xs:element name="xBairro" minOccurs="0">
|
323
|
+
<xs:annotation>
|
324
|
+
<xs:documentation>Bairro</xs:documentation>
|
325
|
+
</xs:annotation>
|
326
|
+
<xs:simpleType>
|
327
|
+
<xs:restriction base="TString">
|
328
|
+
<xs:maxLength value="60"/>
|
329
|
+
<xs:minLength value="1"/>
|
330
|
+
</xs:restriction>
|
331
|
+
</xs:simpleType>
|
332
|
+
</xs:element>
|
333
|
+
<xs:element name="cMun" type="TCodMunIBGE" minOccurs="0">
|
334
|
+
<xs:annotation>
|
335
|
+
<xs:documentation>Código do município (utilizar a tabela do IBGE), informar 9999999 para operações com o exterior.</xs:documentation>
|
336
|
+
</xs:annotation>
|
337
|
+
</xs:element>
|
338
|
+
<xs:element name="xMun" minOccurs="0">
|
339
|
+
<xs:annotation>
|
340
|
+
<xs:documentation>Nome do município</xs:documentation>
|
341
|
+
</xs:annotation>
|
342
|
+
<xs:simpleType>
|
343
|
+
<xs:restriction base="TString">
|
344
|
+
<xs:maxLength value="60"/>
|
345
|
+
<xs:minLength value="1"/>
|
346
|
+
</xs:restriction>
|
347
|
+
</xs:simpleType>
|
348
|
+
</xs:element>
|
349
|
+
<xs:element name="CEP" minOccurs="0">
|
350
|
+
<xs:annotation>
|
351
|
+
<xs:documentation>CEP</xs:documentation>
|
352
|
+
</xs:annotation>
|
353
|
+
<xs:simpleType>
|
354
|
+
<xs:restriction base="xs:token">
|
355
|
+
<xs:pattern value="[0-9]{7,8}"/>
|
356
|
+
</xs:restriction>
|
357
|
+
</xs:simpleType>
|
358
|
+
</xs:element>
|
359
|
+
</xs:sequence>
|
360
|
+
</xs:complexType>
|
361
|
+
<xs:simpleType name="TUfCons">
|
362
|
+
<xs:annotation>
|
363
|
+
<xs:documentation>Tipo Sigla da UF consultada</xs:documentation>
|
364
|
+
</xs:annotation>
|
365
|
+
<xs:restriction base="xs:token">
|
366
|
+
<xs:enumeration value="AC"/>
|
367
|
+
<xs:enumeration value="AL"/>
|
368
|
+
<xs:enumeration value="AM"/>
|
369
|
+
<xs:enumeration value="AP"/>
|
370
|
+
<xs:enumeration value="BA"/>
|
371
|
+
<xs:enumeration value="CE"/>
|
372
|
+
<xs:enumeration value="DF"/>
|
373
|
+
<xs:enumeration value="ES"/>
|
374
|
+
<xs:enumeration value="GO"/>
|
375
|
+
<xs:enumeration value="MA"/>
|
376
|
+
<xs:enumeration value="MG"/>
|
377
|
+
<xs:enumeration value="MS"/>
|
378
|
+
<xs:enumeration value="MT"/>
|
379
|
+
<xs:enumeration value="PA"/>
|
380
|
+
<xs:enumeration value="PB"/>
|
381
|
+
<xs:enumeration value="PE"/>
|
382
|
+
<xs:enumeration value="PI"/>
|
383
|
+
<xs:enumeration value="PR"/>
|
384
|
+
<xs:enumeration value="RJ"/>
|
385
|
+
<xs:enumeration value="RN"/>
|
386
|
+
<xs:enumeration value="RO"/>
|
387
|
+
<xs:enumeration value="RR"/>
|
388
|
+
<xs:enumeration value="RS"/>
|
389
|
+
<xs:enumeration value="SC"/>
|
390
|
+
<xs:enumeration value="SE"/>
|
391
|
+
<xs:enumeration value="SP"/>
|
392
|
+
<xs:enumeration value="TO"/>
|
393
|
+
<xs:enumeration value="SU"/>
|
394
|
+
</xs:restriction>
|
395
|
+
</xs:simpleType>
|
396
|
+
<xs:simpleType name="TVerConsCad">
|
397
|
+
<xs:annotation>
|
398
|
+
<xs:documentation>Tipo Versão do Leiaute da Consulta Cadastro 2.00</xs:documentation>
|
399
|
+
</xs:annotation>
|
400
|
+
<xs:restriction base="xs:token">
|
401
|
+
<xs:pattern value="2\.00"/>
|
402
|
+
</xs:restriction>
|
403
|
+
</xs:simpleType>
|
404
|
+
</xs:schema>
|