diff --git a/README.md b/README.md index 7daaec76..d0e8674e 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ With Maven: com.gocardless gocardless-pro - 7.4.0 + 7.5.0 ``` With Gradle: ``` -implementation 'com.gocardless:gocardless-pro:7.4.0' +implementation 'com.gocardless:gocardless-pro:7.5.0' ``` ## Initializing the client diff --git a/build.gradle b/build.gradle index e1ae65dd..a27c1b1c 100644 --- a/build.gradle +++ b/build.gradle @@ -25,7 +25,7 @@ plugins { sourceCompatibility = 1.8 targetCompatibility = 1.8 group = 'com.gocardless' -version = '7.4.0' +version = '7.5.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 4a54b034..4d87f53f 100644 --- a/src/main/java/com/gocardless/GoCardlessClient.java +++ b/src/main/java/com/gocardless/GoCardlessClient.java @@ -16,6 +16,7 @@ public class GoCardlessClient { private final HttpClient httpClient; private final BalanceService balances; private final BankAccountDetailService bankAccountDetails; + private final BankAccountHolderVerificationService bankAccountHolderVerifications; private final BankAuthorisationService bankAuthorisations; private final BankDetailsLookupService bankDetailsLookups; private final BillingRequestService billingRequests; @@ -43,6 +44,8 @@ public class GoCardlessClient { private final PayerAuthorisationService payerAuthorisations; private final PayerThemeService payerThemes; private final PaymentService payments; + private final PaymentAccountService paymentAccounts; + private final PaymentAccountTransactionService paymentAccountTransactions; private final PayoutService payouts; private final PayoutItemService payoutItems; private final RedirectFlowService redirectFlows; @@ -177,6 +180,7 @@ private GoCardlessClient(HttpClient httpClient) { this.httpClient = httpClient; this.balances = new BalanceService(httpClient); this.bankAccountDetails = new BankAccountDetailService(httpClient); + this.bankAccountHolderVerifications = new BankAccountHolderVerificationService(httpClient); this.bankAuthorisations = new BankAuthorisationService(httpClient); this.bankDetailsLookups = new BankDetailsLookupService(httpClient); this.billingRequests = new BillingRequestService(httpClient); @@ -204,6 +208,8 @@ private GoCardlessClient(HttpClient httpClient) { this.payerAuthorisations = new PayerAuthorisationService(httpClient); this.payerThemes = new PayerThemeService(httpClient); this.payments = new PaymentService(httpClient); + this.paymentAccounts = new PaymentAccountService(httpClient); + this.paymentAccountTransactions = new PaymentAccountTransactionService(httpClient); this.payouts = new PayoutService(httpClient); this.payoutItems = new PayoutItemService(httpClient); this.redirectFlows = new RedirectFlowService(httpClient); @@ -231,6 +237,13 @@ public BankAccountDetailService bankAccountDetails() { return bankAccountDetails; } + /** + * A service class for working with bank account holder verification resources. + */ + public BankAccountHolderVerificationService bankAccountHolderVerifications() { + return bankAccountHolderVerifications; + } + /** * A service class for working with bank authorisation resources. */ @@ -420,6 +433,20 @@ public PaymentService payments() { return payments; } + /** + * A service class for working with payment account resources. + */ + public PaymentAccountService paymentAccounts() { + return paymentAccounts; + } + + /** + * A service class for working with payment account transaction resources. + */ + public PaymentAccountTransactionService paymentAccountTransactions() { + return paymentAccountTransactions; + } + /** * A service class for working with payout resources. */ diff --git a/src/main/java/com/gocardless/http/HttpClient.java b/src/main/java/com/gocardless/http/HttpClient.java index 2d07e6c1..343cacb4 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/7.4.0 java/%s %s/%s %s/%s", + String.format("gocardless-pro-java/7.5.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", "7.4.0"); + builder.put("GoCardless-Client-Version", "7.5.0"); HEADERS = builder.build(); } private final OkHttpClient rawClient; diff --git a/src/main/java/com/gocardless/resources/BankAccountHolderVerification.java b/src/main/java/com/gocardless/resources/BankAccountHolderVerification.java new file mode 100644 index 00000000..45f996f1 --- /dev/null +++ b/src/main/java/com/gocardless/resources/BankAccountHolderVerification.java @@ -0,0 +1,94 @@ +package com.gocardless.resources; + +import com.google.gson.annotations.SerializedName; + +/** + * Represents a bank account holder verification resource returned from the API. + * + * Create a bank account holder verification for a bank account. + */ +public class BankAccountHolderVerification { + private BankAccountHolderVerification() { + // blank to prevent instantiation + } + + private String actualAccountName; + private String id; + private Result result; + private Status status; + private Type type; + + /** + * The actual account name returned by the recipient's bank, populated only in the case of a + * partial match. + */ + public String getActualAccountName() { + return actualAccountName; + } + + /** + * The unique identifier for the bank account holder verification resource, e.g. "BAHV123". + */ + public String getId() { + return id; + } + + /** + * Result of the verification, could be one of + * + */ + public Result getResult() { + return result; + } + + /** + * The status of the bank account holder verification. + * + * + */ + public Status getStatus() { + return status; + } + + /** + * Type of the verification that has been performed eg. [Confirmation of + * Payee](https://www.wearepay.uk/what-we-do/overlay-services/confirmation-of-payee/) + */ + public Type getType() { + return type; + } + + public enum Result { + @SerializedName("full_match") + FULL_MATCH, @SerializedName("partial_match") + PARTIAL_MATCH, @SerializedName("no_match") + NO_MATCH, @SerializedName("unable_to_match") + UNABLE_TO_MATCH, @SerializedName("unknown") + UNKNOWN + } + + public enum Status { + @SerializedName("pending") + PENDING, @SerializedName("completed") + COMPLETED, @SerializedName("unknown") + UNKNOWN + } + + public enum Type { + @SerializedName("confirmation_of_payee") + CONFIRMATION_OF_PAYEE, @SerializedName("unknown") + UNKNOWN + } +} diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index 055aafed..0f8d9516 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -478,7 +478,7 @@ public String getPaymentReference() { /** * On failure, automatically retry payments using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * retries](/success-plus/overview). 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). @@ -1386,9 +1386,10 @@ private CustomerBankAccount() { private Map metadata; /** - * Name of the account holder, as known by the bank. This field will be transliterated, - * upcased and truncated to 18 characters. This field is required unless the request - * includes a [customer bank account + * Name of the account holder, as known by the bank. The full name provided when the + * customer is created is stored and is available via the API, but is transliterated, + * upcased, and truncated to 18 characters in bank submissions. This field is required + * unless the request includes a [customer bank account * token](#javascript-flow-customer-bank-account-tokens). */ public String getAccountHolderName() { @@ -1756,7 +1757,7 @@ public String getPaymentReference() { /** * On failure, automatically retry payments using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * retries](/success-plus/overview). 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). diff --git a/src/main/java/com/gocardless/resources/BillingRequestWithAction.java b/src/main/java/com/gocardless/resources/BillingRequestWithAction.java index 29e6d39a..368af23f 100644 --- a/src/main/java/com/gocardless/resources/BillingRequestWithAction.java +++ b/src/main/java/com/gocardless/resources/BillingRequestWithAction.java @@ -680,7 +680,7 @@ public String getPaymentReference() { /** * On failure, automatically retry payments using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * retries](/success-plus/overview). 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). @@ -1597,9 +1597,10 @@ private CustomerBankAccount() { private Map metadata; /** - * Name of the account holder, as known by the bank. This field will be - * transliterated, upcased and truncated to 18 characters. This field is required - * unless the request includes a [customer bank account + * Name of the account holder, as known by the bank. The full name provided when the + * customer is created is stored and is available via the API, but is + * transliterated, upcased, and truncated to 18 characters in bank submissions. This + * field is required unless the request includes a [customer bank account * token](#javascript-flow-customer-bank-account-tokens). */ public String getAccountHolderName() { @@ -1970,7 +1971,7 @@ public String getPaymentReference() { /** * On failure, automatically retry payments using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * retries](/success-plus/overview). 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). diff --git a/src/main/java/com/gocardless/resources/CustomerBankAccount.java b/src/main/java/com/gocardless/resources/CustomerBankAccount.java index 214f797f..dfbe8d88 100644 --- a/src/main/java/com/gocardless/resources/CustomerBankAccount.java +++ b/src/main/java/com/gocardless/resources/CustomerBankAccount.java @@ -38,8 +38,9 @@ private CustomerBankAccount() { private Map metadata; /** - * Name of the account holder, as known by the bank. This field will be transliterated, upcased - * and truncated to 18 characters. This field is required unless the request includes a + * Name of the account holder, as known by the bank. The full name provided when the customer is + * created is stored and is available via the API, but is transliterated, upcased, and truncated + * to 18 characters in bank submissions. This field is required unless the request includes a * [customer bank account token](#javascript-flow-customer-bank-account-tokens). */ public String getAccountHolderName() { diff --git a/src/main/java/com/gocardless/resources/Event.java b/src/main/java/com/gocardless/resources/Event.java index 4059d484..f55ff232 100644 --- a/src/main/java/com/gocardless/resources/Event.java +++ b/src/main/java/com/gocardless/resources/Event.java @@ -352,6 +352,7 @@ private Links() { private String newCustomerBankAccount; private String newMandate; private String organisation; + private String outboundPayment; private String parentEvent; private String payerAuthorisation; private String payment; @@ -461,6 +462,14 @@ public String getOrganisation() { return organisation; } + /** + * If `resource_type` is `outbound_payments`, this is the ID of the outbound_payment which + * has been updated. + */ + public String getOutboundPayment() { + return outboundPayment; + } + /** * If this event was caused by another, this is the ID of the cause. For example, if a * mandate is cancelled it automatically cancels all pending payments associated with it; in diff --git a/src/main/java/com/gocardless/resources/OutboundPayment.java b/src/main/java/com/gocardless/resources/OutboundPayment.java index 8cc6689f..3ccbf976 100644 --- a/src/main/java/com/gocardless/resources/OutboundPayment.java +++ b/src/main/java/com/gocardless/resources/OutboundPayment.java @@ -11,12 +11,13 @@ * GoCardless will notify you via a [webhook](#appendix-webhooks) when the status of the outbound * payment [changes](#event-types-outbound-payment). * - *

- * Restricted: Outbound Payments are currently in Early Access and available only - * to a limited list of organisations. If you are interested in using this feature, please stay - * tuned for our public launch announcement. We are actively testing and refining our API to ensure - * it meets your needs and provides the best experience. - *

+ * ####Rate limiting + * + * Two rate limits apply to the Outbound Payments APIs: - All POST Outbound Payment endpoints + * (create, withdraw, approve, cancel and etc.) share a single rate-limit group of 300 requests per + * minute. As initiating a payment typically requires two API calls (one to create the payment and + * one to approve it), this allows you to add approximately 150 outbound payments per minute. - All + * remaining Outbound Payment endpoints are limited to 500 requests per minute. */ public class OutboundPayment { private OutboundPayment() { diff --git a/src/main/java/com/gocardless/resources/PayerAuthorisation.java b/src/main/java/com/gocardless/resources/PayerAuthorisation.java index 5907df8b..1b4bc3a9 100644 --- a/src/main/java/com/gocardless/resources/PayerAuthorisation.java +++ b/src/main/java/com/gocardless/resources/PayerAuthorisation.java @@ -164,9 +164,11 @@ private BankAccount() { private Map metadata; /** - * Name of the account holder, as known by the bank. This field will be transliterated, - * upcased and truncated to 18 characters. This field is required unless the request - * includes a [customer bank account token](#javascript-flow-customer-bank-account-tokens). + * Name of the account holder, as known by the bank. The full name provided when the + * customer is created is stored and is available via the API, but is transliterated, + * upcased, and truncated to 18 characters in bank submissions. This field is required + * unless the request includes a [customer bank account + * token](#javascript-flow-customer-bank-account-tokens). */ public String getAccountHolderName() { return accountHolderName; diff --git a/src/main/java/com/gocardless/resources/Payment.java b/src/main/java/com/gocardless/resources/Payment.java index 66af110e..bf545ee7 100644 --- a/src/main/java/com/gocardless/resources/Payment.java +++ b/src/main/java/com/gocardless/resources/Payment.java @@ -145,7 +145,7 @@ public String getReference() { /** * On failure, automatically retry the payment using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * retries](/success-plus/overview). 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). diff --git a/src/main/java/com/gocardless/resources/PaymentAccount.java b/src/main/java/com/gocardless/resources/PaymentAccount.java new file mode 100644 index 00000000..67e2706d --- /dev/null +++ b/src/main/java/com/gocardless/resources/PaymentAccount.java @@ -0,0 +1,92 @@ +package com.gocardless.resources; + +/** + * Represents a payment account resource returned from the API. + * + * Access the details of bank accounts provided for you by GoCardless that are used to fund + * [Outbound Payments](#core-endpoints-outbound-payments). + */ +public class PaymentAccount { + private PaymentAccount() { + // blank to prevent instantiation + } + + private Integer accountBalance; + private String accountHolderName; + private String accountNumberEnding; + private String bankName; + private String currency; + private String id; + private Links links; + + /** + * Current balance on a payment account in the lowest denomination for the currency (e.g. pence + * in GBP, cents in EUR). It is time-sensitive as it is ever changing. + */ + public Integer getAccountBalance() { + return accountBalance; + } + + /** + * Name of the account holder, as known by the bank. Usually this is the same as the name stored + * with the linked [creditor](#core-endpoints-creditors). This field will be transliterated, + * upcased and truncated to 18 characters. + */ + public String getAccountHolderName() { + return accountHolderName; + } + + /** + * The last few digits of the account number. Currently 4 digits for NZD bank accounts and 2 + * digits for other currencies. + */ + public String getAccountNumberEnding() { + return accountNumberEnding; + } + + /** + * Name of bank, taken from the bank details. + */ + public String getBankName() { + return bankName; + } + + /** + * [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 String getCurrency() { + return currency; + } + + /** + * Unique identifier, beginning with "BA". + */ + public String getId() { + return id; + } + + public Links getLinks() { + return links; + } + + /** + * Represents a link resource returned from the API. + * + * + */ + public static class Links { + private Links() { + // blank to prevent instantiation + } + + private String creditor; + + /** + * ID of the [creditor](#core-endpoints-creditors) that owns this bank account. + */ + public String getCreditor() { + return creditor; + } + } +} diff --git a/src/main/java/com/gocardless/resources/PaymentAccountTransaction.java b/src/main/java/com/gocardless/resources/PaymentAccountTransaction.java new file mode 100644 index 00000000..621511fd --- /dev/null +++ b/src/main/java/com/gocardless/resources/PaymentAccountTransaction.java @@ -0,0 +1,146 @@ +package com.gocardless.resources; + +import com.google.gson.annotations.SerializedName; + +/** + * Represents a payment account transaction resource returned from the API. + * + * Payment account transactions represent movements of funds on a given payment account. The payment + * account is provisioned by GoCardless and is used to fund [outbound + * payments](#core-endpoints-outbound-payments). + */ +public class PaymentAccountTransaction { + private PaymentAccountTransaction() { + // blank to prevent instantiation + } + + private Integer amount; + private Integer balanceAfterTransaction; + private String counterpartyName; + private Currency currency; + private String description; + private Direction direction; + private String id; + private Links links; + private String reference; + private String valueDate; + + /** + * Amount, in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR). + */ + public Integer getAmount() { + return amount; + } + + /** + * Balance after transaction, in the lowest denomination for the currency (e.g. pence in GBP, + * cents in EUR). + */ + public Integer getBalanceAfterTransaction() { + return balanceAfterTransaction; + } + + /** + * The name of the counterparty of the transaction. The counterparty is the recipient for a + * credit, or the sender for a debit. + */ + public String getCounterpartyName() { + return counterpartyName; + } + + /** + * The currency of the transaction. + */ + public Currency getCurrency() { + return currency; + } + + /** + * The description of the transaction, if available + */ + public String getDescription() { + return description; + } + + /** + * The direction of the transaction. Debits mean money leaving the account (e.g. outbound + * payment), while credits signify money coming in (e.g. manual top-up). + */ + public Direction getDirection() { + return direction; + } + + /** + * The unique ID of the payment account transaction. + */ + public String getId() { + return id; + } + + public Links getLinks() { + return links; + } + + /** + * The reference of the transaction. This is typically supplied by the sender. + */ + public String getReference() { + return reference; + } + + /** + * The date of when the transaction occurred. + */ + public String getValueDate() { + return valueDate; + } + + public enum Currency { + @SerializedName("GBP") + GBP, @SerializedName("unknown") + UNKNOWN + } + + public enum Direction { + @SerializedName("credit") + CREDIT, @SerializedName("debit") + DEBIT, @SerializedName("unknown") + UNKNOWN + } + + /** + * Represents a link resource returned from the API. + * + * + */ + public static class Links { + private Links() { + // blank to prevent instantiation + } + + private String outboundPayment; + private String paymentBankAccount; + private String payout; + + /** + * ID of the [outbound_payment](#core-endpoints-outbound-payments) linked to the transaction + */ + public String getOutboundPayment() { + return outboundPayment; + } + + /** + * ID of the payment bank account. + */ + public String getPaymentBankAccount() { + return paymentBankAccount; + } + + /** + * ID of the [payout](#core-endpoints-payouts) linked to the transaction. + */ + public String getPayout() { + return payout; + } + } +} diff --git a/src/main/java/com/gocardless/resources/Subscription.java b/src/main/java/com/gocardless/resources/Subscription.java index 79ba1e13..fb0550c7 100644 --- a/src/main/java/com/gocardless/resources/Subscription.java +++ b/src/main/java/com/gocardless/resources/Subscription.java @@ -208,8 +208,8 @@ public String getPaymentReference() { } /** - * On failure, automatically retry payments using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * On failure, automatically retry payments using [intelligent retries](/success-plus/overview). + * 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). diff --git a/src/main/java/com/gocardless/services/BankAccountHolderVerificationService.java b/src/main/java/com/gocardless/services/BankAccountHolderVerificationService.java new file mode 100644 index 00000000..a413932c --- /dev/null +++ b/src/main/java/com/gocardless/services/BankAccountHolderVerificationService.java @@ -0,0 +1,193 @@ +package com.gocardless.services; + +import com.gocardless.http.*; +import com.gocardless.resources.BankAccountHolderVerification; +import com.google.common.collect.ImmutableMap; +import com.google.gson.annotations.SerializedName; +import java.util.Map; + +/** + * Service class for working with bank account holder verification resources. + * + * Create a bank account holder verification for a bank account. + */ +public class BankAccountHolderVerificationService { + 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#bankAccountHolderVerifications() }. + */ + public BankAccountHolderVerificationService(HttpClient httpClient) { + this.httpClient = httpClient; + } + + /** + * Verify the account holder of the bank account. A complete verification can be attached when + * creating an outbound payment. This endpoint allows partner merchants to create Confirmation + * of Payee checks on customer bank accounts before sending outbound payments. + */ + public BankAccountHolderVerificationCreateRequest create() { + return new BankAccountHolderVerificationCreateRequest(httpClient); + } + + /** + * Fetches a bank account holder verification by ID. + */ + public BankAccountHolderVerificationGetRequest get(String identity) { + return new BankAccountHolderVerificationGetRequest(httpClient, identity); + } + + /** + * Request class for {@link BankAccountHolderVerificationService#create }. + * + * Verify the account holder of the bank account. A complete verification can be attached when + * creating an outbound payment. This endpoint allows partner merchants to create Confirmation + * of Payee checks on customer bank accounts before sending outbound payments. + */ + public static final class BankAccountHolderVerificationCreateRequest + extends IdempotentPostRequest { + private Links links; + private Type type; + + public BankAccountHolderVerificationCreateRequest withLinks(Links links) { + this.links = links; + return this; + } + + /** + * The ID of the bank account to verify, e.g. "BA123". + */ + public BankAccountHolderVerificationCreateRequest withLinksBankAccount(String bankAccount) { + if (links == null) { + links = new Links(); + } + links.withBankAccount(bankAccount); + return this; + } + + /** + * Type of the verification that has been performed eg. [Confirmation of + * Payee](https://www.wearepay.uk/what-we-do/overlay-services/confirmation-of-payee/) + */ + public BankAccountHolderVerificationCreateRequest withType(Type type) { + this.type = type; + return this; + } + + public BankAccountHolderVerificationCreateRequest withIdempotencyKey( + String idempotencyKey) { + super.setIdempotencyKey(idempotencyKey); + return this; + } + + @Override + protected GetRequest handleConflict(HttpClient httpClient, + String id) { + BankAccountHolderVerificationGetRequest request = + new BankAccountHolderVerificationGetRequest(httpClient, id); + for (Map.Entry header : this.getCustomHeaders().entrySet()) { + request = request.withHeader(header.getKey(), header.getValue()); + } + return request; + } + + private BankAccountHolderVerificationCreateRequest(HttpClient httpClient) { + super(httpClient); + } + + public BankAccountHolderVerificationCreateRequest withHeader(String headerName, + String headerValue) { + this.addHeader(headerName, headerValue); + return this; + } + + @Override + protected String getPathTemplate() { + return "bank_account_holder_verifications"; + } + + @Override + protected String getEnvelope() { + return "bank_account_holder_verifications"; + } + + @Override + protected Class getResponseClass() { + return BankAccountHolderVerification.class; + } + + @Override + protected boolean hasBody() { + return true; + } + + public enum Type { + @SerializedName("confirmation_of_payee") + CONFIRMATION_OF_PAYEE, @SerializedName("unknown") + UNKNOWN; + + @Override + public String toString() { + return name().toLowerCase(); + } + } + + public static class Links { + private String bankAccount; + + /** + * The ID of the bank account to verify, e.g. "BA123". + */ + public Links withBankAccount(String bankAccount) { + this.bankAccount = bankAccount; + return this; + } + } + } + + /** + * Request class for {@link BankAccountHolderVerificationService#get }. + * + * Fetches a bank account holder verification by ID. + */ + public static final class BankAccountHolderVerificationGetRequest + extends GetRequest { + @PathParam + private final String identity; + + private BankAccountHolderVerificationGetRequest(HttpClient httpClient, String identity) { + super(httpClient); + this.identity = identity; + } + + public BankAccountHolderVerificationGetRequest 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 "bank_account_holder_verifications/:identity"; + } + + @Override + protected String getEnvelope() { + return "bank_account_holder_verifications"; + } + + @Override + protected Class getResponseClass() { + return BankAccountHolderVerification.class; + } + } +} diff --git a/src/main/java/com/gocardless/services/BillingRequestService.java b/src/main/java/com/gocardless/services/BillingRequestService.java index 2285470f..795ff2cf 100644 --- a/src/main/java/com/gocardless/services/BillingRequestService.java +++ b/src/main/java/com/gocardless/services/BillingRequestService.java @@ -293,7 +293,7 @@ public BillingRequestCreateRequest withInstalmentScheduleRequestPaymentReference /** * On failure, automatically retry payments using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * retries](/success-plus/overview). 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). @@ -663,7 +663,7 @@ public BillingRequestCreateRequest withPaymentRequestReference(String reference) /** * On failure, automatically retry payments using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * retries](/success-plus/overview). 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). @@ -851,7 +851,7 @@ public BillingRequestCreateRequest withSubscriptionRequestPaymentReference( /** * On failure, automatically retry payments using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * retries](/success-plus/overview). 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). @@ -1161,7 +1161,7 @@ public InstalmentScheduleRequest withPaymentReference(String paymentReference) { /** * On failure, automatically retry payments using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * retries](/success-plus/overview). 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). @@ -1670,7 +1670,7 @@ public PaymentRequest withReference(String reference) { /** * On failure, automatically retry payments using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * retries](/success-plus/overview). 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). @@ -1827,7 +1827,7 @@ public SubscriptionRequest withPaymentReference(String paymentReference) { /** * On failure, automatically retry payments using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * retries](/success-plus/overview). 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). @@ -2410,9 +2410,11 @@ public static final class BillingRequestCollectBankAccountRequest private String payId; /** - * Name of the account holder, as known by the bank. This field will be transliterated, - * upcased and truncated to 18 characters. This field is required unless the request - * includes a [customer bank account token](#javascript-flow-customer-bank-account-tokens). + * Name of the account holder, as known by the bank. The full name provided when the + * customer is created is stored and is available via the API, but is transliterated, + * upcased, and truncated to 18 characters in bank submissions. This field is required + * unless the request includes a [customer bank account + * token](#javascript-flow-customer-bank-account-tokens). */ public BillingRequestCollectBankAccountRequest withAccountHolderName( String accountHolderName) { diff --git a/src/main/java/com/gocardless/services/BillingRequestWithActionService.java b/src/main/java/com/gocardless/services/BillingRequestWithActionService.java index a08847d3..84925a12 100644 --- a/src/main/java/com/gocardless/services/BillingRequestWithActionService.java +++ b/src/main/java/com/gocardless/services/BillingRequestWithActionService.java @@ -481,7 +481,7 @@ public BillingRequestWithActionCreateWithActionsRequest withPaymentRequestRefere /** * On failure, automatically retry payments using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * retries](/success-plus/overview). 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). @@ -597,9 +597,10 @@ public static class CollectBankAccount { private String payId; /** - * Name of the account holder, as known by the bank. This field will be transliterated, - * upcased and truncated to 18 characters. This field is required unless the request - * includes a [customer bank account + * Name of the account holder, as known by the bank. The full name provided when the + * customer is created is stored and is available via the API, but is transliterated, + * upcased, and truncated to 18 characters in bank submissions. This field is required + * unless the request includes a [customer bank account * token](#javascript-flow-customer-bank-account-tokens). */ public CollectBankAccount withAccountHolderName(String accountHolderName) { @@ -1620,7 +1621,7 @@ public PaymentRequest withReference(String reference) { /** * On failure, automatically retry payments using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * retries](/success-plus/overview). 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). diff --git a/src/main/java/com/gocardless/services/CustomerBankAccountService.java b/src/main/java/com/gocardless/services/CustomerBankAccountService.java index b673c16f..6e95c65a 100644 --- a/src/main/java/com/gocardless/services/CustomerBankAccountService.java +++ b/src/main/java/com/gocardless/services/CustomerBankAccountService.java @@ -124,9 +124,11 @@ public static final class CustomerBankAccountCreateRequest private Map metadata; /** - * Name of the account holder, as known by the bank. This field will be transliterated, - * upcased and truncated to 18 characters. This field is required unless the request - * includes a [customer bank account token](#javascript-flow-customer-bank-account-tokens). + * Name of the account holder, as known by the bank. The full name provided when the + * customer is created is stored and is available via the API, but is transliterated, + * upcased, and truncated to 18 characters in bank submissions. This field is required + * unless the request includes a [customer bank account + * token](#javascript-flow-customer-bank-account-tokens). */ public CustomerBankAccountCreateRequest withAccountHolderName(String accountHolderName) { this.accountHolderName = accountHolderName; diff --git a/src/main/java/com/gocardless/services/EventService.java b/src/main/java/com/gocardless/services/EventService.java index dc440042..0f628472 100644 --- a/src/main/java/com/gocardless/services/EventService.java +++ b/src/main/java/com/gocardless/services/EventService.java @@ -218,8 +218,8 @@ public EventListRequest withMandate(String mandate) { } /** - * ID of an outbound_payment. If specified, this endpoint will return all events for the - * given payment. + * ID of an [outbound_payment](#core-endpoints-outbound-payments). If specified, this + * endpoint will return all events for the given payment. */ public EventListRequest withOutboundPayment(String outboundPayment) { this.outboundPayment = outboundPayment; diff --git a/src/main/java/com/gocardless/services/InstalmentScheduleService.java b/src/main/java/com/gocardless/services/InstalmentScheduleService.java index fbe604c6..e563850c 100644 --- a/src/main/java/com/gocardless/services/InstalmentScheduleService.java +++ b/src/main/java/com/gocardless/services/InstalmentScheduleService.java @@ -252,7 +252,7 @@ public InstalmentScheduleCreateWithDatesRequest withPaymentReference( /** * On failure, automatically retry payments using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * retries](/success-plus/overview). 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). @@ -578,7 +578,7 @@ public InstalmentScheduleCreateWithScheduleRequest withPaymentReference( /** * On failure, automatically retry payments using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * retries](/success-plus/overview). 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). diff --git a/src/main/java/com/gocardless/services/MandateImportEntryService.java b/src/main/java/com/gocardless/services/MandateImportEntryService.java index 04eea12a..cf79aa06 100644 --- a/src/main/java/com/gocardless/services/MandateImportEntryService.java +++ b/src/main/java/com/gocardless/services/MandateImportEntryService.java @@ -145,9 +145,11 @@ public MandateImportEntryCreateRequest withBankAccount(BankAccount bankAccount) } /** - * Name of the account holder, as known by the bank. This field will be transliterated, - * upcased and truncated to 18 characters. This field is required unless the request - * includes a [customer bank account token](#javascript-flow-customer-bank-account-tokens). + * Name of the account holder, as known by the bank. The full name provided when the + * customer is created is stored and is available via the API, but is transliterated, + * upcased, and truncated to 18 characters in bank submissions. This field is required + * unless the request includes a [customer bank account + * token](#javascript-flow-customer-bank-account-tokens). */ public MandateImportEntryCreateRequest withBankAccountAccountHolderName( String accountHolderName) { @@ -581,9 +583,10 @@ public static class BankAccount { private Map metadata; /** - * Name of the account holder, as known by the bank. This field will be transliterated, - * upcased and truncated to 18 characters. This field is required unless the request - * includes a [customer bank account + * Name of the account holder, as known by the bank. The full name provided when the + * customer is created is stored and is available via the API, but is transliterated, + * upcased, and truncated to 18 characters in bank submissions. This field is required + * unless the request includes a [customer bank account * token](#javascript-flow-customer-bank-account-tokens). */ public BankAccount withAccountHolderName(String accountHolderName) { diff --git a/src/main/java/com/gocardless/services/OutboundPaymentService.java b/src/main/java/com/gocardless/services/OutboundPaymentService.java index 2c024924..f62957cb 100644 --- a/src/main/java/com/gocardless/services/OutboundPaymentService.java +++ b/src/main/java/com/gocardless/services/OutboundPaymentService.java @@ -17,12 +17,13 @@ * GoCardless will notify you via a [webhook](#appendix-webhooks) when the status of the outbound * payment [changes](#event-types-outbound-payment). * - *

- * Restricted: Outbound Payments are currently in Early Access and available only - * to a limited list of organisations. If you are interested in using this feature, please stay - * tuned for our public launch announcement. We are actively testing and refining our API to ensure - * it meets your needs and provides the best experience. - *

+ * ####Rate limiting + * + * Two rate limits apply to the Outbound Payments APIs: - All POST Outbound Payment endpoints + * (create, withdraw, approve, cancel and etc.) share a single rate-limit group of 300 requests per + * minute. As initiating a payment typically requires two API calls (one to create the payment and + * one to approve it), this allows you to add approximately 150 outbound payments per minute. - All + * remaining Outbound Payment endpoints are limited to 500 requests per minute. */ public class OutboundPaymentService { private final HttpClient httpClient; @@ -93,6 +94,13 @@ public OutboundPaymentUpdateRequest update(String identity) { return new OutboundPaymentUpdateRequest(httpClient, identity); } + /** + * Retrieve aggregate statistics on outbound payments. + */ + public OutboundPaymentStatsRequest stats() { + return new OutboundPaymentStatsRequest(httpClient); + } + /** * Request class for {@link OutboundPaymentService#create }. * @@ -808,4 +816,42 @@ protected boolean hasBody() { return true; } } + + /** + * Request class for {@link OutboundPaymentService#stats }. + * + * Retrieve aggregate statistics on outbound payments. + */ + public static final class OutboundPaymentStatsRequest extends GetRequest { + private OutboundPaymentStatsRequest(HttpClient httpClient) { + super(httpClient); + } + + public OutboundPaymentStatsRequest withHeader(String headerName, String headerValue) { + this.addHeader(headerName, headerValue); + return this; + } + + @Override + protected Map getQueryParams() { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.putAll(super.getQueryParams()); + return params.build(); + } + + @Override + protected String getPathTemplate() { + return "outbound_payments/stats"; + } + + @Override + protected String getEnvelope() { + return "outbound_payments"; + } + + @Override + protected Class getResponseClass() { + return OutboundPayment.class; + } + } } diff --git a/src/main/java/com/gocardless/services/PayerAuthorisationService.java b/src/main/java/com/gocardless/services/PayerAuthorisationService.java index b7090445..796ba0a9 100644 --- a/src/main/java/com/gocardless/services/PayerAuthorisationService.java +++ b/src/main/java/com/gocardless/services/PayerAuthorisationService.java @@ -191,9 +191,11 @@ public PayerAuthorisationCreateRequest withBankAccount(BankAccount bankAccount) } /** - * Name of the account holder, as known by the bank. This field will be transliterated, - * upcased and truncated to 18 characters. This field is required unless the request - * includes a [customer bank account token](#javascript-flow-customer-bank-account-tokens). + * Name of the account holder, as known by the bank. The full name provided when the + * customer is created is stored and is available via the API, but is transliterated, + * upcased, and truncated to 18 characters in bank submissions. This field is required + * unless the request includes a [customer bank account + * token](#javascript-flow-customer-bank-account-tokens). */ public PayerAuthorisationCreateRequest withBankAccountAccountHolderName( String accountHolderName) { @@ -638,9 +640,10 @@ public static class BankAccount { private Map metadata; /** - * Name of the account holder, as known by the bank. This field will be transliterated, - * upcased and truncated to 18 characters. This field is required unless the request - * includes a [customer bank account + * Name of the account holder, as known by the bank. The full name provided when the + * customer is created is stored and is available via the API, but is transliterated, + * upcased, and truncated to 18 characters in bank submissions. This field is required + * unless the request includes a [customer bank account * token](#javascript-flow-customer-bank-account-tokens). */ public BankAccount withAccountHolderName(String accountHolderName) { @@ -1008,9 +1011,11 @@ public PayerAuthorisationUpdateRequest withBankAccount(BankAccount bankAccount) } /** - * Name of the account holder, as known by the bank. This field will be transliterated, - * upcased and truncated to 18 characters. This field is required unless the request - * includes a [customer bank account token](#javascript-flow-customer-bank-account-tokens). + * Name of the account holder, as known by the bank. The full name provided when the + * customer is created is stored and is available via the API, but is transliterated, + * upcased, and truncated to 18 characters in bank submissions. This field is required + * unless the request includes a [customer bank account + * token](#javascript-flow-customer-bank-account-tokens). */ public PayerAuthorisationUpdateRequest withBankAccountAccountHolderName( String accountHolderName) { @@ -1449,9 +1454,10 @@ public static class BankAccount { private Map metadata; /** - * Name of the account holder, as known by the bank. This field will be transliterated, - * upcased and truncated to 18 characters. This field is required unless the request - * includes a [customer bank account + * Name of the account holder, as known by the bank. The full name provided when the + * customer is created is stored and is available via the API, but is transliterated, + * upcased, and truncated to 18 characters in bank submissions. This field is required + * unless the request includes a [customer bank account * token](#javascript-flow-customer-bank-account-tokens). */ public BankAccount withAccountHolderName(String accountHolderName) { diff --git a/src/main/java/com/gocardless/services/PaymentAccountService.java b/src/main/java/com/gocardless/services/PaymentAccountService.java new file mode 100644 index 00000000..266edf4b --- /dev/null +++ b/src/main/java/com/gocardless/services/PaymentAccountService.java @@ -0,0 +1,151 @@ +package com.gocardless.services; + +import com.gocardless.http.*; +import com.gocardless.resources.PaymentAccount; +import com.google.common.collect.ImmutableMap; +import com.google.gson.reflect.TypeToken; +import java.util.List; +import java.util.Map; + +/** + * Service class for working with payment account resources. + * + * Access the details of bank accounts provided for you by GoCardless that are used to fund + * [Outbound Payments](#core-endpoints-outbound-payments). + */ +public class PaymentAccountService { + 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#paymentAccounts() }. + */ + public PaymentAccountService(HttpClient httpClient) { + this.httpClient = httpClient; + } + + /** + * Retrieves the details of an existing payment account. + */ + public PaymentAccountGetRequest get(String identity) { + return new PaymentAccountGetRequest(httpClient, identity); + } + + /** + * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your payment accounts. + */ + public PaymentAccountListRequest> list() { + return new PaymentAccountListRequest<>(httpClient, + ListRequest.pagingExecutor()); + } + + public PaymentAccountListRequest> all() { + return new PaymentAccountListRequest<>(httpClient, + ListRequest.iteratingExecutor()); + } + + /** + * Request class for {@link PaymentAccountService#get }. + * + * Retrieves the details of an existing payment account. + */ + public static final class PaymentAccountGetRequest extends GetRequest { + @PathParam + private final String identity; + + private PaymentAccountGetRequest(HttpClient httpClient, String identity) { + super(httpClient); + this.identity = identity; + } + + public PaymentAccountGetRequest 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 "payment_accounts/:identity"; + } + + @Override + protected String getEnvelope() { + return "payment_accounts"; + } + + @Override + protected Class getResponseClass() { + return PaymentAccount.class; + } + } + + /** + * Request class for {@link PaymentAccountService#list }. + * + * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your payment accounts. + */ + public static final class PaymentAccountListRequest extends ListRequest { + /** + * Cursor pointing to the start of the desired set. + */ + public PaymentAccountListRequest withAfter(String after) { + setAfter(after); + return this; + } + + /** + * Cursor pointing to the end of the desired set. + */ + public PaymentAccountListRequest withBefore(String before) { + setBefore(before); + return this; + } + + /** + * Number of records to return. + */ + public PaymentAccountListRequest withLimit(Integer limit) { + setLimit(limit); + return this; + } + + private PaymentAccountListRequest(HttpClient httpClient, + ListRequestExecutor executor) { + super(httpClient, executor); + } + + public PaymentAccountListRequest withHeader(String headerName, String headerValue) { + this.addHeader(headerName, headerValue); + return this; + } + + @Override + protected Map getQueryParams() { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.putAll(super.getQueryParams()); + return params.build(); + } + + @Override + protected String getPathTemplate() { + return "payment_accounts"; + } + + @Override + protected String getEnvelope() { + return "payment_accounts"; + } + + @Override + protected TypeToken> getTypeToken() { + return new TypeToken>() {}; + } + } +} diff --git a/src/main/java/com/gocardless/services/PaymentAccountTransactionService.java b/src/main/java/com/gocardless/services/PaymentAccountTransactionService.java new file mode 100644 index 00000000..a4f233f4 --- /dev/null +++ b/src/main/java/com/gocardless/services/PaymentAccountTransactionService.java @@ -0,0 +1,169 @@ +package com.gocardless.services; + +import com.gocardless.http.*; +import com.gocardless.resources.PaymentAccountTransaction; +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 payment account transaction resources. + * + * Payment account transactions represent movements of funds on a given payment account. The payment + * account is provisioned by GoCardless and is used to fund [outbound + * payments](#core-endpoints-outbound-payments). + */ +public class PaymentAccountTransactionService { + 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#paymentAccountTransactions() }. + */ + public PaymentAccountTransactionService(HttpClient httpClient) { + this.httpClient = httpClient; + } + + /** + * List transactions for a given payment account. + */ + public PaymentAccountTransactionListRequest> list( + String identity) { + return new PaymentAccountTransactionListRequest<>(httpClient, + ListRequest.pagingExecutor(), identity); + } + + public PaymentAccountTransactionListRequest> all( + String identity) { + return new PaymentAccountTransactionListRequest<>(httpClient, + ListRequest.iteratingExecutor(), identity); + } + + /** + * Request class for {@link PaymentAccountTransactionService#list }. + * + * List transactions for a given payment account. + */ + public static final class PaymentAccountTransactionListRequest + extends ListRequest { + @PathParam + private final String identity; + private Direction direction; + private String valueDateFrom; + private String valueDateTo; + + /** + * Cursor pointing to the start of the desired set. + */ + public PaymentAccountTransactionListRequest withAfter(String after) { + setAfter(after); + return this; + } + + /** + * Cursor pointing to the end of the desired set. + */ + public PaymentAccountTransactionListRequest withBefore(String before) { + setBefore(before); + return this; + } + + /** + * The direction of the transaction. Debits mean money leaving the account (e.g. outbound + * payment), while credits signify money coming in (e.g. manual top-up). + */ + public PaymentAccountTransactionListRequest withDirection(Direction direction) { + this.direction = direction; + return this; + } + + /** + * Number of records to return. + */ + public PaymentAccountTransactionListRequest withLimit(Integer limit) { + setLimit(limit); + return this; + } + + /** + * The beginning of query period + */ + public PaymentAccountTransactionListRequest withValueDateFrom(String valueDateFrom) { + this.valueDateFrom = valueDateFrom; + return this; + } + + /** + * The end of query period + */ + public PaymentAccountTransactionListRequest withValueDateTo(String valueDateTo) { + this.valueDateTo = valueDateTo; + return this; + } + + private PaymentAccountTransactionListRequest(HttpClient httpClient, + ListRequestExecutor executor, String identity) { + super(httpClient, executor); + this.identity = identity; + } + + public PaymentAccountTransactionListRequest 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 (direction != null) { + params.put("direction", direction); + } + if (valueDateFrom != null) { + params.put("value_date_from", valueDateFrom); + } + if (valueDateTo != null) { + params.put("value_date_to", valueDateTo); + } + return params.build(); + } + + @Override + protected String getPathTemplate() { + return "payment_accounts/:identity/transactions"; + } + + @Override + protected String getEnvelope() { + return "payment_account_transactions"; + } + + @Override + protected TypeToken> getTypeToken() { + return new TypeToken>() {}; + } + + public enum Direction { + @SerializedName("credit") + CREDIT, @SerializedName("debit") + DEBIT, @SerializedName("unknown") + UNKNOWN; + + @Override + public String toString() { + return name().toLowerCase(); + } + } + } +} diff --git a/src/main/java/com/gocardless/services/PaymentService.java b/src/main/java/com/gocardless/services/PaymentService.java index b2530e00..cb6d3fa8 100644 --- a/src/main/java/com/gocardless/services/PaymentService.java +++ b/src/main/java/com/gocardless/services/PaymentService.java @@ -241,7 +241,7 @@ public PaymentCreateRequest withReference(String reference) { /** * On failure, automatically retry the payment using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * retries](/success-plus/overview). 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). @@ -890,7 +890,7 @@ public PaymentUpdateRequest withMetadata(String key, String value) { /** * On failure, automatically retry the payment using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * retries](/success-plus/overview). 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). diff --git a/src/main/java/com/gocardless/services/SubscriptionService.java b/src/main/java/com/gocardless/services/SubscriptionService.java index 22d8d595..301a9ef0 100644 --- a/src/main/java/com/gocardless/services/SubscriptionService.java +++ b/src/main/java/com/gocardless/services/SubscriptionService.java @@ -356,7 +356,7 @@ public SubscriptionCreateRequest withPaymentReference(String paymentReference) { /** * On failure, automatically retry payments using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * retries](/success-plus/overview). 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). @@ -855,7 +855,7 @@ public SubscriptionUpdateRequest withPaymentReference(String paymentReference) { /** * On failure, automatically retry payments using [intelligent - * retries](#success-intelligent-retries). Default is `false`. + * retries](/success-plus/overview). 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).