public class CustomerService
extends java.lang.Object
Service class for working with customer resources.
Customer objects hold the contact details for a customer. A customer can have several customer bank accounts, which in turn can have several Direct Debit mandates.
Notes: - the swedish_identity_number
field may only be supplied for Swedish customers, and must be supplied if you intend to set up an Autogiro mandate with the customer. - the danish_identity_number
field may only be supplied for Danish customers, and must be supplied if you intend to set up a Betalingsservice mandate with the customer.
Modifier and Type | Class and Description |
---|---|
static class |
CustomerService.CustomerCreateRequest
Request class for
create() . |
static class |
CustomerService.CustomerGetRequest
Request class for
get(java.lang.String) . |
static class |
CustomerService.CustomerListRequest<S>
Request class for
list() . |
static class |
CustomerService.CustomerUpdateRequest
Request class for
update(java.lang.String) . |
Constructor and Description |
---|
CustomerService(HttpClient httpClient)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
CustomerService.CustomerListRequest<java.lang.Iterable<Customer>> |
all() |
CustomerService.CustomerCreateRequest |
create()
Creates a new customer object.
|
CustomerService.CustomerGetRequest |
get(java.lang.String identity)
Retrieves the details of an existing customer.
|
CustomerService.CustomerListRequest<ListResponse<Customer>> |
list()
Returns a cursor-paginated list of your customers.
|
CustomerService.CustomerUpdateRequest |
update(java.lang.String identity)
Updates a customer object.
|
public CustomerService(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.customers()
.
public CustomerService.CustomerCreateRequest create()
Creates a new customer object.
public CustomerService.CustomerListRequest<ListResponse<Customer>> list()
Returns a cursor-paginated list of your customers.
public CustomerService.CustomerListRequest<java.lang.Iterable<Customer>> all()
public CustomerService.CustomerGetRequest get(java.lang.String identity)
Retrieves the details of an existing customer.
public CustomerService.CustomerUpdateRequest update(java.lang.String identity)
Updates a customer object. Supports all of the fields supported when creating a customer.