def update(attributes)
      self.class.run_transaction do |tx|
        self.attributes = process_attributes(attributes)
        saved = save
        tx.mark_failed unless saved
        saved
      end
    end
def update(attributes)
      self.class.run_transaction do |tx|
        self.attributes = process_attributes(attributes)
        saved = save
        tx.mark_failed unless saved
        saved
      end
    end
Updates this resource with all the attributes from the passed-in Hash and requests that the record be saved.
 If saving fails because the resource is invalid then false will be returned.