br_nfe 2.2.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -0
- data/.travis.yml +0 -0
- data/Gemfile +0 -0
- data/Gemfile.lock +4 -4
- data/LICENSE +0 -0
- data/README.markdown +0 -0
- data/Rakefile +0 -0
- data/br_nfe.gemspec +2 -2
- data/lib/br_nfe.rb +22 -20
- data/lib/br_nfe/active_model/associations.rb +0 -0
- data/lib/br_nfe/active_model/has_many.rb +0 -0
- data/lib/br_nfe/active_model/has_one.rb +0 -0
- data/lib/br_nfe/active_model_base.rb +0 -0
- data/lib/br_nfe/association/have_address.rb +0 -0
- data/lib/br_nfe/association/have_condicao_pagamento.rb +0 -0
- data/lib/br_nfe/association/have_destinatario.rb +0 -0
- data/lib/br_nfe/association/have_emitente.rb +0 -0
- data/lib/br_nfe/base.rb +10 -22
- data/lib/br_nfe/calculos/fatores_de_multiplicacao.rb +0 -0
- data/lib/br_nfe/calculos/modulo11.rb +0 -0
- data/lib/br_nfe/calculos/modulo11_fator_de2a9.rb +0 -0
- data/lib/br_nfe/calculos/modulo11_fator_de2a9_resto_zero.rb +0 -0
- data/lib/br_nfe/condicao_pagamento.rb +0 -0
- data/lib/br_nfe/constants.rb +0 -2
- data/lib/br_nfe/endereco.rb +4 -0
- data/lib/br_nfe/helper/cpf_cnpj.rb +0 -0
- data/lib/br_nfe/helper/string_methods.rb +0 -0
- data/lib/br_nfe/person.rb +1 -0
- data/lib/br_nfe/product/destinatario.rb +3 -0
- data/lib/br_nfe/product/emitente.rb +0 -0
- data/lib/br_nfe/product/evento/base.rb +0 -0
- data/lib/br_nfe/product/evento/cancelamento.rb +0 -0
- data/lib/br_nfe/product/nf_xml_value.rb +1 -1
- data/lib/br_nfe/product/nfe/adicao_importacao.rb +0 -0
- data/lib/br_nfe/product/nfe/cobranca/duplicata.rb +0 -0
- data/lib/br_nfe/product/nfe/cobranca/fatura.rb +0 -0
- data/lib/br_nfe/product/nfe/cobranca/pagamento.rb +13 -0
- data/lib/br_nfe/product/nfe/declaracao_importacao.rb +0 -0
- data/lib/br_nfe/product/nfe/detalhe_exportacao.rb +0 -0
- data/lib/br_nfe/product/nfe/item.rb +0 -0
- data/lib/br_nfe/product/nfe/item_tax/cofins.rb +0 -0
- data/lib/br_nfe/product/nfe/item_tax/cofins_st.rb +0 -0
- data/lib/br_nfe/product/nfe/item_tax/icms.rb +0 -0
- data/lib/br_nfe/product/nfe/item_tax/icms_uf_destino.rb +0 -0
- data/lib/br_nfe/product/nfe/item_tax/importacao.rb +0 -0
- data/lib/br_nfe/product/nfe/item_tax/ipi.rb +0 -0
- data/lib/br_nfe/product/nfe/item_tax/issqn.rb +0 -0
- data/lib/br_nfe/product/nfe/item_tax/pis.rb +0 -0
- data/lib/br_nfe/product/nfe/item_tax/pis_st.rb +0 -0
- data/lib/br_nfe/product/nfe/processo_referencia.rb +0 -0
- data/lib/br_nfe/product/nfe/transporte/base.rb +0 -0
- data/lib/br_nfe/product/nfe/transporte/transportador.rb +0 -0
- data/lib/br_nfe/product/nfe/transporte/veiculo.rb +0 -0
- data/lib/br_nfe/product/nfe/transporte/volume.rb +0 -0
- data/lib/br_nfe/product/nota_fiscal.rb +5 -0
- data/lib/br_nfe/product/operation/base.rb +118 -44
- data/lib/br_nfe/product/operation/nfe_autorizacao.rb +3 -29
- data/lib/br_nfe/product/operation/nfe_consulta_protocolo.rb +2 -27
- data/lib/br_nfe/product/operation/nfe_download_nf.rb +6 -28
- data/lib/br_nfe/product/operation/nfe_inutilizacao.rb +2 -27
- data/lib/br_nfe/product/operation/nfe_recepcao_evento.rb +6 -27
- data/lib/br_nfe/product/operation/nfe_ret_autorizacao.rb +2 -27
- data/lib/br_nfe/product/operation/nfe_status_servico.rb +2 -27
- data/lib/br_nfe/product/reader/destinatario.rb +39 -0
- data/lib/br_nfe/product/reader/emitente.rb +39 -0
- data/lib/br_nfe/product/reader/endereco_retirada_entrega.rb +27 -0
- data/lib/br_nfe/product/reader/fatura.rb +41 -0
- data/lib/br_nfe/product/reader/item.rb +236 -0
- data/lib/br_nfe/product/reader/nfe.rb +200 -0
- data/lib/br_nfe/product/reader/transporte.rb +79 -0
- data/lib/br_nfe/product/response/base.rb +1 -1
- data/lib/br_nfe/product/response/build/base.rb +19 -9
- data/lib/br_nfe/product/response/build/nfe_autorizacao.rb +27 -15
- data/lib/br_nfe/product/response/build/nfe_consulta_protocolo.rb +35 -38
- data/lib/br_nfe/product/response/build/nfe_inutilizacao.rb +18 -16
- data/lib/br_nfe/product/response/build/nfe_recepcao_evento.rb +96 -0
- data/lib/br_nfe/product/response/build/nfe_ret_autorizacao.rb +11 -8
- data/lib/br_nfe/product/response/build/nfe_status_servico.rb +13 -10
- data/lib/br_nfe/product/response/event.rb +24 -3
- data/lib/br_nfe/product/response/nfe_autorizacao.rb +3 -2
- data/lib/br_nfe/product/response/nfe_consulta_protocolo.rb +1 -0
- data/lib/br_nfe/product/response/nfe_inutilizacao.rb +0 -0
- data/lib/br_nfe/product/response/nfe_recepcao_evento.rb +20 -0
- data/lib/br_nfe/product/response/nfe_ret_autorizacao.rb +0 -0
- data/lib/br_nfe/product/response/nfe_status_servico.rb +0 -0
- data/lib/br_nfe/product/xml/_signed_info_sh1.xml.slim +0 -0
- data/lib/br_nfe/product/xml/_tc_cpf_cnpj.xml.slim +0 -0
- data/lib/br_nfe/product/xml/signature_sh1.xml.slim +0 -0
- data/lib/br_nfe/product/xml/soap_env.xml.slim +1 -1
- data/lib/br_nfe/product/xml/v1_00/evento/infEventoCancelamento.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v1_00/root/NfeDownloadNf.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v1_00/root/NfeRecepcaoEvento.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/_tc_endereco.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/_tc_infNFe.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infInut.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/NFe.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/_tc_cobr.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/_tc_dest.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/_tc_det.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/_tc_emit.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/_tc_entrega.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/_tc_exporta.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/_tc_ide.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/_tc_infAdic.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/_tc_retirada.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/_tc_total.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/_tc_transp.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/_tc_imposto.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/_tc_prod.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/ICMS/_tc_ICMS00.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/ICMS/_tc_ICMS10.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/ICMS/_tc_ICMS101.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/ICMS/_tc_ICMS102.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/ICMS/_tc_ICMS20.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/ICMS/_tc_ICMS201.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/ICMS/_tc_ICMS202.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/ICMS/_tc_ICMS30.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/ICMS/_tc_ICMS40.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/ICMS/_tc_ICMS500.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/ICMS/_tc_ICMS51.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/ICMS/_tc_ICMS60.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/ICMS/_tc_ICMS70.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/ICMS/_tc_ICMS90.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/ICMS/_tc_ICMS900.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/_tc_COFINS.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/_tc_COFINS_ST.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/_tc_ICMS.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/_tc_II.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/_tc_IPI.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/_tc_PIS.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/imposto/_tc_PIS_ST.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/det/prod/_tc_di.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/transp/_tc_retTransp.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/transp/_tc_transporta.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/infNFe/transp/_tc_vol.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/root/NfeAutorizacao.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/root/NfeInutilizacao.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/root/NfeRetAutorizacao.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_00/root/NfeStatusServico.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v2_01/root/NfeConsultaProtocolo.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v3_10/_tc_infNFe.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v3_10/infNFe/_tc_dest.xml.slim +1 -1
- data/lib/br_nfe/product/xml/v3_10/infNFe/_tc_det.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v3_10/infNFe/_tc_exporta.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v3_10/infNFe/_tc_ide.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v3_10/infNFe/_tc_pag.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v3_10/infNFe/_tc_total.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v3_10/infNFe/det/_tc_imposto.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v3_10/infNFe/det/_tc_prod.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v3_10/infNFe/det/imposto/ICMS/_tc_ICMS20.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v3_10/infNFe/det/imposto/ICMS/_tc_ICMS30.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v3_10/infNFe/det/imposto/ICMS/_tc_ICMS40.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v3_10/infNFe/det/imposto/ICMS/_tc_ICMS51.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v3_10/infNFe/det/imposto/ICMS/_tc_ICMS70.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v3_10/infNFe/det/imposto/ICMS/_tc_ICMS90.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v3_10/infNFe/det/imposto/_tc_ICMSUFDest.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v3_10/infNFe/det/imposto/_tc_ISSQN.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v3_10/infNFe/det/prod/_tc_det_export.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v3_10/infNFe/det/prod/_tc_di.xml.slim +0 -0
- data/lib/br_nfe/product/xml/v3_10/root/NfeAutorizacao.xml.slim +0 -0
- data/lib/br_nfe/service/association/have_intermediario.rb +0 -0
- data/lib/br_nfe/service/association/have_rps.rb +0 -0
- data/lib/br_nfe/service/base.rb +0 -0
- data/lib/br_nfe/service/betha/base.rb +0 -0
- data/lib/br_nfe/service/betha/v1/cancela_nfse.rb +1 -1
- data/lib/br_nfe/service/betha/v1/consulta_lote_rps.rb +1 -1
- data/lib/br_nfe/service/betha/v1/consulta_nfs_por_rps.rb +1 -1
- data/lib/br_nfe/service/betha/v1/consulta_nfse.rb +1 -1
- data/lib/br_nfe/service/betha/v1/consulta_situacao_lote_rps.rb +1 -1
- data/lib/br_nfe/service/betha/v1/gateway.rb +0 -0
- data/lib/br_nfe/service/betha/v1/recepcao_lote_rps.rb +1 -1
- data/lib/br_nfe/service/betha/v1/xml/_tc_identificacao_prestador.xml.slim +0 -0
- data/lib/br_nfe/service/betha/v1/xml/_tc_pedido_cancelamento.xml.slim +0 -0
- data/lib/br_nfe/service/concerns/rules/cancelamento_nfs.rb +0 -0
- data/lib/br_nfe/service/concerns/rules/consulta_nfs_por_rps.rb +0 -0
- data/lib/br_nfe/service/concerns/rules/consulta_nfse.rb +0 -0
- data/lib/br_nfe/service/concerns/rules/recepcao_lote_rps.rb +0 -0
- data/lib/br_nfe/service/concerns/values_ts/service_v1.rb +0 -0
- data/lib/br_nfe/service/destinatario.rb +0 -0
- data/lib/br_nfe/service/emitente.rb +0 -0
- data/lib/br_nfe/service/intermediario.rb +0 -0
- data/lib/br_nfe/service/item.rb +0 -0
- data/lib/br_nfe/service/response/build/base.rb +0 -0
- data/lib/br_nfe/service/response/build/cancelamento.rb +0 -0
- data/lib/br_nfe/service/response/build/consulta_lote_rps.rb +0 -0
- data/lib/br_nfe/service/response/build/consulta_nfs_por_rps.rb +0 -0
- data/lib/br_nfe/service/response/build/consulta_nfse.rb +0 -0
- data/lib/br_nfe/service/response/build/consulta_situacao_lote_rps.rb +0 -0
- data/lib/br_nfe/service/response/build/invoice_build.rb +0 -0
- data/lib/br_nfe/service/response/build/recepcao_lote_rps.rb +0 -0
- data/lib/br_nfe/service/response/cancelamento.rb +0 -0
- data/lib/br_nfe/service/response/consulta_lote_rps.rb +0 -0
- data/lib/br_nfe/service/response/consulta_nfs_por_rps.rb +0 -0
- data/lib/br_nfe/service/response/consulta_nfse.rb +0 -0
- data/lib/br_nfe/service/response/consulta_situacao_lote_rps.rb +0 -0
- data/lib/br_nfe/service/response/default.rb +0 -0
- data/lib/br_nfe/service/response/nota_fiscal.rb +0 -0
- data/lib/br_nfe/service/response/paths/v1/tc_nfse.rb +0 -0
- data/lib/br_nfe/service/response/recepcao_lote_rps.rb +0 -0
- data/lib/br_nfe/service/rps.rb +0 -0
- data/lib/br_nfe/service/sc/florianopolis/base.rb +0 -0
- data/lib/br_nfe/service/sc/florianopolis/cancellation.rb +0 -0
- data/lib/br_nfe/service/sc/florianopolis/emission_rps.rb +0 -0
- data/lib/br_nfe/service/sc/florianopolis/xml/_address.xml.slim +0 -0
- data/lib/br_nfe/service/sc/florianopolis/xml/_contact.xml.slim +0 -0
- data/lib/br_nfe/service/sc/florianopolis/xml/_service_item.xml.slim +0 -0
- data/lib/br_nfe/service/sc/florianopolis/xml/cancellation.xml.slim +0 -0
- data/lib/br_nfe/service/sc/florianopolis/xml/inf_requisicao.xml.slim +0 -0
- data/lib/br_nfe/service/simpliss/v1/base.rb +1 -1
- data/lib/br_nfe/service/simpliss/v1/cancela_nfse.rb +0 -0
- data/lib/br_nfe/service/simpliss/v1/consulta_lote_rps.rb +0 -0
- data/lib/br_nfe/service/simpliss/v1/consulta_nfs_por_rps.rb +0 -0
- data/lib/br_nfe/service/simpliss/v1/consulta_nfse.rb +0 -0
- data/lib/br_nfe/service/simpliss/v1/consulta_situacao_lote_rps.rb +0 -0
- data/lib/br_nfe/service/simpliss/v1/recepcao_lote_rps.rb +0 -0
- data/lib/br_nfe/service/simpliss/v1/xml/_login.xml.slim +0 -0
- data/lib/br_nfe/service/simpliss/v1/xml/_tc_dados_servico.xml.slim +0 -0
- data/lib/br_nfe/service/simpliss/v1/xml/_tc_item_servico.xml.slim +0 -0
- data/lib/br_nfe/service/simpliss/v1/xml/servico_cancelar_nfse_envio.xml.slim +0 -0
- data/lib/br_nfe/service/simpliss/v1/xml/servico_consultar_lote_rps_envio.xml.slim +0 -0
- data/lib/br_nfe/service/simpliss/v1/xml/servico_consultar_nfse_envio.xml.slim +0 -0
- data/lib/br_nfe/service/simpliss/v1/xml/servico_consultar_nfse_rps_envio.xml.slim +0 -0
- data/lib/br_nfe/service/simpliss/v1/xml/servico_consultar_situacao_lote_rps_envio.xml.slim +0 -0
- data/lib/br_nfe/service/simpliss/v1/xml/servico_enviar_lote_rps_envio.xml.slim +0 -0
- data/lib/br_nfe/service/thema/v1/base.rb +0 -0
- data/lib/br_nfe/service/thema/v1/cancela_nfse.rb +1 -1
- data/lib/br_nfe/service/thema/v1/consulta_lote_rps.rb +1 -1
- data/lib/br_nfe/service/thema/v1/consulta_nfs_por_rps.rb +1 -1
- data/lib/br_nfe/service/thema/v1/consulta_nfse.rb +1 -1
- data/lib/br_nfe/service/thema/v1/consulta_situacao_lote_rps.rb +0 -0
- data/lib/br_nfe/service/thema/v1/recepcao_lote_rps.rb +1 -1
- data/lib/br_nfe/service/thema/v1/recepcao_lote_rps_limitado.rb +0 -0
- data/lib/br_nfe/service/xml/v1/_tc_contato.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/_tc_cpf_cnpj.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/_tc_dados_construcao_civil.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/_tc_dados_prestador.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/_tc_dados_servico.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/_tc_dados_tomador.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/_tc_endereco.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/_tc_identificacao_intermediario_servico.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/_tc_identificacao_nfse.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/_tc_identificacao_orgao_gerador.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/_tc_identificacao_prestador.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/_tc_identificacao_rps.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/_tc_identificacao_tomador.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/_tc_inf_pedido_cancelamento.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/_tc_inf_rps.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/_tc_lote_rps.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/_tc_pedido_cancelamento.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/_tc_rps.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/_tc_valores.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/servico_cancelar_nfse_envio.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/servico_consultar_lote_rps_envio.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/servico_consultar_nfse_envio.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/servico_consultar_nfse_rps_envio.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/servico_consultar_situacao_lote_rps_envio.xml.slim +0 -0
- data/lib/br_nfe/service/xml/v1/servico_enviar_lote_rps_envio.xml.slim +0 -0
- data/lib/br_nfe/version.rb +1 -1
- data/lib/br_nfe/xml/_signed_info_sh1.xml.slim +0 -0
- data/lib/br_nfe/xml/signature_sh1.xml.slim +0 -0
- data/lib/br_nfe/xml/soap_env.xml.slim +0 -0
- data/lib/config/locales/br_nfe/en/product/nfe/cobranca/fatura.yml +0 -0
- data/lib/config/locales/br_nfe/en/product/nfe/declaracao_importacao.yml +0 -0
- data/lib/config/locales/br_nfe/en/product/nfe/item.yml +0 -0
- data/lib/config/locales/br_nfe/en/product/nfe/item_tax/icms_uf_destino.yml +0 -0
- data/lib/config/locales/br_nfe/en/product/nfe/transporte/base.yml +0 -0
- data/lib/config/locales/br_nfe/en/product/nota_fiscal.yml +0 -0
- data/lib/config/locales/br_nfe/en/product/operation/nfe_autorizacao.yml +0 -0
- data/lib/config/locales/br_nfe/en/product/operation/nfe_recepcao_evento.yml +0 -0
- data/lib/config/locales/br_nfe/pt-BR/product/nfe/cobranca/fatura.yml +0 -0
- data/lib/config/locales/br_nfe/pt-BR/product/nfe/declaracao_importacao.yml +0 -0
- data/lib/config/locales/br_nfe/pt-BR/product/nfe/item.yml +0 -0
- data/lib/config/locales/br_nfe/pt-BR/product/nfe/item_tax/icms_uf_destino.yml +0 -0
- data/lib/config/locales/br_nfe/pt-BR/product/nfe/transporte/base.yml +0 -0
- data/lib/config/locales/br_nfe/pt-BR/product/nota_fiscal.yml +0 -0
- data/lib/config/locales/br_nfe/pt-BR/product/operation/nfe_autorizacao.yml +0 -0
- data/lib/config/locales/br_nfe/pt-BR/product/operation/nfe_recepcao_evento.yml +0 -0
- data/lib/config/settings/nfe/reader_xml_paths.yml +372 -0
- data/lib/config/settings/nfe/v3_10/operation.yml +843 -0
- data/lib/config/settings/nfe/v3_10/soap_client.yml +804 -0
- data/lib/config/settings/nfe/v3_10/xml_paths.yml +577 -0
- data/lib/config/settings/nfse.yml +3 -0
- data/test/br_nfe/association/have_address_test.rb +0 -0
- data/test/br_nfe/association/have_condicao_pagamento_test.rb +0 -0
- data/test/br_nfe/association/have_destinatario_test.rb +0 -0
- data/test/br_nfe/association/have_emitente_test.rb +0 -0
- data/test/br_nfe/base_test.rb +26 -65
- data/test/br_nfe/condicao_pagamento_test.rb +0 -0
- data/test/br_nfe/endereco_test.rb +0 -0
- data/test/br_nfe/helper/cpf_cnpj_test.rb +0 -0
- data/test/br_nfe/person_test.rb +0 -0
- data/test/br_nfe/product/destinatario_test.rb +0 -0
- data/test/br_nfe/product/emitente_test.rb +0 -0
- data/test/br_nfe/product/evento/base_test.rb +0 -0
- data/test/br_nfe/product/evento/cancelamento_test.rb +0 -0
- data/test/br_nfe/product/nfe/adicao_importacao_test.rb +0 -0
- data/test/br_nfe/product/nfe/cobranca/duplicata_test.rb +0 -0
- data/test/br_nfe/product/nfe/cobranca/fatura_test.rb +0 -0
- data/test/br_nfe/product/nfe/cobranca/pagamento_test.rb +0 -0
- data/test/br_nfe/product/nfe/declaracao_importacao_test.rb +0 -0
- data/test/br_nfe/product/nfe/detalhe_exportacao_test.rb +0 -0
- data/test/br_nfe/product/nfe/item_tax/cofins_st_test.rb +0 -0
- data/test/br_nfe/product/nfe/item_tax/cofins_test.rb +0 -0
- data/test/br_nfe/product/nfe/item_tax/icms_test.rb +0 -0
- data/test/br_nfe/product/nfe/item_tax/icms_uf_destino_test.rb +0 -0
- data/test/br_nfe/product/nfe/item_tax/importacao_test.rb +0 -0
- data/test/br_nfe/product/nfe/item_tax/ipi_test.rb +0 -0
- data/test/br_nfe/product/nfe/item_tax/issqn_test.rb +0 -0
- data/test/br_nfe/product/nfe/item_tax/pis_st_test.rb +0 -0
- data/test/br_nfe/product/nfe/item_tax/pis_test.rb +0 -0
- data/test/br_nfe/product/nfe/item_test.rb +0 -0
- data/test/br_nfe/product/nfe/processo_referencia_test.rb +0 -0
- data/test/br_nfe/product/nfe/transporte/base_test.rb +0 -0
- data/test/br_nfe/product/nfe/transporte/transportador_test.rb +0 -0
- data/test/br_nfe/product/nfe/transporte/veiculo_test.rb +0 -0
- data/test/br_nfe/product/nfe/transporte/volume_test.rb +0 -0
- data/test/br_nfe/product/nota_fiscal_test.rb +0 -0
- data/test/br_nfe/product/operation/base_test.rb +197 -175
- data/test/br_nfe/product/operation/nfe_autorizacao_test.rb +719 -282
- data/test/br_nfe/product/operation/nfe_consulta_protocolo_test.rb +745 -305
- data/test/br_nfe/product/operation/nfe_download_nf_test.rb +0 -51
- data/test/br_nfe/product/operation/nfe_inutilizacao_test.rb +505 -88
- data/test/br_nfe/product/operation/nfe_recepcao_evento_test.rb +83 -36
- data/test/br_nfe/product/operation/nfe_ret_autorizacao_test.rb +683 -244
- data/test/br_nfe/product/operation/nfe_status_servico_test.rb +515 -74
- data/test/br_nfe/product/reader/nfe_test.rb +2535 -0
- data/test/br_nfe/product/response/base_test.rb +0 -0
- data/test/br_nfe/product/response/build/base_test.rb +0 -0
- data/test/br_nfe/product/response/nfe_ret_autorizacao_test.rb +0 -0
- data/test/br_nfe/service/association/have_intermediario_test.rb +0 -0
- data/test/br_nfe/service/association/have_rps_test.rb +0 -0
- data/test/br_nfe/service/base_test.rb +1 -1
- data/test/br_nfe/service/betha/base_test.rb +0 -0
- data/test/br_nfe/service/betha/v1/cancela_nfse_test.rb +4 -4
- data/test/br_nfe/service/betha/v1/consulta_lote_rps_test.rb +4 -4
- data/test/br_nfe/service/betha/v1/consulta_nfs_por_rps_test.rb +4 -4
- data/test/br_nfe/service/betha/v1/consulta_nfse_test.rb +4 -4
- data/test/br_nfe/service/betha/v1/consulta_situacao_lote_rps_test.rb +4 -4
- data/test/br_nfe/service/betha/v1/gateway_test.rb +0 -0
- data/test/br_nfe/service/betha/v1/recepcao_lote_rps_test.rb +4 -4
- data/test/br_nfe/service/betha/v1/xsd/TiposNFe_v01.xsd +0 -0
- data/test/br_nfe/service/betha/v1/xsd/nfse_v01.xsd +0 -0
- data/test/br_nfe/service/betha/v1/xsd/servico_cancelar_nfse_envio_v01.xsd +0 -0
- data/test/br_nfe/service/betha/v1/xsd/servico_consultar_lote_rps_envio_v01.xsd +0 -0
- data/test/br_nfe/service/betha/v1/xsd/servico_consultar_nfse_envio_v01.xsd +0 -0
- data/test/br_nfe/service/betha/v1/xsd/servico_consultar_nfse_rps_envio_v01.xsd +0 -0
- data/test/br_nfe/service/betha/v1/xsd/servico_consultar_situacao_lote_rps_envio_v01.xsd +0 -0
- data/test/br_nfe/service/betha/v1/xsd/servico_enviar_lote_rps_envio_v01.xsd +0 -0
- data/test/br_nfe/service/betha/v1/xsd/xmldsig-core-schema.xsd +0 -0
- data/test/br_nfe/service/betha/v1/xsd/xmldsig-core-schema_v01.xsd +0 -0
- data/test/br_nfe/service/concerns/rules/cancelamento_nfs_test.rb +0 -0
- data/test/br_nfe/service/concerns/rules/consulta_nfs_por_rps_test.rb +0 -0
- data/test/br_nfe/service/concerns/rules/consulta_nfse_test.rb +0 -0
- data/test/br_nfe/service/concerns/rules/recepcao_lote_rps_test.rb +0 -0
- data/test/br_nfe/service/concerns/values_ts/service_v1_test.rb +0 -0
- data/test/br_nfe/service/destinatario_test.rb +0 -0
- data/test/br_nfe/service/emitente_test.rb +0 -0
- data/test/br_nfe/service/intermediario_test.rb +0 -0
- data/test/br_nfe/service/item_test.rb +0 -0
- data/test/br_nfe/service/response/build/base_test.rb +0 -0
- data/test/br_nfe/service/response/default_test.rb +0 -0
- data/test/br_nfe/service/response/nota_fiscal_test.rb +0 -0
- data/test/br_nfe/service/response/paths/v1/tc_nfse_test.rb +0 -0
- data/test/br_nfe/service/rps_test.rb +0 -0
- data/test/br_nfe/service/sc/florianopolis/XSD/TiposNFSe_v2.0.xsd +0 -0
- data/test/br_nfe/service/sc/florianopolis/XSD/xmldsig-core-schema.xsd +0 -0
- data/test/br_nfe/service/sc/florianopolis/base_test.rb +0 -0
- data/test/br_nfe/service/sc/florianopolis/cancellation_test.rb +0 -0
- data/test/br_nfe/service/sc/florianopolis/emission_rps_test.rb +0 -0
- data/test/br_nfe/service/simpliss/v1/base_test.rb +3 -3
- data/test/br_nfe/service/simpliss/v1/cancela_nfse_test.rb +1 -1
- data/test/br_nfe/service/simpliss/v1/consulta_lote_rps_test.rb +1 -1
- data/test/br_nfe/service/simpliss/v1/consulta_nfs_por_rps_test.rb +1 -1
- data/test/br_nfe/service/simpliss/v1/consulta_nfse_test.rb +1 -1
- data/test/br_nfe/service/simpliss/v1/consulta_situacao_lote_rps_test.rb +1 -1
- data/test/br_nfe/service/simpliss/v1/recepcao_lote_rps_test.rb +1 -1
- data/test/br_nfe/service/simpliss/v1/xsd/nfse_3.xsd +0 -0
- data/test/br_nfe/service/simpliss/v1/xsd/xmldsig-core-schema20020212.xsd +0 -0
- data/test/br_nfe/service/thema/v1/base_test.rb +0 -0
- data/test/br_nfe/service/thema/v1/cancela_nfse_test.rb +6 -6
- data/test/br_nfe/service/thema/v1/consulta_lote_rps_test.rb +6 -6
- data/test/br_nfe/service/thema/v1/consulta_nfs_por_rps_test.rb +6 -6
- data/test/br_nfe/service/thema/v1/consulta_nfse_test.rb +6 -6
- data/test/br_nfe/service/thema/v1/consulta_situacao_lote_rps_test.rb +6 -6
- data/test/br_nfe/service/thema/v1/recepcao_lote_rps_limitado_test.rb +6 -6
- data/test/br_nfe/service/thema/v1/recepcao_lote_rps_test.rb +6 -6
- data/test/br_nfe/service/thema/v1/xsd/nfse.xsd +0 -0
- data/test/br_nfe/service/thema/v1/xsd/xmldsig-core-schema20020212.xsd +0 -0
- data/test/br_nfe/service/xsd/v1/nfse.xsd +0 -0
- data/test/br_nfe/service/xsd/v1/xmldsig-core-schema20020212.xsd +0 -0
- data/test/cert.pfx +0 -0
- data/test/factories/base.rb +0 -0
- data/test/factories/condicao_pagamento.rb +0 -0
- data/test/factories/endereco.rb +0 -0
- data/test/factories/person.rb +0 -0
- data/test/factories/product/destinatario.rb +0 -0
- data/test/factories/product/emitente.rb +0 -0
- data/test/factories/product/evento/base.rb +0 -0
- data/test/factories/product/evento/cancelamento.rb +0 -0
- data/test/factories/product/nfe/adicao_importacao.rb +0 -0
- data/test/factories/product/nfe/cobranca/duplicata.rb +0 -0
- data/test/factories/product/nfe/cobranca/fatura.rb +0 -0
- data/test/factories/product/nfe/cobranca/pagamento.rb +0 -0
- data/test/factories/product/nfe/declaracao_importacao.rb +0 -0
- data/test/factories/product/nfe/detalhe_exportacao.rb +0 -0
- data/test/factories/product/nfe/item.rb +0 -0
- data/test/factories/product/nfe/item_tax/cofins.rb +0 -0
- data/test/factories/product/nfe/item_tax/cofins_st.rb +0 -0
- data/test/factories/product/nfe/item_tax/icms.rb +0 -0
- data/test/factories/product/nfe/item_tax/icms_uf_destino.rb +0 -0
- data/test/factories/product/nfe/item_tax/importacao.rb +0 -0
- data/test/factories/product/nfe/item_tax/ipi.rb +0 -0
- data/test/factories/product/nfe/item_tax/issqn.rb +0 -0
- data/test/factories/product/nfe/item_tax/pis.rb +0 -0
- data/test/factories/product/nfe/item_tax/pis_st.rb +0 -0
- data/test/factories/product/nfe/processo_referencia.rb +0 -0
- data/test/factories/product/nfe/transporte/base.rb +0 -0
- data/test/factories/product/nfe/transporte/transportador.rb +0 -0
- data/test/factories/product/nfe/transporte/veiculo.rb +0 -0
- data/test/factories/product/nfe/transporte/volume.rb +0 -0
- data/test/factories/product/nota_fiscal.rb +0 -0
- data/test/factories/product/operation/base.rb +0 -0
- data/test/factories/product/operation/nfe_autorizacao.rb +0 -0
- data/test/factories/product/operation/nfe_consulta_protocolo.rb +0 -0
- data/test/factories/product/operation/nfe_download_nf.rb +0 -0
- data/test/factories/product/operation/nfe_inutilizacao.rb +0 -0
- data/test/factories/product/operation/nfe_recepcao_evento.rb +0 -0
- data/test/factories/product/operation/nfe_ret_autorizacao.rb +0 -0
- data/test/factories/product/operation/nfe_status_servico.rb +0 -0
- data/test/factories/product/response/base.rb +0 -0
- data/test/factories/product/response/build/base.rb +0 -0
- data/test/factories/product/response/nfe_ret_autorizacao.rb +0 -0
- data/test/factories/service/base.rb +0 -0
- data/test/factories/service/betha/base.rb +0 -0
- data/test/factories/service/betha/v1/cancela_nfse.rb +0 -0
- data/test/factories/service/betha/v1/consulta_lote_rps.rb +0 -0
- data/test/factories/service/betha/v1/consulta_nfs_por_rps.rb +0 -0
- data/test/factories/service/betha/v1/consulta_nfse.rb +0 -0
- data/test/factories/service/betha/v1/consulta_situacao_lote_rps.rb +0 -0
- data/test/factories/service/betha/v1/gateway.rb +0 -0
- data/test/factories/service/betha/v1/recepcao_lote_rps.rb +0 -0
- data/test/factories/service/destinatario.rb +0 -0
- data/test/factories/service/emitente.rb +0 -0
- data/test/factories/service/intermediario.rb +0 -0
- data/test/factories/service/item.rb +0 -0
- data/test/factories/service/response/build_response.rb +0 -0
- data/test/factories/service/response/default.rb +0 -0
- data/test/factories/service/response/nota_fiscal.rb +0 -0
- data/test/factories/service/rps.rb +0 -0
- data/test/factories/service/sc/florianopolis/base.rb +0 -0
- data/test/factories/service/sc/florianopolis/cancellation.rb +0 -0
- data/test/factories/service/sc/florianopolis/emission_rps.rb +0 -0
- data/test/factories/service/simpliss/v1/base.rb +0 -0
- data/test/factories/service/simpliss/v1/cancela_nfse.rb +0 -0
- data/test/factories/service/simpliss/v1/consulta_lote_rps.rb +0 -0
- data/test/factories/service/simpliss/v1/consulta_nfs_por_rps.rb +0 -0
- data/test/factories/service/simpliss/v1/consulta_nfse.rb +0 -0
- data/test/factories/service/simpliss/v1/consulta_situacao_lote_rps.rb +0 -0
- data/test/factories/service/simpliss/v1/recepcao_lote_rps.rb +0 -0
- data/test/factories/service/thema/v1/base.rb +0 -0
- data/test/factories/service/thema/v1/cancela_nfse.rb +0 -0
- data/test/factories/service/thema/v1/consulta_lote_rps.rb +0 -0
- data/test/factories/service/thema/v1/consulta_nfs_por_rps.rb +0 -0
- data/test/factories/service/thema/v1/consulta_nfse.rb +0 -0
- data/test/factories/service/thema/v1/consulta_situacao_lote_rps.rb +0 -0
- data/test/factories/service/thema/v1/recepcao_lote_rps.rb +0 -0
- data/test/factories/service/thema/v1/recepcao_lote_rps_limitado.rb +0 -0
- data/test/fixtures/product/nfe/v3_10/cancelada.xml +246 -0
- data/test/fixtures/product/nfe/v3_10/completa.xml +1650 -0
- data/test/fixtures/product/nfe/v3_10/without_proc.xml +264 -0
- data/test/fixtures/product/operation/nfe_autorizacao/nfe_signed.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_autorizacao/async_fail.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_autorizacao/async_success.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_autorizacao/nfe/with_proc.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_autorizacao/nfe/without_proc.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_autorizacao/original_xml.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_autorizacao/sync_fail.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_autorizacao/sync_success.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_consulta_protocolo/event_xml/event_1.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_consulta_protocolo/event_xml/event_2.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_consulta_protocolo/event_xml/event_3.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_consulta_protocolo/event_xml/event_cancel.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_consulta_protocolo/event_xml/one_event.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_consulta_protocolo/fail.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_consulta_protocolo/nfe_original/with_proc.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_consulta_protocolo/nfe_original/without_proc.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_consulta_protocolo/success_many_with_cancel.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_consulta_protocolo/success_many_without_cancel.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_consulta_protocolo/success_one.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_consulta_protocolo/success_without.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_inutilizacao/fail.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_inutilizacao/success.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_recepcao_evento/cancelamento/fail.xml +2 -2
- data/test/fixtures/product/response/v3.10/nfe_recepcao_evento/cancelamento/success.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_recepcao_evento/cancelamento/xml_result_fail_formatted.xml +1 -0
- data/test/fixtures/product/response/v3.10/nfe_recepcao_evento/cancelamento/xml_result_success_formatted.xml +1 -0
- data/test/fixtures/product/response/v3.10/nfe_ret_autorizacao/lot_fail.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_ret_autorizacao/lot_ok_one_invoice_fail.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_ret_autorizacao/lot_ok_one_invoice_fail_and_one_ok.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_ret_autorizacao/lot_ok_one_invoice_ok.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_ret_autorizacao/lot_ok_two_invoice_fail.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_ret_autorizacao/lot_ok_two_invoice_ok.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_ret_autorizacao/nfe/nf_2_with_protocol.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_ret_autorizacao/nfe/nf_2_without_protocol.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_ret_autorizacao/nfe/nf_3_with_protocol.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_ret_autorizacao/nfe/nf_3_without_protocol.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_ret_autorizacao/original_xml/lot.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_ret_autorizacao/original_xml/nfe.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_ret_autorizacao/original_xml/nfeProc.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_status_servico/fail.xml +0 -0
- data/test/fixtures/product/response/v3.10/nfe_status_servico/success.xml +0 -0
- data/test/fixtures/product/schemas/CCe_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/EPEC_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/LeiauteCadastroEmissorDFe_v1.01.xsd +0 -0
- data/test/fixtures/product/schemas/SuframaInternaliza_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/SuframaVistoria_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/atuCadEmiDFe_v1.01.xsd +0 -0
- data/test/fixtures/product/schemas/cabecMsg_v1.02.xsd +0 -0
- data/test/fixtures/product/schemas/cadEmiDFe_v1.01.xsd +0 -0
- data/test/fixtures/product/schemas/cancNFe_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/confRecebto_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/consCad_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/consDPEC_v1.01.xsd +0 -0
- data/test/fixtures/product/schemas/consNFeDest_v1.01.xsd +0 -0
- data/test/fixtures/product/schemas/consReciNFe_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/consReciNFe_v3.10.xsd +0 -0
- data/test/fixtures/product/schemas/consSitNFe_v2.01.xsd +0 -0
- data/test/fixtures/product/schemas/consSitNFe_v3.10.xsd +0 -0
- data/test/fixtures/product/schemas/consStatServ_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/consStatServ_v3.10.xsd +0 -0
- data/test/fixtures/product/schemas/distDFeInt_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/downloadNFe_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/e110110_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/e110111_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/e110140_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/e111500_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/e111501_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/e111502_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/e111503_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/e210200_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/e210210_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/e210220_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/e210240_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/e411500_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/e411501_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/e411502_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/e411503_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/e990900_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/e990910_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/envCCe_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/envCancelPProrrogNFe_v1.0.xsd +0 -0
- data/test/fixtures/product/schemas/envConfRecebto_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/envDPEC_v1.01.xsd +0 -0
- data/test/fixtures/product/schemas/envEPEC_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/envEventoCancNFe_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/envEvento_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/envFiscoNfe_v1.0.xsd +0 -0
- data/test/fixtures/product/schemas/envPProrrogNFe_v1.0.xsd +0 -0
- data/test/fixtures/product/schemas/envRemIndus_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/envSuframaInternaliza_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/envSuframaVistoria_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/enviNFe_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/enviNFe_v3.10.xsd +0 -0
- data/test/fixtures/product/schemas/eventoCancNFe_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/eventoEPEC_v0.01.xsd +0 -0
- data/test/fixtures/product/schemas/eventoEPEC_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/eventoRemIndus_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/inutNFe_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/inutNFe_v3.10.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteCCe_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteCancNFe_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteConfRecebto_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteConsNFeDest_v1.01.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteConsSitNFe_v2.01.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteConsSitNFe_v3.10.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteConsStatServ_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteConsStatServ_v3.10.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteConsultaCadastro_v1.01.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteConsultaCadastro_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteDPEC_v1.01.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteDownloadNFe_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteEPEC_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteEventoCancNFe_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteEvento_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteInutNFe_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteInutNFe_v3.10.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteNFe_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteNFe_v3.10.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteRemIndus_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteSRE_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteSuframaInternaliza_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/leiauteSuframaVistoria_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/nfe_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/nfe_v3.10.xsd +0 -0
- data/test/fixtures/product/schemas/procCCeNFe_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/procCancNFe_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/procConfRecebtoNFe_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/procEPEC_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/procEventoCancNFe_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/procEventoNFe_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/procEventoNFe_v99.99.xsd +0 -0
- data/test/fixtures/product/schemas/procInutNFe_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/procInutNFe_v3.10.xsd +0 -0
- data/test/fixtures/product/schemas/procNFe_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/procNFe_v3.10.xsd +0 -0
- data/test/fixtures/product/schemas/procRemIndus_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/resEvento_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/resNFe_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/retAtuCadEmiDFe_v1.01.xsd +0 -0
- data/test/fixtures/product/schemas/retCancNFe_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/retConsCad_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/retConsDPEC_v1.01.xsd +0 -0
- data/test/fixtures/product/schemas/retConsReciNFe_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/retConsReciNFe_v3.10.xsd +0 -0
- data/test/fixtures/product/schemas/retConsSitNFe_v2.01.xsd +0 -0
- data/test/fixtures/product/schemas/retConsSitNFe_v3.10.xsd +0 -0
- data/test/fixtures/product/schemas/retConsStatServ_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/retConsStatServ_v3.10.xsd +0 -0
- data/test/fixtures/product/schemas/retDPEC_v1.01.xsd +0 -0
- data/test/fixtures/product/schemas/retDistDFeInt_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/retDownloadNFe_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/retEnvCCe_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/retEnvCancelPProrrogNFe_v1.0.xsd +0 -0
- data/test/fixtures/product/schemas/retEnvConfRecebto_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/retEnvEPEC_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/retEnvEventoCancNFe_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/retEnvEvento_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/retEnvFiscoNFe_v1.0.xsd +0 -0
- data/test/fixtures/product/schemas/retEnvRemIndus_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/retEnvSuframaInternaliza_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/retEnvSuframaVistoria_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/retEnviNFe_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/retEnviNFe_v3.10.xsd +0 -0
- data/test/fixtures/product/schemas/retEventoEPEC_v0.01.xsd +0 -0
- data/test/fixtures/product/schemas/retInutNFe_v2.00.xsd +0 -0
- data/test/fixtures/product/schemas/retInutNFe_v3.10.xsd +0 -0
- data/test/fixtures/product/schemas/retPProrrogNFe_v1.0.xsd +0 -0
- data/test/fixtures/product/schemas/retconsNFeDest_v1.01.xsd +0 -0
- data/test/fixtures/product/schemas/tiposBasico_v1.03.xsd +0 -0
- data/test/fixtures/product/schemas/tiposBasico_v1.03_OPENSSL.xsd +0 -0
- data/test/fixtures/product/schemas/tiposBasico_v3.10.xsd +0 -0
- data/test/fixtures/product/schemas/tiposBasico_v3.10_OPENSSL.xsd +0 -0
- data/test/fixtures/product/schemas/tiposDistDFe_v1.00.xsd +0 -0
- data/test/fixtures/product/schemas/xmldsig-core-schema_v1.01.xsd +0 -0
- data/test/fixtures/product/wsdl/NFeRetAutorizacao.xml +0 -0
- data/test/fixtures/product/wsdl/NfeAutorizacao.xml +0 -0
- data/test/fixtures/product/wsdl/NfeConsulta2.xml +0 -0
- data/test/fixtures/product/wsdl/NfeStatusServico2.xml +0 -0
- data/test/fixtures/product/wsdl/RecepcaoEvento.xml +78 -0
- data/test/fixtures/product/wsdl/nfeinutilizacao2.xml +0 -0
- data/test/fixtures/service/response/betha/v1/cancela_nfse/fault.xml +0 -0
- data/test/fixtures/service/response/betha/v1/cancela_nfse/success.xml +0 -0
- data/test/fixtures/service/response/betha/v1/consulta_lote_rps/fault.xml +0 -0
- data/test/fixtures/service/response/betha/v1/consulta_lote_rps/success.xml +0 -0
- data/test/fixtures/service/response/betha/v1/consulta_nfse/fault.xml +0 -0
- data/test/fixtures/service/response/betha/v1/consulta_nfse/nfs_empty.xml +0 -0
- data/test/fixtures/service/response/betha/v1/consulta_nfse/success.xml +0 -0
- data/test/fixtures/service/response/betha/v1/consulta_nfse_por_rps/fault.xml +0 -0
- data/test/fixtures/service/response/betha/v1/consulta_nfse_por_rps/success.xml +0 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/error.xml +0 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/fault.xml +0 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/success.xml +0 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/unprocessed.xml +0 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/unprocessed_by_code_error.xml +0 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/unreceived.xml +0 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/unreceived_by_code_error.xml +0 -0
- data/test/fixtures/service/response/betha/v1/recepcao_lote_rps/error.xml +0 -0
- data/test/fixtures/service/response/betha/v1/recepcao_lote_rps/success.xml +0 -0
- data/test/fixtures/service/response/simpliss/v1/cancela_nfse/fault.xml +0 -0
- data/test/fixtures/service/response/simpliss/v1/cancela_nfse/success.xml +0 -0
- data/test/fixtures/service/response/simpliss/v1/consulta_lote_rps/fault.xml +0 -0
- data/test/fixtures/service/response/simpliss/v1/consulta_lote_rps/nfse_complete.xml +0 -0
- data/test/fixtures/service/response/simpliss/v1/consulta_lote_rps/nfse_simple.xml +0 -0
- data/test/fixtures/service/response/simpliss/v1/consulta_nfse/fault.xml +0 -0
- data/test/fixtures/service/response/simpliss/v1/consulta_nfse/nfs_empty.xml +0 -0
- data/test/fixtures/service/response/simpliss/v1/consulta_nfse/nfse_complete.xml +0 -0
- data/test/fixtures/service/response/simpliss/v1/consulta_nfse/nfse_simple.xml +0 -0
- data/test/fixtures/service/response/simpliss/v1/consulta_nfse_por_rps/fault.xml +0 -0
- data/test/fixtures/service/response/simpliss/v1/consulta_nfse_por_rps/nfse_complete.xml +0 -0
- data/test/fixtures/service/response/simpliss/v1/consulta_nfse_por_rps/nfse_simple.xml +0 -0
- data/test/fixtures/service/response/simpliss/v1/consulta_situacao_lote_rps/error.xml +0 -0
- data/test/fixtures/service/response/simpliss/v1/consulta_situacao_lote_rps/fault.xml +0 -0
- data/test/fixtures/service/response/simpliss/v1/consulta_situacao_lote_rps/success.xml +0 -0
- data/test/fixtures/service/response/simpliss/v1/consulta_situacao_lote_rps/unprocessed.xml +0 -0
- data/test/fixtures/service/response/simpliss/v1/consulta_situacao_lote_rps/unreceived.xml +0 -0
- data/test/fixtures/service/response/simpliss/v1/recepcao_lote_rps/error.xml +0 -0
- data/test/fixtures/service/response/simpliss/v1/recepcao_lote_rps/success.xml +0 -0
- data/test/fixtures/service/response/thema/v1/cancela_nfse/fault.xml +0 -0
- data/test/fixtures/service/response/thema/v1/cancela_nfse/success.xml +0 -0
- data/test/fixtures/service/response/thema/v1/consulta_lote_rps/fault.xml +0 -0
- data/test/fixtures/service/response/thema/v1/consulta_lote_rps/nfse_complete.xml +0 -0
- data/test/fixtures/service/response/thema/v1/consulta_nfse/fault.xml +0 -0
- data/test/fixtures/service/response/thema/v1/consulta_nfse/nfs_empty.xml +0 -0
- data/test/fixtures/service/response/thema/v1/consulta_nfse/nfse_complete.xml +0 -0
- data/test/fixtures/service/response/thema/v1/consulta_nfse/nfse_simple.xml +0 -0
- data/test/fixtures/service/response/thema/v1/consulta_nfse_por_rps/fault.xml +0 -0
- data/test/fixtures/service/response/thema/v1/consulta_nfse_por_rps/nfse_complete.xml +0 -0
- data/test/fixtures/service/response/thema/v1/consulta_situacao_lote_rps/error.xml +0 -0
- data/test/fixtures/service/response/thema/v1/consulta_situacao_lote_rps/fault.xml +0 -0
- data/test/fixtures/service/response/thema/v1/consulta_situacao_lote_rps/success.xml +0 -0
- data/test/fixtures/service/response/thema/v1/consulta_situacao_lote_rps/unprocessed.xml +0 -0
- data/test/fixtures/service/response/thema/v1/consulta_situacao_lote_rps/unreceived.xml +0 -0
- data/test/fixtures/service/response/thema/v1/recepcao_lote_rps/error.xml +0 -0
- data/test/fixtures/service/response/thema/v1/recepcao_lote_rps/success.xml +0 -0
- data/test/fixtures/service/response/thema/v1/recepcao_lote_rps_limitado/error.xml +0 -0
- data/test/fixtures/service/response/thema/v1/recepcao_lote_rps_limitado/success.xml +0 -0
- data/test/fixtures/service/thema/v1/cancelar_nfse_envio.xml +0 -0
- data/test/fixtures/service/thema/v1/cancelar_nfse_envio_signed.xml +0 -0
- data/test/fixtures/service/thema/v1/enviar_lote_rps.xml +0 -0
- data/test/fixtures/service/thema/v1/enviar_lote_rps_signed.xml +0 -0
- data/test/fixtures/service/wsdl/betha/v1/cancelar_nfse.xml +0 -0
- data/test/fixtures/service/wsdl/betha/v1/consultar_lote_rps.xml +0 -0
- data/test/fixtures/service/wsdl/betha/v1/consultar_nfse.xml +0 -0
- data/test/fixtures/service/wsdl/betha/v1/consultar_nfse_por_rps.xml +0 -0
- data/test/fixtures/service/wsdl/betha/v1/consultar_situacao_lote_rps.xml +0 -0
- data/test/fixtures/service/wsdl/betha/v1/recepcionar_lote_rps.xml +0 -0
- data/test/fixtures/service/wsdl/simpliss/v1/nfseservice.xml +0 -0
- data/test/fixtures/service/wsdl/thema/v1/nfse_cancelamento.xml +0 -0
- data/test/fixtures/service/wsdl/thema/v1/nfse_consulta.xml +0 -0
- data/test/fixtures/service/wsdl/thema/v1/nfse_remessa.xml +0 -0
- data/test/test_helper.rb +0 -0
- metadata +35 -63
- data/lib/br_nfe/product/gateway/base.rb +0 -35
- data/lib/br_nfe/product/gateway/web_service_am.rb +0 -140
- data/lib/br_nfe/product/gateway/web_service_ba.rb +0 -140
- data/lib/br_nfe/product/gateway/web_service_ce.rb +0 -162
- data/lib/br_nfe/product/gateway/web_service_go.rb +0 -140
- data/lib/br_nfe/product/gateway/web_service_mg.rb +0 -140
- data/lib/br_nfe/product/gateway/web_service_ms.rb +0 -140
- data/lib/br_nfe/product/gateway/web_service_mt.rb +0 -140
- data/lib/br_nfe/product/gateway/web_service_pe.rb +0 -140
- data/lib/br_nfe/product/gateway/web_service_pr.rb +0 -140
- data/lib/br_nfe/product/gateway/web_service_rs.rb +0 -140
- data/lib/br_nfe/product/gateway/web_service_sp.rb +0 -140
- data/lib/br_nfe/product/gateway/web_service_svan.rb +0 -162
- data/lib/br_nfe/product/gateway/web_service_svc_an.rb +0 -131
- data/lib/br_nfe/product/gateway/web_service_svc_rs.rb +0 -20
- data/lib/br_nfe/product/gateway/web_service_svrs.rb +0 -140
- data/test/br_nfe/product/gateway/base_test.rb +0 -16
- data/test/br_nfe/product/gateway/web_service_am_test.rb +0 -242
- data/test/br_nfe/product/gateway/web_service_ba_test.rb +0 -242
- data/test/br_nfe/product/gateway/web_service_ce_test.rb +0 -242
- data/test/br_nfe/product/gateway/web_service_go_test.rb +0 -242
- data/test/br_nfe/product/gateway/web_service_mg_test.rb +0 -242
- data/test/br_nfe/product/gateway/web_service_ms_test.rb +0 -242
- data/test/br_nfe/product/gateway/web_service_mt_test.rb +0 -408
- data/test/br_nfe/product/gateway/web_service_pe_test.rb +0 -408
- data/test/br_nfe/product/gateway/web_service_pr_test.rb +0 -408
- data/test/br_nfe/product/gateway/web_service_rs_test.rb +0 -407
- data/test/br_nfe/product/gateway/web_service_sp_test.rb +0 -408
- data/test/br_nfe/product/gateway/web_service_svan_test.rb +0 -242
- data/test/br_nfe/product/gateway/web_service_svc_an_test.rb +0 -185
- data/test/br_nfe/product/gateway/web_service_svc_rs_test.rb +0 -185
- data/test/br_nfe/product/gateway/web_service_svrs_test.rb +0 -242
- data/test/factories/product/gateway/base.rb +0 -5
- data/test/factories/product/gateway/web_service_am.rb +0 -5
- data/test/factories/product/gateway/web_service_ba.rb +0 -5
- data/test/factories/product/gateway/web_service_svrs.rb +0 -5
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/br_nfe/base_test.rb
CHANGED
@@ -117,10 +117,10 @@ describe BrNfe::Base do
|
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
120
|
-
describe "#
|
120
|
+
describe "#url_wsdl" do
|
121
121
|
it "deve dar um erro por default" do
|
122
122
|
assert_raises RuntimeError do
|
123
|
-
subject.
|
123
|
+
subject.url_wsdl
|
124
124
|
end
|
125
125
|
end
|
126
126
|
end
|
@@ -203,76 +203,37 @@ describe BrNfe::Base do
|
|
203
203
|
end
|
204
204
|
end
|
205
205
|
|
206
|
-
describe
|
207
|
-
it "
|
208
|
-
subject.
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
it "por padrão não deve instanciar o client_wsdl com ssl" do
|
214
|
-
subject.ssl_request?.must_equal false
|
206
|
+
describe '#client_wsdl_params' do
|
207
|
+
it "Deve retornar um hash com algumas configurações padrões para aplciar no client soap" do
|
208
|
+
subject.stubs(:url_wsdl).returns('http://stub.com?wsdl')
|
209
|
+
subject.client_wsdl_params[:wsdl].must_equal 'http://stub.com?wsdl'
|
210
|
+
subject.client_wsdl_params[:log].must_equal BrNfe.client_wsdl_log
|
211
|
+
subject.client_wsdl_params[:pretty_print_xml].must_equal BrNfe.client_wsdl_pretty_print_xml
|
212
|
+
subject.client_wsdl_params[:ssl_verify_mode].must_equal :none
|
215
213
|
end
|
216
214
|
end
|
217
215
|
|
218
216
|
describe "#client_wsdl" do
|
219
|
-
it "deve instanciar um Savon.client com
|
217
|
+
it "deve instanciar um Savon.client com os parametros de client_wsdl_params" do
|
220
218
|
# Stub metodos para configuração do client WSDL
|
221
|
-
subject.expects(:
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
subject.instance_variable_get(:@client_wsdl).must_be_nil
|
233
|
-
|
234
|
-
client_wsdl = subject.client_wsdl
|
235
|
-
|
236
|
-
client_wsdl.globals[:wsdl].must_equal 'wsdl'
|
237
|
-
client_wsdl.globals[:log].must_equal 'client_wsdl_log'
|
238
|
-
client_wsdl.globals[:pretty_print_xml].must_equal 'client_wsdl_pretty_print_xml'
|
239
|
-
client_wsdl.globals[:ssl_verify_mode].must_equal :none
|
240
|
-
|
241
|
-
client_wsdl.globals[:ssl_version].must_be_nil
|
242
|
-
client_wsdl.globals[:ssl_cert].must_be_nil
|
243
|
-
client_wsdl.globals[:ssl_cert_key].must_be_nil
|
244
|
-
client_wsdl.globals[:ssl_cert_key_password].must_be_nil
|
245
|
-
|
246
|
-
subject.instance_variable_get(:@client_wsdl).must_equal client_wsdl
|
247
|
-
end
|
219
|
+
subject.expects(:client_wsdl_params).returns({
|
220
|
+
wsdl: 'http://stub.com?wsdl',
|
221
|
+
ssl_verify_mode: :none,
|
222
|
+
log: false,
|
223
|
+
ssl_version: :TLSv1,
|
224
|
+
follow_redirects: true,
|
225
|
+
headers: {
|
226
|
+
:'Content-Type' => 'application/soap+xml; charset=utf-8'
|
227
|
+
}
|
228
|
+
})
|
248
229
|
|
249
|
-
it "se ssl_request? for true então deve instanciar um Savon.client com a configuração de SSL" do
|
250
|
-
# Stub metodos para configuração do client WSDL
|
251
|
-
subject.expects(:wsdl).returns('wsdl')
|
252
|
-
|
253
|
-
# Ajusto a configuração da gem para testar
|
254
|
-
BrNfe.stubs(:client_wsdl_log).returns('client_wsdl_log')
|
255
|
-
BrNfe.stubs(:client_wsdl_pretty_print_xml).returns('client_wsdl_pretty_print_xml')
|
256
|
-
# Não deve pegar o certificado para configurar o client
|
257
|
-
subject.expects(:ssl_version).returns(:TLSv1)
|
258
|
-
subject.expects(:certificate).returns(:certificate)
|
259
|
-
subject.expects(:certificate_key).returns(:certificate_key)
|
260
|
-
subject.expects(:certificate_pkcs12_password).returns(:certificate_pkcs12_password)
|
261
|
-
subject.expects(:ssl_request?).returns(true)
|
262
|
-
|
263
|
-
subject.instance_variable_get(:@client_wsdl).must_be_nil
|
264
|
-
|
265
230
|
client_wsdl = subject.client_wsdl
|
266
|
-
|
267
|
-
client_wsdl.globals[:
|
268
|
-
client_wsdl.globals[:log].must_equal
|
269
|
-
client_wsdl.globals[:
|
270
|
-
client_wsdl.globals[:
|
271
|
-
|
272
|
-
client_wsdl.globals[:ssl_version].must_equal :TLSv1
|
273
|
-
client_wsdl.globals[:ssl_cert].must_equal :certificate
|
274
|
-
client_wsdl.globals[:ssl_cert_key].must_equal :certificate_key
|
275
|
-
client_wsdl.globals[:ssl_cert_key_password].must_equal :certificate_pkcs12_password
|
231
|
+
client_wsdl.globals[:wsdl].must_equal( 'http://stub.com?wsdl' )
|
232
|
+
client_wsdl.globals[:ssl_verify_mode].must_equal( :none )
|
233
|
+
client_wsdl.globals[:log].must_equal( false )
|
234
|
+
client_wsdl.globals[:ssl_version].must_equal( :TLSv1 )
|
235
|
+
client_wsdl.globals[:follow_redirects].must_equal( true )
|
236
|
+
client_wsdl.globals[:headers].must_equal( {:'Content-Type' => 'application/soap+xml; charset=utf-8'} )
|
276
237
|
|
277
238
|
subject.instance_variable_get(:@client_wsdl).must_equal client_wsdl
|
278
239
|
end
|
File without changes
|
File without changes
|
File without changes
|
data/test/br_nfe/person_test.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -3,7 +3,7 @@ require 'test_helper'
|
|
3
3
|
describe BrNfe::Product::Operation::Base do
|
4
4
|
subject { FactoryGirl.build(:product_operation_base) }
|
5
5
|
let(:nota_fiscal) { FactoryGirl.build(:product_nota_fiscal) }
|
6
|
-
|
6
|
+
|
7
7
|
describe "Validations" do
|
8
8
|
it do
|
9
9
|
subject.certificate_pkcs12_path = nil
|
@@ -29,10 +29,9 @@ describe BrNfe::Product::Operation::Base do
|
|
29
29
|
it "tipo_emissao deve ser normal" do
|
30
30
|
subject.class.new.tipo_emissao.must_equal :normal
|
31
31
|
end
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
subject.ssl_request?.must_equal true
|
32
|
+
it "nfe_version deve ser :v3_10" do
|
33
|
+
subject.class.new.nfe_version.must_equal :v3_10
|
34
|
+
end
|
36
35
|
end
|
37
36
|
|
38
37
|
describe '#xml_current_dir_path' do
|
@@ -85,372 +84,372 @@ describe BrNfe::Product::Operation::Base do
|
|
85
84
|
end
|
86
85
|
|
87
86
|
describe '#gateway' do
|
88
|
-
let(:env) { SecureRandom.hex(5) }
|
89
87
|
describe 'UF: 12 - Acre/AC' do
|
90
88
|
it "Para tipo de emissão :normal" do
|
91
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '12'
|
92
|
-
subject.gateway.
|
93
|
-
subject.gateway.env.must_equal env
|
89
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '12'
|
90
|
+
subject.gateway.must_equal :svrs
|
94
91
|
end
|
95
92
|
it "Para tipo de emissão :svc" do
|
96
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '12',
|
97
|
-
subject.gateway.
|
98
|
-
subject.gateway.env.must_equal env
|
93
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '12', tipo_emissao: :svc
|
94
|
+
subject.gateway.must_equal :svc_an
|
99
95
|
end
|
100
96
|
end
|
101
97
|
|
102
98
|
describe 'UF: 27 - Alagoas/AL' do
|
103
99
|
it "Para tipo de emissão :normal" do
|
104
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '27'
|
105
|
-
subject.gateway.
|
106
|
-
subject.gateway.env.must_equal env
|
100
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '27'
|
101
|
+
subject.gateway.must_equal :svrs
|
107
102
|
end
|
108
103
|
it "Para tipo de emissão :svc" do
|
109
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '27',
|
110
|
-
subject.gateway.
|
111
|
-
subject.gateway.env.must_equal env
|
104
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '27', tipo_emissao: :svc
|
105
|
+
subject.gateway.must_equal :svc_an
|
112
106
|
end
|
113
107
|
end
|
114
108
|
|
115
109
|
describe 'UF: 16 - Amapá/AP' do
|
116
110
|
it "Para tipo de emissão :normal" do
|
117
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '16'
|
118
|
-
subject.gateway.
|
119
|
-
subject.gateway.env.must_equal env
|
111
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '16'
|
112
|
+
subject.gateway.must_equal :svrs
|
120
113
|
end
|
121
114
|
it "Para tipo de emissão :svc" do
|
122
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '16',
|
123
|
-
subject.gateway.
|
124
|
-
subject.gateway.env.must_equal env
|
115
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '16', tipo_emissao: :svc
|
116
|
+
subject.gateway.must_equal :svc_an
|
125
117
|
end
|
126
118
|
end
|
127
119
|
|
128
120
|
describe 'UF: 13 - Amazonas/AM' do
|
129
121
|
it "Para tipo de emissão :normal" do
|
130
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '13'
|
131
|
-
subject.gateway.
|
132
|
-
subject.gateway.env.must_equal env
|
122
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '13'
|
123
|
+
subject.gateway.must_equal :am
|
133
124
|
end
|
134
125
|
it "Para tipo de emissão :svc" do
|
135
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '13',
|
136
|
-
subject.gateway.
|
137
|
-
subject.gateway.env.must_equal env
|
126
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '13', tipo_emissao: :svc
|
127
|
+
subject.gateway.must_equal :svc_rs
|
138
128
|
end
|
139
129
|
end
|
140
130
|
|
141
131
|
describe 'UF: 29 - Bahia/BA' do
|
142
132
|
it "Para tipo de emissão :normal" do
|
143
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '29'
|
144
|
-
subject.gateway.
|
145
|
-
subject.gateway.env.must_equal env
|
133
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '29'
|
134
|
+
subject.gateway.must_equal :ba
|
146
135
|
end
|
147
136
|
it "Para tipo de emissão :svc" do
|
148
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '29',
|
149
|
-
subject.gateway.
|
150
|
-
subject.gateway.env.must_equal env
|
137
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '29', tipo_emissao: :svc
|
138
|
+
subject.gateway.must_equal :svc_rs
|
151
139
|
end
|
152
140
|
end
|
153
141
|
|
154
142
|
describe 'UF: 23 - Ceará/CE' do
|
155
143
|
it "Para tipo de emissão :normal" do
|
156
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '23'
|
157
|
-
subject.gateway.
|
158
|
-
subject.gateway.env.must_equal env
|
144
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '23'
|
145
|
+
subject.gateway.must_equal :ce
|
159
146
|
end
|
160
147
|
it "Para tipo de emissão :svc" do
|
161
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '23',
|
162
|
-
subject.gateway.
|
163
|
-
subject.gateway.env.must_equal env
|
148
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '23', tipo_emissao: :svc
|
149
|
+
subject.gateway.must_equal :svc_rs
|
164
150
|
end
|
165
151
|
end
|
166
152
|
|
167
153
|
describe 'UF: 53 - Distrito Federal/DF' do
|
168
154
|
it "Para tipo de emissão :normal" do
|
169
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '53'
|
170
|
-
subject.gateway.
|
171
|
-
subject.gateway.env.must_equal env
|
155
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '53'
|
156
|
+
subject.gateway.must_equal :svrs
|
172
157
|
end
|
173
158
|
it "Para tipo de emissão :svc" do
|
174
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '53',
|
175
|
-
subject.gateway.
|
176
|
-
subject.gateway.env.must_equal env
|
159
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '53', tipo_emissao: :svc
|
160
|
+
subject.gateway.must_equal :svc_an
|
177
161
|
end
|
178
162
|
end
|
179
163
|
|
180
164
|
describe 'UF: 32 - Espírito Santo/ES' do
|
181
165
|
it "Para tipo de emissão :normal" do
|
182
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '32'
|
183
|
-
subject.gateway.
|
184
|
-
subject.gateway.env.must_equal env
|
166
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '32'
|
167
|
+
subject.gateway.must_equal :svrs
|
185
168
|
end
|
186
169
|
it "Para tipo de emissão :svc" do
|
187
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '32',
|
188
|
-
subject.gateway.
|
189
|
-
subject.gateway.env.must_equal env
|
170
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '32', tipo_emissao: :svc
|
171
|
+
subject.gateway.must_equal :svc_an
|
190
172
|
end
|
191
173
|
end
|
192
174
|
|
193
175
|
describe 'UF: 52 - Goiás/GO' do
|
194
176
|
it "Para tipo de emissão :normal" do
|
195
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '52'
|
196
|
-
subject.gateway.
|
197
|
-
subject.gateway.env.must_equal env
|
177
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '52'
|
178
|
+
subject.gateway.must_equal :go
|
198
179
|
end
|
199
180
|
it "Para tipo de emissão :svc" do
|
200
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '52',
|
201
|
-
subject.gateway.
|
202
|
-
subject.gateway.env.must_equal env
|
181
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '52', tipo_emissao: :svc
|
182
|
+
subject.gateway.must_equal :svc_rs
|
203
183
|
end
|
204
184
|
end
|
205
185
|
|
206
186
|
describe 'UF: 21 - Maranhão/MA' do
|
207
187
|
it "Para tipo de emissão :normal" do
|
208
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '21'
|
209
|
-
subject.gateway.
|
210
|
-
subject.gateway.env.must_equal env
|
188
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '21'
|
189
|
+
subject.gateway.must_equal :svan
|
211
190
|
end
|
212
191
|
it "Para tipo de emissão :svc" do
|
213
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '21',
|
214
|
-
subject.gateway.
|
215
|
-
subject.gateway.env.must_equal env
|
192
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '21', tipo_emissao: :svc
|
193
|
+
subject.gateway.must_equal :svc_rs
|
216
194
|
end
|
217
195
|
end
|
218
196
|
|
219
197
|
describe 'UF: 51 - Mato Grosso/MT' do
|
220
198
|
it "Para tipo de emissão :normal" do
|
221
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '51'
|
222
|
-
subject.gateway.
|
223
|
-
subject.gateway.env.must_equal env
|
199
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '51'
|
200
|
+
subject.gateway.must_equal :mt
|
224
201
|
end
|
225
202
|
it "Para tipo de emissão :svc" do
|
226
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '51',
|
227
|
-
subject.gateway.
|
228
|
-
subject.gateway.env.must_equal env
|
203
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '51', tipo_emissao: :svc
|
204
|
+
subject.gateway.must_equal :svc_rs
|
229
205
|
end
|
230
206
|
end
|
231
207
|
|
232
208
|
describe 'UF: 50 - Mato Grosso do Sul/MS' do
|
233
209
|
it "Para tipo de emissão :normal" do
|
234
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '50'
|
235
|
-
subject.gateway.
|
236
|
-
subject.gateway.env.must_equal env
|
210
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '50'
|
211
|
+
subject.gateway.must_equal :ms
|
237
212
|
end
|
238
213
|
it "Para tipo de emissão :svc" do
|
239
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '50',
|
240
|
-
subject.gateway.
|
241
|
-
subject.gateway.env.must_equal env
|
214
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '50', tipo_emissao: :svc
|
215
|
+
subject.gateway.must_equal :svc_rs
|
242
216
|
end
|
243
217
|
end
|
244
218
|
|
245
219
|
describe 'UF: 31 - Minas Gerais/MG' do
|
246
220
|
it "Para tipo de emissão :normal" do
|
247
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '31'
|
248
|
-
subject.gateway.
|
249
|
-
subject.gateway.env.must_equal env
|
221
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '31'
|
222
|
+
subject.gateway.must_equal :mg
|
250
223
|
end
|
251
224
|
it "Para tipo de emissão :svc" do
|
252
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '31',
|
253
|
-
subject.gateway.
|
254
|
-
subject.gateway.env.must_equal env
|
225
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '31', tipo_emissao: :svc
|
226
|
+
subject.gateway.must_equal :svc_an
|
255
227
|
end
|
256
228
|
end
|
257
229
|
|
258
230
|
describe 'UF: 15 - Pará/PA' do
|
259
231
|
it "Para tipo de emissão :normal" do
|
260
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '15'
|
261
|
-
subject.gateway.
|
262
|
-
subject.gateway.env.must_equal env
|
232
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '15'
|
233
|
+
subject.gateway.must_equal :svan
|
263
234
|
end
|
264
235
|
it "Para tipo de emissão :svc" do
|
265
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '15',
|
266
|
-
subject.gateway.
|
267
|
-
subject.gateway.env.must_equal env
|
236
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '15', tipo_emissao: :svc
|
237
|
+
subject.gateway.must_equal :svc_rs
|
268
238
|
end
|
269
239
|
end
|
270
240
|
|
271
241
|
describe 'UF: 25 - Paraíba/PB' do
|
272
242
|
it "Para tipo de emissão :normal" do
|
273
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '25'
|
274
|
-
subject.gateway.
|
275
|
-
subject.gateway.env.must_equal env
|
243
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '25'
|
244
|
+
subject.gateway.must_equal :svrs
|
276
245
|
end
|
277
246
|
it "Para tipo de emissão :svc" do
|
278
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '25',
|
279
|
-
subject.gateway.
|
280
|
-
subject.gateway.env.must_equal env
|
247
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '25', tipo_emissao: :svc
|
248
|
+
subject.gateway.must_equal :svc_an
|
281
249
|
end
|
282
250
|
end
|
283
251
|
|
284
252
|
describe 'UF: 41 - Paraná/PR' do
|
285
253
|
it "Para tipo de emissão :normal" do
|
286
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '41'
|
287
|
-
subject.gateway.
|
288
|
-
subject.gateway.env.must_equal env
|
254
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '41'
|
255
|
+
subject.gateway.must_equal :pr
|
289
256
|
end
|
290
257
|
it "Para tipo de emissão :svc" do
|
291
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '41',
|
292
|
-
subject.gateway.
|
293
|
-
subject.gateway.env.must_equal env
|
258
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '41', tipo_emissao: :svc
|
259
|
+
subject.gateway.must_equal :svc_rs
|
294
260
|
end
|
295
261
|
end
|
296
262
|
|
297
263
|
describe 'UF: 26 - Pernambuco/PE' do
|
298
264
|
it "Para tipo de emissão :normal" do
|
299
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '26'
|
300
|
-
subject.gateway.
|
301
|
-
subject.gateway.env.must_equal env
|
265
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '26'
|
266
|
+
subject.gateway.must_equal :pe
|
302
267
|
end
|
303
268
|
it "Para tipo de emissão :svc" do
|
304
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '26',
|
305
|
-
subject.gateway.
|
306
|
-
subject.gateway.env.must_equal env
|
269
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '26', tipo_emissao: :svc
|
270
|
+
subject.gateway.must_equal :svc_rs
|
307
271
|
end
|
308
272
|
end
|
309
273
|
|
310
274
|
describe 'UF: 22 - Piauí/PI' do
|
311
275
|
it "Para tipo de emissão :normal" do
|
312
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '22'
|
313
|
-
subject.gateway.
|
314
|
-
subject.gateway.env.must_equal env
|
276
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '22'
|
277
|
+
subject.gateway.must_equal :svrs
|
315
278
|
end
|
316
279
|
it "Para tipo de emissão :svc" do
|
317
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '22',
|
318
|
-
subject.gateway.
|
319
|
-
subject.gateway.env.must_equal env
|
280
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '22', tipo_emissao: :svc
|
281
|
+
subject.gateway.must_equal :svc_rs
|
320
282
|
end
|
321
283
|
end
|
322
284
|
|
323
285
|
describe 'UF: 33 - Rio de Janeiro/RJ' do
|
324
286
|
it "Para tipo de emissão :normal" do
|
325
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '33'
|
326
|
-
subject.gateway.
|
327
|
-
subject.gateway.env.must_equal env
|
287
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '33'
|
288
|
+
subject.gateway.must_equal :svrs
|
328
289
|
end
|
329
290
|
it "Para tipo de emissão :svc" do
|
330
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '33',
|
331
|
-
subject.gateway.
|
332
|
-
subject.gateway.env.must_equal env
|
291
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '33', tipo_emissao: :svc
|
292
|
+
subject.gateway.must_equal :svc_an
|
333
293
|
end
|
334
294
|
end
|
335
295
|
|
336
296
|
describe 'UF: 24 - Rio Grande do Norte/RN' do
|
337
297
|
it "Para tipo de emissão :normal" do
|
338
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '24'
|
339
|
-
subject.gateway.
|
340
|
-
subject.gateway.env.must_equal env
|
298
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '24'
|
299
|
+
subject.gateway.must_equal :svrs
|
341
300
|
end
|
342
301
|
it "Para tipo de emissão :svc" do
|
343
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '24',
|
344
|
-
subject.gateway.
|
345
|
-
subject.gateway.env.must_equal env
|
302
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '24', tipo_emissao: :svc
|
303
|
+
subject.gateway.must_equal :svc_an
|
346
304
|
end
|
347
305
|
end
|
348
306
|
|
349
307
|
describe 'UF: 43 - Rio Grande do Sul/RS' do
|
350
308
|
it "Para tipo de emissão :normal" do
|
351
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '43'
|
352
|
-
subject.gateway.
|
353
|
-
subject.gateway.env.must_equal env
|
309
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '43'
|
310
|
+
subject.gateway.must_equal :rs
|
354
311
|
end
|
355
312
|
it "Para tipo de emissão :svc" do
|
356
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '43',
|
357
|
-
subject.gateway.
|
358
|
-
subject.gateway.env.must_equal env
|
313
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '43', tipo_emissao: :svc
|
314
|
+
subject.gateway.must_equal :svc_an
|
359
315
|
end
|
360
316
|
end
|
361
317
|
|
362
318
|
describe 'UF: 11 - Rondônia/RO' do
|
363
319
|
it "Para tipo de emissão :normal" do
|
364
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '11'
|
365
|
-
subject.gateway.
|
366
|
-
subject.gateway.env.must_equal env
|
320
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '11'
|
321
|
+
subject.gateway.must_equal :svrs
|
367
322
|
end
|
368
323
|
it "Para tipo de emissão :svc" do
|
369
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '11',
|
370
|
-
subject.gateway.
|
371
|
-
subject.gateway.env.must_equal env
|
324
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '11', tipo_emissao: :svc
|
325
|
+
subject.gateway.must_equal :svc_an
|
372
326
|
end
|
373
327
|
end
|
374
328
|
|
375
329
|
describe 'UF: 14 - Roraima/RR' do
|
376
330
|
it "Para tipo de emissão :normal" do
|
377
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '14'
|
378
|
-
subject.gateway.
|
379
|
-
subject.gateway.env.must_equal env
|
331
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '14'
|
332
|
+
subject.gateway.must_equal :svrs
|
380
333
|
end
|
381
334
|
it "Para tipo de emissão :svc" do
|
382
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '14',
|
383
|
-
subject.gateway.
|
384
|
-
subject.gateway.env.must_equal env
|
335
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '14', tipo_emissao: :svc
|
336
|
+
subject.gateway.must_equal :svc_an
|
385
337
|
end
|
386
338
|
end
|
387
339
|
|
388
340
|
describe 'UF: 42 - Santa Catarina/SC' do
|
389
341
|
it "Para tipo de emissão :normal" do
|
390
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '42'
|
391
|
-
subject.gateway.
|
392
|
-
subject.gateway.env.must_equal env
|
342
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '42'
|
343
|
+
subject.gateway.must_equal :svrs
|
393
344
|
end
|
394
345
|
it "Para tipo de emissão :svc" do
|
395
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '42',
|
396
|
-
subject.gateway.
|
397
|
-
subject.gateway.env.must_equal env
|
346
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '42', tipo_emissao: :svc
|
347
|
+
subject.gateway.must_equal :svc_an
|
398
348
|
end
|
399
349
|
end
|
400
350
|
|
401
351
|
describe 'UF: 35 - São Paulo/SP' do
|
402
352
|
it "Para tipo de emissão :normal" do
|
403
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '35'
|
404
|
-
subject.gateway.
|
405
|
-
subject.gateway.env.must_equal env
|
353
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '35'
|
354
|
+
subject.gateway.must_equal :sp
|
406
355
|
end
|
407
356
|
it "Para tipo de emissão :svc" do
|
408
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '35',
|
409
|
-
subject.gateway.
|
410
|
-
subject.gateway.env.must_equal env
|
357
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '35', tipo_emissao: :svc
|
358
|
+
subject.gateway.must_equal :svc_an
|
411
359
|
end
|
412
360
|
end
|
413
361
|
|
414
362
|
describe 'UF: 28 - Sergipe/SE' do
|
415
363
|
it "Para tipo de emissão :normal" do
|
416
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '28'
|
417
|
-
subject.gateway.
|
418
|
-
subject.gateway.env.must_equal env
|
364
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '28'
|
365
|
+
subject.gateway.must_equal :svrs
|
419
366
|
end
|
420
367
|
it "Para tipo de emissão :svc" do
|
421
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '28',
|
422
|
-
subject.gateway.
|
423
|
-
subject.gateway.env.must_equal env
|
368
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '28', tipo_emissao: :svc
|
369
|
+
subject.gateway.must_equal :svc_an
|
424
370
|
end
|
425
371
|
end
|
426
372
|
|
427
373
|
describe 'UF: 17 - Tocantins/TO' do
|
428
374
|
it "Para tipo de emissão :normal" do
|
429
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '17'
|
430
|
-
subject.gateway.
|
431
|
-
subject.gateway.env.must_equal env
|
375
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '17'
|
376
|
+
subject.gateway.must_equal :svrs
|
432
377
|
end
|
433
378
|
it "Para tipo de emissão :svc" do
|
434
|
-
subject.assign_attributes ibge_code_of_issuer_uf: '17',
|
435
|
-
subject.gateway.
|
436
|
-
subject.gateway.env.must_equal env
|
379
|
+
subject.assign_attributes ibge_code_of_issuer_uf: '17', tipo_emissao: :svc
|
380
|
+
subject.gateway.must_equal :svc_an
|
437
381
|
end
|
438
382
|
end
|
439
383
|
end
|
440
384
|
|
385
|
+
describe '#nfe_settings - Configurações da Nota fiscal de acordo com a versão' do
|
386
|
+
it "Deve carregar as configurações da nota fiscal de acordo com a versão" do
|
387
|
+
BrNfe.stubs(:settings).returns({nfe: {v1: :settings_v1, v2: :settings_v2}})
|
388
|
+
subject.nfe_version = :v1
|
389
|
+
subject.nfe_settings.must_equal :settings_v1
|
390
|
+
|
391
|
+
subject.nfe_version = :v2
|
392
|
+
subject.nfe_settings.must_equal :settings_v2
|
393
|
+
end
|
394
|
+
end
|
395
|
+
|
396
|
+
describe '#gateway_settings' do
|
397
|
+
it "Deve carregar as configurações do gateway através das configurações da nfe" do
|
398
|
+
subject.expects(:nfe_settings).returns({gateway: {sc: :anything}})
|
399
|
+
subject.expects(:gateway).returns(:sc)
|
400
|
+
subject.gateway_settings.must_equal :anything
|
401
|
+
end
|
402
|
+
end
|
403
|
+
|
441
404
|
describe 'Métodos que devem ser sobrescritos' do
|
442
|
-
it '#
|
443
|
-
assert_raises
|
444
|
-
subject.
|
405
|
+
it '#operation_name' do
|
406
|
+
assert_raises NotImplementedError do
|
407
|
+
subject.operation_name
|
445
408
|
end
|
446
409
|
end
|
447
|
-
it '#
|
448
|
-
assert_raises
|
449
|
-
subject.
|
410
|
+
it '#response_class_builder' do
|
411
|
+
assert_raises NotImplementedError do
|
412
|
+
subject.send :response_class_builder
|
450
413
|
end
|
451
414
|
end
|
452
415
|
end
|
453
416
|
|
417
|
+
describe '#method_wsdl' do
|
418
|
+
it "Deve retornar o método wsdl da operação de acordo com o ambiente" do
|
419
|
+
subject.expects(:gateway_settings).returns({operation: {operation_name: {env: {operation_method: 'result'}}}})
|
420
|
+
subject.expects(:operation_name).returns(:operation_name)
|
421
|
+
subject.env = :env
|
422
|
+
subject.method_wsdl.must_equal 'result'
|
423
|
+
end
|
424
|
+
end
|
425
|
+
|
426
|
+
describe '#url_xmlns' do
|
427
|
+
it "Deve retornar o método wsdl da operação de acordo com o ambiente" do
|
428
|
+
subject.expects(:gateway_settings).returns({operation: {operation_name: {env: {url_xmlns: 'result'}}}})
|
429
|
+
subject.expects(:operation_name).returns(:operation_name)
|
430
|
+
subject.env = :env
|
431
|
+
subject.url_xmlns.must_equal 'result'
|
432
|
+
end
|
433
|
+
end
|
434
|
+
|
435
|
+
describe '#gateway_xml_version' do
|
436
|
+
it "Deve retornar o método wsdl da operação de acordo com o ambiente" do
|
437
|
+
subject.expects(:gateway_settings).returns({operation: {operation_name: {env: {xml_version: :v3_10}}}})
|
438
|
+
subject.expects(:operation_name).returns(:operation_name)
|
439
|
+
subject.env = :env
|
440
|
+
subject.gateway_xml_version.must_equal :v3_10
|
441
|
+
end
|
442
|
+
end
|
443
|
+
|
444
|
+
describe '#xmlns_soap' do
|
445
|
+
it "Deve retornar o método wsdl da operação de acordo com o ambiente" do
|
446
|
+
subject.expects(:gateway_settings).returns({operation: {operation_name: {env: {xmlns_soap: 'anything'}}}})
|
447
|
+
subject.expects(:operation_name).returns(:operation_name)
|
448
|
+
subject.env = :env
|
449
|
+
subject.xmlns_soap.must_equal 'anything'
|
450
|
+
end
|
451
|
+
end
|
452
|
+
|
454
453
|
describe '#xml_version - deve converter a versão em valor usável no XML' do
|
455
454
|
it "Para versão :v3_10" do
|
456
455
|
subject.stubs(:gateway_xml_version).returns(:v3_10)
|
@@ -462,6 +461,30 @@ describe BrNfe::Product::Operation::Base do
|
|
462
461
|
end
|
463
462
|
end
|
464
463
|
|
464
|
+
describe '#client_wsdl_params' do
|
465
|
+
it "deve conter os parametros para definição do Savon client fazendo merge com as configurações da operação e ambiente" do
|
466
|
+
subject.expects(:gateway_settings).returns({soap_client: {operation_name: {env: {
|
467
|
+
wsdl: 'http://anu.com?wsdl',
|
468
|
+
ssl_version: :TLSV1
|
469
|
+
}}}})
|
470
|
+
subject.expects(:operation_name).returns(:operation_name)
|
471
|
+
subject.env = :env
|
472
|
+
subject.stubs(:certificate).returns(:certificate)
|
473
|
+
subject.stubs(:certificate_key).returns(:certificate_key)
|
474
|
+
subject.stubs(:certificate_pkcs12_password).returns(:certificate_pkcs12_password)
|
475
|
+
|
476
|
+
result = subject.client_wsdl_params
|
477
|
+
result[:wsdl].must_equal 'http://anu.com?wsdl'
|
478
|
+
result[:log].must_equal BrNfe.client_wsdl_log
|
479
|
+
result[:pretty_print_xml].must_equal BrNfe.client_wsdl_pretty_print_xml
|
480
|
+
result[:ssl_verify_mode].must_equal :none
|
481
|
+
result[:ssl_version].must_equal :TLSV1
|
482
|
+
result[:ssl_cert].must_equal :certificate
|
483
|
+
result[:ssl_cert_key].must_equal :certificate_key
|
484
|
+
result[:ssl_cert_key_password].must_equal :certificate_pkcs12_password
|
485
|
+
end
|
486
|
+
end
|
487
|
+
|
465
488
|
describe "#emitente" do
|
466
489
|
class OtherClassEmitente < BrNfe::ActiveModelBase
|
467
490
|
end
|
@@ -534,5 +557,4 @@ describe BrNfe::Product::Operation::Base do
|
|
534
557
|
subject.inicio_contingencia.must_be_nil
|
535
558
|
end
|
536
559
|
end
|
537
|
-
|
538
560
|
end
|