Class: NetSuite::Support::Base
- Inherits:
-
Object
- Object
- NetSuite::Support::Base
- Defined in:
- lib/netsuite/support/base.rb
Direct Known Subclasses
Records::Bin, Records::ContactAccessRoles, Records::CustomListCustomValue, Records::Employee, Records::File, Records::Partner, Records::Roles
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Base
constructor
A new instance of Base.
Methods included from Fields
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
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 |