From f0f86925bfa0f079c42baf3a55a0f5cf47ad5860 Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 13 Mar 2023 14:21:45 +0000 Subject: [PATCH 01/85] Changes generated by f564be564b137d55577dd7b7b459ab744e16d8a0 --- README.md | 4 ++-- build.gradle | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bf80ae2d..fa63b0df 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 5.14.2 + 5.14.1 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:5.14.2' +implementation 'com.gocardless:gocardless-pro:5.14.1' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index 78ab4f66..2899c5a4 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '5.14.2' +version = '5.14.1' apply plugin: 'ch.raffael.pegdown-doclet' From 20e859bde4d0b15a8313b5f83f89f116c658bfd2 Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 14 Mar 2023 10:34:30 +0000 Subject: [PATCH 02/85] Changes generated by c78df830a987c502e6053ed7b135a206a907e1b9 --- .../com/gocardless/resources/BillingRequestFlow.java | 9 +++++++++ .../services/BillingRequestFlowService.java | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/main/java/com/gocardless/resources/BillingRequestFlow.java b/src/main/java/com/gocardless/resources/BillingRequestFlow.java index 576c776d..12793a20 100644 --- a/src/main/java/com/gocardless/resources/BillingRequestFlow.java +++ b/src/main/java/com/gocardless/resources/BillingRequestFlow.java @@ -29,6 +29,7 @@ private BillingRequestFlow() { private String redirectUri; private String sessionToken; private Boolean showRedirectButtons; + private Boolean showSuccessRedirectButton; /** * URL for a GC-controlled flow which will allow the payer to fulfil the billing request @@ -163,6 +164,14 @@ public Boolean getShowRedirectButtons() { return showRedirectButtons; } + /** + * If true, the payer will be able to see redirect action buttons on Success page. These action + * buttons will provide a way to redirect payer to the given redirect_uri. + */ + public Boolean getShowSuccessRedirectButton() { + return showSuccessRedirectButton; + } + public static class Links { private Links() { // blank to prevent instantiation diff --git a/src/main/java/com/gocardless/services/BillingRequestFlowService.java b/src/main/java/com/gocardless/services/BillingRequestFlowService.java index 644e01de..83db60a7 100644 --- a/src/main/java/com/gocardless/services/BillingRequestFlowService.java +++ b/src/main/java/com/gocardless/services/BillingRequestFlowService.java @@ -57,6 +57,7 @@ public static final class BillingRequestFlowCreateRequest private PrefilledCustomer prefilledCustomer; private String redirectUri; private Boolean showRedirectButtons; + private Boolean showSuccessRedirectButton; /** * (Experimental feature) Fulfil the Billing Request on completion of the flow (true by @@ -350,6 +351,16 @@ public BillingRequestFlowCreateRequest withShowRedirectButtons( return this; } + /** + * If true, the payer will be able to see redirect action buttons on Success page. These + * action buttons will provide a way to redirect payer to the given redirect_uri. + */ + public BillingRequestFlowCreateRequest withShowSuccessRedirectButton( + Boolean showSuccessRedirectButton) { + this.showSuccessRedirectButton = showSuccessRedirectButton; + return this; + } + private BillingRequestFlowCreateRequest(HttpClient httpClient) { super(httpClient); } From 068fb391ecf8489090b902c922f81d0a1c4ff97e Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 15 Mar 2023 16:46:30 +0000 Subject: [PATCH 03/85] Changes generated by 0bfa41db5d9512d639f9b04b3eda2451ef808172 --- 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 fa63b0df..0648f807 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 5.14.1 + 5.14.3 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:5.14.1' +implementation 'com.gocardless:gocardless-pro:5.14.3' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index 2899c5a4..12c163e0 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '5.14.1' +version = '5.14.3' 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 d6be0a46..340f730b 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/5.14.1 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/5.14.3 java/%s %s/%s %s/%s", cleanUserAgentToken(System.getProperty("java.vm.specification.version")), cleanUserAgentToken(System.getProperty("java.vm.name")), cleanUserAgentToken(System.getProperty("java.version")), @@ -48,7 +48,7 @@ public class HttpClient { ImmutableMap.Builder builder = ImmutableMap.builder(); builder.put("GoCardless-Version", "2015-07-06"); builder.put("GoCardless-Client-Library", "gocardless-pro-java"); - builder.put("GoCardless-Client-Version", "5.14.1"); + builder.put("GoCardless-Client-Version", "5.14.3"); HEADERS = builder.build(); } private final OkHttpClient rawClient; From 3cd7aacc1e3a1dbbfbca08aad2e45a0efc0fc0fe Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 16 Mar 2023 15:44:14 +0000 Subject: [PATCH 04/85] Changes generated by bb24022a3832244bbbe723b775b0264f083f71ec --- .../com/gocardless/services/InstitutionService.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/com/gocardless/services/InstitutionService.java b/src/main/java/com/gocardless/services/InstitutionService.java index 4cd9fc9c..20474da1 100644 --- a/src/main/java/com/gocardless/services/InstitutionService.java +++ b/src/main/java/com/gocardless/services/InstitutionService.java @@ -31,6 +31,12 @@ public InstitutionService(HttpClient httpClient) { /** * Returns a list of supported institutions. + * + *

