diff --git a/README.md b/README.md
index 0397c9bb..4f43b789 100644
--- a/README.md
+++ b/README.md
@@ -14,14 +14,14 @@ With Maven:
com.gocardless
gocardless-pro
- 6.7.0
+ 6.8.0
```
With Gradle:
```
-implementation 'com.gocardless:gocardless-pro:6.7.0'
+implementation 'com.gocardless:gocardless-pro:6.8.0'
```
## Initializing the client
diff --git a/build.gradle b/build.gradle
index 88e72e62..45e35869 100644
--- a/build.gradle
+++ b/build.gradle
@@ -25,7 +25,7 @@ plugins {
sourceCompatibility = 1.8
targetCompatibility = 1.8
group = 'com.gocardless'
-version = '6.7.0'
+version = '6.8.0'
apply plugin: 'ch.raffael.pegdown-doclet'
diff --git a/src/main/java/com/gocardless/http/HttpClient.java b/src/main/java/com/gocardless/http/HttpClient.java
index 35d6c713..d87278ab 100644
--- a/src/main/java/com/gocardless/http/HttpClient.java
+++ b/src/main/java/com/gocardless/http/HttpClient.java
@@ -35,7 +35,7 @@ public class HttpClient {
private static final String DISALLOWED_USER_AGENT_CHARACTERS =
"[^\\w!#$%&'\\*\\+\\-\\.\\^`\\|~]";
private static final String USER_AGENT =
- String.format("gocardless-pro-java/6.7.0 java/%s %s/%s %s/%s",
+ String.format("gocardless-pro-java/6.8.0 java/%s %s/%s %s/%s",
cleanUserAgentToken(System.getProperty("java.vm.specification.version")),
cleanUserAgentToken(System.getProperty("java.vm.name")),
cleanUserAgentToken(System.getProperty("java.version")),
@@ -49,7 +49,7 @@ public class HttpClient {
builder.put("GoCardless-Version", "2015-07-06");
builder.put("Accept", "application/json");
builder.put("GoCardless-Client-Library", "gocardless-pro-java");
- builder.put("GoCardless-Client-Version", "6.7.0");
+ builder.put("GoCardless-Client-Version", "6.8.0");
HEADERS = builder.build();
}
private final OkHttpClient rawClient;
diff --git a/src/main/java/com/gocardless/resources/Event.java b/src/main/java/com/gocardless/resources/Event.java
index e8f903b8..a33b16d2 100644
--- a/src/main/java/com/gocardless/resources/Event.java
+++ b/src/main/java/com/gocardless/resources/Event.java
@@ -103,7 +103,7 @@ public Map getResourceMetadata() {
* `refunds`
* `scheme_identifiers`
* `subscriptions`
- * `outbound_payment`
+ * `outbound_payments`
*
*/
public ResourceType getResourceType() {
@@ -124,8 +124,7 @@ public enum ResourceType {
PAYOUTS, @SerializedName("refunds")
REFUNDS, @SerializedName("scheme_identifiers")
SCHEME_IDENTIFIERS, @SerializedName("subscriptions")
- SUBSCRIPTIONS, @SerializedName("outbound_payment")
- OUTBOUND_PAYMENT, @SerializedName("unknown")
+ SUBSCRIPTIONS, @SerializedName("unknown")
UNKNOWN
}
diff --git a/src/main/java/com/gocardless/resources/Institution.java b/src/main/java/com/gocardless/resources/Institution.java
index 12c1e38c..583000b5 100644
--- a/src/main/java/com/gocardless/resources/Institution.java
+++ b/src/main/java/com/gocardless/resources/Institution.java
@@ -1,6 +1,7 @@
package com.gocardless.resources;
import com.google.gson.annotations.SerializedName;
+import java.util.Map;
/**
* Represents a institution resource returned from the API.
@@ -20,6 +21,7 @@ private Institution() {
private String countryCode;
private String iconUrl;
private String id;
+ private Limits limits;
private String logoUrl;
private String name;
private Status status;
@@ -36,7 +38,8 @@ public Boolean getAutocompletesCollectBankAccount() {
/**
* [ISO
* 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
- * alpha-2 code. The country code of the institution.
+ * alpha-2 code. The country code of the institution. If nothing is provided, institutions with
+ * the country code 'GB' are returned by default.
*/
public String getCountryCode() {
return countryCode;
@@ -56,6 +59,13 @@ public String getId() {
return id;
}
+ /**
+ * Defines individual limits for business and personal accounts.
+ */
+ public Limits getLimits() {
+ return limits;
+ }
+
/**
* A URL pointing to the logo for this institution
*/
@@ -84,4 +94,34 @@ public enum Status {
TEMPORARILY_DISABLED, @SerializedName("unknown")
UNKNOWN
}
+
+ /**
+ * Represents a limit resource returned from the API.
+ *
+ * Defines individual limits for business and personal accounts.
+ */
+ public static class Limits {
+ private Limits() {
+ // blank to prevent instantiation
+ }
+
+ private Map daily;
+ private Map single;
+
+ /**
+ * Daily limit details for this institution. (The 'limits' property is only available via an
+ * authenticated request with a generated access token)
+ */
+ public Map getDaily() {
+ return daily;
+ }
+
+ /**
+ * Single transaction limit details for this institution. (The 'limits' property is only
+ * available via an authenticated request with a generated access token)
+ */
+ public Map getSingle() {
+ return single;
+ }
+ }
}
diff --git a/src/main/java/com/gocardless/services/BillingRequestService.java b/src/main/java/com/gocardless/services/BillingRequestService.java
index f3efe9c7..572ede21 100644
--- a/src/main/java/com/gocardless/services/BillingRequestService.java
+++ b/src/main/java/com/gocardless/services/BillingRequestService.java
@@ -3151,7 +3151,8 @@ public static final class BillingRequestSelectInstitutionRequest
/**
* [ISO
* 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
- * alpha-2 code. The country code of the institution.
+ * alpha-2 code. The country code of the institution. If nothing is provided, institutions
+ * with the country code 'GB' are returned by default.
*/
public BillingRequestSelectInstitutionRequest withCountryCode(String countryCode) {
this.countryCode = countryCode;
diff --git a/src/main/java/com/gocardless/services/EventService.java b/src/main/java/com/gocardless/services/EventService.java
index caffe6bc..827425ee 100644
--- a/src/main/java/com/gocardless/services/EventService.java
+++ b/src/main/java/com/gocardless/services/EventService.java
@@ -183,6 +183,7 @@ public EventListRequest withExport(String export) {
* `refund`
* `scheme_identifier`
* `subscription`
+ * `outbound_payment`
*
*/
public EventListRequest withInclude(Include include) {
@@ -272,8 +273,8 @@ public EventListRequest withRefund(String refund) {
/**
* Type of resource that you'd like to get all events for. Cannot be used together with the
* `billing_request`, `creditor`, `export`,`instalment_schedule`, `mandate`,
- * `payer_authorisation`, `payment`, `payout`, `refund`, `scheme_identifier` or
- * `subscription` parameters. The type can be one of:
+ * `payer_authorisation`, `payment`, `payout`, `refund`, `scheme_identifier`, `subscription`
+ * or `outbound_payment` parameters. The type can be one of:
*
* - `billing_requests`
* - `creditors`
@@ -286,6 +287,7 @@ public EventListRequest withRefund(String refund) {
* - `refunds`
* - `scheme_identifiers`
* - `subscriptions`
+ * - `outbound_payments`
*
*/
public EventListRequest withResourceType(ResourceType resourceType) {
@@ -428,8 +430,7 @@ public enum ResourceType {
PAYOUTS, @SerializedName("refunds")
REFUNDS, @SerializedName("scheme_identifiers")
SCHEME_IDENTIFIERS, @SerializedName("subscriptions")
- SUBSCRIPTIONS, @SerializedName("outbound_payment")
- OUTBOUND_PAYMENT, @SerializedName("unknown")
+ SUBSCRIPTIONS, @SerializedName("unknown")
UNKNOWN;
@Override
diff --git a/src/main/java/com/gocardless/services/InstitutionService.java b/src/main/java/com/gocardless/services/InstitutionService.java
index d36ae07a..2b950d34 100644
--- a/src/main/java/com/gocardless/services/InstitutionService.java
+++ b/src/main/java/com/gocardless/services/InstitutionService.java
@@ -58,18 +58,51 @@ public InstitutionListForBillingRequestRequest> listForBil
* Returns a list of supported institutions.
*/
public static final class InstitutionListRequest extends ListRequest {
+ private String branchCode;
private String countryCode;
+ private String feature;
+ private String scheme;
+
+ /**
+ * (Currently only supports UK sort-codes) The six-digit number that identifies both the
+ * bank and the specific branch where an account is held, eg. '601234'.
+ */
+ public InstitutionListRequest withBranchCode(String branchCode) {
+ this.branchCode = branchCode;
+ return this;
+ }
/**
* [ISO
* 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
- * alpha-2 code. The country code of the institution.
+ * alpha-2 code. The country code of the institution. If nothing is provided, institutions
+ * with the country code 'GB' are returned by default.
*/
public InstitutionListRequest withCountryCode(String countryCode) {
this.countryCode = countryCode;
return this;
}
+ /**
+ * The feature that institutions support. The available options include `pis`, and
+ * `vrp_sweeping`. If nothing is provided, institutions supporting 'pis' are returned by
+ * default.
+ */
+ public InstitutionListRequest withFeature(String feature) {
+ this.feature = feature;
+ return this;
+ }
+
+ /**
+ * The scheme that institutions support. The available options include `faster_payments`,
+ * `sepa_credit_transfer`, and `sepa_instant_credit_transfer`. If nothing is provided,
+ * institutions supporting 'faster_payments' are returned by default.
+ */
+ public InstitutionListRequest withScheme(String scheme) {
+ this.scheme = scheme;
+ return this;
+ }
+
private InstitutionListRequest(HttpClient httpClient,
ListRequestExecutor executor) {
super(httpClient, executor);
@@ -84,9 +117,18 @@ public InstitutionListRequest withHeader(String headerName, String headerValu
protected Map getQueryParams() {
ImmutableMap.Builder params = ImmutableMap.builder();
params.putAll(super.getQueryParams());
+ if (branchCode != null) {
+ params.put("branch_code", branchCode);
+ }
if (countryCode != null) {
params.put("country_code", countryCode);
}
+ if (feature != null) {
+ params.put("feature", feature);
+ }
+ if (scheme != null) {
+ params.put("scheme", scheme);
+ }
return params.build();
}
@@ -119,12 +161,14 @@ public static final class InstitutionListForBillingRequestRequest
private final String identity;
private String countryCode;
private List ids;
+ private Boolean includeDisabled;
private String search;
/**
* [ISO
* 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
- * alpha-2 code. The country code of the institution.
+ * alpha-2 code. The country code of the institution. If nothing is provided, institutions
+ * with the country code 'GB' are returned by default.
*/
public InstitutionListForBillingRequestRequest withCountryCode(String countryCode) {
this.countryCode = countryCode;
@@ -152,6 +196,17 @@ public InstitutionListForBillingRequestRequest withIds(String ids) {
return this;
}
+ /**
+ * Indicates whether to include temporarily disabled institutions in the response. If not
+ * provided or set to false, only enabled institutions will be returned.
+ *
+ */
+ public InstitutionListForBillingRequestRequest withIncludeDisabled(
+ Boolean includeDisabled) {
+ this.includeDisabled = includeDisabled;
+ return this;
+ }
+
/**
* A search substring for retrieving institution(s), based on the institution's name.
*/
@@ -189,6 +244,9 @@ protected Map getQueryParams() {
if (ids != null) {
params.put("ids", Joiner.on(",").join(ids));
}
+ if (includeDisabled != null) {
+ params.put("include_disabled", includeDisabled);
+ }
if (search != null) {
params.put("search", search);
}