Class: NetSuite::Support::Base

Inherits:
Object
  • Object
show all
Includes:
Fields, Records
Defined in:
lib/netsuite/support/base.rb

Instance Method Summary collapse

Methods included from Fields

included

Methods included from Attributes

#attributes, #attributes=, #initialize_from_attributes_hash

Methods included from Records

#record_type, #to_attributes!, #to_record

Methods included from Namespaces::PlatformCore

#record_namespace

Constructor Details

#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