Package com.xeiam.xchange.coinbase.dto.account

Examples of com.xeiam.xchange.coinbase.dto.account.CoinbaseUser


  private static void demoUsers(CoinbaseAccountService accountService) throws IOException {

    CoinbaseUsers users = accountService.getCoinbaseUsers();
    System.out.println("Current User: " + users);

    CoinbaseUser user = users.getUsers().get(0);
    user.updateTimeZone("Tijuana").updateNativeCurrency("MXN");
    user = accountService.updateCoinbaseUser(user);
    System.out.println("Updated User: " + user);

    CoinbaseUser newUser = CoinbaseUser.createCoinbaseNewUserWithReferrerId("demo@demo.com", "pass1234", "527d2a1ffedcb8b73b000028");
    String oauthClientId = ""; // optional
    CoinbaseUser createdUser = accountService.createCoinbaseUser(newUser, oauthClientId);
    System.out.println("Newly created user: " + createdUser);
  }
View Full Code Here


   * @return The current {@code CoinbaseUser} with the requested updated account settings.
   * @throws IOException
   */
  public CoinbaseUser updateCoinbaseUser(final CoinbaseUser user) throws IOException {

    final CoinbaseUser updatedUser = coinbase.updateUser(user.getId(), user, exchangeSpecification.getApiKey(), signatureCreator, getNonce());
    return handleResponse(updatedUser);
  }
View Full Code Here

   * @return Information for the newly created user.
   * @throws IOException
   */
  public CoinbaseUser createCoinbaseUser(final CoinbaseUser user) throws IOException {

    final CoinbaseUser createdUser = coinbase.createUser(user);
    return handleResponse(createdUser);
  }
View Full Code Here

   * @return Information for the newly created user, including information to perform future OAuth requests for the user.
   * @throws IOException
   */
  public CoinbaseUser createCoinbaseUser(final CoinbaseUser user, final String oAuthClientId) throws IOException {

    final CoinbaseUser createdUser = coinbase.createUser(user.withoAuthClientId(oAuthClientId));
    return handleResponse(createdUser);
  }
View Full Code Here

    // Use Jackson to parse it
    ObjectMapper mapper = new ObjectMapper();
    CoinbaseUsers users = mapper.readValue(is, CoinbaseUsers.class);

    List<CoinbaseUser> userList = users.getUsers();
    CoinbaseUser user = userList.get(0);

    AccountInfo accountInfo = CoinbaseAdapters.adaptAccountInfo(user);
    assertThat(accountInfo).isEqualsToByComparingFields(expectedAccountInfo);
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.coinbase.dto.account.CoinbaseUser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.