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

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


    // Read in the JSON from the example resources
    InputStream is = CoinbaseMerchantJsonTest.class.getResourceAsStream("/merchant/example-token-data.json");

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

    assertThat(token.getTokenId()).isEqualTo("4193b86c7c7d54b32a7ca0974a97d8e21793713478162bb88834993be24dda40");
    assertThat(token.getAddress()).isEqualTo("12uXAka4ncEcVTWfvifPzq3n4kFC9qyvNz");
  }
View Full Code Here


   *         and will be credited to the account of the token redeemer if money is sent both before or after redemption.
   * @throws IOException
   */
  public CoinbaseToken createCoinbaseToken() throws IOException {

    final CoinbaseToken token = coinbase.createToken();
    return handleResponse(token);
  }
View Full Code Here

    System.out.println("Newly created user: " + createdUser);
  }

  private static void demoTokens(CoinbaseAccountService accountService) throws IOException {

    CoinbaseToken token = accountService.createCoinbaseToken();
    System.out.println(token);

    boolean isAccepted = accountService.redeemCoinbaseToken(token.getTokenId());
    System.out.println(isAccepted);
  }
View Full Code Here

TOP

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

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.