This method is used to change the credentials of CleverTap account Id and token programmatically
@param accountID CleverTap Account Id
@param token CleverTap Account Token
11079
@SuppressWarnings("unused")
    public static void changeCredentials(String accountID, String token) {
        changeCredentials(accountID, token, null);
    }
1225965
public void setAccountAttributes(java.util.Collection<AccountAttribute> accountAttributes) {
        if (accountAttributes == null) {
            this.accountAttributes = null;
            return;
        }

        this.accountAttributes = new com.amazonaws.internal.SdkInternalList<AccountAttribute>(accountAttributes);
    }
868563
public void setAccounts(java.util.Collection<String> accounts) {
        if (accounts == null) {
            this.accounts = null;
            return;
        }

        this.accounts = new java.util.ArrayList<String>(accounts);
    }
1303993
public void setCredentials(String userid, String password) {
        Map<String, String> data = new HashMap<String, String>();
        data.put("userid", userid);
        data.put("password", password);
        RemotingHeader header = new RemotingHeader(RemotingHeader.CREDENTIALS, true, data);
        headers.put(RemotingHeader.CREDENTIALS, header);
    }
374631
public void setAuthenticationToken(Authentication authentication) {
        if( logger.isDebugEnabled() ) {
            logger.debug( "New authentication token: " + authentication );
        }

        final HttpInvokerRequestExecutor hire = getHttpInvokerRequestExecutor();
        if( hire instanceof BasicAuthHttpInvokerRequestExecutor ) {
            if( logger.isDebugEnabled() ) {
                logger.debug( "Pass it along to executor" );
            }
            ((BasicAuthHttpInvokerRequestExecutor) hire).setAuthenticationToken( authentication );
        }
    }
1032514
@Nonnull
    public static String tokenFor(String credentialsId) {
        return secretFor(credentialsId).or(new Supplier<Secret>() {
            @Override
            public Secret get() {
                return Secret.fromString(UNKNOWN_TOKEN);
            }
        }).getPlainText();
    }
278742
@SuppressWarnings({"unused", "WeakerAccess"})
    protected static CleverTapInstanceConfig createDefaultInstance(Context context, @NonNull String accountId, @NonNull String accountToken, String accountRegion) {
        return new CleverTapInstanceConfig(context, accountId, accountToken, accountRegion, true);
    }
599503
public Optional<PartnerAccount> update(long partnerId, PartnerAccount account)
    {
        return HTTP.PUT(String.format("/v2/partners/%d/accounts/%d", partnerId, account.getId()), account, PARTNER_ACCOUNT);
    }
55188
public void setAccountAliases(java.util.Collection<String> accountAliases) {
        if (accountAliases == null) {
            this.accountAliases = null;
            return;
        }

        this.accountAliases = new com.amazonaws.internal.SdkInternalList<String>(accountAliases);
    }
148249
public void setCredentials(final String userId, final String apiToken, final String apiSecret) {
        if (userId != null && apiToken != null && apiSecret != null) {
            this.usersUri = String.format(BandwidthConstants.USERS_URI_PATH, userId.replaceAll(" ", ""));
            this.token = apiToken.replaceAll(" ", "");
            this.secret = apiSecret.replaceAll(" ", "");

            validateCredentials();
        } else {
            throw new MissingCredentialsException();
        }
    }
521318
private static void modifyAccountBySettingClient() {
    try {
      AccountUpdateResponse response = Account.updater()
        .city("Test city")
        .client(client)
        .update();
      System.out.println(response);
    } catch (PlivoRestException | IOException e) {
      e.printStackTrace();
    }
  }
1141588
@RequestMapping(value = "{accountId}/update", method = RequestMethod.PUT)
    public Account updateAccount(@PathVariable ID accountId, @RequestBody @Valid AccountInput input) {
        return accountService.updateAccount(accountId, input);
    }
104725
static void setAuthParams(String appKey, String desiredUid,
                              String[] alreadyAuthedUids) {
        setAuthParams(appKey, desiredUid, alreadyAuthedUids, null);
    }
