lib/inventory_refresh/inventory_collection.rb
def record_identity(record)
      identity = record.try(:[], :id) || record.try(:[], "id") || record.try(:id)
      raise "Cannot obtain identity of the #{record}" if identity.blank?
      {
        :id => identity
      }
    end
def record_identity(record)
      identity = record.try(:[], :id) || record.try(:[], "id") || record.try(:id)
      raise "Cannot obtain identity of the #{record}" if identity.blank?
      {
        :id => identity
      }
    end
def record_identity ( record ) identity = record . try ( :[] , :id ) || record . try ( :[] , "id" ) || record . try ( :id ) raise "Cannot obtain identity of the #{record}" if identity . blank? { :id => identity } end
Returns a hash with a simple record identity

 @param record [ApplicationRecord, Hash] list of stored records
 @return [Hash{Symbol => Bigint}] record identity
Returns a hash with a simple record identity