def fields= (new_fields)
      unless new_fields.kind_of? Array and  new_fields.reject{|c| c.kind_of? Hash }.empty?
        raise JSS::InvalidDataError, "Argument must be an Array of Hashes."
      end
      raise "A peripheral type can have a maximmum of 20 fields"  if new_fields.count > 20
      new_fields.each{ |f| field_ok? f }
      @fields = new_fields
      order_fields
      @need_to_update = true
    end
def fields= (new_fields)
      unless new_fields.kind_of? Array and  new_fields.reject{|c| c.kind_of? Hash }.empty?
        raise JSS::InvalidDataError, "Argument must be an Array of Hashes."
      end
      raise "A peripheral type can have a maximmum of 20 fields"  if new_fields.count > 20
      new_fields.each{ |f| field_ok? f }
      @fields = new_fields
      order_fields
      @need_to_update = true
    end
Replace the entire Array of field definitions.
 The :order of each will be set based on the indexes of the
 Array provided.

 @param new_fields[Array<Hash>] the new field definitions

 @return [void]