}
private static void demoTransactions(CoinbaseAccountService accountService) throws IOException {
CoinbaseRequestMoneyRequest moneyRequest = CoinbaseTransaction.createMoneyRequest("xchange@demo.com", Currencies.BTC, new BigDecimal(".001")).withNotes("test");
CoinbaseTransaction pendingTransaction = accountService.requestMoneyCoinbaseRequest(moneyRequest);
System.out.println(pendingTransaction);
CoinbaseBaseResponse resendResponse = accountService.resendCoinbaseRequest(pendingTransaction.getId());
System.out.println(resendResponse);
CoinbaseBaseResponse cancelResponse = accountService.cancelCoinbaseRequest(pendingTransaction.getId());
System.out.println(cancelResponse);
// CoinbaseSendMoneyRequest sendMoneyRequest = CoinbaseTransaction
// .createSendMoneyRequest("1Fpx2Q6J8TX3PZffgEBTpWSHG37FQBgqKB", MoneyUtils.parse("BTC .01"))
// .withNotes("Demo Money!").withInstantBuy(false).withUserFee("0.0");
// CoinbaseTransaction sendTransaction = accountService.sendMoney(sendMoneyRequest);
// System.out.println(sendTransaction);
// CoinbaseTransaction completedTransaction = accountService.completeRequest("530010d62b342891e2000083");
// System.out.println(completedTransaction);
CoinbaseTransactions transactions = accountService.getCoinbaseTransactions();
System.out.println(transactions);
if (transactions.getTotalCount() > 0) {
CoinbaseTransaction transaction = accountService.getCoinbaseTransaction(transactions.getTransactions().get(0).getId());
System.out.println(transaction);
}
}