class NetSuite::Records::PurchaseOrderItem

Public Class Methods

new(attributes_or_record = {}) click to toggle source
# File lib/netsuite/records/purchase_order_item.rb, line 20
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

Public Instance Methods

initialize_from_record(record) click to toggle source
# File lib/netsuite/records/purchase_order_item.rb, line 29
def initialize_from_record(record)
  self.attributes = record.send(:attributes)
end
to_record() click to toggle source
Calls superclass method NetSuite::Support::Records#to_record
# File lib/netsuite/records/purchase_order_item.rb, line 33
def to_record
  rec = super
  if rec["#{record_namespace}:customFieldList"]
    rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
  end
  rec
end