Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/main/java/com/gocardless/resources/ScenarioSimulator.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@ private ScenarioSimulator() {
* `pending_submission` state. Not compatible with Autogiro, BECS NZ, and PAD mandates, which do
* not expire.</li>
* <li>`mandate_transferred`: Transitions a mandate through to `transferred`, having been
* submitted to the banks, set up successfully and then moved to a new bank account due to the
* customer using the UK's Current Account Switching Service (CASS). It must start in the
* `pending_submission` state. Only compatible with Bacs mandates.</li>
* submitted to the banks, set up successfully and then moved to a new bank account due. It must
* start in the `pending_submission` state. Only compatible with Bacs and SEPA mandates.</li>
* <li>`mandate_transferred_with_resubmission`: Transitions a mandate through `transferred` and
* resubmits it to the banks, can be caused be the UK's Current Account Switching Service (CASS)
* or when a customer contacts GoCardless to change their bank details. It must start in the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public BillingRequestTemplateGetRequest get(String identity) {
}

/**
*
*
*/
public BillingRequestTemplateCreateRequest create() {
return new BillingRequestTemplateCreateRequest(httpClient);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,25 @@ public MandateImportEntryCreateRequest withMandate(Mandate mandate) {
return this;
}

/**
* This field is ACH specific, sometimes referred to as [SEC
* code](https://www.moderntreasury.com/learn/sec-codes).
*
* This is the way that the payer gives authorisation to the merchant. web: Authorisation is
* Internet Initiated or via Mobile Entry (maps to SEC code: WEB) telephone: Authorisation
* is provided orally over telephone (maps to SEC code: TEL) paper: Authorisation is
* provided in writing and signed, or similarly authenticated (maps to SEC code: PPD)
*
*/
public MandateImportEntryCreateRequest withMandateAuthorisationSource(
Mandate.AuthorisationSource authorisationSource) {
if (mandate == null) {
mandate = new Mandate();
}
mandate.withAuthorisationSource(authorisationSource);
return this;
}

/**
* Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50
* characters and values up to 500 characters.
Expand Down Expand Up @@ -856,9 +875,26 @@ public Links withMandateImport(String mandateImport) {
}

public static class Mandate {
private AuthorisationSource authorisationSource;
private Map<String, String> metadata;
private String reference;

/**
* This field is ACH specific, sometimes referred to as [SEC
* code](https://www.moderntreasury.com/learn/sec-codes).
*
* This is the way that the payer gives authorisation to the merchant. web:
* Authorisation is Internet Initiated or via Mobile Entry (maps to SEC code: WEB)
* telephone: Authorisation is provided orally over telephone (maps to SEC code: TEL)
* paper: Authorisation is provided in writing and signed, or similarly authenticated
* (maps to SEC code: PPD)
*
*/
public Mandate withAuthorisationSource(AuthorisationSource authorisationSource) {
this.authorisationSource = authorisationSource;
return this;
}

/**
* Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50
* characters and values up to 500 characters.
Expand All @@ -877,6 +913,19 @@ public Mandate withReference(String reference) {
this.reference = reference;
return this;
}

public enum AuthorisationSource {
@SerializedName("web")
WEB, @SerializedName("telephone")
TELEPHONE, @SerializedName("paper")
PAPER, @SerializedName("unknown")
UNKNOWN;

@Override
public String toString() {
return name().toLowerCase();
}
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public OutboundPaymentService(HttpClient httpClient) {
}

/**
*
*
*/
public OutboundPaymentCreateRequest create() {
return new OutboundPaymentCreateRequest(httpClient);
Expand Down