Sha256: 3c7c6bf0e692f0fc40907242fa484e70fc68e7d6d8ab9ac3aeef69ab25460914

Contents?: true

Size: 598 Bytes

Versions: 19

Compression:

Stored size: 598 Bytes

Contents

module NetSuite
  module Records
    class JournalEntryLineList
      include Support::Fields
      include Namespaces::TranGeneral

      def initialize(attributes = {})
        case attributes[:line]
        when Hash
          lines << JournalEntryLine.new(attributes[:line])
        when Array
          attributes[:line].each { |line| lines << JournalEntryLine.new(line) }
        end
      end

      def lines
        @lines ||= []
      end

      def to_record
        lines.map do |line|
          { "#{record_namespace}:line" => line.to_record }
        end
      end

    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
netsuite-0.0.41 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.0.40 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.0.39 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.0.38 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.0.37 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.0.36 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.0.35 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.0.34 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.0.33 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.0.32 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.0.31 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.0.30 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.0.29 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.0.28 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.0.27 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.0.26 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.0.25 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.0.23 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.0.22 lib/netsuite/records/journal_entry_line_list.rb