Class: NfsePrefeituraSp::Types::TpChaveNfe
- Defined in:
- lib/nfse_prefeitura_sp/types/tp_chave_nfe.rb
Overview
tpChaveNFe
Instance Method Summary collapse
Methods inherited from Complex
#add_tag_to_xml, #has_any_child_value?, #initialize
Constructor Details
This class inherits a constructor from NfsePrefeituraSp::Types::Complex
Instance Method Details
#add_children_tags_to_xml(xml) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/nfse_prefeitura_sp/types/tp_chave_nfe.rb', line 10 def (xml) inscricao_prestador.add_tag_to_xml(xml) numero_nfe.add_tag_to_xml(xml) codigo_verificacao.add_tag_to_xml(xml) if @data[:codigo_verificacao] chave_nota_nacional.add_tag_to_xml(xml) if @data[:chave_nota_nacional] end |
#initialize_children ⇒ Object
3 4 5 6 7 8 |
# File 'lib/nfse_prefeitura_sp/types/tp_chave_nfe.rb', line 3 def initialize_children @children[:inscricao_prestador] = NfsePrefeituraSp::Types::Simple.new('InscricaoPrestador', @data[:inscricao_prestador]) @children[:numero_nfe] = NfsePrefeituraSp::Types::Simple.new('NumeroNFe', @data[:numero_nfe]) @children[:codigo_verificacao] = NfsePrefeituraSp::Types::Simple.new('CodigoVerificacao', @data[:codigo_verificacao]) if @data[:codigo_verificacao] @children[:chave_nota_nacional] = NfsePrefeituraSp::Types::Simple.new('ChaveNotaNacional', @data[:chave_nota_nacional]) if @data[:chave_nota_nacional] end |