Update a company for a user

 @see https://reference.promisepay.com/#update-company

 @param attributes [Hash] Company's attributes.

 @return [Promisepay::Company]
439794
def update(attributes)
      response = JSON.parse(@client.patch("companies/#{attributes[:id]}", attributes).body)
      Promisepay::Company.new(@client, response['companies'])
    end
948758
def remote_update(attribute_names = @attributes.keys)
      run_callbacks :update do
        # Use the getter here so we get the type casting.
        updated_attributes = attributes
        updated_attributes.slice!(*attribute_names)
        updated_attributes.merge!(scope_key_hash)

        remote(:update, updated_attributes)
      end
    end
166108
def _update_record(attribute_names = @attributes.keys)
        # check if class has custom update method
        if self.class.custom_update_method
          # run before/after callbacks defined in model
          run_callbacks(:update) do
            # timestamp
            if should_record_timestamps?
              current_time = current_time_from_proper_timezone

              timestamp_attributes_for_update_in_model.each do |column|
                column = column.to_s
                next if will_save_change_to_attribute?(column)
                write_attribute(column, current_time)
              end
            end
            # update just dirty attributes
            if partial_writes?
              # Serialized attributes should always be written in case they've been
              # changed in place.
              update_using_custom_method(changed | (attributes.keys & self.class.columns.select { |column| column.is_a?(Type::Serialized) }))
            else
              update_using_custom_method(attributes.keys)
            end
          end
        else
          super
        end
      end
1364656
def update(user_id, options = {})
      query = { 
        query: {
          username: options[:username],
          password: options[:password],
          attributes: hash_to_base64_json(options[:attributes])
          }
        }
      new_options = default_options_to_merge_with.merge(query)
      self.class.put("/#{@api_ver}/users/#{user_id}", new_options)
    end
634436
def update_role(id, name)
      current_path = "/api/v1/roles/#{id}/update"
      payload = { 'new_name' => name }.to_json
      @conn.put(current_path, payload)
    end
1065887
def salesforce_attributes_to_update(include_all = false)
      {}.tap do |hash|
        self.class.salesforce_sync_attribute_mapping.each do |key, value|
          if self.respond_to?(value)

            #Checkboxes in SFDC Cannot be nil.  Here we check for boolean field type and set nil values to be false
            attribute_value = self.send(value)
            if is_boolean?(value) && attribute_value.nil?
              attribute_value = false
            end

            hash[key] = attribute_value if include_all || salesforce_should_update_attribute?(value)
          end
        end
      end
    end
194965
public function update($attributes)
    {
        try {
            self::init();
            foreach ($attributes as $column => $value) {
                $columns[] = $column. ' = :'.$column;
            }
            $sql = 'UPDATE ' . self::$modelTable . ' SET ' . implode(', ', $columns) . ' WHERE id = ' . $this->id;
            $stm = self::$connect->prepare($sql);
            $stm->execute($attributes);
            $this->setAttributes($attributes);
            return $this;
        } catch (\Exception $exception) {
            var_dump($exception->getMessage());
        }
    }
1283817
def release_attributes(self, attributes, active=True):
        
        attribute_update = self._post_object(self.update_api.attributes.release, attributes)
        return ExistAttributeResponse(attribute_update)
451713
private void updateAttributes(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException
   {
      String name = request.getParameter("name");

      if (trace)
         log.trace("updateAttributes, name=" + name);

      Enumeration paramNames = request.getParameterNames();
      HashMap<String, String> attributes = new HashMap<String, String>();

      while (paramNames.hasMoreElements())
      {
         String param = (String)paramNames.nextElement();

         if (param.equals("name") || param.equals("action"))
            continue;

         String value = request.getParameter(param);

         if (trace)
            log.trace("name=" + param + ", value='" + value + "'");

         // Ignore null values, these are empty write-only fields
         if (value == null || value.length() == 0)
            continue;

         attributes.put(param, value);
      }

      try
      {
         AttributeList newAttributes = setAttributes(name, attributes);
         MBeanData data = getMBeanData(name);
         request.setAttribute("mbeanData", data);

         RequestDispatcher rd = this.getServletContext().getRequestDispatcher("/inspectmbean.jsp");
         rd.forward(request, response);
      }
      catch (Exception e)
      {
         throw new ServletException("Failed to update attributes", e);
      }
   }
940474
def update_from(user)
      @name = user.name
      @password = user.password
      @roster = user.roster.map {|c| c.clone }
    end
921174
def update_attributes(self, attributes):
        
        attribute_update = self._post_object(self.update_api.attributes.update, attributes)
        return ExistAttributeResponse(attribute_update)
970320
def update(attributes)
      warn "[DEPRECATED] update as an instance method is deprecated. Please use Customer.update"
      result = @gateway.customer.update(id, attributes)
      if result.success?
        copy_instance_variables_from_object result.customer
      end
      result
    end
1253167
def update(client_id, key, value)
      @clients.each do |hash|
        if hash[:client_id] == client_id
          hash[key] = value
        end
      end
    end
203121
def update(self, typ, id, **kwargs):
        
        return self._load(self._request(typ, id=id, method='PUT', data=kwargs))
1118541
def update_attributes(properties_hash)
      self.class.get_class_properties.each do |property|
        key = property[:name].to_sym
        if properties_hash.has_key? key
          self.setValue(properties_hash[key], forKey:key)
        end
      end
    end
1368723
def update_attributes(attrs)
      if id = attrs.delete(:id)
        @id = id
      end
      attrs.each do |key, value|
        setter = :"#{key}="
        send(setter, value) if respond_to?(setter)
      end
    end
830537
def update_attributes(attributes)
      attributes.each do |attribute, value|
        unless COMMON_ATTRIBUTES.value?(attribute)
          raise ArgumentError, "Invalid attribute: #{attribute}"
        end

        public_send(:"#{attribute}=", value)
      end
    end