https://developer.zendesk.com/rest_api/docs/core/account_settings#update-account-settings
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)
351632
function set(Account, roles) {

    var Role = app.models.Role;
    for (var name in roles) {
      var role = roles[name];
      var model = app.models[role.model];
      model.belongsTo(Account, {
        foreignKey: 'accountId',
        as: 'account'
      });

      model.validatesUniquenessOf('accountId');

      Account.hasOne(model, {
        foreignKey: 'accountId',
        as: name
      });

      Role.registerResolver(name, function(roleName, context, cb) {

        Promise.resolve()
          .then(function() {

            var result = context.accessToken && context.accessToken.roles && context.accessToken.roles[roleName];
            return result?true:false;

          })
          .asCallback(cb);

      });

    }

  }
1051586
def settings
      data = RippleRest.get("v1/accounts/#{@address}/settings")["settings"]
      obj = AccountSettings.new data
      obj.account = self
      obj
    end
5004
def update_external_account(resource_root, account):
  
  return call(resource_root.put,
      EXTERNAL_ACCOUNT_PATH % ("update",),
      ApiExternalAccount, False, data=account)
969054
@Path("/{accountSid}")
    @Consumes(APPLICATION_FORM_URLENCODED)
    @POST
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    public Response updateAccountAsXmlPost(@PathParam("accountSid") final String accountSid,
            final MultivaluedMap<String, String> data,
            @HeaderParam("Accept") String accept,
            @Context SecurityContext sec) {
        return updateAccount(accountSid, data, retrieveMediaType(accept), ContextUtil.convert(sec));
    }
1274981
def update_entitlement(owner, repo, identifier, name, token, show_tokens):
    """"""
    client = get_entitlements_api()

    data = {}
    if name is not None:
        data["name"] = name

    if token is not None:
        data["token"] = token

    with catch_raise_api_exception():
        data, _, headers = client.entitlements_partial_update_with_http_info(
            owner=owner,
            repo=repo,
            identifier=identifier,
            data=data,
            show_tokens=show_tokens,
        )

    ratelimits.maybe_rate_limit(client, headers)
    return data.to_dict()
1266312
function getSettings(account, callback) {
  validate.address(account);

  this.remote.requestAccountInfo({account: account}, function(error, info) {
    if (error) {
      return callback(error);
    }

    var data = info.account_data;
    var settings = {
      account: data.Account,
      transfer_rate: '0'
    };

    // Attach account flags
    _.extend(settings, TxToRestConverter.parseFlagsFromResponse(data.Flags,
      constants.AccountRootFlags));

    // Attach account fields
    _.extend(settings, parseFieldsFromResponse(data,
      constants.AccountRootFields));

    settings.transaction_sequence = String(settings.transaction_sequence);

    callback(null, {settings: settings});
  });
}
999622
public CustomFields updateCustomField(String accountId, String customFieldId, CustomField customField) throws ApiException {
    return updateCustomField(accountId, customFieldId, customField, null);
  }
199292
def _update_limits_from_api(self):
        
        self.connect()
        logger.info("Querying RDS DescribeAccountAttributes for limits")
        lims = self.conn.describe_account_attributes()['AccountQuotas']
        for lim in lims:
            if lim['AccountQuotaName'] not in self.API_NAME_TO_LIMIT:
                logger.info('RDS DescribeAccountAttributes returned unknown'
                            'limit: %s (max: %s; used: %s)',
                            lim['AccountQuotaName'], lim['Max'], lim['Used'])
                continue
            lname = self.API_NAME_TO_LIMIT[lim['AccountQuotaName']]
            self.limits[lname]._set_api_limit(lim['Max'])
            if len(self.limits[lname].get_current_usage()) < 1:
                self.limits[lname]._add_current_usage(lim['Used'])
        logger.debug('Done setting limits from API.')
491157
def update(gandi, email, password, quota, fallback, alias_add, alias_del):
    """"""
    options = {}

    if password:
        password = click.prompt('password', hide_input=True,
                                confirmation_prompt=True)
        options['password'] = password

    if quota is not None:
        options['quota'] = quota

    if fallback is not None:
        options['fallback_email'] = fallback

    login, domain = email

    result = gandi.mail.update(domain, login, options, alias_add, alias_del)

    return result
1116549
function updateAccount() {

  account.middleName = 'Make it so.';

  return account.save(function(err, savedAccount) {
    if (err) throw err;
    account = savedAccount;
    console.log('Updated account:');
    console.log(account);
    return authenticateAccount(); //next quickstart step
  });

}
939535
def set_primary(self, **params):
        """"""
        data = self.api_client.set_primary_account(self.id, **params)
        self.update(data)
        return data
1072622
def cli(env, account_id):
    """"""

    manager = SoftLayer.CDNManager(env.client)
    account = manager.get_account(account_id)

    table = formatting.KeyValueTable(['name', 'value'])
    table.align['name'] = 'r'
    table.align['value'] = 'l'

    table.add_row(['id', account['id']])
    table.add_row(['account_name', account['cdnAccountName']])
    table.add_row(['type', account['cdnSolutionName']])
    table.add_row(['status', account['status']['name']])
    table.add_row(['created', account['createDate']])
    table.add_row(['notes',
                   account.get('cdnAccountNote', formatting.blank())])

    env.fout(table)
59309
def can_user_update_settings(request, view, obj=None):
        
        if obj is None:
            return

        # TODO [TM:3/21/17] clean it up after WAL-634. Clean up service settings update tests as well.
        if obj.customer and not obj.shared:
            return permissions.is_owner(request, view, obj)
        else:
            return permissions.is_staff(request, view, obj)
1163240
public Request<Tenant> update(Tenant tenant) {
        Asserts.assertNotNull(tenant, "tenant");

        String url = baseUrl
                .newBuilder()
                .addPathSegments("api/v2/tenants/settings")
                .build()
                .toString();

        CustomRequest<Tenant> request = new CustomRequest<>(client, url, "PATCH", new TypeReference<Tenant>() {
        });
        request.addHeader("Authorization", "Bearer " + apiToken);
        request.setBody(tenant);
        return request;
    }
43192
def save
      raise ArgumentError.new("Account is missing.") unless account
      
      account.require_secret
      
      hash = {}
      hash["settings"] = to_hash
      hash["secret"] = account.secret
      
      RippleRest.post "v1/accounts/#{account.address}/settings", hash
    end
595156
def update(self, *args, **kwargs):
        """"""
        # first find the update_url for the provided account + hostname:
        update_url = next((r.update_url for r in
                           records(self._credentials, self._url)
                           if r.hostname == self.hostname), None)
        if update_url is None:
            LOG.warning("Could not find hostname '%s' at '%s'",
                        self.hostname, self._url)
            return None
        return update(update_url)