Sha256: 651b3ae91d91176dace145872d4cddb912ca249258e7bb1870dd5bf7de77bfd7

Contents?: true

Size: 640 Bytes

Versions: 21

Compression:

Stored size: 640 Bytes

Contents

# frozen_string_literal: true

module BrInvoicesPdf
  module Nfce
    module Parser
      module Company
        extend Util::XmlLocate
        extend Util::MountParams

        module_function

        def emit_root_path(xml)
          "#{root_path(xml)}/emit"
        end

        def execute(xml)
          path = emit_root_path(xml)
          {
            name: locate_element(xml, "#{path}/xNome"),
            cnpj: locate_element(xml, "#{path}/CNPJ"),
            state_number: locate_element(xml, "#{path}/IE"),
            address: mount(xml, address_params(xml, path, 'Emit'))
          }
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
br_invoices_pdf-0.2.24 lib/br_invoices_pdf/nfce/parser/company.rb
br_invoices_pdf-0.2.23 lib/br_invoices_pdf/nfce/parser/company.rb
br_invoices_pdf-0.2.22 lib/br_invoices_pdf/nfce/parser/company.rb
br_invoices_pdf-0.2.21 lib/br_invoices_pdf/nfce/parser/company.rb
br_invoices_pdf-0.2.20 lib/br_invoices_pdf/nfce/parser/company.rb
br_invoices_pdf-0.2.19 lib/br_invoices_pdf/nfce/parser/company.rb
br_invoices_pdf-0.2.18 lib/br_invoices_pdf/nfce/parser/company.rb
br_invoices_pdf-0.2.17 lib/br_invoices_pdf/nfce/parser/company.rb
br_invoices_pdf-0.2.16 lib/br_invoices_pdf/nfce/parser/company.rb
br_invoices_pdf-0.2.15 lib/br_invoices_pdf/nfce/parser/company.rb
br_invoices_pdf-0.2.14 lib/br_invoices_pdf/nfce/parser/company.rb
br_invoices_pdf-0.2.14.alpha.23 lib/br_invoices_pdf/nfce/parser/company.rb
br_invoices_pdf-0.2.13 lib/br_invoices_pdf/nfce/parser/company.rb
br_invoices_pdf-0.2.13.alpha.22 lib/br_invoices_pdf/nfce/parser/company.rb
br_invoices_pdf-0.2.12.alpha.21 lib/br_invoices_pdf/nfce/parser/company.rb
br_invoices_pdf-0.2.12.alpha.20 lib/br_invoices_pdf/nfce/parser/company.rb
br_invoices_pdf-0.2.12 lib/br_invoices_pdf/nfce/parser/company.rb
br_invoices_pdf-0.2.11 lib/br_invoices_pdf/nfce/parser/company.rb
br_invoices_pdf-0.2.10 lib/br_invoices_pdf/nfce/parser/company.rb
br_invoices_pdf-0.2.9 lib/br_invoices_pdf/nfce/parser/company.rb