Class: NfseGyn::Configuration
Instance Attribute Summary collapse
-
#ca_cert_path ⇒ Object
Returns the value of attribute ca_cert_path.
-
#cert_key_password ⇒ Object
Returns the value of attribute cert_key_password.
-
#cert_key_path ⇒ Object
Returns the value of attribute cert_key_path.
-
#cert_path ⇒ Object
Returns the value of attribute cert_path.
-
#cnpj ⇒ Object
Returns the value of attribute cnpj.
-
#codigo_municipio ⇒ Object
Returns the value of attribute codigo_municipio.
-
#codigo_tributacao_municipio ⇒ Object
Returns the value of attribute codigo_tributacao_municipio.
-
#inscricao_municipal ⇒ Object
Returns the value of attribute inscricao_municipal.
-
#log_level ⇒ Object
Returns the value of attribute log_level.
-
#mock_mode ⇒ Object
Returns the value of attribute mock_mode.
-
#rps_tipo ⇒ Object
Returns the value of attribute rps_tipo.
-
#test_mode ⇒ Object
Returns the value of attribute test_mode.
-
#valor_aliquota ⇒ Object
Returns the value of attribute valor_aliquota.
-
#wsdl ⇒ Object
Returns the value of attribute wsdl.
Instance Method Summary collapse
- #from_h(hash) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #rps_serie ⇒ Object
Constructor Details
#initialize ⇒ Configuration
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_path ⇒ Object
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_password ⇒ Object
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_path ⇒ Object
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_path ⇒ Object
Returns the value of attribute cert_path.
3 4 5 |
# File 'lib/nfse_gyn/configuration.rb', line 3 def cert_path @cert_path end |
#cnpj ⇒ Object
Returns the value of attribute cnpj.
3 4 5 |
# File 'lib/nfse_gyn/configuration.rb', line 3 def cnpj @cnpj end |
#codigo_municipio ⇒ Object
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_municipio ⇒ Object
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_municipal ⇒ Object
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_level ⇒ Object
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_mode ⇒ Object
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_tipo ⇒ Object
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_mode ⇒ Object
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_aliquota ⇒ Object
Returns the value of attribute valor_aliquota.
3 4 5 |
# File 'lib/nfse_gyn/configuration.rb', line 3 def valor_aliquota @valor_aliquota end |
#wsdl ⇒ Object
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_serie ⇒ Object
39 40 41 42 |
# File 'lib/nfse_gyn/configuration.rb', line 39 def rps_serie return 'TESTE' if test_mode 'A' end |