Class: NfseGyn::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/nfse_gyn/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/nfse_gyn/configuration.rb', line 18

def initialize
  @test_mode = false
  @mock_mode = false
  @log_level = :debug
  @wsdl = 'https://nfse.goiania.go.gov.br/ws/nfse.asmx?wsdl'

  @codigo_municipio = '0025300'
  @rps_tipo = 1

  @valor_aliquota = 2

  @codigo_tributacao_municipio = ''
end

Instance Attribute Details

#ca_cert_pathObject

Returns the value of attribute ca_cert_path.



3
4
5
# File 'lib/nfse_gyn/configuration.rb', line 3

def ca_cert_path
  @ca_cert_path
end

#cert_key_passwordObject

Returns the value of attribute cert_key_password.



3
4
5
# File 'lib/nfse_gyn/configuration.rb', line 3

def cert_key_password
  @cert_key_password
end

#cert_key_pathObject

Returns the value of attribute cert_key_path.



3
4
5
# File 'lib/nfse_gyn/configuration.rb', line 3

def cert_key_path
  @cert_key_path
end

#cert_pathObject

Returns the value of attribute cert_path.



3
4
5
# File 'lib/nfse_gyn/configuration.rb', line 3

def cert_path
  @cert_path
end

#cnpjObject

Returns the value of attribute cnpj.



3
4
5
# File 'lib/nfse_gyn/configuration.rb', line 3

def cnpj
  @cnpj
end

#codigo_municipioObject

Returns the value of attribute codigo_municipio.



3
4
5
# File 'lib/nfse_gyn/configuration.rb', line 3

def codigo_municipio
  @codigo_municipio
end

#codigo_tributacao_municipioObject

Returns the value of attribute codigo_tributacao_municipio.



3
4
5
# File 'lib/nfse_gyn/configuration.rb', line 3

def codigo_tributacao_municipio
  @codigo_tributacao_municipio
end

#inscricao_municipalObject

Returns the value of attribute inscricao_municipal.



3
4
5
# File 'lib/nfse_gyn/configuration.rb', line 3

def inscricao_municipal
  @inscricao_municipal
end

#log_levelObject

Returns the value of attribute log_level.



3
4
5
# File 'lib/nfse_gyn/configuration.rb', line 3

def log_level
  @log_level
end

#mock_modeObject

Returns the value of attribute mock_mode.



3
4
5
# File 'lib/nfse_gyn/configuration.rb', line 3

def mock_mode
  @mock_mode
end

#rps_tipoObject

Returns the value of attribute rps_tipo.



3
4
5
# File 'lib/nfse_gyn/configuration.rb', line 3

def rps_tipo
  @rps_tipo
end

#test_modeObject

Returns the value of attribute test_mode.



3
4
5
# File 'lib/nfse_gyn/configuration.rb', line 3

def test_mode
  @test_mode
end

#valor_aliquotaObject

Returns the value of attribute valor_aliquota.



3
4
5
# File 'lib/nfse_gyn/configuration.rb', line 3

def valor_aliquota
  @valor_aliquota
end

#wsdlObject

Returns the value of attribute wsdl.



3
4
5
# File 'lib/nfse_gyn/configuration.rb', line 3

def wsdl
  @wsdl
end

Instance Method Details

#from_h(hash) ⇒ Object



32
33
34
35
36
37
# File 'lib/nfse_gyn/configuration.rb', line 32

def from_h(hash)
  hash.each do |k, v|
    instance_variable_set("@#{k}".to_sym, v)
  end
  self
end

#rps_serieObject



39
40
41
42
# File 'lib/nfse_gyn/configuration.rb', line 39

def rps_serie
  return 'TESTE' if test_mode
  'A'
end