Class: BrNfe::Product::Gateway::Base

Inherits:
ActiveModelBase show all
Defined in:
lib/br_nfe/product/gateway/base.rb

Instance Attribute Summary collapse

Attributes inherited from ActiveModelBase

#reference

Instance Method Summary collapse

Methods inherited from ActiveModelBase

#assign_attributes, #default_values, #initialize

Constructor Details

This class inherits a constructor from BrNfe::ActiveModelBase

Instance Attribute Details

#envObject

Returns the value of attribute env.



6
7
8
# File 'lib/br_nfe/product/gateway/base.rb', line 6

def env
  @env
end

Instance Method Details

#env_production?Boolean

Returns:

  • (Boolean)


8
# File 'lib/br_nfe/product/gateway/base.rb', line 8

def env_production?; env == :production end

#operation_download_nfObject



19
20
21
# File 'lib/br_nfe/product/gateway/base.rb', line 19

def operation_download_nf
	:nfe_download_nf
end

#ssl_version_download_nfObject



28
29
30
# File 'lib/br_nfe/product/gateway/base.rb', line 28

def ssl_version_download_nf
	:TLSv1
end

#url_xmlns_download_nfObject



25
26
27
# File 'lib/br_nfe/product/gateway/base.rb', line 25

def url_xmlns_download_nf
	'http://www.portalfiscal.inf.br/nfe/wsdl/NfeDownloadNF'
end

#version_xml_download_nfObject



22
23
24
# File 'lib/br_nfe/product/gateway/base.rb', line 22

def version_xml_download_nf
	:v1_00
end

#wsdl_download_nfObject

NFE DOWNLOAD NF #####################################



12
13
14
15
16
17
18
# File 'lib/br_nfe/product/gateway/base.rb', line 12

def wsdl_download_nf
	if env_production?
		'https://www.nfe.fazenda.gov.br/NfeDownloadNF/NfeDownloadNF.asmx?wsdl'
	else
		'https://hom.nfe.fazenda.gov.br/NfeDownloadNF/NfeDownloadNF.asmx?wsdl'
	end
end