Method: NetSuite::Support::Base#initialize

Defined in:
lib/netsuite/support/base.rb

#initialize(attributes = {}) ⇒ Base

Returns a new instance of Base.



10
11
12
13
14
15
16
17
# File 'lib/netsuite/support/base.rb', line 10

def initialize(attributes = {})
  # not all records have external/internal ID
  # we extract them here, but it's up to the subclass to create the accessors

  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
  @external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
  initialize_from_attributes_hash(attributes)
end