740797
private Account prepareAccountForUpdate(final Account account,
            final MultivaluedMap<String, String> data,
            UserIdentityContext userIdentityContext) {
        Account.Builder accBuilder = Account.builder();
        //copy full incoming account, and let override happen
        //in a separate instance later
        accBuilder.copy(account);


        if (data.containsKey("Status")) {
            Account.Status newStatus = Account.Status.getValueOf(data.getFirst("Status").toLowerCase());
            accBuilder.setStatus(newStatus);
        }
        if (data.containsKey("FriendlyName")) {
            accBuilder.setFriendlyName(data.getFirst("FriendlyName"));
        }
        if (data.containsKey("Password")) {
            // if this is a reset-password operation, we also need to set the account status to active
            if (account.getStatus() == Account.Status.UNINITIALIZED) {
                accBuilder.setStatus(Account.Status.ACTIVE);
            }

            String password = data.getFirst("Password");
            PasswordValidator validator = PasswordValidatorFactory.createDefault();
            if (!validator.isStrongEnough(password)) {
                CustomReasonPhraseType stat = new CustomReasonPhraseType(Response.Status.BAD_REQUEST, "Password too weak");
                throw new WebApplicationException(status(stat).build());
            }
            final String hash = new Md5Hash(data.getFirst("Password")).toString();
            accBuilder.setAuthToken(hash);
        }

        if (data.containsKey("Role")) {
            // Only allow role change for administrators. Multitenancy checks will take care of restricting the modification scope to sub-accounts.
            if (userIdentityContext.getEffectiveAccountRoles().contains(permissionEvaluator.getAdministratorRole())) {
                accBuilder.setRole(data.getFirst("Role"));
            } else {
                CustomReasonPhraseType stat = new CustomReasonPhraseType(Response.Status.FORBIDDEN, "Only Administrator allowed");
                throw new WebApplicationException(status(stat).build());
            }
        }

        return accBuilder.build();
    }
1133898
def _init_credentials(self, oauth_token, oauth_token_secret):
        ""
        if oauth_token and oauth_token_secret:
            if self.verified:
                # If provided, this is a fully verified set of
                # credentials. Store the oauth_token and secret
                # and initialize OAuth around those
                self._init_oauth(oauth_token, oauth_token_secret)

            else:
                # If provided, we are reconstructing an initalized
                # (but non-verified) set of public credentials.
                self.oauth_token = oauth_token
                self.oauth_token_secret = oauth_token_secret

        else:
            # This is a brand new set of credentials - we need to generate
            # an oauth token so it's available for the url property.
            oauth = OAuth1(
                self.consumer_key,
                client_secret=self.consumer_secret,
                callback_uri=self.callback_uri,
                rsa_key=self.rsa_key,
                signature_method=self._signature_method
            )

            url = self.base_url + REQUEST_TOKEN_URL
            headers = {'User-Agent': self.user_agent}
            response = requests.post(url=url, headers=headers, auth=oauth)
            self._process_oauth_response(response)
585433
@SuppressWarnings({"unused", "WeakerAccess"})
    public static CleverTapAPI instanceWithConfig(Context context, @NonNull CleverTapInstanceConfig config){
        //noinspection ConstantConditions
        if (config == null) {
            Logger.v("CleverTapInstanceConfig cannot be null");
            return null;
        }
        if (instances == null) {
            instances = new HashMap<>();
        }
        CleverTapAPI instance = instances.get(config.getAccountId());
        if (instance == null){
            instance = new CleverTapAPI(context, config);
            instances.put(config.getAccountId(), instance);
        }
        return instance;
    }
341632
def delete_credential(self, identifier, credential_id=None):
        
        credential = {
            'id': credential_id
        }

        return self.client.call('SoftLayer_Network_Storage_Hub_Cleversafe_Account', 'credentialDelete',
                                credential, id=identifier)