def fields=(new_fields)
      new_fields.each do |field, value|
        public_send(field, value) if respond_to?(field)
      end
    end
def fields=(new_fields)
      new_fields.each do |field, value|
        public_send(field, value) if respond_to?(field)
      end
    end
Assigns the values of the given hash.

   message.to = 'Bob'
   message.fields = { from: 'Sally' }
   message.fields #=> { to: 'Bob', from: 'Sally' }