+ * Deprecated: This list institutions endpoint is no longer supported. We + * strongly recommend using the [List Institutions For Billing + * Request](#institutions-list-institutions-for-billing-request) instead. + *

*/ public InstitutionListRequest> list() { return new InstitutionListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -56,6 +62,12 @@ public InstitutionListForBillingRequestRequest> listForBil * Request class for {@link InstitutionService#list }. * * Returns a list of supported institutions. + * + *

+ * Deprecated: This list institutions endpoint is no longer supported. We + * strongly recommend using the [List Institutions For Billing + * Request](#institutions-list-institutions-for-billing-request) instead. + *

*/ public static final class InstitutionListRequest extends ListRequest { private String countryCode; From 1ebc43f4cbdc911621c40dec07a0c3f49c84867a Mon Sep 17 00:00:00 2001 From: Robot Date: Fri, 17 Mar 2023 09:35:02 +0000 Subject: [PATCH 05/85] Changes generated by 14fb7589570aea0da0df45bbd9acb199567f76be --- .../gocardless/services/BankAuthorisationService.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/main/java/com/gocardless/services/BankAuthorisationService.java b/src/main/java/com/gocardless/services/BankAuthorisationService.java index db4e7391..f99fdc57 100644 --- a/src/main/java/com/gocardless/services/BankAuthorisationService.java +++ b/src/main/java/com/gocardless/services/BankAuthorisationService.java @@ -47,18 +47,9 @@ public BankAuthorisationGetRequest get(String identity) { */ public static final class BankAuthorisationCreateRequest extends IdempotentPostRequest { - private String authorisationType; private Links links; private String redirectUri; - /** - * Type of authorisation, can be either 'mandate' or 'payment'. - */ - public BankAuthorisationCreateRequest withAuthorisationType(String authorisationType) { - this.authorisationType = authorisationType; - return this; - } - public BankAuthorisationCreateRequest withLinks(Links links) { this.links = links; return this; From db0f845e2b85b191b763679d725c9e7e467d84e8 Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 20 Mar 2023 11:49:39 +0000 Subject: [PATCH 06/85] Changes generated by b2cad2d1bb4107286c9f73abe3b1f62abfee9a00 --- 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 0648f807..f94dff7c 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 5.14.3 + 5.15.0 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:5.14.3' +implementation 'com.gocardless:gocardless-pro:5.15.0' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index 12c163e0..617be005 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '5.14.3' +version = '5.15.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 340f730b..fc4db3b4 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/5.14.3 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/5.15.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")), @@ -48,7 +48,7 @@ public class HttpClient { ImmutableMap.Builder builder = ImmutableMap.builder(); builder.put("GoCardless-Version", "2015-07-06"); builder.put("GoCardless-Client-Library", "gocardless-pro-java"); - builder.put("GoCardless-Client-Version", "5.14.3"); + builder.put("GoCardless-Client-Version", "5.15.0"); HEADERS = builder.build(); } private final OkHttpClient rawClient; From 6b016d19208fb96f1917f9ba66f0fb4e6ed08e88 Mon Sep 17 00:00:00 2001 From: Robot Date: Fri, 24 Mar 2023 15:25:48 +0000 Subject: [PATCH 07/85] Changes generated by 2007ddff2d3bfd153dee7fe62cf98980e8f91452 --- .../com/gocardless/services/BillingRequestService.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gocardless/services/BillingRequestService.java b/src/main/java/com/gocardless/services/BillingRequestService.java index 56d017f5..a6022a43 100644 --- a/src/main/java/com/gocardless/services/BillingRequestService.java +++ b/src/main/java/com/gocardless/services/BillingRequestService.java @@ -1008,8 +1008,8 @@ public BillingRequestCollectCustomerDetailsRequest withCustomerGivenName(String * language for notification emails sent by GoCardless if your organisation does not send * its own (see [compliance requirements](#appendix-compliance-requirements)). Currently * only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. If - * this is not provided, the language will be chosen based on the `country_code` (if - * supplied) or default to "en". + * this is not provided and a customer was linked during billing request creation, the + * linked customer language will be used. Otherwise, the language is default to "en". */ public BillingRequestCollectCustomerDetailsRequest withCustomerLanguage(String language) { if (customer == null) { @@ -1277,8 +1277,9 @@ public Customer withGivenName(String givenName) { * language for notification emails sent by GoCardless if your organisation does not * send its own (see [compliance requirements](#appendix-compliance-requirements)). * Currently only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are - * supported. If this is not provided, the language will be chosen based on the - * `country_code` (if supplied) or default to "en". + * supported. If this is not provided and a customer was linked during billing request + * creation, the linked customer language will be used. Otherwise, the language is + * default to "en". */ public Customer withLanguage(String language) { this.language = language; From 1bb1b67ab6ce7c2c0b6f7fe9dc50dc6c723b0fa7 Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 27 Mar 2023 16:46:31 +0000 Subject: [PATCH 08/85] Changes generated by a7bfa3806e4a642a5961becd94243f07c7b70a17 --- .../gocardless/services/CreditorService.java | 26 +++++++--- .../services/SchemeIdentifierService.java | 52 +++++++++++-------- 2 files changed, 48 insertions(+), 30 deletions(-) diff --git a/src/main/java/com/gocardless/services/CreditorService.java b/src/main/java/com/gocardless/services/CreditorService.java index 8018bff3..7d2be6a1 100644 --- a/src/main/java/com/gocardless/services/CreditorService.java +++ b/src/main/java/com/gocardless/services/CreditorService.java @@ -63,10 +63,15 @@ public CreditorUpdateRequest update(String identity) { } /** - * Applies a [scheme identifier](#core-endpoints-scheme-identifiers) to a creditor. If the - * creditor already has a scheme identifier for the scheme, it will be replaced, and any - * mandates attached to it transferred asynchronously. For some schemes, the application of the - * scheme identifier will be performed asynchronously. + * Applies a [scheme identifier](#core-endpoints-scheme-identifiers) to a creditor. + * + * If the scheme identifier has a `pending` status, it will be applied asynchronously once it + * becomes `active`. + * + * If the creditor already has a scheme identifier for the scheme, it will be replaced, and any + * mandates attached to it transferred asynchronously. On Bacs and SEPA, if payments were about + * to be submitted, they will be delayed. To minimise this delay, we recommend that you apply + * the new scheme identifier after the daily payment submission time (4 PM Europe/London time). * */ public CreditorApplySchemeIdentifierRequest applySchemeIdentifier(String identity) { @@ -720,10 +725,15 @@ public Links withDefaultUsdPayoutAccount(String defaultUsdPayoutAccount) { /** * Request class for {@link CreditorService#applySchemeIdentifier }. * - * Applies a [scheme identifier](#core-endpoints-scheme-identifiers) to a creditor. If the - * creditor already has a scheme identifier for the scheme, it will be replaced, and any - * mandates attached to it transferred asynchronously. For some schemes, the application of the - * scheme identifier will be performed asynchronously. + * Applies a [scheme identifier](#core-endpoints-scheme-identifiers) to a creditor. + * + * If the scheme identifier has a `pending` status, it will be applied asynchronously once it + * becomes `active`. + * + * If the creditor already has a scheme identifier for the scheme, it will be replaced, and any + * mandates attached to it transferred asynchronously. On Bacs and SEPA, if payments were about + * to be submitted, they will be delayed. To minimise this delay, we recommend that you apply + * the new scheme identifier after the daily payment submission time (4 PM Europe/London time). * */ public static final class CreditorApplySchemeIdentifierRequest extends PostRequest { diff --git a/src/main/java/com/gocardless/services/SchemeIdentifierService.java b/src/main/java/com/gocardless/services/SchemeIdentifierService.java index 782ad316..8137a800 100644 --- a/src/main/java/com/gocardless/services/SchemeIdentifierService.java +++ b/src/main/java/com/gocardless/services/SchemeIdentifierService.java @@ -30,24 +30,28 @@ public SchemeIdentifierService(HttpClient httpClient) { /** * Creates a new scheme identifier. The scheme identifier must be [applied to a * creditor](#creditors-apply-a-scheme-identifier) before payments are taken using it. The - * scheme identifier must also have the `status` of active before it can be used. For some - * schemes e.g. faster_payments this will happen instantly. For other schemes e.g. bacs this can - * take several days. + * scheme identifier must also have the `status` of active before it can be used. On Bacs, this + * will take 5 working days. On other schemes, this happens instantly. * - * ### Scheme identifier name validations + * #### Scheme identifier name validations * - * Each scheme has different rules for the length and permitted characters in the scheme - * identifier name field. The rules are: + * The `name` field of a scheme identifier can contain alphanumeric characters, spaces and + * special characters. * - * | __scheme__ | __maximum length__ | __allowed characters__ | __spaces__ | | :-------------- | - * :----------------- | :----------------------- | :--------- | | bacs | 18 characters | - * `a-zA-Z0-9/.&-` | yes | | sepa_core | 70 characters | `a-zA-Z0-9/?:().,+&<>'"` | yes | | ach - * | 16 characters | `a-zA-Z0-9/?:().,'+-` | yes | | faster_payments | 18 characters | - * `a-zA-Z0-9/?:().,'+-` | yes | + * Its maximum length and the special characters it supports depend on the scheme: + * + * | __scheme__ | __maximum length__ | __special characters allowed__ | | :---------------- | + * :----------------- | :-------------------------------------------------- | | `bacs` | 18 + * characters | `/` `.` `&` `-` | | `sepa_core` | 70 characters | `/` `?` `:` `(` `)` `.` `,` + * `+` `&` `<` `>` `'` `"` | | `ach` | 16 characters | `/` `?` `:` `(` `)` `.` `,` `'` `+` `-` | + * | `faster_payments` | 18 characters | `/` `?` `:` `(` `)` `.` `,` `'` `+` `-` | * * The validation error that gets returned for an invalid name will contain a suggested name in * the metadata that is guaranteed to pass name validations. * + * You should ensure that the name you set matches the legal name or the trading name of the + * creditor, otherwise, there is an increased risk of chargeback. + * */ public SchemeIdentifierCreateRequest create() { return new SchemeIdentifierCreateRequest(httpClient); @@ -78,24 +82,28 @@ public SchemeIdentifierGetRequest get(String identity) { * * Creates a new scheme identifier. The scheme identifier must be [applied to a * creditor](#creditors-apply-a-scheme-identifier) before payments are taken using it. The - * scheme identifier must also have the `status` of active before it can be used. For some - * schemes e.g. faster_payments this will happen instantly. For other schemes e.g. bacs this can - * take several days. + * scheme identifier must also have the `status` of active before it can be used. On Bacs, this + * will take 5 working days. On other schemes, this happens instantly. * - * ### Scheme identifier name validations + * #### Scheme identifier name validations * - * Each scheme has different rules for the length and permitted characters in the scheme - * identifier name field. The rules are: + * The `name` field of a scheme identifier can contain alphanumeric characters, spaces and + * special characters. * - * | __scheme__ | __maximum length__ | __allowed characters__ | __spaces__ | | :-------------- | - * :----------------- | :----------------------- | :--------- | | bacs | 18 characters | - * `a-zA-Z0-9/.&-` | yes | | sepa_core | 70 characters | `a-zA-Z0-9/?:().,+&<>'"` | yes | | ach - * | 16 characters | `a-zA-Z0-9/?:().,'+-` | yes | | faster_payments | 18 characters | - * `a-zA-Z0-9/?:().,'+-` | yes | + * Its maximum length and the special characters it supports depend on the scheme: + * + * | __scheme__ | __maximum length__ | __special characters allowed__ | | :---------------- | + * :----------------- | :-------------------------------------------------- | | `bacs` | 18 + * characters | `/` `.` `&` `-` | | `sepa_core` | 70 characters | `/` `?` `:` `(` `)` `.` `,` + * `+` `&` `<` `>` `'` `"` | | `ach` | 16 characters | `/` `?` `:` `(` `)` `.` `,` `'` `+` `-` | + * | `faster_payments` | 18 characters | `/` `?` `:` `(` `)` `.` `,` `'` `+` `-` | * * The validation error that gets returned for an invalid name will contain a suggested name in * the metadata that is guaranteed to pass name validations. * + * You should ensure that the name you set matches the legal name or the trading name of the + * creditor, otherwise, there is an increased risk of chargeback. + * */ public static final class SchemeIdentifierCreateRequest extends IdempotentPostRequest { From 4f58237ae5d21b80279595060e14fde0c847f8fd Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 28 Mar 2023 09:33:23 +0000 Subject: [PATCH 09/85] Changes generated by e17b66f7ce0f07aee432d0ae051db266e71719e5 --- src/main/java/com/gocardless/resources/Creditor.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/main/java/com/gocardless/resources/Creditor.java b/src/main/java/com/gocardless/resources/Creditor.java index 4d872f11..be6a40fb 100644 --- a/src/main/java/com/gocardless/resources/Creditor.java +++ b/src/main/java/com/gocardless/resources/Creditor.java @@ -18,7 +18,6 @@ private Creditor() { // blank to prevent instantiation } - private Boolean activated; private String addressLine1; private String addressLine2; private String addressLine3; @@ -40,13 +39,6 @@ private Creditor() { private List schemeIdentifiers; private VerificationStatus verificationStatus; - /** - * Boolean value indicating whether the creditor is activated in the product. - */ - public Boolean getActivated() { - return activated; - } - /** * The first line of the creditor's address. */ From 0b96c6d5e3b77705ee0fe2864fd45d0581a2f217 Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 28 Mar 2023 12:47:05 +0000 Subject: [PATCH 10/85] Changes generated by 1a7bd11b9e1b596fc7ceaf12e542579479fbded2 --- .java-version | 2 +- README.md | 6 +++--- build.gradle | 2 +- src/main/java/com/gocardless/http/HttpClient.java | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.java-version b/.java-version index 62593409..8e2afd34 100644 --- a/.java-version +++ b/.java-version @@ -1 +1 @@ -1.8 +17 \ No newline at end of file diff --git a/README.md b/README.md index f94dff7c..ad02a2dd 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 5.15.0 + 6.0.0 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:5.15.0' +implementation 'com.gocardless:gocardless-pro:6.0.0' ``` ## Initializing the client @@ -337,7 +337,7 @@ change any of your other code. ## Compatibility -This library requires JDK version 8 or above. +This library requires JDK version 17 or above. ## Logging diff --git a/build.gradle b/build.gradle index 617be005..123a64af 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '5.15.0' +version = '6.0.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 fc4db3b4..da4c9325 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/5.15.0 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/6.0.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")), @@ -48,7 +48,7 @@ public class HttpClient { ImmutableMap.Builder builder = ImmutableMap.builder(); builder.put("GoCardless-Version", "2015-07-06"); builder.put("GoCardless-Client-Library", "gocardless-pro-java"); - builder.put("GoCardless-Client-Version", "5.15.0"); + builder.put("GoCardless-Client-Version", "6.0.0"); HEADERS = builder.build(); } private final OkHttpClient rawClient; From 1e8ddf18616fed85b286e5913f79a8aa64695fbc Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 28 Mar 2023 16:09:26 +0000 Subject: [PATCH 11/85] Changes generated by e17b66f7ce0f07aee432d0ae051db266e71719e5 --- .java-version | 2 +- README.md | 6 +++--- build.gradle | 2 +- src/main/java/com/gocardless/http/HttpClient.java | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.java-version b/.java-version index 8e2afd34..62593409 100644 --- a/.java-version +++ b/.java-version @@ -1 +1 @@ -17 \ No newline at end of file +1.8 diff --git a/README.md b/README.md index ad02a2dd..f94dff7c 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 6.0.0 + 5.15.0 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:6.0.0' +implementation 'com.gocardless:gocardless-pro:5.15.0' ``` ## Initializing the client @@ -337,7 +337,7 @@ change any of your other code. ## Compatibility -This library requires JDK version 17 or above. +This library requires JDK version 8 or above. ## Logging diff --git a/build.gradle b/build.gradle index 123a64af..617be005 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '6.0.0' +version = '5.15.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 da4c9325..fc4db3b4 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.0.0 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/5.15.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")), @@ -48,7 +48,7 @@ public class HttpClient { ImmutableMap.Builder builder = ImmutableMap.builder(); builder.put("GoCardless-Version", "2015-07-06"); builder.put("GoCardless-Client-Library", "gocardless-pro-java"); - builder.put("GoCardless-Client-Version", "6.0.0"); + builder.put("GoCardless-Client-Version", "5.15.0"); HEADERS = builder.build(); } private final OkHttpClient rawClient; From 340a0b7213d4b1f07a4e1d694bda7260bb663faa Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 29 Mar 2023 11:12:17 +0000 Subject: [PATCH 12/85] Changes generated by 4e595230861e3d071bd05205fc918347c3326d6c --- .../java/com/gocardless/resources/BillingRequest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index 51ad7b04..d91fce36 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -21,6 +21,7 @@ private BillingRequest() { } private List actions; + private Boolean autoFulfil; private String createdAt; private Boolean fallbackEnabled; private String id; @@ -39,6 +40,13 @@ public List getActions() { return actions; } + /** + * Should the billing request be fulfilled as soon as it's ready (true by default) + */ + public Boolean getAutoFulfil() { + return autoFulfil; + } + /** * Fixed [timestamp](#api-usage-time-zones--dates), recording when this resource was created. */ From 204e9e223acb047268d9c4ca69dab56a3da7ec7a Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 29 Mar 2023 15:00:36 +0000 Subject: [PATCH 13/85] Changes generated by 85d408b3bd9f9984cda718fa8664765d5b71bda2 --- .../java/com/gocardless/resources/BillingRequestFlow.java | 6 ++++-- .../com/gocardless/services/BillingRequestFlowService.java | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gocardless/resources/BillingRequestFlow.java b/src/main/java/com/gocardless/resources/BillingRequestFlow.java index 12793a20..230daea1 100644 --- a/src/main/java/com/gocardless/resources/BillingRequestFlow.java +++ b/src/main/java/com/gocardless/resources/BillingRequestFlow.java @@ -165,8 +165,10 @@ public Boolean getShowRedirectButtons() { } /** - * If true, the payer will be able to see redirect action buttons on Success page. These action - * buttons will provide a way to redirect payer to the given redirect_uri. + * If true, the payer will be able to see a redirect action button on the Success page. This + * action button will provide a way to redirect the payer to the given redirect_uri. This + * functionality is applicable only for Android users as automatic redirection is not possible + * in such cases. */ public Boolean getShowSuccessRedirectButton() { return showSuccessRedirectButton; diff --git a/src/main/java/com/gocardless/services/BillingRequestFlowService.java b/src/main/java/com/gocardless/services/BillingRequestFlowService.java index 83db60a7..894083c5 100644 --- a/src/main/java/com/gocardless/services/BillingRequestFlowService.java +++ b/src/main/java/com/gocardless/services/BillingRequestFlowService.java @@ -352,8 +352,10 @@ public BillingRequestFlowCreateRequest withShowRedirectButtons( } /** - * If true, the payer will be able to see redirect action buttons on Success page. These - * action buttons will provide a way to redirect payer to the given redirect_uri. + * If true, the payer will be able to see a redirect action button on the Success page. This + * action button will provide a way to redirect the payer to the given redirect_uri. This + * functionality is applicable only for Android users as automatic redirection is not + * possible in such cases. */ public BillingRequestFlowCreateRequest withShowSuccessRedirectButton( Boolean showSuccessRedirectButton) { From f48fa29dfd96244003e550392bede50b8a7dd795 Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 30 Mar 2023 10:49:06 +0000 Subject: [PATCH 14/85] Changes generated by fe5dbb3135154690d45729e790581278cfe72788 --- .../java/com/gocardless/resources/BillingRequestFlow.java | 4 ++-- .../com/gocardless/services/BillingRequestFlowService.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gocardless/resources/BillingRequestFlow.java b/src/main/java/com/gocardless/resources/BillingRequestFlow.java index 230daea1..ca260594 100644 --- a/src/main/java/com/gocardless/resources/BillingRequestFlow.java +++ b/src/main/java/com/gocardless/resources/BillingRequestFlow.java @@ -167,8 +167,8 @@ public Boolean getShowRedirectButtons() { /** * If true, the payer will be able to see a redirect action button on the Success page. This * action button will provide a way to redirect the payer to the given redirect_uri. This - * functionality is applicable only for Android users as automatic redirection is not possible - * in such cases. + * functionality is helpful when merchants do not want payers to be automatically redirected or + * on Android devices, where automatic redirections are not possible. */ public Boolean getShowSuccessRedirectButton() { return showSuccessRedirectButton; diff --git a/src/main/java/com/gocardless/services/BillingRequestFlowService.java b/src/main/java/com/gocardless/services/BillingRequestFlowService.java index 894083c5..b1e13c8c 100644 --- a/src/main/java/com/gocardless/services/BillingRequestFlowService.java +++ b/src/main/java/com/gocardless/services/BillingRequestFlowService.java @@ -354,8 +354,8 @@ public BillingRequestFlowCreateRequest withShowRedirectButtons( /** * If true, the payer will be able to see a redirect action button on the Success page. This * action button will provide a way to redirect the payer to the given redirect_uri. This - * functionality is applicable only for Android users as automatic redirection is not - * possible in such cases. + * functionality is helpful when merchants do not want payers to be automatically redirected + * or on Android devices, where automatic redirections are not possible. */ public BillingRequestFlowCreateRequest withShowSuccessRedirectButton( Boolean showSuccessRedirectButton) { From d15e95e42a4528cebf1e18269bec008bb9aa3655 Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 30 Mar 2023 15:38:29 +0000 Subject: [PATCH 15/85] Changes generated by bda927240110e56180ff021f46ad9c2379058a65 --- .../java/com/gocardless/resources/BillingRequest.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index d91fce36..51ad7b04 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -21,7 +21,6 @@ private BillingRequest() { } private List actions; - private Boolean autoFulfil; private String createdAt; private Boolean fallbackEnabled; private String id; @@ -40,13 +39,6 @@ public List getActions() { return actions; } - /** - * Should the billing request be fulfilled as soon as it's ready (true by default) - */ - public Boolean getAutoFulfil() { - return autoFulfil; - } - /** * Fixed [timestamp](#api-usage-time-zones--dates), recording when this resource was created. */ From ed2cf2489151fbab8c95a9197577209818e7adf3 Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 4 Apr 2023 08:34:35 +0000 Subject: [PATCH 16/85] Changes generated by b47041e1e749e58ded4698f90cd43cf23a84dc06 --- .../java/com/gocardless/resources/BillingRequest.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index 51ad7b04..63339bb6 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -267,7 +267,6 @@ private BankAuthorisation() { private Adapter adapter; private AuthorisationType authorisationType; - private Boolean requiresInstitution; /** * Which authorisation adapter will be used to power these authorisations (GoCardless @@ -284,13 +283,6 @@ public AuthorisationType getAuthorisationType() { return authorisationType; } - /** - * Whether an institution is a required field when creating this bank authorisation - */ - public Boolean getRequiresInstitution() { - return requiresInstitution; - } - public enum Adapter { @SerializedName("open_banking_gateway_pis") OPEN_BANKING_GATEWAY_PIS, @SerializedName("plaid_ais") From 5020eae0fd629e17bcb6970e46d390b9f427b888 Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 4 Apr 2023 08:35:16 +0000 Subject: [PATCH 17/85] Changes generated by 72c09caaf7ecf11c7c91668f902b11a6ec579fdd --- .../java/com/gocardless/resources/BillingRequest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index 63339bb6..51ad7b04 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -267,6 +267,7 @@ private BankAuthorisation() { private Adapter adapter; private AuthorisationType authorisationType; + private Boolean requiresInstitution; /** * Which authorisation adapter will be used to power these authorisations (GoCardless @@ -283,6 +284,13 @@ public AuthorisationType getAuthorisationType() { return authorisationType; } + /** + * Whether an institution is a required field when creating this bank authorisation + */ + public Boolean getRequiresInstitution() { + return requiresInstitution; + } + public enum Adapter { @SerializedName("open_banking_gateway_pis") OPEN_BANKING_GATEWAY_PIS, @SerializedName("plaid_ais") From 9d9681d4c55cd7d49e94582ad74fed78f6acacc6 Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 4 Apr 2023 09:06:45 +0000 Subject: [PATCH 18/85] Changes generated by 79ba536bd43a4c09b7e93e6c8071006ee1aa19d6 --- .../java/com/gocardless/resources/BillingRequest.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index 51ad7b04..63339bb6 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -267,7 +267,6 @@ private BankAuthorisation() { private Adapter adapter; private AuthorisationType authorisationType; - private Boolean requiresInstitution; /** * Which authorisation adapter will be used to power these authorisations (GoCardless @@ -284,13 +283,6 @@ public AuthorisationType getAuthorisationType() { return authorisationType; } - /** - * Whether an institution is a required field when creating this bank authorisation - */ - public Boolean getRequiresInstitution() { - return requiresInstitution; - } - public enum Adapter { @SerializedName("open_banking_gateway_pis") OPEN_BANKING_GATEWAY_PIS, @SerializedName("plaid_ais") From fadf3f966f20b26aea43cb15b6bc0792fd57bfa3 Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 6 Apr 2023 13:13:50 +0000 Subject: [PATCH 19/85] Changes generated by 43122f9674ed5c5e2190f19195b85fa7e1a50530 --- .../gocardless/services/InstitutionService.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/com/gocardless/services/InstitutionService.java b/src/main/java/com/gocardless/services/InstitutionService.java index 20474da1..d4f78a52 100644 --- a/src/main/java/com/gocardless/services/InstitutionService.java +++ b/src/main/java/com/gocardless/services/InstitutionService.java @@ -129,9 +129,20 @@ public static final class InstitutionListForBillingRequestRequest extends ListRequest { @PathParam private final String identity; + private String countryCode; private List ids; 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. + */ + public InstitutionListForBillingRequestRequest withCountryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + /** * ID(s) of the institution(s) to retrieve. More than one ID can be specified using a * comma-separated string. @@ -184,6 +195,9 @@ protected Map getPathParams() { protected Map getQueryParams() { ImmutableMap.Builder params = ImmutableMap.builder(); params.putAll(super.getQueryParams()); + if (countryCode != null) { + params.put("country_code", countryCode); + } if (ids != null) { params.put("ids", Joiner.on(",").join(ids)); } From 638edb16a9fb47a960938b9c7c2b28db0574e274 Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 6 Apr 2023 16:08:56 +0000 Subject: [PATCH 20/85] Changes generated by 2cbb135cb70fdecb26b37f7ddb0647c119e00349 --- 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 f94dff7c..0200ea83 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 5.15.0 + 5.16.0 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:5.15.0' +implementation 'com.gocardless:gocardless-pro:5.16.0' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index 617be005..8aaa1d80 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '5.15.0' +version = '5.16.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 fc4db3b4..f89060ae 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/5.15.0 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/5.16.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")), @@ -48,7 +48,7 @@ public class HttpClient { ImmutableMap.Builder builder = ImmutableMap.builder(); builder.put("GoCardless-Version", "2015-07-06"); builder.put("GoCardless-Client-Library", "gocardless-pro-java"); - builder.put("GoCardless-Client-Version", "5.15.0"); + builder.put("GoCardless-Client-Version", "5.16.0"); HEADERS = builder.build(); } private final OkHttpClient rawClient; From 2a6768b37b8a962f6d551a18b2f5eda5cb9da10e Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 24 Apr 2023 14:21:24 +0000 Subject: [PATCH 21/85] Changes generated by 931e9e7f14eec543537f9aa0a4276914c173b11f --- .../services/SchemeIdentifierService.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/com/gocardless/services/SchemeIdentifierService.java b/src/main/java/com/gocardless/services/SchemeIdentifierService.java index 8137a800..d2f91a96 100644 --- a/src/main/java/com/gocardless/services/SchemeIdentifierService.java +++ b/src/main/java/com/gocardless/services/SchemeIdentifierService.java @@ -200,6 +200,8 @@ public String toString() { */ public static final class SchemeIdentifierListRequest extends ListRequest { + private String creditor; + /** * Cursor pointing to the start of the desired set. */ @@ -216,6 +218,14 @@ public SchemeIdentifierListRequest withBefore(String before) { return this; } + /** + * Unique identifier, beginning with "CR". + */ + public SchemeIdentifierListRequest withCreditor(String creditor) { + this.creditor = creditor; + return this; + } + /** * Number of records to return. */ @@ -238,6 +248,9 @@ public SchemeIdentifierListRequest withHeader(String headerName, String heade protected Map getQueryParams() { ImmutableMap.Builder params = ImmutableMap.builder(); params.putAll(super.getQueryParams()); + if (creditor != null) { + params.put("creditor", creditor); + } return params.build(); } From f8abe0d31aa6b291b992a51161780bebb2207053 Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 26 Apr 2023 14:25:52 +0000 Subject: [PATCH 22/85] Changes generated by 815c4783236e189aa1419d64f9ea41e11c80c686 --- src/main/java/com/gocardless/resources/Subscription.java | 8 ++++---- .../java/com/gocardless/services/SubscriptionService.java | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/gocardless/resources/Subscription.java b/src/main/java/com/gocardless/resources/Subscription.java index 5789245f..ffd5c3ec 100644 --- a/src/main/java/com/gocardless/resources/Subscription.java +++ b/src/main/java/com/gocardless/resources/Subscription.java @@ -13,10 +13,10 @@ * * The following rules apply when specifying recurrence: * - * - The first payment must be charged within 1 year. - If `day_of_month` and `start_date` are not - * provided `start_date` will be the [mandate](#core-endpoints-mandates)'s - * `next_possible_charge_date` and the subscription will then recur based on the `interval` & - * `interval_unit` - If `month` or `day_of_month` are present the following validations apply: + * - If `day_of_month` and `start_date` are not provided `start_date` will be the + * [mandate](#core-endpoints-mandates)'s `next_possible_charge_date` and the subscription will then + * recur based on the `interval` & `interval_unit` - If `month` or `day_of_month` are present the + * following validations apply: * * | __interval_unit__ | __month__ | __day_of_month__ | | :---------------- | * :--------------------------------------------- | :----------------------------------------- | | diff --git a/src/main/java/com/gocardless/services/SubscriptionService.java b/src/main/java/com/gocardless/services/SubscriptionService.java index 7b405ceb..eac266ea 100644 --- a/src/main/java/com/gocardless/services/SubscriptionService.java +++ b/src/main/java/com/gocardless/services/SubscriptionService.java @@ -20,10 +20,10 @@ * * The following rules apply when specifying recurrence: * - * - The first payment must be charged within 1 year. - If `day_of_month` and `start_date` are not - * provided `start_date` will be the [mandate](#core-endpoints-mandates)'s - * `next_possible_charge_date` and the subscription will then recur based on the `interval` & - * `interval_unit` - If `month` or `day_of_month` are present the following validations apply: + * - If `day_of_month` and `start_date` are not provided `start_date` will be the + * [mandate](#core-endpoints-mandates)'s `next_possible_charge_date` and the subscription will then + * recur based on the `interval` & `interval_unit` - If `month` or `day_of_month` are present the + * following validations apply: * * | __interval_unit__ | __month__ | __day_of_month__ | | :---------------- | * :--------------------------------------------- | :----------------------------------------- | | From af2be1653d39cdd84ea13a86a092da97e46ac5d0 Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 27 Apr 2023 12:54:36 +0000 Subject: [PATCH 23/85] Changes generated by f095921e26d6839e8cee12d2ccf71a9ca2d6c2a0 --- .../gocardless/services/SchemeIdentifierService.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/gocardless/services/SchemeIdentifierService.java b/src/main/java/com/gocardless/services/SchemeIdentifierService.java index d2f91a96..95d4f34d 100644 --- a/src/main/java/com/gocardless/services/SchemeIdentifierService.java +++ b/src/main/java/com/gocardless/services/SchemeIdentifierService.java @@ -42,9 +42,9 @@ public SchemeIdentifierService(HttpClient httpClient) { * * | __scheme__ | __maximum length__ | __special characters allowed__ | | :---------------- | * :----------------- | :-------------------------------------------------- | | `bacs` | 18 - * characters | `/` `.` `&` `-` | | `sepa_core` | 70 characters | `/` `?` `:` `(` `)` `.` `,` - * `+` `&` `<` `>` `'` `"` | | `ach` | 16 characters | `/` `?` `:` `(` `)` `.` `,` `'` `+` `-` | - * | `faster_payments` | 18 characters | `/` `?` `:` `(` `)` `.` `,` `'` `+` `-` | + * characters | `/` `.` `&` `-` | | `sepa` | 70 characters | `/` `?` `:` `(` `)` `.` `,` `+` `&` + * `<` `>` `'` `"` | | `ach` | 16 characters | `/` `?` `:` `(` `)` `.` `,` `'` `+` `-` | | + * `faster_payments` | 18 characters | `/` `?` `:` `(` `)` `.` `,` `'` `+` `-` | * * The validation error that gets returned for an invalid name will contain a suggested name in * the metadata that is guaranteed to pass name validations. @@ -94,9 +94,9 @@ public SchemeIdentifierGetRequest get(String identity) { * * | __scheme__ | __maximum length__ | __special characters allowed__ | | :---------------- | * :----------------- | :-------------------------------------------------- | | `bacs` | 18 - * characters | `/` `.` `&` `-` | | `sepa_core` | 70 characters | `/` `?` `:` `(` `)` `.` `,` - * `+` `&` `<` `>` `'` `"` | | `ach` | 16 characters | `/` `?` `:` `(` `)` `.` `,` `'` `+` `-` | - * | `faster_payments` | 18 characters | `/` `?` `:` `(` `)` `.` `,` `'` `+` `-` | + * characters | `/` `.` `&` `-` | | `sepa` | 70 characters | `/` `?` `:` `(` `)` `.` `,` `+` `&` + * `<` `>` `'` `"` | | `ach` | 16 characters | `/` `?` `:` `(` `)` `.` `,` `'` `+` `-` | | + * `faster_payments` | 18 characters | `/` `?` `:` `(` `)` `.` `,` `'` `+` `-` | * * The validation error that gets returned for an invalid name will contain a suggested name in * the metadata that is guaranteed to pass name validations. From 5142c48eaca88f2f3d069847b141490e9b52b7c7 Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 4 May 2023 14:03:07 +0000 Subject: [PATCH 24/85] Changes generated by 4772649950c3ce5de84dde5e603bc31052d54292 --- src/main/java/com/gocardless/resources/BillingRequest.java | 2 +- .../java/com/gocardless/services/BillingRequestService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index 63339bb6..137db5ad 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -51,7 +51,7 @@ public String getCreatedAt() { * Should not be set if GoCardless payment intelligence feature is used. * * See [Billing Requests: Retain customers with - * Fallbacks](https://developer.gocardless.com/getting-started/billing-requests/retain-customers-with-fallbacks/) + * Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) * for more information. */ public Boolean getFallbackEnabled() { diff --git a/src/main/java/com/gocardless/services/BillingRequestService.java b/src/main/java/com/gocardless/services/BillingRequestService.java index a6022a43..bd2e7698 100644 --- a/src/main/java/com/gocardless/services/BillingRequestService.java +++ b/src/main/java/com/gocardless/services/BillingRequestService.java @@ -165,7 +165,7 @@ public static final class BillingRequestCreateRequest * debit. Should not be set if GoCardless payment intelligence feature is used. * * See [Billing Requests: Retain customers with - * Fallbacks](https://developer.gocardless.com/getting-started/billing-requests/retain-customers-with-fallbacks/) + * Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) * for more information. */ public BillingRequestCreateRequest withFallbackEnabled(Boolean fallbackEnabled) { From 242bb13ae31bf24db74f2908ad692b42cb3a7f36 Mon Sep 17 00:00:00 2001 From: Robot Date: Fri, 5 May 2023 08:08:45 +0000 Subject: [PATCH 25/85] Changes generated by 82b8ded8b6b61a5f7876faca58bfd88662ca0362 --- .../com/gocardless/resources/BankAuthorisation.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/com/gocardless/resources/BankAuthorisation.java b/src/main/java/com/gocardless/resources/BankAuthorisation.java index b15b827d..fc6ea8c6 100644 --- a/src/main/java/com/gocardless/resources/BankAuthorisation.java +++ b/src/main/java/com/gocardless/resources/BankAuthorisation.java @@ -23,6 +23,7 @@ private BankAuthorisation() { private String id; private String lastVisitedAt; private Links links; + private String qrCodeUrl; private String redirectUri; private String url; @@ -74,6 +75,15 @@ public Links getLinks() { return links; } + /** + * URL to a QR code PNG image of the bank authorisation url. This QR code can be used as an + * alternative to providing the `url` to the payer to allow them to authorise with their mobile + * devices. + */ + public String getQrCodeUrl() { + return qrCodeUrl; + } + /** * URL that the payer can be redirected to after authorising the payment. * From ca15e1db053ca6ad66b348556614e56ce554764e Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 9 May 2023 11:26:38 +0000 Subject: [PATCH 26/85] Changes generated by d4903cfa9bc1e24336620fb80706f8a74edb4f2b --- .../com/gocardless/resources/Creditor.java | 15 +++++++++- .../gocardless/services/CreditorService.java | 28 +++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gocardless/resources/Creditor.java b/src/main/java/com/gocardless/resources/Creditor.java index be6a40fb..3b0df3cc 100644 --- a/src/main/java/com/gocardless/resources/Creditor.java +++ b/src/main/java/com/gocardless/resources/Creditor.java @@ -21,6 +21,7 @@ private Creditor() { private String addressLine1; private String addressLine2; private String addressLine3; + private String bankReferencePrefix; private Boolean canCreateRefunds; private String city; private String countryCode; @@ -61,7 +62,19 @@ public String getAddressLine3() { } /** - * Boolean indicating whether the creditor is permitted to create refunds + * Prefix for the bank reference of payouts sent to this creditor. For instance, if the + * creditor's `bank_reference_prefix` was `ACME`, the bank reference of a payout sent to that + * creditor could be `ACME-8G7Q8`. + * + * This prefix is also used for refunds in EUR and GBP. + * + */ + public String getBankReferencePrefix() { + return bankReferencePrefix; + } + + /** + * Boolean indicating whether the creditor is permitted to create refunds. */ public Boolean getCanCreateRefunds() { return canCreateRefunds; diff --git a/src/main/java/com/gocardless/services/CreditorService.java b/src/main/java/com/gocardless/services/CreditorService.java index 7d2be6a1..714e95c6 100644 --- a/src/main/java/com/gocardless/services/CreditorService.java +++ b/src/main/java/com/gocardless/services/CreditorService.java @@ -84,11 +84,25 @@ public CreditorApplySchemeIdentifierRequest applySchemeIdentifier(String identit * Creates a new creditor. */ public static final class CreditorCreateRequest extends IdempotentPostRequest { + private String bankReferencePrefix; private String countryCode; private CreditorType creditorType; private Map links; private String name; + /** + * Prefix for the bank reference of payouts sent to this creditor. For instance, if the + * creditor's `bank_reference_prefix` was `ACME`, the bank reference of a payout sent to + * that creditor could be `ACME-8G7Q8`. + * + * This prefix is also used for refunds in EUR and GBP. + * + */ + public CreditorCreateRequest withBankReferencePrefix(String bankReferencePrefix) { + this.bankReferencePrefix = bankReferencePrefix; + return this; + } + /** * [ISO 3166-1 alpha-2 * code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) @@ -420,6 +434,7 @@ public static final class CreditorUpdateRequest extends PutRequest { private String addressLine1; private String addressLine2; private String addressLine3; + private String bankReferencePrefix; private String city; private String countryCode; private Links links; @@ -451,6 +466,19 @@ public CreditorUpdateRequest withAddressLine3(String addressLine3) { return this; } + /** + * Prefix for the bank reference of payouts sent to this creditor. For instance, if the + * creditor's `bank_reference_prefix` was `ACME`, the bank reference of a payout sent to + * that creditor could be `ACME-8G7Q8`. + * + * This prefix is also used for refunds in EUR and GBP. + * + */ + public CreditorUpdateRequest withBankReferencePrefix(String bankReferencePrefix) { + this.bankReferencePrefix = bankReferencePrefix; + return this; + } + /** * The city of the creditor's address. */ From fa8f22b95ce40cd7bb3e53a0987c9291d06af5dc Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 9 May 2023 13:26:04 +0000 Subject: [PATCH 27/85] Changes generated by d3bcc98221740f6e7e93abd300dd07aa3d19a0b6 --- .../java/com/gocardless/resources/Institution.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/gocardless/resources/Institution.java b/src/main/java/com/gocardless/resources/Institution.java index 09a95a3c..ffaf42ac 100644 --- a/src/main/java/com/gocardless/resources/Institution.java +++ b/src/main/java/com/gocardless/resources/Institution.java @@ -14,7 +14,7 @@ private Institution() { // blank to prevent instantiation } - private Boolean bankRedirect; + private Boolean autocompletesCollectBankAccount; private String countryCode; private String iconUrl; private String id; @@ -22,12 +22,12 @@ private Institution() { private String name; /** - * Flag to show if the institution supports redirection to its authorisation flow or if a - * provider's one is being used. The bank authorisation screen on the UI is visible based on - * this property. + * Flag to show if selecting this institution in the select_institution action can auto-complete + * the collect_bank_account action. The bank can return the payer's bank account details to + * GoCardless. */ - public Boolean getBankRedirect() { - return bankRedirect; + public Boolean getAutocompletesCollectBankAccount() { + return autocompletesCollectBankAccount; } /** From 14da6cb4699cc59eb0dd4474cd306d43f8f871be Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 9 May 2023 14:10:35 +0000 Subject: [PATCH 28/85] Changes generated by 1e345eed59d7bb70e2368539c30b09bab9bf71df --- .../services/SchemeIdentifierService.java | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/main/java/com/gocardless/services/SchemeIdentifierService.java b/src/main/java/com/gocardless/services/SchemeIdentifierService.java index 95d4f34d..2299365d 100644 --- a/src/main/java/com/gocardless/services/SchemeIdentifierService.java +++ b/src/main/java/com/gocardless/services/SchemeIdentifierService.java @@ -107,9 +107,27 @@ public SchemeIdentifierGetRequest get(String identity) { */ public static final class SchemeIdentifierCreateRequest extends IdempotentPostRequest { + private Links links; private String name; private Scheme scheme; + public SchemeIdentifierCreateRequest withLinks(Links links) { + this.links = links; + return this; + } + + /** + * required ID of the associated [creditor](#core-endpoints-creditors). + * + */ + public SchemeIdentifierCreateRequest withLinksCreditor(String creditor) { + if (links == null) { + links = new Links(); + } + links.withCreditor(creditor); + return this; + } + /** * The name which appears on customers' bank statements. This should usually be the * merchant's trading name. @@ -191,6 +209,19 @@ public String toString() { return name().toLowerCase(); } } + + public static class Links { + private String creditor; + + /** + * required ID of the associated [creditor](#core-endpoints-creditors). + * + */ + public Links withCreditor(String creditor) { + this.creditor = creditor; + return this; + } + } } /** From d90a36575c31f9b225fcc8e775db15bf22a688c7 Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 9 May 2023 15:17:58 +0000 Subject: [PATCH 29/85] Changes generated by ad74c50476d93f9aa7b00cafe73ae95cd7e313d1 --- .../java/com/gocardless/GoCardlessClient.java | 9 + .../resources/NegativeBalanceLimit.java | 114 +++++ .../services/NegativeBalanceLimitService.java | 405 ++++++++++++++++++ 3 files changed, 528 insertions(+) create mode 100644 src/main/java/com/gocardless/resources/NegativeBalanceLimit.java create mode 100644 src/main/java/com/gocardless/services/NegativeBalanceLimitService.java diff --git a/src/main/java/com/gocardless/GoCardlessClient.java b/src/main/java/com/gocardless/GoCardlessClient.java index 2b8aa595..0759953c 100644 --- a/src/main/java/com/gocardless/GoCardlessClient.java +++ b/src/main/java/com/gocardless/GoCardlessClient.java @@ -33,6 +33,7 @@ public class GoCardlessClient { private final MandateImportService mandateImports; private final MandateImportEntryService mandateImportEntries; private final MandatePdfService mandatePdfs; + private final NegativeBalanceLimitService negativeBalanceLimits; private final PayerAuthorisationService payerAuthorisations; private final PaymentService payments; private final PayoutService payouts; @@ -185,6 +186,7 @@ private GoCardlessClient(HttpClient httpClient) { this.mandateImports = new MandateImportService(httpClient); this.mandateImportEntries = new MandateImportEntryService(httpClient); this.mandatePdfs = new MandatePdfService(httpClient); + this.negativeBalanceLimits = new NegativeBalanceLimitService(httpClient); this.payerAuthorisations = new PayerAuthorisationService(httpClient); this.payments = new PaymentService(httpClient); this.payouts = new PayoutService(httpClient); @@ -332,6 +334,13 @@ public MandatePdfService mandatePdfs() { return mandatePdfs; } + /** + * A service class for working with negative balance limit resources. + */ + public NegativeBalanceLimitService negativeBalanceLimits() { + return negativeBalanceLimits; + } + /** * A service class for working with payer authorisation resources. */ diff --git a/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java b/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java new file mode 100644 index 00000000..ac1c1ed5 --- /dev/null +++ b/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java @@ -0,0 +1,114 @@ +package com.gocardless.resources; + +import com.google.gson.annotations.SerializedName; + +/** + * Represents a negative balance limit resource returned from the API. + * + * The negative balance limit for a creditor. If the creditor would exceed this limit, we will not + * allow the creation of refunds. + */ +public class NegativeBalanceLimit { + private NegativeBalanceLimit() { + // blank to prevent instantiation + } + + private Boolean active; + private Integer balanceLimit; + private String createdAt; + private Currency currency; + private String id; + private Links links; + private String reason; + private String updatedAt; + + /** + * Whether or not this limit is currently active + */ + public Boolean getActive() { + return active; + } + + /** + * The limit amount in pence (e.g. 10000 for a -100 GBP limit). + */ + public Integer getBalanceLimit() { + return balanceLimit; + } + + /** + * Fixed [timestamp](#api-usage-time-zones--dates), recording when this limit was created. + */ + public String getCreatedAt() { + return createdAt; + } + + /** + * [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. + */ + public Currency getCurrency() { + return currency; + } + + /** + * Unique identifier, beginning with "NBL". + */ + public String getId() { + return id; + } + + public Links getLinks() { + return links; + } + + /** + * the reason this limit was created + */ + public String getReason() { + return reason; + } + + /** + * Fixed [timestamp](#api-usage-time-zones--dates), recording when this limit was last updated. + */ + public String getUpdatedAt() { + return updatedAt; + } + + public enum Currency { + @SerializedName("AUD") + AUD, @SerializedName("CAD") + CAD, @SerializedName("DKK") + DKK, @SerializedName("EUR") + EUR, @SerializedName("GBP") + GBP, @SerializedName("NZD") + NZD, @SerializedName("SEK") + SEK, @SerializedName("USD") + USD, @SerializedName("unknown") + UNKNOWN + } + + public static class Links { + private Links() { + // blank to prevent instantiation + } + + private String creatorUser; + private String creditor; + + /** + * ID of the [creator_user](#core-endpoints-creator_users) who created this limit + */ + public String getCreatorUser() { + return creatorUser; + } + + /** + * ID of [creditor](#core-endpoints-creditors) which this limit relates to + */ + public String getCreditor() { + return creditor; + } + } +} diff --git a/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java b/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java new file mode 100644 index 00000000..01eef54b --- /dev/null +++ b/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java @@ -0,0 +1,405 @@ +package com.gocardless.services; + +import com.gocardless.http.*; +import com.gocardless.resources.NegativeBalanceLimit; +import com.google.common.collect.ImmutableMap; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import java.util.List; +import java.util.Map; + +/** + * Service class for working with negative balance limit resources. + * + * The negative balance limit for a creditor. If the creditor would exceed this limit, we will not + * allow the creation of refunds. + */ +public class NegativeBalanceLimitService { + private final HttpClient httpClient; + + /** + * Constructor. Users of this library should have no need to call this - an instance of this + * class can be obtained by calling + * {@link com.gocardless.GoCardlessClient#negativeBalanceLimits() }. + */ + public NegativeBalanceLimitService(HttpClient httpClient) { + this.httpClient = httpClient; + } + + /** + * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of negative balance limits. + */ + public NegativeBalanceLimitListRequest> list() { + return new NegativeBalanceLimitListRequest<>(httpClient, + ListRequest.pagingExecutor()); + } + + public NegativeBalanceLimitListRequest> all() { + return new NegativeBalanceLimitListRequest<>(httpClient, + ListRequest.iteratingExecutor()); + } + + /** + * Creates a new negative balance limit, which also deactivates the existing limit (if present) + * for that currency and creditor combination. + */ + public NegativeBalanceLimitCreateRequest create() { + return new NegativeBalanceLimitCreateRequest(httpClient); + } + + /** + * Request class for {@link NegativeBalanceLimitService#list }. + * + * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of negative balance limits. + */ + public static final class NegativeBalanceLimitListRequest + extends ListRequest { + private Active active; + private CreatedAt createdAt; + private String creditor; + private Currency currency; + + /** + * Whether or not this limit is currently active + */ + public NegativeBalanceLimitListRequest withActive(Active active) { + this.active = active; + return this; + } + + /** + * Cursor pointing to the start of the desired set. + */ + public NegativeBalanceLimitListRequest withAfter(String after) { + setAfter(after); + return this; + } + + /** + * Cursor pointing to the end of the desired set. + */ + public NegativeBalanceLimitListRequest withBefore(String before) { + setBefore(before); + return this; + } + + public NegativeBalanceLimitListRequest withCreatedAt(CreatedAt createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Limit to records created after the specified date-time. + */ + public NegativeBalanceLimitListRequest withCreatedAtGt(String gt) { + if (createdAt == null) { + createdAt = new CreatedAt(); + } + createdAt.withGt(gt); + return this; + } + + /** + * Limit to records created on or after the specified date-time. + */ + public NegativeBalanceLimitListRequest withCreatedAtGte(String gte) { + if (createdAt == null) { + createdAt = new CreatedAt(); + } + createdAt.withGte(gte); + return this; + } + + /** + * Limit to records created before the specified date-time. + */ + public NegativeBalanceLimitListRequest withCreatedAtLt(String lt) { + if (createdAt == null) { + createdAt = new CreatedAt(); + } + createdAt.withLt(lt); + return this; + } + + /** + * Limit to records created on or before the specified date-time. + */ + public NegativeBalanceLimitListRequest withCreatedAtLte(String lte) { + if (createdAt == null) { + createdAt = new CreatedAt(); + } + createdAt.withLte(lte); + return this; + } + + /** + * Unique identifier, beginning with "CR". + */ + public NegativeBalanceLimitListRequest withCreditor(String creditor) { + this.creditor = creditor; + return this; + } + + /** + * [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. + */ + public NegativeBalanceLimitListRequest withCurrency(Currency currency) { + this.currency = currency; + return this; + } + + /** + * Number of records to return. + */ + public NegativeBalanceLimitListRequest withLimit(Integer limit) { + setLimit(limit); + return this; + } + + private NegativeBalanceLimitListRequest(HttpClient httpClient, + ListRequestExecutor executor) { + super(httpClient, executor); + } + + public NegativeBalanceLimitListRequest withHeader(String headerName, + String headerValue) { + this.addHeader(headerName, headerValue); + return this; + } + + @Override + protected Map getQueryParams() { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.putAll(super.getQueryParams()); + if (active != null) { + params.put("active", active); + } + if (createdAt != null) { + params.putAll(createdAt.getQueryParams()); + } + if (creditor != null) { + params.put("creditor", creditor); + } + if (currency != null) { + params.put("currency", currency); + } + return params.build(); + } + + @Override + protected String getPathTemplate() { + return "negative_balance_limits"; + } + + @Override + protected String getEnvelope() { + return "negative_balance_limits"; + } + + @Override + protected TypeToken> getTypeToken() { + return new TypeToken>() {}; + } + + public enum Active { + @SerializedName("true") + TRUE, @SerializedName("false") + FALSE, @SerializedName("unknown") + UNKNOWN; + + @Override + public String toString() { + return name().toLowerCase(); + } + } + + public enum Currency { + @SerializedName("AUD") + AUD, @SerializedName("CAD") + CAD, @SerializedName("DKK") + DKK, @SerializedName("EUR") + EUR, @SerializedName("GBP") + GBP, @SerializedName("NZD") + NZD, @SerializedName("SEK") + SEK, @SerializedName("USD") + USD, @SerializedName("unknown") + UNKNOWN; + + @Override + public String toString() { + return name(); + } + } + + public static class CreatedAt { + private String gt; + private String gte; + private String lt; + private String lte; + + /** + * Limit to records created after the specified date-time. + */ + public CreatedAt withGt(String gt) { + this.gt = gt; + return this; + } + + /** + * Limit to records created on or after the specified date-time. + */ + public CreatedAt withGte(String gte) { + this.gte = gte; + return this; + } + + /** + * Limit to records created before the specified date-time. + */ + public CreatedAt withLt(String lt) { + this.lt = lt; + return this; + } + + /** + * Limit to records created on or before the specified date-time. + */ + public CreatedAt withLte(String lte) { + this.lte = lte; + return this; + } + + public Map getQueryParams() { + ImmutableMap.Builder params = ImmutableMap.builder(); + if (gt != null) { + params.put("created_at[gt]", gt); + } + if (gte != null) { + params.put("created_at[gte]", gte); + } + if (lt != null) { + params.put("created_at[lt]", lt); + } + if (lte != null) { + params.put("created_at[lte]", lte); + } + return params.build(); + } + } + } + + /** + * Request class for {@link NegativeBalanceLimitService#create }. + * + * Creates a new negative balance limit, which also deactivates the existing limit (if present) + * for that currency and creditor combination. + */ + public static final class NegativeBalanceLimitCreateRequest + extends PostRequest { + private Integer balanceLimit; + private Currency currency; + private Links links; + private String reason; + + /** + * The limit amount in pence (e.g. 10000 for a -100 GBP limit). + */ + public NegativeBalanceLimitCreateRequest withBalanceLimit(Integer balanceLimit) { + this.balanceLimit = balanceLimit; + return this; + } + + /** + * [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. + */ + public NegativeBalanceLimitCreateRequest withCurrency(Currency currency) { + this.currency = currency; + return this; + } + + public NegativeBalanceLimitCreateRequest withLinks(Links links) { + this.links = links; + return this; + } + + /** + * ID of the [creditor](#core-endpoints-creditors) this limit relates to + */ + public NegativeBalanceLimitCreateRequest withLinksCreditor(String creditor) { + if (links == null) { + links = new Links(); + } + links.withCreditor(creditor); + return this; + } + + /** + * the reason this limit was created + */ + public NegativeBalanceLimitCreateRequest withReason(String reason) { + this.reason = reason; + return this; + } + + private NegativeBalanceLimitCreateRequest(HttpClient httpClient) { + super(httpClient); + } + + public NegativeBalanceLimitCreateRequest withHeader(String headerName, String headerValue) { + this.addHeader(headerName, headerValue); + return this; + } + + @Override + protected String getPathTemplate() { + return "negative_balance_limits"; + } + + @Override + protected String getEnvelope() { + return "negative_balance_limits"; + } + + @Override + protected Class getResponseClass() { + return NegativeBalanceLimit.class; + } + + @Override + protected boolean hasBody() { + return true; + } + + public enum Currency { + @SerializedName("AUD") + AUD, @SerializedName("CAD") + CAD, @SerializedName("DKK") + DKK, @SerializedName("EUR") + EUR, @SerializedName("GBP") + GBP, @SerializedName("NZD") + NZD, @SerializedName("SEK") + SEK, @SerializedName("USD") + USD, @SerializedName("unknown") + UNKNOWN; + + @Override + public String toString() { + return name(); + } + } + + public static class Links { + private String creditor; + + /** + * ID of the [creditor](#core-endpoints-creditors) this limit relates to + */ + public Links withCreditor(String creditor) { + this.creditor = creditor; + return this; + } + } + } +} From 3e94a1d503141623d9855657fe4884b186729b81 Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 10 May 2023 11:44:14 +0000 Subject: [PATCH 30/85] Changes generated by 6d457d4a6a1fd18be882e6d87934e3b7df7300a3 --- .../gocardless/services/CreditorService.java | 111 ------------------ 1 file changed, 111 deletions(-) diff --git a/src/main/java/com/gocardless/services/CreditorService.java b/src/main/java/com/gocardless/services/CreditorService.java index 714e95c6..9e6f2fb3 100644 --- a/src/main/java/com/gocardless/services/CreditorService.java +++ b/src/main/java/com/gocardless/services/CreditorService.java @@ -62,22 +62,6 @@ public CreditorUpdateRequest update(String identity) { return new CreditorUpdateRequest(httpClient, identity); } - /** - * Applies a [scheme identifier](#core-endpoints-scheme-identifiers) to a creditor. - * - * If the scheme identifier has a `pending` status, it will be applied asynchronously once it - * becomes `active`. - * - * If the creditor already has a scheme identifier for the scheme, it will be replaced, and any - * mandates attached to it transferred asynchronously. On Bacs and SEPA, if payments were about - * to be submitted, they will be delayed. To minimise this delay, we recommend that you apply - * the new scheme identifier after the daily payment submission time (4 PM Europe/London time). - * - */ - public CreditorApplySchemeIdentifierRequest applySchemeIdentifier(String identity) { - return new CreditorApplySchemeIdentifierRequest(httpClient, identity); - } - /** * Request class for {@link CreditorService#create }. * @@ -749,99 +733,4 @@ public Links withDefaultUsdPayoutAccount(String defaultUsdPayoutAccount) { } } } - - /** - * Request class for {@link CreditorService#applySchemeIdentifier }. - * - * Applies a [scheme identifier](#core-endpoints-scheme-identifiers) to a creditor. - * - * If the scheme identifier has a `pending` status, it will be applied asynchronously once it - * becomes `active`. - * - * If the creditor already has a scheme identifier for the scheme, it will be replaced, and any - * mandates attached to it transferred asynchronously. On Bacs and SEPA, if payments were about - * to be submitted, they will be delayed. To minimise this delay, we recommend that you apply - * the new scheme identifier after the daily payment submission time (4 PM Europe/London time). - * - */ - public static final class CreditorApplySchemeIdentifierRequest extends PostRequest { - @PathParam - private final String identity; - private Links links; - - /** - * The ID of the scheme identifier to apply - */ - public CreditorApplySchemeIdentifierRequest withLinks(Links links) { - this.links = links; - return this; - } - - /** - * Unique identifier, usually beginning with "SU". - */ - public CreditorApplySchemeIdentifierRequest withLinksSchemeIdentifier( - String schemeIdentifier) { - if (links == null) { - links = new Links(); - } - links.withSchemeIdentifier(schemeIdentifier); - return this; - } - - private CreditorApplySchemeIdentifierRequest(HttpClient httpClient, String identity) { - super(httpClient); - this.identity = identity; - } - - public CreditorApplySchemeIdentifierRequest withHeader(String headerName, - String headerValue) { - this.addHeader(headerName, headerValue); - return this; - } - - @Override - protected Map getPathParams() { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("identity", identity); - return params.build(); - } - - @Override - protected String getPathTemplate() { - return "creditors/:identity/actions/apply_scheme_identifier"; - } - - @Override - protected String getEnvelope() { - return "creditors"; - } - - @Override - protected Class getResponseClass() { - return Creditor.class; - } - - @Override - protected boolean hasBody() { - return true; - } - - @Override - protected String getRequestEnvelope() { - return "data"; - } - - public static class Links { - private String schemeIdentifier; - - /** - * Unique identifier, usually beginning with "SU". - */ - public Links withSchemeIdentifier(String schemeIdentifier) { - this.schemeIdentifier = schemeIdentifier; - return this; - } - } - } } From 5350380549ac9371e5846d7f4a58ec94d1327533 Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 10 May 2023 12:57:09 +0000 Subject: [PATCH 31/85] Changes generated by b06e871b1159e2098af8af9478f3f485286cba0f --- 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 0200ea83..3faf6ccb 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 5.16.0 + 5.17.0 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:5.16.0' +implementation 'com.gocardless:gocardless-pro:5.17.0' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index 8aaa1d80..0a3b567d 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '5.16.0' +version = '5.17.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 f89060ae..a4f5f8f8 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/5.16.0 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/5.17.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")), @@ -48,7 +48,7 @@ public class HttpClient { ImmutableMap.Builder builder = ImmutableMap.builder(); builder.put("GoCardless-Version", "2015-07-06"); builder.put("GoCardless-Client-Library", "gocardless-pro-java"); - builder.put("GoCardless-Client-Version", "5.16.0"); + builder.put("GoCardless-Client-Version", "5.17.0"); HEADERS = builder.build(); } private final OkHttpClient rawClient; From 4d1891e55e665fc35d7119fa670d529fb71d258e Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 11 May 2023 13:29:46 +0000 Subject: [PATCH 32/85] Changes generated by b45a5619d4b80e0b119dea43ed6dadd50e24b320 --- .../java/com/gocardless/resources/NegativeBalanceLimit.java | 6 ++++-- .../gocardless/services/NegativeBalanceLimitService.java | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java b/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java index ac1c1ed5..70838c17 100644 --- a/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java +++ b/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java @@ -5,8 +5,10 @@ /** * Represents a negative balance limit resource returned from the API. * - * The negative balance limit for a creditor. If the creditor would exceed this limit, we will not - * allow the creation of refunds. + * The negative balance limit is a threshold for the creditor balance beyond which refunds are not + * permitted. The default limit is zero — refunds are not permitted if the creditor has a negative + * balance. The limit can be changed on a per-creditor basis. + * */ public class NegativeBalanceLimit { private NegativeBalanceLimit() { diff --git a/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java b/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java index 01eef54b..cdc7b7d3 100644 --- a/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java +++ b/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java @@ -11,8 +11,10 @@ /** * Service class for working with negative balance limit resources. * - * The negative balance limit for a creditor. If the creditor would exceed this limit, we will not - * allow the creation of refunds. + * The negative balance limit is a threshold for the creditor balance beyond which refunds are not + * permitted. The default limit is zero — refunds are not permitted if the creditor has a negative + * balance. The limit can be changed on a per-creditor basis. + * */ public class NegativeBalanceLimitService { private final HttpClient httpClient; From f508ad1bf79f8336e26f4bae200d14c276114ca8 Mon Sep 17 00:00:00 2001 From: Robot Date: Fri, 12 May 2023 15:20:35 +0000 Subject: [PATCH 33/85] Changes generated by aa7ee0b4c1f53de852043c7f487c1512f828875c --- .../services/CurrencyExchangeRateService.java | 109 ------------------ .../gocardless/services/TaxRateService.java | 8 ++ 2 files changed, 8 insertions(+), 109 deletions(-) diff --git a/src/main/java/com/gocardless/services/CurrencyExchangeRateService.java b/src/main/java/com/gocardless/services/CurrencyExchangeRateService.java index 3fe83fd5..6270d55f 100644 --- a/src/main/java/com/gocardless/services/CurrencyExchangeRateService.java +++ b/src/main/java/com/gocardless/services/CurrencyExchangeRateService.java @@ -44,7 +44,6 @@ public CurrencyExchangeRateListRequest> all() { */ public static final class CurrencyExchangeRateListRequest extends ListRequest { - private CreatedAt createdAt; private String source; private String target; @@ -64,55 +63,6 @@ public CurrencyExchangeRateListRequest withBefore(String before) { return this; } - public CurrencyExchangeRateListRequest withCreatedAt(CreatedAt createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Limit to records created after the specified date-time. - */ - public CurrencyExchangeRateListRequest withCreatedAtGt(String gt) { - if (createdAt == null) { - createdAt = new CreatedAt(); - } - createdAt.withGt(gt); - return this; - } - - /** - * Limit to records created on or after the specified date-time. - */ - public CurrencyExchangeRateListRequest withCreatedAtGte(String gte) { - if (createdAt == null) { - createdAt = new CreatedAt(); - } - createdAt.withGte(gte); - return this; - } - - /** - * Limit to records created before the specified date-time. - */ - public CurrencyExchangeRateListRequest withCreatedAtLt(String lt) { - if (createdAt == null) { - createdAt = new CreatedAt(); - } - createdAt.withLt(lt); - return this; - } - - /** - * Limit to records created on or before the specified date-time. - */ - public CurrencyExchangeRateListRequest withCreatedAtLte(String lte) { - if (createdAt == null) { - createdAt = new CreatedAt(); - } - createdAt.withLte(lte); - return this; - } - /** * Number of records to return. */ @@ -152,9 +102,6 @@ public CurrencyExchangeRateListRequest withHeader(String headerName, protected Map getQueryParams() { ImmutableMap.Builder params = ImmutableMap.builder(); params.putAll(super.getQueryParams()); - if (createdAt != null) { - params.putAll(createdAt.getQueryParams()); - } if (source != null) { params.put("source", source); } @@ -178,61 +125,5 @@ protected String getEnvelope() { protected TypeToken> getTypeToken() { return new TypeToken>() {}; } - - public static class CreatedAt { - private String gt; - private String gte; - private String lt; - private String lte; - - /** - * Limit to records created after the specified date-time. - */ - public CreatedAt withGt(String gt) { - this.gt = gt; - return this; - } - - /** - * Limit to records created on or after the specified date-time. - */ - public CreatedAt withGte(String gte) { - this.gte = gte; - return this; - } - - /** - * Limit to records created before the specified date-time. - */ - public CreatedAt withLt(String lt) { - this.lt = lt; - return this; - } - - /** - * Limit to records created on or before the specified date-time. - */ - public CreatedAt withLte(String lte) { - this.lte = lte; - return this; - } - - public Map getQueryParams() { - ImmutableMap.Builder params = ImmutableMap.builder(); - if (gt != null) { - params.put("created_at[gt]", gt); - } - if (gte != null) { - params.put("created_at[gte]", gte); - } - if (lt != null) { - params.put("created_at[lt]", lt); - } - if (lte != null) { - params.put("created_at[lte]", lte); - } - return params.build(); - } - } } } diff --git a/src/main/java/com/gocardless/services/TaxRateService.java b/src/main/java/com/gocardless/services/TaxRateService.java index ee4299c3..8e1222c4 100644 --- a/src/main/java/com/gocardless/services/TaxRateService.java +++ b/src/main/java/com/gocardless/services/TaxRateService.java @@ -75,6 +75,14 @@ public TaxRateListRequest withJurisdiction(String jurisdiction) { return this; } + /** + * Number of records to return. + */ + public TaxRateListRequest withLimit(Integer limit) { + setLimit(limit); + return this; + } + private TaxRateListRequest(HttpClient httpClient, ListRequestExecutor executor) { super(httpClient, executor); From 1151cf9dc20c3b1b6c5f67813ea613fc23b14bef Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 15 May 2023 09:34:40 +0000 Subject: [PATCH 34/85] Changes generated by 0c88a7843342a25d0a3e1a3e5c88d880cc33492d --- .../services/NegativeBalanceLimitService.java | 109 ------------------ 1 file changed, 109 deletions(-) diff --git a/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java b/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java index cdc7b7d3..22ddcd52 100644 --- a/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java +++ b/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java @@ -57,7 +57,6 @@ public NegativeBalanceLimitCreateRequest create() { public static final class NegativeBalanceLimitListRequest extends ListRequest { private Active active; - private CreatedAt createdAt; private String creditor; private Currency currency; @@ -85,55 +84,6 @@ public NegativeBalanceLimitListRequest withBefore(String before) { return this; } - public NegativeBalanceLimitListRequest withCreatedAt(CreatedAt createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Limit to records created after the specified date-time. - */ - public NegativeBalanceLimitListRequest withCreatedAtGt(String gt) { - if (createdAt == null) { - createdAt = new CreatedAt(); - } - createdAt.withGt(gt); - return this; - } - - /** - * Limit to records created on or after the specified date-time. - */ - public NegativeBalanceLimitListRequest withCreatedAtGte(String gte) { - if (createdAt == null) { - createdAt = new CreatedAt(); - } - createdAt.withGte(gte); - return this; - } - - /** - * Limit to records created before the specified date-time. - */ - public NegativeBalanceLimitListRequest withCreatedAtLt(String lt) { - if (createdAt == null) { - createdAt = new CreatedAt(); - } - createdAt.withLt(lt); - return this; - } - - /** - * Limit to records created on or before the specified date-time. - */ - public NegativeBalanceLimitListRequest withCreatedAtLte(String lte) { - if (createdAt == null) { - createdAt = new CreatedAt(); - } - createdAt.withLte(lte); - return this; - } - /** * Unique identifier, beginning with "CR". */ @@ -177,9 +127,6 @@ protected Map getQueryParams() { if (active != null) { params.put("active", active); } - if (createdAt != null) { - params.putAll(createdAt.getQueryParams()); - } if (creditor != null) { params.put("creditor", creditor); } @@ -233,62 +180,6 @@ public String toString() { return name(); } } - - public static class CreatedAt { - private String gt; - private String gte; - private String lt; - private String lte; - - /** - * Limit to records created after the specified date-time. - */ - public CreatedAt withGt(String gt) { - this.gt = gt; - return this; - } - - /** - * Limit to records created on or after the specified date-time. - */ - public CreatedAt withGte(String gte) { - this.gte = gte; - return this; - } - - /** - * Limit to records created before the specified date-time. - */ - public CreatedAt withLt(String lt) { - this.lt = lt; - return this; - } - - /** - * Limit to records created on or before the specified date-time. - */ - public CreatedAt withLte(String lte) { - this.lte = lte; - return this; - } - - public Map getQueryParams() { - ImmutableMap.Builder params = ImmutableMap.builder(); - if (gt != null) { - params.put("created_at[gt]", gt); - } - if (gte != null) { - params.put("created_at[gte]", gte); - } - if (lt != null) { - params.put("created_at[lt]", lt); - } - if (lte != null) { - params.put("created_at[lte]", lte); - } - return params.build(); - } - } } /** From a8607bebe42d499c9189fcfef24301a0646c3b70 Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 15 May 2023 10:42:27 +0000 Subject: [PATCH 35/85] Changes generated by 753f0f3be9936be35c0a460f843e77a0e6b3b9b0 --- 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 3faf6ccb..30c1f1cf 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 5.17.0 + 5.18.0 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:5.17.0' +implementation 'com.gocardless:gocardless-pro:5.18.0' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index 0a3b567d..80efb9cc 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '5.17.0' +version = '5.18.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 a4f5f8f8..91b7f832 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/5.17.0 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/5.18.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")), @@ -48,7 +48,7 @@ public class HttpClient { ImmutableMap.Builder builder = ImmutableMap.builder(); builder.put("GoCardless-Version", "2015-07-06"); builder.put("GoCardless-Client-Library", "gocardless-pro-java"); - builder.put("GoCardless-Client-Version", "5.17.0"); + builder.put("GoCardless-Client-Version", "5.18.0"); HEADERS = builder.build(); } private final OkHttpClient rawClient; From a5c00b8013d6d99871bbc9753f27df1014512c6a Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 17 May 2023 11:04:11 +0000 Subject: [PATCH 36/85] Changes generated by 8ac476b1c5d8b339df807a58787252b8e4f68b2d --- .../com/gocardless/resources/NegativeBalanceLimit.java | 8 -------- .../gocardless/services/NegativeBalanceLimitService.java | 9 --------- 2 files changed, 17 deletions(-) diff --git a/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java b/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java index 70838c17..11fe59af 100644 --- a/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java +++ b/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java @@ -21,7 +21,6 @@ private NegativeBalanceLimit() { private Currency currency; private String id; private Links links; - private String reason; private String updatedAt; /** @@ -64,13 +63,6 @@ public Links getLinks() { return links; } - /** - * the reason this limit was created - */ - public String getReason() { - return reason; - } - /** * Fixed [timestamp](#api-usage-time-zones--dates), recording when this limit was last updated. */ diff --git a/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java b/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java index 22ddcd52..5aa750b9 100644 --- a/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java +++ b/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java @@ -193,7 +193,6 @@ public static final class NegativeBalanceLimitCreateRequest private Integer balanceLimit; private Currency currency; private Links links; - private String reason; /** * The limit amount in pence (e.g. 10000 for a -100 GBP limit). @@ -228,14 +227,6 @@ public NegativeBalanceLimitCreateRequest withLinksCreditor(String creditor) { return this; } - /** - * the reason this limit was created - */ - public NegativeBalanceLimitCreateRequest withReason(String reason) { - this.reason = reason; - return this; - } - private NegativeBalanceLimitCreateRequest(HttpClient httpClient) { super(httpClient); } From 9354d27bf2afa912ed5329ca237ba7975cc4ece9 Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 17 May 2023 13:49:55 +0000 Subject: [PATCH 37/85] Changes generated by 96d64ec189d8148a6c7ddc5056e0a12d59f55d66 --- .../resources/NegativeBalanceLimit.java | 8 ----- .../services/NegativeBalanceLimitService.java | 34 ++++--------------- 2 files changed, 6 insertions(+), 36 deletions(-) diff --git a/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java b/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java index 11fe59af..f65912bb 100644 --- a/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java +++ b/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java @@ -15,7 +15,6 @@ private NegativeBalanceLimit() { // blank to prevent instantiation } - private Boolean active; private Integer balanceLimit; private String createdAt; private Currency currency; @@ -23,13 +22,6 @@ private NegativeBalanceLimit() { private Links links; private String updatedAt; - /** - * Whether or not this limit is currently active - */ - public Boolean getActive() { - return active; - } - /** * The limit amount in pence (e.g. 10000 for a -100 GBP limit). */ diff --git a/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java b/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java index 5aa750b9..1106b663 100644 --- a/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java +++ b/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java @@ -42,8 +42,9 @@ public NegativeBalanceLimitListRequest> all() { } /** - * Creates a new negative balance limit, which also deactivates the existing limit (if present) - * for that currency and creditor combination. + * Creates a new negative balance limit, which replaces the existing limit (if present) for that + * currency and creditor combination. + * */ public NegativeBalanceLimitCreateRequest create() { return new NegativeBalanceLimitCreateRequest(httpClient); @@ -56,18 +57,9 @@ public NegativeBalanceLimitCreateRequest create() { */ public static final class NegativeBalanceLimitListRequest extends ListRequest { - private Active active; private String creditor; private Currency currency; - /** - * Whether or not this limit is currently active - */ - public NegativeBalanceLimitListRequest withActive(Active active) { - this.active = active; - return this; - } - /** * Cursor pointing to the start of the desired set. */ @@ -124,9 +116,6 @@ public NegativeBalanceLimitListRequest withHeader(String headerName, protected Map getQueryParams() { ImmutableMap.Builder params = ImmutableMap.builder(); params.putAll(super.getQueryParams()); - if (active != null) { - params.put("active", active); - } if (creditor != null) { params.put("creditor", creditor); } @@ -151,18 +140,6 @@ protected TypeToken> getTypeToken() { return new TypeToken>() {}; } - public enum Active { - @SerializedName("true") - TRUE, @SerializedName("false") - FALSE, @SerializedName("unknown") - UNKNOWN; - - @Override - public String toString() { - return name().toLowerCase(); - } - } - public enum Currency { @SerializedName("AUD") AUD, @SerializedName("CAD") @@ -185,8 +162,9 @@ public String toString() { /** * Request class for {@link NegativeBalanceLimitService#create }. * - * Creates a new negative balance limit, which also deactivates the existing limit (if present) - * for that currency and creditor combination. + * Creates a new negative balance limit, which replaces the existing limit (if present) for that + * currency and creditor combination. + * */ public static final class NegativeBalanceLimitCreateRequest extends PostRequest { From 1d8235dec748210ecebe11c80faec8182c6a1105 Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 18 May 2023 10:22:59 +0000 Subject: [PATCH 38/85] Changes generated by ee7a615ecfc324925d59b643c0d08609a0cc6ec8 --- .../com/gocardless/resources/NegativeBalanceLimit.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java b/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java index f65912bb..ca7d8df5 100644 --- a/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java +++ b/src/main/java/com/gocardless/resources/NegativeBalanceLimit.java @@ -20,7 +20,6 @@ private NegativeBalanceLimit() { private Currency currency; private String id; private Links links; - private String updatedAt; /** * The limit amount in pence (e.g. 10000 for a -100 GBP limit). @@ -55,13 +54,6 @@ public Links getLinks() { return links; } - /** - * Fixed [timestamp](#api-usage-time-zones--dates), recording when this limit was last updated. - */ - public String getUpdatedAt() { - return updatedAt; - } - public enum Currency { @SerializedName("AUD") AUD, @SerializedName("CAD") From f8af087aaddc3a50c59a61ff9a434a3790fca5c3 Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 22 May 2023 13:18:48 +0000 Subject: [PATCH 39/85] Changes generated by 27103be846ae4d48c7965ba442ce98aa379911ef --- .../com/gocardless/services/InstitutionService.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/main/java/com/gocardless/services/InstitutionService.java b/src/main/java/com/gocardless/services/InstitutionService.java index d4f78a52..d36ae07a 100644 --- a/src/main/java/com/gocardless/services/InstitutionService.java +++ b/src/main/java/com/gocardless/services/InstitutionService.java @@ -31,12 +31,6 @@ public InstitutionService(HttpClient httpClient) { /** * Returns a list of supported institutions. - * - *

- * Deprecated: This list institutions endpoint is no longer supported. We - * strongly recommend using the [List Institutions For Billing - * Request](#institutions-list-institutions-for-billing-request) instead. - *

*/ public InstitutionListRequest> list() { return new InstitutionListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -62,12 +56,6 @@ public InstitutionListForBillingRequestRequest> listForBil * Request class for {@link InstitutionService#list }. * * Returns a list of supported institutions. - * - *

- * Deprecated: This list institutions endpoint is no longer supported. We - * strongly recommend using the [List Institutions For Billing - * Request](#institutions-list-institutions-for-billing-request) instead. - *

*/ public static final class InstitutionListRequest extends ListRequest { private String countryCode; From c4367a40dc6f92ba9c40fb7d8b4de03dfce568c0 Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 25 May 2023 11:50:12 +0000 Subject: [PATCH 40/85] Changes generated by 8174844e9af1c3ee35feef92c534961cb192ab70 --- .../services/SchemeIdentifierService.java | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/gocardless/services/SchemeIdentifierService.java b/src/main/java/com/gocardless/services/SchemeIdentifierService.java index 2299365d..e169019c 100644 --- a/src/main/java/com/gocardless/services/SchemeIdentifierService.java +++ b/src/main/java/com/gocardless/services/SchemeIdentifierService.java @@ -28,10 +28,12 @@ public SchemeIdentifierService(HttpClient httpClient) { } /** - * Creates a new scheme identifier. The scheme identifier must be [applied to a - * creditor](#creditors-apply-a-scheme-identifier) before payments are taken using it. The - * scheme identifier must also have the `status` of active before it can be used. On Bacs, this - * will take 5 working days. On other schemes, this happens instantly. + * Creates a new scheme identifier. The scheme identifier status will be `pending` while + * GoCardless is processing the request. Once the scheme identifier is ready to be used the + * status will be updated to `active`. At this point, GoCardless will emit a scheme identifier + * activated event via webhook to notify you of this change. In Bacs, it will take up to five + * working days for a scheme identifier to become active. On other schemes, including SEPA, this + * happens instantly. * * #### Scheme identifier name validations * @@ -80,10 +82,12 @@ public SchemeIdentifierGetRequest get(String identity) { /** * Request class for {@link SchemeIdentifierService#create }. * - * Creates a new scheme identifier. The scheme identifier must be [applied to a - * creditor](#creditors-apply-a-scheme-identifier) before payments are taken using it. The - * scheme identifier must also have the `status` of active before it can be used. On Bacs, this - * will take 5 working days. On other schemes, this happens instantly. + * Creates a new scheme identifier. The scheme identifier status will be `pending` while + * GoCardless is processing the request. Once the scheme identifier is ready to be used the + * status will be updated to `active`. At this point, GoCardless will emit a scheme identifier + * activated event via webhook to notify you of this change. In Bacs, it will take up to five + * working days for a scheme identifier to become active. On other schemes, including SEPA, this + * happens instantly. * * #### Scheme identifier name validations * From 4a0e1803535343db299d1c12b81df724ddec1153 Mon Sep 17 00:00:00 2001 From: Robot Date: Fri, 9 Jun 2023 13:58:04 +0000 Subject: [PATCH 41/85] Changes generated by 097578f750ff7e463f72973be367604cda06db71 --- src/main/java/com/gocardless/resources/RedirectFlow.java | 3 ++- src/main/java/com/gocardless/services/RedirectFlowService.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gocardless/resources/RedirectFlow.java b/src/main/java/com/gocardless/resources/RedirectFlow.java index b23a2e8d..b5830dc3 100644 --- a/src/main/java/com/gocardless/resources/RedirectFlow.java +++ b/src/main/java/com/gocardless/resources/RedirectFlow.java @@ -9,7 +9,8 @@ *

* Deprecated: Redirect Flows are our legacy APIs for setting up mandates and will * no longer be supported in the future. We strongly recommend using the [Billing Request - * flow](#billing-requests) instead. + * flow](#billing-requests) instead. From June 13th 2023, we will no longer allow new + * merchants to create Redirect Flows. *

* * Redirect flows enable you to use GoCardless' [hosted payment diff --git a/src/main/java/com/gocardless/services/RedirectFlowService.java b/src/main/java/com/gocardless/services/RedirectFlowService.java index fa171959..d4201d06 100644 --- a/src/main/java/com/gocardless/services/RedirectFlowService.java +++ b/src/main/java/com/gocardless/services/RedirectFlowService.java @@ -13,7 +13,8 @@ *

* Deprecated: Redirect Flows are our legacy APIs for setting up mandates and will * no longer be supported in the future. We strongly recommend using the [Billing Request - * flow](#billing-requests) instead. + * flow](#billing-requests) instead. From June 13th 2023, we will no longer allow new + * merchants to create Redirect Flows. *

* * Redirect flows enable you to use GoCardless' [hosted payment From bc46647c9374ca83c9b10a9c6dad812a4921a5d4 Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 19 Jun 2023 16:58:15 +0000 Subject: [PATCH 42/85] Changes generated by 2ed80e450fe154ff4b51f81586bc8a38c3e05b4c --- .../java/com/gocardless/resources/BillingRequest.java | 8 +++++--- .../com/gocardless/services/BillingRequestService.java | 9 ++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index 137db5ad..12e82a58 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -588,7 +588,7 @@ public String getEndDate() { } /** - * The maximum amount that can be charged for a single payment + * The maximum amount that can be charged for a single payment. Required for VRP. */ public Integer getMaxAmountPerPayment() { return maxAmountPerPayment; @@ -638,7 +638,8 @@ public Alignment getAlignment() { } /** - * The maximum number of payments that can be collected in this periodic limit + * (Optional) The maximum number of payments that can be collected in this periodic + * limit. */ public Integer getMaxPayments() { return maxPayments; @@ -646,7 +647,8 @@ public Integer getMaxPayments() { /** * The maximum total amount that can be charged for all payments in this periodic - * limit + * limit. Required for VRP. + * */ public Integer getMaxTotalAmount() { return maxTotalAmount; diff --git a/src/main/java/com/gocardless/services/BillingRequestService.java b/src/main/java/com/gocardless/services/BillingRequestService.java index bd2e7698..c77a7a92 100644 --- a/src/main/java/com/gocardless/services/BillingRequestService.java +++ b/src/main/java/com/gocardless/services/BillingRequestService.java @@ -584,7 +584,8 @@ public PeriodicLimits withAlignment(Alignment alignment) { } /** - * The maximum number of payments that can be collected in this periodic limit + * (Optional) The maximum number of payments that can be collected in this periodic + * limit. */ public PeriodicLimits withMaxPayments(Integer maxPayments) { this.maxPayments = maxPayments; @@ -592,7 +593,9 @@ public PeriodicLimits withMaxPayments(Integer maxPayments) { } /** - * The maximum total amount that can be charged for all payments in this periodic limit + * The maximum total amount that can be charged for all payments in this periodic limit. + * Required for VRP. + * */ public PeriodicLimits withMaxTotalAmount(Integer maxTotalAmount) { this.maxTotalAmount = maxTotalAmount; @@ -673,7 +676,7 @@ public Constraints withEndDate(String endDate) { } /** - * The maximum amount that can be charged for a single payment + * The maximum amount that can be charged for a single payment. Required for VRP. */ public Constraints withMaxAmountPerPayment(Integer maxAmountPerPayment) { this.maxAmountPerPayment = maxAmountPerPayment; From e4d2ca82a1fb3f7e7b5678f1a537ed89fccaa76c Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 20 Jun 2023 14:48:42 +0000 Subject: [PATCH 43/85] Changes generated by 3930658951044a3ae0daca82df2efcb7baf0d9c3 --- README.md | 4 ++-- build.gradle | 2 +- .../java/com/gocardless/http/HttpClient.java | 4 ++-- .../gocardless/resources/BillingRequest.java | 20 +++++++++---------- .../resources/BillingRequestTemplate.java | 12 +++++------ .../resources/CreditorBankAccount.java | 4 ++-- .../com/gocardless/resources/Customer.java | 4 ++-- .../resources/CustomerBankAccount.java | 4 ++-- .../java/com/gocardless/resources/Event.java | 4 ++-- .../resources/InstalmentSchedule.java | 8 ++++---- .../com/gocardless/resources/Mandate.java | 4 ++-- .../resources/PayerAuthorisation.java | 12 +++++------ .../com/gocardless/resources/Payment.java | 4 ++-- .../java/com/gocardless/resources/Payout.java | 4 ++-- .../gocardless/resources/RedirectFlow.java | 4 ++-- .../java/com/gocardless/resources/Refund.java | 4 ++-- .../gocardless/resources/Subscription.java | 4 ++-- .../com/gocardless/resources/Webhook.java | 8 ++++---- 18 files changed, 55 insertions(+), 55 deletions(-) diff --git a/README.md b/README.md index 30c1f1cf..b9f1971c 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 5.18.0 + 5.18.1 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:5.18.0' +implementation 'com.gocardless:gocardless-pro:5.18.1' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index 80efb9cc..579f1833 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '5.18.0' +version = '5.18.1' 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 91b7f832..0bff84d4 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/5.18.0 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/5.18.1 java/%s %s/%s %s/%s", cleanUserAgentToken(System.getProperty("java.vm.specification.version")), cleanUserAgentToken(System.getProperty("java.vm.name")), cleanUserAgentToken(System.getProperty("java.version")), @@ -48,7 +48,7 @@ public class HttpClient { ImmutableMap.Builder builder = ImmutableMap.builder(); builder.put("GoCardless-Version", "2015-07-06"); builder.put("GoCardless-Client-Library", "gocardless-pro-java"); - builder.put("GoCardless-Client-Version", "5.18.0"); + builder.put("GoCardless-Client-Version", "5.18.1"); HEADERS = builder.build(); } private final OkHttpClient rawClient; diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index 12e82a58..f28c5d26 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -26,7 +26,7 @@ private BillingRequest() { private String id; private Links links; private MandateRequest mandateRequest; - private Map metadata; + private Map metadata; private PaymentRequest paymentRequest; private PurposeCode purposeCode; private Resources resources; @@ -80,7 +80,7 @@ public MandateRequest getMandateRequest() { * 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. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } @@ -450,7 +450,7 @@ private MandateRequest() { private String currency; private String description; private Links links; - private Map metadata; + private Map metadata; private String scheme; private Verify verify; @@ -500,7 +500,7 @@ public Links getLinks() { * 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. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } @@ -713,7 +713,7 @@ private PaymentRequest() { private String currency; private String description; private Links links; - private Map metadata; + private Map metadata; private String scheme; /** @@ -758,7 +758,7 @@ public Links getLinks() { * 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. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } @@ -837,7 +837,7 @@ private Customer() { private String givenName; private String id; private String language; - private Map metadata; + private Map metadata; private String phoneNumber; /** @@ -903,7 +903,7 @@ public String getLanguage() { * 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. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } @@ -936,7 +936,7 @@ private CustomerBankAccount() { private Boolean enabled; private String id; private Links links; - private Map metadata; + private Map metadata; /** * Name of the account holder, as known by the bank. Usually this is the same as the @@ -1020,7 +1020,7 @@ public Links getLinks() { * 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. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } diff --git a/src/main/java/com/gocardless/resources/BillingRequestTemplate.java b/src/main/java/com/gocardless/resources/BillingRequestTemplate.java index cf8ff81f..9154c243 100644 --- a/src/main/java/com/gocardless/resources/BillingRequestTemplate.java +++ b/src/main/java/com/gocardless/resources/BillingRequestTemplate.java @@ -18,15 +18,15 @@ private BillingRequestTemplate() { private String id; private String mandateRequestCurrency; private String mandateRequestDescription; - private Map mandateRequestMetadata; + private Map mandateRequestMetadata; private String mandateRequestScheme; private MandateRequestVerify mandateRequestVerify; - private Map metadata; + private Map metadata; private String name; private Integer paymentRequestAmount; private String paymentRequestCurrency; private String paymentRequestDescription; - private Map paymentRequestMetadata; + private Map paymentRequestMetadata; private String paymentRequestScheme; private String redirectUri; private String updatedAt; @@ -74,7 +74,7 @@ public String getMandateRequestDescription() { * is fulfilled. Up to 3 keys are permitted, with key names up to 50 characters and values up to * 500 characters. */ - public Map getMandateRequestMetadata() { + public Map getMandateRequestMetadata() { return mandateRequestMetadata; } @@ -119,7 +119,7 @@ public MandateRequestVerify getMandateRequestVerify() { * 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. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } @@ -161,7 +161,7 @@ public String getPaymentRequestDescription() { * is fulfilled. Up to 3 keys are permitted, with key names up to 50 characters and values up to * 500 characters. */ - public Map getPaymentRequestMetadata() { + public Map getPaymentRequestMetadata() { return paymentRequestMetadata; } diff --git a/src/main/java/com/gocardless/resources/CreditorBankAccount.java b/src/main/java/com/gocardless/resources/CreditorBankAccount.java index dd207fec..c96a627e 100644 --- a/src/main/java/com/gocardless/resources/CreditorBankAccount.java +++ b/src/main/java/com/gocardless/resources/CreditorBankAccount.java @@ -33,7 +33,7 @@ private CreditorBankAccount() { private Boolean enabled; private String id; private Links links; - private Map metadata; + private Map metadata; /** * Name of the account holder, as known by the bank. Usually this is the same as the name stored @@ -114,7 +114,7 @@ public Links getLinks() { * 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. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } diff --git a/src/main/java/com/gocardless/resources/Customer.java b/src/main/java/com/gocardless/resources/Customer.java index a0f58b4a..1a9d8cc4 100644 --- a/src/main/java/com/gocardless/resources/Customer.java +++ b/src/main/java/com/gocardless/resources/Customer.java @@ -27,7 +27,7 @@ private Customer() { private String givenName; private String id; private String language; - private Map metadata; + private Map metadata; private String phoneNumber; private String postalCode; private String region; @@ -138,7 +138,7 @@ public String getLanguage() { * 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. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } diff --git a/src/main/java/com/gocardless/resources/CustomerBankAccount.java b/src/main/java/com/gocardless/resources/CustomerBankAccount.java index fe5b4ce4..a8c79af8 100644 --- a/src/main/java/com/gocardless/resources/CustomerBankAccount.java +++ b/src/main/java/com/gocardless/resources/CustomerBankAccount.java @@ -34,7 +34,7 @@ private CustomerBankAccount() { private Boolean enabled; private String id; private Links links; - private Map metadata; + private Map metadata; /** * Name of the account holder, as known by the bank. Usually this is the same as the name stored @@ -116,7 +116,7 @@ public Links getLinks() { * 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. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } diff --git a/src/main/java/com/gocardless/resources/Event.java b/src/main/java/com/gocardless/resources/Event.java index 94712c2b..a4f3cf41 100644 --- a/src/main/java/com/gocardless/resources/Event.java +++ b/src/main/java/com/gocardless/resources/Event.java @@ -24,7 +24,7 @@ private Event() { private Details details; private String id; private Links links; - private Map metadata; + private Map metadata; private ResourceType resourceType; /** @@ -70,7 +70,7 @@ public Links getLinks() { * If the `details[origin]` is `api`, this will contain any metadata you specified when * triggering this event. In other cases it will be an empty object. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } diff --git a/src/main/java/com/gocardless/resources/InstalmentSchedule.java b/src/main/java/com/gocardless/resources/InstalmentSchedule.java index feb3e8ac..2a8f0a09 100644 --- a/src/main/java/com/gocardless/resources/InstalmentSchedule.java +++ b/src/main/java/com/gocardless/resources/InstalmentSchedule.java @@ -28,9 +28,9 @@ private InstalmentSchedule() { private Currency currency; private String id; private Links links; - private Map metadata; + private Map metadata; private String name; - private Map paymentErrors; + private Map paymentErrors; private Status status; private Integer totalAmount; @@ -67,7 +67,7 @@ public Links getLinks() { * 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. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } @@ -84,7 +84,7 @@ public String getName() { * from the individual payments, arranged by the index of the payment that failed. * */ - public Map getPaymentErrors() { + public Map getPaymentErrors() { return paymentErrors; } diff --git a/src/main/java/com/gocardless/resources/Mandate.java b/src/main/java/com/gocardless/resources/Mandate.java index 69b81ac0..1f0fad59 100644 --- a/src/main/java/com/gocardless/resources/Mandate.java +++ b/src/main/java/com/gocardless/resources/Mandate.java @@ -22,7 +22,7 @@ private Mandate() { private String createdAt; private String id; private Links links; - private Map metadata; + private Map metadata; private String nextPossibleChargeDate; private Boolean paymentsRequireApproval; private String reference; @@ -74,7 +74,7 @@ public Links getLinks() { * 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. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } diff --git a/src/main/java/com/gocardless/resources/PayerAuthorisation.java b/src/main/java/com/gocardless/resources/PayerAuthorisation.java index f0de2a06..9e0fee45 100644 --- a/src/main/java/com/gocardless/resources/PayerAuthorisation.java +++ b/src/main/java/com/gocardless/resources/PayerAuthorisation.java @@ -162,7 +162,7 @@ private BankAccount() { private String countryCode; private String currency; private String iban; - private Map metadata; + private Map metadata; /** * Name of the account holder, as known by the bank. Usually this is the same as the name @@ -254,7 +254,7 @@ public String getIban() { * 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. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } @@ -287,7 +287,7 @@ private Customer() { private String familyName; private String givenName; private String locale; - private Map metadata; + private Map metadata; private String postalCode; private String region; private String swedishIdentityNumber; @@ -381,7 +381,7 @@ public String getLocale() { * 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. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } @@ -489,7 +489,7 @@ private Mandate() { // blank to prevent instantiation } - private Map metadata; + private Map metadata; private String payerIpAddress; private String reference; private Scheme scheme; @@ -498,7 +498,7 @@ private Mandate() { * 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. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } diff --git a/src/main/java/com/gocardless/resources/Payment.java b/src/main/java/com/gocardless/resources/Payment.java index ecb6cbb1..32eee349 100644 --- a/src/main/java/com/gocardless/resources/Payment.java +++ b/src/main/java/com/gocardless/resources/Payment.java @@ -27,7 +27,7 @@ private Payment() { private Fx fx; private String id; private Links links; - private Map metadata; + private Map metadata; private String reference; private Boolean retryIfPossible; private Status status; @@ -100,7 +100,7 @@ public Links getLinks() { * 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. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } diff --git a/src/main/java/com/gocardless/resources/Payout.java b/src/main/java/com/gocardless/resources/Payout.java index 04349efc..444877dc 100644 --- a/src/main/java/com/gocardless/resources/Payout.java +++ b/src/main/java/com/gocardless/resources/Payout.java @@ -24,7 +24,7 @@ private Payout() { private Fx fx; private String id; private Links links; - private Map metadata; + private Map metadata; private PayoutType payoutType; private String reference; private Status status; @@ -99,7 +99,7 @@ public Links getLinks() { * characters and values up to 500 characters. _Note:_ This should not be used for storing PII * data. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } diff --git a/src/main/java/com/gocardless/resources/RedirectFlow.java b/src/main/java/com/gocardless/resources/RedirectFlow.java index b5830dc3..582ae8e9 100644 --- a/src/main/java/com/gocardless/resources/RedirectFlow.java +++ b/src/main/java/com/gocardless/resources/RedirectFlow.java @@ -53,7 +53,7 @@ private RedirectFlow() { private String id; private Links links; private String mandateReference; - private Map metadata; + private Map metadata; private String redirectUrl; private Scheme scheme; private String sessionToken; @@ -109,7 +109,7 @@ public String getMandateReference() { * characters and values up to 500 characters. _Note:_ This should not be used for storing PII * data. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } diff --git a/src/main/java/com/gocardless/resources/Refund.java b/src/main/java/com/gocardless/resources/Refund.java index ab1f6c02..0b37fc0b 100644 --- a/src/main/java/com/gocardless/resources/Refund.java +++ b/src/main/java/com/gocardless/resources/Refund.java @@ -23,7 +23,7 @@ private Refund() { private Fx fx; private String id; private Links links; - private Map metadata; + private Map metadata; private String reference; private Status status; @@ -68,7 +68,7 @@ public Links getLinks() { * 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. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } diff --git a/src/main/java/com/gocardless/resources/Subscription.java b/src/main/java/com/gocardless/resources/Subscription.java index ffd5c3ec..36d03ea2 100644 --- a/src/main/java/com/gocardless/resources/Subscription.java +++ b/src/main/java/com/gocardless/resources/Subscription.java @@ -59,7 +59,7 @@ private Subscription() { private Integer interval; private IntervalUnit intervalUnit; private Links links; - private Map metadata; + private Map metadata; private Month month; private String name; private String paymentReference; @@ -166,7 +166,7 @@ public Links getLinks() { * 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. */ - public Map getMetadata() { + public Map getMetadata() { return metadata; } diff --git a/src/main/java/com/gocardless/resources/Webhook.java b/src/main/java/com/gocardless/resources/Webhook.java index 73531d26..afd77989 100644 --- a/src/main/java/com/gocardless/resources/Webhook.java +++ b/src/main/java/com/gocardless/resources/Webhook.java @@ -16,11 +16,11 @@ private Webhook() { private String id; private Boolean isTest; private String requestBody; - private Map requestHeaders; + private Map requestHeaders; private String responseBody; private Boolean responseBodyTruncated; private Integer responseCode; - private Map responseHeaders; + private Map responseHeaders; private Boolean responseHeadersContentTruncated; private Boolean responseHeadersCountTruncated; private Boolean successful; @@ -57,7 +57,7 @@ public String getRequestBody() { /** * The request headers sent with the webhook */ - public Map getRequestHeaders() { + public Map getRequestHeaders() { return requestHeaders; } @@ -85,7 +85,7 @@ public Integer getResponseCode() { /** * The headers sent with the response from the webhook URL */ - public Map getResponseHeaders() { + public Map getResponseHeaders() { return responseHeaders; } From 4d40f434ff414b54493ca1ae6f7895d448085313 Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 20 Jun 2023 17:03:57 +0000 Subject: [PATCH 44/85] Changes generated by f1007f9b6a1c0288e5583f136866eea0937765bc --- src/main/java/com/gocardless/resources/RedirectFlow.java | 3 +-- src/main/java/com/gocardless/services/RedirectFlowService.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gocardless/resources/RedirectFlow.java b/src/main/java/com/gocardless/resources/RedirectFlow.java index 582ae8e9..0f04341f 100644 --- a/src/main/java/com/gocardless/resources/RedirectFlow.java +++ b/src/main/java/com/gocardless/resources/RedirectFlow.java @@ -9,8 +9,7 @@ *

* Deprecated: Redirect Flows are our legacy APIs for setting up mandates and will * no longer be supported in the future. We strongly recommend using the [Billing Request - * flow](#billing-requests) instead. From June 13th 2023, we will no longer allow new - * merchants to create Redirect Flows. + * flow](#billing-requests) instead. *

* * Redirect flows enable you to use GoCardless' [hosted payment diff --git a/src/main/java/com/gocardless/services/RedirectFlowService.java b/src/main/java/com/gocardless/services/RedirectFlowService.java index d4201d06..fa171959 100644 --- a/src/main/java/com/gocardless/services/RedirectFlowService.java +++ b/src/main/java/com/gocardless/services/RedirectFlowService.java @@ -13,8 +13,7 @@ *

* Deprecated: Redirect Flows are our legacy APIs for setting up mandates and will * no longer be supported in the future. We strongly recommend using the [Billing Request - * flow](#billing-requests) instead. From June 13th 2023, we will no longer allow new - * merchants to create Redirect Flows. + * flow](#billing-requests) instead. *

* * Redirect flows enable you to use GoCardless' [hosted payment From 2d2b5f64e92fb89c68402b8a2e27bacc64e111e1 Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 21 Jun 2023 09:42:15 +0000 Subject: [PATCH 45/85] Changes generated by 42e8810195bfb5898a0f83a1ab59f6cbf906b2b4 --- src/main/java/com/gocardless/resources/Event.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gocardless/resources/Event.java b/src/main/java/com/gocardless/resources/Event.java index a4f3cf41..bdf9d947 100644 --- a/src/main/java/com/gocardless/resources/Event.java +++ b/src/main/java/com/gocardless/resources/Event.java @@ -67,8 +67,10 @@ public Links getLinks() { } /** - * If the `details[origin]` is `api`, this will contain any metadata you specified when - * triggering this event. In other cases it will be an empty object. + * The metadata that was passed when making the API request that triggered the event (for + * instance, cancelling a mandate). Note that this field will be an empty object, unless the + * event's `details[origin]` is `api`. + * */ public Map getMetadata() { return metadata; From bdd7aa505adc979008189067525af0b970f9a599 Mon Sep 17 00:00:00 2001 From: Robot Date: Fri, 23 Jun 2023 13:48:06 +0000 Subject: [PATCH 46/85] Changes generated by 15a9b2d76f7194efabfda206e56e24aeade93f8e --- .../java/com/gocardless/resources/Event.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gocardless/resources/Event.java b/src/main/java/com/gocardless/resources/Event.java index bdf9d947..8b409285 100644 --- a/src/main/java/com/gocardless/resources/Event.java +++ b/src/main/java/com/gocardless/resources/Event.java @@ -25,6 +25,7 @@ private Event() { private String id; private Links links; private Map metadata; + private Map resourceMetadata; private ResourceType resourceType; /** @@ -68,14 +69,28 @@ public Links getLinks() { /** * The metadata that was passed when making the API request that triggered the event (for - * instance, cancelling a mandate). Note that this field will be an empty object, unless the - * event's `details[origin]` is `api`. + * instance, cancelling a mandate). + * + * This field will only be populated if the `details[origin]` field is `api` otherwise it will + * be an empty object. * */ public Map getMetadata() { return metadata; } + /** + * The metadata that was passed when making the API request that triggered the event (for + * instance, cancelling a mandate). + * + * This field will only be populated if the `details[origin]` field is `api` otherwise it will + * be an empty object. + * + */ + public Map getResourceMetadata() { + return resourceMetadata; + } + /** * The resource type for this event. One of: *
    From b34aace2a13722817e3094778335f02b5b187129 Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 29 Jun 2023 10:30:42 +0000 Subject: [PATCH 47/85] Changes generated by adc3a2e3d196d96d04c74134067652d537714c63 --- src/main/java/com/gocardless/resources/Event.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gocardless/resources/Event.java b/src/main/java/com/gocardless/resources/Event.java index 8b409285..8e48d911 100644 --- a/src/main/java/com/gocardless/resources/Event.java +++ b/src/main/java/com/gocardless/resources/Event.java @@ -80,11 +80,9 @@ public Map getMetadata() { } /** - * The metadata that was passed when making the API request that triggered the event (for - * instance, cancelling a mandate). - * - * This field will only be populated if the `details[origin]` field is `api` otherwise it will - * be an empty object. + * The metadata of the resource that the event is for. For example, this field will have the + * same value of the `mandate[metadata]` field on the response you would receive from performing + * a GET request on a mandate. * */ public Map getResourceMetadata() { From 4a2077d2d47f089894d106401a3fdb22ceed0991 Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 26 Jul 2023 14:13:37 +0000 Subject: [PATCH 48/85] Changes generated by 4cec8d952142b97a8142efb9ead3dceb6be5e23a --- src/main/java/com/gocardless/resources/PayoutItem.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gocardless/resources/PayoutItem.java b/src/main/java/com/gocardless/resources/PayoutItem.java index 65ac36f7..5aa875d8 100644 --- a/src/main/java/com/gocardless/resources/PayoutItem.java +++ b/src/main/java/com/gocardless/resources/PayoutItem.java @@ -98,7 +98,8 @@ public enum Type { GOCARDLESS_FEE, @SerializedName("app_fee") APP_FEE, @SerializedName("revenue_share") REVENUE_SHARE, @SerializedName("surcharge_fee") - SURCHARGE_FEE, @SerializedName("unknown") + SURCHARGE_FEE, @SerializedName("refund_funds_returned") + REFUND_FUNDS_RETURNED, @SerializedName("unknown") UNKNOWN } From 8c0de50e9dbe834f1c32c7bcdffd17ca475b272a Mon Sep 17 00:00:00 2001 From: Robot Date: Fri, 28 Jul 2023 15:32:10 +0000 Subject: [PATCH 49/85] Changes generated by 6acda3b13c006b5ff743dd48437debcda860c41d --- .../com/gocardless/resources/Mandate.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/main/java/com/gocardless/resources/Mandate.java b/src/main/java/com/gocardless/resources/Mandate.java index 1f0fad59..45797b5d 100644 --- a/src/main/java/com/gocardless/resources/Mandate.java +++ b/src/main/java/com/gocardless/resources/Mandate.java @@ -20,6 +20,7 @@ private Mandate() { private AuthorisationSource authorisationSource; private ConsentParameters consentParameters; private String createdAt; + private FundsSettlement fundsSettlement; private String id; private Links links; private Map metadata; @@ -58,6 +59,18 @@ public String getCreatedAt() { return createdAt; } + /** + * This field will decide how GoCardless handles settlement of funds from the customer. + * + * - `managed` will be moved through GoCardless' account, batched, and payed out. - `direct` + * will be a direct transfer from the payer's account to the merchant where invoicing will be + * handled separately. + * + */ + public FundsSettlement getFundsSettlement() { + return fundsSettlement; + } + /** * Unique identifier, beginning with "MD". Note that this prefix may not apply to mandates * created before 2016. @@ -149,6 +162,13 @@ public enum AuthorisationSource { UNKNOWN } + public enum FundsSettlement { + @SerializedName("managed") + MANAGED, @SerializedName("direct") + DIRECT, @SerializedName("unknown") + UNKNOWN + } + public enum Status { @SerializedName("pending_customer_approval") PENDING_CUSTOMER_APPROVAL, @SerializedName("pending_submission") From c21eb0e99d974ae9c7fc76c52de80cc9bcf48101 Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 7 Aug 2023 14:55:56 +0000 Subject: [PATCH 50/85] Changes generated by 42e03286f1e756c5accf30e3dd6108d35b69eb98 --- 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 b9f1971c..bc2b198b 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 5.18.1 + 5.18.2 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:5.18.1' +implementation 'com.gocardless:gocardless-pro:5.18.2' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index 579f1833..ecbacbf6 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '5.18.1' +version = '5.18.2' 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 0bff84d4..01592e4b 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/5.18.1 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/5.18.2 java/%s %s/%s %s/%s", cleanUserAgentToken(System.getProperty("java.vm.specification.version")), cleanUserAgentToken(System.getProperty("java.vm.name")), cleanUserAgentToken(System.getProperty("java.version")), @@ -48,7 +48,7 @@ public class HttpClient { ImmutableMap.Builder builder = ImmutableMap.builder(); builder.put("GoCardless-Version", "2015-07-06"); builder.put("GoCardless-Client-Library", "gocardless-pro-java"); - builder.put("GoCardless-Client-Version", "5.18.1"); + builder.put("GoCardless-Client-Version", "5.18.2"); HEADERS = builder.build(); } private final OkHttpClient rawClient; From c6bb7c00665d043ee347026235182c94f1ca1e0a Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 26 Jul 2023 14:13:37 +0000 Subject: [PATCH 51/85] Changes generated by 4cec8d952142b97a8142efb9ead3dceb6be5e23a --- src/main/java/com/gocardless/resources/PayoutItem.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gocardless/resources/PayoutItem.java b/src/main/java/com/gocardless/resources/PayoutItem.java index 65ac36f7..5aa875d8 100644 --- a/src/main/java/com/gocardless/resources/PayoutItem.java +++ b/src/main/java/com/gocardless/resources/PayoutItem.java @@ -98,7 +98,8 @@ public enum Type { GOCARDLESS_FEE, @SerializedName("app_fee") APP_FEE, @SerializedName("revenue_share") REVENUE_SHARE, @SerializedName("surcharge_fee") - SURCHARGE_FEE, @SerializedName("unknown") + SURCHARGE_FEE, @SerializedName("refund_funds_returned") + REFUND_FUNDS_RETURNED, @SerializedName("unknown") UNKNOWN } From 140bc320b924bf5e8500a7c9226d2fbffd14773a Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 7 Aug 2023 14:55:56 +0000 Subject: [PATCH 52/85] Changes generated by 42e03286f1e756c5accf30e3dd6108d35b69eb98 --- 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 b9f1971c..bc2b198b 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 5.18.1 + 5.18.2 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:5.18.1' +implementation 'com.gocardless:gocardless-pro:5.18.2' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index 579f1833..ecbacbf6 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '5.18.1' +version = '5.18.2' 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 0bff84d4..01592e4b 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/5.18.1 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/5.18.2 java/%s %s/%s %s/%s", cleanUserAgentToken(System.getProperty("java.vm.specification.version")), cleanUserAgentToken(System.getProperty("java.vm.name")), cleanUserAgentToken(System.getProperty("java.version")), @@ -48,7 +48,7 @@ public class HttpClient { ImmutableMap.Builder builder = ImmutableMap.builder(); builder.put("GoCardless-Version", "2015-07-06"); builder.put("GoCardless-Client-Library", "gocardless-pro-java"); - builder.put("GoCardless-Client-Version", "5.18.1"); + builder.put("GoCardless-Client-Version", "5.18.2"); HEADERS = builder.build(); } private final OkHttpClient rawClient; From 38a1807e581635b8a767ba61c170578dfd83c845 Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 8 Aug 2023 11:47:43 +0000 Subject: [PATCH 53/85] Changes generated by 8b0425eda7ec818e41b821d911605168e5c0d08d --- src/main/java/com/gocardless/resources/ScenarioSimulator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gocardless/resources/ScenarioSimulator.java b/src/main/java/com/gocardless/resources/ScenarioSimulator.java index 878d9273..f9025be8 100644 --- a/src/main/java/com/gocardless/resources/ScenarioSimulator.java +++ b/src/main/java/com/gocardless/resources/ScenarioSimulator.java @@ -86,7 +86,7 @@ private ScenarioSimulator() { *
  • `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 - * `pending_submission` state. Only compatible with Bacs, SEPA and Autogiro mandates.
  • + * `pending_submission` state. Only compatible with Bacs mandates. *
  • `mandate_suspended_by_payer`: Transitions a mandate to `suspended_by_payer`, as if payer * has suspended the mandate after it has been setup successfully. It must start in the * `activated` state. Only compatible with PAY_TO mandates.
  • From 93ecacc31fd388c826495ad915e362f40bb2635b Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 9 Aug 2023 10:27:10 +0000 Subject: [PATCH 54/85] Changes generated by 78b0f2482495063c1fc85a6056b5c9c9b40ccfb1 --- .../gocardless/resources/BillingRequest.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index f28c5d26..f820d209 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -155,6 +155,7 @@ private Action() { private BankAuthorisation bankAuthorisation; private CollectCustomerDetails collectCustomerDetails; private List completesActions; + private InstitutionGuessStatus institutionGuessStatus; private Boolean required; private List requiresActions; private Status status; @@ -188,6 +189,24 @@ public List getCompletesActions() { return completesActions; } + /** + * Describes whether we inferred the institution from the provided bank account details. + * + *
      + *
    • `not_needed`: we won't attempt to infer the institution as it is not needed. Either + * because it was manually selected or the billing request does not support this + * feature
    • + *
    • `pending`: we are waiting on the bank details in order to infer the institution
    • + *
    • `failed`: we weren't able to infer the institution
    • + *
    • `success`: we inferred the institution and added it to the resources of a Billing + * Request
    • + *
    + * + */ + public InstitutionGuessStatus getInstitutionGuessStatus() { + return institutionGuessStatus; + } + /** * Informs you whether the action is required to fulfil the billing request or not. */ @@ -216,6 +235,15 @@ public Type getType() { return type; } + public enum InstitutionGuessStatus { + @SerializedName("not_needed") + NOT_NEEDED, @SerializedName("pending") + PENDING, @SerializedName("failed") + FAILED, @SerializedName("success") + SUCCESS, @SerializedName("unknown") + UNKNOWN + } + public enum Status { @SerializedName("pending") PENDING, @SerializedName("completed") From fcf7449c0737b030c6e1cb7234c0ef9b89d5b73b Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 15 Aug 2023 13:43:42 +0000 Subject: [PATCH 55/85] Changes generated by 927e939e3b6969a99ca8c6985c5e2f33d731dedc --- src/main/java/com/gocardless/resources/RedirectFlow.java | 6 +++--- .../java/com/gocardless/services/RedirectFlowService.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/gocardless/resources/RedirectFlow.java b/src/main/java/com/gocardless/resources/RedirectFlow.java index 0f04341f..b65b7fe3 100644 --- a/src/main/java/com/gocardless/resources/RedirectFlow.java +++ b/src/main/java/com/gocardless/resources/RedirectFlow.java @@ -7,9 +7,9 @@ * Represents a redirect flow resource returned from the API. * *

    - * Deprecated: Redirect Flows are our legacy APIs for setting up mandates and will - * no longer be supported in the future. We strongly recommend using the [Billing Request - * flow](#billing-requests) instead. + * Deprecated: Redirect Flows are legacy APIs and cannot be used by new + * integrators. The [Billing Request flow](#billing-requests) API should be used for your payment + * flows. *

    * * Redirect flows enable you to use GoCardless' [hosted payment diff --git a/src/main/java/com/gocardless/services/RedirectFlowService.java b/src/main/java/com/gocardless/services/RedirectFlowService.java index fa171959..843b90ba 100644 --- a/src/main/java/com/gocardless/services/RedirectFlowService.java +++ b/src/main/java/com/gocardless/services/RedirectFlowService.java @@ -11,9 +11,9 @@ * Service class for working with redirect flow resources. * *

    - * Deprecated: Redirect Flows are our legacy APIs for setting up mandates and will - * no longer be supported in the future. We strongly recommend using the [Billing Request - * flow](#billing-requests) instead. + * Deprecated: Redirect Flows are legacy APIs and cannot be used by new + * integrators. The [Billing Request flow](#billing-requests) API should be used for your payment + * flows. *

    * * Redirect flows enable you to use GoCardless' [hosted payment From ef5b64e6c5278710e4d227d85c50d1dc3fa67464 Mon Sep 17 00:00:00 2001 From: Robot Date: Fri, 1 Sep 2023 09:37:21 +0000 Subject: [PATCH 56/85] Changes generated by 1cc728003d8d4d6c5b777efac2311d6f536036fe --- .../com/gocardless/services/CreditorBankAccountService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gocardless/services/CreditorBankAccountService.java b/src/main/java/com/gocardless/services/CreditorBankAccountService.java index 0e0667bd..17b23d32 100644 --- a/src/main/java/com/gocardless/services/CreditorBankAccountService.java +++ b/src/main/java/com/gocardless/services/CreditorBankAccountService.java @@ -373,7 +373,8 @@ public CreditorBankAccountListRequest withCreditor(String creditor) { } /** - * Boolean value showing whether the bank account is enabled or disabled + * If `true`, only return enabled bank accounts. If `false`, only return disabled bank + * accounts. */ public CreditorBankAccountListRequest withEnabled(Boolean enabled) { this.enabled = enabled; From 04d62935d26327792153970c530b961e16251533 Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 4 Sep 2023 12:40:23 +0000 Subject: [PATCH 57/85] Changes generated by b5f76c7362aa5a5418ba87139a7b51d752d0d8be --- .../gocardless/resources/BillingRequest.java | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index f820d209..e0d47ec5 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -190,17 +190,12 @@ public List getCompletesActions() { } /** - * Describes whether we inferred the institution from the provided bank account details. - * - *
      - *
    • `not_needed`: we won't attempt to infer the institution as it is not needed. Either - * because it was manually selected or the billing request does not support this - * feature
    • - *
    • `pending`: we are waiting on the bank details in order to infer the institution
    • - *
    • `failed`: we weren't able to infer the institution
    • - *
    • `success`: we inferred the institution and added it to the resources of a Billing - * Request
    • - *
    + * Describes whether we inferred the institution from the provided bank account details. One + * of: - `not_needed`: we won't attempt to infer the institution as it is not needed. Either + * because it was manually selected or the billing request does not support this feature - + * `pending`: we are waiting on the bank details in order to infer the institution - + * `failed`: we weren't able to infer the institution - `success`: we inferred the + * institution and added it to the resources of a Billing Request * */ public InstitutionGuessStatus getInstitutionGuessStatus() { From 6eaa28dd3cae7475dd92acdc77dcead3477a4822 Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 7 Sep 2023 13:34:22 +0000 Subject: [PATCH 58/85] Changes generated by 8672ad52ee9a8be01d1edeb9017667cb829ba82d --- .../gocardless/resources/MandateImport.java | 28 ++++++++++++++++ .../services/MandateImportService.java | 33 +++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/src/main/java/com/gocardless/resources/MandateImport.java b/src/main/java/com/gocardless/resources/MandateImport.java index 170f48d8..24a90a3d 100644 --- a/src/main/java/com/gocardless/resources/MandateImport.java +++ b/src/main/java/com/gocardless/resources/MandateImport.java @@ -43,6 +43,7 @@ private MandateImport() { private String createdAt; private String id; + private Links links; private Scheme scheme; private Status status; @@ -60,6 +61,13 @@ public String getId() { return id; } + /** + * Related resources + */ + public Links getLinks() { + return links; + } + /** * The scheme of the mandates to be imported.
    * All mandates in a single mandate import must be for the same scheme. @@ -109,4 +117,24 @@ public enum Status { PROCESSED, @SerializedName("unknown") UNKNOWN } + + /** + * Represents a link resource returned from the API. + * + * Related resources + */ + public static class Links { + private Links() { + // blank to prevent instantiation + } + + private String creditor; + + /** + * ID of the associated creditor. + */ + public String getCreditor() { + return creditor; + } + } } diff --git a/src/main/java/com/gocardless/services/MandateImportService.java b/src/main/java/com/gocardless/services/MandateImportService.java index 29b2d27a..1e3abb82 100644 --- a/src/main/java/com/gocardless/services/MandateImportService.java +++ b/src/main/java/com/gocardless/services/MandateImportService.java @@ -97,8 +97,28 @@ public MandateImportCancelRequest cancel(String identity) { */ public static final class MandateImportCreateRequest extends IdempotentPostRequest { + private Links links; private Scheme scheme; + /** + * Related resources + */ + public MandateImportCreateRequest withLinks(Links links) { + this.links = links; + return this; + } + + /** + * ID of the associated creditor. Only required if your account manages multiple creditors. + */ + public MandateImportCreateRequest withLinksCreditor(String creditor) { + if (links == null) { + links = new Links(); + } + links.withCreditor(creditor); + return this; + } + /** * A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", "becs_nz", * "betalingsservice", "faster_payments", "pad", "pay_to" and "sepa_core" are supported. @@ -170,6 +190,19 @@ public String toString() { return name().toLowerCase(); } } + + public static class Links { + private String creditor; + + /** + * ID of the associated creditor. Only required if your account manages multiple + * creditors. + */ + public Links withCreditor(String creditor) { + this.creditor = creditor; + return this; + } + } } /** From fd384b29b54b5ba19eaf6ae3938e16886c19daf0 Mon Sep 17 00:00:00 2001 From: Robot Date: Fri, 20 Oct 2023 12:07:21 +0000 Subject: [PATCH 59/85] Changes generated by e0a06668eece9df617c447975095c3f4c01871da --- .../java/com/gocardless/resources/BillingRequest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index e0d47ec5..04e192e0 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -380,6 +380,7 @@ private Links() { private String mandateRequest; private String mandateRequestMandate; private String organisation; + private String paymentProvider; private String paymentRequest; private String paymentRequestPayment; @@ -442,6 +443,13 @@ public String getOrganisation() { return organisation; } + /** + * (Optional) ID of the associated payment provider + */ + public String getPaymentProvider() { + return paymentProvider; + } + /** * (Optional) ID of the associated payment request */ From c90458e716a5bd1b97bf824df58bafb039719078 Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 26 Oct 2023 11:18:34 +0000 Subject: [PATCH 60/85] Changes generated by 1b2e94827900d7424d38a26d63d7a348206b5a1b --- .../resources/CreditorBankAccount.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/main/java/com/gocardless/resources/CreditorBankAccount.java b/src/main/java/com/gocardless/resources/CreditorBankAccount.java index c96a627e..1a177a96 100644 --- a/src/main/java/com/gocardless/resources/CreditorBankAccount.java +++ b/src/main/java/com/gocardless/resources/CreditorBankAccount.java @@ -34,6 +34,7 @@ private CreditorBankAccount() { private String id; private Links links; private Map metadata; + private VerificationStatus verificationStatus; /** * Name of the account holder, as known by the bank. Usually this is the same as the name stored @@ -118,6 +119,13 @@ public Map getMetadata() { return metadata; } + /** + * Verification status of the Bank Account. Can be one of `pending`, `in_review` or `successful` + */ + public VerificationStatus getVerificationStatus() { + return verificationStatus; + } + public enum AccountType { @SerializedName("savings") SAVINGS, @SerializedName("checking") @@ -125,6 +133,15 @@ public enum AccountType { UNKNOWN } + public enum VerificationStatus { + @SerializedName("pending") + PENDING, @SerializedName("in_review") + IN_REVIEW, @SerializedName("successful") + SUCCESSFUL, @SerializedName("could_not_verify") + COULD_NOT_VERIFY, @SerializedName("unknown") + UNKNOWN + } + public static class Links { private Links() { // blank to prevent instantiation From 2d27fb39ee11ccabeb2324621a080c86c0d04e48 Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 26 Oct 2023 12:19:10 +0000 Subject: [PATCH 61/85] Changes generated by 95d252802ddec68d6dcdca86cc78f3e9c6428507 --- 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 bc2b198b..4dbf10c6 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 5.18.2 + 5.19.0 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:5.18.2' +implementation 'com.gocardless:gocardless-pro:5.19.0' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index ecbacbf6..f9a7008b 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '5.18.2' +version = '5.19.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 01592e4b..d64cbedb 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/5.18.2 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/5.19.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")), @@ -48,7 +48,7 @@ public class HttpClient { ImmutableMap.Builder builder = ImmutableMap.builder(); builder.put("GoCardless-Version", "2015-07-06"); builder.put("GoCardless-Client-Library", "gocardless-pro-java"); - builder.put("GoCardless-Client-Version", "5.18.2"); + builder.put("GoCardless-Client-Version", "5.19.0"); HEADERS = builder.build(); } private final OkHttpClient rawClient; From 239692b44dba227b0c0abf300134f03277106e5e Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 31 Oct 2023 15:39:04 +0000 Subject: [PATCH 62/85] Changes generated by 2ced13a19b34def73b63d9f6737ab74cb30f8b38 --- .../gocardless/resources/BillingRequestTemplate.java | 11 ++++++++++- .../services/BillingRequestTemplateService.java | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gocardless/resources/BillingRequestTemplate.java b/src/main/java/com/gocardless/resources/BillingRequestTemplate.java index 9154c243..3dce4bda 100644 --- a/src/main/java/com/gocardless/resources/BillingRequestTemplate.java +++ b/src/main/java/com/gocardless/resources/BillingRequestTemplate.java @@ -6,7 +6,16 @@ /** * Represents a billing request template resource returned from the API. * - * Billing Request Templates + * Billing Request Templates are reusable templates that result in numerous Billing Requests with + * similar attributes. They provide a no-code solution for generating various types of multi-user + * payment links. + * + * Each template includes a reusable URL that can be embedded in a website or shared with customers + * via email. Every time the URL is opened, it generates a new Billing Request. + * + * Billing Request Templates overcome the key limitation of the Billing Request: a Billing Request + * cannot be shared among multiple users because it is intended for single-use and is designed to + * cater to the unique needs of individual customers. */ public class BillingRequestTemplate { private BillingRequestTemplate() { diff --git a/src/main/java/com/gocardless/services/BillingRequestTemplateService.java b/src/main/java/com/gocardless/services/BillingRequestTemplateService.java index c222a31e..73668184 100644 --- a/src/main/java/com/gocardless/services/BillingRequestTemplateService.java +++ b/src/main/java/com/gocardless/services/BillingRequestTemplateService.java @@ -12,7 +12,16 @@ /** * Service class for working with billing request template resources. * - * Billing Request Templates + * Billing Request Templates are reusable templates that result in numerous Billing Requests with + * similar attributes. They provide a no-code solution for generating various types of multi-user + * payment links. + * + * Each template includes a reusable URL that can be embedded in a website or shared with customers + * via email. Every time the URL is opened, it generates a new Billing Request. + * + * Billing Request Templates overcome the key limitation of the Billing Request: a Billing Request + * cannot be shared among multiple users because it is intended for single-use and is designed to + * cater to the unique needs of individual customers. */ public class BillingRequestTemplateService { private final HttpClient httpClient; From e6c797868c91225e10cb9f5effdc67fb33408ae5 Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 8 Nov 2023 16:46:12 +0000 Subject: [PATCH 63/85] Changes generated by 42fa25ece505b60fce4d92f40b29f4101232543a --- .../com/gocardless/resources/BillingRequestFlow.java | 8 ++++++++ .../gocardless/services/BillingRequestFlowService.java | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/main/java/com/gocardless/resources/BillingRequestFlow.java b/src/main/java/com/gocardless/resources/BillingRequestFlow.java index ca260594..fea439d3 100644 --- a/src/main/java/com/gocardless/resources/BillingRequestFlow.java +++ b/src/main/java/com/gocardless/resources/BillingRequestFlow.java @@ -16,6 +16,7 @@ private BillingRequestFlow() { private String authorisationUrl; private Boolean autoFulfil; private String createdAt; + private Boolean customerDetailsCaptured; private String exitUri; private String expiresAt; private String id; @@ -53,6 +54,13 @@ public String getCreatedAt() { return createdAt; } + /** + * Identifies whether a Billing Request belongs to a specific customer + */ + public Boolean getCustomerDetailsCaptured() { + return customerDetailsCaptured; + } + /** * URL that the payer can be taken to if there isn't a way to progress ahead in flow. */ diff --git a/src/main/java/com/gocardless/services/BillingRequestFlowService.java b/src/main/java/com/gocardless/services/BillingRequestFlowService.java index b1e13c8c..399d234c 100644 --- a/src/main/java/com/gocardless/services/BillingRequestFlowService.java +++ b/src/main/java/com/gocardless/services/BillingRequestFlowService.java @@ -47,6 +47,7 @@ public BillingRequestFlowInitialiseRequest initialise(String identity) { public static final class BillingRequestFlowCreateRequest extends PostRequest { private Boolean autoFulfil; + private Boolean customerDetailsCaptured; private String exitUri; private String language; private Links links; @@ -68,6 +69,15 @@ public BillingRequestFlowCreateRequest withAutoFulfil(Boolean autoFulfil) { return this; } + /** + * Identifies whether a Billing Request belongs to a specific customer + */ + public BillingRequestFlowCreateRequest withCustomerDetailsCaptured( + Boolean customerDetailsCaptured) { + this.customerDetailsCaptured = customerDetailsCaptured; + return this; + } + /** * URL that the payer can be taken to if there isn't a way to progress ahead in flow. */ From d77d4e6e68178a3b36f05188cc7074f76a5617cd Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 13 Nov 2023 13:45:22 +0000 Subject: [PATCH 64/85] Changes generated by d1865593ac7dd86392ab8eae3a768e64b2202c09 --- .../services/BillingRequestService.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/com/gocardless/services/BillingRequestService.java b/src/main/java/com/gocardless/services/BillingRequestService.java index c77a7a92..f2ce2383 100644 --- a/src/main/java/com/gocardless/services/BillingRequestService.java +++ b/src/main/java/com/gocardless/services/BillingRequestService.java @@ -59,6 +59,9 @@ public BillingRequestCollectCustomerDetailsRequest collectCustomerDetails(String * The endpoint takes the same payload as Customer Bank Accounts, but check the bank account is * valid for the billing request scheme before creating and attaching it. * + * If the scheme is PayTo and the pay_id is available, this can be included in the payload along + * with the country_code. + * * _ACH scheme_ For compliance reasons, an extra validation step is done using a third-party * provider to make sure the customer's bank account can accept Direct Debit. If a bank account * is discovered to be closed or invalid, the customer is requested to adjust the account @@ -1424,6 +1427,9 @@ public CustomerBillingDetail withSwedishIdentityNumber(String swedishIdentityNum * The endpoint takes the same payload as Customer Bank Accounts, but check the bank account is * valid for the billing request scheme before creating and attaching it. * + * If the scheme is PayTo and the pay_id is available, this can be included in the payload along + * with the country_code. + * * _ACH scheme_ For compliance reasons, an extra validation step is done using a third-party * provider to make sure the customer's bank account can accept Direct Debit. If a bank account * is discovered to be closed or invalid, the customer is requested to adjust the account @@ -1443,6 +1449,7 @@ public static final class BillingRequestCollectBankAccountRequest private String currency; private String iban; private Map metadata; + private String payId; /** * Name of the account holder, as known by the bank. Usually this is the same as the name @@ -1554,6 +1561,15 @@ public BillingRequestCollectBankAccountRequest withMetadata(String key, String v return this; } + /** + * A unique record such as an email address, mobile number or company number, that can be + * used to make and accept payments. + */ + public BillingRequestCollectBankAccountRequest withPayId(String payId) { + this.payId = payId; + return this; + } + private BillingRequestCollectBankAccountRequest(HttpClient httpClient, String identity) { super(httpClient); this.identity = identity; From 665c2a250b17d14209b0b007256b1c5cf0199fec Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 13 Nov 2023 14:29:35 +0000 Subject: [PATCH 65/85] Changes generated by 95724eae3b384fa45bfc872fec9666ae2320a6ff --- 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 4dbf10c6..a764808a 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 5.19.0 + 5.20.0 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:5.19.0' +implementation 'com.gocardless:gocardless-pro:5.20.0' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index f9a7008b..665ba4c6 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '5.19.0' +version = '5.20.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 d64cbedb..061859b5 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/5.19.0 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/5.20.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")), @@ -48,7 +48,7 @@ public class HttpClient { ImmutableMap.Builder builder = ImmutableMap.builder(); builder.put("GoCardless-Version", "2015-07-06"); builder.put("GoCardless-Client-Library", "gocardless-pro-java"); - builder.put("GoCardless-Client-Version", "5.19.0"); + builder.put("GoCardless-Client-Version", "5.20.0"); HEADERS = builder.build(); } private final OkHttpClient rawClient; From b7e4ae9097a0ed792862bfc955b9b7663dd6d72c Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 21 Nov 2023 15:36:48 +0000 Subject: [PATCH 66/85] Changes generated by f848a410f88609007f2b8b7ab9f4d6cf75fadf23 --- .../java/com/gocardless/GoCardlessClient.java | 9 ++ .../resources/TransferredMandate.java | 65 +++++++++++ .../services/TransferredMandateService.java | 110 ++++++++++++++++++ 3 files changed, 184 insertions(+) create mode 100644 src/main/java/com/gocardless/resources/TransferredMandate.java create mode 100644 src/main/java/com/gocardless/services/TransferredMandateService.java diff --git a/src/main/java/com/gocardless/GoCardlessClient.java b/src/main/java/com/gocardless/GoCardlessClient.java index 0759953c..1efa4679 100644 --- a/src/main/java/com/gocardless/GoCardlessClient.java +++ b/src/main/java/com/gocardless/GoCardlessClient.java @@ -44,6 +44,7 @@ public class GoCardlessClient { private final SchemeIdentifierService schemeIdentifiers; private final SubscriptionService subscriptions; private final TaxRateService taxRates; + private final TransferredMandateService transferredMandates; private final VerificationDetailService verificationDetails; private final WebhookService webhooks; @@ -197,6 +198,7 @@ private GoCardlessClient(HttpClient httpClient) { this.schemeIdentifiers = new SchemeIdentifierService(httpClient); this.subscriptions = new SubscriptionService(httpClient); this.taxRates = new TaxRateService(httpClient); + this.transferredMandates = new TransferredMandateService(httpClient); this.verificationDetails = new VerificationDetailService(httpClient); this.webhooks = new WebhookService(httpClient); } @@ -411,6 +413,13 @@ public TaxRateService taxRates() { return taxRates; } + /** + * A service class for working with transferred mandate resources. + */ + public TransferredMandateService transferredMandates() { + return transferredMandates; + } + /** * A service class for working with verification detail resources. */ diff --git a/src/main/java/com/gocardless/resources/TransferredMandate.java b/src/main/java/com/gocardless/resources/TransferredMandate.java new file mode 100644 index 00000000..5344d9da --- /dev/null +++ b/src/main/java/com/gocardless/resources/TransferredMandate.java @@ -0,0 +1,65 @@ +package com.gocardless.resources; + +/** + * Represents a transferred mandate resource returned from the API. + * + * Mandates that have been transferred using Current Account Switch Service + */ +public class TransferredMandate { + private TransferredMandate() { + // blank to prevent instantiation + } + + private String encryptedData; + private String key; + private String kid; + private Links links; + + /** + * Encrypted bank account details + */ + public String getEncryptedData() { + return encryptedData; + } + + /** + * Encrypted AES key + */ + public String getKey() { + return key; + } + + /** + * Public key id used to encrypt AES key + */ + public String getKid() { + return kid; + } + + public Links getLinks() { + return links; + } + + public static class Links { + private Links() { + // blank to prevent instantiation + } + + private String customerBankAccount; + private String mandate; + + /** + * The ID of the updated [customer_bank_account](#core-endpoints-customer-bank-accounts) + */ + public String getCustomerBankAccount() { + return customerBankAccount; + } + + /** + * The ID of the transferred mandate + */ + public String getMandate() { + return mandate; + } + } +} diff --git a/src/main/java/com/gocardless/services/TransferredMandateService.java b/src/main/java/com/gocardless/services/TransferredMandateService.java new file mode 100644 index 00000000..bb65ae3c --- /dev/null +++ b/src/main/java/com/gocardless/services/TransferredMandateService.java @@ -0,0 +1,110 @@ +package com.gocardless.services; + +import com.gocardless.http.*; +import com.gocardless.resources.TransferredMandate; +import com.google.common.collect.ImmutableMap; +import java.util.HashMap; +import java.util.Map; + +/** + * Service class for working with transferred mandate resources. + * + * Mandates that have been transferred using Current Account Switch Service + */ +public class TransferredMandateService { + private final HttpClient httpClient; + + /** + * Constructor. Users of this library should have no need to call this - an instance of this + * class can be obtained by calling + * {@link com.gocardless.GoCardlessClient#transferredMandates() }. + */ + public TransferredMandateService(HttpClient httpClient) { + this.httpClient = httpClient; + } + + /** + * Returns encrypted bank details for the transferred mandate + */ + public TransferredMandateTransferredMandatesRequest transferredMandates(String identity) { + return new TransferredMandateTransferredMandatesRequest(httpClient, identity); + } + + /** + * Request class for {@link TransferredMandateService#transferredMandates }. + * + * Returns encrypted bank details for the transferred mandate + */ + public static final class TransferredMandateTransferredMandatesRequest + extends GetRequest { + @PathParam + private final String identity; + private Map metadata; + + /** + * 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. + */ + public TransferredMandateTransferredMandatesRequest withMetadata( + Map metadata) { + this.metadata = metadata; + 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. + */ + public TransferredMandateTransferredMandatesRequest withMetadata(String key, String value) { + if (metadata == null) { + metadata = new HashMap<>(); + } + metadata.put(key, value); + return this; + } + + private TransferredMandateTransferredMandatesRequest(HttpClient httpClient, + String identity) { + super(httpClient); + this.identity = identity; + } + + public TransferredMandateTransferredMandatesRequest withHeader(String headerName, + String headerValue) { + this.addHeader(headerName, headerValue); + return this; + } + + @Override + protected Map getPathParams() { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("identity", identity); + return params.build(); + } + + @Override + protected Map getQueryParams() { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.putAll(super.getQueryParams()); + if (metadata != null) { + params.put("metadata", metadata); + } + return params.build(); + } + + @Override + protected String getPathTemplate() { + return "transferred_mandate/:identity"; + } + + @Override + protected String getEnvelope() { + return "transferred_mandate"; + } + + @Override + protected Class getResponseClass() { + return TransferredMandate.class; + } + } +} From ececce12311f4583a9a53724c2965a52f82e6831 Mon Sep 17 00:00:00 2001 From: Robot Date: Fri, 24 Nov 2023 08:55:52 +0000 Subject: [PATCH 67/85] Changes generated by d35e5ea491176b3e5683c52f16e567c32aa3bc3d --- .../resources/TransferredMandate.java | 34 ++++++++------- .../services/TransferredMandateService.java | 42 ++----------------- 2 files changed, 22 insertions(+), 54 deletions(-) diff --git a/src/main/java/com/gocardless/resources/TransferredMandate.java b/src/main/java/com/gocardless/resources/TransferredMandate.java index 5344d9da..f548272e 100644 --- a/src/main/java/com/gocardless/resources/TransferredMandate.java +++ b/src/main/java/com/gocardless/resources/TransferredMandate.java @@ -10,36 +10,38 @@ private TransferredMandate() { // blank to prevent instantiation } - private String encryptedData; - private String key; - private String kid; + private String encryptedCustomerBankDetails; + private String encryptedDecryptionKey; private Links links; + private String publicKeyId; /** - * Encrypted bank account details + * Encrypted customer bank account details, containing: `iban`, `account_holder_name`, + * `swift_bank_code`, `swift_branch_code`, `swift_account_number` */ - public String getEncryptedData() { - return encryptedData; + public String getEncryptedCustomerBankDetails() { + return encryptedCustomerBankDetails; } /** - * Encrypted AES key + * Random AES-256 key used to encrypt bank account details, itself encrypted with your public + * key. */ - public String getKey() { - return key; - } - - /** - * Public key id used to encrypt AES key - */ - public String getKid() { - return kid; + public String getEncryptedDecryptionKey() { + return encryptedDecryptionKey; } public Links getLinks() { return links; } + /** + * The ID of an RSA-2048 public key, from your JWKS, used to encrypt the AES key. + */ + public String getPublicKeyId() { + return publicKeyId; + } + public static class Links { private Links() { // blank to prevent instantiation diff --git a/src/main/java/com/gocardless/services/TransferredMandateService.java b/src/main/java/com/gocardless/services/TransferredMandateService.java index bb65ae3c..364c89c6 100644 --- a/src/main/java/com/gocardless/services/TransferredMandateService.java +++ b/src/main/java/com/gocardless/services/TransferredMandateService.java @@ -3,7 +3,6 @@ import com.gocardless.http.*; import com.gocardless.resources.TransferredMandate; import com.google.common.collect.ImmutableMap; -import java.util.HashMap; import java.util.Map; /** @@ -24,7 +23,7 @@ public TransferredMandateService(HttpClient httpClient) { } /** - * Returns encrypted bank details for the transferred mandate + * Returns new customer bank details for a mandate that's been recently transferred */ public TransferredMandateTransferredMandatesRequest transferredMandates(String identity) { return new TransferredMandateTransferredMandatesRequest(httpClient, identity); @@ -33,35 +32,12 @@ public TransferredMandateTransferredMandatesRequest transferredMandates(String i /** * Request class for {@link TransferredMandateService#transferredMandates }. * - * Returns encrypted bank details for the transferred mandate + * Returns new customer bank details for a mandate that's been recently transferred */ public static final class TransferredMandateTransferredMandatesRequest extends GetRequest { @PathParam private final String identity; - private Map metadata; - - /** - * 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. - */ - public TransferredMandateTransferredMandatesRequest withMetadata( - Map metadata) { - this.metadata = metadata; - 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. - */ - public TransferredMandateTransferredMandatesRequest withMetadata(String key, String value) { - if (metadata == null) { - metadata = new HashMap<>(); - } - metadata.put(key, value); - return this; - } private TransferredMandateTransferredMandatesRequest(HttpClient httpClient, String identity) { @@ -82,24 +58,14 @@ protected Map getPathParams() { return params.build(); } - @Override - protected Map getQueryParams() { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.putAll(super.getQueryParams()); - if (metadata != null) { - params.put("metadata", metadata); - } - return params.build(); - } - @Override protected String getPathTemplate() { - return "transferred_mandate/:identity"; + return "transferred_mandates/:identity"; } @Override protected String getEnvelope() { - return "transferred_mandate"; + return "transferred_mandates"; } @Override From c6e7edbc7332141f269dcb7bf6c6dd8a57f8a939 Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 27 Nov 2023 01:11:28 +0000 Subject: [PATCH 68/85] Changes generated by 4e613b7a1dbb8fcf3b6c50b649ac451546e257f7 --- 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 a764808a..b6179ded 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 5.20.0 + 5.21.0 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:5.20.0' +implementation 'com.gocardless:gocardless-pro:5.21.0' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index 665ba4c6..d0d487b8 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '5.20.0' +version = '5.21.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 061859b5..0b4f97ce 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/5.20.0 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/5.21.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")), @@ -48,7 +48,7 @@ public class HttpClient { ImmutableMap.Builder builder = ImmutableMap.builder(); builder.put("GoCardless-Version", "2015-07-06"); builder.put("GoCardless-Client-Library", "gocardless-pro-java"); - builder.put("GoCardless-Client-Version", "5.20.0"); + builder.put("GoCardless-Client-Version", "5.21.0"); HEADERS = builder.build(); } private final OkHttpClient rawClient; From 141065e8196c61972a3bc6c736e3fc135b340ade Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 29 Nov 2023 11:35:16 +0000 Subject: [PATCH 69/85] Changes generated by eb1edba4ed25e7b338e436f8a9fa8574ce3a44ac --- .../com/gocardless/services/TransferredMandateService.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/com/gocardless/services/TransferredMandateService.java b/src/main/java/com/gocardless/services/TransferredMandateService.java index 364c89c6..29b05c80 100644 --- a/src/main/java/com/gocardless/services/TransferredMandateService.java +++ b/src/main/java/com/gocardless/services/TransferredMandateService.java @@ -58,6 +58,13 @@ protected Map getPathParams() { return params.build(); } + @Override + protected Map getQueryParams() { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.putAll(super.getQueryParams()); + return params.build(); + } + @Override protected String getPathTemplate() { return "transferred_mandates/:identity"; From e113a261585d891d3d64738ae79be79307b456b6 Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 13 Dec 2023 13:00:12 +0000 Subject: [PATCH 70/85] Changes generated by 102b5a4b429e48efa85eefa8c1b1a10cf0accf8a --- README.md | 4 ++-- build.gradle | 2 +- src/main/java/com/gocardless/http/HttpClient.java | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b6179ded..94817d39 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 5.21.0 + 5.22.0 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:5.21.0' +implementation 'com.gocardless:gocardless-pro:5.22.0' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index d0d487b8..362f9f3b 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '5.21.0' +version = '5.22.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 0b4f97ce..f73040e8 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/5.21.0 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/5.22.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")), @@ -47,8 +47,9 @@ public class HttpClient { static { ImmutableMap.Builder builder = ImmutableMap.builder(); 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", "5.21.0"); + builder.put("GoCardless-Client-Version", "5.22.0"); HEADERS = builder.build(); } private final OkHttpClient rawClient; From f2532fc8bb47417acca8bac14924a35e889c9d68 Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 8 Jan 2024 09:38:19 +0000 Subject: [PATCH 71/85] Changes generated by f21ece2219f13e660946b5d8e034bddf6b8fd341 --- .../services/BankDetailsLookupService.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/com/gocardless/services/BankDetailsLookupService.java b/src/main/java/com/gocardless/services/BankDetailsLookupService.java index e681e975..26ff3487 100644 --- a/src/main/java/com/gocardless/services/BankDetailsLookupService.java +++ b/src/main/java/com/gocardless/services/BankDetailsLookupService.java @@ -24,6 +24,9 @@ public BankDetailsLookupService(HttpClient httpClient) { * Performs a bank details lookup. As part of the lookup, a modulus check and reachability check * are performed. * + * In case an account holder name is provided (and an account number, a sort code or an iban are + * already present) an account holder name verification will also be performed. + * * If your request returns an [error](#api-usage-errors) or the `available_debit_schemes` * attribute is an empty array, you will not be able to collect payments from the specified bank * account. GoCardless may be able to collect payments from an account even if no `bic` is @@ -50,6 +53,9 @@ public BankDetailsLookupCreateRequest create() { * Performs a bank details lookup. As part of the lookup, a modulus check and reachability check * are performed. * + * In case an account holder name is provided (and an account number, a sort code or an iban are + * already present) an account holder name verification will also be performed. + * * If your request returns an [error](#api-usage-errors) or the `available_debit_schemes` * attribute is an empty array, you will not be able to collect payments from the specified bank * account. GoCardless may be able to collect payments from an account even if no `bic` is @@ -68,12 +74,22 @@ public BankDetailsLookupCreateRequest create() { */ public static final class BankDetailsLookupCreateRequest extends PostRequest { + private String accountHolderName; private String accountNumber; private String bankCode; private String branchCode; private String countryCode; private String iban; + /** + * The account holder name associated with the account number (if available). If provided + * and the country code is GB, a payer name verification will be performed. + */ + public BankDetailsLookupCreateRequest withAccountHolderName(String accountHolderName) { + this.accountHolderName = accountHolderName; + return this; + } + /** * Bank account number - see [local details](#appendix-local-bank-details) for more * information. Alternatively you can provide an `iban`. From dc1ee3086267a8b40f65c3d00accde40602785e2 Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 8 Jan 2024 16:42:35 +0000 Subject: [PATCH 72/85] Changes generated by e72f84a45de4ca3e77b2f058c347e321bdafa5af --- src/main/java/com/gocardless/resources/Mandate.java | 12 ++++++++++++ src/main/java/com/gocardless/resources/Payment.java | 10 ++++++++++ .../java/com/gocardless/services/PaymentService.java | 11 +++++++++++ 3 files changed, 33 insertions(+) diff --git a/src/main/java/com/gocardless/resources/Mandate.java b/src/main/java/com/gocardless/resources/Mandate.java index 45797b5d..146c2a1b 100644 --- a/src/main/java/com/gocardless/resources/Mandate.java +++ b/src/main/java/com/gocardless/resources/Mandate.java @@ -25,6 +25,7 @@ private Mandate() { private Links links; private Map metadata; private String nextPossibleChargeDate; + private String nextPossibleStandardAchChargeDate; private Boolean paymentsRequireApproval; private String reference; private String scheme; @@ -99,6 +100,17 @@ public String getNextPossibleChargeDate() { return nextPossibleChargeDate; } + /** + * If this is an an ACH mandate, the earliest date that can be used as a `charge_date` on any + * newly created payment to be charged through standard ACH, rather than Faster ACH. This value + * will change over time. + * + * It is only present in the API response for ACH mandates. + */ + public String getNextPossibleStandardAchChargeDate() { + return nextPossibleStandardAchChargeDate; + } + /** * Boolean value showing whether payments and subscriptions under this mandate require approval * via an automated email before being processed. diff --git a/src/main/java/com/gocardless/resources/Payment.java b/src/main/java/com/gocardless/resources/Payment.java index 32eee349..da25df35 100644 --- a/src/main/java/com/gocardless/resources/Payment.java +++ b/src/main/java/com/gocardless/resources/Payment.java @@ -24,6 +24,7 @@ private Payment() { private String createdAt; private Currency currency; private String description; + private Boolean fasterAch; private Fx fx; private String id; private Links links; @@ -81,6 +82,15 @@ public String getDescription() { return description; } + /** + * This field indicates whether the ACH payment is processed through Faster ACH or standard ACH. + * + * It is only present in the API response for ACH payments. + */ + public Boolean getFasterAch() { + return fasterAch; + } + public Fx getFx() { return fx; } diff --git a/src/main/java/com/gocardless/services/PaymentService.java b/src/main/java/com/gocardless/services/PaymentService.java index b348acad..a1fe6bb5 100644 --- a/src/main/java/com/gocardless/services/PaymentService.java +++ b/src/main/java/com/gocardless/services/PaymentService.java @@ -109,6 +109,7 @@ public static final class PaymentCreateRequest extends IdempotentPostRequest metadata; private String reference; @@ -161,6 +162,16 @@ public PaymentCreateRequest withDescription(String description) { return this; } + /** + * Set this to true or false in the request to create an ACH payment to explicitly choose + * whether the payment should be processed through Faster ACH or standard ACH, rather than + * relying on the presence or absence of the charge date to indicate that. + */ + public PaymentCreateRequest withFasterAch(Boolean fasterAch) { + this.fasterAch = fasterAch; + return this; + } + public PaymentCreateRequest withLinks(Links links) { this.links = links; return this; From 1bb881798dfea8fcdf343a347c7c9fe79e1a2c23 Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 9 Jan 2024 11:36:28 +0000 Subject: [PATCH 73/85] Changes generated by a7f4ceec89759b9273c125ea2d30890e66abbb8c --- 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 94817d39..99fc33ec 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 5.22.0 + 5.23.0 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:5.22.0' +implementation 'com.gocardless:gocardless-pro:5.23.0' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index 362f9f3b..7d8ebe12 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '5.22.0' +version = '5.23.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 f73040e8..116300aa 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/5.22.0 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/5.23.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", "5.22.0"); + builder.put("GoCardless-Client-Version", "5.23.0"); HEADERS = builder.build(); } private final OkHttpClient rawClient; From b83ebad58194f56afed324e709065be9790a5110 Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 11 Jan 2024 15:03:02 +0000 Subject: [PATCH 74/85] Changes generated by aac664b5da41d8be8ee13574436df9d4deb80601 --- .../services/MandateImportEntryService.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/main/java/com/gocardless/services/MandateImportEntryService.java b/src/main/java/com/gocardless/services/MandateImportEntryService.java index a881b37f..d40b5bba 100644 --- a/src/main/java/com/gocardless/services/MandateImportEntryService.java +++ b/src/main/java/com/gocardless/services/MandateImportEntryService.java @@ -89,6 +89,7 @@ public static final class MandateImportEntryCreateRequest private BankAccount bankAccount; private Customer customer; private Links links; + private Mandate mandate; private String recordIdentifier; public MandateImportEntryCreateRequest withAmendment(Amendment amendment) { @@ -427,6 +428,24 @@ public MandateImportEntryCreateRequest withLinksMandateImport(String mandateImpo return this; } + public MandateImportEntryCreateRequest withMandate(Mandate mandate) { + this.mandate = mandate; + return this; + } + + /** + * Unique reference. Different schemes have different length and [character + * set](#appendix-character-sets) requirements. GoCardless will generate a unique reference + * satisfying the different scheme requirements if this field is left blank. + */ + public MandateImportEntryCreateRequest withMandateReference(String reference) { + if (mandate == null) { + mandate = new Mandate(); + } + mandate.withReference(reference); + return this; + } + /** * A unique identifier for this entry, which you can use (once the import has been processed * by GoCardless) to identify the records that have been created. Limited to 255 characters. @@ -740,6 +759,20 @@ public Links withMandateImport(String mandateImport) { return this; } } + + public static class Mandate { + private String reference; + + /** + * Unique reference. Different schemes have different length and [character + * set](#appendix-character-sets) requirements. GoCardless will generate a unique + * reference satisfying the different scheme requirements if this field is left blank. + */ + public Mandate withReference(String reference) { + this.reference = reference; + return this; + } + } } /** From 712dc3c9d34c6a2b4c04dbbb12d37ec8cf8e29ea Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 17 Jan 2024 10:51:48 +0000 Subject: [PATCH 75/85] Changes generated by 844a13c24034c0f82d08f46489c3048f7be4ca20 --- .../gocardless/services/BankDetailsLookupService.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/main/java/com/gocardless/services/BankDetailsLookupService.java b/src/main/java/com/gocardless/services/BankDetailsLookupService.java index 26ff3487..d6e3bda1 100644 --- a/src/main/java/com/gocardless/services/BankDetailsLookupService.java +++ b/src/main/java/com/gocardless/services/BankDetailsLookupService.java @@ -74,22 +74,12 @@ public BankDetailsLookupCreateRequest create() { */ public static final class BankDetailsLookupCreateRequest extends PostRequest { - private String accountHolderName; private String accountNumber; private String bankCode; private String branchCode; private String countryCode; private String iban; - /** - * The account holder name associated with the account number (if available). If provided - * and the country code is GB, a payer name verification will be performed. - */ - public BankDetailsLookupCreateRequest withAccountHolderName(String accountHolderName) { - this.accountHolderName = accountHolderName; - return this; - } - /** * Bank account number - see [local details](#appendix-local-bank-details) for more * information. Alternatively you can provide an `iban`. From 757be5fb0fc6d66922ed0ee5e314b13dc39dc96c Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 17 Jan 2024 12:34:11 +0000 Subject: [PATCH 76/85] Changes generated by c187403462ee99c5b47d8b1bf99d893efdce2426 --- .../com/gocardless/services/BankDetailsLookupService.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/main/java/com/gocardless/services/BankDetailsLookupService.java b/src/main/java/com/gocardless/services/BankDetailsLookupService.java index d6e3bda1..e681e975 100644 --- a/src/main/java/com/gocardless/services/BankDetailsLookupService.java +++ b/src/main/java/com/gocardless/services/BankDetailsLookupService.java @@ -24,9 +24,6 @@ public BankDetailsLookupService(HttpClient httpClient) { * Performs a bank details lookup. As part of the lookup, a modulus check and reachability check * are performed. * - * In case an account holder name is provided (and an account number, a sort code or an iban are - * already present) an account holder name verification will also be performed. - * * If your request returns an [error](#api-usage-errors) or the `available_debit_schemes` * attribute is an empty array, you will not be able to collect payments from the specified bank * account. GoCardless may be able to collect payments from an account even if no `bic` is @@ -53,9 +50,6 @@ public BankDetailsLookupCreateRequest create() { * Performs a bank details lookup. As part of the lookup, a modulus check and reachability check * are performed. * - * In case an account holder name is provided (and an account number, a sort code or an iban are - * already present) an account holder name verification will also be performed. - * * If your request returns an [error](#api-usage-errors) or the `available_debit_schemes` * attribute is an empty array, you will not be able to collect payments from the specified bank * account. GoCardless may be able to collect payments from an account even if no `bic` is From 896a83efbe5c60a6df010928820bba53ed66d8e1 Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 17 Jan 2024 15:31:21 +0000 Subject: [PATCH 77/85] Changes generated by 50bec618edd917fc9290f6d3f5416eaaa08f437e --- .../com/gocardless/resources/BillingRequest.java | 12 ++++++++++++ .../gocardless/services/BillingRequestService.java | 14 ++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index 04e192e0..8776727e 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -482,6 +482,7 @@ private MandateRequest() { private String description; private Links links; private Map metadata; + private Boolean payerRequestedDualSignature; private String scheme; private Verify verify; @@ -535,6 +536,17 @@ public Map getMetadata() { return metadata; } + /** + * This attribute can be set to true if the payer has indicated that multiple signatures are + * required for the mandate. As long as every other Billing Request actions have been + * completed, the payer will receive an email notification containing instructions on how to + * complete the additional signature. The dual signature flow can only be completed using + * GoCardless branded pages. + */ + public Boolean getPayerRequestedDualSignature() { + return payerRequestedDualSignature; + } + /** * A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", "becs_nz", * "betalingsservice", "faster_payments", "pad", "pay_to" and "sepa_core" are supported. diff --git a/src/main/java/com/gocardless/services/BillingRequestService.java b/src/main/java/com/gocardless/services/BillingRequestService.java index f2ce2383..ce121ddf 100644 --- a/src/main/java/com/gocardless/services/BillingRequestService.java +++ b/src/main/java/com/gocardless/services/BillingRequestService.java @@ -1637,6 +1637,7 @@ public static final class BillingRequestConfirmPayerDetailsRequest @PathParam private final String identity; private Map metadata; + private Boolean payerRequestedDualSignature; /** * Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 @@ -1659,6 +1660,19 @@ public BillingRequestConfirmPayerDetailsRequest withMetadata(String key, String return this; } + /** + * This attribute can be set to true if the payer has indicated that multiple signatures are + * required for the mandate. As long as every other Billing Request actions have been + * completed, the payer will receive an email notification containing instructions on how to + * complete the additional signature. The dual signature flow can only be completed using + * GoCardless branded pages. + */ + public BillingRequestConfirmPayerDetailsRequest withPayerRequestedDualSignature( + Boolean payerRequestedDualSignature) { + this.payerRequestedDualSignature = payerRequestedDualSignature; + return this; + } + private BillingRequestConfirmPayerDetailsRequest(HttpClient httpClient, String identity) { super(httpClient); this.identity = identity; From 6e9f2223e857485250733ed9cdddd7643db88148 Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 18 Jan 2024 06:41:40 +0000 Subject: [PATCH 78/85] Changes generated by de6e5d4d0a9232e5356ffd8d47d81a198a526b81 --- 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 99fc33ec..041e690f 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 5.23.0 + 5.24.0 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:5.23.0' +implementation 'com.gocardless:gocardless-pro:5.24.0' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index 7d8ebe12..305edffc 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '5.23.0' +version = '5.24.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 116300aa..2a5927fc 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/5.23.0 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/5.24.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", "5.23.0"); + builder.put("GoCardless-Client-Version", "5.24.0"); HEADERS = builder.build(); } private final OkHttpClient rawClient; From e73b50b7389af4f41d621d21d41c5aa8c0e872b3 Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 30 May 2024 10:09:27 +0000 Subject: [PATCH 79/85] Changes generated by e685521604da0b0aeada4ef6b31731a026dea03f --- README.md | 4 +- build.gradle | 2 +- .../java/com/gocardless/GoCardlessClient.java | 18 +++ .../java/com/gocardless/http/HttpClient.java | 4 +- .../gocardless/resources/BillingRequest.java | 20 +++ .../java/com/gocardless/resources/Logo.java | 22 +++ .../com/gocardless/resources/PayerTheme.java | 21 +++ .../gocardless/resources/Subscription.java | 1 - .../services/BankDetailsLookupService.java | 18 +++ .../services/BillingRequestService.java | 53 +++++++ .../com/gocardless/services/LogoService.java | 106 ++++++++++++++ .../services/PayerThemeService.java | 136 ++++++++++++++++++ .../services/SubscriptionService.java | 9 +- 13 files changed, 404 insertions(+), 10 deletions(-) create mode 100644 src/main/java/com/gocardless/resources/Logo.java create mode 100644 src/main/java/com/gocardless/resources/PayerTheme.java create mode 100644 src/main/java/com/gocardless/services/LogoService.java create mode 100644 src/main/java/com/gocardless/services/PayerThemeService.java diff --git a/README.md b/README.md index 041e690f..6dc520a5 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 5.24.0 + 5.25.0 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:5.24.0' +implementation 'com.gocardless:gocardless-pro:5.25.0' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index 305edffc..95dfc31f 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '5.24.0' +version = '5.25.0' apply plugin: 'ch.raffael.pegdown-doclet' diff --git a/src/main/java/com/gocardless/GoCardlessClient.java b/src/main/java/com/gocardless/GoCardlessClient.java index 1efa4679..11a66816 100644 --- a/src/main/java/com/gocardless/GoCardlessClient.java +++ b/src/main/java/com/gocardless/GoCardlessClient.java @@ -29,12 +29,14 @@ public class GoCardlessClient { private final EventService events; private final InstalmentScheduleService instalmentSchedules; private final InstitutionService institutions; + private final LogoService logos; private final MandateService mandates; private final MandateImportService mandateImports; private final MandateImportEntryService mandateImportEntries; private final MandatePdfService mandatePdfs; private final NegativeBalanceLimitService negativeBalanceLimits; private final PayerAuthorisationService payerAuthorisations; + private final PayerThemeService payerThemes; private final PaymentService payments; private final PayoutService payouts; private final PayoutItemService payoutItems; @@ -183,12 +185,14 @@ private GoCardlessClient(HttpClient httpClient) { this.events = new EventService(httpClient); this.instalmentSchedules = new InstalmentScheduleService(httpClient); this.institutions = new InstitutionService(httpClient); + this.logos = new LogoService(httpClient); this.mandates = new MandateService(httpClient); this.mandateImports = new MandateImportService(httpClient); this.mandateImportEntries = new MandateImportEntryService(httpClient); this.mandatePdfs = new MandatePdfService(httpClient); this.negativeBalanceLimits = new NegativeBalanceLimitService(httpClient); this.payerAuthorisations = new PayerAuthorisationService(httpClient); + this.payerThemes = new PayerThemeService(httpClient); this.payments = new PaymentService(httpClient); this.payouts = new PayoutService(httpClient); this.payoutItems = new PayoutItemService(httpClient); @@ -308,6 +312,13 @@ public InstitutionService institutions() { return institutions; } + /** + * A service class for working with logo resources. + */ + public LogoService logos() { + return logos; + } + /** * A service class for working with mandate resources. */ @@ -350,6 +361,13 @@ public PayerAuthorisationService payerAuthorisations() { return payerAuthorisations; } + /** + * A service class for working with payer theme resources. + */ + public PayerThemeService payerThemes() { + return payerThemes; + } + /** * A service class for working with payment resources. */ diff --git a/src/main/java/com/gocardless/http/HttpClient.java b/src/main/java/com/gocardless/http/HttpClient.java index 2a5927fc..11d428a0 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/5.24.0 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/5.25.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", "5.24.0"); + builder.put("GoCardless-Client-Version", "5.25.0"); HEADERS = builder.build(); } private final OkHttpClient rawClient; diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index 8776727e..1bb28a92 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -755,6 +755,7 @@ private PaymentRequest() { private Integer appFee; private String currency; private String description; + private FundsSettlement fundsSettlement; private Links links; private Map metadata; private String scheme; @@ -793,6 +794,18 @@ public String getDescription() { return description; } + /** + * This field will decide how GoCardless handles settlement of funds from the customer. + * + * - `managed` will be moved through GoCardless' account, batched, and payed out. - `direct` + * will be a direct transfer from the payer's account to the merchant where invoicing will + * be handled separately. + * + */ + public FundsSettlement getFundsSettlement() { + return fundsSettlement; + } + public Links getLinks() { return links; } @@ -816,6 +829,13 @@ public String getScheme() { return scheme; } + public enum FundsSettlement { + @SerializedName("managed") + MANAGED, @SerializedName("direct") + DIRECT, @SerializedName("unknown") + UNKNOWN + } + public static class Links { private Links() { // blank to prevent instantiation diff --git a/src/main/java/com/gocardless/resources/Logo.java b/src/main/java/com/gocardless/resources/Logo.java new file mode 100644 index 00000000..326038b9 --- /dev/null +++ b/src/main/java/com/gocardless/resources/Logo.java @@ -0,0 +1,22 @@ +package com.gocardless.resources; + +/** + * Represents a logo resource returned from the API. + * + * Logos are image uploads that, when associated with a creditor, are shown on the [billing request + * flow](#billing-requests-billing-request-flows) payment pages. + */ +public class Logo { + private Logo() { + // blank to prevent instantiation + } + + private String id; + + /** + * Unique identifier, beginning with "LO". + */ + public String getId() { + return id; + } +} diff --git a/src/main/java/com/gocardless/resources/PayerTheme.java b/src/main/java/com/gocardless/resources/PayerTheme.java new file mode 100644 index 00000000..354fba49 --- /dev/null +++ b/src/main/java/com/gocardless/resources/PayerTheme.java @@ -0,0 +1,21 @@ +package com.gocardless.resources; + +/** + * Represents a payer theme resource returned from the API. + * + * Custom colour themes for payment pages and customer notifications. + */ +public class PayerTheme { + private PayerTheme() { + // blank to prevent instantiation + } + + private String id; + + /** + * Unique identifier, beginning with "PTH". + */ + public String getId() { + return id; + } +} diff --git a/src/main/java/com/gocardless/resources/Subscription.java b/src/main/java/com/gocardless/resources/Subscription.java index 36d03ea2..f3327927 100644 --- a/src/main/java/com/gocardless/resources/Subscription.java +++ b/src/main/java/com/gocardless/resources/Subscription.java @@ -40,7 +40,6 @@ * - if the recurrence rule specified `-1` as the `day_of_month`, the charge date will be rolled * __backwards__ to the previous business day (i.e., the last working day of the month). - otherwise * the charge date will be rolled __forwards__ to the next business day. - * */ public class Subscription { private Subscription() { diff --git a/src/main/java/com/gocardless/services/BankDetailsLookupService.java b/src/main/java/com/gocardless/services/BankDetailsLookupService.java index e681e975..f6336246 100644 --- a/src/main/java/com/gocardless/services/BankDetailsLookupService.java +++ b/src/main/java/com/gocardless/services/BankDetailsLookupService.java @@ -24,6 +24,10 @@ public BankDetailsLookupService(HttpClient httpClient) { * Performs a bank details lookup. As part of the lookup, a modulus check and reachability check * are performed. * + * For UK-based bank accounts, where an account holder name is provided (and an account number, + * a sort code or an iban are already present), we verify that the account holder name and bank + * account number match the details held by the relevant bank. + * * If your request returns an [error](#api-usage-errors) or the `available_debit_schemes` * attribute is an empty array, you will not be able to collect payments from the specified bank * account. GoCardless may be able to collect payments from an account even if no `bic` is @@ -50,6 +54,10 @@ public BankDetailsLookupCreateRequest create() { * Performs a bank details lookup. As part of the lookup, a modulus check and reachability check * are performed. * + * For UK-based bank accounts, where an account holder name is provided (and an account number, + * a sort code or an iban are already present), we verify that the account holder name and bank + * account number match the details held by the relevant bank. + * * If your request returns an [error](#api-usage-errors) or the `available_debit_schemes` * attribute is an empty array, you will not be able to collect payments from the specified bank * account. GoCardless may be able to collect payments from an account even if no `bic` is @@ -68,12 +76,22 @@ public BankDetailsLookupCreateRequest create() { */ public static final class BankDetailsLookupCreateRequest extends PostRequest { + private String accountHolderName; private String accountNumber; private String bankCode; private String branchCode; private String countryCode; private String iban; + /** + * The account holder name associated with the account number (if available). If provided + * and the country code is GB, a payer name verification will be performed. + */ + public BankDetailsLookupCreateRequest withAccountHolderName(String accountHolderName) { + this.accountHolderName = accountHolderName; + return this; + } + /** * Bank account number - see [local details](#appendix-local-bank-details) for more * information. Alternatively you can provide an `iban`. diff --git a/src/main/java/com/gocardless/services/BillingRequestService.java b/src/main/java/com/gocardless/services/BillingRequestService.java index ce121ddf..219b2ec7 100644 --- a/src/main/java/com/gocardless/services/BillingRequestService.java +++ b/src/main/java/com/gocardless/services/BillingRequestService.java @@ -66,6 +66,11 @@ public BillingRequestCollectCustomerDetailsRequest collectCustomerDetails(String * provider to make sure the customer's bank account can accept Direct Debit. If a bank account * is discovered to be closed or invalid, the customer is requested to adjust the account * number/routing number and succeed in this check to continue with the flow. + * + * _BACS scheme_ [Payer Name + * Verification](https://hub.gocardless.com/s/article/Introduction-to-Payer-Name-Verification?language=en_GB) + * is enabled by default for UK based bank accounts, meaning we verify the account holder name + * and bank account number match the details held by the relevant bank. */ public BillingRequestCollectBankAccountRequest collectBankAccount(String identity) { return new BillingRequestCollectBankAccountRequest(httpClient, identity); @@ -426,6 +431,23 @@ public BillingRequestCreateRequest withPaymentRequestDescription(String descript return this; } + /** + * This field will decide how GoCardless handles settlement of funds from the customer. + * + * - `managed` will be moved through GoCardless' account, batched, and payed out. - `direct` + * will be a direct transfer from the payer's account to the merchant where invoicing will + * be handled separately. + * + */ + public BillingRequestCreateRequest withPaymentRequestFundsSettlement( + PaymentRequest.FundsSettlement fundsSettlement) { + if (paymentRequest == null) { + paymentRequest = new PaymentRequest(); + } + paymentRequest.withFundsSettlement(fundsSettlement); + 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. @@ -871,6 +893,7 @@ public static class PaymentRequest { private Integer appFee; private String currency; private String description; + private FundsSettlement fundsSettlement; private Map metadata; private String scheme; @@ -912,6 +935,19 @@ public PaymentRequest withDescription(String description) { return this; } + /** + * This field will decide how GoCardless handles settlement of funds from the customer. + * + * - `managed` will be moved through GoCardless' account, batched, and payed out. - + * `direct` will be a direct transfer from the payer's account to the merchant where + * invoicing will be handled separately. + * + */ + public PaymentRequest withFundsSettlement(FundsSettlement fundsSettlement) { + this.fundsSettlement = fundsSettlement; + 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. @@ -932,6 +968,18 @@ public PaymentRequest withScheme(String scheme) { this.scheme = scheme; return this; } + + public enum FundsSettlement { + @SerializedName("managed") + MANAGED, @SerializedName("direct") + DIRECT, @SerializedName("unknown") + UNKNOWN; + + @Override + public String toString() { + return name().toLowerCase(); + } + } } } @@ -1434,6 +1482,11 @@ public CustomerBillingDetail withSwedishIdentityNumber(String swedishIdentityNum * provider to make sure the customer's bank account can accept Direct Debit. If a bank account * is discovered to be closed or invalid, the customer is requested to adjust the account * number/routing number and succeed in this check to continue with the flow. + * + * _BACS scheme_ [Payer Name + * Verification](https://hub.gocardless.com/s/article/Introduction-to-Payer-Name-Verification?language=en_GB) + * is enabled by default for UK based bank accounts, meaning we verify the account holder name + * and bank account number match the details held by the relevant bank. */ public static final class BillingRequestCollectBankAccountRequest extends PostRequest { diff --git a/src/main/java/com/gocardless/services/LogoService.java b/src/main/java/com/gocardless/services/LogoService.java new file mode 100644 index 00000000..052cf777 --- /dev/null +++ b/src/main/java/com/gocardless/services/LogoService.java @@ -0,0 +1,106 @@ +package com.gocardless.services; + +import com.gocardless.http.*; +import com.gocardless.resources.Logo; + +/** + * Service class for working with logo resources. + * + * Logos are image uploads that, when associated with a creditor, are shown on the [billing request + * flow](#billing-requests-billing-request-flows) payment pages. + */ +public class LogoService { + private final HttpClient httpClient; + + /** + * Constructor. Users of this library should have no need to call this - an instance of this + * class can be obtained by calling {@link com.gocardless.GoCardlessClient#logos() }. + */ + public LogoService(HttpClient httpClient) { + this.httpClient = httpClient; + } + + /** + * Creates a new logo associated with a creditor. If a creditor already has a logo, this will + * update the existing logo linked to the creditor. + */ + public LogoCreateForCreditorRequest createForCreditor() { + return new LogoCreateForCreditorRequest(httpClient); + } + + /** + * Request class for {@link LogoService#createForCreditor }. + * + * Creates a new logo associated with a creditor. If a creditor already has a logo, this will + * update the existing logo linked to the creditor. + */ + public static final class LogoCreateForCreditorRequest extends PostRequest { + private String image; + private Links links; + + /** + * Base64 encoded string. + */ + public LogoCreateForCreditorRequest withImage(String image) { + this.image = image; + return this; + } + + public LogoCreateForCreditorRequest withLinks(Links links) { + this.links = links; + return this; + } + + /** + * ID of the creditor the payer theme belongs to + */ + public LogoCreateForCreditorRequest withLinksCreditor(String creditor) { + if (links == null) { + links = new Links(); + } + links.withCreditor(creditor); + return this; + } + + private LogoCreateForCreditorRequest(HttpClient httpClient) { + super(httpClient); + } + + public LogoCreateForCreditorRequest withHeader(String headerName, String headerValue) { + this.addHeader(headerName, headerValue); + return this; + } + + @Override + protected String getPathTemplate() { + return "branding/logos"; + } + + @Override + protected String getEnvelope() { + return "logos"; + } + + @Override + protected Class getResponseClass() { + return Logo.class; + } + + @Override + protected boolean hasBody() { + return true; + } + + public static class Links { + private String creditor; + + /** + * ID of the creditor the payer theme belongs to + */ + public Links withCreditor(String creditor) { + this.creditor = creditor; + return this; + } + } + } +} diff --git a/src/main/java/com/gocardless/services/PayerThemeService.java b/src/main/java/com/gocardless/services/PayerThemeService.java new file mode 100644 index 00000000..d41183c0 --- /dev/null +++ b/src/main/java/com/gocardless/services/PayerThemeService.java @@ -0,0 +1,136 @@ +package com.gocardless.services; + +import com.gocardless.http.*; +import com.gocardless.resources.PayerTheme; + +/** + * Service class for working with payer theme resources. + * + * Custom colour themes for payment pages and customer notifications. + */ +public class PayerThemeService { + private final HttpClient httpClient; + + /** + * Constructor. Users of this library should have no need to call this - an instance of this + * class can be obtained by calling {@link com.gocardless.GoCardlessClient#payerThemes() }. + */ + public PayerThemeService(HttpClient httpClient) { + this.httpClient = httpClient; + } + + /** + * Creates a new payer theme associated with a creditor. If a creditor already has payer themes, + * this will update the existing payer theme linked to the creditor. + */ + public PayerThemeCreateForCreditorRequest createForCreditor() { + return new PayerThemeCreateForCreditorRequest(httpClient); + } + + /** + * Request class for {@link PayerThemeService#createForCreditor }. + * + * Creates a new payer theme associated with a creditor. If a creditor already has payer themes, + * this will update the existing payer theme linked to the creditor. + */ + public static final class PayerThemeCreateForCreditorRequest extends PostRequest { + private String buttonBackgroundColour; + private String contentBoxBorderColour; + private String headerBackgroundColour; + private String linkTextColour; + private Links links; + + /** + * Colour for buttons background (hexcode) + */ + public PayerThemeCreateForCreditorRequest withButtonBackgroundColour( + String buttonBackgroundColour) { + this.buttonBackgroundColour = buttonBackgroundColour; + return this; + } + + /** + * Colour for content box border (hexcode) + */ + public PayerThemeCreateForCreditorRequest withContentBoxBorderColour( + String contentBoxBorderColour) { + this.contentBoxBorderColour = contentBoxBorderColour; + return this; + } + + /** + * Colour for header background (hexcode) + */ + public PayerThemeCreateForCreditorRequest withHeaderBackgroundColour( + String headerBackgroundColour) { + this.headerBackgroundColour = headerBackgroundColour; + return this; + } + + /** + * Colour for text links (hexcode) + */ + public PayerThemeCreateForCreditorRequest withLinkTextColour(String linkTextColour) { + this.linkTextColour = linkTextColour; + return this; + } + + public PayerThemeCreateForCreditorRequest withLinks(Links links) { + this.links = links; + return this; + } + + /** + * ID of the creditor the payer theme belongs to + */ + public PayerThemeCreateForCreditorRequest withLinksCreditor(String creditor) { + if (links == null) { + links = new Links(); + } + links.withCreditor(creditor); + return this; + } + + private PayerThemeCreateForCreditorRequest(HttpClient httpClient) { + super(httpClient); + } + + public PayerThemeCreateForCreditorRequest withHeader(String headerName, + String headerValue) { + this.addHeader(headerName, headerValue); + return this; + } + + @Override + protected String getPathTemplate() { + return "branding/payer_themes"; + } + + @Override + protected String getEnvelope() { + return "payer_themes"; + } + + @Override + protected Class getResponseClass() { + return PayerTheme.class; + } + + @Override + protected boolean hasBody() { + return true; + } + + public static class Links { + private String creditor; + + /** + * ID of the creditor the payer theme belongs to + */ + public Links withCreditor(String creditor) { + this.creditor = creditor; + return this; + } + } + } +} diff --git a/src/main/java/com/gocardless/services/SubscriptionService.java b/src/main/java/com/gocardless/services/SubscriptionService.java index eac266ea..22d8d595 100644 --- a/src/main/java/com/gocardless/services/SubscriptionService.java +++ b/src/main/java/com/gocardless/services/SubscriptionService.java @@ -47,7 +47,6 @@ * - if the recurrence rule specified `-1` as the `day_of_month`, the charge date will be rolled * __backwards__ to the previous business day (i.e., the last working day of the month). - otherwise * the charge date will be rolled __forwards__ to the next business day. - * */ public class SubscriptionService { private final HttpClient httpClient; @@ -151,7 +150,6 @@ public SubscriptionUpdateRequest update(String identity) { * * - `pause_cycles_must_be_greater_than_or_equal_to` if the provided value for `pause_cycles` * cannot be satisfied. - * */ public SubscriptionPauseRequest pause(String identity) { return new SubscriptionPauseRequest(httpClient, identity); @@ -941,7 +939,6 @@ protected boolean hasBody() { * * - `pause_cycles_must_be_greater_than_or_equal_to` if the provided value for `pause_cycles` * cannot be satisfied. - * */ public static final class SubscriptionPauseRequest extends PostRequest { @PathParam @@ -972,7 +969,11 @@ public SubscriptionPauseRequest withMetadata(String key, String value) { /** * The number of cycles to pause a subscription for. A cycle is one duration of `interval` - * and `interval_unit`. This should be a non zero positive value. + * and `interval_unit`. This should be a non zero positive value. For AUD subscriptions with + * `interval_unit: weekly` the minimum value varies between `3` & `4` because of the + * [mandatory minimum waiting period](#subscriptions-resume-a-subscription). For NZD + * subscriptions with `interval_unit: weekly` the minimum value is `2` because of the + * [mandatory minimum waiting period](#subscriptions-resume-a-subscription). */ public SubscriptionPauseRequest withPauseCycles(Integer pauseCycles) { this.pauseCycles = pauseCycles; From 43d3a9955ccdcbb74e6d7b30dfb667d971e7c297 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2024 13:53:35 +0000 Subject: [PATCH 80/85] Changes generated by 98656df793ba39dd79f2e3d9b33c5a2d14db1cd4 This commit was automatically created from gocardless/gocardless-pro-java-template@98656df793ba39dd79f2e3d9b33c5a2d14db1cd4 by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-java-template/actions/runs/9908686995 --- .gitignore | 4 +- README.md | 4 +- build.gradle | 13 ++- gradlew | 1 + .../gocardless/resources/Subscription.java | 8 ++ .../com/gocardless/services/LogoService.java | 14 ++- .../services/MandateImportEntryService.java | 105 ++++++++++++++++++ .../services/MandatePdfService.java | 30 +++++ 8 files changed, 173 insertions(+), 6 deletions(-) mode change 100755 => 100644 gradlew diff --git a/.gitignore b/.gitignore index 6266b006..e134aac3 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,6 @@ out/ ############################## ## Visual Studio Code ############################## -.vscode/ \ No newline at end of file +.vscode/ + +tmp-push-files-checkout/ diff --git a/README.md b/README.md index 6dc520a5..e66e926c 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 5.25.0 + 5.26.0 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:5.25.0' +implementation 'com.gocardless:gocardless-pro:5.26.0' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index 95dfc31f..976c8286 100644 --- a/build.gradle +++ b/build.gradle @@ -2,6 +2,11 @@ buildscript { repositories { mavenCentral() maven { url 'https://plugins.gradle.org/m2/' } + jcenter() + google() + maven { + url 'https://maven.google.com' + } } dependencies { @@ -20,12 +25,18 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '5.25.0' +version = '5.26.0' apply plugin: 'ch.raffael.pegdown-doclet' repositories { mavenCentral() + maven { url 'https://plugins.gradle.org/m2/' } + jcenter() + google() + maven { + url 'https://maven.google.com' + } } dependencies { diff --git a/gradlew b/gradlew old mode 100755 new mode 100644 index cccdd3d5..a956838e --- a/gradlew +++ b/gradlew @@ -1,4 +1,5 @@ #!/usr/bin/env sh +set -x ############################################################################## ## diff --git a/src/main/java/com/gocardless/resources/Subscription.java b/src/main/java/com/gocardless/resources/Subscription.java index f3327927..f5e15536 100644 --- a/src/main/java/com/gocardless/resources/Subscription.java +++ b/src/main/java/com/gocardless/resources/Subscription.java @@ -61,6 +61,7 @@ private Subscription() { private Map metadata; private Month month; private String name; + private Boolean parentPlanPaused; private String paymentReference; private Boolean retryIfPossible; private String startDate; @@ -186,6 +187,13 @@ public String getName() { return name; } + /** + * Whether the parent plan of this subscription is paused. + */ + public Boolean getParentPlanPaused() { + return parentPlanPaused; + } + /** * An optional payment reference. This will be set as the reference on each payment created and * will appear on your customer's bank statement. See the documentation for the [create payment diff --git a/src/main/java/com/gocardless/services/LogoService.java b/src/main/java/com/gocardless/services/LogoService.java index 052cf777..0f9ba10a 100644 --- a/src/main/java/com/gocardless/services/LogoService.java +++ b/src/main/java/com/gocardless/services/LogoService.java @@ -23,6 +23,11 @@ public LogoService(HttpClient httpClient) { /** * Creates a new logo associated with a creditor. If a creditor already has a logo, this will * update the existing logo linked to the creditor. + * + * We support JPG and PNG formats. Your logo will be scaled to a maximum of 300px by 40px. For + * more guidance on how to upload logos that will look great across your customer payment page + * and notification emails see + * [here](https://developer.gocardless.com/gc-embed/setting-up-branding#tips_for_uploading_your_logo). */ public LogoCreateForCreditorRequest createForCreditor() { return new LogoCreateForCreditorRequest(httpClient); @@ -33,6 +38,11 @@ public LogoCreateForCreditorRequest createForCreditor() { * * Creates a new logo associated with a creditor. If a creditor already has a logo, this will * update the existing logo linked to the creditor. + * + * We support JPG and PNG formats. Your logo will be scaled to a maximum of 300px by 40px. For + * more guidance on how to upload logos that will look great across your customer payment page + * and notification emails see + * [here](https://developer.gocardless.com/gc-embed/setting-up-branding#tips_for_uploading_your_logo). */ public static final class LogoCreateForCreditorRequest extends PostRequest { private String image; @@ -52,7 +62,7 @@ public LogoCreateForCreditorRequest withLinks(Links links) { } /** - * ID of the creditor the payer theme belongs to + * ID of the creditor the logo belongs to */ public LogoCreateForCreditorRequest withLinksCreditor(String creditor) { if (links == null) { @@ -95,7 +105,7 @@ public static class Links { private String creditor; /** - * ID of the creditor the payer theme belongs to + * ID of the creditor the logo belongs to */ public Links withCreditor(String creditor) { this.creditor = creditor; diff --git a/src/main/java/com/gocardless/services/MandateImportEntryService.java b/src/main/java/com/gocardless/services/MandateImportEntryService.java index d40b5bba..1066dd62 100644 --- a/src/main/java/com/gocardless/services/MandateImportEntryService.java +++ b/src/main/java/com/gocardless/services/MandateImportEntryService.java @@ -3,6 +3,7 @@ import com.gocardless.http.*; import com.gocardless.resources.MandateImportEntry; import com.google.common.collect.ImmutableMap; +import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; import java.util.List; import java.util.Map; @@ -171,6 +172,20 @@ public MandateImportEntryCreateRequest withBankAccountAccountNumber(String accou return this; } + /** + * Bank account type. Required for USD-denominated bank accounts. Must not be provided for + * bank accounts in other currencies. See [local details](#local-bank-details-united-states) + * for more information. + */ + public MandateImportEntryCreateRequest withBankAccountAccountType( + BankAccount.AccountType accountType) { + if (bankAccount == null) { + bankAccount = new BankAccount(); + } + bankAccount.withAccountType(accountType); + return this; + } + /** * Bank code - see [local details](#appendix-local-bank-details) for more information. * Alternatively you can provide an `iban`. @@ -221,6 +236,19 @@ public MandateImportEntryCreateRequest withBankAccountIban(String iban) { 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. + */ + public MandateImportEntryCreateRequest withBankAccountMetadata( + Map metadata) { + if (bankAccount == null) { + bankAccount = new BankAccount(); + } + bankAccount.withMetadata(metadata); + return this; + } + public MandateImportEntryCreateRequest withCustomer(Customer customer) { this.customer = customer; return this; @@ -361,6 +389,18 @@ public MandateImportEntryCreateRequest withCustomerLanguage(String language) { 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. + */ + public MandateImportEntryCreateRequest withCustomerMetadata(Map metadata) { + if (customer == null) { + customer = new Customer(); + } + customer.withMetadata(metadata); + return this; + } + /** * [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, including * country code. @@ -433,6 +473,18 @@ public MandateImportEntryCreateRequest withMandate(Mandate mandate) { 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. + */ + public MandateImportEntryCreateRequest withMandateMetadata(Map metadata) { + if (mandate == null) { + mandate = new Mandate(); + } + mandate.withMetadata(metadata); + return this; + } + /** * Unique reference. Different schemes have different length and [character * set](#appendix-character-sets) requirements. GoCardless will generate a unique reference @@ -523,10 +575,12 @@ public Amendment withOriginalMandateReference(String originalMandateReference) { public static class BankAccount { private String accountHolderName; private String accountNumber; + private AccountType accountType; private String bankCode; private String branchCode; private String countryCode; private String iban; + private Map metadata; /** * Name of the account holder, as known by the bank. Usually this is the same as the @@ -549,6 +603,16 @@ public BankAccount withAccountNumber(String accountNumber) { return this; } + /** + * Bank account type. Required for USD-denominated bank accounts. Must not be provided + * for bank accounts in other currencies. See [local + * details](#local-bank-details-united-states) for more information. + */ + public BankAccount withAccountType(AccountType accountType) { + this.accountType = accountType; + return this; + } + /** * Bank code - see [local details](#appendix-local-bank-details) for more information. * Alternatively you can provide an `iban`. @@ -587,6 +651,27 @@ public BankAccount withIban(String iban) { this.iban = iban; 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. + */ + public BankAccount withMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + public enum AccountType { + @SerializedName("savings") + SAVINGS, @SerializedName("checking") + CHECKING, @SerializedName("unknown") + UNKNOWN; + + @Override + public String toString() { + return name().toLowerCase(); + } + } } public static class Customer { @@ -601,6 +686,7 @@ public static class Customer { private String familyName; private String givenName; private String language; + private Map metadata; private String phoneNumber; private String postalCode; private String region; @@ -707,6 +793,15 @@ public Customer withLanguage(String language) { 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. + */ + public Customer withMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + /** * [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, including * country code. @@ -761,8 +856,18 @@ public Links withMandateImport(String mandateImport) { } public static class Mandate { + private Map metadata; private String reference; + /** + * 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. + */ + public Mandate withMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + /** * Unique reference. Different schemes have different length and [character * set](#appendix-character-sets) requirements. GoCardless will generate a unique diff --git a/src/main/java/com/gocardless/services/MandatePdfService.java b/src/main/java/com/gocardless/services/MandatePdfService.java index 4f044fdb..57ed02a7 100644 --- a/src/main/java/com/gocardless/services/MandatePdfService.java +++ b/src/main/java/com/gocardless/services/MandatePdfService.java @@ -80,8 +80,11 @@ public static final class MandatePdfCreateRequest extends PostRequest Date: Fri, 12 Jul 2024 13:18:51 +0100 Subject: [PATCH 81/85] tlc: better CI pipeline --- .github/workflows/build.yml | 105 ++++++++++++++---------------------- 1 file changed, 39 insertions(+), 66 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7950edcc..b0aa9aba 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,70 +1,43 @@ -name: gocardless/gocardless-pro-java/build -on: push +name: build & test + +on: + push: + branches: [master] + pull_request: + types: [opened, reopened, synchronize] jobs: - test_library_jdk8: - runs-on: ubuntu-latest - container: - image: openjdk:8 - steps: - - uses: actions/checkout@v2 - - name: Test - run: |- - export TERM=${TERM:-dumb} - ./install_crypto_deps.sh - ./gradlew test - - name: Save test results - run: |- - mkdir -p ~/junit - find . -type f -regex "$OUT_DIR/build/test-results/test/.*xml" -exec cp {} ~/junit/ \; - if: always() - - uses: actions/upload-artifact@v2 - with: - path: "~/junit" - - uses: actions/upload-artifact@v2 - with: - path: "~/junit" - test_library_jdk9: - runs-on: ubuntu-latest - container: - image: openjdk:9 - steps: - - uses: actions/checkout@v2 - - name: Test - run: |- - export TERM=${TERM:-dumb} - ./install_crypto_deps.sh - ./gradlew test - - name: Save test results - run: |- - mkdir -p ~/junit - find . -type f -regex "$OUT_DIR/build/test-results/test/.*xml" -exec cp {} ~/junit/ \; - if: always() - - uses: actions/upload-artifact@v2 - with: - path: "~/junit" - - uses: actions/upload-artifact@v2 - with: - path: "~/junit" - test_library_jdk11: + test: runs-on: ubuntu-latest - container: - image: openjdk:11 + strategy: + fail-fast: false + matrix: + jdk-version: [ 8, 9, 11 ] steps: - - uses: actions/checkout@v2 - - name: Test - run: |- - export TERM=${TERM:-dumb} - ./install_crypto_deps.sh - ./gradlew test - - name: Save test results - run: |- - mkdir -p ~/junit - find . -type f -regex "$OUT_DIR/build/test-results/test/.*xml" -exec cp {} ~/junit/ \; - if: always() - - uses: actions/upload-artifact@v2 - with: - path: "~/junit" - - uses: actions/upload-artifact@v2 - with: - path: "~/junit" + - uses: actions/checkout@v4 + - uses: actions/setup-java@v2 + with: + java-version: "${{ matrix.jdk-version }}" + distribution: adopt + - name: Verify java installed properly + run: java -version + - name: Grant execute permission for gradlew + run: chmod +x gradlew + # test + - name: Test + run: |- + export TERM=${TERM:-dumb} + ./gradlew test + # test build + - name: Build with Gradle + run: ./gradlew build + - name: Save test results + if: always() + run: |- + mkdir -p ~/junit + find . -type f -regex "./build/test-results/test/.*xml" -exec cp {} ~/junit/ \; + - uses: actions/upload-artifact@v4 + if: always() + with: + name: test_library_jdk${{ matrix.jdk-version }}_junit + path: "~/junit" From 04704ebc21392b853008a1d5b8110b877c6f8224 Mon Sep 17 00:00:00 2001 From: Martin Nefjodov Date: Fri, 12 Jul 2024 13:19:17 +0100 Subject: [PATCH 82/85] feat: switch to OSSRH token for publishing --- .github/workflows/maven-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index c552613f..89d600c1 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -31,5 +31,5 @@ jobs: - name: Publish package run: ./gradlew publishToSonatype closeAndReleaseStagingRepository -Psigning.keyId=${{secrets.SIGNING_KEY_ID}} -Psigning.password=${{secrets.SIGNING_KEY_PASSWORD}} -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg) -Dorg.gradle.internal.http.socketTimeout=300000 --stacktrace env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + MAVEN_USERNAME: ${{ secrets.OSSRH_ACCESS_TOKEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_ACCESS_TOKEN_PASSWORD }} From 4a41f45d3ebef7ec06980c99a115403aa6bc2e84 Mon Sep 17 00:00:00 2001 From: Martin Nefjodov Date: Fri, 12 Jul 2024 16:06:51 +0100 Subject: [PATCH 83/85] Retain test artifacts for 7 days only. --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b0aa9aba..48ec6ba4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,3 +41,4 @@ jobs: with: name: test_library_jdk${{ matrix.jdk-version }}_junit path: "~/junit" + retention-days: 7 From 3f0b24493a16ff9e28cf7b1b2b3a2d1936740032 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2024 16:16:44 +0000 Subject: [PATCH 84/85] Changes generated by 8643e799954b1bea7fb832b4df8f6338713640a7 This commit was automatically created from gocardless/gocardless-pro-java-template@8643e799954b1bea7fb832b4df8f6338713640a7 by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-java-template/actions/runs/9910910713 --- src/main/java/com/gocardless/http/HttpClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gocardless/http/HttpClient.java b/src/main/java/com/gocardless/http/HttpClient.java index 11d428a0..d1e90f6b 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/5.25.0 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/5.26.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", "5.25.0"); + builder.put("GoCardless-Client-Version", "5.26.0"); HEADERS = builder.build(); } private final OkHttpClient rawClient; From 9a19952e6c09026fbbeb98fc787eff2970f7c0ae Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2024 16:38:42 +0000 Subject: [PATCH 85/85] Changes generated by e38ebac40265ebc12fbbb7cc482626e0d58648fb This commit was automatically created from gocardless/gocardless-pro-java-template@e38ebac40265ebc12fbbb7cc482626e0d58648fb by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-java-template/actions/runs/9911182763 --- 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 e66e926c..f03ea69f 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 5.26.0 + 5.26.1 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:5.26.0' +implementation 'com.gocardless:gocardless-pro:5.26.1' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index 976c8286..633e9aeb 100644 --- a/build.gradle +++ b/build.gradle @@ -25,7 +25,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '5.26.0' +version = '5.26.1' 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 d1e90f6b..3094418e 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/5.26.0 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/5.26.1 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", "5.26.0"); + builder.put("GoCardless-Client-Version", "5.26.1"); HEADERS = builder.build(); } private final OkHttpClient rawClient;