br_nfe 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +0 -1
- data/Gemfile.lock +1 -1
- data/README.markdown +264 -106
- data/lib/br_nfe/{helper → association}/have_address.rb +1 -1
- data/lib/br_nfe/{helper → association}/have_condicao_pagamento.rb +1 -1
- data/lib/br_nfe/association/have_destinatario.rb +22 -0
- data/lib/br_nfe/association/have_emitente.rb +24 -0
- data/lib/br_nfe/base.rb +37 -27
- data/lib/br_nfe/condicao_pagamento.rb +2 -0
- data/lib/br_nfe/constants.rb +33 -0
- data/lib/br_nfe/endereco.rb +10 -0
- data/lib/br_nfe/helper/string_methods.rb +4 -0
- data/lib/br_nfe/{emitente.rb → person.rb} +11 -7
- data/lib/br_nfe/product/base.rb +82 -0
- data/lib/br_nfe/product/consulta_status_servico.rb +35 -0
- data/lib/br_nfe/product/emitente.rb +8 -0
- data/lib/br_nfe/product/gateway/base.rb +62 -0
- data/lib/br_nfe/product/gateway/web_service_svrs.rb +39 -0
- data/lib/br_nfe/product/value_nf.rb +9 -0
- data/lib/br_nfe/product/xml/soap_env.xml.slim +8 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/consReciNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/consSitNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/consStatServ_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/enviNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/inutNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/leiauteConsSitNFe_v3.10.xsd +502 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/leiauteConsStatServ_v3.10.xsd +98 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/leiauteInutNFe_v3.10.xsd +193 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/leiauteNFe_v3.10.xsd +6060 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/nfe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/procInutNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/procNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/retConsReciNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/retConsSitNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/retConsStatServ_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/retEnviNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/retInutNFe_v3.10.xsd +9 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/tiposBasico_v3.10.xsd +571 -0
- data/lib/br_nfe/product/xml/v3_10/XSD/xmldsig-core-schema_v1.01.xsd +98 -0
- data/lib/br_nfe/product/xml/v3_10/consulta_status_servico.xml.slim +4 -0
- data/lib/br_nfe/service/association/have_intermediario.rb +26 -0
- data/lib/br_nfe/service/association/have_rps.rb +36 -0
- data/lib/br_nfe/service/base.rb +24 -20
- data/lib/br_nfe/service/betha/v1/cancela_nfse.rb +43 -0
- data/lib/br_nfe/service/betha/v1/consulta_lote_rps.rb +20 -6
- data/lib/br_nfe/service/betha/v1/consulta_nfs_por_rps.rb +17 -6
- data/lib/br_nfe/service/betha/v1/consulta_nfse.rb +16 -5
- data/lib/br_nfe/service/betha/v1/consulta_situacao_lote_rps.rb +15 -6
- data/lib/br_nfe/service/betha/v1/gateway.rb +4 -0
- data/lib/br_nfe/service/betha/v1/recepcao_lote_rps.rb +13 -5
- data/lib/br_nfe/service/betha/v1/xml/_tc_identificacao_prestador.xml.slim +3 -0
- data/lib/br_nfe/service/betha/v1/xml/_tc_pedido_cancelamento.xml.slim +4 -0
- data/lib/br_nfe/service/concerns/rules/cancelamento_nfs.rb +8 -0
- data/lib/br_nfe/service/concerns/rules/consulta_nfs_por_rps.rb +1 -1
- data/lib/br_nfe/service/concerns/rules/consulta_nfse.rb +5 -2
- data/lib/br_nfe/service/concerns/values_ts/service_v1.rb +319 -0
- data/lib/br_nfe/service/destinatario.rb +7 -0
- data/lib/br_nfe/service/emitente.rb +8 -0
- data/lib/br_nfe/service/intermediario.rb +1 -12
- data/lib/br_nfe/service/item.rb +7 -7
- data/lib/br_nfe/service/response/build/base.rb +166 -0
- data/lib/br_nfe/service/response/build/cancelamento.rb +62 -0
- data/lib/br_nfe/service/response/build/consulta_lote_rps.rb +25 -0
- data/lib/br_nfe/service/response/build/consulta_nfs_por_rps.rb +25 -0
- data/lib/br_nfe/service/response/build/consulta_nfse.rb +24 -0
- data/lib/br_nfe/service/response/build/consulta_situacao_lote_rps.rb +56 -0
- data/lib/br_nfe/service/response/build/invoice_build.rb +359 -0
- data/lib/br_nfe/service/response/build/recepcao_lote_rps.rb +69 -0
- data/lib/br_nfe/service/response/cancelamento.rb +22 -0
- data/lib/br_nfe/service/response/consulta_lote_rps.rb +18 -0
- data/lib/br_nfe/service/response/consulta_nfs_por_rps.rb +10 -0
- data/lib/br_nfe/service/response/consulta_nfse.rb +10 -0
- data/lib/br_nfe/service/response/consulta_situacao_lote_rps.rb +74 -0
- data/lib/br_nfe/service/response/default.rb +93 -0
- data/lib/br_nfe/{response/service → service/response}/nota_fiscal.rb +19 -12
- data/lib/br_nfe/service/response/paths/v1/tc_nfse.rb +275 -0
- data/lib/br_nfe/service/response/recepcao_lote_rps.rb +35 -0
- data/lib/br_nfe/service/rps.rb +30 -27
- data/lib/br_nfe/service/sc/florianopolis/xml/_service_item.xml.slim +4 -4
- data/lib/br_nfe/service/sc/florianopolis/xml/inf_requisicao.xml.slim +4 -4
- data/lib/br_nfe/service/simpliss/v1/cancela_nfse.rb +16 -6
- data/lib/br_nfe/service/simpliss/v1/consulta_lote_rps.rb +20 -12
- data/lib/br_nfe/service/simpliss/v1/consulta_nfs_por_rps.rb +21 -6
- data/lib/br_nfe/service/simpliss/v1/consulta_nfse.rb +20 -6
- data/lib/br_nfe/service/simpliss/v1/consulta_situacao_lote_rps.rb +17 -6
- data/lib/br_nfe/service/simpliss/v1/recepcao_lote_rps.rb +16 -4
- data/lib/br_nfe/service/simpliss/v1/xml/_tc_item_servico.xml.slim +2 -2
- data/lib/br_nfe/service/thema/v1/cancela_nfse.rb +21 -19
- data/lib/br_nfe/service/thema/v1/consulta_lote_rps.rb +21 -19
- data/lib/br_nfe/service/thema/v1/consulta_nfs_por_rps.rb +25 -18
- data/lib/br_nfe/service/thema/v1/consulta_nfse.rb +20 -20
- data/lib/br_nfe/service/thema/v1/consulta_situacao_lote_rps.rb +14 -20
- data/lib/br_nfe/service/thema/v1/recepcao_lote_rps.rb +11 -16
- data/lib/br_nfe/service/thema/v1/recepcao_lote_rps_limitado.rb +8 -6
- data/lib/br_nfe/service/xml/v1/_tc_identificacao_nfse.xml.slim +1 -1
- data/lib/br_nfe/service/xml/v1/_tc_pedido_cancelamento.xml.slim +1 -1
- data/lib/br_nfe/service/xml/v1/_tc_valores.xml.slim +11 -11
- data/lib/br_nfe/version.rb +1 -1
- data/lib/br_nfe.rb +62 -62
- data/test/br_nfe/association/have_address_test.rb +64 -0
- data/test/br_nfe/association/have_condicao_pagamento_test.rb +75 -0
- data/test/br_nfe/association/have_destinatario_test.rb +76 -0
- data/test/br_nfe/association/have_emitente_test.rb +80 -0
- data/test/br_nfe/base_test.rb +96 -61
- data/test/br_nfe/endereco_test.rb +21 -0
- data/test/br_nfe/person_test.rb +55 -0
- data/test/br_nfe/product/base_test.rb +150 -0
- data/test/br_nfe/product/consulta_status_servico_test.rb +59 -0
- data/test/br_nfe/product/emitente_test.rb +29 -0
- data/test/br_nfe/product/gateway/base_test.rb +16 -0
- data/test/br_nfe/product/gateway/web_service_svrs_test.rb +36 -0
- data/test/br_nfe/service/association/have_intermediario_test.rb +80 -0
- data/test/br_nfe/service/association/have_rps_test.rb +62 -0
- data/test/br_nfe/service/base_test.rb +42 -42
- data/test/br_nfe/service/betha/v1/cancela_nfse_test.rb +90 -0
- data/test/br_nfe/service/betha/v1/consulta_lote_rps_test.rb +105 -5
- data/test/br_nfe/service/betha/v1/consulta_nfs_por_rps_test.rb +103 -5
- data/test/br_nfe/service/betha/v1/consulta_nfse_test.rb +114 -5
- data/test/br_nfe/service/betha/v1/consulta_situacao_lote_rps_test.rb +118 -5
- data/test/br_nfe/service/betha/v1/gateway_test.rb +1 -1
- data/test/br_nfe/service/betha/v1/recepcao_lote_rps_test.rb +51 -5
- data/test/br_nfe/service/concerns/rules/cancelamento_nfs_test.rb +2 -2
- data/test/br_nfe/service/concerns/rules/consulta_nfs_por_rps_test.rb +2 -7
- data/test/br_nfe/service/concerns/rules/consulta_nfse_test.rb +24 -3
- data/test/br_nfe/service/concerns/rules/recepcao_lote_rps_test.rb +1 -1
- data/test/br_nfe/{helper → service/concerns}/values_ts/service_v1_test.rb +2 -2
- data/test/br_nfe/{destinatario_test.rb → service/destinatario_test.rb} +3 -4
- data/test/br_nfe/service/emitente_test.rb +29 -0
- data/test/br_nfe/service/item_test.rb +14 -14
- data/test/br_nfe/service/response/build/base_test.rb +80 -0
- data/test/br_nfe/{response/service → service/response}/default_test.rb +1 -82
- data/test/br_nfe/service/response/nota_fiscal_test.rb +59 -0
- data/test/br_nfe/{response/service → service/response}/paths/v1/tc_nfse_test.rb +10 -10
- data/test/br_nfe/service/rps_test.rb +107 -138
- data/test/br_nfe/service/sc/florianopolis/emission_rps_test.rb +9 -9
- data/test/br_nfe/service/simpliss/v1/base_test.rb +1 -1
- data/test/br_nfe/service/simpliss/v1/cancela_nfse_test.rb +7 -10
- data/test/br_nfe/service/simpliss/v1/consulta_lote_rps_test.rb +11 -18
- data/test/br_nfe/service/simpliss/v1/consulta_nfs_por_rps_test.rb +11 -18
- data/test/br_nfe/service/simpliss/v1/consulta_nfse_test.rb +11 -18
- data/test/br_nfe/service/simpliss/v1/consulta_situacao_lote_rps_test.rb +7 -11
- data/test/br_nfe/service/simpliss/v1/recepcao_lote_rps_test.rb +3 -9
- data/test/br_nfe/service/thema/v1/base_test.rb +1 -1
- data/test/br_nfe/service/thema/v1/cancela_nfse_test.rb +7 -14
- data/test/br_nfe/service/thema/v1/consulta_lote_rps_test.rb +6 -17
- data/test/br_nfe/service/thema/v1/consulta_nfs_por_rps_test.rb +6 -13
- data/test/br_nfe/service/thema/v1/consulta_nfse_test.rb +11 -18
- data/test/br_nfe/service/thema/v1/consulta_situacao_lote_rps_test.rb +7 -11
- data/test/br_nfe/service/thema/v1/recepcao_lote_rps_limitado_test.rb +1 -5
- data/test/br_nfe/service/thema/v1/recepcao_lote_rps_test.rb +3 -9
- data/test/factories/base.rb +0 -1
- data/test/factories/{emitente.rb → person.rb} +1 -1
- data/test/factories/product/base.rb +12 -0
- data/test/factories/product/consulta_status_servico.rb +12 -0
- data/test/factories/product/emitente.rb +15 -0
- data/test/factories/product/gateway/base.rb +5 -0
- data/test/factories/product/gateway/web_service_svrs.rb +5 -0
- data/test/factories/service/betha/v1/{cancelamento_nfs.rb → cancela_nfse.rb} +2 -1
- data/test/factories/service/betha/v1/consulta_lote_rps.rb +1 -1
- data/test/factories/service/betha/v1/consulta_nfs_por_rps.rb +1 -1
- data/test/factories/service/betha/v1/consulta_nfse.rb +1 -1
- data/test/factories/service/betha/v1/consulta_situacao_lote_rps.rb +1 -1
- data/test/factories/{destinatario.rb → service/destinatario.rb} +1 -1
- data/test/factories/service/emitente.rb +15 -0
- data/test/factories/service/item.rb +4 -4
- data/test/factories/service/response/build_response.rb +5 -0
- data/test/factories/service/response/default.rb +6 -0
- data/test/factories/{response/service → service/response}/nota_fiscal.rb +8 -8
- data/test/factories/service/rps.rb +11 -11
- data/test/factories/service/sc/florianopolis/base.rb +1 -1
- data/test/factories/service/sc/florianopolis/cancellation.rb +1 -1
- data/test/factories/service/sc/florianopolis/emission_rps.rb +1 -1
- data/test/factories/service/simpliss/v1/base.rb +1 -1
- data/test/factories/service/simpliss/v1/cancela_nfse.rb +1 -1
- data/test/factories/service/simpliss/v1/consulta_lote_rps.rb +1 -1
- data/test/factories/service/simpliss/v1/consulta_nfs_por_rps.rb +1 -1
- data/test/factories/service/simpliss/v1/consulta_nfse.rb +1 -1
- data/test/factories/service/simpliss/v1/consulta_situacao_lote_rps.rb +1 -1
- data/test/factories/service/simpliss/v1/recepcao_lote_rps.rb +1 -1
- data/test/factories/service/thema/v1/base.rb +1 -1
- data/test/factories/service/thema/v1/cancela_nfse.rb +1 -1
- data/test/factories/service/thema/v1/consulta_lote_rps.rb +1 -1
- data/test/factories/service/thema/v1/consulta_nfs_por_rps.rb +1 -1
- data/test/factories/service/thema/v1/consulta_nfse.rb +1 -1
- data/test/factories/service/thema/v1/consulta_situacao_lote_rps.rb +1 -1
- data/test/factories/service/thema/v1/recepcao_lote_rps.rb +1 -1
- data/test/fixtures/service/response/betha/v1/cancela_nfse/fault.xml +17 -0
- data/test/fixtures/service/response/betha/v1/cancela_nfse/success.xml +48 -0
- data/test/fixtures/service/response/betha/v1/consulta_lote_rps/fault.xml +18 -0
- data/test/fixtures/service/response/betha/v1/consulta_lote_rps/success.xml +108 -0
- data/test/fixtures/service/response/betha/v1/consulta_nfse/fault.xml +18 -0
- data/test/fixtures/service/response/betha/v1/consulta_nfse/nfs_empty.xml +12 -0
- data/test/fixtures/service/response/betha/v1/consulta_nfse/success.xml +115 -0
- data/test/fixtures/service/response/betha/v1/consulta_nfse_por_rps/fault.xml +18 -0
- data/test/fixtures/service/response/betha/v1/consulta_nfse_por_rps/success.xml +103 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/error.xml +13 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/fault.xml +17 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/success.xml +13 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/unprocessed.xml +13 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/unprocessed_by_code_error.xml +17 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/unreceived.xml +13 -0
- data/test/fixtures/service/response/betha/v1/consulta_situacao_lote_rps/unreceived_by_code_error.xml +17 -0
- data/test/fixtures/service/response/betha/v1/recepcao_lote_rps/error.xml +17 -0
- data/test/fixtures/service/response/betha/v1/recepcao_lote_rps/success.xml +14 -0
- metadata +160 -94
- data/lib/br_nfe/destinatario.rb +0 -26
- data/lib/br_nfe/helper/have_destinatario.rb +0 -18
- data/lib/br_nfe/helper/have_emitente.rb +0 -20
- data/lib/br_nfe/helper/have_intermediario.rb +0 -24
- data/lib/br_nfe/helper/have_rps.rb +0 -34
- data/lib/br_nfe/helper/values_ts/service_v1.rb +0 -317
- data/lib/br_nfe/response/service/build_response.rb +0 -463
- data/lib/br_nfe/response/service/default.rb +0 -185
- data/lib/br_nfe/response/service/paths/base.rb +0 -127
- data/lib/br_nfe/response/service/paths/v1/servico_cancelar_nfse_resposta.rb +0 -22
- data/lib/br_nfe/response/service/paths/v1/servico_consultar_lote_rps_resposta.rb +0 -25
- data/lib/br_nfe/response/service/paths/v1/servico_consultar_nfse_resposta.rb +0 -25
- data/lib/br_nfe/response/service/paths/v1/servico_consultar_nfse_rps_resposta.rb +0 -25
- data/lib/br_nfe/response/service/paths/v1/servico_consultar_situacao_lote_rps_resposta.rb +0 -31
- data/lib/br_nfe/response/service/paths/v1/servico_enviar_lote_rps_resposta.rb +0 -36
- data/lib/br_nfe/response/service/paths/v1/tc_nfse.rb +0 -271
- data/lib/br_nfe/service/betha/v1/cancelamento_nfs.rb +0 -36
- data/lib/br_nfe/service/betha/v1/response_paths/servico_consultar_lote_rps_resposta.rb +0 -23
- data/lib/br_nfe/service/betha/v1/response_paths/servico_consultar_nfse_resposta.rb +0 -21
- data/lib/br_nfe/service/betha/v1/response_paths/servico_consultar_nfse_rps_resposta.rb +0 -21
- data/lib/br_nfe/service/simpliss/v1/response_paths/servico_cancelar_nfse_resposta.rb +0 -22
- data/lib/br_nfe/service/simpliss/v1/response_paths/servico_consultar_lote_rps_resposta.rb +0 -25
- data/lib/br_nfe/service/simpliss/v1/response_paths/servico_consultar_nfse_resposta.rb +0 -25
- data/lib/br_nfe/service/simpliss/v1/response_paths/servico_consultar_nfse_rps_resposta.rb +0 -25
- data/lib/br_nfe/service/simpliss/v1/response_paths/servico_consultar_situacao_lote_rps_resposta.rb +0 -31
- data/lib/br_nfe/service/simpliss/v1/response_paths/servico_enviar_lote_rps_resposta.rb +0 -36
- data/lib/br_nfe/service/thema/v1/response_paths/servico_cancelar_nfse_resposta.rb +0 -17
- data/lib/br_nfe/service/thema/v1/response_paths/servico_consultar_nfse_rps_resposta.rb +0 -19
- data/test/br_nfe/emitente_test.rb +0 -46
- data/test/br_nfe/helper/have_address_test.rb +0 -62
- data/test/br_nfe/helper/have_condicao_pagamento_test.rb +0 -71
- data/test/br_nfe/helper/have_destinatario_test.rb +0 -64
- data/test/br_nfe/helper/have_emitente_test.rb +0 -63
- data/test/br_nfe/helper/have_intermediario_test.rb +0 -77
- data/test/br_nfe/helper/have_rps_test.rb +0 -59
- data/test/br_nfe/response/service/build_response_test.rb +0 -205
- data/test/br_nfe/response/service/nota_fiscal_test.rb +0 -41
- data/test/br_nfe/response/service/paths/base_test.rb +0 -196
- data/test/br_nfe/response/service/paths/v1/servico_cancelar_nfse_resposta_test.rb +0 -25
- data/test/br_nfe/response/service/paths/v1/servico_consultar_lote_rps_resposta_test.rb +0 -30
- data/test/br_nfe/response/service/paths/v1/servico_consultar_nfse_resposta_test.rb +0 -30
- data/test/br_nfe/response/service/paths/v1/servico_consultar_nfse_rps_resposta_test.rb +0 -30
- data/test/br_nfe/response/service/paths/v1/servico_consultar_situacao_lote_rps_resposta_test.rb +0 -30
- data/test/br_nfe/response/service/paths/v1/servico_enviar_lote_rps_resposta_test.rb +0 -34
- data/test/br_nfe/service/betha/v1/cancelamento_nfs_test.rb +0 -54
- data/test/br_nfe/service/betha/v1/response_paths/servico_consultar_lote_rps_resposta_test.rb +0 -16
- data/test/br_nfe/service/betha/v1/response_paths/servico_consultar_nfse_resposta_test.rb +0 -16
- data/test/br_nfe/service/betha/v1/response_paths/servico_consultar_nfse_rps_resposta_test.rb +0 -16
- data/test/factories/response/service/build_response.rb +0 -5
- data/test/factories/response/service/default.rb +0 -10
@@ -3,7 +3,7 @@ require 'test_helper'
|
|
3
3
|
describe BrNfe::Service::Simpliss::V1::Base do
|
4
4
|
subject { FactoryGirl.build(:service_simpliss_v1_base, emitente: emitente) }
|
5
5
|
let(:rps) { FactoryGirl.build(:br_nfe_rps, :completo) }
|
6
|
-
let(:emitente) { FactoryGirl.build(:
|
6
|
+
let(:emitente) { FactoryGirl.build(:service_emitente) }
|
7
7
|
let(:intermediario) { FactoryGirl.build(:intermediario) }
|
8
8
|
|
9
9
|
describe "inheritance class" do
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
describe BrNfe::Service::Simpliss::V1::CancelaNfse do
|
4
4
|
subject { FactoryGirl.build(:service_simpliss_v1_cancela_nfse, emitente: emitente) }
|
5
|
-
let(:emitente) { FactoryGirl.build(:
|
5
|
+
let(:emitente) { FactoryGirl.build(:service_emitente) }
|
6
6
|
|
7
7
|
describe "superclass" do
|
8
8
|
it { subject.class.superclass.must_equal BrNfe::Service::Simpliss::V1::Base }
|
@@ -16,10 +16,6 @@ describe BrNfe::Service::Simpliss::V1::CancelaNfse do
|
|
16
16
|
it { subject.method_wsdl.must_equal :cancelar_nfse }
|
17
17
|
end
|
18
18
|
|
19
|
-
it "#response_root_path" do
|
20
|
-
subject.response_root_path.must_equal [:cancelar_nfse_response]
|
21
|
-
end
|
22
|
-
|
23
19
|
it "#body_xml_path" do
|
24
20
|
subject.body_xml_path.must_equal []
|
25
21
|
end
|
@@ -62,7 +58,11 @@ describe BrNfe::Service::Simpliss::V1::CancelaNfse do
|
|
62
58
|
subject.request
|
63
59
|
response = subject.response
|
64
60
|
|
65
|
-
response.
|
61
|
+
response.must_be_kind_of BrNfe::Service::Response::Cancelamento
|
62
|
+
response.data_hora_cancelamento.must_equal Time.parse('2016-07-29T09:38:24.4803985-03:00')
|
63
|
+
response.codigo_cancelamento.must_equal '2'
|
64
|
+
response.numero_nfs.must_equal '3'
|
65
|
+
|
66
66
|
response.status.must_equal :success
|
67
67
|
response.successful_request?.must_equal true
|
68
68
|
end
|
@@ -74,10 +74,7 @@ describe BrNfe::Service::Simpliss::V1::CancelaNfse do
|
|
74
74
|
subject.request
|
75
75
|
response = subject.response
|
76
76
|
|
77
|
-
response.
|
78
|
-
response.data_recebimento.must_be_nil
|
79
|
-
response.numero_lote.must_be_nil
|
80
|
-
response.cancelation_date_time.must_be_nil
|
77
|
+
response.data_hora_cancelamento.must_be_nil
|
81
78
|
|
82
79
|
response.status.must_equal :falied
|
83
80
|
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
describe BrNfe::Service::Simpliss::V1::ConsultaLoteRps do
|
4
4
|
subject { FactoryGirl.build(:service_simpliss_v1_consulta_lote_rps, emitente: emitente) }
|
5
|
-
let(:emitente) { FactoryGirl.build(:
|
5
|
+
let(:emitente) { FactoryGirl.build(:service_emitente) }
|
6
6
|
|
7
7
|
it { must validate_presence_of(:protocolo) }
|
8
8
|
|
@@ -14,10 +14,6 @@ describe BrNfe::Service::Simpliss::V1::ConsultaLoteRps do
|
|
14
14
|
it { subject.method_wsdl.must_equal :consultar_lote_rps }
|
15
15
|
end
|
16
16
|
|
17
|
-
it "#response_root_path" do
|
18
|
-
subject.response_root_path.must_equal [:consultar_lote_rps_response]
|
19
|
-
end
|
20
|
-
|
21
17
|
it "#body_xml_path" do
|
22
18
|
subject.body_xml_path.must_equal []
|
23
19
|
end
|
@@ -60,9 +56,6 @@ describe BrNfe::Service::Simpliss::V1::ConsultaLoteRps do
|
|
60
56
|
subject.request
|
61
57
|
response = subject.response
|
62
58
|
|
63
|
-
response.protocolo.must_be_nil
|
64
|
-
response.data_recebimento.must_be_nil
|
65
|
-
response.numero_lote.must_be_nil
|
66
59
|
response.status.must_equal :falied
|
67
60
|
response.error_messages.size.must_equal 2
|
68
61
|
response.error_messages[0][:code].must_equal 'E138'
|
@@ -108,13 +101,13 @@ describe BrNfe::Service::Simpliss::V1::ConsultaLoteRps do
|
|
108
101
|
nf.cnae_code.must_equal '6202300'
|
109
102
|
nf.description.must_equal '1 TESTE WEBSERVICE: R$ 5,00'
|
110
103
|
nf.codigo_municipio.must_equal '4204202'
|
111
|
-
nf.
|
112
|
-
nf.
|
104
|
+
nf.valor_total_servicos.must_equal '10'
|
105
|
+
nf.iss_retido.must_equal '2'
|
113
106
|
nf.total_iss.must_equal '0.2'
|
114
|
-
nf.
|
115
|
-
nf.
|
107
|
+
nf.base_calculo.must_equal '10'
|
108
|
+
nf.iss_aliquota.must_equal '3.5'
|
116
109
|
nf.valor_liquido.must_equal '10'
|
117
|
-
nf.
|
110
|
+
nf.deducoes.must_be_nil
|
118
111
|
nf.valor_pis.must_be_nil
|
119
112
|
nf.valor_cofins.must_be_nil
|
120
113
|
nf.valor_inss.must_be_nil
|
@@ -176,13 +169,13 @@ describe BrNfe::Service::Simpliss::V1::ConsultaLoteRps do
|
|
176
169
|
nf.cnae_code.must_equal '6202300'
|
177
170
|
nf.description.must_equal '1 TESTE WEBSERVICE: R$ 5,00'
|
178
171
|
nf.codigo_municipio.must_equal '4204202'
|
179
|
-
nf.
|
180
|
-
nf.
|
172
|
+
nf.valor_total_servicos.must_equal '500'
|
173
|
+
nf.iss_retido.must_equal '2'
|
181
174
|
nf.total_iss.must_equal '0.2'
|
182
|
-
nf.
|
183
|
-
nf.
|
175
|
+
nf.base_calculo.must_equal '10'
|
176
|
+
nf.iss_aliquota.must_equal '2'
|
184
177
|
nf.valor_liquido.must_equal '463.02'
|
185
|
-
nf.
|
178
|
+
nf.deducoes.must_equal '7'
|
186
179
|
nf.valor_pis.must_equal '1.12'
|
187
180
|
nf.valor_cofins.must_equal '2.12'
|
188
181
|
nf.valor_inss.must_equal '3.12'
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
describe BrNfe::Service::Simpliss::V1::ConsultaNfsPorRps do
|
4
4
|
subject { FactoryGirl.build(:service_simpliss_v1_consulta_nfs_por_rps, emitente: emitente) }
|
5
|
-
let(:emitente) { FactoryGirl.build(:
|
5
|
+
let(:emitente) { FactoryGirl.build(:service_emitente) }
|
6
6
|
let(:rps) { subject.rps }
|
7
7
|
|
8
8
|
describe "superclass" do
|
@@ -17,13 +17,6 @@ describe BrNfe::Service::Simpliss::V1::ConsultaNfsPorRps do
|
|
17
17
|
it { subject.method_wsdl.must_equal :consultar_nfse_por_rps }
|
18
18
|
end
|
19
19
|
|
20
|
-
it "#response_root_path" do
|
21
|
-
subject.response_root_path.must_equal [:consultar_nfse_por_rps_response]
|
22
|
-
end
|
23
|
-
it "#body_xml_path" do
|
24
|
-
subject.body_xml_path.must_equal []
|
25
|
-
end
|
26
|
-
|
27
20
|
it "#soap_body_root_tag" do
|
28
21
|
subject.soap_body_root_tag.must_equal 'ConsultarNfsePorRps'
|
29
22
|
end
|
@@ -105,13 +98,13 @@ describe BrNfe::Service::Simpliss::V1::ConsultaNfsPorRps do
|
|
105
98
|
nf.cnae_code.must_equal '6202300'
|
106
99
|
nf.description.must_equal '1 TESTE WEBSERVICE: R$ 5,00'
|
107
100
|
nf.codigo_municipio.must_equal '4204202'
|
108
|
-
nf.
|
109
|
-
nf.
|
101
|
+
nf.valor_total_servicos.must_equal '10'
|
102
|
+
nf.iss_retido.must_equal '2'
|
110
103
|
nf.total_iss.must_equal '0.2'
|
111
|
-
nf.
|
112
|
-
nf.
|
104
|
+
nf.base_calculo.must_equal '10'
|
105
|
+
nf.iss_aliquota.must_equal '3.5'
|
113
106
|
nf.valor_liquido.must_equal '10'
|
114
|
-
nf.
|
107
|
+
nf.deducoes.must_be_nil
|
115
108
|
nf.valor_pis.must_be_nil
|
116
109
|
nf.valor_cofins.must_be_nil
|
117
110
|
nf.valor_inss.must_be_nil
|
@@ -173,13 +166,13 @@ describe BrNfe::Service::Simpliss::V1::ConsultaNfsPorRps do
|
|
173
166
|
nf.cnae_code.must_equal '6202300'
|
174
167
|
nf.description.must_equal '1 TESTE WEBSERVICE: R$ 5,00'
|
175
168
|
nf.codigo_municipio.must_equal '4204202'
|
176
|
-
nf.
|
177
|
-
nf.
|
169
|
+
nf.valor_total_servicos.must_equal '500'
|
170
|
+
nf.iss_retido.must_equal '2'
|
178
171
|
nf.total_iss.must_equal '0.2'
|
179
|
-
nf.
|
180
|
-
nf.
|
172
|
+
nf.base_calculo.must_equal '10'
|
173
|
+
nf.iss_aliquota.must_equal '2'
|
181
174
|
nf.valor_liquido.must_equal '463.02'
|
182
|
-
nf.
|
175
|
+
nf.deducoes.must_equal '7'
|
183
176
|
nf.valor_pis.must_equal '1.12'
|
184
177
|
nf.valor_cofins.must_equal '2.12'
|
185
178
|
nf.valor_inss.must_equal '3.12'
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
describe BrNfe::Service::Simpliss::V1::ConsultaNfse do
|
4
4
|
subject { FactoryGirl.build(:service_simpliss_v1_consulta_nfse, emitente: emitente) }
|
5
|
-
let(:emitente) { FactoryGirl.build(:
|
5
|
+
let(:emitente) { FactoryGirl.build(:service_emitente) }
|
6
6
|
let(:rps) { subject.rps }
|
7
7
|
|
8
8
|
describe "superclass" do
|
@@ -17,13 +17,6 @@ describe BrNfe::Service::Simpliss::V1::ConsultaNfse do
|
|
17
17
|
it { subject.method_wsdl.must_equal :consultar_nfse }
|
18
18
|
end
|
19
19
|
|
20
|
-
it "#response_root_path" do
|
21
|
-
subject.response_root_path.must_equal [:consultar_nfse_response]
|
22
|
-
end
|
23
|
-
it "#body_xml_path" do
|
24
|
-
subject.body_xml_path.must_equal []
|
25
|
-
end
|
26
|
-
|
27
20
|
it "#soap_body_root_tag" do
|
28
21
|
subject.soap_body_root_tag.must_equal 'ConsultarNfse'
|
29
22
|
end
|
@@ -92,13 +85,13 @@ describe BrNfe::Service::Simpliss::V1::ConsultaNfse do
|
|
92
85
|
nf.cnae_code.must_equal '6202300'
|
93
86
|
nf.description.must_equal '1 TESTE WEBSERVICE: R$ 5,00'
|
94
87
|
nf.codigo_municipio.must_equal '4204202'
|
95
|
-
nf.
|
96
|
-
nf.
|
88
|
+
nf.valor_total_servicos.must_equal '10'
|
89
|
+
nf.iss_retido.must_equal '2'
|
97
90
|
nf.total_iss.must_equal '0.2'
|
98
|
-
nf.
|
99
|
-
nf.
|
91
|
+
nf.base_calculo.must_equal '10'
|
92
|
+
nf.iss_aliquota.must_equal '3.5'
|
100
93
|
nf.valor_liquido.must_equal '10'
|
101
|
-
nf.
|
94
|
+
nf.deducoes.must_be_nil
|
102
95
|
nf.valor_pis.must_be_nil
|
103
96
|
nf.valor_cofins.must_be_nil
|
104
97
|
nf.valor_inss.must_be_nil
|
@@ -160,13 +153,13 @@ describe BrNfe::Service::Simpliss::V1::ConsultaNfse do
|
|
160
153
|
nf.cnae_code.must_equal '6202300'
|
161
154
|
nf.description.must_equal '1 TESTE WEBSERVICE: R$ 5,00'
|
162
155
|
nf.codigo_municipio.must_equal '4204202'
|
163
|
-
nf.
|
164
|
-
nf.
|
156
|
+
nf.valor_total_servicos.must_equal '500'
|
157
|
+
nf.iss_retido.must_equal '2'
|
165
158
|
nf.total_iss.must_equal '0.2'
|
166
|
-
nf.
|
167
|
-
nf.
|
159
|
+
nf.base_calculo.must_equal '10'
|
160
|
+
nf.iss_aliquota.must_equal '2'
|
168
161
|
nf.valor_liquido.must_equal '463.02'
|
169
|
-
nf.
|
162
|
+
nf.deducoes.must_equal '7'
|
170
163
|
nf.valor_pis.must_equal '1.12'
|
171
164
|
nf.valor_cofins.must_equal '2.12'
|
172
165
|
nf.valor_inss.must_equal '3.12'
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
describe BrNfe::Service::Simpliss::V1::ConsultaSituacaoLoteRps do
|
4
4
|
subject { FactoryGirl.build(:service_simpliss_v1_consulta_situacao_lote_rps, emitente: emitente) }
|
5
|
-
let(:emitente) { FactoryGirl.build(:
|
5
|
+
let(:emitente) { FactoryGirl.build(:service_emitente) }
|
6
6
|
|
7
7
|
it { must validate_presence_of(:protocolo) }
|
8
8
|
|
@@ -14,14 +14,6 @@ describe BrNfe::Service::Simpliss::V1::ConsultaSituacaoLoteRps do
|
|
14
14
|
it { subject.method_wsdl.must_equal :consultar_situacao_lote_rps }
|
15
15
|
end
|
16
16
|
|
17
|
-
it "#response_root_path" do
|
18
|
-
subject.response_root_path.must_equal [:consultar_situacao_lote_rps_response]
|
19
|
-
end
|
20
|
-
|
21
|
-
it "#body_xml_path" do
|
22
|
-
subject.body_xml_path.must_equal []
|
23
|
-
end
|
24
|
-
|
25
17
|
it "#soap_body_root_tag" do
|
26
18
|
subject.soap_body_root_tag.must_equal 'ConsultarSituacaoLoteRps'
|
27
19
|
end
|
@@ -59,6 +51,7 @@ describe BrNfe::Service::Simpliss::V1::ConsultaSituacaoLoteRps do
|
|
59
51
|
subject.request
|
60
52
|
response = subject.response
|
61
53
|
|
54
|
+
response.must_be_kind_of BrNfe::Service::Response::ConsultaSituacaoLoteRps
|
62
55
|
response.situation.must_equal :success
|
63
56
|
response.numero_lote.must_equal '10'
|
64
57
|
response.status.must_equal :success
|
@@ -71,6 +64,7 @@ describe BrNfe::Service::Simpliss::V1::ConsultaSituacaoLoteRps do
|
|
71
64
|
subject.request
|
72
65
|
response = subject.response
|
73
66
|
|
67
|
+
response.must_be_kind_of BrNfe::Service::Response::ConsultaSituacaoLoteRps
|
74
68
|
response.situation.must_equal :error
|
75
69
|
response.numero_lote.must_equal '13'
|
76
70
|
response.status.must_equal :success
|
@@ -83,6 +77,7 @@ describe BrNfe::Service::Simpliss::V1::ConsultaSituacaoLoteRps do
|
|
83
77
|
subject.request
|
84
78
|
response = subject.response
|
85
79
|
|
80
|
+
response.must_be_kind_of BrNfe::Service::Response::ConsultaSituacaoLoteRps
|
86
81
|
response.situation.must_equal :unprocessed
|
87
82
|
response.numero_lote.must_equal '11'
|
88
83
|
response.status.must_equal :success
|
@@ -95,6 +90,7 @@ describe BrNfe::Service::Simpliss::V1::ConsultaSituacaoLoteRps do
|
|
95
90
|
subject.request
|
96
91
|
response = subject.response
|
97
92
|
|
93
|
+
response.must_be_kind_of BrNfe::Service::Response::ConsultaSituacaoLoteRps
|
98
94
|
response.situation.must_equal :unreceived
|
99
95
|
response.numero_lote.must_equal '12'
|
100
96
|
response.status.must_equal :success
|
@@ -108,9 +104,9 @@ describe BrNfe::Service::Simpliss::V1::ConsultaSituacaoLoteRps do
|
|
108
104
|
subject.request
|
109
105
|
response = subject.response
|
110
106
|
|
111
|
-
response.
|
112
|
-
response.data_recebimento.must_be_nil
|
107
|
+
response.must_be_kind_of BrNfe::Service::Response::ConsultaSituacaoLoteRps
|
113
108
|
response.numero_lote.must_be_nil
|
109
|
+
response.situation.must_equal :error
|
114
110
|
response.status.must_equal :falied
|
115
111
|
response.error_messages.size.must_equal 1
|
116
112
|
response.error_messages[0][:code].must_equal 'E900'
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
describe BrNfe::Service::Simpliss::V1::RecepcaoLoteRps do
|
4
4
|
subject { FactoryGirl.build(:service_simpliss_v1_recepcao_lote_rps, emitente: emitente) }
|
5
|
-
let(:emitente) { FactoryGirl.build(:
|
5
|
+
let(:emitente) { FactoryGirl.build(:service_emitente) }
|
6
6
|
|
7
7
|
describe "superclass" do
|
8
8
|
it { subject.class.superclass.must_equal BrNfe::Service::Simpliss::V1::Base }
|
@@ -16,14 +16,6 @@ describe BrNfe::Service::Simpliss::V1::RecepcaoLoteRps do
|
|
16
16
|
it { subject.method_wsdl.must_equal :recepcionar_lote_rps }
|
17
17
|
end
|
18
18
|
|
19
|
-
it "#response_root_path" do
|
20
|
-
subject.response_root_path.must_equal [:recepcionar_lote_rps_response]
|
21
|
-
end
|
22
|
-
|
23
|
-
it "#body_xml_path" do
|
24
|
-
subject.body_xml_path.must_equal []
|
25
|
-
end
|
26
|
-
|
27
19
|
it "#soap_body_root_tag" do
|
28
20
|
subject.soap_body_root_tag.must_equal 'RecepcionarLoteRps'
|
29
21
|
end
|
@@ -76,6 +68,7 @@ describe BrNfe::Service::Simpliss::V1::RecepcaoLoteRps do
|
|
76
68
|
subject.request
|
77
69
|
response = subject.response
|
78
70
|
|
71
|
+
response.must_be_kind_of BrNfe::Service::Response::RecepcaoLoteRps
|
79
72
|
response.protocolo.must_equal '128277'
|
80
73
|
response.data_recebimento.must_equal Time.parse('2016-07-28T16:17:18.4043985-03:00')
|
81
74
|
response.numero_lote.must_equal '10'
|
@@ -90,6 +83,7 @@ describe BrNfe::Service::Simpliss::V1::RecepcaoLoteRps do
|
|
90
83
|
subject.request
|
91
84
|
response = subject.response
|
92
85
|
|
86
|
+
response.must_be_kind_of BrNfe::Service::Response::RecepcaoLoteRps
|
93
87
|
response.protocolo.must_be_nil
|
94
88
|
response.data_recebimento.must_be_nil
|
95
89
|
response.numero_lote.must_be_nil
|
@@ -3,7 +3,7 @@ require 'test_helper'
|
|
3
3
|
describe BrNfe::Service::Thema::V1::Base do
|
4
4
|
subject { FactoryGirl.build(:service_thema_v1_base, emitente: emitente) }
|
5
5
|
let(:rps) { FactoryGirl.build(:br_nfe_rps, :completo) }
|
6
|
-
let(:emitente) { FactoryGirl.build(:
|
6
|
+
let(:emitente) { FactoryGirl.build(:service_emitente) }
|
7
7
|
let(:intermediario) { FactoryGirl.build(:intermediario) }
|
8
8
|
|
9
9
|
describe "inheritance class" do
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
describe BrNfe::Service::Thema::V1::CancelaNfse do
|
4
4
|
subject { FactoryGirl.build(:service_thema_v1_cancela_nfse, emitente: emitente) }
|
5
|
-
let(:emitente) { FactoryGirl.build(:
|
5
|
+
let(:emitente) { FactoryGirl.build(:service_emitente) }
|
6
6
|
|
7
7
|
describe "superclass" do
|
8
8
|
it { subject.class.superclass.must_equal BrNfe::Service::Thema::V1::Base }
|
@@ -37,14 +37,6 @@ describe BrNfe::Service::Thema::V1::CancelaNfse do
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
it "#response_root_path" do
|
41
|
-
subject.response_root_path.must_equal []
|
42
|
-
end
|
43
|
-
|
44
|
-
it "#body_xml_path" do
|
45
|
-
subject.body_xml_path.must_equal [:cancelar_nfse_response, :return]
|
46
|
-
end
|
47
|
-
|
48
40
|
it "#soap_body_root_tag" do
|
49
41
|
subject.soap_body_root_tag.must_equal 'cancelarNfse'
|
50
42
|
end
|
@@ -79,7 +71,11 @@ describe BrNfe::Service::Thema::V1::CancelaNfse do
|
|
79
71
|
subject.request
|
80
72
|
response = subject.response
|
81
73
|
|
82
|
-
response.
|
74
|
+
response.must_be_kind_of BrNfe::Service::Response::Cancelamento
|
75
|
+
response.data_hora_cancelamento.must_equal Time.parse('2016-08-15T13:50:31.016Z')
|
76
|
+
response.codigo_cancelamento.must_equal 'E506'
|
77
|
+
response.numero_nfs.must_equal '201600000000005'
|
78
|
+
|
83
79
|
response.status.must_equal :success
|
84
80
|
response.successful_request?.must_equal true
|
85
81
|
end
|
@@ -91,10 +87,7 @@ describe BrNfe::Service::Thema::V1::CancelaNfse do
|
|
91
87
|
subject.request
|
92
88
|
response = subject.response
|
93
89
|
|
94
|
-
response.
|
95
|
-
response.data_recebimento.must_be_nil
|
96
|
-
response.numero_lote.must_be_nil
|
97
|
-
response.cancelation_date_time.must_be_nil
|
90
|
+
response.data_hora_cancelamento.must_be_nil
|
98
91
|
|
99
92
|
response.status.must_equal :falied
|
100
93
|
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
describe BrNfe::Service::Thema::V1::ConsultaLoteRps do
|
4
4
|
subject { FactoryGirl.build(:service_thema_v1_consulta_lote_rps, emitente: emitente) }
|
5
|
-
let(:emitente) { FactoryGirl.build(:
|
5
|
+
let(:emitente) { FactoryGirl.build(:service_emitente) }
|
6
6
|
|
7
7
|
it { must validate_presence_of(:protocolo) }
|
8
8
|
|
@@ -14,14 +14,6 @@ describe BrNfe::Service::Thema::V1::ConsultaLoteRps do
|
|
14
14
|
it { subject.method_wsdl.must_equal :consultar_lote_rps }
|
15
15
|
end
|
16
16
|
|
17
|
-
it "#response_root_path" do
|
18
|
-
subject.response_root_path.must_equal []
|
19
|
-
end
|
20
|
-
|
21
|
-
it "#body_xml_path" do
|
22
|
-
subject.body_xml_path.must_equal [:consultar_lote_rps_response, :return]
|
23
|
-
end
|
24
|
-
|
25
17
|
it "#soap_body_root_tag" do
|
26
18
|
subject.soap_body_root_tag.must_equal 'consultarLoteRps'
|
27
19
|
end
|
@@ -73,9 +65,6 @@ describe BrNfe::Service::Thema::V1::ConsultaLoteRps do
|
|
73
65
|
subject.request
|
74
66
|
response = subject.response
|
75
67
|
|
76
|
-
response.protocolo.must_be_nil
|
77
|
-
response.data_recebimento.must_be_nil
|
78
|
-
response.numero_lote.must_be_nil
|
79
68
|
response.status.must_equal :falied
|
80
69
|
response.error_messages.size.must_equal 1
|
81
70
|
response.error_messages[0][:code].must_equal 'E86'
|
@@ -114,13 +103,13 @@ describe BrNfe::Service::Thema::V1::ConsultaLoteRps do
|
|
114
103
|
nf.cnae_code.must_equal '6202300'
|
115
104
|
nf.description.must_equal '1 TESTE WEBSERVICE: R$ 5,00'
|
116
105
|
nf.codigo_municipio.must_equal '4204202'
|
117
|
-
nf.
|
118
|
-
nf.
|
106
|
+
nf.valor_total_servicos.must_equal '1700'
|
107
|
+
nf.iss_retido.must_equal '2'
|
119
108
|
nf.total_iss.must_equal '33.72'
|
120
|
-
nf.
|
121
|
-
nf.
|
109
|
+
nf.base_calculo.must_equal '1685.88'
|
110
|
+
nf.iss_aliquota.must_equal '0.02'
|
122
111
|
nf.valor_liquido.must_equal '1663.02'
|
123
|
-
nf.
|
112
|
+
nf.deducoes.must_equal '7'
|
124
113
|
nf.valor_pis.must_equal '1.12'
|
125
114
|
nf.valor_cofins.must_equal '2.12'
|
126
115
|
nf.valor_inss.must_equal '3.12'
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
describe BrNfe::Service::Thema::V1::ConsultaNfsPorRps do
|
4
4
|
subject { FactoryGirl.build(:service_thema_v1_consulta_nfs_por_rps, emitente: emitente) }
|
5
|
-
let(:emitente) { FactoryGirl.build(:
|
5
|
+
let(:emitente) { FactoryGirl.build(:service_emitente) }
|
6
6
|
let(:rps) { subject.rps }
|
7
7
|
|
8
8
|
describe "superclass" do
|
@@ -17,13 +17,6 @@ describe BrNfe::Service::Thema::V1::ConsultaNfsPorRps do
|
|
17
17
|
it { subject.method_wsdl.must_equal :consultar_nfse_por_rps }
|
18
18
|
end
|
19
19
|
|
20
|
-
it "#response_root_path" do
|
21
|
-
subject.response_root_path.must_equal []
|
22
|
-
end
|
23
|
-
it "#body_xml_path" do
|
24
|
-
subject.body_xml_path.must_equal [:consultar_nfse_por_rps_response, :return]
|
25
|
-
end
|
26
|
-
|
27
20
|
it "#soap_body_root_tag" do
|
28
21
|
subject.soap_body_root_tag.must_equal 'consultarNfsePorRps'
|
29
22
|
end
|
@@ -113,13 +106,13 @@ describe BrNfe::Service::Thema::V1::ConsultaNfsPorRps do
|
|
113
106
|
nf.cnae_code.must_equal '6202300'
|
114
107
|
nf.description.must_equal '1 TESTE WEBSERVICE: R$ 5,00'
|
115
108
|
nf.codigo_municipio.must_equal '4204202'
|
116
|
-
nf.
|
117
|
-
nf.
|
109
|
+
nf.valor_total_servicos.must_equal '1700'
|
110
|
+
nf.iss_retido.must_equal '2'
|
118
111
|
nf.total_iss.must_equal '33.72'
|
119
|
-
nf.
|
120
|
-
nf.
|
112
|
+
nf.base_calculo.must_equal '1685.88'
|
113
|
+
nf.iss_aliquota.must_equal '0.02'
|
121
114
|
nf.valor_liquido.must_equal '1663.02'
|
122
|
-
nf.
|
115
|
+
nf.deducoes.must_equal '7'
|
123
116
|
nf.valor_pis.must_equal '1.12'
|
124
117
|
nf.valor_cofins.must_equal '2.12'
|
125
118
|
nf.valor_inss.must_equal '3.12'
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
describe BrNfe::Service::Thema::V1::ConsultaNfse do
|
4
4
|
subject { FactoryGirl.build(:service_thema_v1_consulta_nfse, emitente: emitente) }
|
5
|
-
let(:emitente) { FactoryGirl.build(:
|
5
|
+
let(:emitente) { FactoryGirl.build(:service_emitente) }
|
6
6
|
let(:rps) { subject.rps }
|
7
7
|
|
8
8
|
describe "superclass" do
|
@@ -17,13 +17,6 @@ describe BrNfe::Service::Thema::V1::ConsultaNfse do
|
|
17
17
|
it { subject.method_wsdl.must_equal :consultar_nfse }
|
18
18
|
end
|
19
19
|
|
20
|
-
it "#response_root_path" do
|
21
|
-
subject.response_root_path.must_equal []
|
22
|
-
end
|
23
|
-
it "#body_xml_path" do
|
24
|
-
subject.body_xml_path.must_equal [:consultar_nfse_response, :return]
|
25
|
-
end
|
26
|
-
|
27
20
|
it "#soap_body_root_tag" do
|
28
21
|
subject.soap_body_root_tag.must_equal 'consultarNfse'
|
29
22
|
end
|
@@ -128,13 +121,13 @@ describe BrNfe::Service::Thema::V1::ConsultaNfse do
|
|
128
121
|
nf.cnae_code.must_equal '6202300'
|
129
122
|
nf.description.must_equal 'SERVICO DE COMINICACAO WEB DIGITAL 1.700,00'
|
130
123
|
nf.codigo_municipio.must_equal '4204202'
|
131
|
-
nf.
|
132
|
-
nf.
|
124
|
+
nf.valor_total_servicos.must_equal '10'
|
125
|
+
nf.iss_retido.must_equal '2'
|
133
126
|
nf.total_iss.must_equal '0.2'
|
134
|
-
nf.
|
135
|
-
nf.
|
127
|
+
nf.base_calculo.must_equal '10'
|
128
|
+
nf.iss_aliquota.must_equal '0.035'
|
136
129
|
nf.valor_liquido.must_equal '10'
|
137
|
-
nf.
|
130
|
+
nf.deducoes.must_equal '0'
|
138
131
|
nf.valor_pis.must_equal '0'
|
139
132
|
nf.valor_cofins.must_equal '0'
|
140
133
|
nf.valor_inss.must_equal '0'
|
@@ -196,13 +189,13 @@ describe BrNfe::Service::Thema::V1::ConsultaNfse do
|
|
196
189
|
nf.cnae_code.must_equal '6202300'
|
197
190
|
nf.description.must_equal '1 TESTE WEBSERVICE: R$ 5,00'
|
198
191
|
nf.codigo_municipio.must_equal '4204202'
|
199
|
-
nf.
|
200
|
-
nf.
|
192
|
+
nf.valor_total_servicos.must_equal '1700'
|
193
|
+
nf.iss_retido.must_equal '2'
|
201
194
|
nf.total_iss.must_equal '33.72'
|
202
|
-
nf.
|
203
|
-
nf.
|
195
|
+
nf.base_calculo.must_equal '1685.88'
|
196
|
+
nf.iss_aliquota.must_equal '0.02'
|
204
197
|
nf.valor_liquido.must_equal '1663.02'
|
205
|
-
nf.
|
198
|
+
nf.deducoes.must_equal '7'
|
206
199
|
nf.valor_pis.must_equal '1.12'
|
207
200
|
nf.valor_cofins.must_equal '2.12'
|
208
201
|
nf.valor_inss.must_equal '3.12'
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
describe BrNfe::Service::Thema::V1::ConsultaSituacaoLoteRps do
|
4
4
|
subject { FactoryGirl.build(:service_thema_v1_consulta_situacao_lote_rps, emitente: emitente) }
|
5
|
-
let(:emitente) { FactoryGirl.build(:
|
5
|
+
let(:emitente) { FactoryGirl.build(:service_emitente) }
|
6
6
|
|
7
7
|
it { must validate_presence_of(:protocolo) }
|
8
8
|
|
@@ -14,14 +14,6 @@ describe BrNfe::Service::Thema::V1::ConsultaSituacaoLoteRps do
|
|
14
14
|
it { subject.method_wsdl.must_equal :consultar_situacao_lote_rps }
|
15
15
|
end
|
16
16
|
|
17
|
-
it "#response_root_path" do
|
18
|
-
subject.response_root_path.must_equal []
|
19
|
-
end
|
20
|
-
|
21
|
-
it "#body_xml_path" do
|
22
|
-
subject.body_xml_path.must_equal [:consultar_situacao_lote_rps_response, :return]
|
23
|
-
end
|
24
|
-
|
25
17
|
it "#soap_body_root_tag" do
|
26
18
|
subject.soap_body_root_tag.must_equal 'consultarSituacaoLoteRps'
|
27
19
|
end
|
@@ -72,6 +64,7 @@ describe BrNfe::Service::Thema::V1::ConsultaSituacaoLoteRps do
|
|
72
64
|
subject.request
|
73
65
|
response = subject.response
|
74
66
|
|
67
|
+
response.must_be_kind_of BrNfe::Service::Response::ConsultaSituacaoLoteRps
|
75
68
|
response.situation.must_equal :success, "#{response.inspect}"
|
76
69
|
response.numero_lote.must_equal '11'
|
77
70
|
response.status.must_equal :success
|
@@ -84,6 +77,7 @@ describe BrNfe::Service::Thema::V1::ConsultaSituacaoLoteRps do
|
|
84
77
|
subject.request
|
85
78
|
response = subject.response
|
86
79
|
|
80
|
+
response.must_be_kind_of BrNfe::Service::Response::ConsultaSituacaoLoteRps
|
87
81
|
response.situation.must_equal :error
|
88
82
|
response.numero_lote.must_equal '11'
|
89
83
|
response.status.must_equal :success
|
@@ -96,6 +90,7 @@ describe BrNfe::Service::Thema::V1::ConsultaSituacaoLoteRps do
|
|
96
90
|
subject.request
|
97
91
|
response = subject.response
|
98
92
|
|
93
|
+
response.must_be_kind_of BrNfe::Service::Response::ConsultaSituacaoLoteRps
|
99
94
|
response.situation.must_equal :unprocessed
|
100
95
|
response.numero_lote.must_equal '11'
|
101
96
|
response.status.must_equal :success
|
@@ -108,6 +103,7 @@ describe BrNfe::Service::Thema::V1::ConsultaSituacaoLoteRps do
|
|
108
103
|
subject.request
|
109
104
|
response = subject.response
|
110
105
|
|
106
|
+
response.must_be_kind_of BrNfe::Service::Response::ConsultaSituacaoLoteRps
|
111
107
|
response.situation.must_equal :unreceived
|
112
108
|
response.numero_lote.must_equal '0'
|
113
109
|
response.status.must_equal :falied
|
@@ -126,8 +122,8 @@ describe BrNfe::Service::Thema::V1::ConsultaSituacaoLoteRps do
|
|
126
122
|
subject.request
|
127
123
|
response = subject.response
|
128
124
|
|
129
|
-
response.
|
130
|
-
response.
|
125
|
+
response.must_be_kind_of BrNfe::Service::Response::ConsultaSituacaoLoteRps
|
126
|
+
response.situation.must_equal :error
|
131
127
|
response.numero_lote.must_be_nil
|
132
128
|
response.status.must_equal :falied
|
133
129
|
response.error_messages.size.must_equal 1
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
describe BrNfe::Service::Thema::V1::RecepcaoLoteRpsLimitado do
|
4
4
|
subject { FactoryGirl.build(:service_thema_v1_recepcao_lote_rps_limitado, emitente: emitente) }
|
5
|
-
let(:emitente) { FactoryGirl.build(:
|
5
|
+
let(:emitente) { FactoryGirl.build(:service_emitente, natureza_operacao: '50') }
|
6
6
|
|
7
7
|
describe "superclass" do
|
8
8
|
it { subject.class.superclass.must_equal BrNfe::Service::Thema::V1::RecepcaoLoteRps }
|
@@ -12,10 +12,6 @@ describe BrNfe::Service::Thema::V1::RecepcaoLoteRpsLimitado do
|
|
12
12
|
it { subject.method_wsdl.must_equal :recepcionar_lote_rps_limitado }
|
13
13
|
end
|
14
14
|
|
15
|
-
it "#body_xml_path" do
|
16
|
-
subject.body_xml_path.must_equal [:recepcionar_lote_rps_limitado_response, :return]
|
17
|
-
end
|
18
|
-
|
19
15
|
it "#soap_body_root_tag" do
|
20
16
|
subject.soap_body_root_tag.must_equal 'recepcionarLoteRpsLimitado'
|
21
17
|
end
|