Class: BrNfe::Servico::Betha::V2::SubstituicaoNfse
- Inherits:
-
Gateway
- Object
- ActiveModelBase
- Base
- BrNfe::Servico::Base
- Base
- Gateway
- BrNfe::Servico::Betha::V2::SubstituicaoNfse
- Includes:
- Helper::HaveRps
- Defined in:
- lib/br_nfe/servico/betha/v2/substituicao_nfse.rb
Instance Attribute Summary
Attributes inherited from Gateway
#codigo_cancelamento, #numero_nfse
Attributes inherited from BrNfe::Servico::Base
#lote_rps, #numero_lote_rps, #operacao
Attributes inherited from Base
#certificado_password, #certificado_path, #certificado_value, #env
Instance Method Summary collapse
- #certificado_obrigatorio? ⇒ Boolean
- #method_wsdl ⇒ Object
- #xml_builder ⇒ Object
- #xml_substituicao_nfse ⇒ Object
Methods included from Helper::HaveRps
Methods inherited from Gateway
#builder, #cabecalho, #canonical_xml_builder, #content_xml, #namespace_identifier, #namespaces, #request, #set_response, #version, #wsdl
Methods inherited from Base
Methods inherited from BrNfe::Servico::Base
Methods inherited from Base
#certificado, #certificado=, #client_wsdl, #env_namespace, #namespace_identifier, #namespaces, #original_response, #response, #wsdl, #wsdl_encoding
Methods included from Helper::HaveEmitente
Methods inherited from ActiveModelBase
#assign_attributes, #default_values, #initialize
Constructor Details
This class inherits a constructor from BrNfe::Servico::Base
Instance Method Details
#certificado_obrigatorio? ⇒ Boolean
11 12 13 |
# File 'lib/br_nfe/servico/betha/v2/substituicao_nfse.rb', line 11 def certificado_obrigatorio? true end |
#method_wsdl ⇒ Object
15 16 17 |
# File 'lib/br_nfe/servico/betha/v2/substituicao_nfse.rb', line 15 def method_wsdl :substituir_nfse end |
#xml_builder ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/br_nfe/servico/betha/v2/substituicao_nfse.rb', line 19 def xml_builder xml = Nokogiri::XML::Builder.new do |xml| xml.SubstituirNfseEnvio(xmlns: "http://www.betha.com.br/e-nota-contribuinte-ws") { xml_substituicao = xml_substituicao_nfse.doc.root xml.__send__ :insert, Nokogiri::XML::DocumentFragment.parse( xml_substituicao.to_s ) xml.__send__ :insert, Nokogiri::XML::DocumentFragment.parse( assinatura_xml(xml_substituicao.to_s, "#substituicao") ) } end end |
#xml_substituicao_nfse ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/br_nfe/servico/betha/v2/substituicao_nfse.rb', line 29 def xml_substituicao_nfse Nokogiri::XML::Builder.new do |xml| xml.SubstituicaoNfse(Id: "substituicao") { xml.__send__ :insert, Nokogiri::XML::DocumentFragment.parse( xml_pedido_cancelamento_assinado.doc.root.to_s ) xml.__send__ :insert, Nokogiri::XML::DocumentFragment.parse( xml_rps_assinado(rps).doc.root.to_s ) } end end |