Class: NetSuite::Records::VendorBillExpense

Inherits:
Object
  • Object
show all
Includes:
Namespaces::TranPurch, Support::Fields, Support::RecordRefs, Support::Records
Defined in:
lib/netsuite/records/vendor_bill_expense.rb

Instance Method Summary collapse

Methods included from Namespaces::TranPurch

#record_namespace

Methods included from Support::Records

#record_type, #to_attributes!

Methods included from Namespaces::PlatformCore

#record_namespace

Methods included from Support::Attributes

#attributes, #attributes=, #initialize_from_attributes_hash

Methods included from Support::RecordRefs

included

Methods included from Support::Fields

included

Constructor Details

#initialize(attributes_or_record = {}) ⇒ VendorBillExpense

Returns a new instance of VendorBillExpense.



16
17
18
19
20
21
22
23
# File 'lib/netsuite/records/vendor_bill_expense.rb', line 16

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

Instance Method Details

#initialize_from_record(record) ⇒ Object



25
26
27
# File 'lib/netsuite/records/vendor_bill_expense.rb', line 25

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

#to_recordObject



29
30
31
32
33
34
35
# File 'lib/netsuite/records/vendor_bill_expense.rb', line 29

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