Update an external account
  @param resource_root: The root Resource object.
  @param account: Account to update, account name must be specified.
  @return: An ApiExternalAccount object, representing the updated external account
5004
def update_external_account(resource_root, account):
  
  return call(resource_root.put,
      EXTERNAL_ACCOUNT_PATH % ("update",),
      ApiExternalAccount, False, data=account)
506613
def account_settings_update(self, data, **kwargs):
        ""
        api_path = "/api/v2/account/settings.json"
        return self.call(api_path, method="PUT", data=data, **kwargs)
1236625
public void domain_account_accountName_updateUsage_POST(String domain, String accountName) throws IOException {
		String qPath = "/email/domain/{domain}/account/{accountName}/updateUsage";
		StringBuilder sb = path(qPath, domain, accountName);
		exec(qPath, "POST", sb.toString(), null);
	}
831510
public static function updateExternalAccount($id, $externalAccountId, $params = null, $opts = null)
    {
        return self::_updateNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts);
    }
1331745
public static base_response update(nitro_service client, authenticationauthnprofile resource) throws Exception {
		authenticationauthnprofile updateresource = new authenticationauthnprofile();
		updateresource.name = resource.name;
		updateresource.authnvsname = resource.authnvsname;
		updateresource.authenticationhost = resource.authenticationhost;
		updateresource.authenticationdomain = resource.authenticationdomain;
		updateresource.authenticationlevel = resource.authenticationlevel;
		return updateresource.update_resource(client);
	}
1334576
private void updateExternal(ServerHeartbeat server, String externalId)
  {
    if (externalId != null) { 
      ServerHeartbeat serverExternal = _root.getServer(externalId);
      
      server.setExternalServer(serverExternal);
    }
    else {
      server.setExternalServer(null);
      /*
      if (serverExternal != null) {
        serverExternal.setDelegate(data);
        
        _root.updateSequence();
      }
      */
    }
    
    // data.setExternalId(externalId);
  }
1368576
def update(self, password=values.unset):
        
        data = values.of({'Password': password, })

        payload = self._version.update(
            'POST',
            self._uri,
            data=data,
        )

        return CredentialInstance(
            self._version,
            payload,
            account_sid=self._solution['account_sid'],
            credential_list_sid=self._solution['credential_list_sid'],
            sid=self._solution['sid'],
        )
259295
def update(self, **kwargs):
        
        return self.__class__(self.resource.update(kwargs),
                              self.client,
                              wallet=self.wallet)
1271679
def release(self):
        
        self.parent.send(('release-account', self.account_hash))

        response = self.parent.recv()
        if isinstance(response, Exception):
            raise response

        if response != 'ok':
            raise ValueError('unexpected response: ' + repr(response))
851408
def add_account(self, account, nickname, password):
        
        password = to_binary(password)
        password = hashlib.md5(password).hexdigest()
        return self._post(
            'https://api.weixin.qq.com/customservice/kfaccount/add',
            data={
                'kf_account': account,
                'nickname': nickname,
                'password': password
            }
        )
421798
def post_accounts(new_account)
      @options = {path: '/accounts/content',
                  body:  Megam::JSONCompat.to_json(new_account)}.merge(@options)

      request(
        :expects  => 201,
        :method   => :post,
        :body     => @options[:body]
        )
    end
1027216
def update(self, auth, resource, desc={}, defer=False):
        
        return self._call('update', auth, [resource, desc], defer)
479276
public void removeAccount(Account accountToDelete) {
        // Thou shalt not delete root
        if (accountToDelete.getId().equals(rootAccount.getId()))
            return;

        Account parent = findParent(accountToDelete);
        if (parent != null) {
            removeAccount(parent, accountToDelete);
            setDirty(true);
        }
    }
275166
def put(self, accountId):
        """"""
        self.reqparse.add_argument('accountName', type=str, required=True)
        self.reqparse.add_argument('accountType', type=str, required=True)
        self.reqparse.add_argument('contacts', type=dict, required=True, action='append')
        self.reqparse.add_argument('enabled', type=int, required=True, choices=(0, 1))
        self.reqparse.add_argument('requiredRoles', type=str, action='append', default=())
        self.reqparse.add_argument('properties', type=dict, required=True)
        args = self.reqparse.parse_args()

        account_class = get_plugin_by_name(PLUGIN_NAMESPACES['accounts'], args['accountType'])
        if not account_class:
            raise InquisitorError('Invalid account type: {}'.format(args['accountType']))

        validate_contacts(args['contacts'])

        if not args['accountName'].strip():
            raise Exception('You must provide an account name')

        if not args['contacts']:
            raise Exception('You must provide at least one contact')

        class_properties = {from_camelcase(key): value for key, value in args['properties'].items()}
        for prop in account_class.class_properties:
            if prop['key'] not in class_properties:
                raise InquisitorError('Missing required property {}'.format(prop))

        account = account_class.get(accountId)
        if account.account_type != args['accountType']:
            raise InquisitorError('You cannot change the type of an account')

        account.account_name = args['accountName']
        account.contacts = args['contacts']
        account.enabled = args['enabled']
        account.required_roles = args['requiredRoles']
        account.update(**args['properties'])
        account.save()

        auditlog(event='account.update', actor=session['user'].username, data=args)

        return self.make_response({'message': 'Object updated', 'account': account.to_json(is_admin=True)})
219928
public void swapAccounts(Database other) {
        Account otherRoot = other.rootAccount;
        other.rootAccount = rootAccount;
        rootAccount = otherRoot;
        boolean otherDirty = other.dirty;
        other.dirty = dirty;
        dirty = otherDirty;
        HashMap<String, String> otherGlobalSettings = other.globalSettings;
        other.globalSettings = globalSettings;
        globalSettings = otherGlobalSettings;
    }
919444
def lock(self, resource_id, region, account_id=None):
        
        account_id = self.get_account_id(account_id)
        return self.http.post(
            "%s/%s/locks/%s/lock" % (self.endpoint, account_id, resource_id),
            json={'region': region},
            auth=self.get_api_auth())
330511
def modify_account(self, account, attrs):
        
        attrs = [{'n': k, '_content': v} for k, v in attrs.items()]
        self.request('ModifyAccount', {
            'id': self._get_or_fetch_id(account, self.get_account),
            'a': attrs
        })