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

- old
+ new

@@ -1,9 +1,11 @@ module NetSuite module Records - - class Bin < NetSuite::Support::Base + + class Bin + include Support::Records + include Support::Fields include Support::RecordRefs include Support::Actions include Namespaces::ListAcct # https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2014_1/schema/record/bin.html?mode=package @@ -14,9 +16,15 @@ actions :get, :add, :delete, :search, :update, :upsert fields :bin_number, :is_inactive, :location, :memo field :custom_field_list, NetSuite::Records::CustomFieldList + + 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 end end -end \ No newline at end of file +end