Sha256: a3e88faa0741e6ad94b363e3b9f43d6346bf472b6ff917bb718b32171686ebd4

Contents?: true

Size: 1.29 KB

Versions: 24

Compression:

Stored size: 1.29 KB

Contents

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

      fields :bin_numbers, :currency, :description, :expiration_date, :is_drop_shipment,
             :item_name, :item_receive, :job_name, :line, :on_hand, :options, :order_line,
             :quantity, :quantity_remaining, :rate, :restock, :serial_numbers,
             :unit_cost_override, :units_display

      record_refs :bill_variance_status, :inventory_detail, :item, :landed_cost,
                  :location

      field :options, CustomFieldList
      field :custom_field_list, CustomFieldList

      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

24 entries across 24 versions & 1 rubygems

Version Path
netsuite-0.8.8 lib/netsuite/records/item_receipt_item.rb
netsuite-0.8.7 lib/netsuite/records/item_receipt_item.rb
netsuite-0.8.6 lib/netsuite/records/item_receipt_item.rb
netsuite-0.8.5 lib/netsuite/records/item_receipt_item.rb
netsuite-0.8.4 lib/netsuite/records/item_receipt_item.rb
netsuite-0.8.3 lib/netsuite/records/item_receipt_item.rb
netsuite-0.8.2 lib/netsuite/records/item_receipt_item.rb
netsuite-0.8.1 lib/netsuite/records/item_receipt_item.rb
netsuite-0.8.0 lib/netsuite/records/item_receipt_item.rb
netsuite-0.7.9 lib/netsuite/records/item_receipt_item.rb
netsuite-0.7.8 lib/netsuite/records/item_receipt_item.rb
netsuite-0.7.7 lib/netsuite/records/item_receipt_item.rb
netsuite-0.7.6 lib/netsuite/records/item_receipt_item.rb
netsuite-0.7.5 lib/netsuite/records/item_receipt_item.rb
netsuite-0.7.4 lib/netsuite/records/item_receipt_item.rb
netsuite-0.7.3 lib/netsuite/records/item_receipt_item.rb
netsuite-0.7.2 lib/netsuite/records/item_receipt_item.rb
netsuite-0.7.1 lib/netsuite/records/item_receipt_item.rb
netsuite-0.7.0 lib/netsuite/records/item_receipt_item.rb
netsuite-0.6.9 lib/netsuite/records/item_receipt_item.rb