Adapts a MercadoBitcoinBaseTradeApiResult<MercadoBitcoinAccountInfo> to an AccountInfo

@param accountInfo The Mercado Bitcoin accountInfo
@param userName The user name
@return The account info
773955
public static AccountInfo adaptAccountInfo(
      MercadoBitcoinBaseTradeApiResult<MercadoBitcoinAccountInfo> accountInfo, String userName) {

    // Adapt to XChange DTOs
    Balance brlBalance = new Balance(Currency.BRL, accountInfo.getTheReturn().getFunds().getBrl());
    Balance btcBalance = new Balance(Currency.BTC, accountInfo.getTheReturn().getFunds().getBtc());
    Balance ltcBalance = new Balance(Currency.LTC, accountInfo.getTheReturn().getFunds().getLtc());

    return new AccountInfo(userName, new Wallet(brlBalance, btcBalance, ltcBalance));
  }
175183
func AccountInfo(fileBase64 string) (*AccountFile, error) {
	decodedBytes, err := base64.StdEncoding.DecodeString(fileBase64)
	if err != nil {
		return nil, err
	}
	ret := new(AccountFile)
	if err := json.NewDecoder(bytes.NewBuffer(decodedBytes)).Decode(ret); err != nil {
		return nil, err
	}
	return ret, nil
}
1309811
def get_account(self, account_id, **params):
        """"""
        response = self._get('v2', 'accounts', account_id, params=params)
        return self._make_api_object(response, Account)
1025338
public static AccountInfo adaptAccountInfo(ANXAccountInfo anxAccountInfo) {

    // Adapt to XChange DTOs
    AccountInfo accountInfo =
        new AccountInfo(
            anxAccountInfo.getLogin(),
            percentToFactor(anxAccountInfo.getTradeFee()),
            ANXAdapters.adaptWallet(anxAccountInfo.getWallets()));
    return accountInfo;
  }
939714
public CoinbaseAccount createCoinbaseAccount(String name) throws IOException {

    CreateCoinbaseAccountPayload payload = new CreateCoinbaseAccountPayload(name);

    String path = "/v2/accounts";
    String apiKey = exchange.getExchangeSpecification().getApiKey();
    BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();
    String body = new ObjectMapper().writeValueAsString(payload);
    String signature = getSignature(timestamp, HttpMethod.POST, path, body);
    showCurl(HttpMethod.POST, apiKey, timestamp, signature, path, body);

    return coinbase
        .createAccount(
            MediaType.APPLICATION_JSON,
            Coinbase.CB_VERSION_VALUE,
            apiKey,
            signature,
            timestamp,
            payload)
        .getData();
  }
966717
public Account getAccount(String name, boolean bankAccount) {
        String newName = name;
        if (!Common.getInstance().getMainConfig().getBoolean("System.Case-sentitive")) {
            newName = name.toLowerCase();
        }
        Account account;
        if (bankAccount && bankList.containsKey(newName)) {
            account = bankList.get(newName);
        } else if (!bankAccount && accountList.containsKey(newName)) {
            account = accountList.get(newName);
        } else {
            account = Common.getInstance().getStorageHandler().getStorageEngine().getAccount(newName, bankAccount);
            if (bankAccount) {
                bankList.put(newName, account);
            } else {
                accountList.put(newName, account);
            }
        }
        return account;
    }
1042216
protected Account authenticate(String username, String password) {
        StandardCredentials authenticationToken = new StandardCredentials(username, password);
        Account account = securityManager.authenticate(authenticationToken);
        return account;
    }
926367
public AccountAcquisition getAccountAcquisition(final String accountCode) {
        final String path = Account.ACCOUNT_RESOURCE + "/" + accountCode + AccountAcquisition.ACCOUNT_ACQUISITION_RESOURCE;
        return doGET(path, AccountAcquisition.class);
    }
92574
public OvhExchangeInformation serviceName_account_userPrincipalName_exchange_GET(String serviceName, String userPrincipalName) throws IOException {
		String qPath = "/msServices/{serviceName}/account/{userPrincipalName}/exchange";
		StringBuilder sb = path(qPath, serviceName, userPrincipalName);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhExchangeInformation.class);
	}
1131364
private String requestAccountName(DropboxAPI<AndroidAuthSession> dropboxApi) {
        String accountName = null;
        if (dropboxApi != null) {
            try {
                accountName = dropboxApi.accountInfo().displayName;
            } catch (DropboxException e) {
                // Do nothing.
            }
        }
        return accountName;
    }
692642
def get(self, accountId):
        """"""
        account = BaseAccount.get(accountId)
        if account:
            return self.make_response({
                'message': None,
                'account': account.to_json(is_admin=True)
            })
        else:
            return self.make_response({
                'message': 'Unable to find account',
                'account': None
            }, HTTP.NOT_FOUND)
702553
protected void transformUsername(final UsernamePasswordCredential userPass) throws AccountNotFoundException {
        if (StringUtils.isBlank(userPass.getUsername())) {
            throw new AccountNotFoundException("Username is null.");
        }
        LOGGER.debug("Transforming credential username via [{}]", this.principalNameTransformer.getClass().getName());
        val transformedUsername = this.principalNameTransformer.transform(userPass.getUsername());
        if (StringUtils.isBlank(transformedUsername)) {
            throw new AccountNotFoundException("Transformed username is null.");
        }
        userPass.setUsername(transformedUsername);
    }
964478
def get_account_details(self, account):
        
        result = self.get_user(account.username)
        if result is None:
            result = {}
        return result
1306559
public function getAccount()
    {
        $uuid = $this->getProperty('id');
        $url = $this->makeAbsoluteUrl('/api/users');
        $account = Account::get($uuid, $url, $this->client);
        if (!$account) {
            throw new \Exception("Account not found for user: " . $uuid);
        }
        return $account;
    }
387911
private static void getAccountInfo() {
    try {
      Account response = Account.getter()
        .get();
      System.out.println(response);
    } catch (PlivoRestException | IOException e) {
      e.printStackTrace();
    }
  }
498169
public OvhFilter domain_account_accountName_filter_name_GET(String domain, String accountName, String name) throws IOException {
		String qPath = "/email/domain/{domain}/account/{accountName}/filter/{name}";
		StringBuilder sb = path(qPath, domain, accountName, name);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhFilter.class);
	}
1057587
def user_account(self):
        """"""
        self.account_info = None

        url = 'https://tccna.honeywell.com/WebAPI/emea/api/v1/userAccount'

        response = requests.get(url, headers=self._headers())
        response.raise_for_status()

        self.account_info = response.json()
        return self.account_info