lib/netsuite/records/employee.rb in netsuite-0.6.1 vs lib/netsuite/records/employee.rb in netsuite-0.6.2

- old
+ new

@@ -1,8 +1,10 @@ module NetSuite module Records - class Employee < Support::Base + class Employee + include Support::Records + include Support::Fields include Support::Actions include Support::RecordRefs include Namespaces::ListEmp # https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2014_1/script/record/employee.html @@ -21,9 +23,15 @@ field :roles_list, RoleList attr_reader :internal_id attr_accessor :external_id + + def initialize(attributes = {}) + @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 def self.search_class_name 'Employee' end