Skip to content
Merged
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
25 changes: 25 additions & 0 deletions src/main/java/com/gocardless/services/MandateService.java
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ public static final class MandateListRequest<S> extends ListRequest<S, Mandate>
private String creditor;
private String customer;
private String customerBankAccount;
private List<String> include;
private String mandateType;
private String reference;
private List<String> scheme;
Expand Down Expand Up @@ -406,6 +407,27 @@ public MandateListRequest<S> withCustomerBankAccount(String customerBankAccount)
return this;
}

/**
* Includes linked resources in the response. Use <code>customer</code> to embed customer
* details, or <code>bank_account</code> to embed bank account details.
*/
public MandateListRequest<S> withInclude(List<String> include) {
this.include = include;
return this;
}

/**
* Includes linked resources in the response. Use <code>customer</code> to embed customer
* details, or <code>bank_account</code> to embed bank account details.
*/
public MandateListRequest<S> withInclude(String include) {
if (this.include == null) {
this.include = new ArrayList<>();
}
this.include.add(include);
return this;
}

/**
* Number of records to return.
*/
Expand Down Expand Up @@ -497,6 +519,9 @@ protected Map<String, Object> getQueryParams() {
if (customerBankAccount != null) {
params.put("customer_bank_account", customerBankAccount);
}
if (include != null) {
params.put("include", Joiner.on(",").join(include));
}
if (mandateType != null) {
params.put("mandate_type", mandateType);
}
Expand Down
Loading