diff --git a/CHANGELOG.md b/CHANGELOG.md index ecf293ac..9fe4733f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ # Changelog +## 9.0.3 (2026-09-14) + +### Fixes + +#### Fix nullable field declarations and missing properties across multiple resources + +Adds `null` to type declarations for fields that legitimately return nil across redirect_flows, webhooks, scheme_identifiers, customer_bank_accounts, outbound_payments, and billing_request_with_actions. Also adds the missing `period_alignment` property to mandate consent_parameters. + ## 9.0.2 (2026-09-14) ### Fixes diff --git a/README.md b/README.md index ba42c3a3..f85edc35 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 9.0.2 + 9.0.3 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:9.0.2' +implementation 'com.gocardless:gocardless-pro:9.0.3' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index 3dd4d94b..3a806bb8 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '9.0.2' +version = '9.0.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 5302e82c..cca031df 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/9.0.2 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/9.0.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")), @@ -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", "9.0.2"); + builder.put("GoCardless-Client-Version", "9.0.3"); HEADERS = builder.build(); } private final OkHttpClient rawClient; diff --git a/src/main/java/com/gocardless/resources/BillingRequestWithAction.java b/src/main/java/com/gocardless/resources/BillingRequestWithAction.java index 4aedb60e..71a9e295 100644 --- a/src/main/java/com/gocardless/resources/BillingRequestWithAction.java +++ b/src/main/java/com/gocardless/resources/BillingRequestWithAction.java @@ -23,11 +23,7 @@ private BillingRequestWithAction() { private BillingRequests billingRequests; /** - * Bank Authorisations can be used to authorise Billing Requests. Authorisations are created - * against a specific bank, usually the bank that provides the payer's account. - * - * Creation of Bank Authorisations is only permitted from GoCardless hosted UIs (see Billing - * Request Flows) to ensure we meet regulatory requirements for checkout flows. + * Bank authorisation resource, or null if no bank authorisation was created. */ public BankAuthorisations getBankAuthorisations() { return bankAuthorisations; @@ -53,11 +49,7 @@ public BillingRequests getBillingRequests() { /** * Represents a bank authorisation resource returned from the API. * - * Bank Authorisations can be used to authorise Billing Requests. Authorisations are created - * against a specific bank, usually the bank that provides the payer's account. - * - * Creation of Bank Authorisations is only permitted from GoCardless hosted UIs (see Billing - * Request Flows) to ensure we meet regulatory requirements for checkout flows. + * Bank authorisation resource, or null if no bank authorisation was created. */ public static class BankAuthorisations { private BankAuthorisations() { diff --git a/src/main/java/com/gocardless/resources/Mandate.java b/src/main/java/com/gocardless/resources/Mandate.java index 9bafe73c..ad2a49ca 100644 --- a/src/main/java/com/gocardless/resources/Mandate.java +++ b/src/main/java/com/gocardless/resources/Mandate.java @@ -257,6 +257,7 @@ private ConsentParameters() { private Integer maxAmountPerPeriod; private Integer maxPaymentsPerPeriod; private Period period; + private PeriodAlignment periodAlignment; private String startDate; /** @@ -294,6 +295,13 @@ public Period getPeriod() { return period; } + /** + * The alignment of the payment period. + */ + public PeriodAlignment getPeriodAlignment() { + return periodAlignment; + } + /** * The date from which payments can be taken */ @@ -310,6 +318,13 @@ public enum Period { FLEXIBLE, @SerializedName("unknown") UNKNOWN } + + public enum PeriodAlignment { + @SerializedName("calendar") + CALENDAR, @SerializedName("consent") + CONSENT, @SerializedName("unknown") + UNKNOWN + } } /**