Sha256: 0cdae27442a6d07170f655fc0e7e1455f477244626347017a95bc15e7989b154

Contents?: true

Size: 650 Bytes

Versions: 52

Compression:

Stored size: 650 Bytes

Contents

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

      def initialize(attributes = {})
        initialize_from_attributes_hash(attributes)
      end

      def line=(lines)
        case lines
        when Hash
          self.lines << JournalEntryLine.new(lines)
        when Array
          lines.each { |line| self.lines << JournalEntryLine.new(line) }
        end
      end

      def lines
        @items ||= []
      end

      def to_record
        { "#{record_namespace}:line" => lines.map(&:to_record) }
      end

    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
netsuite-0.7.1 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.7.0 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.6.9 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.6.8 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.6.7 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.6.6 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.6.5 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.6.4 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.6.3 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.6.2 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.6.1 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.6.0 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.5.9 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.5.8 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.5.7 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.5.6 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.5.5 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.5.4 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.5.3 lib/netsuite/records/journal_entry_line_list.rb
netsuite-0.5.2 lib/netsuite/records/journal_entry_line_list.rb