Class: Nfse::Envio::Servico

Inherits:
Mustache
  • Object
show all
Defined in:
lib/nfse/servico.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Servico

Returns a new instance of Servico.



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/nfse/servico.rb', line 11

def initialize(args)
    
    self.template_path = File.expand_path("../../templates/", __FILE__)
    
    @valor_total = formatted_value(args[:valor_total])
    @valor_imposto = formatted_value(args[:valor_imposto])
    @aliquota = args[:aliquota]
    @codigo_servico = args[:codigo_servico]
    @codigo_cnae = args[:codigo_cnae]
    @codigo_tributacao = args[:codigo_tributacao]
    @descricao_servico = args[:descricao_servico]
    @codigo_municipio = args[:codigo_municipio]
end

Instance Attribute Details

#aliquotaObject

Returns the value of attribute aliquota.



7
8
9
# File 'lib/nfse/servico.rb', line 7

def aliquota
  @aliquota
end

#codigo_cnaeObject

Returns the value of attribute codigo_cnae.



7
8
9
# File 'lib/nfse/servico.rb', line 7

def codigo_cnae
  @codigo_cnae
end

#codigo_municipioObject

Returns the value of attribute codigo_municipio.



7
8
9
# File 'lib/nfse/servico.rb', line 7

def codigo_municipio
  @codigo_municipio
end

#codigo_servicoObject

Returns the value of attribute codigo_servico.



7
8
9
# File 'lib/nfse/servico.rb', line 7

def codigo_servico
  @codigo_servico
end

#codigo_tributacaoObject

Returns the value of attribute codigo_tributacao.



7
8
9
# File 'lib/nfse/servico.rb', line 7

def codigo_tributacao
  @codigo_tributacao
end

#descricao_servicoObject

Returns the value of attribute descricao_servico.



7
8
9
# File 'lib/nfse/servico.rb', line 7

def descricao_servico
  @descricao_servico
end

#valor_impostoObject

Returns the value of attribute valor_imposto.



7
8
9
# File 'lib/nfse/servico.rb', line 7

def valor_imposto
  @valor_imposto
end

#valor_totalObject

Returns the value of attribute valor_total.



7
8
9
# File 'lib/nfse/servico.rb', line 7

def valor_total
  @valor_total
end

Instance Method Details

#formatted_value(value) ⇒ Object

1.500,20 => 1500.20



26
27
28
# File 'lib/nfse/servico.rb', line 26

def formatted_value(value)
    return value
end