Sha256: 2d45e5f3651acfd443c4cd59e2d142df3bf6d679fec4a7435e53c19dc05287c0

Contents?: true

Size: 1.12 KB

Versions: 14

Compression:

Stored size: 1.12 KB

Contents

module NetSuite
  module Records
    class InboundShipmentItem
      include Support::Fields
      include Support::RecordRefs
      include Support::Records
      include Namespaces::TranPurch

      fields  :id, :shipment_item_description, :po_vendor, :quantity_received, :quantity_expected,
              :quantity_remaining, :po_rate, :expected_rate, :shipment_item_amount

      field :custom_field_list,   CustomFieldList

      record_refs  :purchase_order, :shipment_item, :receiving_location, :po_currency, :incoterm

      def initialize(attributes_or_record = {})
        case attributes_or_record
        when Hash
          initialize_from_attributes_hash(attributes_or_record)
        when self.class
          initialize_from_record(attributes_or_record)
        end
      end

      def initialize_from_record(record)
        self.attributes = record.send(:attributes)
      end

      def to_record
        rec = super
        if rec["#{record_namespace}:customFieldList"]
          rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
        end
        rec
      end

    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
netsuite-0.9.3 lib/netsuite/records/inbound_shipment_item.rb
netsuite-0.9.2 lib/netsuite/records/inbound_shipment_item.rb
netsuite-0.9.1 lib/netsuite/records/inbound_shipment_item.rb
netsuite-0.9.0 lib/netsuite/records/inbound_shipment_item.rb
netsuite-0.8.12 lib/netsuite/records/inbound_shipment_item.rb
netsuite-0.8.11 lib/netsuite/records/inbound_shipment_item.rb
netsuite-0.8.10 lib/netsuite/records/inbound_shipment_item.rb
netsuite-0.8.9 lib/netsuite/records/inbound_shipment_item.rb
netsuite-0.8.8 lib/netsuite/records/inbound_shipment_item.rb
netsuite-0.8.7 lib/netsuite/records/inbound_shipment_item.rb
netsuite-0.8.6 lib/netsuite/records/inbound_shipment_item.rb
netsuite-0.8.5 lib/netsuite/records/inbound_shipment_item.rb
netsuite-0.8.4 lib/netsuite/records/inbound_shipment_item.rb
netsuite-0.8.3 lib/netsuite/records/inbound_shipment_item.rb