From a9861b4df219fb7b64c69a4ccf216045e1576126 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Wed, 23 Apr 2025 10:46:51 +0000 Subject: [PATCH 1/4] Changes generated by 305fbbe945e7718edd3713571383b5f1463b8811 This commit was automatically created from gocardless/gocardless-pro-java-template@305fbbe945e7718edd3713571383b5f1463b8811 by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-java-template/actions/runs/14616193317 --- .../com/gocardless/resources/Institution.java | 42 ++++++++++++++++- .../services/BillingRequestService.java | 3 +- .../services/InstitutionService.java | 47 ++++++++++++++++++- 3 files changed, 88 insertions(+), 4 deletions(-) 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/InstitutionService.java b/src/main/java/com/gocardless/services/InstitutionService.java index d36ae07a..50efcee9 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(); } @@ -124,7 +166,8 @@ public static final class InstitutionListForBillingRequestRequest /** * [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; From 370ce9901c6f8bec8e25106c278a4be193aa247e Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Wed, 23 Apr 2025 13:38:51 +0000 Subject: [PATCH 2/4] Changes generated by 993b62a8d7b6c825d13733dcd796280b5f67c54d This commit was automatically created from gocardless/gocardless-pro-java-template@993b62a8d7b6c825d13733dcd796280b5f67c54d by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-java-template/actions/runs/14619576188 --- .../gocardless/services/InstitutionService.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main/java/com/gocardless/services/InstitutionService.java b/src/main/java/com/gocardless/services/InstitutionService.java index 50efcee9..2b950d34 100644 --- a/src/main/java/com/gocardless/services/InstitutionService.java +++ b/src/main/java/com/gocardless/services/InstitutionService.java @@ -161,6 +161,7 @@ public static final class InstitutionListForBillingRequestRequest private final String identity; private String countryCode; private List ids; + private Boolean includeDisabled; private String search; /** @@ -195,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. */ @@ -232,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); } From 97705a7d9bc6066609de734daad6502dd53bb703 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Thu, 24 Apr 2025 12:35:14 +0000 Subject: [PATCH 3/4] Changes generated by ae9852c9a20766f4bd3e4c2dcb341bc9268746b7 This commit was automatically created from gocardless/gocardless-pro-java-template@ae9852c9a20766f4bd3e4c2dcb341bc9268746b7 by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-java-template/actions/runs/14641695416 --- src/main/java/com/gocardless/resources/Event.java | 5 ++--- src/main/java/com/gocardless/services/EventService.java | 9 +++++---- 2 files changed, 7 insertions(+), 7 deletions(-) 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/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 From d3a56292df5d5b77ed9ead1881b17283d58b8d99 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Fri, 25 Apr 2025 14:37:56 +0000 Subject: [PATCH 4/4] Changes generated by 82802e17ddc214c92fce684b0a1b4fbb4ed2117f This commit was automatically created from gocardless/gocardless-pro-java-template@82802e17ddc214c92fce684b0a1b4fbb4ed2117f by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-java-template/actions/runs/14667092168 --- README.md | 4 ++-- build.gradle | 2 +- src/main/java/com/gocardless/http/HttpClient.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) 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;