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

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


    }
  }

  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");
View Full Code Here


   * @return A {@code CoinbaseUsers} wrapper around the current {@code CoinbaseUser} containing account settings.
   * @throws IOException
   */
  public CoinbaseUsers getCoinbaseUsers() throws IOException {

    final CoinbaseUsers users = coinbase.getUsers(exchangeSpecification.getApiKey(), signatureCreator, getNonce());
    return users;
  }
View Full Code Here

  }

  @Override
  public AccountInfo getAccountInfo() throws IOException {

    final CoinbaseUsers users = super.getCoinbaseUsers();
    return CoinbaseAdapters.adaptAccountInfo(users.getUsers().get(0));
  }
View Full Code Here

    // Read in the JSON from the example resources
    InputStream is = CoinbaseAdapterTest.class.getResourceAsStream("/account/example-users-data.json");

    // 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.CoinbaseUsers

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.