public class MandateService
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
MandateService.MandateCancelRequest
Request class for
cancel(java.lang.String) . |
static class |
MandateService.MandateCreateRequest
Request class for
create() . |
static class |
MandateService.MandateGetRequest
Request class for
get(java.lang.String) . |
static class |
MandateService.MandateListRequest<S>
Request class for
list() . |
static class |
MandateService.MandateReinstateRequest
Request class for
reinstate(java.lang.String) . |
static class |
MandateService.MandateUpdateRequest
Request class for
update(java.lang.String) . |
Constructor and Description |
---|
MandateService(HttpClient httpClient)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
MandateService.MandateListRequest<java.lang.Iterable<Mandate>> |
all() |
MandateService.MandateCancelRequest |
cancel(java.lang.String identity)
Immediately cancels a mandate and all associated cancellable payments.
|
MandateService.MandateCreateRequest |
create()
Creates a new mandate object.
|
MandateService.MandateGetRequest |
get(java.lang.String identity)
Retrieves the details of an existing mandate.
|
MandateService.MandateListRequest<ListResponse<Mandate>> |
list()
Returns a cursor-paginated list of your mandates.
|
MandateService.MandateReinstateRequest |
reinstate(java.lang.String identity)
|
MandateService.MandateUpdateRequest |
update(java.lang.String identity)
Updates a mandate object.
|
public MandateService(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.mandates()
.
public MandateService.MandateCreateRequest create()
Creates a new mandate object.
public MandateService.MandateListRequest<ListResponse<Mandate>> list()
Returns a cursor-paginated list of your mandates.
public MandateService.MandateListRequest<java.lang.Iterable<Mandate>> all()
public MandateService.MandateGetRequest get(java.lang.String identity)
Retrieves the details of an existing mandate.
public MandateService.MandateUpdateRequest update(java.lang.String identity)
Updates a mandate object. This accepts only the metadata parameter.
public MandateService.MandateCancelRequest cancel(java.lang.String identity)
Immediately cancels a mandate and all associated cancellable payments. Any metadata supplied to this endpoint will be stored on the mandate cancellation event it causes.
This will fail with a cancellation_failed
error if the mandate is already cancelled.
public MandateService.MandateReinstateRequest reinstate(java.lang.String identity)
Reinstates a cancelled or expired mandate to the banks. You will receive a resubmission_requested
webhook, but after that reinstating the mandate follows the same process as its initial creation, so you will receive a submitted
webhook, followed by a reinstated
or failed
webhook up to two working days later. Any metadata supplied to this endpoint will be stored on the resubmission_requested
event it causes.
This will fail with a mandate_not_inactive
error if the mandate is already being submitted, or is active.
Mandates can be resubmitted up to 3 times.