From aeea329c6f09da4bb62c174c6092a7c5ef587107 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2026 17:54:30 +0000 Subject: [PATCH] Changes generated by 61c0cc06969f61b57e3ca8b73dd151b07bdc985b This commit was automatically created from gocardless/client-library-templates@61c0cc06969f61b57e3ca8b73dd151b07bdc985b by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/40554369365 --- .../gocardless/resources/BillingRequest.java | 4 +- .../resources/BillingRequestWithAction.java | 4 +- .../gocardless/resources/Subscription.java | 4 +- .../services/BillingRequestService.java | 8 +++- .../gocardless/services/PaymentService.java | 39 +++++++++++++++++++ .../services/SubscriptionService.java | 4 +- 6 files changed, 57 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index 36d0ee74..a2e5a22b 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -1894,7 +1894,9 @@ public String getCurrency() { * - * 28 or -1 to indicate the last day of the month. + * 31 or -1 to indicate the last day of the month. If the chosen + * day does not exist in a given month (e.g. 31 in April), the charge is made + * on the last day of that month. */ public Integer getDayOfMonth() { return dayOfMonth; diff --git a/src/main/java/com/gocardless/resources/BillingRequestWithAction.java b/src/main/java/com/gocardless/resources/BillingRequestWithAction.java index 8cb501cc..8bda3919 100644 --- a/src/main/java/com/gocardless/resources/BillingRequestWithAction.java +++ b/src/main/java/com/gocardless/resources/BillingRequestWithAction.java @@ -2111,7 +2111,9 @@ public String getCurrency() { * - * 28 or -1 to indicate the last day of the month. + * 31 or -1 to indicate the last day of the month. If the + * chosen day does not exist in a given month (e.g. 31 in April), the + * charge is made on the last day of that month. */ public Integer getDayOfMonth() { return dayOfMonth; diff --git a/src/main/java/com/gocardless/resources/Subscription.java b/src/main/java/com/gocardless/resources/Subscription.java index 026ef6bf..7055b32b 100644 --- a/src/main/java/com/gocardless/resources/Subscription.java +++ b/src/main/java/com/gocardless/resources/Subscription.java @@ -122,7 +122,9 @@ public String getCurrency() { * - * 28 or -1 to indicate the last day of the month. + * 31 or -1 to indicate the last day of the month. If the chosen day + * does not exist in a given month (e.g. 31 in April), the charge is made on the + * last day of that month. */ public Integer getDayOfMonth() { return dayOfMonth; diff --git a/src/main/java/com/gocardless/services/BillingRequestService.java b/src/main/java/com/gocardless/services/BillingRequestService.java index b6da54d6..31232427 100644 --- a/src/main/java/com/gocardless/services/BillingRequestService.java +++ b/src/main/java/com/gocardless/services/BillingRequestService.java @@ -810,7 +810,9 @@ public BillingRequestCreateRequest withSubscriptionRequestCurrency(String curren * - * 28 or -1 to indicate the last day of the month. + * 31 or -1 to indicate the last day of the month. If the chosen + * day does not exist in a given month (e.g. 31 in April), the charge is made + * on the last day of that month. */ public BillingRequestCreateRequest withSubscriptionRequestDayOfMonth(Integer dayOfMonth) { if (subscriptionRequest == null) { @@ -1919,7 +1921,9 @@ public SubscriptionRequest withCurrency(String currency) { * - * 28 or -1 to indicate the last day of the month. + * 31 or -1 to indicate the last day of the month. If the + * chosen day does not exist in a given month (e.g. 31 in April), the + * charge is made on the last day of that month. */ public SubscriptionRequest withDayOfMonth(Integer dayOfMonth) { this.dayOfMonth = dayOfMonth; diff --git a/src/main/java/com/gocardless/services/PaymentService.java b/src/main/java/com/gocardless/services/PaymentService.java index bbcfd309..4f98b9ae 100644 --- a/src/main/java/com/gocardless/services/PaymentService.java +++ b/src/main/java/com/gocardless/services/PaymentService.java @@ -2,9 +2,11 @@ import com.gocardless.http.*; import com.gocardless.resources.Payment; +import com.google.common.base.Joiner; import com.google.common.collect.ImmutableMap; import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -443,6 +445,7 @@ public static final class PaymentListRequest extends ListRequest private String creditor; private Currency currency; private String customer; + private List include; private String mandate; private String scheme; private SortDirection sortDirection; @@ -595,6 +598,27 @@ public PaymentListRequest withCustomer(String customer) { return this; } + /** + * Includes linked resources in the response. Use customer to embed customer + * details, or mandate to embed mandate details. + */ + public PaymentListRequest withInclude(List include) { + this.include = include; + return this; + } + + /** + * Includes linked resources in the response. Use customer to embed customer + * details, or mandate to embed mandate details. + */ + public PaymentListRequest withInclude(Include include) { + if (this.include == null) { + this.include = new ArrayList<>(); + } + this.include.add(include); + return this; + } + /** * Number of records to return. */ @@ -710,6 +734,9 @@ protected Map getQueryParams() { if (customer != null) { params.put("customer", customer); } + if (include != null) { + params.put("include", Joiner.on(",").join(include)); + } if (mandate != null) { params.put("mandate", mandate); } @@ -764,6 +791,18 @@ public String toString() { } } + public enum Include { + @SerializedName("customer") + CUSTOMER, @SerializedName("mandate") + MANDATE, @SerializedName("unknown") + UNKNOWN; + + @Override + public String toString() { + return name().toLowerCase(); + } + } + public enum SortDirection { @SerializedName("asc") ASC, @SerializedName("desc") diff --git a/src/main/java/com/gocardless/services/SubscriptionService.java b/src/main/java/com/gocardless/services/SubscriptionService.java index 82c47479..aabb879d 100644 --- a/src/main/java/com/gocardless/services/SubscriptionService.java +++ b/src/main/java/com/gocardless/services/SubscriptionService.java @@ -256,7 +256,9 @@ public SubscriptionCreateRequest withCurrency(String currency) { *
    *
  • *
- * 28 or -1 to indicate the last day of the month. + * 31 or -1 to indicate the last day of the month. If the chosen + * day does not exist in a given month (e.g. 31 in April), the charge is made + * on the last day of that month. */ public SubscriptionCreateRequest withDayOfMonth(Integer dayOfMonth) { this.dayOfMonth = dayOfMonth;