예제 #1
0
  /**
   * 账户更新
   *
   * @param accountInfo
   * @return
   * @throws ApiException
   */
  public AccountInfoType updateAccount(AccountInfoType accountInfo) throws ApiException {
    if (accountInfo == null) return null;

    AccountInfoType accountInfoType = null;

    UpdateAccountInfoRequest request = new UpdateAccountInfoRequest();
    request.setAccountInfoType(accountInfo);

    AccountService accountService = commonService.getService(AccountService.class);
    UpdateAccountInfoResponse response = accountService.updateAccountInfo(request);
    if (response != null) accountInfoType = response.getAccountInfoType();

    return accountInfoType;
  }
예제 #2
0
  public AccountInfoType getAccountInfo() {
    try {
      GetAccountInfoRequest request = new GetAccountInfoRequest();
      AccountService accountService = commonService.getService(AccountService.class);
      GetAccountInfoResponse response = accountService.getAccountInfo(request);

      if (response == null) {
        return null;
      }

      return response.getAccountInfoType();
    } catch (ApiException e) {
      logger.error("ERROR", e);
    }

    return null;
  }