Sha256: e1697040f50db789452496dc42c5106882cbefe496e14e4ba1681e880cdb195b

Contents?: true

Size: 617 Bytes

Versions: 36

Compression:

Stored size: 617 Bytes

Contents

module NetSuite
  module Records
    class UnitsTypeUomList
      include Support::Fields
      include Namespaces::ListAcct

      fields :uom

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

      def uom=(items)
        case items
        when Hash
          self.uom << UnitsTypeUom.new(items)
        when Array
          items.each { |item| self.uom << UnitsTypeUom.new(item) }
        end
      end

      def uom
        @uom ||= []
      end

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


Version data entries

36 entries across 36 versions & 1 rubygems

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