diff --git a/README.md b/README.md
index 7daaec76..d0e8674e 100644
--- a/README.md
+++ b/README.md
@@ -14,14 +14,14 @@ With Maven:
* 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
* 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
* 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
- * 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.
- *
* 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
* 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
* 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
- * 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.
- *
* 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).
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`.
* 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> 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
+ 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> 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`.
*