Class: BrNfe::Servico::Betha::V2::ConsultaNfsePorRps

Inherits:
Gateway show all
Includes:
Helper::HaveRps
Defined in:
lib/br_nfe/servico/betha/v2/consulta_nfse_por_rps.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 included from Helper::HaveRps

#rps, #rps=

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=, #certificado_obrigatorio?, #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

#method_wsdlObject



8
9
10
# File 'lib/br_nfe/servico/betha/v2/consulta_nfse_por_rps.rb', line 8

def method_wsdl
	:consultar_nfse_por_rps
end

#xml_builderObject



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/br_nfe/servico/betha/v2/consulta_nfse_por_rps.rb', line 12

def xml_builder
	xml = Nokogiri::XML::Builder.new do |xml|
		xml.ConsultarNfseRpsEnvio(xmlns: "http://www.betha.com.br/e-nota-contribuinte-ws") {
			# IdentificaĆ§Ć£o RPS
			xml.__send__ :insert, Nokogiri::XML::DocumentFragment.parse( xml_identificacao_rps(rps).doc.root.to_s )

			# Pestador / Emitente
			xml.__send__ :insert, Nokogiri::XML::DocumentFragment.parse( xml_prestador.doc.root.to_s )
		}
	end
end