Updates multiple attributes at once, saving the object once the updates are complete.

 @param [Hash] attributes a hash of attributes to update

 @since 0.2.0
336247
def update_attributes(attributes)
      attributes.each { |attribute, value| write_attribute(attribute, value) }
      save
    end
479818
def attributes
      _attributes.inject(HashWithIndifferentAccess.new) do |hash, attribute|
        hash.update attribute => send(attribute)
      end
    end
460239
public void setAttributes(java.util.Collection<Attribute> attributes) {
        if (attributes == null) {
            this.attributes = null;
            return;
        }

        this.attributes = new java.util.ArrayList<Attribute>(attributes);
    }
65118
def save(attrs=nil)
      raise "a Hash of attributes to save must be specified" unless attrs && attrs.is_a?(Hash)
      raise "folder must be set prior to saving attributes" unless folder

      # merge attributes to asset that contains parent attributes
      @asset.attributes.merge!(attrs)

      # load contents of the user folder and merge in attributes passed to save
      # so that we don't save parent attributes
      contents = {}
      if File.exists?(folder)
        contents = load_contents(folder)
        raise "expected contents to be a hash" unless contents.is_a?(Hash)
      end

      contents = contents.merge!(attrs)
      write_contents(folder, contents)
    end
1134816
def update(attributes)
      load_attributes(
          Core::RestApi.instance.put(path, attributes, if_match_header))
    end
1181877
def update(attrs)
      old_attrs = @attributes.dup
      Model.no_change_tracking do
        assign_all_attributes(attrs, false)

        validate!.then do |errs|
          if errs && errs.present?
            # Revert wholesale
            @attributes = old_attrs
            Promise.new.resolve(errs)
          else
            # Persist
            persist_changes(nil)
          end
        end
      end
    end
1067591
def modify(name, old_value, new_value)
      @attributes[name] = new_value
      if @modifications && (old_value != new_value)
        original = @modifications[name].first if @modifications[name]
        @modifications[name] = [ (original || old_value), new_value ]
      end
    end
531837
def update_attributes(self, updates):
        """"""
        if not isinstance(updates, dict):
            updates = updates.to_dict()
        for sdk_key, spec_key in self._get_attributes_map().items():
            attr = '_%s' % sdk_key
            if spec_key in updates and not hasattr(self, attr):
                setattr(self, attr, updates[spec_key])
311284
public void setAttributes(final Map<String, Attribute> attributes) {
        this.internalAttributes = attributes;
        this.allAttributes.putAll(attributes);
    }
1247716
def update_attributes(self, **kwargs):
        """"""
        attrs = self.attributes.values() + self.lists.values() \
                + self.references.values()
        for att in attrs:
            if att.name in kwargs:
                att.__set__(self, kwargs[att.name])
613693
public void setAttributes(Map<String, ?> attributes) {
        if (attributes == null) {
            attributes = new HashMap<>();
        }

        this.attributes.clear();
        this.attributes.putAll(attributes);
    }
799370
def add(attributes)
      level = attributes[:level].to_sym

      if valid_level?(level)
        entries << Entry.new(attributes)
      end
    end
981986
def update_attribute!(attribute, value, should_reload_attributes = true)
      execute_and_capture_raises_at_errors(204) do
        @last_response = Http.patch("/charge-accounts/#{uuid}/", domain.token, etag, attribute => value)
      end
      
      reload_attributes! if should_reload_attributes
    end
73980
def assign_attributes(new_attributes)
      if !new_attributes.respond_to?(:stringify_keys)
        raise ArgumentError, "When assigning attributes, you must pass a hash as an argument."
      end
      return if new_attributes.empty?

      # stringify keys just like https://github.com/rails/rails/blob/4f99a2186479d5f77460622f2c0f37708b3ec1bc/activemodel/lib/active_model/attribute_assignment.rb#L34
      new_attributes.stringify_keys.each do |k, v|
        setter = :"#{k}="
        if respond_to?(setter)
          public_send(setter, v)
        else
          _attr_json_write_unknown_attribute(k, v)
        end
      end
    end
551658
def attributes
      (@original_attributes||{}).merge(@attributes).keys.inject({}) do |hash, key|
        hash[key] = read_attribute(key)
        hash
      end
    end
811752
def attributes=(attributes = {})
      attributes.each_pair { |k, v|
        respond_to?(name = "#{k}=") and send(name, v) or self[k] = v
      }
    end
510345
def readonly_attributes(*attrs)
      @readonly_attributes ||= [:created_at, :updated_at, :completed_at]
      if attrs.any?
        @readonly_attributes.map!(&:to_sym).concat(attrs).uniq!
        setup_attributes(@readonly_attributes, true)
      end
      @readonly_attributes
    end