public final class CoinbaseAccountService extends CoinbaseBasePollingService implements PollingAccountService
coinbase, signatureCreator
exchange
Constructor and Description |
---|
CoinbaseAccountService(Exchange exchange)
Constructor
|
Modifier and Type | Method and Description |
---|---|
CoinbaseBaseResponse |
cancelCoinbaseRequest(String transactionId)
Authenticated resource which lets a user cancel a money request.
|
CoinbaseTransaction |
completeCoinbaseRequest(String transactionId)
Authenticated resource which lets a user complete a money request.
|
CoinbaseButton |
createCoinbaseButton(CoinbaseButton button)
Authenticated resource that creates a payment button, page, or iFrame to accept Bitcoin on your website.
|
CoinbaseOrder |
createCoinbaseOrder(CoinbaseButton button)
Authenticated resource which returns an order for a new button.
|
CoinbaseOrder |
createCoinbaseOrder(String code)
Authenticated resource which lets you generate an order associated with a button.
|
CoinbaseAddress |
generateCoinbaseReceiveAddress()
Authenticated resource that generates a new Bitcoin receive address for the user.
|
CoinbaseAddress |
generateCoinbaseReceiveAddress(String callbackUrl,
String label)
Authenticated resource that generates a new Bitcoin receive address for the user.
|
AccountInfo |
getAccountInfo()
Get account info
|
CoinbaseAccountChanges |
getCoinbaseAccountChanges()
Authenticated resource which returns all related changes to an account.
|
CoinbaseAccountChanges |
getCoinbaseAccountChanges(Integer page)
Authenticated resource which returns all related changes to an account.
|
CoinbaseAddresses |
getCoinbaseAddresses()
Authenticated resource that returns Bitcoin addresses a user has associated with their account.
|
CoinbaseAddresses |
getCoinbaseAddresses(Integer page,
Integer limit,
String filter)
Authenticated resource that returns Bitcoin addresses a user has associated with their account.
|
CoinbaseMoney |
getCoinbaseBalance()
Authenticated resource that returns the user’s current account balance in BTC.
|
CoinbaseContacts |
getCoinbaseContacts()
Authenticated resource that returns contacts the user has previously sent to or received from.
|
CoinbaseContacts |
getCoinbaseContacts(Integer page,
Integer limit,
String filter)
Authenticated resource that returns contacts the user has previously sent to or received from.
|
CoinbaseOrder |
getCoinbaseOrder(String orderIdOrCustom)
Authenticated resource which returns order details for a specific order id or merchant custom.
|
CoinbaseOrders |
getCoinbaseOrders()
Authenticated resource which returns a merchant’s orders that they have received.
|
CoinbaseOrders |
getCoinbaseOrders(Integer page)
Authenticated resource which returns a merchant’s orders that they have received.
|
CoinbaseAddress |
getCoinbaseReceiveAddress()
Authenticated resource that returns the user’s current Bitcoin receive address.
|
CoinbaseRecurringPayment |
getCoinbaseRecurringPayment(String recurringPaymentId)
Authenticated resource that lets you show an individual recurring payment.
|
CoinbaseRecurringPayments |
getCoinbaseRecurringPayments()
Authenticated resource that lets you list all your recurring payments (scheduled buys, sells, and subscriptions you’ve created with merchants).
|
CoinbaseRecurringPayments |
getCoinbaseRecurringPayments(Integer page,
Integer limit)
Authenticated resource that lets you list all your recurring payments (scheduled buys, sells, and subscriptions you’ve created with merchants).
|
CoinbaseSubscription |
getCoinbaseSubscription(String subscriptionId)
Authenticated resource that lets you (as a merchant) show an individual subscription than a customer has created with you.
|
CoinbaseSubscriptions |
getCoinbaseSubscriptions()
Authenticated resource that lets you (as a merchant) list all the subscriptions customers have made with you.
|
CoinbaseSubscriptions |
getCoinbaseSubscriptions(Integer page,
Integer limit)
Authenticated resource that lets you (as a merchant) list all the subscriptions customers have made with you.
|
CoinbaseTransaction |
getCoinbaseTransaction(String transactionIdOrIdemField)
Authenticated resource which returns the details of an individual transaction.
|
CoinbaseTransactions |
getCoinbaseTransactions()
Authenticated resource which returns the user’s most recent transactions.
|
CoinbaseTransactions |
getCoinbaseTransactions(Integer page)
Authenticated resource which returns the user’s most recent transactions.
|
CoinbaseUsers |
getCoinbaseUsers()
Authenticated resource that shows the current user and their settings.
|
boolean |
redeemCoinbaseToken(String tokenId)
Authenticated resource which claims a redeemable token for its address and Bitcoin.
|
String |
requestDepositAddress(String currency,
String... arguments)
Request a digital currency address to fund this account.
|
CoinbaseTransaction |
requestMoneyCoinbaseRequest(CoinbaseTransaction.CoinbaseRequestMoneyRequest transactionRequest)
Authenticated resource which lets the user request money from a Bitcoin address.
|
CoinbaseBaseResponse |
resendCoinbaseRequest(String transactionId)
Authenticated resource which lets the user resend a money request.
|
CoinbaseTransaction |
sendMoneyCoinbaseRequest(CoinbaseTransaction.CoinbaseSendMoneyRequest transactionRequest)
Authenticated resource which lets you send money to an email or Bitcoin address.
|
CoinbaseUser |
updateCoinbaseUser(CoinbaseUser user)
Authenticated resource that lets you update account settings for the current user.
|
String |
withdrawFunds(String currency,
BigDecimal amount,
String address)
Withdraw funds from this account.
|
createCoinbaseToken, createCoinbaseUser, createCoinbaseUser, getCoinbaseCurrencies, handleResponse
getExchangeSymbols, verifyOrder, verifyOrder, verifyOrder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getExchangeSymbols
public CoinbaseAccountService(Exchange exchange)
exchange
- public AccountInfo getAccountInfo() throws IOException
PollingAccountService
getAccountInfo
in interface PollingAccountService
IOException
- - Indication that a networking error occurred while fetching JSON datapublic String withdrawFunds(String currency, BigDecimal amount, String address) throws IOException
PollingAccountService
withdrawFunds
in interface PollingAccountService
currency
- The currency to withdrawamount
- The amount to withdrawaddress
- The destination addressCoinbaseAccountServiceRaw.getCoinbaseTransaction(String transactionIdOrIdemField)
to retreive more information about the
transaction, including the blockchain transaction hash.IOException
- - Indication that a networking error occurred while fetching JSON datapublic String requestDepositAddress(String currency, String... arguments) throws IOException
PollingAccountService
requestDepositAddress
in interface PollingAccountService
currency
- The digital currency that corresponds to the desired deposit address.IOException
- - Indication that a networking error occurred while fetching JSON datapublic CoinbaseUsers getCoinbaseUsers() throws IOException
CoinbaseUsers
wrapper around the current CoinbaseUser
containing account settings.IOException
public CoinbaseUser updateCoinbaseUser(CoinbaseUser user) throws IOException
getCoinbaseUsers()
to retrieve the current user
first.user
- CoinbaseUser
with new information to be updated.CoinbaseUser
with the requested updated account settings.IOException
public boolean redeemCoinbaseToken(String tokenId) throws IOException
tokenId
- IOException
public CoinbaseMoney getCoinbaseBalance() throws IOException
CoinbaseAmount
wrapper around a CoinbaseMoney
object representing the current user's balance.IOException
public CoinbaseAddress getCoinbaseReceiveAddress() throws IOException
CoinbaseAddress
.IOException
public CoinbaseAddresses getCoinbaseAddresses() throws IOException
CoinbaseAddresses
wrapper around a collection of CoinbaseAddress's
associated with the current user's account.IOException
public CoinbaseAddresses getCoinbaseAddresses(Integer page, Integer limit, String filter) throws IOException
page
- Optional parameter to request a desired page of results. Will return page 1 if the supplied page is null or less than 1.limit
- Optional parameter to limit the maximum number of results to return. Will return up to 25 results by default if null or less than 1.filter
- Optional String match to filter addresses. Matches the address itself and also if the use has set a ‘label’ on the address. No
filter is applied if filter
is null or empty.CoinbaseAddresses
wrapper around a collection of CoinbaseAddress's
associated with the current user's account.IOException
public CoinbaseAddress generateCoinbaseReceiveAddress() throws IOException
CoinbaseAddress
.IOException
public CoinbaseAddress generateCoinbaseReceiveAddress(String callbackUrl, String label) throws IOException
callbackUrl
- Optional Callback URL to receive instant payment notifications whenever funds arrive to this address.label
- Optional text label for the address which can be used to filter against when calling getCoinbaseAddresses()
.CoinbaseAddress
.IOException
public CoinbaseAccountChanges getCoinbaseAccountChanges() throws IOException
getCoinbaseTransactions
API call.
It is designed to be faster and provide more detail so you can generate an overview/summary of individual account changes. This is a paged
resource and will return 30 results representing the first page by default.IOException
public CoinbaseAccountChanges getCoinbaseAccountChanges(Integer page) throws IOException
getCoinbaseTransactions
API call.
It is designed to be faster and provide more detail so you can generate an overview/summary of individual account changes.page
- Optional parameter to request a desired page of results. Will return page 1 if the supplied page is null or less than 1.IOException
public CoinbaseContacts getCoinbaseContacts() throws IOException
CoinbaseContacts
the user has previously sent to or received from.IOException
public CoinbaseContacts getCoinbaseContacts(Integer page, Integer limit, String filter) throws IOException
page
- Optional parameter to request a desired page of results. Will return page 1 if the supplied page is null or less than 1.limit
- Optional parameter to limit the maximum number of results to return. Will return up to 25 results by default if null or less than 1.filter
- Optional String match to filter addresses. Matches the address itself and also if the use has set a ‘label’ on the address. No
filter is applied if filter
is null or empty.CoinbaseContacts
the user has previously sent to or received from.IOException
public CoinbaseTransactions getCoinbaseTransactions() throws IOException
CoinbaseTransactions
.IOException
public CoinbaseTransactions getCoinbaseTransactions(Integer page) throws IOException
page
- Optional parameter to request a desired page of results. Will return page 1 if the supplied page is null or less than 1.CoinbaseTransactions
.IOException
public CoinbaseTransaction getCoinbaseTransaction(String transactionIdOrIdemField) throws IOException
transactionIdOrIdemField
- IOException
public CoinbaseTransaction requestMoneyCoinbaseRequest(CoinbaseTransaction.CoinbaseRequestMoneyRequest transactionRequest) throws IOException
transactionRequest
- CoinbaseTransaction
representing the desired CoinbaseRequestMoneyRequest
.IOException
public CoinbaseTransaction sendMoneyCoinbaseRequest(CoinbaseTransaction.CoinbaseSendMoneyRequest transactionRequest) throws IOException
transactionRequest
- CoinbaseTransaction
representing the desired CoinbaseSendMoneyRequest
.IOException
public CoinbaseBaseResponse resendCoinbaseRequest(String transactionId) throws IOException
transactionId
- IOException
public CoinbaseTransaction completeCoinbaseRequest(String transactionId) throws IOException
transactionId
- CoinbaseTransaction
representing the completed CoinbaseSendMoneyRequest
.IOException
public CoinbaseBaseResponse cancelCoinbaseRequest(String transactionId) throws IOException
transactionId
- IOException
public CoinbaseButton createCoinbaseButton(CoinbaseButton button) throws IOException
button
- A CoinbaseButton
containing the desired button configuration for Coinbase to create.CoinbaseButton
.IOException
public CoinbaseOrders getCoinbaseOrders() throws IOException
getCoinbaseOrders(Integer page)
to retrieve additional pages.IOException
public CoinbaseOrders getCoinbaseOrders(Integer page) throws IOException
page
- Optional parameter to request a desired page of results. Will return page 1 if the supplied page is null or less than 1.IOException
public CoinbaseOrder getCoinbaseOrder(String orderIdOrCustom) throws IOException
orderIdOrCustom
- IOException
public CoinbaseOrder createCoinbaseOrder(String code) throws IOException
code
- The code of the button for which you wish to create an order.CoinbaseOrder
.IOException
public CoinbaseOrder createCoinbaseOrder(CoinbaseButton button) throws IOException
button
- A CoinbaseButton
containing information to create a one time order.CoinbaseOrder
.IOException
public CoinbaseRecurringPayments getCoinbaseRecurringPayments() throws IOException
IOException
public CoinbaseRecurringPayments getCoinbaseRecurringPayments(Integer page, Integer limit) throws IOException
page
- Optional parameter to request a desired page of results. Will return page 1 if the supplied page is null or less than 1.limit
- Optional parameter to limit the maximum number of results to return. Will return up to 25 results by default if null or less than 1.IOException
public CoinbaseRecurringPayment getCoinbaseRecurringPayment(String recurringPaymentId) throws IOException
recurringPaymentId
- IOException
public CoinbaseSubscriptions getCoinbaseSubscriptions() throws IOException
CoinbaseSubscription
objects where you are the merchant. This is a paged resource and will return the first page by default.IOException
public CoinbaseSubscriptions getCoinbaseSubscriptions(Integer page, Integer limit) throws IOException
CoinbaseSubscription
objects where you are the merchant.page
- Optional parameter to request a desired page of results. Will return page 1 if the supplied page is null or less than 1.limit
- Optional parameter to limit the maximum number of results to return. Will return up to 25 results by default if null or less than 1.IOException
public CoinbaseSubscription getCoinbaseSubscription(String subscriptionId) throws IOException
CoinbaseSubscription
object where you are the merchant.subscriptionId
- IOException
Copyright © 2012–2017 Xeiam, LLC. All rights reserved.