Class: BrNfe::Servico::Betha::V2::EnvioLoteRpsSincrono

Inherits:
RecepcaoLoteRps show all
Defined in:
lib/br_nfe/servico/betha/v2/envio_lote_rps_sincrono.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

Methods inherited from RecepcaoLoteRps

#lote_rps_xml

Methods inherited from Gateway

#builder, #cabecalho, #canonical_xml_builder, #content_xml, #namespace_identifier, #namespaces, #request, #set_response, #version, #wsdl

Methods inherited from Base

#version

Methods inherited from BrNfe::Servico::Base

#initialize

Methods inherited from Base

#certificado, #certificado=, #client_wsdl, #env_namespace, #namespace_identifier, #namespaces, #original_response, #response, #wsdl, #wsdl_encoding

Methods included from Helper::HaveEmitente

#emitente, #emitente=

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

Returns:

  • (Boolean)


9
10
11
# File 'lib/br_nfe/servico/betha/v2/envio_lote_rps_sincrono.rb', line 9

def certificado_obrigatorio?
	true
end

#method_wsdlObject



6
7
8
# File 'lib/br_nfe/servico/betha/v2/envio_lote_rps_sincrono.rb', line 6

def method_wsdl
	:recepcionar_lote_rps_sincrono
end

#xml_builderObject



16
17
18
19
20
21
22
23
24
25
# File 'lib/br_nfe/servico/betha/v2/envio_lote_rps_sincrono.rb', line 16

def xml_builder
	xml = Nokogiri::XML::Builder.new(encoding: 'UTF-8') do |xml|
		xml.EnviarLoteRpsSincronoEnvio(xmlns: "http://www.betha.com.br/e-nota-contribuinte-ws") {
			xml_lote_rps = lote_rps_xml.doc.root

			xml.__send__ :insert, Nokogiri::XML::DocumentFragment.parse( xml_lote_rps.to_s )
			xml.__send__ :insert, Nokogiri::XML::DocumentFragment.parse( assinatura_xml(xml_lote_rps.to_s, "#lote#{numero_lote_rps}") )
		}
	end
end