public class CustomerBankAccountService
extends java.lang.Object
Service class for working with customer bank account resources.
Customer Bank Accounts hold the bank details of a customer. They always belong to a customer, and may be linked to several Direct Debit mandates.
Note that customer bank accounts must be unique, and so you will encounter a bank_account_exists
error if you try to create a duplicate bank account. You may wish to handle this by updating the existing record instead, the ID of which will be provided as links[customer_bank_account]
in the error response.
Modifier and Type | Class and Description |
---|---|
static class |
CustomerBankAccountService.CustomerBankAccountCreateRequest
Request class for
create() . |
static class |
CustomerBankAccountService.CustomerBankAccountDisableRequest
Request class for
disable(java.lang.String) . |
static class |
CustomerBankAccountService.CustomerBankAccountGetRequest
Request class for
get(java.lang.String) . |
static class |
CustomerBankAccountService.CustomerBankAccountListRequest<S>
Request class for
list() . |
static class |
CustomerBankAccountService.CustomerBankAccountUpdateRequest
Request class for
update(java.lang.String) . |
Constructor and Description |
---|
CustomerBankAccountService(HttpClient httpClient)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
CustomerBankAccountService.CustomerBankAccountListRequest<java.lang.Iterable<CustomerBankAccount>> |
all() |
CustomerBankAccountService.CustomerBankAccountCreateRequest |
create()
Creates a new customer bank account object.
|
CustomerBankAccountService.CustomerBankAccountDisableRequest |
disable(java.lang.String identity)
Immediately cancels all associated mandates and cancellable payments.
|
CustomerBankAccountService.CustomerBankAccountGetRequest |
get(java.lang.String identity)
Retrieves the details of an existing bank account.
|
CustomerBankAccountService.CustomerBankAccountListRequest<ListResponse<CustomerBankAccount>> |
list()
Returns a cursor-paginated list of your bank accounts.
|
CustomerBankAccountService.CustomerBankAccountUpdateRequest |
update(java.lang.String identity)
Updates a customer bank account object.
|
public CustomerBankAccountService(HttpClient httpClient)
Constructor. Users of this library should have no need to call this - an instance of this class can be obtained by calling GoCardlessClient.customerBankAccounts()
.
public CustomerBankAccountService.CustomerBankAccountCreateRequest create()
Creates a new customer bank account object.
There are three different ways to supply bank account details:
For more information on the different fields required in each country, see local bank details.
public CustomerBankAccountService.CustomerBankAccountListRequest<ListResponse<CustomerBankAccount>> list()
Returns a cursor-paginated list of your bank accounts.
public CustomerBankAccountService.CustomerBankAccountListRequest<java.lang.Iterable<CustomerBankAccount>> all()
public CustomerBankAccountService.CustomerBankAccountGetRequest get(java.lang.String identity)
Retrieves the details of an existing bank account.
public CustomerBankAccountService.CustomerBankAccountUpdateRequest update(java.lang.String identity)
Updates a customer bank account object. Only the metadata parameter is allowed.
public CustomerBankAccountService.CustomerBankAccountDisableRequest disable(java.lang.String identity)
Immediately cancels all associated mandates and cancellable payments.
This will return a disable_failed
error if the bank account has already been disabled.
A disabled bank account can be re-enabled by creating a new bank account resource with the same details.