lib/nfse_gyn/configuration.rb in nfse_gyn-0.1.0 vs lib/nfse_gyn/configuration.rb in nfse_gyn-0.1.1
- old
+ new
@@ -1,9 +1,10 @@
module NfseGyn
class Configuration
attr_accessor :wsdl,
:test_mode,
+ :mock_mode,
:log_level,
:ca_cert_path,
:cert_key_path,
:cert_path,
:cert_key_password,
@@ -14,18 +15,26 @@
:valor_aliquota,
:codigo_tributacao_municipio
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
+
+ def from_h(hash)
+ hash.each do |k, v|
+ instance_variable_set("@#{k}".to_sym, v)
+ end
+ self
end
def rps_serie
return 'TESTE' if test_mode
'A'