From 771110da541c09ffac3e2cc49cb12bba815afb94 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 13:13:04 +0000 Subject: [PATCH] Changes generated by c8939115bd6320568f3249ee7926eee8aface132 This commit was automatically created from gocardless/gocardless-pro-java-template@c8939115bd6320568f3249ee7926eee8aface132 by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-java-template/actions/runs/11292980537 --- .../services/BillingRequestService.java | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/main/java/com/gocardless/services/BillingRequestService.java b/src/main/java/com/gocardless/services/BillingRequestService.java index 3dc82c6a..a9788e25 100644 --- a/src/main/java/com/gocardless/services/BillingRequestService.java +++ b/src/main/java/com/gocardless/services/BillingRequestService.java @@ -474,6 +474,26 @@ public BillingRequestCreateRequest withPaymentRequestReference(String reference) return this; } + /** + * On failure, automatically retry payments using [intelligent + * retries](#success-intelligent-retries). Default is `false`. + *

+ * Important: To be able to use intelligent retries, Success+ needs to be + * enabled in [GoCardless dashboard](https://manage.gocardless.com/success-plus). + *

+ *

+ * Important: This is not applicable to IBP and VRP payments. + *

+ */ + public BillingRequestCreateRequest withPaymentRequestRetryIfPossible( + Boolean retryIfPossible) { + if (paymentRequest == null) { + paymentRequest = new PaymentRequest(); + } + paymentRequest.withRetryIfPossible(retryIfPossible); + return this; + } + /** * (Optional) A scheme used for Open Banking payments. Currently `faster_payments` is * supported in the UK (GBP) and `sepa_credit_transfer` and `sepa_instant_credit_transfer` @@ -909,6 +929,7 @@ public static class PaymentRequest { private FundsSettlement fundsSettlement; private Map metadata; private String reference; + private Boolean retryIfPossible; private String scheme; /** @@ -981,6 +1002,22 @@ public PaymentRequest withReference(String reference) { return this; } + /** + * On failure, automatically retry payments using [intelligent + * retries](#success-intelligent-retries). Default is `false`. + *

+ * Important: To be able to use intelligent retries, Success+ needs to + * be enabled in [GoCardless dashboard](https://manage.gocardless.com/success-plus). + *

+ *

+ * Important: This is not applicable to IBP and VRP payments. + *

+ */ + public PaymentRequest withRetryIfPossible(Boolean retryIfPossible) { + this.retryIfPossible = retryIfPossible; + return this; + } + /** * (Optional) A scheme used for Open Banking payments. Currently `faster_payments` is * supported in the UK (GBP) and `sepa_credit_transfer` and