From e56ea2295b838950811a1bf591d860565111a24e Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Tue, 16 Jun 2026 13:12:24 +0000 Subject: [PATCH 1/9] Changes generated by c1a246cf193597d4a75b4787fe464fa9d5cbf101 This commit was automatically created from gocardless/client-library-templates@c1a246cf193597d4a75b4787fe464fa9d5cbf101 by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/27619830131 --- .../resources/BillingRequestTemplate.java | 35 +------- .../BillingRequestTemplateService.java | 80 ++----------------- 2 files changed, 9 insertions(+), 106 deletions(-) diff --git a/src/main/java/com/gocardless/resources/BillingRequestTemplate.java b/src/main/java/com/gocardless/resources/BillingRequestTemplate.java index 0dd9d044..332dd013 100644 --- a/src/main/java/com/gocardless/resources/BillingRequestTemplate.java +++ b/src/main/java/com/gocardless/resources/BillingRequestTemplate.java @@ -31,7 +31,7 @@ private BillingRequestTemplate() { private String mandateRequestDescription; private Map mandateRequestMetadata; private String mandateRequestScheme; - private MandateRequestVerify mandateRequestVerify; + private String mandateRequestVerify; private Map metadata; private String name; private String paymentRequestAmount; @@ -108,29 +108,9 @@ public String getMandateRequestScheme() { } /** - * Verification preference for the mandate. One of: - * - * - * By default, all Billing Requests use the `recommended` verification preference. It uses - * GoCardless payment intelligence solution to determine if a payer is fraudulent or not. The - * verification mechanism is based on the response and the payer may be asked to verify - * themselves. If the feature is not available, `recommended` behaves like `minimum`. - * - * If you never wish to take advantage of our reduced risk products and Verified Mandates as - * they are released in new schemes, please use the `minimum` verification preference. - * - * See [Billing Requests: Creating Verified - * Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) - * for more information. + * Verification preference for the mandate. */ - public MandateRequestVerify getMandateRequestVerify() { + public String getMandateRequestVerify() { return mandateRequestVerify; } @@ -210,15 +190,6 @@ public String getUpdatedAt() { return updatedAt; } - public enum MandateRequestVerify { - @SerializedName("minimum") - MINIMUM, @SerializedName("recommended") - RECOMMENDED, @SerializedName("when_available") - WHEN_AVAILABLE, @SerializedName("always") - ALWAYS, @SerializedName("unknown") - UNKNOWN - } - /** * Represents a mandate request constraint resource returned from the API. * diff --git a/src/main/java/com/gocardless/services/BillingRequestTemplateService.java b/src/main/java/com/gocardless/services/BillingRequestTemplateService.java index a30383cb..3f2ecef8 100644 --- a/src/main/java/com/gocardless/services/BillingRequestTemplateService.java +++ b/src/main/java/com/gocardless/services/BillingRequestTemplateService.java @@ -211,7 +211,7 @@ public static final class BillingRequestTemplateCreateRequest private String mandateRequestDescription; private Map mandateRequestMetadata; private String mandateRequestScheme; - private MandateRequestVerify mandateRequestVerify; + private String mandateRequestVerify; private Map metadata; private String name; private String paymentRequestAmount; @@ -377,30 +377,10 @@ public BillingRequestTemplateCreateRequest withMandateRequestScheme( } /** - * Verification preference for the mandate. One of: - *
    - *
  • `minimum`: only verify if absolutely required, such as when part of scheme rules
  • - *
  • `recommended`: in addition to `minimum`, use the GoCardless payment intelligence - * solution to decide if a payer should be verified
  • - *
  • `when_available`: if verification mechanisms are available, use them
  • - *
  • `always`: as `when_available`, but fail to create the Billing Request if a mechanism - * isn't available
  • - *
- * - * By default, all Billing Requests use the `recommended` verification preference. It uses - * GoCardless payment intelligence solution to determine if a payer is fraudulent or not. - * The verification mechanism is based on the response and the payer may be asked to verify - * themselves. If the feature is not available, `recommended` behaves like `minimum`. - * - * If you never wish to take advantage of our reduced risk products and Verified Mandates as - * they are released in new schemes, please use the `minimum` verification preference. - * - * See [Billing Requests: Creating Verified - * Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) - * for more information. + * Verification preference for the mandate. */ public BillingRequestTemplateCreateRequest withMandateRequestVerify( - MandateRequestVerify mandateRequestVerify) { + String mandateRequestVerify) { this.mandateRequestVerify = mandateRequestVerify; return this; } @@ -558,20 +538,6 @@ protected boolean hasBody() { return true; } - public enum MandateRequestVerify { - @SerializedName("minimum") - MINIMUM, @SerializedName("recommended") - RECOMMENDED, @SerializedName("when_available") - WHEN_AVAILABLE, @SerializedName("always") - ALWAYS, @SerializedName("unknown") - UNKNOWN; - - @Override - public String toString() { - return name().toLowerCase(); - } - } - public static class Links { private String creditor; @@ -759,7 +725,7 @@ public static final class BillingRequestTemplateUpdateRequest private String mandateRequestDescription; private Map mandateRequestMetadata; private String mandateRequestScheme; - private MandateRequestVerify mandateRequestVerify; + private String mandateRequestVerify; private Map metadata; private String name; private String paymentRequestAmount; @@ -908,30 +874,10 @@ public BillingRequestTemplateUpdateRequest withMandateRequestScheme( } /** - * Verification preference for the mandate. One of: - *
    - *
  • `minimum`: only verify if absolutely required, such as when part of scheme rules
  • - *
  • `recommended`: in addition to `minimum`, use the GoCardless payment intelligence - * solution to decide if a payer should be verified
  • - *
  • `when_available`: if verification mechanisms are available, use them
  • - *
  • `always`: as `when_available`, but fail to create the Billing Request if a mechanism - * isn't available
  • - *
- * - * By default, all Billing Requests use the `recommended` verification preference. It uses - * GoCardless payment intelligence solution to determine if a payer is fraudulent or not. - * The verification mechanism is based on the response and the payer may be asked to verify - * themselves. If the feature is not available, `recommended` behaves like `minimum`. - * - * If you never wish to take advantage of our reduced risk products and Verified Mandates as - * they are released in new schemes, please use the `minimum` verification preference. - * - * See [Billing Requests: Creating Verified - * Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) - * for more information. + * Verification preference for the mandate. */ public BillingRequestTemplateUpdateRequest withMandateRequestVerify( - MandateRequestVerify mandateRequestVerify) { + String mandateRequestVerify) { this.mandateRequestVerify = mandateRequestVerify; return this; } @@ -1081,20 +1027,6 @@ protected boolean hasBody() { return true; } - public enum MandateRequestVerify { - @SerializedName("minimum") - MINIMUM, @SerializedName("recommended") - RECOMMENDED, @SerializedName("when_available") - WHEN_AVAILABLE, @SerializedName("always") - ALWAYS, @SerializedName("unknown") - UNKNOWN; - - @Override - public String toString() { - return name().toLowerCase(); - } - } - public static class PeriodicLimits { private Alignment alignment; private Integer maxPayments; From 004f405d0ab4ff91cdc961c92ad5da1182c4bb67 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Mon, 22 Jun 2026 09:19:28 +0000 Subject: [PATCH 2/9] Changes generated by 893a370c1e1fa2eb153215ac032eb19dbcae5641 This commit was automatically created from gocardless/client-library-templates@893a370c1e1fa2eb153215ac032eb19dbcae5641 by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/27942291534 --- src/main/java/com/gocardless/resources/Export.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gocardless/resources/Export.java b/src/main/java/com/gocardless/resources/Export.java index fea0bb16..72bcd52c 100644 --- a/src/main/java/com/gocardless/resources/Export.java +++ b/src/main/java/com/gocardless/resources/Export.java @@ -85,7 +85,8 @@ public enum ExportType { GC_INVALID_AUTHORISATION_REQUESTS, @SerializedName("partner_fees") PARTNER_FEES, @SerializedName("payments_import_template") PAYMENTS_IMPORT_TEMPLATE, @SerializedName("payment_account_statement") - PAYMENT_ACCOUNT_STATEMENT, @SerializedName("unknown") + PAYMENT_ACCOUNT_STATEMENT, @SerializedName("outbound_payments_index") + OUTBOUND_PAYMENTS_INDEX, @SerializedName("unknown") UNKNOWN } } From 6c0072c927e8d14b39c71314807591219d4a0a2c Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Fri, 26 Jun 2026 10:49:35 +0000 Subject: [PATCH 3/9] Changes generated by d97c5f53b394eaa852733dc030b77590b491794c This commit was automatically created from gocardless/client-library-templates@d97c5f53b394eaa852733dc030b77590b491794c by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/28233224258 --- .../gocardless/resources/VerificationDetail.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/com/gocardless/resources/VerificationDetail.java b/src/main/java/com/gocardless/resources/VerificationDetail.java index d0538d52..ff077ed9 100644 --- a/src/main/java/com/gocardless/resources/VerificationDetail.java +++ b/src/main/java/com/gocardless/resources/VerificationDetail.java @@ -23,11 +23,13 @@ private VerificationDetail() { private String addressLine3; private String city; private String companyNumber; + private String countryCode; private String description; private List directors; private Links links; private String name; private String postalCode; + private String region; /** * The first line of the company's address. @@ -64,6 +66,13 @@ public String getCompanyNumber() { return companyNumber; } + /** + * The country code of the company's address. + */ + public String getCountryCode() { + return countryCode; + } + /** * A summary describing what the company does. */ @@ -96,6 +105,13 @@ public String getPostalCode() { return postalCode; } + /** + * The region of the company's address. + */ + public String getRegion() { + return region; + } + /** * Represents a director resource returned from the API. * From d9e2cfe0337863b009a626c2023f9a6304e30994 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Tue, 7 Jul 2026 10:45:58 +0000 Subject: [PATCH 4/9] Changes generated by 5bc32e9481786eea9c3d32e230fdacc4a3d47f50 This commit was automatically created from gocardless/client-library-templates@5bc32e9481786eea9c3d32e230fdacc4a3d47f50 by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/28860199162 --- .../gocardless/resources/BillingRequest.java | 52 +++++-- .../resources/BillingRequestTemplate.java | 50 +++++-- .../resources/BillingRequestWithAction.java | 53 +++++-- .../com/gocardless/resources/Payment.java | 3 + .../services/BillingRequestService.java | 55 +++++--- .../BillingRequestTemplateService.java | 132 +++++++++++++----- .../BillingRequestWithActionService.java | 52 ++++--- .../services/InstalmentScheduleService.java | 3 + .../gocardless/services/PaymentService.java | 3 + 9 files changed, 289 insertions(+), 114 deletions(-) diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index ab8bd6a6..7ab9c5ee 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -588,6 +588,9 @@ private InstalmentsWithDate() { /** * Amount, in the lowest denomination for the currency (e.g. pence in GBP, cents in * EUR). + * + * For Variable Recurring Payments (VRP), this must not exceed the mandate's + * `max_amount_per_payment` constraint. */ public Integer getAmount() { return amount; @@ -1045,8 +1048,9 @@ public String getEndDate() { } /** - * The maximum amount that can be charged for a single payment. Required for PayTo and - * VRP. + * The maximum amount that can be charged for a single payment in the lowest + * denomination for the currency (e.g. pence in GBP, cents in EUR). _Note:_ Required for + * PayTo and VRP. */ public Integer getMaxAmountPerPayment() { return maxAmountPerPayment; @@ -1054,7 +1058,8 @@ public Integer getMaxAmountPerPayment() { /** * A constraint where you can specify info (free text string) about how payments are - * calculated. _Note:_ This is only supported for ACH and PAD schemes. + * calculated. For use when payments vary and cannot be expressed as a fixed amount and + * frequency. _Note:_ This is only supported for ACH and PAD schemes. * */ public String getPaymentMethod() { @@ -1062,7 +1067,13 @@ public String getPaymentMethod() { } /** - * List of periodic limits and constraints which apply to them + * Caps on the total amount and/or number of payments that can be collected within a + * repeating period (e.g. no more than a set amount per month), as opposed to + * `max_amount_per_payment` which caps a single payment. + * + * _Note:_ Required for VRP, where exactly one periodic limit must be provided. Optional + * for PayTo. + * */ public List getPeriodicLimits() { return periodicLimits; @@ -1095,14 +1106,21 @@ private PeriodicLimit() { private Period period; /** - * The alignment of the period. + * The alignment of the period. Defaults to `creation_date` if not specified. + * + * `calendar` - the period follows fixed calendar boundaries, the same for every + * mandate: `week` runs Monday to Sunday, `month` runs from the 1st to the last day + * of the calendar month, and `year` runs from 1 January to 31 December. If the + * mandate starts partway through a period, the limit for that first period is + * reduced proportionally to the days remaining (e.g. a monthly limit starting on + * the 15th gives roughly half the limit for that first month). * - * `calendar` - this will finish on the end of the current period. For example this - * will expire on the Monday for the current week or the January for the next year. + * `creation_date` - the period follows the mandate's own start date rather than the + * calendar. For example, if the mandate starts on the 15th, each monthly period + * runs from the 15th to the 14th of the following month. The first period is a full + * period, not reduced proportionally. * - * `creation_date` - this will finish on the next instance of the current period. - * For example Monthly it will expire on the same day of the next month, or yearly - * the same day of the next year. + * _Note:_ Has no effect when period is `flexible`. * */ public Alignment getAlignment() { @@ -1111,7 +1129,8 @@ public Alignment getAlignment() { /** * The maximum number of payments that can be collected in this periodic limit. - * _Note:_ This is only supported for the PayTo scheme, where it is required. + * + * _Note:_ Only supported for the PayTo scheme, where it is optional. * */ public Integer getMaxPayments() { @@ -1120,7 +1139,10 @@ public Integer getMaxPayments() { /** * The maximum total amount that can be charged for all payments in this periodic - * limit. Required for VRP. + * limit, in the lowest denomination for the currency (e.g. pence in GBP, cents in + * EUR). + * + * _Note:_ Required for VRP. This is not permitted for the PayTo scheme. * */ public Integer getMaxTotalAmount() { @@ -1128,8 +1150,10 @@ public Integer getMaxTotalAmount() { } /** - * The repeating period for this mandate. Defaults to flexible for PayTo if not - * specified. + * The repeating period for this mandate. Required whenever a periodic limit is + * provided (for both VRP and PayTo). If periodic_limits is omitted entirely for + * PayTo, this defaults to flexible. + * */ public Period getPeriod() { return period; diff --git a/src/main/java/com/gocardless/resources/BillingRequestTemplate.java b/src/main/java/com/gocardless/resources/BillingRequestTemplate.java index 332dd013..453b9c71 100644 --- a/src/main/java/com/gocardless/resources/BillingRequestTemplate.java +++ b/src/main/java/com/gocardless/resources/BillingRequestTemplate.java @@ -220,7 +220,8 @@ public String getEndDate() { } /** - * The maximum amount that can be charged for a single payment. Required for PayTo and VRP. + * The maximum amount that can be charged for a single payment in the lowest denomination + * for the currency (e.g. pence in GBP, cents in EUR). _Note:_ Required for PayTo and VRP. */ public Integer getMaxAmountPerPayment() { return maxAmountPerPayment; @@ -228,7 +229,8 @@ public Integer getMaxAmountPerPayment() { /** * A constraint where you can specify info (free text string) about how payments are - * calculated. _Note:_ This is only supported for ACH and PAD schemes. + * calculated. For use when payments vary and cannot be expressed as a fixed amount and + * frequency. _Note:_ This is only supported for ACH and PAD schemes. * */ public String getPaymentMethod() { @@ -236,7 +238,13 @@ public String getPaymentMethod() { } /** - * List of periodic limits and constraints which apply to them + * Caps on the total amount and/or number of payments that can be collected within a + * repeating period (e.g. no more than a set amount per month), as opposed to + * `max_amount_per_payment` which caps a single payment. + * + * _Note:_ Required for VRP, where exactly one periodic limit must be provided. Optional for + * PayTo. + * */ public List getPeriodicLimits() { return periodicLimits; @@ -269,14 +277,21 @@ private PeriodicLimit() { private Period period; /** - * The alignment of the period. + * The alignment of the period. Defaults to `creation_date` if not specified. + * + * `calendar` - the period follows fixed calendar boundaries, the same for every + * mandate: `week` runs Monday to Sunday, `month` runs from the 1st to the last day of + * the calendar month, and `year` runs from 1 January to 31 December. If the mandate + * starts partway through a period, the limit for that first period is reduced + * proportionally to the days remaining (e.g. a monthly limit starting on the 15th gives + * roughly half the limit for that first month). * - * `calendar` - this will finish on the end of the current period. For example this will - * expire on the Monday for the current week or the January for the next year. + * `creation_date` - the period follows the mandate's own start date rather than the + * calendar. For example, if the mandate starts on the 15th, each monthly period runs + * from the 15th to the 14th of the following month. The first period is a full period, + * not reduced proportionally. * - * `creation_date` - this will finish on the next instance of the current period. For - * example Monthly it will expire on the same day of the next month, or yearly the same - * day of the next year. + * _Note:_ Has no effect when period is `flexible`. * */ public Alignment getAlignment() { @@ -284,8 +299,9 @@ public Alignment getAlignment() { } /** - * The maximum number of payments that can be collected in this periodic limit. _Note:_ - * This is only supported for the PayTo scheme, where it is required. + * The maximum number of payments that can be collected in this periodic limit. + * + * _Note:_ Only supported for the PayTo scheme, where it is optional. * */ public Integer getMaxPayments() { @@ -293,8 +309,10 @@ public Integer getMaxPayments() { } /** - * The maximum total amount that can be charged for all payments in this periodic limit. - * Required for VRP. + * The maximum total amount that can be charged for all payments in this periodic limit, + * in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR). + * + * _Note:_ Required for VRP. This is not permitted for the PayTo scheme. * */ public Integer getMaxTotalAmount() { @@ -302,8 +320,10 @@ public Integer getMaxTotalAmount() { } /** - * The repeating period for this mandate. Defaults to flexible for PayTo if not - * specified. + * The repeating period for this mandate. Required whenever a periodic limit is provided + * (for both VRP and PayTo). If periodic_limits is omitted entirely for PayTo, this + * defaults to flexible. + * */ public Period getPeriod() { return period; diff --git a/src/main/java/com/gocardless/resources/BillingRequestWithAction.java b/src/main/java/com/gocardless/resources/BillingRequestWithAction.java index c7068523..8a961938 100644 --- a/src/main/java/com/gocardless/resources/BillingRequestWithAction.java +++ b/src/main/java/com/gocardless/resources/BillingRequestWithAction.java @@ -790,6 +790,9 @@ private InstalmentsWithDate() { /** * Amount, in the lowest denomination for the currency (e.g. pence in GBP, cents in * EUR). + * + * For Variable Recurring Payments (VRP), this must not exceed the mandate's + * `max_amount_per_payment` constraint. */ public Integer getAmount() { return amount; @@ -1253,8 +1256,9 @@ public String getEndDate() { } /** - * The maximum amount that can be charged for a single payment. Required for PayTo - * and VRP. + * The maximum amount that can be charged for a single payment in the lowest + * denomination for the currency (e.g. pence in GBP, cents in EUR). _Note:_ Required + * for PayTo and VRP. */ public Integer getMaxAmountPerPayment() { return maxAmountPerPayment; @@ -1262,7 +1266,8 @@ public Integer getMaxAmountPerPayment() { /** * A constraint where you can specify info (free text string) about how payments are - * calculated. _Note:_ This is only supported for ACH and PAD schemes. + * calculated. For use when payments vary and cannot be expressed as a fixed amount + * and frequency. _Note:_ This is only supported for ACH and PAD schemes. * */ public String getPaymentMethod() { @@ -1270,7 +1275,13 @@ public String getPaymentMethod() { } /** - * List of periodic limits and constraints which apply to them + * Caps on the total amount and/or number of payments that can be collected within a + * repeating period (e.g. no more than a set amount per month), as opposed to + * `max_amount_per_payment` which caps a single payment. + * + * _Note:_ Required for VRP, where exactly one periodic limit must be provided. + * Optional for PayTo. + * */ public List getPeriodicLimits() { return periodicLimits; @@ -1303,15 +1314,21 @@ private PeriodicLimit() { private Period period; /** - * The alignment of the period. + * The alignment of the period. Defaults to `creation_date` if not specified. + * + * `calendar` - the period follows fixed calendar boundaries, the same for every + * mandate: `week` runs Monday to Sunday, `month` runs from the 1st to the last + * day of the calendar month, and `year` runs from 1 January to 31 December. If + * the mandate starts partway through a period, the limit for that first period + * is reduced proportionally to the days remaining (e.g. a monthly limit + * starting on the 15th gives roughly half the limit for that first month). * - * `calendar` - this will finish on the end of the current period. For example - * this will expire on the Monday for the current week or the January for the - * next year. + * `creation_date` - the period follows the mandate's own start date rather than + * the calendar. For example, if the mandate starts on the 15th, each monthly + * period runs from the 15th to the 14th of the following month. The first + * period is a full period, not reduced proportionally. * - * `creation_date` - this will finish on the next instance of the current - * period. For example Monthly it will expire on the same day of the next month, - * or yearly the same day of the next year. + * _Note:_ Has no effect when period is `flexible`. * */ public Alignment getAlignment() { @@ -1320,7 +1337,8 @@ public Alignment getAlignment() { /** * The maximum number of payments that can be collected in this periodic limit. - * _Note:_ This is only supported for the PayTo scheme, where it is required. + * + * _Note:_ Only supported for the PayTo scheme, where it is optional. * */ public Integer getMaxPayments() { @@ -1329,7 +1347,10 @@ public Integer getMaxPayments() { /** * The maximum total amount that can be charged for all payments in this - * periodic limit. Required for VRP. + * periodic limit, in the lowest denomination for the currency (e.g. pence in + * GBP, cents in EUR). + * + * _Note:_ Required for VRP. This is not permitted for the PayTo scheme. * */ public Integer getMaxTotalAmount() { @@ -1337,8 +1358,10 @@ public Integer getMaxTotalAmount() { } /** - * The repeating period for this mandate. Defaults to flexible for PayTo if not - * specified. + * The repeating period for this mandate. Required whenever a periodic limit is + * provided (for both VRP and PayTo). If periodic_limits is omitted entirely for + * PayTo, this defaults to flexible. + * */ public Period getPeriod() { return period; diff --git a/src/main/java/com/gocardless/resources/Payment.java b/src/main/java/com/gocardless/resources/Payment.java index dc9ea978..0b402a73 100644 --- a/src/main/java/com/gocardless/resources/Payment.java +++ b/src/main/java/com/gocardless/resources/Payment.java @@ -36,6 +36,9 @@ private Payment() { /** * Amount, in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR). + * + * For Variable Recurring Payments (VRP), this must not exceed the mandate's + * `max_amount_per_payment` constraint. */ public Integer getAmount() { return amount; diff --git a/src/main/java/com/gocardless/services/BillingRequestService.java b/src/main/java/com/gocardless/services/BillingRequestService.java index c3ae4839..cfca1b4d 100644 --- a/src/main/java/com/gocardless/services/BillingRequestService.java +++ b/src/main/java/com/gocardless/services/BillingRequestService.java @@ -1041,6 +1041,9 @@ public static class InstalmentsWithDates { /** * Amount, in the lowest denomination for the currency (e.g. pence in GBP, cents in * EUR). + * + * For Variable Recurring Payments (VRP), this must not exceed the mandate's + * `max_amount_per_payment` constraint. */ public InstalmentsWithDates withAmount(Integer amount) { this.amount = amount; @@ -1307,14 +1310,21 @@ public static class PeriodicLimits { private Period period; /** - * The alignment of the period. + * The alignment of the period. Defaults to `creation_date` if not specified. + * + * `calendar` - the period follows fixed calendar boundaries, the same for every + * mandate: `week` runs Monday to Sunday, `month` runs from the 1st to the last day of + * the calendar month, and `year` runs from 1 January to 31 December. If the mandate + * starts partway through a period, the limit for that first period is reduced + * proportionally to the days remaining (e.g. a monthly limit starting on the 15th gives + * roughly half the limit for that first month). * - * `calendar` - this will finish on the end of the current period. For example this will - * expire on the Monday for the current week or the January for the next year. + * `creation_date` - the period follows the mandate's own start date rather than the + * calendar. For example, if the mandate starts on the 15th, each monthly period runs + * from the 15th to the 14th of the following month. The first period is a full period, + * not reduced proportionally. * - * `creation_date` - this will finish on the next instance of the current period. For - * example Monthly it will expire on the same day of the next month, or yearly the same - * day of the next year. + * _Note:_ Has no effect when period is `flexible`. * */ public PeriodicLimits withAlignment(Alignment alignment) { @@ -1323,8 +1333,9 @@ public PeriodicLimits withAlignment(Alignment alignment) { } /** - * The maximum number of payments that can be collected in this periodic limit. _Note:_ - * This is only supported for the PayTo scheme, where it is required. + * The maximum number of payments that can be collected in this periodic limit. + * + * _Note:_ Only supported for the PayTo scheme, where it is optional. * */ public PeriodicLimits withMaxPayments(Integer maxPayments) { @@ -1333,8 +1344,10 @@ public PeriodicLimits withMaxPayments(Integer maxPayments) { } /** - * The maximum total amount that can be charged for all payments in this periodic limit. - * Required for VRP. + * The maximum total amount that can be charged for all payments in this periodic limit, + * in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR). + * + * _Note:_ Required for VRP. This is not permitted for the PayTo scheme. * */ public PeriodicLimits withMaxTotalAmount(Integer maxTotalAmount) { @@ -1343,8 +1356,10 @@ public PeriodicLimits withMaxTotalAmount(Integer maxTotalAmount) { } /** - * The repeating period for this mandate. Defaults to flexible for PayTo if not - * specified. + * The repeating period for this mandate. Required whenever a periodic limit is provided + * (for both VRP and PayTo). If periodic_limits is omitted entirely for PayTo, this + * defaults to flexible. + * */ public PeriodicLimits withPeriod(Period period) { this.period = period; @@ -1418,8 +1433,9 @@ public Constraints withEndDate(String endDate) { } /** - * The maximum amount that can be charged for a single payment. Required for PayTo and - * VRP. + * The maximum amount that can be charged for a single payment in the lowest + * denomination for the currency (e.g. pence in GBP, cents in EUR). _Note:_ Required for + * PayTo and VRP. */ public Constraints withMaxAmountPerPayment(Integer maxAmountPerPayment) { this.maxAmountPerPayment = maxAmountPerPayment; @@ -1428,7 +1444,8 @@ public Constraints withMaxAmountPerPayment(Integer maxAmountPerPayment) { /** * A constraint where you can specify info (free text string) about how payments are - * calculated. _Note:_ This is only supported for ACH and PAD schemes. + * calculated. For use when payments vary and cannot be expressed as a fixed amount and + * frequency. _Note:_ This is only supported for ACH and PAD schemes. * */ public Constraints withPaymentMethod(String paymentMethod) { @@ -1437,7 +1454,13 @@ public Constraints withPaymentMethod(String paymentMethod) { } /** - * List of periodic limits and constraints which apply to them + * Caps on the total amount and/or number of payments that can be collected within a + * repeating period (e.g. no more than a set amount per month), as opposed to + * `max_amount_per_payment` which caps a single payment. + * + * _Note:_ Required for VRP, where exactly one periodic limit must be provided. Optional + * for PayTo. + * */ public Constraints withPeriodicLimits(List periodicLimits) { this.periodicLimits = periodicLimits; diff --git a/src/main/java/com/gocardless/services/BillingRequestTemplateService.java b/src/main/java/com/gocardless/services/BillingRequestTemplateService.java index 3f2ecef8..85d22816 100644 --- a/src/main/java/com/gocardless/services/BillingRequestTemplateService.java +++ b/src/main/java/com/gocardless/services/BillingRequestTemplateService.java @@ -266,7 +266,8 @@ public BillingRequestTemplateCreateRequest withMandateRequestConstraintsEndDate( } /** - * The maximum amount that can be charged for a single payment. Required for PayTo and VRP. + * The maximum amount that can be charged for a single payment in the lowest denomination + * for the currency (e.g. pence in GBP, cents in EUR). _Note:_ Required for PayTo and VRP. */ public BillingRequestTemplateCreateRequest withMandateRequestConstraintsMaxAmountPerPayment( Integer maxAmountPerPayment) { @@ -279,7 +280,8 @@ public BillingRequestTemplateCreateRequest withMandateRequestConstraintsMaxAmoun /** * A constraint where you can specify info (free text string) about how payments are - * calculated. _Note:_ This is only supported for ACH and PAD schemes. + * calculated. For use when payments vary and cannot be expressed as a fixed amount and + * frequency. _Note:_ This is only supported for ACH and PAD schemes. * */ public BillingRequestTemplateCreateRequest withMandateRequestConstraintsPaymentMethod( @@ -292,7 +294,13 @@ public BillingRequestTemplateCreateRequest withMandateRequestConstraintsPaymentM } /** - * List of periodic limits and constraints which apply to them + * Caps on the total amount and/or number of payments that can be collected within a + * repeating period (e.g. no more than a set amount per month), as opposed to + * `max_amount_per_payment` which caps a single payment. + * + * _Note:_ Required for VRP, where exactly one periodic limit must be provided. Optional for + * PayTo. + * */ public BillingRequestTemplateCreateRequest withMandateRequestConstraintsPeriodicLimits( List periodicLimits) { @@ -558,14 +566,21 @@ public static class PeriodicLimits { private Period period; /** - * The alignment of the period. + * The alignment of the period. Defaults to `creation_date` if not specified. * - * `calendar` - this will finish on the end of the current period. For example this will - * expire on the Monday for the current week or the January for the next year. + * `calendar` - the period follows fixed calendar boundaries, the same for every + * mandate: `week` runs Monday to Sunday, `month` runs from the 1st to the last day of + * the calendar month, and `year` runs from 1 January to 31 December. If the mandate + * starts partway through a period, the limit for that first period is reduced + * proportionally to the days remaining (e.g. a monthly limit starting on the 15th gives + * roughly half the limit for that first month). * - * `creation_date` - this will finish on the next instance of the current period. For - * example Monthly it will expire on the same day of the next month, or yearly the same - * day of the next year. + * `creation_date` - the period follows the mandate's own start date rather than the + * calendar. For example, if the mandate starts on the 15th, each monthly period runs + * from the 15th to the 14th of the following month. The first period is a full period, + * not reduced proportionally. + * + * _Note:_ Has no effect when period is `flexible`. * */ public PeriodicLimits withAlignment(Alignment alignment) { @@ -574,8 +589,9 @@ public PeriodicLimits withAlignment(Alignment alignment) { } /** - * The maximum number of payments that can be collected in this periodic limit. _Note:_ - * This is only supported for the PayTo scheme, where it is required. + * The maximum number of payments that can be collected in this periodic limit. + * + * _Note:_ Only supported for the PayTo scheme, where it is optional. * */ public PeriodicLimits withMaxPayments(Integer maxPayments) { @@ -584,8 +600,10 @@ public PeriodicLimits withMaxPayments(Integer maxPayments) { } /** - * The maximum total amount that can be charged for all payments in this periodic limit. - * Required for VRP. + * The maximum total amount that can be charged for all payments in this periodic limit, + * in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR). + * + * _Note:_ Required for VRP. This is not permitted for the PayTo scheme. * */ public PeriodicLimits withMaxTotalAmount(Integer maxTotalAmount) { @@ -594,8 +612,10 @@ public PeriodicLimits withMaxTotalAmount(Integer maxTotalAmount) { } /** - * The repeating period for this mandate. Defaults to flexible for PayTo if not - * specified. + * The repeating period for this mandate. Required whenever a periodic limit is provided + * (for both VRP and PayTo). If periodic_limits is omitted entirely for PayTo, this + * defaults to flexible. + * */ public PeriodicLimits withPeriod(Period period) { this.period = period; @@ -669,8 +689,9 @@ public MandateRequestConstraints withEndDate(String endDate) { } /** - * The maximum amount that can be charged for a single payment. Required for PayTo and - * VRP. + * The maximum amount that can be charged for a single payment in the lowest + * denomination for the currency (e.g. pence in GBP, cents in EUR). _Note:_ Required for + * PayTo and VRP. */ public MandateRequestConstraints withMaxAmountPerPayment(Integer maxAmountPerPayment) { this.maxAmountPerPayment = maxAmountPerPayment; @@ -679,7 +700,8 @@ public MandateRequestConstraints withMaxAmountPerPayment(Integer maxAmountPerPay /** * A constraint where you can specify info (free text string) about how payments are - * calculated. _Note:_ This is only supported for ACH and PAD schemes. + * calculated. For use when payments vary and cannot be expressed as a fixed amount and + * frequency. _Note:_ This is only supported for ACH and PAD schemes. * */ public MandateRequestConstraints withPaymentMethod(String paymentMethod) { @@ -688,7 +710,13 @@ public MandateRequestConstraints withPaymentMethod(String paymentMethod) { } /** - * List of periodic limits and constraints which apply to them + * Caps on the total amount and/or number of payments that can be collected within a + * repeating period (e.g. no more than a set amount per month), as opposed to + * `max_amount_per_payment` which caps a single payment. + * + * _Note:_ Required for VRP, where exactly one periodic limit must be provided. Optional + * for PayTo. + * */ public MandateRequestConstraints withPeriodicLimits( List periodicLimits) { @@ -763,7 +791,8 @@ public BillingRequestTemplateUpdateRequest withMandateRequestConstraintsEndDate( } /** - * The maximum amount that can be charged for a single payment. Required for PayTo and VRP. + * The maximum amount that can be charged for a single payment in the lowest denomination + * for the currency (e.g. pence in GBP, cents in EUR). _Note:_ Required for PayTo and VRP. */ public BillingRequestTemplateUpdateRequest withMandateRequestConstraintsMaxAmountPerPayment( Integer maxAmountPerPayment) { @@ -776,7 +805,8 @@ public BillingRequestTemplateUpdateRequest withMandateRequestConstraintsMaxAmoun /** * A constraint where you can specify info (free text string) about how payments are - * calculated. _Note:_ This is only supported for ACH and PAD schemes. + * calculated. For use when payments vary and cannot be expressed as a fixed amount and + * frequency. _Note:_ This is only supported for ACH and PAD schemes. * */ public BillingRequestTemplateUpdateRequest withMandateRequestConstraintsPaymentMethod( @@ -789,7 +819,13 @@ public BillingRequestTemplateUpdateRequest withMandateRequestConstraintsPaymentM } /** - * List of periodic limits and constraints which apply to them + * Caps on the total amount and/or number of payments that can be collected within a + * repeating period (e.g. no more than a set amount per month), as opposed to + * `max_amount_per_payment` which caps a single payment. + * + * _Note:_ Required for VRP, where exactly one periodic limit must be provided. Optional for + * PayTo. + * */ public BillingRequestTemplateUpdateRequest withMandateRequestConstraintsPeriodicLimits( List periodicLimits) { @@ -1034,14 +1070,21 @@ public static class PeriodicLimits { private Period period; /** - * The alignment of the period. + * The alignment of the period. Defaults to `creation_date` if not specified. * - * `calendar` - this will finish on the end of the current period. For example this will - * expire on the Monday for the current week or the January for the next year. + * `calendar` - the period follows fixed calendar boundaries, the same for every + * mandate: `week` runs Monday to Sunday, `month` runs from the 1st to the last day of + * the calendar month, and `year` runs from 1 January to 31 December. If the mandate + * starts partway through a period, the limit for that first period is reduced + * proportionally to the days remaining (e.g. a monthly limit starting on the 15th gives + * roughly half the limit for that first month). * - * `creation_date` - this will finish on the next instance of the current period. For - * example Monthly it will expire on the same day of the next month, or yearly the same - * day of the next year. + * `creation_date` - the period follows the mandate's own start date rather than the + * calendar. For example, if the mandate starts on the 15th, each monthly period runs + * from the 15th to the 14th of the following month. The first period is a full period, + * not reduced proportionally. + * + * _Note:_ Has no effect when period is `flexible`. * */ public PeriodicLimits withAlignment(Alignment alignment) { @@ -1050,8 +1093,9 @@ public PeriodicLimits withAlignment(Alignment alignment) { } /** - * The maximum number of payments that can be collected in this periodic limit. _Note:_ - * This is only supported for the PayTo scheme, where it is required. + * The maximum number of payments that can be collected in this periodic limit. + * + * _Note:_ Only supported for the PayTo scheme, where it is optional. * */ public PeriodicLimits withMaxPayments(Integer maxPayments) { @@ -1060,8 +1104,10 @@ public PeriodicLimits withMaxPayments(Integer maxPayments) { } /** - * The maximum total amount that can be charged for all payments in this periodic limit. - * Required for VRP. + * The maximum total amount that can be charged for all payments in this periodic limit, + * in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR). + * + * _Note:_ Required for VRP. This is not permitted for the PayTo scheme. * */ public PeriodicLimits withMaxTotalAmount(Integer maxTotalAmount) { @@ -1070,8 +1116,10 @@ public PeriodicLimits withMaxTotalAmount(Integer maxTotalAmount) { } /** - * The repeating period for this mandate. Defaults to flexible for PayTo if not - * specified. + * The repeating period for this mandate. Required whenever a periodic limit is provided + * (for both VRP and PayTo). If periodic_limits is omitted entirely for PayTo, this + * defaults to flexible. + * */ public PeriodicLimits withPeriod(Period period) { this.period = period; @@ -1145,8 +1193,9 @@ public MandateRequestConstraints withEndDate(String endDate) { } /** - * The maximum amount that can be charged for a single payment. Required for PayTo and - * VRP. + * The maximum amount that can be charged for a single payment in the lowest + * denomination for the currency (e.g. pence in GBP, cents in EUR). _Note:_ Required for + * PayTo and VRP. */ public MandateRequestConstraints withMaxAmountPerPayment(Integer maxAmountPerPayment) { this.maxAmountPerPayment = maxAmountPerPayment; @@ -1155,7 +1204,8 @@ public MandateRequestConstraints withMaxAmountPerPayment(Integer maxAmountPerPay /** * A constraint where you can specify info (free text string) about how payments are - * calculated. _Note:_ This is only supported for ACH and PAD schemes. + * calculated. For use when payments vary and cannot be expressed as a fixed amount and + * frequency. _Note:_ This is only supported for ACH and PAD schemes. * */ public MandateRequestConstraints withPaymentMethod(String paymentMethod) { @@ -1164,7 +1214,13 @@ public MandateRequestConstraints withPaymentMethod(String paymentMethod) { } /** - * List of periodic limits and constraints which apply to them + * Caps on the total amount and/or number of payments that can be collected within a + * repeating period (e.g. no more than a set amount per month), as opposed to + * `max_amount_per_payment` which caps a single payment. + * + * _Note:_ Required for VRP, where exactly one periodic limit must be provided. Optional + * for PayTo. + * */ public MandateRequestConstraints withPeriodicLimits( List periodicLimits) { diff --git a/src/main/java/com/gocardless/services/BillingRequestWithActionService.java b/src/main/java/com/gocardless/services/BillingRequestWithActionService.java index dee9a2d7..9be09a4d 100644 --- a/src/main/java/com/gocardless/services/BillingRequestWithActionService.java +++ b/src/main/java/com/gocardless/services/BillingRequestWithActionService.java @@ -1272,14 +1272,21 @@ public static class PeriodicLimits { private Period period; /** - * The alignment of the period. + * The alignment of the period. Defaults to `creation_date` if not specified. * - * `calendar` - this will finish on the end of the current period. For example this will - * expire on the Monday for the current week or the January for the next year. + * `calendar` - the period follows fixed calendar boundaries, the same for every + * mandate: `week` runs Monday to Sunday, `month` runs from the 1st to the last day of + * the calendar month, and `year` runs from 1 January to 31 December. If the mandate + * starts partway through a period, the limit for that first period is reduced + * proportionally to the days remaining (e.g. a monthly limit starting on the 15th gives + * roughly half the limit for that first month). * - * `creation_date` - this will finish on the next instance of the current period. For - * example Monthly it will expire on the same day of the next month, or yearly the same - * day of the next year. + * `creation_date` - the period follows the mandate's own start date rather than the + * calendar. For example, if the mandate starts on the 15th, each monthly period runs + * from the 15th to the 14th of the following month. The first period is a full period, + * not reduced proportionally. + * + * _Note:_ Has no effect when period is `flexible`. * */ public PeriodicLimits withAlignment(Alignment alignment) { @@ -1288,8 +1295,9 @@ public PeriodicLimits withAlignment(Alignment alignment) { } /** - * The maximum number of payments that can be collected in this periodic limit. _Note:_ - * This is only supported for the PayTo scheme, where it is required. + * The maximum number of payments that can be collected in this periodic limit. + * + * _Note:_ Only supported for the PayTo scheme, where it is optional. * */ public PeriodicLimits withMaxPayments(Integer maxPayments) { @@ -1298,8 +1306,10 @@ public PeriodicLimits withMaxPayments(Integer maxPayments) { } /** - * The maximum total amount that can be charged for all payments in this periodic limit. - * Required for VRP. + * The maximum total amount that can be charged for all payments in this periodic limit, + * in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR). + * + * _Note:_ Required for VRP. This is not permitted for the PayTo scheme. * */ public PeriodicLimits withMaxTotalAmount(Integer maxTotalAmount) { @@ -1308,8 +1318,10 @@ public PeriodicLimits withMaxTotalAmount(Integer maxTotalAmount) { } /** - * The repeating period for this mandate. Defaults to flexible for PayTo if not - * specified. + * The repeating period for this mandate. Required whenever a periodic limit is provided + * (for both VRP and PayTo). If periodic_limits is omitted entirely for PayTo, this + * defaults to flexible. + * */ public PeriodicLimits withPeriod(Period period) { this.period = period; @@ -1383,8 +1395,9 @@ public Constraints withEndDate(String endDate) { } /** - * The maximum amount that can be charged for a single payment. Required for PayTo and - * VRP. + * The maximum amount that can be charged for a single payment in the lowest + * denomination for the currency (e.g. pence in GBP, cents in EUR). _Note:_ Required for + * PayTo and VRP. */ public Constraints withMaxAmountPerPayment(Integer maxAmountPerPayment) { this.maxAmountPerPayment = maxAmountPerPayment; @@ -1393,7 +1406,8 @@ public Constraints withMaxAmountPerPayment(Integer maxAmountPerPayment) { /** * A constraint where you can specify info (free text string) about how payments are - * calculated. _Note:_ This is only supported for ACH and PAD schemes. + * calculated. For use when payments vary and cannot be expressed as a fixed amount and + * frequency. _Note:_ This is only supported for ACH and PAD schemes. * */ public Constraints withPaymentMethod(String paymentMethod) { @@ -1402,7 +1416,13 @@ public Constraints withPaymentMethod(String paymentMethod) { } /** - * List of periodic limits and constraints which apply to them + * Caps on the total amount and/or number of payments that can be collected within a + * repeating period (e.g. no more than a set amount per month), as opposed to + * `max_amount_per_payment` which caps a single payment. + * + * _Note:_ Required for VRP, where exactly one periodic limit must be provided. Optional + * for PayTo. + * */ public Constraints withPeriodicLimits(List periodicLimits) { this.periodicLimits = periodicLimits; diff --git a/src/main/java/com/gocardless/services/InstalmentScheduleService.java b/src/main/java/com/gocardless/services/InstalmentScheduleService.java index 7139fb23..b8fcc7b3 100644 --- a/src/main/java/com/gocardless/services/InstalmentScheduleService.java +++ b/src/main/java/com/gocardless/services/InstalmentScheduleService.java @@ -345,6 +345,9 @@ public static class Instalments { /** * Amount, in the lowest denomination for the currency (e.g. pence in GBP, cents in * EUR). + * + * For Variable Recurring Payments (VRP), this must not exceed the mandate's + * `max_amount_per_payment` constraint. */ public Instalments withAmount(Integer amount) { this.amount = amount; diff --git a/src/main/java/com/gocardless/services/PaymentService.java b/src/main/java/com/gocardless/services/PaymentService.java index 7c841939..8c7a5a3d 100644 --- a/src/main/java/com/gocardless/services/PaymentService.java +++ b/src/main/java/com/gocardless/services/PaymentService.java @@ -118,6 +118,9 @@ public static final class PaymentCreateRequest extends IdempotentPostRequest Date: Tue, 14 Jul 2026 17:47:29 +0000 Subject: [PATCH 5/9] Changes generated by 0e52fa170fb1e7a538fd16be889f703d99a3870e This commit was automatically created from gocardless/client-library-templates@0e52fa170fb1e7a538fd16be889f703d99a3870e by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/29354977793 --- .../java/com/gocardless/resources/Event.java | 6 ++++++ .../com/gocardless/services/EventService.java | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/main/java/com/gocardless/resources/Event.java b/src/main/java/com/gocardless/resources/Event.java index bba52e8f..41da0cb2 100644 --- a/src/main/java/com/gocardless/resources/Event.java +++ b/src/main/java/com/gocardless/resources/Event.java @@ -12,6 +12,12 @@ * creation is an asynchronous process, so it can take some time between an action occurring and its * corresponding event getting included in API responses. See [here](#event-types) for a complete * list of event types. + *

+ * Important: Events older than 18 months will be archived and no longer accessible + * via the API or exports. Archival will begin no sooner than 1 August 2026 in sandbox environments, + * and no sooner than 1 October 2026 in live environments. Events within the 18-month window are + * unaffected. If you need archived data, contact GoCardless support. + *

*/ public class Event { private Event() { diff --git a/src/main/java/com/gocardless/services/EventService.java b/src/main/java/com/gocardless/services/EventService.java index 77330865..da13e586 100644 --- a/src/main/java/com/gocardless/services/EventService.java +++ b/src/main/java/com/gocardless/services/EventService.java @@ -16,6 +16,12 @@ * creation is an asynchronous process, so it can take some time between an action occurring and its * corresponding event getting included in API responses. See [here](#event-types) for a complete * list of event types. + *

+ * Important: Events older than 18 months will be archived and no longer accessible + * via the API or exports. Archival will begin no sooner than 1 August 2026 in sandbox environments, + * and no sooner than 1 October 2026 in live environments. Events within the 18-month window are + * unaffected. If you need archived data, contact GoCardless support. + *

*/ public class EventService { private final HttpClient httpClient; @@ -30,6 +36,11 @@ public EventService(HttpClient httpClient) { /** * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your events. + *

+ * Important: This endpoint will no longer return events older than 18 months, + * including when filtering by resource. This takes effect no sooner than 1 August 2026 in + * sandbox environments, and no sooner than 1 October 2026 in live environments. + *

*/ public EventListRequest> list() { return new EventListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -50,6 +61,11 @@ public EventGetRequest get(String identity) { * Request class for {@link EventService#list }. * * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your events. + *

+ * Important: This endpoint will no longer return events older than 18 months, + * including when filtering by resource. This takes effect no sooner than 1 August 2026 in + * sandbox environments, and no sooner than 1 October 2026 in live environments. + *

*/ public static final class EventListRequest extends ListRequest { private String action; From ddff88a3e396fbc69d05798af8170f6530f35048 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Mon, 20 Jul 2026 14:45:23 +0000 Subject: [PATCH 6/9] Changes generated by 60c9c8347683e91d547ef7ed703e285c4e86c9f6 This commit was automatically created from gocardless/client-library-templates@60c9c8347683e91d547ef7ed703e285c4e86c9f6 by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/29751807639 --- .../gocardless/resources/BillingRequest.java | 25 + .../resources/BillingRequestWithAction.java | 25 + .../resources/CustomerBankAccount.java | 24 + .../gocardless/services/BalanceService.java | 13 +- .../services/BankAccountDetailService.java | 12 +- .../BankAccountHolderVerificationService.java | 4 +- .../services/BankAuthorisationService.java | 22 +- .../services/BankDetailsLookupService.java | 55 ++- .../services/BillingRequestFlowService.java | 30 +- .../services/BillingRequestService.java | 442 +++++++++--------- .../BillingRequestTemplateService.java | 92 ++-- .../BillingRequestWithActionService.java | 240 +++++----- .../com/gocardless/services/BlockService.java | 24 +- .../services/CreditorBankAccountService.java | 64 +-- .../gocardless/services/CreditorService.java | 105 +++-- .../services/CurrencyExchangeRateService.java | 8 +- .../services/CustomerBankAccountService.java | 98 ++-- .../services/CustomerNotificationService.java | 8 +- .../gocardless/services/CustomerService.java | 83 ++-- .../com/gocardless/services/EventService.java | 129 +++-- .../services/InstalmentScheduleService.java | 245 ++++++---- .../services/InstitutionService.java | 14 +- .../com/gocardless/services/LogoService.java | 13 +- .../services/MandateImportEntryService.java | 190 ++++---- .../services/MandateImportService.java | 40 +- .../services/MandatePdfService.java | 84 ++-- .../gocardless/services/MandateService.java | 98 ++-- .../services/NegativeBalanceLimitService.java | 11 +- .../OutboundPaymentImportEntryService.java | 10 +- .../OutboundPaymentImportService.java | 47 +- .../services/OutboundPaymentService.java | 85 ++-- .../services/PayerAuthorisationService.java | 304 ++++++------ .../services/PaymentAccountService.java | 12 +- .../PaymentAccountTransactionService.java | 4 +- .../gocardless/services/PaymentService.java | 223 +++++---- .../services/PayoutItemService.java | 21 +- .../gocardless/services/PayoutService.java | 46 +- .../services/RedirectFlowService.java | 110 +++-- .../gocardless/services/RefundService.java | 149 +++--- .../services/SchemeIdentifierService.java | 27 +- .../services/SubscriptionService.java | 288 +++++------- .../gocardless/services/TaxRateService.java | 11 +- .../services/VerificationDetailService.java | 18 +- .../gocardless/services/WebhookService.java | 8 +- 44 files changed, 1885 insertions(+), 1676 deletions(-) diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index 7ab9c5ee..39c3524f 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -1482,6 +1482,7 @@ private CustomerBankAccount() { private String id; private Links links; private Map metadata; + private PayerNameVerificationResult payerNameVerificationResult; /** * Name of the account holder, as known by the bank. The full name provided when the @@ -1577,6 +1578,22 @@ public Map getMetadata() { return metadata; } + /** + * The result of the payer name verification check performed when the bank account was + * created. Only present if a check was performed. + * + * - `full`: The name provided matches the name held by the bank. - `close`: The name + * provided is a close but not exact match to the name held by the bank. - + * `cannot_perform_verification`: A verification was attempted but could not be + * completed. This can happen for a number of reasons, including the account holder's + * bank not participating in the verification scheme, the account not being eligible for + * verification (e.g. the account holder has opted out), or the bank details not being + * resolvable, among others. + */ + public PayerNameVerificationResult getPayerNameVerificationResult() { + return payerNameVerificationResult; + } + public enum AccountType { @SerializedName("savings") SAVINGS, @SerializedName("checking") @@ -1584,6 +1601,14 @@ public enum AccountType { UNKNOWN } + public enum PayerNameVerificationResult { + @SerializedName("full") + FULL, @SerializedName("close") + CLOSE, @SerializedName("cannot_perform_verification") + CANNOT_PERFORM_VERIFICATION, @SerializedName("unknown") + UNKNOWN + } + /** * Represents a link resource returned from the API. * diff --git a/src/main/java/com/gocardless/resources/BillingRequestWithAction.java b/src/main/java/com/gocardless/resources/BillingRequestWithAction.java index 8a961938..cece102a 100644 --- a/src/main/java/com/gocardless/resources/BillingRequestWithAction.java +++ b/src/main/java/com/gocardless/resources/BillingRequestWithAction.java @@ -1692,6 +1692,7 @@ private CustomerBankAccount() { private String id; private Links links; private Map metadata; + private PayerNameVerificationResult payerNameVerificationResult; /** * Name of the account holder, as known by the bank. The full name provided when the @@ -1788,6 +1789,22 @@ public Map getMetadata() { return metadata; } + /** + * The result of the payer name verification check performed when the bank account + * was created. Only present if a check was performed. + * + * - `full`: The name provided matches the name held by the bank. - `close`: The + * name provided is a close but not exact match to the name held by the bank. - + * `cannot_perform_verification`: A verification was attempted but could not be + * completed. This can happen for a number of reasons, including the account + * holder's bank not participating in the verification scheme, the account not being + * eligible for verification (e.g. the account holder has opted out), or the bank + * details not being resolvable, among others. + */ + public PayerNameVerificationResult getPayerNameVerificationResult() { + return payerNameVerificationResult; + } + public enum AccountType { @SerializedName("savings") SAVINGS, @SerializedName("checking") @@ -1795,6 +1812,14 @@ public enum AccountType { UNKNOWN } + public enum PayerNameVerificationResult { + @SerializedName("full") + FULL, @SerializedName("close") + CLOSE, @SerializedName("cannot_perform_verification") + CANNOT_PERFORM_VERIFICATION, @SerializedName("unknown") + UNKNOWN + } + /** * Represents a link resource returned from the API. * diff --git a/src/main/java/com/gocardless/resources/CustomerBankAccount.java b/src/main/java/com/gocardless/resources/CustomerBankAccount.java index f9ae38e3..0433fdec 100644 --- a/src/main/java/com/gocardless/resources/CustomerBankAccount.java +++ b/src/main/java/com/gocardless/resources/CustomerBankAccount.java @@ -36,6 +36,7 @@ private CustomerBankAccount() { private String id; private Links links; private Map metadata; + private PayerNameVerificationResult payerNameVerificationResult; private Boolean trustedRecipient; /** @@ -130,6 +131,21 @@ public Map getMetadata() { return metadata; } + /** + * The result of the payer name verification check performed when the bank account was created. + * Only present if a check was performed. + * + * - `full`: The name provided matches the name held by the bank. - `close`: The name provided + * is a close but not exact match to the name held by the bank. - `cannot_perform_verification`: + * A verification was attempted but could not be completed. This can happen for a number of + * reasons, including the account holder's bank not participating in the verification scheme, + * the account not being eligible for verification (e.g. the account holder has opted out), or + * the bank details not being resolvable, among others. + */ + public PayerNameVerificationResult getPayerNameVerificationResult() { + return payerNameVerificationResult; + } + /** * Whether this customer bank account is registered as a trusted recipient for Outbound * Payments. Only present when the feature is enabled for the organisation. @@ -145,6 +161,14 @@ public enum AccountType { UNKNOWN } + public enum PayerNameVerificationResult { + @SerializedName("full") + FULL, @SerializedName("close") + CLOSE, @SerializedName("cannot_perform_verification") + CANNOT_PERFORM_VERIFICATION, @SerializedName("unknown") + UNKNOWN + } + /** * Represents a link resource returned from the API. * diff --git a/src/main/java/com/gocardless/services/BalanceService.java b/src/main/java/com/gocardless/services/BalanceService.java index 84623533..d40980ad 100644 --- a/src/main/java/com/gocardless/services/BalanceService.java +++ b/src/main/java/com/gocardless/services/BalanceService.java @@ -28,8 +28,9 @@ public BalanceService(HttpClient httpClient) { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of balances for a given - * creditor. This endpoint is rate limited to 60 requests per minute. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of + * balances for a given creditor. This endpoint is rate limited to 60 requests per minute. */ public BalanceListRequest> list() { return new BalanceListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -42,8 +43,9 @@ public BalanceListRequest> all() { /** * Request class for {@link BalanceService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of balances for a given - * creditor. This endpoint is rate limited to 60 requests per minute. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of + * balances for a given creditor. This endpoint is rate limited to 60 requests per minute. */ public static final class BalanceListRequest extends ListRequest { private String creditor; @@ -65,7 +67,8 @@ public BalanceListRequest withBefore(String before) { } /** - * ID of a [creditor](#core-endpoints-creditors). + * ID of a creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). */ public BalanceListRequest withCreditor(String creditor) { this.creditor = creditor; diff --git a/src/main/java/com/gocardless/services/BankAccountDetailService.java b/src/main/java/com/gocardless/services/BankAccountDetailService.java index 068075ae..79271b69 100644 --- a/src/main/java/com/gocardless/services/BankAccountDetailService.java +++ b/src/main/java/com/gocardless/services/BankAccountDetailService.java @@ -26,9 +26,9 @@ public BankAccountDetailService(HttpClient httpClient) { * Returns bank account details in the flattened JSON Web Encryption format described in RFC * 7516. * - * You must specify a `Gc-Key-Id` header when using this endpoint. See [Public Key - * Setup](https://developer.gocardless.com/gc-embed/bank-details-access#public_key_setup) for - * more details. + * You must specify a `Gc-Key-Id` header when using this endpoint. See Public Key Setup + * (https://developer.gocardless.com/gc-embed/bank-details-access#public_key_setup) for more + * details. */ public BankAccountDetailGetRequest get(String identity) { return new BankAccountDetailGetRequest(httpClient, identity); @@ -40,9 +40,9 @@ public BankAccountDetailGetRequest get(String identity) { * Returns bank account details in the flattened JSON Web Encryption format described in RFC * 7516. * - * You must specify a `Gc-Key-Id` header when using this endpoint. See [Public Key - * Setup](https://developer.gocardless.com/gc-embed/bank-details-access#public_key_setup) for - * more details. + * You must specify a `Gc-Key-Id` header when using this endpoint. See Public Key Setup + * (https://developer.gocardless.com/gc-embed/bank-details-access#public_key_setup) for more + * details. */ public static final class BankAccountDetailGetRequest extends GetRequest { @PathParam diff --git a/src/main/java/com/gocardless/services/BankAccountHolderVerificationService.java b/src/main/java/com/gocardless/services/BankAccountHolderVerificationService.java index a413932c..a4d89375 100644 --- a/src/main/java/com/gocardless/services/BankAccountHolderVerificationService.java +++ b/src/main/java/com/gocardless/services/BankAccountHolderVerificationService.java @@ -68,8 +68,8 @@ public BankAccountHolderVerificationCreateRequest withLinksBankAccount(String ba } /** - * Type of the verification that has been performed eg. [Confirmation of - * Payee](https://www.wearepay.uk/what-we-do/overlay-services/confirmation-of-payee/) + * 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; diff --git a/src/main/java/com/gocardless/services/BankAuthorisationService.java b/src/main/java/com/gocardless/services/BankAuthorisationService.java index 2184e190..44d43715 100644 --- a/src/main/java/com/gocardless/services/BankAuthorisationService.java +++ b/src/main/java/com/gocardless/services/BankAuthorisationService.java @@ -56,8 +56,9 @@ public BankAuthorisationCreateRequest withLinks(Links links) { } /** - * ID of the [billing request](#billing-requests-billing-requests) against which this - * authorisation was created. + * ID of the billing request + * (https://developer.gocardless.com/api-reference/#billing-requests-billing-requests) + * against which this authorisation was created. */ public BankAuthorisationCreateRequest withLinksBillingRequest(String billingRequest) { if (links == null) { @@ -78,11 +79,13 @@ public BankAuthorisationCreateRequest withLinksBillingRequest(String billingRequ * * Please note: bank authorisations can still fail despite an `outcome=success` on the * `redirect_uri`. It is therefore recommended to wait for the relevant bank authorisation - * event, such as - * [`BANK_AUTHORISATION_AUTHORISED`](#billing-request-bankauthorisationauthorised), - * [`BANK_AUTHORISATION_DENIED`](#billing-request-bankauthorisationdenied), or - * [`BANK_AUTHORISATION_FAILED`](#billing-request-bankauthorisationfailed) in order to show - * the correct outcome to the user. + * event, such as `BANK_AUTHORISATION_AUTHORISED` + * (https://developer.gocardless.com/api-reference/#billing-request-bankauthorisationauthorised), + * `BANK_AUTHORISATION_DENIED` + * (https://developer.gocardless.com/api-reference/#billing-request-bankauthorisationdenied), + * or `BANK_AUTHORISATION_FAILED` + * (https://developer.gocardless.com/api-reference/#billing-request-bankauthorisationfailed) + * in order to show the correct outcome to the user. * * The BillingRequestFlow ID will also be appended to the `redirect_uri` as query parameter * `id=BRF123`. @@ -141,8 +144,9 @@ public static class Links { private String billingRequest; /** - * ID of the [billing request](#billing-requests-billing-requests) against which this - * authorisation was created. + * ID of the billing request + * (https://developer.gocardless.com/api-reference/#billing-requests-billing-requests) + * against which this authorisation was created. */ public Links withBillingRequest(String billingRequest) { this.billingRequest = billingRequest; diff --git a/src/main/java/com/gocardless/services/BankDetailsLookupService.java b/src/main/java/com/gocardless/services/BankDetailsLookupService.java index 7e86c1da..eb4a51f5 100644 --- a/src/main/java/com/gocardless/services/BankDetailsLookupService.java +++ b/src/main/java/com/gocardless/services/BankDetailsLookupService.java @@ -28,20 +28,21 @@ public BankDetailsLookupService(HttpClient httpClient) { * a sort code or an iban are already present), we verify that the account holder name and bank * account number match the details held by the relevant bank. * - * If your request returns an [error](#api-usage-errors) or the `available_debit_schemes` - * attribute is an empty array, you will not be able to collect payments from the specified bank - * account. GoCardless may be able to collect payments from an account even if no `bic` is - * returned. + * If your request returns an error + * (https://developer.gocardless.com/api-reference/#api-usage-errors) or the + * `available_debit_schemes` attribute is an empty array, you will not be able to collect + * payments from the specified bank account. GoCardless may be able to collect payments from an + * account even if no `bic` is returned. * - * Bank account details may be supplied using [local details](#appendix-local-bank-details) or - * an IBAN. + * Bank account details may be supplied using local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) or an IBAN. * - * _ACH scheme_ For compliance reasons, an extra validation step is done using a third-party + * ACH scheme For compliance reasons, an extra validation step is done using a third-party * provider to make sure the customer's bank account can accept Direct Debit. If a bank account * is discovered to be closed or invalid, the customer is requested to adjust the account * number/routing number and succeed in this check to continue with the flow. * - * _Note:_ Usage of this endpoint is monitored. If your organisation relies on GoCardless for + * Note: Usage of this endpoint is monitored. If your organisation relies on GoCardless for * modulus or reachability checking but not for payment collection, please get in touch. */ public BankDetailsLookupCreateRequest create() { @@ -58,20 +59,21 @@ public BankDetailsLookupCreateRequest create() { * a sort code or an iban are already present), we verify that the account holder name and bank * account number match the details held by the relevant bank. * - * If your request returns an [error](#api-usage-errors) or the `available_debit_schemes` - * attribute is an empty array, you will not be able to collect payments from the specified bank - * account. GoCardless may be able to collect payments from an account even if no `bic` is - * returned. + * If your request returns an error + * (https://developer.gocardless.com/api-reference/#api-usage-errors) or the + * `available_debit_schemes` attribute is an empty array, you will not be able to collect + * payments from the specified bank account. GoCardless may be able to collect payments from an + * account even if no `bic` is returned. * - * Bank account details may be supplied using [local details](#appendix-local-bank-details) or - * an IBAN. + * Bank account details may be supplied using local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) or an IBAN. * - * _ACH scheme_ For compliance reasons, an extra validation step is done using a third-party + * ACH scheme For compliance reasons, an extra validation step is done using a third-party * provider to make sure the customer's bank account can accept Direct Debit. If a bank account * is discovered to be closed or invalid, the customer is requested to adjust the account * number/routing number and succeed in this check to continue with the flow. * - * _Note:_ Usage of this endpoint is monitored. If your organisation relies on GoCardless for + * Note: Usage of this endpoint is monitored. If your organisation relies on GoCardless for * modulus or reachability checking but not for payment collection, please get in touch. */ public static final class BankDetailsLookupCreateRequest @@ -93,7 +95,8 @@ public BankDetailsLookupCreateRequest withAccountHolderName(String accountHolder } /** - * Bank account number - see [local details](#appendix-local-bank-details) for more + * Bank account number - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more * information. Alternatively you can provide an `iban`. */ public BankDetailsLookupCreateRequest withAccountNumber(String accountNumber) { @@ -102,8 +105,9 @@ public BankDetailsLookupCreateRequest withAccountNumber(String accountNumber) { } /** - * Bank code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Bank code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more + * information. Alternatively you can provide an `iban`. */ public BankDetailsLookupCreateRequest withBankCode(String bankCode) { this.bankCode = bankCode; @@ -111,8 +115,9 @@ public BankDetailsLookupCreateRequest withBankCode(String bankCode) { } /** - * Branch code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Branch code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more + * information. Alternatively you can provide an `iban`. */ public BankDetailsLookupCreateRequest withBranchCode(String branchCode) { this.branchCode = branchCode; @@ -120,8 +125,8 @@ public BankDetailsLookupCreateRequest withBranchCode(String branchCode) { } /** - * [ISO - * 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) * alpha-2 code. Must be provided if specifying local details. */ public BankDetailsLookupCreateRequest withCountryCode(String countryCode) { @@ -130,8 +135,8 @@ public BankDetailsLookupCreateRequest withCountryCode(String countryCode) { } /** - * International Bank Account Number. Alternatively you can provide [local - * details](#appendix-local-bank-details). + * International Bank Account Number. Alternatively you can provide local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details). */ public BankDetailsLookupCreateRequest withIban(String iban) { this.iban = iban; diff --git a/src/main/java/com/gocardless/services/BillingRequestFlowService.java b/src/main/java/com/gocardless/services/BillingRequestFlowService.java index 8c0dd055..25a51ae8 100644 --- a/src/main/java/com/gocardless/services/BillingRequestFlowService.java +++ b/src/main/java/com/gocardless/services/BillingRequestFlowService.java @@ -90,8 +90,8 @@ public BillingRequestFlowCreateRequest withExitUri(String exitUri) { } /** - * Sets the default language of the Billing Request Flow and the customer. [ISO - * 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + * Sets the default language of the Billing Request Flow and the customer. ISO 639-1 + * (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. */ public BillingRequestFlowCreateRequest withLanguage(String language) { this.language = language; @@ -104,8 +104,9 @@ public BillingRequestFlowCreateRequest withLinks(Links links) { } /** - * ID of the [billing request](#billing-requests-billing-requests) against which this flow - * was created. + * ID of the billing request + * (https://developer.gocardless.com/api-reference/#billing-requests-billing-requests) + * against which this flow was created. */ public BillingRequestFlowCreateRequest withLinksBillingRequest(String billingRequest) { if (links == null) { @@ -122,7 +123,6 @@ public BillingRequestFlowCreateRequest withLinksBillingRequest(String billingReq * * You can only lock bank account if these have already been completed as a part of the * billing request. - * */ public BillingRequestFlowCreateRequest withLockBankAccount(Boolean lockBankAccount) { this.lockBankAccount = lockBankAccount; @@ -146,7 +146,6 @@ public BillingRequestFlowCreateRequest withLockCurrency(Boolean lockCurrency) { * * You can only lock customer details if these have already been completed as a part of the * billing request. - * */ public BillingRequestFlowCreateRequest withLockCustomerDetails( Boolean lockCustomerDetails) { @@ -167,7 +166,8 @@ public BillingRequestFlowCreateRequest withPrefilledBankAccount( /** * Bank account type for USD-denominated bank accounts. Must not be provided for bank - * accounts in other currencies. See [local details](#local-bank-details-united-states) for + * accounts in other currencies. See local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) for * more information. */ public BillingRequestFlowCreateRequest withPrefilledBankAccountAccountType( @@ -251,8 +251,8 @@ public BillingRequestFlowCreateRequest withPrefilledCustomerCompanyName( } /** - * [ISO 3166-1 alpha-2 - * code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 alpha-2 code. + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) */ public BillingRequestFlowCreateRequest withPrefilledCustomerCountryCode( String countryCode) { @@ -418,8 +418,9 @@ public static class Links { private String billingRequest; /** - * ID of the [billing request](#billing-requests-billing-requests) against which this - * flow was created. + * ID of the billing request + * (https://developer.gocardless.com/api-reference/#billing-requests-billing-requests) + * against which this flow was created. */ public Links withBillingRequest(String billingRequest) { this.billingRequest = billingRequest; @@ -432,7 +433,8 @@ public static class PrefilledBankAccount { /** * Bank account type for USD-denominated bank accounts. Must not be provided for bank - * accounts in other currencies. See [local details](#local-bank-details-united-states) + * accounts in other currencies. See local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) * for more information. */ public PrefilledBankAccount withAccountType(AccountType accountType) { @@ -510,8 +512,8 @@ public PrefilledCustomer withCompanyName(String companyName) { } /** - * [ISO 3166-1 alpha-2 - * code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 alpha-2 code. + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) */ public PrefilledCustomer withCountryCode(String countryCode) { this.countryCode = countryCode; diff --git a/src/main/java/com/gocardless/services/BillingRequestService.java b/src/main/java/com/gocardless/services/BillingRequestService.java index cfca1b4d..45a86848 100644 --- a/src/main/java/com/gocardless/services/BillingRequestService.java +++ b/src/main/java/com/gocardless/services/BillingRequestService.java @@ -16,13 +16,10 @@ * of required input might be additional customer billing details, while an action would be asking a * customer to authorise a payment using their mobile banking app. * - * See [Billing Requests: - * Overview](https://developer.gocardless.com/getting-started/billing-requests/overview/) for - * how-to's, explanations and tutorials. - *

- * Important: All properties associated with `subscription_request` and + * See Billing Requests: Overview + * (https://developer.gocardless.com/getting-started/billing-requests/overview/) for how-to's, + * explanations and tutorials. Important: All properties associated with `subscription_request` and * `instalment_schedule_request` are only supported for ACH and PAD schemes. - *

*/ public class BillingRequestService { private final HttpClient httpClient; @@ -36,18 +33,16 @@ public BillingRequestService(HttpClient httpClient) { } /** - *

- * Important: All properties associated with `subscription_request` and + * Important: All properties associated with `subscription_request` and * `instalment_schedule_request` are only supported for ACH and PAD schemes. - *

*/ public BillingRequestCreateRequest create() { return new BillingRequestCreateRequest(httpClient); } /** - * If the billing request has a pending collect_customer_details action, this - * endpoint can be used to collect the details in order to complete it. + * If the billing request has a pending collect_customer_details action, this endpoint can be + * used to collect the details in order to complete it. * * The endpoint takes the same payload as Customers, but checks that the customer fields are * populated correctly for the billing request scheme. @@ -60,8 +55,8 @@ public BillingRequestCollectCustomerDetailsRequest collectCustomerDetails(String } /** - * If the billing request has a pending collect_bank_account action, this endpoint - * can be used to collect the details in order to complete it. + * If the billing request has a pending collect_bank_account action, this endpoint can be used + * to collect the details in order to complete it. * * The endpoint takes the same payload as Customer Bank Accounts, but check the bank account is * valid for the billing request scheme before creating and attaching it. @@ -69,13 +64,13 @@ public BillingRequestCollectCustomerDetailsRequest collectCustomerDetails(String * If the scheme is PayTo and the pay_id is available, this can be included in the payload along * with the country_code. * - * _ACH scheme_ For compliance reasons, an extra validation step is done using a third-party + * ACH scheme For compliance reasons, an extra validation step is done using a third-party * provider to make sure the customer's bank account can accept Direct Debit. If a bank account * is discovered to be closed or invalid, the customer is requested to adjust the account * number/routing number and succeed in this check to continue with the flow. * - * _BACS scheme_ [Payer Name - * Verification](https://hub.gocardless.com/s/article/Introduction-to-Payer-Name-Verification?language=en_GB) + * BACS scheme Payer Name Verification + * (https://hub.gocardless.com/s/article/Introduction-to-Payer-Name-Verification?language=en_GB) * is enabled by default for UK based bank accounts, meaning we verify the account holder name * and bank account number match the details held by the relevant bank. */ @@ -107,7 +102,9 @@ public BillingRequestCancelRequest cancel(String identity) { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your billing requests. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * billing requests. */ public BillingRequestListRequest> list() { return new BillingRequestListRequest<>(httpClient, @@ -164,10 +161,8 @@ public BillingRequestSelectInstitutionRequest selectInstitution(String identity) /** * Request class for {@link BillingRequestService#create }. * - *

- * Important: All properties associated with `subscription_request` and + * Important: All properties associated with `subscription_request` and * `instalment_schedule_request` are only supported for ACH and PAD schemes. - *

*/ public static final class BillingRequestCreateRequest extends IdempotentPostRequest { @@ -186,9 +181,9 @@ public static final class BillingRequestCreateRequest * (Optional) If true, this billing request can fallback from instant payment to direct * debit. Should not be set if GoCardless payment intelligence feature is used. * - * See [Billing Requests: Retain customers with - * Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) - * for more information. + * See Billing Requests: Retain customers with Fallbacks + * (https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) for + * more information. */ public BillingRequestCreateRequest withFallbackEnabled(Boolean fallbackEnabled) { this.fallbackEnabled = fallbackEnabled; @@ -215,7 +210,7 @@ public BillingRequestCreateRequest withInstalmentScheduleRequestAppFee(Integer a } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently * "USD" and "CAD" are supported. */ public BillingRequestCreateRequest withInstalmentScheduleRequestCurrency(String currency) { @@ -228,7 +223,8 @@ public BillingRequestCreateRequest withInstalmentScheduleRequestCurrency(String /** * An explicit array of instalment payments, each specifying at least an `amount` and - * `charge_date`. See [create (with dates)](#instalment-schedules-create-with-dates) + * `charge_date`. See create (with dates) + * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-dates) */ public BillingRequestCreateRequest withInstalmentScheduleRequestInstalmentsWithDates( List instalmentsWithDates) { @@ -241,9 +237,9 @@ public BillingRequestCreateRequest withInstalmentScheduleRequestInstalmentsWithD /** * Frequency of the payments you want to create, together with an array of payment amounts - * to be collected, with a specified start date for the first payment. See [create (with - * schedule)](#instalment-schedules-create-with-schedule) - * + * to be collected, with a specified start date for the first payment. See create (with + * schedule) + * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-schedule) */ public BillingRequestCreateRequest withInstalmentScheduleRequestInstalmentsWithSchedule( InstalmentsWithSchedule instalmentsWithSchedule) { @@ -281,8 +277,10 @@ public BillingRequestCreateRequest withInstalmentScheduleRequestName(String name /** * An optional payment reference. This will be set as the reference on each payment created - * and will appear on your customer's bank statement. See the documentation for the [create - * payment endpoint](#payments-create-a-payment) for more details.
+ * and will appear on your customer's bank statement. See the documentation for the create + * payment endpoint + * (https://developer.gocardless.com/api-reference/#payments-create-a-payment) for more + * details. */ public BillingRequestCreateRequest withInstalmentScheduleRequestPaymentReference( String paymentReference) { @@ -294,12 +292,10 @@ public BillingRequestCreateRequest withInstalmentScheduleRequestPaymentReference } /** - * 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). - *

+ * On failure, automatically retry payments using intelligent retries + * (https://developer.gocardless.com/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). */ public BillingRequestCreateRequest withInstalmentScheduleRequestRetryIfPossible( Boolean retryIfPossible) { @@ -331,8 +327,9 @@ public BillingRequestCreateRequest withLinks(Links links) { } /** - * ID of the associated [creditor](#core-endpoints-creditors). Only required if your account - * manages multiple creditors. + * ID of the associated creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). Only required + * if your account manages multiple creditors. */ public BillingRequestCreateRequest withLinksCreditor(String creditor) { if (links == null) { @@ -343,8 +340,9 @@ public BillingRequestCreateRequest withLinksCreditor(String creditor) { } /** - * ID of the [customer](#core-endpoints-customers) against which this request should be - * made. + * ID of the customer + * (https://developer.gocardless.com/api-reference/#core-endpoints-customers) against which + * this request should be made. */ public BillingRequestCreateRequest withLinksCustomer(String customer) { if (links == null) { @@ -355,9 +353,9 @@ public BillingRequestCreateRequest withLinksCustomer(String customer) { } /** - * (Optional) ID of the [customer_bank_account](#core-endpoints-customer-bank-accounts) + * (Optional) ID of the customer_bank_account + * (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts) * against which this request should be made. - * */ public BillingRequestCreateRequest withLinksCustomerBankAccount( String customerBankAccount) { @@ -374,14 +372,13 @@ public BillingRequestCreateRequest withMandateRequest(MandateRequest mandateRequ } /** - * This field is ACH specific, sometimes referred to as [SEC - * code](https://www.moderntreasury.com/learn/sec-codes). + * This field is ACH specific, sometimes referred to as SEC code + * (https://www.moderntreasury.com/learn/sec-codes). * * This is the way that the payer gives authorisation to the merchant. web: Authorisation is * Internet Initiated or via Mobile Entry (maps to SEC code: WEB) telephone: Authorisation * is provided orally over telephone (maps to SEC code: TEL) paper: Authorisation is * provided in writing and signed, or similarly authenticated (maps to SEC code: PPD) - * */ public BillingRequestCreateRequest withMandateRequestAuthorisationSource( MandateRequest.AuthorisationSource authorisationSource) { @@ -395,8 +392,7 @@ public BillingRequestCreateRequest withMandateRequestAuthorisationSource( /** * This attribute represents the authorisation type between the payer and merchant. It can * be set to `one_off`, `recurring` or `standing` for ACH scheme. And `single`, `recurring` - * and `sporadic` for PAD scheme. _Note:_ This is only supported for ACH and PAD schemes. - * + * and `sporadic` for PAD scheme. Note: This is only supported for ACH and PAD schemes. */ public BillingRequestCreateRequest withMandateRequestConsentType(String consentType) { if (mandateRequest == null) { @@ -419,7 +415,7 @@ public BillingRequestCreateRequest withMandateRequestConstraints(Constraints con } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. */ public BillingRequestCreateRequest withMandateRequestCurrency(String currency) { if (mandateRequest == null) { @@ -432,7 +428,6 @@ public BillingRequestCreateRequest withMandateRequestCurrency(String currency) { /** * A human-readable description of the payment and/or mandate. This will be displayed to the * payer when authorising the billing request. - * */ public BillingRequestCreateRequest withMandateRequestDescription(String description) { if (mandateRequest == null) { @@ -448,7 +443,6 @@ public BillingRequestCreateRequest withMandateRequestDescription(String descript * - `managed` will be moved through GoCardless' account, batched, and payed out. - `direct` * will be a direct transfer from the payer's account to the merchant where invoicing will * be handled separately. - * */ public BillingRequestCreateRequest withMandateRequestFundsSettlement( MandateRequest.FundsSettlement fundsSettlement) { @@ -473,9 +467,10 @@ public BillingRequestCreateRequest withMandateRequestMetadata( } /** - * Unique reference. Different schemes have different length and [character - * set](#appendix-character-sets) requirements. GoCardless will generate a unique reference - * satisfying the different scheme requirements if this field is left blank. + * Unique reference. Different schemes have different length and character set + * (https://developer.gocardless.com/api-reference/#appendix-character-sets) requirements. + * GoCardless will generate a unique reference satisfying the different scheme requirements + * if this field is left blank. */ public BillingRequestCreateRequest withMandateRequestReference(String reference) { if (mandateRequest == null) { @@ -514,14 +509,12 @@ public BillingRequestCreateRequest withMandateRequestSweeping(Boolean sweeping) /** * Verification preference for the mandate. One of: - *
    - *
  • `minimum`: only verify if absolutely required, such as when part of scheme rules
  • - *
  • `recommended`: in addition to `minimum`, use the GoCardless payment intelligence - * solution to decide if a payer should be verified
  • - *
  • `when_available`: if verification mechanisms are available, use them
  • - *
  • `always`: as `when_available`, but fail to create the Billing Request if a mechanism - * isn't available
  • - *
+ * + * - `minimum`: only verify if absolutely required, such as when part of scheme rules - + * `recommended`: in addition to `minimum`, use the GoCardless payment intelligence solution + * to decide if a payer should be verified - `when_available`: if verification mechanisms + * are available, use them - `always`: as `when_available`, but fail to create the Billing + * Request if a mechanism isn't available * * By default, all Billing Requests use the `recommended` verification preference. It uses * GoCardless payment intelligence solution to determine if a payer is fraudulent or not. @@ -531,8 +524,8 @@ public BillingRequestCreateRequest withMandateRequestSweeping(Boolean sweeping) * If you never wish to take advantage of our reduced risk products and Verified Mandates as * they are released in new schemes, please use the `minimum` verification preference. * - * See [Billing Requests: Creating Verified - * Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) + * See Billing Requests: Creating Verified Mandates + * (https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) * for more information. */ public BillingRequestCreateRequest withMandateRequestVerify(MandateRequest.Verify verify) { @@ -579,9 +572,9 @@ public BillingRequestCreateRequest withPaymentContextCode( /** * Specifies the underlying purpose of the payment. Defines the specific reason or type of * service/goods the payment relates to, improving straight-through processing and - * compliance. See [VRP Commercial Payment Purpose - * Codes](https://developer.gocardless.com/vrp-commercial-payment-purpose-codes/) for the - * complete list of valid codes. + * compliance. See VRP Commercial Payment Purpose Codes + * (https://developer.gocardless.com/vrp-commercial-payment-purpose-codes/) for the complete + * list of valid codes. */ public BillingRequestCreateRequest withPaymentPurposeCode(String paymentPurposeCode) { this.paymentPurposeCode = paymentPurposeCode; @@ -618,7 +611,7 @@ public BillingRequestCreateRequest withPaymentRequestAppFee(Integer appFee) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. `GBP` and + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. `GBP` and * `EUR` supported; `GBP` with your customers in the UK and for `EUR` with your customers in * supported Eurozone countries only. */ @@ -633,7 +626,6 @@ public BillingRequestCreateRequest withPaymentRequestCurrency(String currency) { /** * A human-readable description of the payment and/or mandate. This will be displayed to the * payer when authorising the billing request. - * */ public BillingRequestCreateRequest withPaymentRequestDescription(String description) { if (paymentRequest == null) { @@ -649,7 +641,6 @@ public BillingRequestCreateRequest withPaymentRequestDescription(String descript * - `managed` will be moved through GoCardless' account, batched, and payed out. - `direct` * will be a direct transfer from the payer's account to the merchant where invoicing will * be handled separately. - * */ public BillingRequestCreateRequest withPaymentRequestFundsSettlement( PaymentRequest.FundsSettlement fundsSettlement) { @@ -677,7 +668,6 @@ public BillingRequestCreateRequest withPaymentRequestMetadata( * A custom payment reference defined by the merchant. It is only available for payments on * the PayTo scheme or payments using the Direct Funds settlement model on the Faster * Payments scheme. - * */ public BillingRequestCreateRequest withPaymentRequestReference(String reference) { if (paymentRequest == null) { @@ -688,15 +678,11 @@ public BillingRequestCreateRequest withPaymentRequestReference(String reference) } /** - * 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). - *

- *

- * Important: This is not applicable to Pay by Bank and VRP payments. - *

+ * On failure, automatically retry payments using intelligent retries + * (https://developer.gocardless.com/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). Important: This is not applicable + * to Pay by Bank and VRP payments. */ public BillingRequestCreateRequest withPaymentRequestRetryIfPossible( Boolean retryIfPossible) { @@ -725,9 +711,9 @@ public BillingRequestCreateRequest withPaymentRequestScheme(String scheme) { /** * Specifies the high-level purpose/category of a mandate and/or payment using a set of * pre-defined categories. Provides context on the nature and reason for the payment to - * facilitate processing and compliance. See [Billing Request Purpose - * Codes](https://developer.gocardless.com/billing-request-purpose-codes/) for the complete - * list of valid codes. + * facilitate processing and compliance. See Billing Request Purpose Codes + * (https://developer.gocardless.com/billing-request-purpose-codes/) for the complete list + * of valid codes. */ public BillingRequestCreateRequest withPurposeCode(PurposeCode purposeCode) { this.purposeCode = purposeCode; @@ -776,7 +762,7 @@ public BillingRequestCreateRequest withSubscriptionRequestCount(Integer count) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public BillingRequestCreateRequest withSubscriptionRequestCurrency(String currency) { @@ -839,7 +825,6 @@ public BillingRequestCreateRequest withSubscriptionRequestMetadata( /** * Name of the month on which to charge a customer. Must be lowercase. Only applies when the * interval_unit is `yearly`. - * */ public BillingRequestCreateRequest withSubscriptionRequestMonth( SubscriptionRequest.Month month) { @@ -864,8 +849,10 @@ public BillingRequestCreateRequest withSubscriptionRequestName(String name) { /** * An optional payment reference. This will be set as the reference on each payment created - * and will appear on your customer's bank statement. See the documentation for the [create - * payment endpoint](#payments-create-a-payment) for more details.
+ * and will appear on your customer's bank statement. See the documentation for the create + * payment endpoint + * (https://developer.gocardless.com/api-reference/#payments-create-a-payment) for more + * details. */ public BillingRequestCreateRequest withSubscriptionRequestPaymentReference( String paymentReference) { @@ -877,12 +864,10 @@ public BillingRequestCreateRequest withSubscriptionRequestPaymentReference( } /** - * 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). - *

+ * On failure, automatically retry payments using intelligent retries + * (https://developer.gocardless.com/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). */ public BillingRequestCreateRequest withSubscriptionRequestRetryIfPossible( Boolean retryIfPossible) { @@ -899,7 +884,6 @@ public BillingRequestCreateRequest withSubscriptionRequestRetryIfPossible( * `day_of_month` are provided, this will be set to the date of the first payment. If * created without `month` or `day_of_month` this will be set as the mandate's * `next_possible_charge_date`. - * */ public BillingRequestCreateRequest withSubscriptionRequestStartDate(String startDate) { if (subscriptionRequest == null) { @@ -1052,7 +1036,8 @@ public InstalmentsWithDates withAmount(Integer amount) { /** * A future date on which the payment should be collected. If the date is before the - * next_possible_charge_date on the [mandate](#core-endpoints-mandates), it will be + * next_possible_charge_date on the mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates), it will be * automatically rolled forwards to that date. */ public InstalmentsWithDates withChargeDate(String chargeDate) { @@ -1063,8 +1048,8 @@ public InstalmentsWithDates withChargeDate(String chargeDate) { /** * A human-readable description of the payment. This will be included in the * notification email GoCardless sends to your customer if your organisation does not - * send its own notifications (see [compliance - * requirements](#appendix-compliance-requirements)). + * send its own notifications (see compliance requirements + * (https://developer.gocardless.com/api-reference/#appendix-compliance-requirements)). */ public InstalmentsWithDates withDescription(String description) { this.description = description; @@ -1095,7 +1080,6 @@ public static class InstalmentsWithSchedule { /** * List of amounts of each instalment, in the lowest denomination for the currency (e.g. * cents in USD). - * */ public InstalmentsWithSchedule withAmounts(List amounts) { this.amounts = amounts; @@ -1105,7 +1089,6 @@ public InstalmentsWithSchedule withAmounts(List amounts) { /** * Number of `interval_units` between charge dates. Must be greater than or equal to * `1`. - * */ public InstalmentsWithSchedule withInterval(Integer interval) { this.interval = interval; @@ -1123,10 +1106,11 @@ public InstalmentsWithSchedule withIntervalUnit(IntervalUnit intervalUnit) { /** * The date on which the first payment should be charged. Must be on or after the - * [mandate](#core-endpoints-mandates)'s `next_possible_charge_date`. When left blank - * and `month` or `day_of_month` are provided, this will be set to the date of the first - * payment. If created without `month` or `day_of_month` this will be set as the - * mandate's `next_possible_charge_date` + * mandate (https://developer.gocardless.com/api-reference/#core-endpoints-mandates)'s + * `next_possible_charge_date`. When left blank and `month` or `day_of_month` are + * provided, this will be set to the date of the first payment. If created without + * `month` or `day_of_month` this will be set as the mandate's + * `next_possible_charge_date` */ public InstalmentsWithSchedule withStartDate(String startDate) { this.startDate = startDate; @@ -1186,7 +1170,7 @@ public InstalmentScheduleRequest withAppFee(Integer appFee) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. * Currently "USD" and "CAD" are supported. */ public InstalmentScheduleRequest withCurrency(String currency) { @@ -1196,7 +1180,8 @@ public InstalmentScheduleRequest withCurrency(String currency) { /** * An explicit array of instalment payments, each specifying at least an `amount` and - * `charge_date`. See [create (with dates)](#instalment-schedules-create-with-dates) + * `charge_date`. See create (with dates) + * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-dates) */ public InstalmentScheduleRequest withInstalmentsWithDates( List instalmentsWithDates) { @@ -1207,8 +1192,8 @@ public InstalmentScheduleRequest withInstalmentsWithDates( /** * Frequency of the payments you want to create, together with an array of payment * amounts to be collected, with a specified start date for the first payment. See - * [create (with schedule)](#instalment-schedules-create-with-schedule) - * + * create (with schedule) + * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-schedule) */ public InstalmentScheduleRequest withInstalmentsWithSchedule( InstalmentsWithSchedule instalmentsWithSchedule) { @@ -1237,7 +1222,9 @@ public InstalmentScheduleRequest withName(String name) { /** * An optional payment reference. This will be set as the reference on each payment * created and will appear on your customer's bank statement. See the documentation for - * the [create payment endpoint](#payments-create-a-payment) for more details.
+ * the create payment endpoint + * (https://developer.gocardless.com/api-reference/#payments-create-a-payment) for more + * details. */ public InstalmentScheduleRequest withPaymentReference(String paymentReference) { this.paymentReference = paymentReference; @@ -1245,12 +1232,10 @@ public InstalmentScheduleRequest withPaymentReference(String paymentReference) { } /** - * 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). - *

+ * On failure, automatically retry payments using intelligent retries + * (https://developer.gocardless.com/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). */ public InstalmentScheduleRequest withRetryIfPossible(Boolean retryIfPossible) { this.retryIfPossible = retryIfPossible; @@ -1275,8 +1260,9 @@ public static class Links { private String customerBankAccount; /** - * ID of the associated [creditor](#core-endpoints-creditors). Only required if your - * account manages multiple creditors. + * ID of the associated creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). Only + * required if your account manages multiple creditors. */ public Links withCreditor(String creditor) { this.creditor = creditor; @@ -1284,8 +1270,9 @@ public Links withCreditor(String creditor) { } /** - * ID of the [customer](#core-endpoints-customers) against which this request should be - * made. + * ID of the customer + * (https://developer.gocardless.com/api-reference/#core-endpoints-customers) against + * which this request should be made. */ public Links withCustomer(String customer) { this.customer = customer; @@ -1293,9 +1280,9 @@ public Links withCustomer(String customer) { } /** - * (Optional) ID of the [customer_bank_account](#core-endpoints-customer-bank-accounts) + * (Optional) ID of the customer_bank_account + * (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts) * against which this request should be made. - * */ public Links withCustomerBankAccount(String customerBankAccount) { this.customerBankAccount = customerBankAccount; @@ -1324,8 +1311,7 @@ public static class PeriodicLimits { * from the 15th to the 14th of the following month. The first period is a full period, * not reduced proportionally. * - * _Note:_ Has no effect when period is `flexible`. - * + * Note: Has no effect when period is `flexible`. */ public PeriodicLimits withAlignment(Alignment alignment) { this.alignment = alignment; @@ -1335,8 +1321,7 @@ public PeriodicLimits withAlignment(Alignment alignment) { /** * The maximum number of payments that can be collected in this periodic limit. * - * _Note:_ Only supported for the PayTo scheme, where it is optional. - * + * Note: Only supported for the PayTo scheme, where it is optional. */ public PeriodicLimits withMaxPayments(Integer maxPayments) { this.maxPayments = maxPayments; @@ -1347,8 +1332,7 @@ public PeriodicLimits withMaxPayments(Integer maxPayments) { * The maximum total amount that can be charged for all payments in this periodic limit, * in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR). * - * _Note:_ Required for VRP. This is not permitted for the PayTo scheme. - * + * Note: Required for VRP. This is not permitted for the PayTo scheme. */ public PeriodicLimits withMaxTotalAmount(Integer maxTotalAmount) { this.maxTotalAmount = maxTotalAmount; @@ -1359,7 +1343,6 @@ public PeriodicLimits withMaxTotalAmount(Integer maxTotalAmount) { * The repeating period for this mandate. Required whenever a periodic limit is provided * (for both VRP and PayTo). If periodic_limits is omitted entirely for PayTo, this * defaults to flexible. - * */ public PeriodicLimits withPeriod(Period period) { this.period = period; @@ -1425,7 +1408,6 @@ public static class Constraints { * This is an optional field and if it is not supplied the agreement will be considered * open and will not have an end date. Keep in mind the end date must take into account * how long it will take the user to set up this agreement via the Billing Request. - * */ public Constraints withEndDate(String endDate) { this.endDate = endDate; @@ -1434,7 +1416,7 @@ public Constraints withEndDate(String endDate) { /** * The maximum amount that can be charged for a single payment in the lowest - * denomination for the currency (e.g. pence in GBP, cents in EUR). _Note:_ Required for + * denomination for the currency (e.g. pence in GBP, cents in EUR). Note: Required for * PayTo and VRP. */ public Constraints withMaxAmountPerPayment(Integer maxAmountPerPayment) { @@ -1445,8 +1427,7 @@ public Constraints withMaxAmountPerPayment(Integer maxAmountPerPayment) { /** * A constraint where you can specify info (free text string) about how payments are * calculated. For use when payments vary and cannot be expressed as a fixed amount and - * frequency. _Note:_ This is only supported for ACH and PAD schemes. - * + * frequency. Note: This is only supported for ACH and PAD schemes. */ public Constraints withPaymentMethod(String paymentMethod) { this.paymentMethod = paymentMethod; @@ -1458,9 +1439,8 @@ public Constraints withPaymentMethod(String paymentMethod) { * repeating period (e.g. no more than a set amount per month), as opposed to * `max_amount_per_payment` which caps a single payment. * - * _Note:_ Required for VRP, where exactly one periodic limit must be provided. Optional + * Note: Required for VRP, where exactly one periodic limit must be provided. Optional * for PayTo. - * */ public Constraints withPeriodicLimits(List periodicLimits) { this.periodicLimits = periodicLimits; @@ -1472,7 +1452,6 @@ public Constraints withPeriodicLimits(List periodicLimits) { * * This is an optional field and if it is not supplied the start date will be set to the * day authorisation happens. - * */ public Constraints withStartDate(String startDate) { this.startDate = startDate; @@ -1514,15 +1493,14 @@ public static class MandateRequest { private Verify verify; /** - * This field is ACH specific, sometimes referred to as [SEC - * code](https://www.moderntreasury.com/learn/sec-codes). + * This field is ACH specific, sometimes referred to as SEC code + * (https://www.moderntreasury.com/learn/sec-codes). * * This is the way that the payer gives authorisation to the merchant. web: * Authorisation is Internet Initiated or via Mobile Entry (maps to SEC code: WEB) * telephone: Authorisation is provided orally over telephone (maps to SEC code: TEL) * paper: Authorisation is provided in writing and signed, or similarly authenticated * (maps to SEC code: PPD) - * */ public MandateRequest withAuthorisationSource(AuthorisationSource authorisationSource) { this.authorisationSource = authorisationSource; @@ -1532,9 +1510,8 @@ public MandateRequest withAuthorisationSource(AuthorisationSource authorisationS /** * This attribute represents the authorisation type between the payer and merchant. It * can be set to `one_off`, `recurring` or `standing` for ACH scheme. And `single`, - * `recurring` and `sporadic` for PAD scheme. _Note:_ This is only supported for ACH and + * `recurring` and `sporadic` for PAD scheme. Note: This is only supported for ACH and * PAD schemes. - * */ public MandateRequest withConsentType(String consentType) { this.consentType = consentType; @@ -1551,7 +1528,7 @@ public MandateRequest withConstraints(Constraints constraints) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. */ public MandateRequest withCurrency(String currency) { this.currency = currency; @@ -1561,7 +1538,6 @@ public MandateRequest withCurrency(String currency) { /** * A human-readable description of the payment and/or mandate. This will be displayed to * the payer when authorising the billing request. - * */ public MandateRequest withDescription(String description) { this.description = description; @@ -1574,7 +1550,6 @@ public MandateRequest withDescription(String description) { * - `managed` will be moved through GoCardless' account, batched, and payed out. - * `direct` will be a direct transfer from the payer's account to the merchant where * invoicing will be handled separately. - * */ public MandateRequest withFundsSettlement(FundsSettlement fundsSettlement) { this.fundsSettlement = fundsSettlement; @@ -1591,9 +1566,10 @@ public MandateRequest withMetadata(Map metadata) { } /** - * Unique reference. Different schemes have different length and [character - * set](#appendix-character-sets) requirements. GoCardless will generate a unique - * reference satisfying the different scheme requirements if this field is left blank. + * Unique reference. Different schemes have different length and character set + * (https://developer.gocardless.com/api-reference/#appendix-character-sets) + * requirements. GoCardless will generate a unique reference satisfying the different + * scheme requirements if this field is left blank. */ public MandateRequest withReference(String reference) { this.reference = reference; @@ -1623,15 +1599,12 @@ public MandateRequest withSweeping(Boolean sweeping) { /** * Verification preference for the mandate. One of: - *
    - *
  • `minimum`: only verify if absolutely required, such as when part of scheme - * rules
  • - *
  • `recommended`: in addition to `minimum`, use the GoCardless payment intelligence - * solution to decide if a payer should be verified
  • - *
  • `when_available`: if verification mechanisms are available, use them
  • - *
  • `always`: as `when_available`, but fail to create the Billing Request if a - * mechanism isn't available
  • - *
+ * + * - `minimum`: only verify if absolutely required, such as when part of scheme rules - + * `recommended`: in addition to `minimum`, use the GoCardless payment intelligence + * solution to decide if a payer should be verified - `when_available`: if verification + * mechanisms are available, use them - `always`: as `when_available`, but fail to + * create the Billing Request if a mechanism isn't available * * By default, all Billing Requests use the `recommended` verification preference. It * uses GoCardless payment intelligence solution to determine if a payer is fraudulent @@ -1643,8 +1616,8 @@ public MandateRequest withSweeping(Boolean sweeping) { * Mandates as they are released in new schemes, please use the `minimum` verification * preference. * - * See [Billing Requests: Creating Verified - * Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) + * See Billing Requests: Creating Verified Mandates + * (https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) * for more information. */ public MandateRequest withVerify(Verify verify) { @@ -1722,7 +1695,7 @@ public PaymentRequest withAppFee(Integer appFee) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. `GBP` + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. `GBP` * and `EUR` supported; `GBP` with your customers in the UK and for `EUR` with your * customers in supported Eurozone countries only. */ @@ -1734,7 +1707,6 @@ public PaymentRequest withCurrency(String currency) { /** * A human-readable description of the payment and/or mandate. This will be displayed to * the payer when authorising the billing request. - * */ public PaymentRequest withDescription(String description) { this.description = description; @@ -1747,7 +1719,6 @@ public PaymentRequest withDescription(String description) { * - `managed` will be moved through GoCardless' account, batched, and payed out. - * `direct` will be a direct transfer from the payer's account to the merchant where * invoicing will be handled separately. - * */ public PaymentRequest withFundsSettlement(FundsSettlement fundsSettlement) { this.fundsSettlement = fundsSettlement; @@ -1767,7 +1738,6 @@ public PaymentRequest withMetadata(Map metadata) { * A custom payment reference defined by the merchant. It is only available for payments * on the PayTo scheme or payments using the Direct Funds settlement model on the Faster * Payments scheme. - * */ public PaymentRequest withReference(String reference) { this.reference = reference; @@ -1775,15 +1745,11 @@ public PaymentRequest withReference(String reference) { } /** - * 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). - *

- *

- * Important: This is not applicable to Pay by Bank and VRP payments. - *

+ * On failure, automatically retry payments using intelligent retries + * (https://developer.gocardless.com/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). Important: This is + * not applicable to Pay by Bank and VRP payments. */ public PaymentRequest withRetryIfPossible(Boolean retryIfPossible) { this.retryIfPossible = retryIfPossible; @@ -1858,7 +1824,7 @@ public SubscriptionRequest withCount(Integer count) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public SubscriptionRequest withCurrency(String currency) { @@ -1905,7 +1871,6 @@ public SubscriptionRequest withMetadata(Map metadata) { /** * Name of the month on which to charge a customer. Must be lowercase. Only applies when * the interval_unit is `yearly`. - * */ public SubscriptionRequest withMonth(Month month) { this.month = month; @@ -1924,7 +1889,9 @@ public SubscriptionRequest withName(String name) { /** * An optional payment reference. This will be set as the reference on each payment * created and will appear on your customer's bank statement. See the documentation for - * the [create payment endpoint](#payments-create-a-payment) for more details.
+ * the create payment endpoint + * (https://developer.gocardless.com/api-reference/#payments-create-a-payment) for more + * details. */ public SubscriptionRequest withPaymentReference(String paymentReference) { this.paymentReference = paymentReference; @@ -1932,12 +1899,10 @@ public SubscriptionRequest withPaymentReference(String paymentReference) { } /** - * 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). - *

+ * On failure, automatically retry payments using intelligent retries + * (https://developer.gocardless.com/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). */ public SubscriptionRequest withRetryIfPossible(Boolean retryIfPossible) { this.retryIfPossible = retryIfPossible; @@ -1950,7 +1915,6 @@ public SubscriptionRequest withRetryIfPossible(Boolean retryIfPossible) { * `month` or `day_of_month` are provided, this will be set to the date of the first * payment. If created without `month` or `day_of_month` this will be set as the * mandate's `next_possible_charge_date`. - * */ public SubscriptionRequest withStartDate(String startDate) { this.startDate = startDate; @@ -1997,8 +1961,8 @@ public String toString() { /** * Request class for {@link BillingRequestService#collectCustomerDetails }. * - * If the billing request has a pending collect_customer_details action, this - * endpoint can be used to collect the details in order to complete it. + * If the billing request has a pending collect_customer_details action, this endpoint can be + * used to collect the details in order to complete it. * * The endpoint takes the same payload as Customers, but checks that the customer fields are * populated correctly for the billing request scheme. @@ -2069,12 +2033,14 @@ public BillingRequestCollectCustomerDetailsRequest withCustomerGivenName(String } /** - * [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used as the + * ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used as the * language for notification emails sent by GoCardless if your organisation does not send - * its own (see [compliance requirements](#appendix-compliance-requirements)). Currently - * only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. If - * this is not provided and a customer was linked during billing request creation, the - * linked customer language will be used. Otherwise, the language is default to "en". + * its own (see compliance requirements + * (https://developer.gocardless.com/api-reference/#appendix-compliance-requirements)). + * Currently only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are + * supported. If this is not provided and a customer was linked during billing request + * creation, the linked customer language will be used. Otherwise, the language is default + * to "en". */ public BillingRequestCollectCustomerDetailsRequest withCustomerLanguage(String language) { if (customer == null) { @@ -2098,8 +2064,8 @@ public BillingRequestCollectCustomerDetailsRequest withCustomerMetadata( } /** - * [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, including - * country code. + * ITU E.123 (https://en.wikipedia.org/wiki/E.123) formatted phone number, including country + * code. */ public BillingRequestCollectCustomerDetailsRequest withCustomerPhoneNumber( String phoneNumber) { @@ -2165,8 +2131,8 @@ public BillingRequestCollectCustomerDetailsRequest withCustomerBillingDetailCity } /** - * [ISO 3166-1 alpha-2 - * code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 alpha-2 code. + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) */ public BillingRequestCollectCustomerDetailsRequest withCustomerBillingDetailCountryCode( String countryCode) { @@ -2197,7 +2163,6 @@ public BillingRequestCollectCustomerDetailsRequest withCustomerBillingDetailDani * * Not required for creating offline mandates where `authorisation_source` is set to * telephone or paper. - * */ public BillingRequestCollectCustomerDetailsRequest withCustomerBillingDetailIpAddress( String ipAddress) { @@ -2222,7 +2187,7 @@ public BillingRequestCollectCustomerDetailsRequest withCustomerBillingDetailPost /** * The customer's address region, county or department. For US customers a 2 letter - * [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required (e.g. + * ISO3166-2:US (https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required (e.g. * `CA` for California). */ public BillingRequestCollectCustomerDetailsRequest withCustomerBillingDetailRegion( @@ -2338,9 +2303,10 @@ public Customer withGivenName(String givenName) { } /** - * [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used as the + * ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used as the * language for notification emails sent by GoCardless if your organisation does not - * send its own (see [compliance requirements](#appendix-compliance-requirements)). + * send its own (see compliance requirements + * (https://developer.gocardless.com/api-reference/#appendix-compliance-requirements)). * Currently only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are * supported. If this is not provided and a customer was linked during billing request * creation, the linked customer language will be used. Otherwise, the language is @@ -2361,7 +2327,7 @@ public Customer withMetadata(Map metadata) { } /** - * [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, including + * ITU E.123 (https://en.wikipedia.org/wiki/E.123) formatted phone number, including * country code. */ public Customer withPhoneNumber(String phoneNumber) { @@ -2415,8 +2381,8 @@ public CustomerBillingDetail withCity(String city) { } /** - * [ISO 3166-1 alpha-2 - * code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 alpha-2 code. + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) */ public CustomerBillingDetail withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -2439,7 +2405,6 @@ public CustomerBillingDetail withDanishIdentityNumber(String danishIdentityNumbe * * Not required for creating offline mandates where `authorisation_source` is set to * telephone or paper. - * */ public CustomerBillingDetail withIpAddress(String ipAddress) { this.ipAddress = ipAddress; @@ -2456,7 +2421,7 @@ public CustomerBillingDetail withPostalCode(String postalCode) { /** * The customer's address region, county or department. For US customers a 2 letter - * [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required + * ISO3166-2:US (https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required * (e.g. `CA` for California). */ public CustomerBillingDetail withRegion(String region) { @@ -2480,8 +2445,8 @@ public CustomerBillingDetail withSwedishIdentityNumber(String swedishIdentityNum /** * Request class for {@link BillingRequestService#collectBankAccount }. * - * If the billing request has a pending collect_bank_account action, this endpoint - * can be used to collect the details in order to complete it. + * If the billing request has a pending collect_bank_account action, this endpoint can be used + * to collect the details in order to complete it. * * The endpoint takes the same payload as Customer Bank Accounts, but check the bank account is * valid for the billing request scheme before creating and attaching it. @@ -2489,13 +2454,13 @@ public CustomerBillingDetail withSwedishIdentityNumber(String swedishIdentityNum * If the scheme is PayTo and the pay_id is available, this can be included in the payload along * with the country_code. * - * _ACH scheme_ For compliance reasons, an extra validation step is done using a third-party + * ACH scheme For compliance reasons, an extra validation step is done using a third-party * provider to make sure the customer's bank account can accept Direct Debit. If a bank account * is discovered to be closed or invalid, the customer is requested to adjust the account * number/routing number and succeed in this check to continue with the flow. * - * _BACS scheme_ [Payer Name - * Verification](https://hub.gocardless.com/s/article/Introduction-to-Payer-Name-Verification?language=en_GB) + * BACS scheme Payer Name Verification + * (https://hub.gocardless.com/s/article/Introduction-to-Payer-Name-Verification?language=en_GB) * is enabled by default for UK based bank accounts, meaning we verify the account holder name * and bank account number match the details held by the relevant bank. */ @@ -2519,8 +2484,8 @@ public static final class BillingRequestCollectBankAccountRequest * 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). + * unless the request includes a customer bank account token + * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens). */ public BillingRequestCollectBankAccountRequest withAccountHolderName( String accountHolderName) { @@ -2529,7 +2494,8 @@ public BillingRequestCollectBankAccountRequest withAccountHolderName( } /** - * Bank account number - see [local details](#appendix-local-bank-details) for more + * Bank account number - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more * information. Alternatively you can provide an `iban`. */ public BillingRequestCollectBankAccountRequest withAccountNumber(String accountNumber) { @@ -2538,8 +2504,9 @@ public BillingRequestCollectBankAccountRequest withAccountNumber(String accountN } /** - * Account number suffix (only for bank accounts denominated in NZD) - see [local - * details](#local-bank-details-new-zealand) for more information. + * Account number suffix (only for bank accounts denominated in NZD) - see local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-new-zealand) for more + * information. */ public BillingRequestCollectBankAccountRequest withAccountNumberSuffix( String accountNumberSuffix) { @@ -2549,8 +2516,9 @@ public BillingRequestCollectBankAccountRequest withAccountNumberSuffix( /** * Bank account type. Required for USD-denominated bank accounts. Must not be provided for - * bank accounts in other currencies. See [local details](#local-bank-details-united-states) - * for more information. + * bank accounts in other currencies. See local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) for + * more information. */ public BillingRequestCollectBankAccountRequest withAccountType(AccountType accountType) { this.accountType = accountType; @@ -2558,8 +2526,9 @@ public BillingRequestCollectBankAccountRequest withAccountType(AccountType accou } /** - * Bank code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Bank code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more + * information. Alternatively you can provide an `iban`. */ public BillingRequestCollectBankAccountRequest withBankCode(String bankCode) { this.bankCode = bankCode; @@ -2567,8 +2536,9 @@ public BillingRequestCollectBankAccountRequest withBankCode(String bankCode) { } /** - * Branch code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Branch code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more + * information. Alternatively you can provide an `iban`. */ public BillingRequestCollectBankAccountRequest withBranchCode(String branchCode) { this.branchCode = branchCode; @@ -2576,8 +2546,8 @@ public BillingRequestCollectBankAccountRequest withBranchCode(String branchCode) } /** - * [ISO 3166-1 alpha-2 - * code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + * ISO 3166-1 alpha-2 code + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). * Defaults to the country code of the `iban` if supplied, otherwise is required. */ public BillingRequestCollectBankAccountRequest withCountryCode(String countryCode) { @@ -2586,7 +2556,7 @@ public BillingRequestCollectBankAccountRequest withCountryCode(String countryCod } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public BillingRequestCollectBankAccountRequest withCurrency(String currency) { @@ -2595,9 +2565,10 @@ public BillingRequestCollectBankAccountRequest withCurrency(String currency) { } /** - * International Bank Account Number. Alternatively you can provide [local - * details](#appendix-local-bank-details). IBANs are not accepted for Swedish bank accounts - * denominated in SEK - you must supply [local details](#local-bank-details-sweden). + * International Bank Account Number. Alternatively you can provide local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details). IBANs are + * not accepted for Swedish bank accounts denominated in SEK - you must supply local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-sweden). */ public BillingRequestCollectBankAccountRequest withIban(String iban) { this.iban = iban; @@ -2933,7 +2904,9 @@ protected String getRequestEnvelope() { /** * Request class for {@link BillingRequestService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your billing requests. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * billing requests. */ public static final class BillingRequestListRequest extends ListRequest { private String createdAt; @@ -2957,7 +2930,9 @@ public BillingRequestListRequest withBefore(String before) { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp + * (https://developer.gocardless.com/api-reference/#api-usage-dates-and-times), recording + * when this resource was created. */ public BillingRequestListRequest withCreatedAt(String createdAt) { this.createdAt = createdAt; @@ -2965,8 +2940,9 @@ public BillingRequestListRequest withCreatedAt(String createdAt) { } /** - * ID of a [customer](#core-endpoints-customers). If specified, this endpoint will return - * all requests for the given customer. + * ID of a customer + * (https://developer.gocardless.com/api-reference/#core-endpoints-customers). If specified, + * this endpoint will return all requests for the given customer. */ public BillingRequestListRequest withCustomer(String customer) { this.customer = customer; @@ -2983,13 +2959,11 @@ public BillingRequestListRequest withLimit(Integer limit) { /** * One of: - *
    - *
  • `pending`: the billing request is pending and can be used
  • - *
  • `ready_to_fulfil`: the billing request is ready to fulfil
  • - *
  • `fulfilling`: the billing request is currently undergoing fulfilment
  • - *
  • `fulfilled`: the billing request has been fulfilled and a payment created
  • - *
  • `cancelled`: the billing request has been cancelled and cannot be used
  • - *
+ * + * - `pending`: the billing request is pending and can be used - `ready_to_fulfil`: the + * billing request is ready to fulfil - `fulfilling`: the billing request is currently + * undergoing fulfilment - `fulfilled`: the billing request has been fulfilled and a payment + * created - `cancelled`: the billing request has been cancelled and cannot be used */ public BillingRequestListRequest withStatus(String status) { this.status = status; @@ -3222,7 +3196,7 @@ public static final class BillingRequestChooseCurrencyRequest private Map metadata; /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public BillingRequestChooseCurrencyRequest withCurrency(String currency) { @@ -3308,8 +3282,8 @@ public static final class BillingRequestSelectInstitutionRequest private String institution; /** - * [ISO - * 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) * alpha-2 code. The country code of the institution. If nothing is provided, institutions * with the country code 'GB' are returned by default. */ diff --git a/src/main/java/com/gocardless/services/BillingRequestTemplateService.java b/src/main/java/com/gocardless/services/BillingRequestTemplateService.java index 85d22816..c54b6a69 100644 --- a/src/main/java/com/gocardless/services/BillingRequestTemplateService.java +++ b/src/main/java/com/gocardless/services/BillingRequestTemplateService.java @@ -36,8 +36,9 @@ public BillingRequestTemplateService(HttpClient httpClient) { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your Billing Request - * Templates. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * Billing Request Templates. */ public BillingRequestTemplateListRequest> list() { return new BillingRequestTemplateListRequest<>(httpClient, @@ -74,8 +75,9 @@ public BillingRequestTemplateUpdateRequest update(String identity) { /** * Request class for {@link BillingRequestTemplateService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your Billing Request - * Templates. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * Billing Request Templates. */ public static final class BillingRequestTemplateListRequest extends ListRequest { @@ -227,8 +229,9 @@ public BillingRequestTemplateCreateRequest withLinks(Links links) { } /** - * ID of the associated [creditor](#core-endpoints-creditors). Only required if your account - * manages multiple creditors. + * ID of the associated creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). Only required + * if your account manages multiple creditors. */ public BillingRequestTemplateCreateRequest withLinksCreditor(String creditor) { if (links == null) { @@ -254,7 +257,6 @@ public BillingRequestTemplateCreateRequest withMandateRequestConstraints( * This is an optional field and if it is not supplied the agreement will be considered open * and will not have an end date. Keep in mind the end date must take into account how long * it will take the user to set up this agreement via the Billing Request. - * */ public BillingRequestTemplateCreateRequest withMandateRequestConstraintsEndDate( String endDate) { @@ -267,7 +269,7 @@ public BillingRequestTemplateCreateRequest withMandateRequestConstraintsEndDate( /** * The maximum amount that can be charged for a single payment in the lowest denomination - * for the currency (e.g. pence in GBP, cents in EUR). _Note:_ Required for PayTo and VRP. + * for the currency (e.g. pence in GBP, cents in EUR). Note: Required for PayTo and VRP. */ public BillingRequestTemplateCreateRequest withMandateRequestConstraintsMaxAmountPerPayment( Integer maxAmountPerPayment) { @@ -281,8 +283,7 @@ public BillingRequestTemplateCreateRequest withMandateRequestConstraintsMaxAmoun /** * A constraint where you can specify info (free text string) about how payments are * calculated. For use when payments vary and cannot be expressed as a fixed amount and - * frequency. _Note:_ This is only supported for ACH and PAD schemes. - * + * frequency. Note: This is only supported for ACH and PAD schemes. */ public BillingRequestTemplateCreateRequest withMandateRequestConstraintsPaymentMethod( String paymentMethod) { @@ -298,9 +299,8 @@ public BillingRequestTemplateCreateRequest withMandateRequestConstraintsPaymentM * repeating period (e.g. no more than a set amount per month), as opposed to * `max_amount_per_payment` which caps a single payment. * - * _Note:_ Required for VRP, where exactly one periodic limit must be provided. Optional for + * Note: Required for VRP, where exactly one periodic limit must be provided. Optional for * PayTo. - * */ public BillingRequestTemplateCreateRequest withMandateRequestConstraintsPeriodicLimits( List periodicLimits) { @@ -316,7 +316,6 @@ public BillingRequestTemplateCreateRequest withMandateRequestConstraintsPeriodic * * This is an optional field and if it is not supplied the start date will be set to the day * authorisation happens. - * */ public BillingRequestTemplateCreateRequest withMandateRequestConstraintsStartDate( String startDate) { @@ -328,7 +327,7 @@ public BillingRequestTemplateCreateRequest withMandateRequestConstraintsStartDat } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. */ public BillingRequestTemplateCreateRequest withMandateRequestCurrency( String mandateRequestCurrency) { @@ -339,7 +338,6 @@ public BillingRequestTemplateCreateRequest withMandateRequestCurrency( /** * A human-readable description of the payment and/or mandate. This will be displayed to the * payer when authorising the billing request. - * */ public BillingRequestTemplateCreateRequest withMandateRequestDescription( String mandateRequestDescription) { @@ -433,7 +431,7 @@ public BillingRequestTemplateCreateRequest withPaymentRequestAmount( } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. `GBP` and + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. `GBP` and * `EUR` supported; `GBP` with your customers in the UK and for `EUR` with your customers in * supported Eurozone countries only. */ @@ -446,7 +444,6 @@ public BillingRequestTemplateCreateRequest withPaymentRequestCurrency( /** * A human-readable description of the payment and/or mandate. This will be displayed to the * payer when authorising the billing request. - * */ public BillingRequestTemplateCreateRequest withPaymentRequestDescription( String paymentRequestDescription) { @@ -550,8 +547,9 @@ public static class Links { private String creditor; /** - * ID of the associated [creditor](#core-endpoints-creditors). Only required if your - * account manages multiple creditors. + * ID of the associated creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). Only + * required if your account manages multiple creditors. */ public Links withCreditor(String creditor) { this.creditor = creditor; @@ -580,8 +578,7 @@ public static class PeriodicLimits { * from the 15th to the 14th of the following month. The first period is a full period, * not reduced proportionally. * - * _Note:_ Has no effect when period is `flexible`. - * + * Note: Has no effect when period is `flexible`. */ public PeriodicLimits withAlignment(Alignment alignment) { this.alignment = alignment; @@ -591,8 +588,7 @@ public PeriodicLimits withAlignment(Alignment alignment) { /** * The maximum number of payments that can be collected in this periodic limit. * - * _Note:_ Only supported for the PayTo scheme, where it is optional. - * + * Note: Only supported for the PayTo scheme, where it is optional. */ public PeriodicLimits withMaxPayments(Integer maxPayments) { this.maxPayments = maxPayments; @@ -603,8 +599,7 @@ public PeriodicLimits withMaxPayments(Integer maxPayments) { * The maximum total amount that can be charged for all payments in this periodic limit, * in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR). * - * _Note:_ Required for VRP. This is not permitted for the PayTo scheme. - * + * Note: Required for VRP. This is not permitted for the PayTo scheme. */ public PeriodicLimits withMaxTotalAmount(Integer maxTotalAmount) { this.maxTotalAmount = maxTotalAmount; @@ -615,7 +610,6 @@ public PeriodicLimits withMaxTotalAmount(Integer maxTotalAmount) { * The repeating period for this mandate. Required whenever a periodic limit is provided * (for both VRP and PayTo). If periodic_limits is omitted entirely for PayTo, this * defaults to flexible. - * */ public PeriodicLimits withPeriod(Period period) { this.period = period; @@ -681,7 +675,6 @@ public static class MandateRequestConstraints { * This is an optional field and if it is not supplied the agreement will be considered * open and will not have an end date. Keep in mind the end date must take into account * how long it will take the user to set up this agreement via the Billing Request. - * */ public MandateRequestConstraints withEndDate(String endDate) { this.endDate = endDate; @@ -690,7 +683,7 @@ public MandateRequestConstraints withEndDate(String endDate) { /** * The maximum amount that can be charged for a single payment in the lowest - * denomination for the currency (e.g. pence in GBP, cents in EUR). _Note:_ Required for + * denomination for the currency (e.g. pence in GBP, cents in EUR). Note: Required for * PayTo and VRP. */ public MandateRequestConstraints withMaxAmountPerPayment(Integer maxAmountPerPayment) { @@ -701,8 +694,7 @@ public MandateRequestConstraints withMaxAmountPerPayment(Integer maxAmountPerPay /** * A constraint where you can specify info (free text string) about how payments are * calculated. For use when payments vary and cannot be expressed as a fixed amount and - * frequency. _Note:_ This is only supported for ACH and PAD schemes. - * + * frequency. Note: This is only supported for ACH and PAD schemes. */ public MandateRequestConstraints withPaymentMethod(String paymentMethod) { this.paymentMethod = paymentMethod; @@ -714,9 +706,8 @@ public MandateRequestConstraints withPaymentMethod(String paymentMethod) { * repeating period (e.g. no more than a set amount per month), as opposed to * `max_amount_per_payment` which caps a single payment. * - * _Note:_ Required for VRP, where exactly one periodic limit must be provided. Optional + * Note: Required for VRP, where exactly one periodic limit must be provided. Optional * for PayTo. - * */ public MandateRequestConstraints withPeriodicLimits( List periodicLimits) { @@ -729,7 +720,6 @@ public MandateRequestConstraints withPeriodicLimits( * * This is an optional field and if it is not supplied the start date will be set to the * day authorisation happens. - * */ public MandateRequestConstraints withStartDate(String startDate) { this.startDate = startDate; @@ -779,7 +769,6 @@ public BillingRequestTemplateUpdateRequest withMandateRequestConstraints( * This is an optional field and if it is not supplied the agreement will be considered open * and will not have an end date. Keep in mind the end date must take into account how long * it will take the user to set up this agreement via the Billing Request. - * */ public BillingRequestTemplateUpdateRequest withMandateRequestConstraintsEndDate( String endDate) { @@ -792,7 +781,7 @@ public BillingRequestTemplateUpdateRequest withMandateRequestConstraintsEndDate( /** * The maximum amount that can be charged for a single payment in the lowest denomination - * for the currency (e.g. pence in GBP, cents in EUR). _Note:_ Required for PayTo and VRP. + * for the currency (e.g. pence in GBP, cents in EUR). Note: Required for PayTo and VRP. */ public BillingRequestTemplateUpdateRequest withMandateRequestConstraintsMaxAmountPerPayment( Integer maxAmountPerPayment) { @@ -806,8 +795,7 @@ public BillingRequestTemplateUpdateRequest withMandateRequestConstraintsMaxAmoun /** * A constraint where you can specify info (free text string) about how payments are * calculated. For use when payments vary and cannot be expressed as a fixed amount and - * frequency. _Note:_ This is only supported for ACH and PAD schemes. - * + * frequency. Note: This is only supported for ACH and PAD schemes. */ public BillingRequestTemplateUpdateRequest withMandateRequestConstraintsPaymentMethod( String paymentMethod) { @@ -823,9 +811,8 @@ public BillingRequestTemplateUpdateRequest withMandateRequestConstraintsPaymentM * repeating period (e.g. no more than a set amount per month), as opposed to * `max_amount_per_payment` which caps a single payment. * - * _Note:_ Required for VRP, where exactly one periodic limit must be provided. Optional for + * Note: Required for VRP, where exactly one periodic limit must be provided. Optional for * PayTo. - * */ public BillingRequestTemplateUpdateRequest withMandateRequestConstraintsPeriodicLimits( List periodicLimits) { @@ -841,7 +828,6 @@ public BillingRequestTemplateUpdateRequest withMandateRequestConstraintsPeriodic * * This is an optional field and if it is not supplied the start date will be set to the day * authorisation happens. - * */ public BillingRequestTemplateUpdateRequest withMandateRequestConstraintsStartDate( String startDate) { @@ -853,7 +839,7 @@ public BillingRequestTemplateUpdateRequest withMandateRequestConstraintsStartDat } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. */ public BillingRequestTemplateUpdateRequest withMandateRequestCurrency( String mandateRequestCurrency) { @@ -864,7 +850,6 @@ public BillingRequestTemplateUpdateRequest withMandateRequestCurrency( /** * A human-readable description of the payment and/or mandate. This will be displayed to the * payer when authorising the billing request. - * */ public BillingRequestTemplateUpdateRequest withMandateRequestDescription( String mandateRequestDescription) { @@ -958,7 +943,7 @@ public BillingRequestTemplateUpdateRequest withPaymentRequestAmount( } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. `GBP` and + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. `GBP` and * `EUR` supported; `GBP` with your customers in the UK and for `EUR` with your customers in * supported Eurozone countries only. */ @@ -971,7 +956,6 @@ public BillingRequestTemplateUpdateRequest withPaymentRequestCurrency( /** * A human-readable description of the payment and/or mandate. This will be displayed to the * payer when authorising the billing request. - * */ public BillingRequestTemplateUpdateRequest withPaymentRequestDescription( String paymentRequestDescription) { @@ -1084,8 +1068,7 @@ public static class PeriodicLimits { * from the 15th to the 14th of the following month. The first period is a full period, * not reduced proportionally. * - * _Note:_ Has no effect when period is `flexible`. - * + * Note: Has no effect when period is `flexible`. */ public PeriodicLimits withAlignment(Alignment alignment) { this.alignment = alignment; @@ -1095,8 +1078,7 @@ public PeriodicLimits withAlignment(Alignment alignment) { /** * The maximum number of payments that can be collected in this periodic limit. * - * _Note:_ Only supported for the PayTo scheme, where it is optional. - * + * Note: Only supported for the PayTo scheme, where it is optional. */ public PeriodicLimits withMaxPayments(Integer maxPayments) { this.maxPayments = maxPayments; @@ -1107,8 +1089,7 @@ public PeriodicLimits withMaxPayments(Integer maxPayments) { * The maximum total amount that can be charged for all payments in this periodic limit, * in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR). * - * _Note:_ Required for VRP. This is not permitted for the PayTo scheme. - * + * Note: Required for VRP. This is not permitted for the PayTo scheme. */ public PeriodicLimits withMaxTotalAmount(Integer maxTotalAmount) { this.maxTotalAmount = maxTotalAmount; @@ -1119,7 +1100,6 @@ public PeriodicLimits withMaxTotalAmount(Integer maxTotalAmount) { * The repeating period for this mandate. Required whenever a periodic limit is provided * (for both VRP and PayTo). If periodic_limits is omitted entirely for PayTo, this * defaults to flexible. - * */ public PeriodicLimits withPeriod(Period period) { this.period = period; @@ -1185,7 +1165,6 @@ public static class MandateRequestConstraints { * This is an optional field and if it is not supplied the agreement will be considered * open and will not have an end date. Keep in mind the end date must take into account * how long it will take the user to set up this agreement via the Billing Request. - * */ public MandateRequestConstraints withEndDate(String endDate) { this.endDate = endDate; @@ -1194,7 +1173,7 @@ public MandateRequestConstraints withEndDate(String endDate) { /** * The maximum amount that can be charged for a single payment in the lowest - * denomination for the currency (e.g. pence in GBP, cents in EUR). _Note:_ Required for + * denomination for the currency (e.g. pence in GBP, cents in EUR). Note: Required for * PayTo and VRP. */ public MandateRequestConstraints withMaxAmountPerPayment(Integer maxAmountPerPayment) { @@ -1205,8 +1184,7 @@ public MandateRequestConstraints withMaxAmountPerPayment(Integer maxAmountPerPay /** * A constraint where you can specify info (free text string) about how payments are * calculated. For use when payments vary and cannot be expressed as a fixed amount and - * frequency. _Note:_ This is only supported for ACH and PAD schemes. - * + * frequency. Note: This is only supported for ACH and PAD schemes. */ public MandateRequestConstraints withPaymentMethod(String paymentMethod) { this.paymentMethod = paymentMethod; @@ -1218,9 +1196,8 @@ public MandateRequestConstraints withPaymentMethod(String paymentMethod) { * repeating period (e.g. no more than a set amount per month), as opposed to * `max_amount_per_payment` which caps a single payment. * - * _Note:_ Required for VRP, where exactly one periodic limit must be provided. Optional + * Note: Required for VRP, where exactly one periodic limit must be provided. Optional * for PayTo. - * */ public MandateRequestConstraints withPeriodicLimits( List periodicLimits) { @@ -1233,7 +1210,6 @@ public MandateRequestConstraints withPeriodicLimits( * * This is an optional field and if it is not supplied the start date will be set to the * day authorisation happens. - * */ public MandateRequestConstraints withStartDate(String startDate) { this.startDate = startDate; diff --git a/src/main/java/com/gocardless/services/BillingRequestWithActionService.java b/src/main/java/com/gocardless/services/BillingRequestWithActionService.java index 9be09a4d..4b9f7677 100644 --- a/src/main/java/com/gocardless/services/BillingRequestWithActionService.java +++ b/src/main/java/com/gocardless/services/BillingRequestWithActionService.java @@ -15,9 +15,9 @@ * of required input might be additional customer billing details, while an action would be asking a * customer to authorise a payment using their mobile banking app. * - * See [Billing Requests: - * Overview](https://developer.gocardless.com/getting-started/billing-requests/overview/) for - * how-to's, explanations and tutorials. + * See Billing Requests: Overview + * (https://developer.gocardless.com/getting-started/billing-requests/overview/) for how-to's, + * explanations and tutorials. */ public class BillingRequestWithActionService { private final HttpClient httpClient; @@ -131,9 +131,9 @@ public BillingRequestWithActionCreateWithActionsRequest withActionsSelectInstitu * (Optional) If true, this billing request can fallback from instant payment to direct * debit. Should not be set if GoCardless payment intelligence feature is used. * - * See [Billing Requests: Retain customers with - * Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) - * for more information. + * See Billing Requests: Retain customers with Fallbacks + * (https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) for + * more information. */ public BillingRequestWithActionCreateWithActionsRequest withFallbackEnabled( Boolean fallbackEnabled) { @@ -147,8 +147,9 @@ public BillingRequestWithActionCreateWithActionsRequest withLinks(Links links) { } /** - * ID of the associated [creditor](#core-endpoints-creditors). Only required if your account - * manages multiple creditors. + * ID of the associated creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). Only required + * if your account manages multiple creditors. */ public BillingRequestWithActionCreateWithActionsRequest withLinksCreditor(String creditor) { if (links == null) { @@ -159,8 +160,9 @@ public BillingRequestWithActionCreateWithActionsRequest withLinksCreditor(String } /** - * ID of the [customer](#core-endpoints-customers) against which this request should be - * made. + * ID of the customer + * (https://developer.gocardless.com/api-reference/#core-endpoints-customers) against which + * this request should be made. */ public BillingRequestWithActionCreateWithActionsRequest withLinksCustomer(String customer) { if (links == null) { @@ -171,9 +173,9 @@ public BillingRequestWithActionCreateWithActionsRequest withLinksCustomer(String } /** - * (Optional) ID of the [customer_bank_account](#core-endpoints-customer-bank-accounts) + * (Optional) ID of the customer_bank_account + * (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts) * against which this request should be made. - * */ public BillingRequestWithActionCreateWithActionsRequest withLinksCustomerBankAccount( String customerBankAccount) { @@ -191,14 +193,13 @@ public BillingRequestWithActionCreateWithActionsRequest withMandateRequest( } /** - * This field is ACH specific, sometimes referred to as [SEC - * code](https://www.moderntreasury.com/learn/sec-codes). + * This field is ACH specific, sometimes referred to as SEC code + * (https://www.moderntreasury.com/learn/sec-codes). * * This is the way that the payer gives authorisation to the merchant. web: Authorisation is * Internet Initiated or via Mobile Entry (maps to SEC code: WEB) telephone: Authorisation * is provided orally over telephone (maps to SEC code: TEL) paper: Authorisation is * provided in writing and signed, or similarly authenticated (maps to SEC code: PPD) - * */ public BillingRequestWithActionCreateWithActionsRequest withMandateRequestAuthorisationSource( MandateRequest.AuthorisationSource authorisationSource) { @@ -223,7 +224,7 @@ public BillingRequestWithActionCreateWithActionsRequest withMandateRequestConstr } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. */ public BillingRequestWithActionCreateWithActionsRequest withMandateRequestCurrency( String currency) { @@ -237,7 +238,6 @@ public BillingRequestWithActionCreateWithActionsRequest withMandateRequestCurren /** * A human-readable description of the payment and/or mandate. This will be displayed to the * payer when authorising the billing request. - * */ public BillingRequestWithActionCreateWithActionsRequest withMandateRequestDescription( String description) { @@ -254,7 +254,6 @@ public BillingRequestWithActionCreateWithActionsRequest withMandateRequestDescri * - `managed` will be moved through GoCardless' account, batched, and payed out. - `direct` * will be a direct transfer from the payer's account to the merchant where invoicing will * be handled separately. - * */ public BillingRequestWithActionCreateWithActionsRequest withMandateRequestFundsSettlement( MandateRequest.FundsSettlement fundsSettlement) { @@ -279,9 +278,10 @@ public BillingRequestWithActionCreateWithActionsRequest withMandateRequestMetada } /** - * Unique reference. Different schemes have different length and [character - * set](#appendix-character-sets) requirements. GoCardless will generate a unique reference - * satisfying the different scheme requirements if this field is left blank. + * Unique reference. Different schemes have different length and character set + * (https://developer.gocardless.com/api-reference/#appendix-character-sets) requirements. + * GoCardless will generate a unique reference satisfying the different scheme requirements + * if this field is left blank. */ public BillingRequestWithActionCreateWithActionsRequest withMandateRequestReference( String reference) { @@ -323,14 +323,12 @@ public BillingRequestWithActionCreateWithActionsRequest withMandateRequestSweepi /** * Verification preference for the mandate. One of: - *
    - *
  • `minimum`: only verify if absolutely required, such as when part of scheme rules
  • - *
  • `recommended`: in addition to `minimum`, use the GoCardless payment intelligence - * solution to decide if a payer should be verified
  • - *
  • `when_available`: if verification mechanisms are available, use them
  • - *
  • `always`: as `when_available`, but fail to create the Billing Request if a mechanism - * isn't available
  • - *
+ * + * - `minimum`: only verify if absolutely required, such as when part of scheme rules - + * `recommended`: in addition to `minimum`, use the GoCardless payment intelligence solution + * to decide if a payer should be verified - `when_available`: if verification mechanisms + * are available, use them - `always`: as `when_available`, but fail to create the Billing + * Request if a mechanism isn't available * * By default, all Billing Requests use the `recommended` verification preference. It uses * GoCardless payment intelligence solution to determine if a payer is fraudulent or not. @@ -340,8 +338,8 @@ public BillingRequestWithActionCreateWithActionsRequest withMandateRequestSweepi * If you never wish to take advantage of our reduced risk products and Verified Mandates as * they are released in new schemes, please use the `minimum` verification preference. * - * See [Billing Requests: Creating Verified - * Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) + * See Billing Requests: Creating Verified Mandates + * (https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) * for more information. */ public BillingRequestWithActionCreateWithActionsRequest withMandateRequestVerify( @@ -391,9 +389,9 @@ public BillingRequestWithActionCreateWithActionsRequest withPaymentContextCode( /** * Specifies the underlying purpose of the payment. Defines the specific reason or type of * service/goods the payment relates to, improving straight-through processing and - * compliance. See [VRP Commercial Payment Purpose - * Codes](https://developer.gocardless.com/vrp-commercial-payment-purpose-codes/) for the - * complete list of valid codes. + * compliance. See VRP Commercial Payment Purpose Codes + * (https://developer.gocardless.com/vrp-commercial-payment-purpose-codes/) for the complete + * list of valid codes. */ public BillingRequestWithActionCreateWithActionsRequest withPaymentPurposeCode( String paymentPurposeCode) { @@ -434,7 +432,7 @@ public BillingRequestWithActionCreateWithActionsRequest withPaymentRequestAppFee } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. `GBP` and + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. `GBP` and * `EUR` supported; `GBP` with your customers in the UK and for `EUR` with your customers in * supported Eurozone countries only. */ @@ -450,7 +448,6 @@ public BillingRequestWithActionCreateWithActionsRequest withPaymentRequestCurren /** * A human-readable description of the payment and/or mandate. This will be displayed to the * payer when authorising the billing request. - * */ public BillingRequestWithActionCreateWithActionsRequest withPaymentRequestDescription( String description) { @@ -467,7 +464,6 @@ public BillingRequestWithActionCreateWithActionsRequest withPaymentRequestDescri * - `managed` will be moved through GoCardless' account, batched, and payed out. - `direct` * will be a direct transfer from the payer's account to the merchant where invoicing will * be handled separately. - * */ public BillingRequestWithActionCreateWithActionsRequest withPaymentRequestFundsSettlement( PaymentRequest.FundsSettlement fundsSettlement) { @@ -495,7 +491,6 @@ public BillingRequestWithActionCreateWithActionsRequest withPaymentRequestMetada * A custom payment reference defined by the merchant. It is only available for payments on * the PayTo scheme or payments using the Direct Funds settlement model on the Faster * Payments scheme. - * */ public BillingRequestWithActionCreateWithActionsRequest withPaymentRequestReference( String reference) { @@ -507,15 +502,11 @@ public BillingRequestWithActionCreateWithActionsRequest withPaymentRequestRefere } /** - * 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). - *

- *

- * Important: This is not applicable to Pay by Bank and VRP payments. - *

+ * On failure, automatically retry payments using intelligent retries + * (https://developer.gocardless.com/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). Important: This is not applicable + * to Pay by Bank and VRP payments. */ public BillingRequestWithActionCreateWithActionsRequest withPaymentRequestRetryIfPossible( Boolean retryIfPossible) { @@ -545,9 +536,9 @@ public BillingRequestWithActionCreateWithActionsRequest withPaymentRequestScheme /** * Specifies the high-level purpose/category of a mandate and/or payment using a set of * pre-defined categories. Provides context on the nature and reason for the payment to - * facilitate processing and compliance. See [Billing Request Purpose - * Codes](https://developer.gocardless.com/billing-request-purpose-codes/) for the complete - * list of valid codes. + * facilitate processing and compliance. See Billing Request Purpose Codes + * (https://developer.gocardless.com/billing-request-purpose-codes/) for the complete list + * of valid codes. */ public BillingRequestWithActionCreateWithActionsRequest withPurposeCode( PurposeCode purposeCode) { @@ -683,8 +674,8 @@ public static class CollectBankAccount { * 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). + * unless the request includes a customer bank account token + * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens). */ public CollectBankAccount withAccountHolderName(String accountHolderName) { this.accountHolderName = accountHolderName; @@ -692,8 +683,9 @@ public CollectBankAccount withAccountHolderName(String accountHolderName) { } /** - * Bank account number - see [local details](#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Bank account number - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for + * more information. Alternatively you can provide an `iban`. */ public CollectBankAccount withAccountNumber(String accountNumber) { this.accountNumber = accountNumber; @@ -701,8 +693,9 @@ public CollectBankAccount withAccountNumber(String accountNumber) { } /** - * Account number suffix (only for bank accounts denominated in NZD) - see [local - * details](#local-bank-details-new-zealand) for more information. + * Account number suffix (only for bank accounts denominated in NZD) - see local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-new-zealand) for + * more information. */ public CollectBankAccount withAccountNumberSuffix(String accountNumberSuffix) { this.accountNumberSuffix = accountNumberSuffix; @@ -711,8 +704,9 @@ public CollectBankAccount withAccountNumberSuffix(String accountNumberSuffix) { /** * Bank account type. Required for USD-denominated bank accounts. Must not be provided - * for bank accounts in other currencies. See [local - * details](#local-bank-details-united-states) for more information. + * for bank accounts in other currencies. See local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) + * for more information. */ public CollectBankAccount withAccountType(AccountType accountType) { this.accountType = accountType; @@ -720,8 +714,9 @@ public CollectBankAccount withAccountType(AccountType accountType) { } /** - * Bank code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Bank code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for + * more information. Alternatively you can provide an `iban`. */ public CollectBankAccount withBankCode(String bankCode) { this.bankCode = bankCode; @@ -729,8 +724,9 @@ public CollectBankAccount withBankCode(String bankCode) { } /** - * Branch code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Branch code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for + * more information. Alternatively you can provide an `iban`. */ public CollectBankAccount withBranchCode(String branchCode) { this.branchCode = branchCode; @@ -738,8 +734,8 @@ public CollectBankAccount withBranchCode(String branchCode) { } /** - * [ISO 3166-1 alpha-2 - * code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + * ISO 3166-1 alpha-2 code + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). * Defaults to the country code of the `iban` if supplied, otherwise is required. */ public CollectBankAccount withCountryCode(String countryCode) { @@ -748,7 +744,7 @@ public CollectBankAccount withCountryCode(String countryCode) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public CollectBankAccount withCurrency(String currency) { @@ -757,10 +753,10 @@ public CollectBankAccount withCurrency(String currency) { } /** - * International Bank Account Number. Alternatively you can provide [local - * details](#appendix-local-bank-details). IBANs are not accepted for Swedish bank - * accounts denominated in SEK - you must supply [local - * details](#local-bank-details-sweden). + * International Bank Account Number. Alternatively you can provide local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details). IBANs + * are not accepted for Swedish bank accounts denominated in SEK - you must supply local + * details (https://developer.gocardless.com/api-reference/#local-bank-details-sweden). */ public CollectBankAccount withIban(String iban) { this.iban = iban; @@ -882,9 +878,10 @@ public Customer withGivenName(String givenName) { } /** - * [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used as the + * ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used as the * language for notification emails sent by GoCardless if your organisation does not - * send its own (see [compliance requirements](#appendix-compliance-requirements)). + * send its own (see compliance requirements + * (https://developer.gocardless.com/api-reference/#appendix-compliance-requirements)). * Currently only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are * supported. If this is not provided and a customer was linked during billing request * creation, the linked customer language will be used. Otherwise, the language is @@ -905,7 +902,7 @@ public Customer withMetadata(Map metadata) { } /** - * [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, including + * ITU E.123 (https://en.wikipedia.org/wiki/E.123) formatted phone number, including * country code. */ public Customer withPhoneNumber(String phoneNumber) { @@ -985,8 +982,8 @@ public CustomerBillingDetail withCity(String city) { } /** - * [ISO 3166-1 alpha-2 - * code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 alpha-2 code. + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) */ public CustomerBillingDetail withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -1009,7 +1006,6 @@ public CustomerBillingDetail withDanishIdentityNumber(String danishIdentityNumbe * * Not required for creating offline mandates where `authorisation_source` is set to * telephone or paper. - * */ public CustomerBillingDetail withIpAddress(String ipAddress) { this.ipAddress = ipAddress; @@ -1026,7 +1022,7 @@ public CustomerBillingDetail withPostalCode(String postalCode) { /** * The customer's address region, county or department. For US customers a 2 letter - * [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required + * ISO3166-2:US (https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required * (e.g. `CA` for California). */ public CustomerBillingDetail withRegion(String region) { @@ -1155,8 +1151,8 @@ public static class SelectInstitution { private String institution; /** - * [ISO - * 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) * alpha-2 code. The country code of the institution. If nothing is provided, * institutions with the country code 'GB' are returned by default. */ @@ -1237,8 +1233,9 @@ public static class Links { private String customerBankAccount; /** - * ID of the associated [creditor](#core-endpoints-creditors). Only required if your - * account manages multiple creditors. + * ID of the associated creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). Only + * required if your account manages multiple creditors. */ public Links withCreditor(String creditor) { this.creditor = creditor; @@ -1246,8 +1243,9 @@ public Links withCreditor(String creditor) { } /** - * ID of the [customer](#core-endpoints-customers) against which this request should be - * made. + * ID of the customer + * (https://developer.gocardless.com/api-reference/#core-endpoints-customers) against + * which this request should be made. */ public Links withCustomer(String customer) { this.customer = customer; @@ -1255,9 +1253,9 @@ public Links withCustomer(String customer) { } /** - * (Optional) ID of the [customer_bank_account](#core-endpoints-customer-bank-accounts) + * (Optional) ID of the customer_bank_account + * (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts) * against which this request should be made. - * */ public Links withCustomerBankAccount(String customerBankAccount) { this.customerBankAccount = customerBankAccount; @@ -1286,8 +1284,7 @@ public static class PeriodicLimits { * from the 15th to the 14th of the following month. The first period is a full period, * not reduced proportionally. * - * _Note:_ Has no effect when period is `flexible`. - * + * Note: Has no effect when period is `flexible`. */ public PeriodicLimits withAlignment(Alignment alignment) { this.alignment = alignment; @@ -1297,8 +1294,7 @@ public PeriodicLimits withAlignment(Alignment alignment) { /** * The maximum number of payments that can be collected in this periodic limit. * - * _Note:_ Only supported for the PayTo scheme, where it is optional. - * + * Note: Only supported for the PayTo scheme, where it is optional. */ public PeriodicLimits withMaxPayments(Integer maxPayments) { this.maxPayments = maxPayments; @@ -1309,8 +1305,7 @@ public PeriodicLimits withMaxPayments(Integer maxPayments) { * The maximum total amount that can be charged for all payments in this periodic limit, * in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR). * - * _Note:_ Required for VRP. This is not permitted for the PayTo scheme. - * + * Note: Required for VRP. This is not permitted for the PayTo scheme. */ public PeriodicLimits withMaxTotalAmount(Integer maxTotalAmount) { this.maxTotalAmount = maxTotalAmount; @@ -1321,7 +1316,6 @@ public PeriodicLimits withMaxTotalAmount(Integer maxTotalAmount) { * The repeating period for this mandate. Required whenever a periodic limit is provided * (for both VRP and PayTo). If periodic_limits is omitted entirely for PayTo, this * defaults to flexible. - * */ public PeriodicLimits withPeriod(Period period) { this.period = period; @@ -1387,7 +1381,6 @@ public static class Constraints { * This is an optional field and if it is not supplied the agreement will be considered * open and will not have an end date. Keep in mind the end date must take into account * how long it will take the user to set up this agreement via the Billing Request. - * */ public Constraints withEndDate(String endDate) { this.endDate = endDate; @@ -1396,7 +1389,7 @@ public Constraints withEndDate(String endDate) { /** * The maximum amount that can be charged for a single payment in the lowest - * denomination for the currency (e.g. pence in GBP, cents in EUR). _Note:_ Required for + * denomination for the currency (e.g. pence in GBP, cents in EUR). Note: Required for * PayTo and VRP. */ public Constraints withMaxAmountPerPayment(Integer maxAmountPerPayment) { @@ -1407,8 +1400,7 @@ public Constraints withMaxAmountPerPayment(Integer maxAmountPerPayment) { /** * A constraint where you can specify info (free text string) about how payments are * calculated. For use when payments vary and cannot be expressed as a fixed amount and - * frequency. _Note:_ This is only supported for ACH and PAD schemes. - * + * frequency. Note: This is only supported for ACH and PAD schemes. */ public Constraints withPaymentMethod(String paymentMethod) { this.paymentMethod = paymentMethod; @@ -1420,9 +1412,8 @@ public Constraints withPaymentMethod(String paymentMethod) { * repeating period (e.g. no more than a set amount per month), as opposed to * `max_amount_per_payment` which caps a single payment. * - * _Note:_ Required for VRP, where exactly one periodic limit must be provided. Optional + * Note: Required for VRP, where exactly one periodic limit must be provided. Optional * for PayTo. - * */ public Constraints withPeriodicLimits(List periodicLimits) { this.periodicLimits = periodicLimits; @@ -1434,7 +1425,6 @@ public Constraints withPeriodicLimits(List periodicLimits) { * * This is an optional field and if it is not supplied the start date will be set to the * day authorisation happens. - * */ public Constraints withStartDate(String startDate) { this.startDate = startDate; @@ -1475,15 +1465,14 @@ public static class MandateRequest { private Verify verify; /** - * This field is ACH specific, sometimes referred to as [SEC - * code](https://www.moderntreasury.com/learn/sec-codes). + * This field is ACH specific, sometimes referred to as SEC code + * (https://www.moderntreasury.com/learn/sec-codes). * * This is the way that the payer gives authorisation to the merchant. web: * Authorisation is Internet Initiated or via Mobile Entry (maps to SEC code: WEB) * telephone: Authorisation is provided orally over telephone (maps to SEC code: TEL) * paper: Authorisation is provided in writing and signed, or similarly authenticated * (maps to SEC code: PPD) - * */ public MandateRequest withAuthorisationSource(AuthorisationSource authorisationSource) { this.authorisationSource = authorisationSource; @@ -1500,7 +1489,7 @@ public MandateRequest withConstraints(Constraints constraints) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. */ public MandateRequest withCurrency(String currency) { this.currency = currency; @@ -1510,7 +1499,6 @@ public MandateRequest withCurrency(String currency) { /** * A human-readable description of the payment and/or mandate. This will be displayed to * the payer when authorising the billing request. - * */ public MandateRequest withDescription(String description) { this.description = description; @@ -1523,7 +1511,6 @@ public MandateRequest withDescription(String description) { * - `managed` will be moved through GoCardless' account, batched, and payed out. - * `direct` will be a direct transfer from the payer's account to the merchant where * invoicing will be handled separately. - * */ public MandateRequest withFundsSettlement(FundsSettlement fundsSettlement) { this.fundsSettlement = fundsSettlement; @@ -1540,9 +1527,10 @@ public MandateRequest withMetadata(Map metadata) { } /** - * Unique reference. Different schemes have different length and [character - * set](#appendix-character-sets) requirements. GoCardless will generate a unique - * reference satisfying the different scheme requirements if this field is left blank. + * Unique reference. Different schemes have different length and character set + * (https://developer.gocardless.com/api-reference/#appendix-character-sets) + * requirements. GoCardless will generate a unique reference satisfying the different + * scheme requirements if this field is left blank. */ public MandateRequest withReference(String reference) { this.reference = reference; @@ -1572,15 +1560,12 @@ public MandateRequest withSweeping(Boolean sweeping) { /** * Verification preference for the mandate. One of: - *
    - *
  • `minimum`: only verify if absolutely required, such as when part of scheme - * rules
  • - *
  • `recommended`: in addition to `minimum`, use the GoCardless payment intelligence - * solution to decide if a payer should be verified
  • - *
  • `when_available`: if verification mechanisms are available, use them
  • - *
  • `always`: as `when_available`, but fail to create the Billing Request if a - * mechanism isn't available
  • - *
+ * + * - `minimum`: only verify if absolutely required, such as when part of scheme rules - + * `recommended`: in addition to `minimum`, use the GoCardless payment intelligence + * solution to decide if a payer should be verified - `when_available`: if verification + * mechanisms are available, use them - `always`: as `when_available`, but fail to + * create the Billing Request if a mechanism isn't available * * By default, all Billing Requests use the `recommended` verification preference. It * uses GoCardless payment intelligence solution to determine if a payer is fraudulent @@ -1592,8 +1577,8 @@ public MandateRequest withSweeping(Boolean sweeping) { * Mandates as they are released in new schemes, please use the `minimum` verification * preference. * - * See [Billing Requests: Creating Verified - * Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) + * See Billing Requests: Creating Verified Mandates + * (https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) * for more information. */ public MandateRequest withVerify(Verify verify) { @@ -1671,7 +1656,7 @@ public PaymentRequest withAppFee(Integer appFee) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. `GBP` + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. `GBP` * and `EUR` supported; `GBP` with your customers in the UK and for `EUR` with your * customers in supported Eurozone countries only. */ @@ -1683,7 +1668,6 @@ public PaymentRequest withCurrency(String currency) { /** * A human-readable description of the payment and/or mandate. This will be displayed to * the payer when authorising the billing request. - * */ public PaymentRequest withDescription(String description) { this.description = description; @@ -1696,7 +1680,6 @@ public PaymentRequest withDescription(String description) { * - `managed` will be moved through GoCardless' account, batched, and payed out. - * `direct` will be a direct transfer from the payer's account to the merchant where * invoicing will be handled separately. - * */ public PaymentRequest withFundsSettlement(FundsSettlement fundsSettlement) { this.fundsSettlement = fundsSettlement; @@ -1716,7 +1699,6 @@ public PaymentRequest withMetadata(Map metadata) { * A custom payment reference defined by the merchant. It is only available for payments * on the PayTo scheme or payments using the Direct Funds settlement model on the Faster * Payments scheme. - * */ public PaymentRequest withReference(String reference) { this.reference = reference; @@ -1724,15 +1706,11 @@ public PaymentRequest withReference(String reference) { } /** - * 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). - *

- *

- * Important: This is not applicable to Pay by Bank and VRP payments. - *

+ * On failure, automatically retry payments using intelligent retries + * (https://developer.gocardless.com/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). Important: This is + * not applicable to Pay by Bank and VRP payments. */ public PaymentRequest withRetryIfPossible(Boolean retryIfPossible) { this.retryIfPossible = retryIfPossible; diff --git a/src/main/java/com/gocardless/services/BlockService.java b/src/main/java/com/gocardless/services/BlockService.java index bfc91b68..4886a47b 100644 --- a/src/main/java/com/gocardless/services/BlockService.java +++ b/src/main/java/com/gocardless/services/BlockService.java @@ -31,10 +31,8 @@ * an existing bank account must be used when creating this block. Please be aware that we cannot * always match a bank account to a given bank name. * - *

- * This API is currently only available for GoCardless Protect+ integrators - please - * get in touch if you would like to use this API. - *

+ * This API is currently only available for GoCardless Protect+ integrators - please get in touch + * (mailto:help@gocardless.com) if you would like to use this API. */ public class BlockService { private final HttpClient httpClient; @@ -62,7 +60,9 @@ public BlockGetRequest get(String identity) { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your blocks. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * blocks. */ public BlockListRequest> list() { return new BlockListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -244,7 +244,9 @@ protected Class getResponseClass() { /** * Request class for {@link BlockService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your blocks. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * blocks. */ public static final class BlockListRequest extends ListRequest { private String block; @@ -270,7 +272,7 @@ public BlockListRequest withBefore(String before) { } /** - * ID of a [Block](#core-endpoints-blocks). + * ID of a Block (https://developer.gocardless.com/api-reference/#core-endpoints-blocks). */ public BlockListRequest withBlock(String block) { this.block = block; @@ -287,7 +289,9 @@ public BlockListRequest withBlockType(String blockType) { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was created. + * Fixed timestamp + * (https://developer.gocardless.com/api-reference/#api-usage-dates-and-times), recording + * when this resource was created. */ public BlockListRequest withCreatedAt(String createdAt) { this.createdAt = createdAt; @@ -313,7 +317,9 @@ public BlockListRequest withReasonType(String reasonType) { } /** - * Fixed [timestamp](#api-usage-dates-and-times), recording when this resource was updated. + * Fixed timestamp + * (https://developer.gocardless.com/api-reference/#api-usage-dates-and-times), recording + * when this resource was updated. */ public BlockListRequest withUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; diff --git a/src/main/java/com/gocardless/services/CreditorBankAccountService.java b/src/main/java/com/gocardless/services/CreditorBankAccountService.java index 35f8b688..f4d9ad93 100644 --- a/src/main/java/com/gocardless/services/CreditorBankAccountService.java +++ b/src/main/java/com/gocardless/services/CreditorBankAccountService.java @@ -12,17 +12,17 @@ /** * Service class for working with creditor bank account resources. * - * Creditor Bank Accounts hold the bank details of a [creditor](#core-endpoints-creditors). These - * are the bank accounts which your [payouts](#core-endpoints-payouts) will be sent to. + * Creditor Bank Accounts hold the bank details of a creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). These are the bank + * accounts which your payouts + * (https://developer.gocardless.com/api-reference/#core-endpoints-payouts) will be sent to. * * Note that creditor bank accounts must be unique, and so you will encounter a * `bank_account_exists` error if you try to create a duplicate bank account. You may wish to handle * this by updating the existing record instead, the ID of which will be provided as * `links[creditor_bank_account]` in the error response. * - *

- * Restricted: This API is not available for partner integrations. - *

+ * Restricted: This API is not available for partner integrations. */ public class CreditorBankAccountService { private final HttpClient httpClient; @@ -44,8 +44,9 @@ public CreditorBankAccountCreateRequest create() { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your creditor bank - * accounts. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * creditor bank accounts. */ public CreditorBankAccountListRequest> list() { return new CreditorBankAccountListRequest<>(httpClient, @@ -97,8 +98,9 @@ public static final class CreditorBankAccountCreateRequest /** * 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. + * stored with the linked creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). This field + * will be transliterated, upcased and truncated to 18 characters. */ public CreditorBankAccountCreateRequest withAccountHolderName(String accountHolderName) { this.accountHolderName = accountHolderName; @@ -106,7 +108,8 @@ public CreditorBankAccountCreateRequest withAccountHolderName(String accountHold } /** - * Bank account number - see [local details](#appendix-local-bank-details) for more + * Bank account number - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more * information. Alternatively you can provide an `iban`. */ public CreditorBankAccountCreateRequest withAccountNumber(String accountNumber) { @@ -116,8 +119,9 @@ public CreditorBankAccountCreateRequest withAccountNumber(String accountNumber) /** * Bank account type. Required for USD-denominated bank accounts. Must not be provided for - * bank accounts in other currencies. See [local details](#local-bank-details-united-states) - * for more information. + * bank accounts in other currencies. See local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) for + * more information. */ public CreditorBankAccountCreateRequest withAccountType(AccountType accountType) { this.accountType = accountType; @@ -125,8 +129,9 @@ public CreditorBankAccountCreateRequest withAccountType(AccountType accountType) } /** - * Bank code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Bank code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more + * information. Alternatively you can provide an `iban`. */ public CreditorBankAccountCreateRequest withBankCode(String bankCode) { this.bankCode = bankCode; @@ -134,8 +139,9 @@ public CreditorBankAccountCreateRequest withBankCode(String bankCode) { } /** - * Branch code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Branch code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more + * information. Alternatively you can provide an `iban`. */ public CreditorBankAccountCreateRequest withBranchCode(String branchCode) { this.branchCode = branchCode; @@ -143,8 +149,8 @@ public CreditorBankAccountCreateRequest withBranchCode(String branchCode) { } /** - * [ISO 3166-1 alpha-2 - * code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + * ISO 3166-1 alpha-2 code + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). * Defaults to the country code of the `iban` if supplied, otherwise is required. */ public CreditorBankAccountCreateRequest withCountryCode(String countryCode) { @@ -153,7 +159,7 @@ public CreditorBankAccountCreateRequest withCountryCode(String countryCode) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public CreditorBankAccountCreateRequest withCurrency(String currency) { @@ -162,9 +168,10 @@ public CreditorBankAccountCreateRequest withCurrency(String currency) { } /** - * International Bank Account Number. Alternatively you can provide [local - * details](#appendix-local-bank-details). IBANs are not accepted for Swedish bank accounts - * denominated in SEK - you must supply [local details](#local-bank-details-sweden). + * International Bank Account Number. Alternatively you can provide local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details). IBANs are + * not accepted for Swedish bank accounts denominated in SEK - you must supply local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-sweden). */ public CreditorBankAccountCreateRequest withIban(String iban) { this.iban = iban; @@ -177,7 +184,9 @@ public CreditorBankAccountCreateRequest withLinks(Links links) { } /** - * ID of the [creditor](#core-endpoints-creditors) that owns this bank account. + * ID of the creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors) that owns this + * bank account. */ public CreditorBankAccountCreateRequest withLinksCreditor(String creditor) { if (links == null) { @@ -278,7 +287,9 @@ public static class Links { private String creditor; /** - * ID of the [creditor](#core-endpoints-creditors) that owns this bank account. + * ID of the creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors) that owns + * this bank account. */ public Links withCreditor(String creditor) { this.creditor = creditor; @@ -290,8 +301,9 @@ public Links withCreditor(String creditor) { /** * Request class for {@link CreditorBankAccountService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your creditor bank - * accounts. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * creditor bank accounts. */ public static final class CreditorBankAccountListRequest extends ListRequest { diff --git a/src/main/java/com/gocardless/services/CreditorService.java b/src/main/java/com/gocardless/services/CreditorService.java index 6f442726..4ec55c67 100644 --- a/src/main/java/com/gocardless/services/CreditorService.java +++ b/src/main/java/com/gocardless/services/CreditorService.java @@ -12,9 +12,10 @@ /** * Service class for working with creditor resources. * - * Each [payment](#core-endpoints-payments) taken through the API is linked to a "creditor", to whom - * the payment is then paid out. In most cases your organisation will have a single "creditor", but - * the API also supports collecting payments on behalf of others. + * Each payment (https://developer.gocardless.com/api-reference/#core-endpoints-payments) taken + * through the API is linked to a "creditor", to whom the payment is then paid out. In most cases + * your organisation will have a single "creditor", but the API also supports collecting payments on + * behalf of others. * * Currently, for Anti Money Laundering reasons, any creditors you add must be directly related to * your organisation. @@ -38,7 +39,9 @@ public CreditorCreateRequest create() { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your creditors. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * creditors. */ public CreditorListRequest> list() { return new CreditorListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -80,7 +83,6 @@ public static final class CreditorCreateRequest extends IdempotentPostRequest extends ListRequest { private CreatedAt createdAt; @@ -456,7 +460,6 @@ public CreditorUpdateRequest withAddressLine3(String addressLine3) { * that creditor could be `ACME-8G7Q8`. * * This prefix is also used for refunds in EUR and GBP. - * */ public CreditorUpdateRequest withBankReferencePrefix(String bankReferencePrefix) { this.bankReferencePrefix = bankReferencePrefix; @@ -472,8 +475,8 @@ public CreditorUpdateRequest withCity(String city) { } /** - * [ISO 3166-1 alpha-2 - * code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 alpha-2 code. + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) */ public CreditorUpdateRequest withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -486,8 +489,9 @@ public CreditorUpdateRequest withLinks(Links links) { } /** - * ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is set up to - * receive payouts in AUD. + * ID of the bank account + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditor-bank-accounts) + * which is set up to receive payouts in AUD. */ public CreditorUpdateRequest withLinksDefaultAudPayoutAccount( String defaultAudPayoutAccount) { @@ -499,8 +503,9 @@ public CreditorUpdateRequest withLinksDefaultAudPayoutAccount( } /** - * ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is set up to - * receive payouts in CAD. + * ID of the bank account + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditor-bank-accounts) + * which is set up to receive payouts in CAD. */ public CreditorUpdateRequest withLinksDefaultCadPayoutAccount( String defaultCadPayoutAccount) { @@ -512,8 +517,9 @@ public CreditorUpdateRequest withLinksDefaultCadPayoutAccount( } /** - * ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is set up to - * receive payouts in DKK. + * ID of the bank account + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditor-bank-accounts) + * which is set up to receive payouts in DKK. */ public CreditorUpdateRequest withLinksDefaultDkkPayoutAccount( String defaultDkkPayoutAccount) { @@ -525,8 +531,9 @@ public CreditorUpdateRequest withLinksDefaultDkkPayoutAccount( } /** - * ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is set up to - * receive payouts in EUR. + * ID of the bank account + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditor-bank-accounts) + * which is set up to receive payouts in EUR. */ public CreditorUpdateRequest withLinksDefaultEurPayoutAccount( String defaultEurPayoutAccount) { @@ -538,8 +545,9 @@ public CreditorUpdateRequest withLinksDefaultEurPayoutAccount( } /** - * ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is set up to - * receive payouts in GBP. + * ID of the bank account + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditor-bank-accounts) + * which is set up to receive payouts in GBP. */ public CreditorUpdateRequest withLinksDefaultGbpPayoutAccount( String defaultGbpPayoutAccount) { @@ -551,8 +559,9 @@ public CreditorUpdateRequest withLinksDefaultGbpPayoutAccount( } /** - * ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is set up to - * receive payouts in NZD. + * ID of the bank account + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditor-bank-accounts) + * which is set up to receive payouts in NZD. */ public CreditorUpdateRequest withLinksDefaultNzdPayoutAccount( String defaultNzdPayoutAccount) { @@ -564,8 +573,9 @@ public CreditorUpdateRequest withLinksDefaultNzdPayoutAccount( } /** - * ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is set up to - * receive payouts in SEK. + * ID of the bank account + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditor-bank-accounts) + * which is set up to receive payouts in SEK. */ public CreditorUpdateRequest withLinksDefaultSekPayoutAccount( String defaultSekPayoutAccount) { @@ -577,8 +587,9 @@ public CreditorUpdateRequest withLinksDefaultSekPayoutAccount( } /** - * ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is set up to - * receive payouts in USD. + * ID of the bank account + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditor-bank-accounts) + * which is set up to receive payouts in USD. */ public CreditorUpdateRequest withLinksDefaultUsdPayoutAccount( String defaultUsdPayoutAccount) { @@ -661,8 +672,9 @@ public static class Links { private String defaultUsdPayoutAccount; /** - * ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is set up to - * receive payouts in AUD. + * ID of the bank account + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditor-bank-accounts) + * which is set up to receive payouts in AUD. */ public Links withDefaultAudPayoutAccount(String defaultAudPayoutAccount) { this.defaultAudPayoutAccount = defaultAudPayoutAccount; @@ -670,8 +682,9 @@ public Links withDefaultAudPayoutAccount(String defaultAudPayoutAccount) { } /** - * ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is set up to - * receive payouts in CAD. + * ID of the bank account + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditor-bank-accounts) + * which is set up to receive payouts in CAD. */ public Links withDefaultCadPayoutAccount(String defaultCadPayoutAccount) { this.defaultCadPayoutAccount = defaultCadPayoutAccount; @@ -679,8 +692,9 @@ public Links withDefaultCadPayoutAccount(String defaultCadPayoutAccount) { } /** - * ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is set up to - * receive payouts in DKK. + * ID of the bank account + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditor-bank-accounts) + * which is set up to receive payouts in DKK. */ public Links withDefaultDkkPayoutAccount(String defaultDkkPayoutAccount) { this.defaultDkkPayoutAccount = defaultDkkPayoutAccount; @@ -688,8 +702,9 @@ public Links withDefaultDkkPayoutAccount(String defaultDkkPayoutAccount) { } /** - * ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is set up to - * receive payouts in EUR. + * ID of the bank account + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditor-bank-accounts) + * which is set up to receive payouts in EUR. */ public Links withDefaultEurPayoutAccount(String defaultEurPayoutAccount) { this.defaultEurPayoutAccount = defaultEurPayoutAccount; @@ -697,8 +712,9 @@ public Links withDefaultEurPayoutAccount(String defaultEurPayoutAccount) { } /** - * ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is set up to - * receive payouts in GBP. + * ID of the bank account + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditor-bank-accounts) + * which is set up to receive payouts in GBP. */ public Links withDefaultGbpPayoutAccount(String defaultGbpPayoutAccount) { this.defaultGbpPayoutAccount = defaultGbpPayoutAccount; @@ -706,8 +722,9 @@ public Links withDefaultGbpPayoutAccount(String defaultGbpPayoutAccount) { } /** - * ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is set up to - * receive payouts in NZD. + * ID of the bank account + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditor-bank-accounts) + * which is set up to receive payouts in NZD. */ public Links withDefaultNzdPayoutAccount(String defaultNzdPayoutAccount) { this.defaultNzdPayoutAccount = defaultNzdPayoutAccount; @@ -715,8 +732,9 @@ public Links withDefaultNzdPayoutAccount(String defaultNzdPayoutAccount) { } /** - * ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is set up to - * receive payouts in SEK. + * ID of the bank account + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditor-bank-accounts) + * which is set up to receive payouts in SEK. */ public Links withDefaultSekPayoutAccount(String defaultSekPayoutAccount) { this.defaultSekPayoutAccount = defaultSekPayoutAccount; @@ -724,8 +742,9 @@ public Links withDefaultSekPayoutAccount(String defaultSekPayoutAccount) { } /** - * ID of the [bank account](#core-endpoints-creditor-bank-accounts) which is set up to - * receive payouts in USD. + * ID of the bank account + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditor-bank-accounts) + * which is set up to receive payouts in USD. */ public Links withDefaultUsdPayoutAccount(String defaultUsdPayoutAccount) { this.defaultUsdPayoutAccount = defaultUsdPayoutAccount; diff --git a/src/main/java/com/gocardless/services/CurrencyExchangeRateService.java b/src/main/java/com/gocardless/services/CurrencyExchangeRateService.java index 6270d55f..fcaefb1c 100644 --- a/src/main/java/com/gocardless/services/CurrencyExchangeRateService.java +++ b/src/main/java/com/gocardless/services/CurrencyExchangeRateService.java @@ -25,7 +25,9 @@ public CurrencyExchangeRateService(HttpClient httpClient) { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of all exchange rates. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of all + * exchange rates. */ public CurrencyExchangeRateListRequest> list() { return new CurrencyExchangeRateListRequest<>(httpClient, @@ -40,7 +42,9 @@ public CurrencyExchangeRateListRequest> all() { /** * Request class for {@link CurrencyExchangeRateService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of all exchange rates. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of all + * exchange rates. */ public static final class CurrencyExchangeRateListRequest extends ListRequest { diff --git a/src/main/java/com/gocardless/services/CustomerBankAccountService.java b/src/main/java/com/gocardless/services/CustomerBankAccountService.java index 3522c73f..ab9f0c7d 100644 --- a/src/main/java/com/gocardless/services/CustomerBankAccountService.java +++ b/src/main/java/com/gocardless/services/CustomerBankAccountService.java @@ -12,18 +12,21 @@ /** * Service class for working with customer bank account resources. * - * Customer Bank Accounts hold the bank details of a [customer](#core-endpoints-customers). They - * always belong to a [customer](#core-endpoints-customers), and may be linked to several Direct - * Debit [mandates](#core-endpoints-mandates). + * Customer Bank Accounts hold the bank details of a customer + * (https://developer.gocardless.com/api-reference/#core-endpoints-customers). They always belong to + * a customer (https://developer.gocardless.com/api-reference/#core-endpoints-customers), and may be + * linked to several Direct Debit mandates + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates). * * Note that customer bank accounts must be unique, and so you will encounter a * `bank_account_exists` error if you try to create a duplicate bank account. You may wish to handle * this by updating the existing record instead, the ID of which will be provided as * `links[customer_bank_account]` in the error response. * - * _Note:_ To ensure the customer's bank accounts are valid, verify them first using - * [bank_details_lookups](#bank-details-lookups-perform-a-bank-details-lookup), before proceeding - * with creating the accounts + * Note: To ensure the customer's bank accounts are valid, verify them first using + * bank_details_lookups + * (https://developer.gocardless.com/api-reference/#bank-details-lookups-perform-a-bank-details-lookup), + * before proceeding with creating the accounts */ public class CustomerBankAccountService { private final HttpClient httpClient; @@ -42,21 +45,21 @@ public CustomerBankAccountService(HttpClient httpClient) { * * There are three different ways to supply bank account details: * - * - [Local details](#appendix-local-bank-details) + * - Local details (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) + * - IBAN - Customer Bank Account Tokens + * (https://developer.gocardless.com/api-reference/#javascript-flow-create-a-customer-bank-account-token) * - * - IBAN - * - * - [Customer Bank Account Tokens](#javascript-flow-create-a-customer-bank-account-token) - * - * For more information on the different fields required in each country, see [local bank - * details](#appendix-local-bank-details). + * For more information on the different fields required in each country, see local bank details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details). */ public CustomerBankAccountCreateRequest create() { return new CustomerBankAccountCreateRequest(httpClient); } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your bank accounts. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * bank accounts. */ public CustomerBankAccountListRequest> list() { return new CustomerBankAccountListRequest<>(httpClient, @@ -101,14 +104,12 @@ public CustomerBankAccountDisableRequest disable(String identity) { * * There are three different ways to supply bank account details: * - * - [Local details](#appendix-local-bank-details) - * - * - IBAN + * - Local details (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) + * - IBAN - Customer Bank Account Tokens + * (https://developer.gocardless.com/api-reference/#javascript-flow-create-a-customer-bank-account-token) * - * - [Customer Bank Account Tokens](#javascript-flow-create-a-customer-bank-account-token) - * - * For more information on the different fields required in each country, see [local bank - * details](#appendix-local-bank-details). + * For more information on the different fields required in each country, see local bank details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details). */ public static final class CustomerBankAccountCreateRequest extends IdempotentPostRequest { @@ -127,8 +128,8 @@ public static final class CustomerBankAccountCreateRequest * 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). + * unless the request includes a customer bank account token + * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens). */ public CustomerBankAccountCreateRequest withAccountHolderName(String accountHolderName) { this.accountHolderName = accountHolderName; @@ -136,7 +137,8 @@ public CustomerBankAccountCreateRequest withAccountHolderName(String accountHold } /** - * Bank account number - see [local details](#appendix-local-bank-details) for more + * Bank account number - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more * information. Alternatively you can provide an `iban`. */ public CustomerBankAccountCreateRequest withAccountNumber(String accountNumber) { @@ -146,8 +148,9 @@ public CustomerBankAccountCreateRequest withAccountNumber(String accountNumber) /** * Bank account type. Required for USD-denominated bank accounts. Must not be provided for - * bank accounts in other currencies. See [local details](#local-bank-details-united-states) - * for more information. + * bank accounts in other currencies. See local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) for + * more information. */ public CustomerBankAccountCreateRequest withAccountType(AccountType accountType) { this.accountType = accountType; @@ -155,8 +158,9 @@ public CustomerBankAccountCreateRequest withAccountType(AccountType accountType) } /** - * Bank code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Bank code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more + * information. Alternatively you can provide an `iban`. */ public CustomerBankAccountCreateRequest withBankCode(String bankCode) { this.bankCode = bankCode; @@ -164,8 +168,9 @@ public CustomerBankAccountCreateRequest withBankCode(String bankCode) { } /** - * Branch code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Branch code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more + * information. Alternatively you can provide an `iban`. */ public CustomerBankAccountCreateRequest withBranchCode(String branchCode) { this.branchCode = branchCode; @@ -173,8 +178,8 @@ public CustomerBankAccountCreateRequest withBranchCode(String branchCode) { } /** - * [ISO 3166-1 alpha-2 - * code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + * ISO 3166-1 alpha-2 code + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). * Defaults to the country code of the `iban` if supplied, otherwise is required. */ public CustomerBankAccountCreateRequest withCountryCode(String countryCode) { @@ -183,7 +188,7 @@ public CustomerBankAccountCreateRequest withCountryCode(String countryCode) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public CustomerBankAccountCreateRequest withCurrency(String currency) { @@ -192,9 +197,10 @@ public CustomerBankAccountCreateRequest withCurrency(String currency) { } /** - * International Bank Account Number. Alternatively you can provide [local - * details](#appendix-local-bank-details). IBANs are not accepted for Swedish bank accounts - * denominated in SEK - you must supply [local details](#local-bank-details-sweden). + * International Bank Account Number. Alternatively you can provide local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details). IBANs are + * not accepted for Swedish bank accounts denominated in SEK - you must supply local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-sweden). */ public CustomerBankAccountCreateRequest withIban(String iban) { this.iban = iban; @@ -207,7 +213,9 @@ public CustomerBankAccountCreateRequest withLinks(Links links) { } /** - * ID of the [customer](#core-endpoints-customers) that owns this bank account. + * ID of the customer + * (https://developer.gocardless.com/api-reference/#core-endpoints-customers) that owns this + * bank account. */ public CustomerBankAccountCreateRequest withLinksCustomer(String customer) { if (links == null) { @@ -218,8 +226,9 @@ public CustomerBankAccountCreateRequest withLinksCustomer(String customer) { } /** - * ID of a [customer bank account token](#javascript-flow-customer-bank-account-tokens) to - * use in place of bank account parameters. + * ID of a customer bank account token + * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens) + * to use in place of bank account parameters. */ public CustomerBankAccountCreateRequest withLinksCustomerBankAccountToken( String customerBankAccountToken) { @@ -312,7 +321,9 @@ public static class Links { private String customerBankAccountToken; /** - * ID of the [customer](#core-endpoints-customers) that owns this bank account. + * ID of the customer + * (https://developer.gocardless.com/api-reference/#core-endpoints-customers) that owns + * this bank account. */ public Links withCustomer(String customer) { this.customer = customer; @@ -320,7 +331,8 @@ public Links withCustomer(String customer) { } /** - * ID of a [customer bank account token](#javascript-flow-customer-bank-account-tokens) + * ID of a customer bank account token + * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens) * to use in place of bank account parameters. */ public Links withCustomerBankAccountToken(String customerBankAccountToken) { @@ -333,7 +345,9 @@ public Links withCustomerBankAccountToken(String customerBankAccountToken) { /** * Request class for {@link CustomerBankAccountService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your bank accounts. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * bank accounts. */ public static final class CustomerBankAccountListRequest extends ListRequest { diff --git a/src/main/java/com/gocardless/services/CustomerNotificationService.java b/src/main/java/com/gocardless/services/CustomerNotificationService.java index b8b9ecdf..d454d69d 100644 --- a/src/main/java/com/gocardless/services/CustomerNotificationService.java +++ b/src/main/java/com/gocardless/services/CustomerNotificationService.java @@ -15,10 +15,8 @@ * Note that these are ephemeral records - once the notification has been actioned in some way, it * is no longer visible using this API. * - *

- * Restricted: This API is currently only available for approved integrators - - * please get in touch if you would like to use this API. - *

+ * Restricted: This API is currently only available for approved integrators - please get in touch + * (mailto:help@gocardless.com) if you would like to use this API. */ public class CustomerNotificationService { private final HttpClient httpClient; @@ -37,7 +35,6 @@ public CustomerNotificationService(HttpClient httpClient) { * GoCardless to send it). If the notification has already been actioned, or the deadline to * notify has passed, this endpoint will return an `already_actioned` error and you should not * take further action. This endpoint takes no additional parameters. - * */ public CustomerNotificationHandleRequest handle(String identity) { return new CustomerNotificationHandleRequest(httpClient, identity); @@ -50,7 +47,6 @@ public CustomerNotificationHandleRequest handle(String identity) { * GoCardless to send it). If the notification has already been actioned, or the deadline to * notify has passed, this endpoint will return an `already_actioned` error and you should not * take further action. This endpoint takes no additional parameters. - * */ public static final class CustomerNotificationHandleRequest extends PostRequest { diff --git a/src/main/java/com/gocardless/services/CustomerService.java b/src/main/java/com/gocardless/services/CustomerService.java index 9bbba6c9..bdaad5b0 100644 --- a/src/main/java/com/gocardless/services/CustomerService.java +++ b/src/main/java/com/gocardless/services/CustomerService.java @@ -12,9 +12,11 @@ /** * Service class for working with customer resources. * - * Customer objects hold the contact details for a customer. A customer can have several [customer - * bank accounts](#core-endpoints-customer-bank-accounts), which in turn can have several Direct - * Debit [mandates](#core-endpoints-mandates). + * Customer objects hold the contact details for a customer. A customer can have several customer + * bank accounts + * (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts), which in + * turn can have several Direct Debit mandates + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates). */ public class CustomerService { private final HttpClient httpClient; @@ -35,7 +37,9 @@ public CustomerCreateRequest create() { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your customers. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * customers. */ public CustomerListRequest> list() { return new CustomerListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -63,10 +67,7 @@ public CustomerUpdateRequest update(String identity) { * Removed customers will not appear in search results or lists of customers (in our API or * exports), and it will not be possible to load an individually removed customer by ID. * - *

- * The action of removing a customer cannot be reversed, so please use with - * care. - *

+ * The action of removing a customer cannot be reversed, so please use with care. */ public CustomerRemoveRequest remove(String identity) { return new CustomerRemoveRequest(httpClient, identity); @@ -139,8 +140,8 @@ public CustomerCreateRequest withCompanyName(String companyName) { } /** - * [ISO 3166-1 alpha-2 - * code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 alpha-2 code. + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) */ public CustomerCreateRequest withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -182,12 +183,13 @@ public CustomerCreateRequest withGivenName(String givenName) { } /** - * [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used as the + * ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used as the * language for notification emails sent by GoCardless if your organisation does not send - * its own (see [compliance requirements](#appendix-compliance-requirements)). Currently - * only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. If - * this is not provided, the language will be chosen based on the `country_code` (if - * supplied) or default to "en". + * its own (see compliance requirements + * (https://developer.gocardless.com/api-reference/#appendix-compliance-requirements)). + * Currently only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are + * supported. If this is not provided, the language will be chosen based on the + * `country_code` (if supplied) or default to "en". */ public CustomerCreateRequest withLanguage(String language) { this.language = language; @@ -216,8 +218,8 @@ public CustomerCreateRequest withMetadata(String key, String value) { } /** - * [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, including - * country code. + * ITU E.123 (https://en.wikipedia.org/wiki/E.123) formatted phone number, including country + * code. */ public CustomerCreateRequest withPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; @@ -234,7 +236,7 @@ public CustomerCreateRequest withPostalCode(String postalCode) { /** * The customer's address region, county or department. For US customers a 2 letter - * [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required (e.g. + * ISO3166-2:US (https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required (e.g. * `CA` for California). */ public CustomerCreateRequest withRegion(String region) { @@ -299,7 +301,9 @@ protected boolean hasBody() { /** * Request class for {@link CustomerService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your customers. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * customers. */ public static final class CustomerListRequest extends ListRequest { private ActionRequired actionRequired; @@ -382,7 +386,7 @@ public CustomerListRequest withCreatedAtLte(String lte) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public CustomerListRequest withCurrency(Currency currency) { @@ -400,10 +404,8 @@ public CustomerListRequest withLimit(Integer limit) { /** * The direction to sort in. One of: - *
    - *
  • `asc`
  • - *
  • `desc`
  • - *
+ * + * - `asc` - `desc` */ public CustomerListRequest withSortDirection(SortDirection sortDirection) { this.sortDirection = sortDirection; @@ -412,11 +414,8 @@ public CustomerListRequest withSortDirection(SortDirection sortDirection) { /** * Field by which to sort records. One of: - *
    - *
  • `name`
  • - *
  • `company_name`
  • - *
  • `created_at`
  • - *
+ * + * - `name` - `company_name` - `created_at` */ public CustomerListRequest withSortField(SortField sortField) { this.sortField = sortField; @@ -693,8 +692,8 @@ public CustomerUpdateRequest withCompanyName(String companyName) { } /** - * [ISO 3166-1 alpha-2 - * code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 alpha-2 code. + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) */ public CustomerUpdateRequest withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -736,12 +735,13 @@ public CustomerUpdateRequest withGivenName(String givenName) { } /** - * [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used as the + * ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used as the * language for notification emails sent by GoCardless if your organisation does not send - * its own (see [compliance requirements](#appendix-compliance-requirements)). Currently - * only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. If - * this is not provided, the language will be chosen based on the `country_code` (if - * supplied) or default to "en". + * its own (see compliance requirements + * (https://developer.gocardless.com/api-reference/#appendix-compliance-requirements)). + * Currently only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are + * supported. If this is not provided, the language will be chosen based on the + * `country_code` (if supplied) or default to "en". */ public CustomerUpdateRequest withLanguage(String language) { this.language = language; @@ -770,8 +770,8 @@ public CustomerUpdateRequest withMetadata(String key, String value) { } /** - * [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, including - * country code. + * ITU E.123 (https://en.wikipedia.org/wiki/E.123) formatted phone number, including country + * code. */ public CustomerUpdateRequest withPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; @@ -788,7 +788,7 @@ public CustomerUpdateRequest withPostalCode(String postalCode) { /** * The customer's address region, county or department. For US customers a 2 letter - * [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required (e.g. + * ISO3166-2:US (https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required (e.g. * `CA` for California). */ public CustomerUpdateRequest withRegion(String region) { @@ -850,10 +850,7 @@ protected boolean hasBody() { * Removed customers will not appear in search results or lists of customers (in our API or * exports), and it will not be possible to load an individually removed customer by ID. * - *

- * The action of removing a customer cannot be reversed, so please use with - * care. - *

+ * The action of removing a customer cannot be reversed, so please use with care. */ public static final class CustomerRemoveRequest extends DeleteRequest { @PathParam diff --git a/src/main/java/com/gocardless/services/EventService.java b/src/main/java/com/gocardless/services/EventService.java index da13e586..08333b85 100644 --- a/src/main/java/com/gocardless/services/EventService.java +++ b/src/main/java/com/gocardless/services/EventService.java @@ -14,14 +14,13 @@ * Events are stored for all webhooks. An event refers to a resource which has been updated, for * example a payment which has been collected, or a mandate which has been transferred. Event * creation is an asynchronous process, so it can take some time between an action occurring and its - * corresponding event getting included in API responses. See [here](#event-types) for a complete - * list of event types. - *

- * Important: Events older than 18 months will be archived and no longer accessible - * via the API or exports. Archival will begin no sooner than 1 August 2026 in sandbox environments, - * and no sooner than 1 October 2026 in live environments. Events within the 18-month window are - * unaffected. If you need archived data, contact GoCardless support. - *

+ * corresponding event getting included in API responses. See here + * (https://developer.gocardless.com/api-reference/#event-types) for a complete list of event types. + * + * Important: Events older than 18 months will be archived and no longer accessible via the API or + * exports. Archival will begin no sooner than 1 August 2026 in sandbox environments, and no sooner + * than 1 October 2026 in live environments. Events within the 18-month window are unaffected. If + * you need archived data, contact GoCardless support. */ public class EventService { private final HttpClient httpClient; @@ -35,12 +34,13 @@ public EventService(HttpClient httpClient) { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your events. - *

- * Important: This endpoint will no longer return events older than 18 months, - * including when filtering by resource. This takes effect no sooner than 1 August 2026 in - * sandbox environments, and no sooner than 1 October 2026 in live environments. - *

+ * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * events. + * + * Important: This endpoint will no longer return events older than 18 months, including when + * filtering by resource. This takes effect no sooner than 1 August 2026 in sandbox + * environments, and no sooner than 1 October 2026 in live environments. */ public EventListRequest> list() { return new EventListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -60,12 +60,13 @@ public EventGetRequest get(String identity) { /** * Request class for {@link EventService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your events. - *

- * Important: This endpoint will no longer return events older than 18 months, - * including when filtering by resource. This takes effect no sooner than 1 August 2026 in - * sandbox environments, and no sooner than 1 October 2026 in live environments. - *

+ * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * events. + * + * Important: This endpoint will no longer return events older than 18 months, including when + * filtering by resource. This takes effect no sooner than 1 August 2026 in sandbox + * environments, and no sooner than 1 October 2026 in live environments. */ public static final class EventListRequest extends ListRequest { private String action; @@ -112,8 +113,9 @@ public EventListRequest withBefore(String before) { } /** - * ID of a [billing request](#billing-requests-billing-requests). If specified, this - * endpoint will return all events for the given billing request. + * ID of a billing request + * (https://developer.gocardless.com/api-reference/#billing-requests-billing-requests). If + * specified, this endpoint will return all events for the given billing request. */ public EventListRequest withBillingRequest(String billingRequest) { this.billingRequest = billingRequest; @@ -170,8 +172,9 @@ public EventListRequest withCreatedAtLte(String lte) { } /** - * ID of an [creditor](#core-endpoints-creditors). If specified, this endpoint will return - * all events for the given creditor. + * ID of an creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). If specified, + * this endpoint will return all events for the given creditor. */ public EventListRequest withCreditor(String creditor) { this.creditor = creditor; @@ -189,20 +192,10 @@ public EventListRequest withExport(String export) { /** * Includes linked resources in the response. Must be used with the `resource_type` * parameter specified. The include should be one of: - *
    - *
  • `billing_request`
  • - *
  • `creditor`
  • - *
  • `instalment_schedule`
  • - *
  • `mandate`
  • - *
  • `payer_authorisation`
  • - *
  • `payment`
  • - *
  • `payout`
  • - *
  • `refund`
  • - *
  • `scheme_identifier`
  • - *
  • `subscription`
  • - *
  • `outbound_payment`
  • - *
  • `payment_account_transaction`
  • - *
+ * + * - `billing_request` - `creditor` - `instalment_schedule` - `mandate` - + * `payer_authorisation` - `payment` - `payout` - `refund` - `scheme_identifier` - + * `subscription` - `outbound_payment` - `payment_account_transaction` */ public EventListRequest withInclude(Include include) { this.include = include; @@ -210,8 +203,9 @@ public EventListRequest withInclude(Include include) { } /** - * ID of an [instalment schedule](#core-endpoints-instalment-schedules). If specified, this - * endpoint will return all events for the given instalment schedule. + * ID of an instalment schedule + * (https://developer.gocardless.com/api-reference/#core-endpoints-instalment-schedules). If + * specified, this endpoint will return all events for the given instalment schedule. */ public EventListRequest withInstalmentSchedule(String instalmentSchedule) { this.instalmentSchedule = instalmentSchedule; @@ -227,8 +221,9 @@ public EventListRequest withLimit(Integer limit) { } /** - * ID of a [mandate](#core-endpoints-mandates). If specified, this endpoint will return all - * events for the given mandate. + * ID of a mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates). If specified, + * this endpoint will return all events for the given mandate. */ public EventListRequest withMandate(String mandate) { this.mandate = mandate; @@ -236,8 +231,9 @@ public EventListRequest withMandate(String mandate) { } /** - * ID of an [outbound_payment](#core-endpoints-outbound-payments). If specified, this - * endpoint will return all events for the given payment. + * ID of an outbound_payment + * (https://developer.gocardless.com/api-reference/#core-endpoints-outbound-payments). If + * specified, this endpoint will return all events for the given payment. */ public EventListRequest withOutboundPayment(String outboundPayment) { this.outboundPayment = outboundPayment; @@ -254,7 +250,8 @@ public EventListRequest withParentEvent(String parentEvent) { } /** - * ID of a [payer authorisation](#core-endpoints-payer-authorisations). + * ID of a payer authorisation + * (https://developer.gocardless.com/api-reference/#core-endpoints-payer-authorisations). */ public EventListRequest withPayerAuthorisation(String payerAuthorisation) { this.payerAuthorisation = payerAuthorisation; @@ -262,8 +259,9 @@ public EventListRequest withPayerAuthorisation(String payerAuthorisation) { } /** - * ID of a [payment](#core-endpoints-payments). If specified, this endpoint will return all - * events for the given payment. + * ID of a payment + * (https://developer.gocardless.com/api-reference/#core-endpoints-payments). If specified, + * this endpoint will return all events for the given payment. */ public EventListRequest withPayment(String payment) { this.payment = payment; @@ -280,8 +278,8 @@ public EventListRequest withPaymentAccountTransaction(String paymentAccountTr } /** - * ID of a [payout](#core-endpoints-payouts). If specified, this endpoint will return all - * events for the given payout. + * ID of a payout (https://developer.gocardless.com/api-reference/#core-endpoints-payouts). + * If specified, this endpoint will return all events for the given payout. */ public EventListRequest withPayout(String payout) { this.payout = payout; @@ -289,8 +287,8 @@ public EventListRequest withPayout(String payout) { } /** - * ID of a [refund](#core-endpoints-refunds). If specified, this endpoint will return all - * events for the given refund. + * ID of a refund (https://developer.gocardless.com/api-reference/#core-endpoints-refunds). + * If specified, this endpoint will return all events for the given refund. */ public EventListRequest withRefund(String refund) { this.refund = refund; @@ -303,21 +301,10 @@ public EventListRequest withRefund(String refund) { * `payer_authorisation`, `payment`, `payout`, `refund`, `scheme_identifier`, * `subscription`, `outbound_payment` or `payment_account_transaction` parameters. The type * can be one of: - *
    - *
  • `billing_requests`
  • - *
  • `creditors`
  • - *
  • `exports`
  • - *
  • `instalment_schedules`
  • - *
  • `mandates`
  • - *
  • `payer_authorisations`
  • - *
  • `payments`
  • - *
  • `payouts`
  • - *
  • `refunds`
  • - *
  • `scheme_identifiers`
  • - *
  • `subscriptions`
  • - *
  • `outbound_payments`
  • - *
  • `payment_account_transactions`
  • - *
+ * + * - `billing_requests` - `creditors` - `exports` - `instalment_schedules` - `mandates` - + * `payer_authorisations` - `payments` - `payouts` - `refunds` - `scheme_identifiers` - + * `subscriptions` - `outbound_payments` - `payment_account_transactions` */ public EventListRequest withResourceType(ResourceType resourceType) { this.resourceType = resourceType; @@ -325,8 +312,9 @@ public EventListRequest withResourceType(ResourceType resourceType) { } /** - * ID of a [scheme identifier](#core-endpoints-scheme-identifiers). If specified, this - * endpoint will return all events for the given scheme identifier. + * ID of a scheme identifier + * (https://developer.gocardless.com/api-reference/#core-endpoints-scheme-identifiers). If + * specified, this endpoint will return all events for the given scheme identifier. */ public EventListRequest withSchemeIdentifier(String schemeIdentifier) { this.schemeIdentifier = schemeIdentifier; @@ -334,8 +322,9 @@ public EventListRequest withSchemeIdentifier(String schemeIdentifier) { } /** - * ID of a [subscription](#core-endpoints-subscriptions). If specified, this endpoint will - * return all events for the given subscription. + * ID of a subscription + * (https://developer.gocardless.com/api-reference/#core-endpoints-subscriptions). If + * specified, this endpoint will return all events for the given subscription. */ public EventListRequest withSubscription(String subscription) { this.subscription = subscription; diff --git a/src/main/java/com/gocardless/services/InstalmentScheduleService.java b/src/main/java/com/gocardless/services/InstalmentScheduleService.java index b8fcc7b3..79101c8f 100644 --- a/src/main/java/com/gocardless/services/InstalmentScheduleService.java +++ b/src/main/java/com/gocardless/services/InstalmentScheduleService.java @@ -24,7 +24,6 @@ * which have not yet been submitted). * * Customers will receive a single notification about the complete schedule of collection. - * */ public class InstalmentScheduleService { private final HttpClient httpClient; @@ -41,7 +40,8 @@ public InstalmentScheduleService(HttpClient httpClient) { /** * Creates a new instalment schedule object, along with the associated payments. This API is * recommended if you know the specific dates you wish to charge. Otherwise, please check out - * the [scheduling version](#instalment-schedules-create-with-schedule). + * the scheduling version + * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-schedule). * * The `instalments` property is an array of payment properties (`amount` and `charge_date`). * @@ -57,8 +57,8 @@ public InstalmentScheduleCreateWithDatesRequest createWithDates() { /** * Creates a new instalment schedule object, along with the associated payments. This API is * recommended if you wish to use the GoCardless scheduling logic. For finer control over the - * individual dates, please check out the [alternative - * version](#instalment-schedules-create-with-dates). + * individual dates, please check out the alternative version + * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-dates). * * It can take quite a while to create the associated payments, so the API will return the * status as `pending` initially. When processing has completed, a subsequent GET request for @@ -70,7 +70,9 @@ public InstalmentScheduleCreateWithScheduleRequest createWithSchedule() { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your instalment schedules. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * instalment schedules. */ public InstalmentScheduleListRequest> list() { return new InstalmentScheduleListRequest<>(httpClient, @@ -111,7 +113,8 @@ public InstalmentScheduleCancelRequest cancel(String identity) { * * Creates a new instalment schedule object, along with the associated payments. This API is * recommended if you know the specific dates you wish to charge. Otherwise, please check out - * the [scheduling version](#instalment-schedules-create-with-schedule). + * the scheduling version + * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-schedule). * * The `instalments` property is an array of payment properties (`amount` and `charge_date`). * @@ -143,7 +146,7 @@ public InstalmentScheduleCreateWithDatesRequest withAppFee(Integer appFee) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public InstalmentScheduleCreateWithDatesRequest withCurrency(Currency currency) { @@ -153,7 +156,8 @@ public InstalmentScheduleCreateWithDatesRequest withCurrency(Currency currency) /** * An explicit array of instalment payments, each specifying at least an `amount` and - * `charge_date`. See [create (with dates)](#instalment-schedules-create-with-dates) + * `charge_date`. See create (with dates) + * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-dates) */ public InstalmentScheduleCreateWithDatesRequest withInstalments( List instalments) { @@ -163,7 +167,8 @@ public InstalmentScheduleCreateWithDatesRequest withInstalments( /** * An explicit array of instalment payments, each specifying at least an `amount` and - * `charge_date`. See [create (with dates)](#instalment-schedules-create-with-dates) + * `charge_date`. See create (with dates) + * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-dates) */ public InstalmentScheduleCreateWithDatesRequest withInstalments(Instalments instalments) { if (this.instalments == null) { @@ -179,8 +184,9 @@ public InstalmentScheduleCreateWithDatesRequest withLinks(Links links) { } /** - * ID of the associated [mandate](#core-endpoints-mandates) which the instalment schedule - * will create payments against. + * ID of the associated mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) which the + * instalment schedule will create payments against. */ public InstalmentScheduleCreateWithDatesRequest withLinksMandate(String mandate) { if (links == null) { @@ -222,27 +228,51 @@ public InstalmentScheduleCreateWithDatesRequest withName(String name) { /** * An optional reference that will appear on your customer's bank statement. The character - * limit for this reference is dependent on the scheme.
- * ACH - 10 characters
- * Autogiro - 11 characters
- * Bacs - 10 characters
- * BECS - 30 characters
- * BECS NZ - 12 characters
- * Betalingsservice - 30 characters
- * Faster Payments - 18 characters
- * PAD - scheme doesn't offer references
- * PayTo - 18 characters
- * SEPA - 140 characters
+ * limit for this reference is dependent on the scheme. ACH + *
    + *
  • 10 characters
  • + *
+ * Autogiro + *
    + *
  • 11 characters
  • + *
+ * Bacs + *
    + *
  • 10 characters
  • + *
+ * BECS + *
    + *
  • 30 characters
  • + *
+ * BECS NZ + *
    + *
  • 12 characters
  • + *
+ * Betalingsservice + *
    + *
  • 30 characters
  • + *
+ * Faster Payments + *
    + *
  • 18 characters
  • + *
+ * PAD + *
    + *
  • scheme doesn't offer references
  • + *
+ * PayTo + *
    + *
  • 18 characters
  • + *
+ * SEPA + *
    + *
  • 140 characters
  • + *
* Note that this reference must be unique (for each merchant) for the BECS scheme as it is - * a scheme requirement. - *

- * Restricted: You can only specify a payment reference for Bacs payments - * (that is, when collecting from the UK) if you're on the - * GoCardless Plus, Pro or Enterprise packages. - *

- *

- * Restricted: You can not specify a payment reference for Faster Payments. - *

+ * a scheme requirement. Restricted: You can only specify a payment reference for Bacs + * payments (that is, when collecting from the UK) if you're on the GoCardless Plus, Pro or + * Enterprise packages (https://gocardless.com/pricing). Restricted: You can not specify a + * payment reference for Faster Payments. */ public InstalmentScheduleCreateWithDatesRequest withPaymentReference( String paymentReference) { @@ -251,12 +281,10 @@ public InstalmentScheduleCreateWithDatesRequest withPaymentReference( } /** - * 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). - *

+ * On failure, automatically retry payments using intelligent retries + * (https://developer.gocardless.com/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). */ public InstalmentScheduleCreateWithDatesRequest withRetryIfPossible( Boolean retryIfPossible) { @@ -356,7 +384,8 @@ public Instalments withAmount(Integer amount) { /** * A future date on which the payment should be collected. If the date is before the - * next_possible_charge_date on the [mandate](#core-endpoints-mandates), it will be + * next_possible_charge_date on the mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates), it will be * automatically rolled forwards to that date. */ public Instalments withChargeDate(String chargeDate) { @@ -367,8 +396,8 @@ public Instalments withChargeDate(String chargeDate) { /** * A human-readable description of the payment. This will be included in the * notification email GoCardless sends to your customer if your organisation does not - * send its own notifications (see [compliance - * requirements](#appendix-compliance-requirements)). + * send its own notifications (see compliance requirements + * (https://developer.gocardless.com/api-reference/#appendix-compliance-requirements)). */ public Instalments withDescription(String description) { this.description = description; @@ -380,8 +409,9 @@ public static class Links { private String mandate; /** - * ID of the associated [mandate](#core-endpoints-mandates) which the instalment - * schedule will create payments against. + * ID of the associated mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) which the + * instalment schedule will create payments against. */ public Links withMandate(String mandate) { this.mandate = mandate; @@ -395,8 +425,8 @@ public Links withMandate(String mandate) { * * Creates a new instalment schedule object, along with the associated payments. This API is * recommended if you wish to use the GoCardless scheduling logic. For finer control over the - * individual dates, please check out the [alternative - * version](#instalment-schedules-create-with-dates). + * individual dates, please check out the alternative version + * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-dates). * * It can take quite a while to create the associated payments, so the API will return the * status as `pending` initially. When processing has completed, a subsequent GET request for @@ -426,7 +456,7 @@ public InstalmentScheduleCreateWithScheduleRequest withAppFee(Integer appFee) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public InstalmentScheduleCreateWithScheduleRequest withCurrency(Currency currency) { @@ -436,9 +466,9 @@ public InstalmentScheduleCreateWithScheduleRequest withCurrency(Currency currenc /** * Frequency of the payments you want to create, together with an array of payment amounts - * to be collected, with a specified start date for the first payment. See [create (with - * schedule)](#instalment-schedules-create-with-schedule) - * + * to be collected, with a specified start date for the first payment. See create (with + * schedule) + * (https://developer.gocardless.com/api-reference/#instalment-schedules-create-with-schedule) */ public InstalmentScheduleCreateWithScheduleRequest withInstalments( Instalments instalments) { @@ -449,7 +479,6 @@ public InstalmentScheduleCreateWithScheduleRequest withInstalments( /** * List of amounts of each instalment, in the lowest denomination for the currency (e.g. * pence in GBP, cents in EUR). - * */ public InstalmentScheduleCreateWithScheduleRequest withInstalmentsAmounts( List amounts) { @@ -462,7 +491,6 @@ public InstalmentScheduleCreateWithScheduleRequest withInstalmentsAmounts( /** * Number of `interval_units` between charge dates. Must be greater than or equal to `1`. - * */ public InstalmentScheduleCreateWithScheduleRequest withInstalmentsInterval( Integer interval) { @@ -486,11 +514,11 @@ public InstalmentScheduleCreateWithScheduleRequest withInstalmentsIntervalUnit( } /** - * The date on which the first payment should be charged. Must be on or after the - * [mandate](#core-endpoints-mandates)'s `next_possible_charge_date`. When left blank and - * `month` or `day_of_month` are provided, this will be set to the date of the first - * payment. If created without `month` or `day_of_month` this will be set as the mandate's - * `next_possible_charge_date` + * The date on which the first payment should be charged. Must be on or after the mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates)'s + * `next_possible_charge_date`. When left blank and `month` or `day_of_month` are provided, + * this will be set to the date of the first payment. If created without `month` or + * `day_of_month` this will be set as the mandate's `next_possible_charge_date` */ public InstalmentScheduleCreateWithScheduleRequest withInstalmentsStartDate( String startDate) { @@ -507,8 +535,9 @@ public InstalmentScheduleCreateWithScheduleRequest withLinks(Links links) { } /** - * ID of the associated [mandate](#core-endpoints-mandates) which the instalment schedule - * will create payments against. + * ID of the associated mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) which the + * instalment schedule will create payments against. */ public InstalmentScheduleCreateWithScheduleRequest withLinksMandate(String mandate) { if (links == null) { @@ -551,27 +580,51 @@ public InstalmentScheduleCreateWithScheduleRequest withName(String name) { /** * An optional reference that will appear on your customer's bank statement. The character - * limit for this reference is dependent on the scheme.
- * ACH - 10 characters
- * Autogiro - 11 characters
- * Bacs - 10 characters
- * BECS - 30 characters
- * BECS NZ - 12 characters
- * Betalingsservice - 30 characters
- * Faster Payments - 18 characters
- * PAD - scheme doesn't offer references
- * PayTo - 18 characters
- * SEPA - 140 characters
+ * limit for this reference is dependent on the scheme. ACH + *
    + *
  • 10 characters
  • + *
+ * Autogiro + *
    + *
  • 11 characters
  • + *
+ * Bacs + *
    + *
  • 10 characters
  • + *
+ * BECS + *
    + *
  • 30 characters
  • + *
+ * BECS NZ + *
    + *
  • 12 characters
  • + *
+ * Betalingsservice + *
    + *
  • 30 characters
  • + *
+ * Faster Payments + *
    + *
  • 18 characters
  • + *
+ * PAD + *
    + *
  • scheme doesn't offer references
  • + *
+ * PayTo + *
    + *
  • 18 characters
  • + *
+ * SEPA + *
    + *
  • 140 characters
  • + *
* Note that this reference must be unique (for each merchant) for the BECS scheme as it is - * a scheme requirement. - *

- * Restricted: You can only specify a payment reference for Bacs payments - * (that is, when collecting from the UK) if you're on the - * GoCardless Plus, Pro or Enterprise packages. - *

- *

- * Restricted: You can not specify a payment reference for Faster Payments. - *

+ * a scheme requirement. Restricted: You can only specify a payment reference for Bacs + * payments (that is, when collecting from the UK) if you're on the GoCardless Plus, Pro or + * Enterprise packages (https://gocardless.com/pricing). Restricted: You can not specify a + * payment reference for Faster Payments. */ public InstalmentScheduleCreateWithScheduleRequest withPaymentReference( String paymentReference) { @@ -580,12 +633,10 @@ public InstalmentScheduleCreateWithScheduleRequest withPaymentReference( } /** - * 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). - *

+ * On failure, automatically retry payments using intelligent retries + * (https://developer.gocardless.com/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). */ public InstalmentScheduleCreateWithScheduleRequest withRetryIfPossible( Boolean retryIfPossible) { @@ -676,7 +727,6 @@ public static class Instalments { /** * List of amounts of each instalment, in the lowest denomination for the currency (e.g. * pence in GBP, cents in EUR). - * */ public Instalments withAmounts(List amounts) { this.amounts = amounts; @@ -686,7 +736,6 @@ public Instalments withAmounts(List amounts) { /** * Number of `interval_units` between charge dates. Must be greater than or equal to * `1`. - * */ public Instalments withInterval(Integer interval) { this.interval = interval; @@ -704,10 +753,11 @@ public Instalments withIntervalUnit(IntervalUnit intervalUnit) { /** * The date on which the first payment should be charged. Must be on or after the - * [mandate](#core-endpoints-mandates)'s `next_possible_charge_date`. When left blank - * and `month` or `day_of_month` are provided, this will be set to the date of the first - * payment. If created without `month` or `day_of_month` this will be set as the - * mandate's `next_possible_charge_date` + * mandate (https://developer.gocardless.com/api-reference/#core-endpoints-mandates)'s + * `next_possible_charge_date`. When left blank and `month` or `day_of_month` are + * provided, this will be set to the date of the first payment. If created without + * `month` or `day_of_month` this will be set as the mandate's + * `next_possible_charge_date` */ public Instalments withStartDate(String startDate) { this.startDate = startDate; @@ -732,8 +782,9 @@ public static class Links { private String mandate; /** - * ID of the associated [mandate](#core-endpoints-mandates) which the instalment - * schedule will create payments against. + * ID of the associated mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) which the + * instalment schedule will create payments against. */ public Links withMandate(String mandate) { this.mandate = mandate; @@ -745,7 +796,9 @@ public Links withMandate(String mandate) { /** * Request class for {@link InstalmentScheduleService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your instalment schedules. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * instalment schedules. */ public static final class InstalmentScheduleListRequest extends ListRequest { @@ -820,7 +873,8 @@ public InstalmentScheduleListRequest withCreatedAtLte(String lte) { } /** - * ID of the associated [customer](#core-endpoints-customers). + * ID of the associated customer + * (https://developer.gocardless.com/api-reference/#core-endpoints-customers). */ public InstalmentScheduleListRequest withCustomer(String customer) { this.customer = customer; @@ -836,8 +890,9 @@ public InstalmentScheduleListRequest withLimit(Integer limit) { } /** - * ID of the associated [mandate](#core-endpoints-mandates) which the instalment schedule - * will create payments against. + * ID of the associated mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) which the + * instalment schedule will create payments against. */ public InstalmentScheduleListRequest withMandate(String mandate) { this.mandate = mandate; diff --git a/src/main/java/com/gocardless/services/InstitutionService.java b/src/main/java/com/gocardless/services/InstitutionService.java index 037d301c..e36adc52 100644 --- a/src/main/java/com/gocardless/services/InstitutionService.java +++ b/src/main/java/com/gocardless/services/InstitutionService.java @@ -12,8 +12,9 @@ /** * Service class for working with institution resources. * - * Institutions that are supported when creating [Bank - * Authorisations](#billing-requests-bank-authorisations) for a particular country or purpose. + * Institutions that are supported when creating Bank Authorisations + * (https://developer.gocardless.com/api-reference/#billing-requests-bank-authorisations) for a + * particular country or purpose. * * Not all institutions support both Payment Initiation (PIS) and Account Information (AIS) * services. @@ -73,8 +74,8 @@ public InstitutionListRequest withBranchCode(String branchCode) { } /** - * [ISO - * 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) * alpha-2 code. The country code of the institution. If nothing is provided, institutions * with the country code 'GB' are returned by default. */ @@ -165,8 +166,8 @@ public static final class InstitutionListForBillingRequestRequest private String search; /** - * [ISO - * 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) * alpha-2 code. The country code of the institution. If nothing is provided, institutions * with the country code 'GB' are returned by default. */ @@ -199,7 +200,6 @@ public InstitutionListForBillingRequestRequest withIds(String ids) { /** * Indicates whether to include temporarily disabled institutions in the response. If not * provided or set to false, only enabled institutions will be returned. - * */ public InstitutionListForBillingRequestRequest withIncludeDisabled( Boolean includeDisabled) { diff --git a/src/main/java/com/gocardless/services/LogoService.java b/src/main/java/com/gocardless/services/LogoService.java index 0f9ba10a..2119f202 100644 --- a/src/main/java/com/gocardless/services/LogoService.java +++ b/src/main/java/com/gocardless/services/LogoService.java @@ -6,8 +6,9 @@ /** * Service class for working with logo resources. * - * Logos are image uploads that, when associated with a creditor, are shown on the [billing request - * flow](#billing-requests-billing-request-flows) payment pages. + * Logos are image uploads that, when associated with a creditor, are shown on the billing request + * flow (https://developer.gocardless.com/api-reference/#billing-requests-billing-request-flows) + * payment pages. */ public class LogoService { private final HttpClient httpClient; @@ -26,8 +27,8 @@ public LogoService(HttpClient httpClient) { * * We support JPG and PNG formats. Your logo will be scaled to a maximum of 300px by 40px. For * more guidance on how to upload logos that will look great across your customer payment page - * and notification emails see - * [here](https://developer.gocardless.com/gc-embed/setting-up-branding#tips_for_uploading_your_logo). + * and notification emails see here + * (https://developer.gocardless.com/gc-embed/setting-up-branding#tips_for_uploading_your_logo). */ public LogoCreateForCreditorRequest createForCreditor() { return new LogoCreateForCreditorRequest(httpClient); @@ -41,8 +42,8 @@ public LogoCreateForCreditorRequest createForCreditor() { * * We support JPG and PNG formats. Your logo will be scaled to a maximum of 300px by 40px. For * more guidance on how to upload logos that will look great across your customer payment page - * and notification emails see - * [here](https://developer.gocardless.com/gc-embed/setting-up-branding#tips_for_uploading_your_logo). + * and notification emails see here + * (https://developer.gocardless.com/gc-embed/setting-up-branding#tips_for_uploading_your_logo). */ public static final class LogoCreateForCreditorRequest extends PostRequest { private String image; diff --git a/src/main/java/com/gocardless/services/MandateImportEntryService.java b/src/main/java/com/gocardless/services/MandateImportEntryService.java index 5b4b5c6b..7a28a7cf 100644 --- a/src/main/java/com/gocardless/services/MandateImportEntryService.java +++ b/src/main/java/com/gocardless/services/MandateImportEntryService.java @@ -11,28 +11,26 @@ /** * Service class for working with mandate import entry resources. * - * Mandate Import Entries are added to a [Mandate Import](#core-endpoints-mandate-imports). Each - * entry corresponds to one mandate to be imported into GoCardless. + * Mandate Import Entries are added to a Mandate Import + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandate-imports). Each entry + * corresponds to one mandate to be imported into GoCardless. * * To import a mandate you will need: - *
    - *
  1. Identifying information about the customer (name/company and address)
  2. - *
  3. Bank account details, consisting of an account holder name and either an IBAN or - * local bank details
  4. - *
  5. Amendment details (SEPA only)
  6. - *
+ * + * 1. Identifying information about the customer (name/company and address) 2. Bank account details, + * consisting of an account holder name and either an IBAN or local bank details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) 3. Amendment + * details (SEPA only) * * We suggest you provide a `record_identifier` (which is unique within the context of a single * mandate import) to help you to identify mandates that have been created once the import has been - * processed by GoCardless. You can [list the mandate import - * entries](#mandate-import-entries-list-all-mandate-import-entries), match them up in your system - * using the `record_identifier`, and look at the `links` fields to find the mandate, customer and - * customer bank account that have been imported. + * processed by GoCardless. You can list the mandate import entries + * (https://developer.gocardless.com/api-reference/#mandate-import-entries-list-all-mandate-import-entries), + * match them up in your system using the `record_identifier`, and look at the `links` fields to + * find the mandate, customer and customer bank account that have been imported. * - *

- * Restricted: This API is currently only available for approved integrators - - * please get in touch if you would like to use this API. - *

+ * Restricted: This API is currently only available for approved integrators - please get in touch + * (mailto:help@gocardless.com) if you would like to use this API. */ public class MandateImportEntryService { private final HttpClient httpClient; @@ -47,8 +45,9 @@ public MandateImportEntryService(HttpClient httpClient) { } /** - * For an existing [mandate import](#core-endpoints-mandate-imports), this endpoint can be used - * to add individual mandates to be imported into GoCardless. + * For an existing mandate import + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandate-imports), this + * endpoint can be used to add individual mandates to be imported into GoCardless. * * You can add no more than 30,000 rows to a single mandate import. If you attempt to go over * this limit, the API will return a `record_limit_exceeded` error. @@ -63,7 +62,6 @@ public MandateImportEntryCreateRequest create() { * After a mandate import has been submitted, you can use this endpoint to associate records in * your system (using the `record_identifier` that you provided when creating the mandate * import). - * */ public MandateImportEntryListRequest> list() { return new MandateImportEntryListRequest<>(httpClient, @@ -78,8 +76,9 @@ public MandateImportEntryListRequest> all() { /** * Request class for {@link MandateImportEntryService#create }. * - * For an existing [mandate import](#core-endpoints-mandate-imports), this endpoint can be used - * to add individual mandates to be imported into GoCardless. + * For an existing mandate import + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandate-imports), this + * endpoint can be used to add individual mandates to be imported into GoCardless. * * You can add no more than 30,000 rows to a single mandate import. If you attempt to go over * this limit, the API will return a `record_limit_exceeded` error. @@ -101,7 +100,6 @@ public MandateImportEntryCreateRequest withAmendment(Amendment amendment) { /** * The creditor identifier of the direct debit originator. Required if mandate import scheme * is `sepa`. - * */ public MandateImportEntryCreateRequest withAmendmentOriginalCreditorId( String originalCreditorId) { @@ -114,7 +112,6 @@ public MandateImportEntryCreateRequest withAmendmentOriginalCreditorId( /** * Data about the original mandate to be moved or modified. - * */ public MandateImportEntryCreateRequest withAmendmentOriginalCreditorName( String originalCreditorName) { @@ -128,7 +125,6 @@ public MandateImportEntryCreateRequest withAmendmentOriginalCreditorName( /** * The unique SEPA reference for the mandate being amended. Required if mandate import * scheme is `sepa`. - * */ public MandateImportEntryCreateRequest withAmendmentOriginalMandateReference( String originalMandateReference) { @@ -148,8 +144,8 @@ public MandateImportEntryCreateRequest withBankAccount(BankAccount bankAccount) * 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). + * unless the request includes a customer bank account token + * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens). */ public MandateImportEntryCreateRequest withBankAccountAccountHolderName( String accountHolderName) { @@ -161,7 +157,8 @@ public MandateImportEntryCreateRequest withBankAccountAccountHolderName( } /** - * Bank account number - see [local details](#appendix-local-bank-details) for more + * Bank account number - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more * information. Alternatively you can provide an `iban`. */ public MandateImportEntryCreateRequest withBankAccountAccountNumber(String accountNumber) { @@ -174,8 +171,9 @@ public MandateImportEntryCreateRequest withBankAccountAccountNumber(String accou /** * Bank account type. Required for USD-denominated bank accounts. Must not be provided for - * bank accounts in other currencies. See [local details](#local-bank-details-united-states) - * for more information. + * bank accounts in other currencies. See local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) for + * more information. */ public MandateImportEntryCreateRequest withBankAccountAccountType( BankAccount.AccountType accountType) { @@ -187,8 +185,9 @@ public MandateImportEntryCreateRequest withBankAccountAccountType( } /** - * Bank code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Bank code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more + * information. Alternatively you can provide an `iban`. */ public MandateImportEntryCreateRequest withBankAccountBankCode(String bankCode) { if (bankAccount == null) { @@ -199,8 +198,9 @@ public MandateImportEntryCreateRequest withBankAccountBankCode(String bankCode) } /** - * Branch code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Branch code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more + * information. Alternatively you can provide an `iban`. */ public MandateImportEntryCreateRequest withBankAccountBranchCode(String branchCode) { if (bankAccount == null) { @@ -211,8 +211,8 @@ public MandateImportEntryCreateRequest withBankAccountBranchCode(String branchCo } /** - * [ISO 3166-1 alpha-2 - * code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + * ISO 3166-1 alpha-2 code + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). * Defaults to the country code of the `iban` if supplied, otherwise is required. */ public MandateImportEntryCreateRequest withBankAccountCountryCode(String countryCode) { @@ -224,9 +224,10 @@ public MandateImportEntryCreateRequest withBankAccountCountryCode(String country } /** - * International Bank Account Number. Alternatively you can provide [local - * details](#appendix-local-bank-details). IBANs are not accepted for Swedish bank accounts - * denominated in SEK - you must supply [local details](#local-bank-details-sweden). + * International Bank Account Number. Alternatively you can provide local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details). IBANs are + * not accepted for Swedish bank accounts denominated in SEK - you must supply local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-sweden). */ public MandateImportEntryCreateRequest withBankAccountIban(String iban) { if (bankAccount == null) { @@ -257,7 +258,6 @@ public MandateImportEntryCreateRequest withCustomer(Customer customer) { /** * The first line of the customer's address. Required if mandate import scheme is either * `bacs` or `sepa`. - * */ public MandateImportEntryCreateRequest withCustomerAddressLine1(String addressLine1) { if (customer == null) { @@ -315,8 +315,8 @@ public MandateImportEntryCreateRequest withCustomerCompanyName(String companyNam } /** - * [ISO 3166-1 alpha-2 - * code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 alpha-2 code. + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) */ public MandateImportEntryCreateRequest withCustomerCountryCode(String countryCode) { if (customer == null) { @@ -374,12 +374,13 @@ public MandateImportEntryCreateRequest withCustomerGivenName(String givenName) { } /** - * [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used as the + * ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used as the * language for notification emails sent by GoCardless if your organisation does not send - * its own (see [compliance requirements](#appendix-compliance-requirements)). Currently - * only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. If - * this is not provided, the language will be chosen based on the `country_code` (if - * supplied) or default to "en". + * its own (see compliance requirements + * (https://developer.gocardless.com/api-reference/#appendix-compliance-requirements)). + * Currently only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are + * supported. If this is not provided, the language will be chosen based on the + * `country_code` (if supplied) or default to "en". */ public MandateImportEntryCreateRequest withCustomerLanguage(String language) { if (customer == null) { @@ -402,8 +403,8 @@ public MandateImportEntryCreateRequest withCustomerMetadata(Map } /** - * [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, including - * country code. + * ITU E.123 (https://en.wikipedia.org/wiki/E.123) formatted phone number, including country + * code. */ public MandateImportEntryCreateRequest withCustomerPhoneNumber(String phoneNumber) { if (customer == null) { @@ -415,7 +416,6 @@ public MandateImportEntryCreateRequest withCustomerPhoneNumber(String phoneNumbe /** * The customer's postal code. Required if mandate import scheme is either `bacs` or `sepa`. - * */ public MandateImportEntryCreateRequest withCustomerPostalCode(String postalCode) { if (customer == null) { @@ -427,7 +427,7 @@ public MandateImportEntryCreateRequest withCustomerPostalCode(String postalCode) /** * The customer's address region, county or department. For US customers a 2 letter - * [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required (e.g. + * ISO3166-2:US (https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required (e.g. * `CA` for California). */ public MandateImportEntryCreateRequest withCustomerRegion(String region) { @@ -474,14 +474,13 @@ public MandateImportEntryCreateRequest withMandate(Mandate mandate) { } /** - * This field is ACH specific, sometimes referred to as [SEC - * code](https://www.moderntreasury.com/learn/sec-codes). + * This field is ACH specific, sometimes referred to as SEC code + * (https://www.moderntreasury.com/learn/sec-codes). * * This is the way that the payer gives authorisation to the merchant. web: Authorisation is * Internet Initiated or via Mobile Entry (maps to SEC code: WEB) telephone: Authorisation * is provided orally over telephone (maps to SEC code: TEL) paper: Authorisation is * provided in writing and signed, or similarly authenticated (maps to SEC code: PPD) - * */ public MandateImportEntryCreateRequest withMandateAuthorisationSource( Mandate.AuthorisationSource authorisationSource) { @@ -505,9 +504,10 @@ public MandateImportEntryCreateRequest withMandateMetadata(Map m } /** - * Unique reference. Different schemes have different length and [character - * set](#appendix-character-sets) requirements. GoCardless will generate a unique reference - * satisfying the different scheme requirements if this field is left blank. + * Unique reference. Different schemes have different length and character set + * (https://developer.gocardless.com/api-reference/#appendix-character-sets) requirements. + * GoCardless will generate a unique reference satisfying the different scheme requirements + * if this field is left blank. */ public MandateImportEntryCreateRequest withMandateReference(String reference) { if (mandate == null) { @@ -520,7 +520,6 @@ public MandateImportEntryCreateRequest withMandateReference(String reference) { /** * A unique identifier for this entry, which you can use (once the import has been processed * by GoCardless) to identify the records that have been created. Limited to 255 characters. - * */ public MandateImportEntryCreateRequest withRecordIdentifier(String recordIdentifier) { this.recordIdentifier = recordIdentifier; @@ -564,7 +563,6 @@ public static class Amendment { /** * The creditor identifier of the direct debit originator. Required if mandate import * scheme is `sepa`. - * */ public Amendment withOriginalCreditorId(String originalCreditorId) { this.originalCreditorId = originalCreditorId; @@ -573,7 +571,6 @@ public Amendment withOriginalCreditorId(String originalCreditorId) { /** * Data about the original mandate to be moved or modified. - * */ public Amendment withOriginalCreditorName(String originalCreditorName) { this.originalCreditorName = originalCreditorName; @@ -583,7 +580,6 @@ public Amendment withOriginalCreditorName(String originalCreditorName) { /** * The unique SEPA reference for the mandate being amended. Required if mandate import * scheme is `sepa`. - * */ public Amendment withOriginalMandateReference(String originalMandateReference) { this.originalMandateReference = originalMandateReference; @@ -605,8 +601,8 @@ public static class BankAccount { * 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). + * unless the request includes a customer bank account token + * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens). */ public BankAccount withAccountHolderName(String accountHolderName) { this.accountHolderName = accountHolderName; @@ -614,8 +610,9 @@ public BankAccount withAccountHolderName(String accountHolderName) { } /** - * Bank account number - see [local details](#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Bank account number - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for + * more information. Alternatively you can provide an `iban`. */ public BankAccount withAccountNumber(String accountNumber) { this.accountNumber = accountNumber; @@ -624,8 +621,9 @@ public BankAccount withAccountNumber(String accountNumber) { /** * Bank account type. Required for USD-denominated bank accounts. Must not be provided - * for bank accounts in other currencies. See [local - * details](#local-bank-details-united-states) for more information. + * for bank accounts in other currencies. See local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) + * for more information. */ public BankAccount withAccountType(AccountType accountType) { this.accountType = accountType; @@ -633,8 +631,9 @@ public BankAccount withAccountType(AccountType accountType) { } /** - * Bank code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Bank code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for + * more information. Alternatively you can provide an `iban`. */ public BankAccount withBankCode(String bankCode) { this.bankCode = bankCode; @@ -642,8 +641,9 @@ public BankAccount withBankCode(String bankCode) { } /** - * Branch code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Branch code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for + * more information. Alternatively you can provide an `iban`. */ public BankAccount withBranchCode(String branchCode) { this.branchCode = branchCode; @@ -651,8 +651,8 @@ public BankAccount withBranchCode(String branchCode) { } /** - * [ISO 3166-1 alpha-2 - * code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + * ISO 3166-1 alpha-2 code + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). * Defaults to the country code of the `iban` if supplied, otherwise is required. */ public BankAccount withCountryCode(String countryCode) { @@ -661,10 +661,10 @@ public BankAccount withCountryCode(String countryCode) { } /** - * International Bank Account Number. Alternatively you can provide [local - * details](#appendix-local-bank-details). IBANs are not accepted for Swedish bank - * accounts denominated in SEK - you must supply [local - * details](#local-bank-details-sweden). + * International Bank Account Number. Alternatively you can provide local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details). IBANs + * are not accepted for Swedish bank accounts denominated in SEK - you must supply local + * details (https://developer.gocardless.com/api-reference/#local-bank-details-sweden). */ public BankAccount withIban(String iban) { this.iban = iban; @@ -714,7 +714,6 @@ public static class Customer { /** * The first line of the customer's address. Required if mandate import scheme is either * `bacs` or `sepa`. - * */ public Customer withAddressLine1(String addressLine1) { this.addressLine1 = addressLine1; @@ -757,8 +756,8 @@ public Customer withCompanyName(String companyName) { } /** - * [ISO 3166-1 alpha-2 - * code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 alpha-2 code. + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) */ public Customer withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -800,9 +799,10 @@ public Customer withGivenName(String givenName) { } /** - * [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used as the + * ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used as the * language for notification emails sent by GoCardless if your organisation does not - * send its own (see [compliance requirements](#appendix-compliance-requirements)). + * send its own (see compliance requirements + * (https://developer.gocardless.com/api-reference/#appendix-compliance-requirements)). * Currently only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are * supported. If this is not provided, the language will be chosen based on the * `country_code` (if supplied) or default to "en". @@ -822,7 +822,7 @@ public Customer withMetadata(Map metadata) { } /** - * [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, including + * ITU E.123 (https://en.wikipedia.org/wiki/E.123) formatted phone number, including * country code. */ public Customer withPhoneNumber(String phoneNumber) { @@ -833,7 +833,6 @@ public Customer withPhoneNumber(String phoneNumber) { /** * The customer's postal code. Required if mandate import scheme is either `bacs` or * `sepa`. - * */ public Customer withPostalCode(String postalCode) { this.postalCode = postalCode; @@ -842,7 +841,7 @@ public Customer withPostalCode(String postalCode) { /** * The customer's address region, county or department. For US customers a 2 letter - * [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required + * ISO3166-2:US (https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required * (e.g. `CA` for California). */ public Customer withRegion(String region) { @@ -880,15 +879,14 @@ public static class Mandate { private String reference; /** - * This field is ACH specific, sometimes referred to as [SEC - * code](https://www.moderntreasury.com/learn/sec-codes). + * This field is ACH specific, sometimes referred to as SEC code + * (https://www.moderntreasury.com/learn/sec-codes). * * This is the way that the payer gives authorisation to the merchant. web: * Authorisation is Internet Initiated or via Mobile Entry (maps to SEC code: WEB) * telephone: Authorisation is provided orally over telephone (maps to SEC code: TEL) * paper: Authorisation is provided in writing and signed, or similarly authenticated * (maps to SEC code: PPD) - * */ public Mandate withAuthorisationSource(AuthorisationSource authorisationSource) { this.authorisationSource = authorisationSource; @@ -905,9 +903,10 @@ public Mandate withMetadata(Map metadata) { } /** - * Unique reference. Different schemes have different length and [character - * set](#appendix-character-sets) requirements. GoCardless will generate a unique - * reference satisfying the different scheme requirements if this field is left blank. + * Unique reference. Different schemes have different length and character set + * (https://developer.gocardless.com/api-reference/#appendix-character-sets) + * requirements. GoCardless will generate a unique reference satisfying the different + * scheme requirements if this field is left blank. */ public Mandate withReference(String reference) { this.reference = reference; @@ -937,7 +936,6 @@ public String toString() { * After a mandate import has been submitted, you can use this endpoint to associate records in * your system (using the `record_identifier` that you provided when creating the mandate * import). - * */ public static final class MandateImportEntryListRequest extends ListRequest { @@ -978,12 +976,10 @@ public MandateImportEntryListRequest withMandateImport(String mandateImport) /** * One of: - *
    - *
  • `sucessfully_processed`: the entry has been imported and the associated records - * created.
  • - *
  • `unsuccessfully_processed`: the entry could not be processed due to an error, see the - * 'processing_errors' value
  • - *
+ * + * - `sucessfully_processed`: the entry has been imported and the associated records + * created. - `unsuccessfully_processed`: the entry could not be processed due to an error, + * see the 'processing_errors' value */ public MandateImportEntryListRequest withStatus(Status status) { this.status = status; diff --git a/src/main/java/com/gocardless/services/MandateImportService.java b/src/main/java/com/gocardless/services/MandateImportService.java index 1e3abb82..49e82bee 100644 --- a/src/main/java/com/gocardless/services/MandateImportService.java +++ b/src/main/java/com/gocardless/services/MandateImportService.java @@ -14,31 +14,35 @@ * * The process is as follows: * - * 1. [Create a mandate import](#mandate-imports-create-a-new-mandate-import) 2. [Add - * entries](#mandate-import-entries-add-a-mandate-import-entry) to the import 3. - * [Submit](#mandate-imports-submit-a-mandate-import) the import 4. Wait until a member of the - * GoCardless team approves the import, at which point the mandates will be created 5. [Link up the - * mandates](#mandate-import-entries-list-all-mandate-import-entries) in your system + * 1. Create a mandate import + * (https://developer.gocardless.com/api-reference/#mandate-imports-create-a-new-mandate-import) 2. + * Add entries + * (https://developer.gocardless.com/api-reference/#mandate-import-entries-add-a-mandate-import-entry) + * to the import 3. Submit + * (https://developer.gocardless.com/api-reference/#mandate-imports-submit-a-mandate-import) the + * import 4. Wait until a member of the GoCardless team approves the import, at which point the + * mandates will be created 5. Link up the mandates + * (https://developer.gocardless.com/api-reference/#mandate-import-entries-list-all-mandate-import-entries) + * in your system * * When you add entries to your mandate import, they are not turned into actual mandates until the * mandate import is submitted by you via the API, and then processed by a member of the GoCardless * team. When that happens, a mandate will be created for each entry in the import. * * We will issue a `mandate_created` webhook for each entry, which will be the same as the webhooks - * triggered when [ creating a mandate ](#mandates-create-a-mandate) using the mandates API. Once - * these webhooks start arriving, any reconciliation can now be accomplished by [checking the - * current status](#mandate-imports-get-a-mandate-import) of the mandate import and [linking up the - * mandates to your system](#mandate-import-entries-list-all-mandate-import-entries). + * triggered when creating a mandate + * (https://developer.gocardless.com/api-reference/#mandates-create-a-mandate) using the mandates + * API. Once these webhooks start arriving, any reconciliation can now be accomplished by checking + * the current status + * (https://developer.gocardless.com/api-reference/#mandate-imports-get-a-mandate-import) of the + * mandate import and linking up the mandates to your system + * (https://developer.gocardless.com/api-reference/#mandate-import-entries-list-all-mandate-import-entries). * - *

* Note that all Mandate Imports have an upper limit of 30,000 entries, so we recommend you split * your import into several smaller imports if you're planning to exceed this threshold. - *

* - *

- * Restricted: This API is currently only available for approved integrators - - * please get in touch if you would like to use this API. - *

+ * Restricted: This API is currently only available for approved integrators - please get in touch + * (mailto:help@gocardless.com) if you would like to use this API. */ public class MandateImportService { private final HttpClient httpClient; @@ -54,7 +58,8 @@ public MandateImportService(HttpClient httpClient) { /** * Mandate imports are first created, before mandates are added one-at-a-time, so this endpoint * merely signals the start of the import process. Once you've finished adding entries to an - * import, you should [submit](#mandate-imports-submit-a-mandate-import) it. + * import, you should submit + * (https://developer.gocardless.com/api-reference/#mandate-imports-submit-a-mandate-import) it. */ public MandateImportCreateRequest create() { return new MandateImportCreateRequest(httpClient); @@ -93,7 +98,8 @@ public MandateImportCancelRequest cancel(String identity) { * * Mandate imports are first created, before mandates are added one-at-a-time, so this endpoint * merely signals the start of the import process. Once you've finished adding entries to an - * import, you should [submit](#mandate-imports-submit-a-mandate-import) it. + * import, you should submit + * (https://developer.gocardless.com/api-reference/#mandate-imports-submit-a-mandate-import) it. */ public static final class MandateImportCreateRequest extends IdempotentPostRequest { diff --git a/src/main/java/com/gocardless/services/MandatePdfService.java b/src/main/java/com/gocardless/services/MandatePdfService.java index a22ef4a7..202c59dc 100644 --- a/src/main/java/com/gocardless/services/MandatePdfService.java +++ b/src/main/java/com/gocardless/services/MandatePdfService.java @@ -7,8 +7,9 @@ /** * Service class for working with mandate pdf resources. * - * Mandate PDFs allow you to easily display [scheme-rules - * compliant](#appendix-compliance-requirements) Direct Debit mandates to your customers. + * Mandate PDFs allow you to easily display scheme-rules compliant + * (https://developer.gocardless.com/api-reference/#appendix-compliance-requirements) Direct Debit + * mandates to your customers. */ public class MandatePdfService { private final HttpClient httpClient; @@ -25,13 +26,14 @@ public MandatePdfService(HttpClient httpClient) { * Generates a PDF mandate and returns its temporary URL. * * Customer and bank account details can be left blank (for a blank mandate), provided manually, - * or inferred from the ID of an existing [mandate](#core-endpoints-mandates). + * or inferred from the ID of an existing mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates). * * By default, we'll generate PDF mandates in English. * * To generate a PDF mandate in another language, set the `Accept-Language` header when creating - * the PDF mandate to the relevant [ISO - * 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code supported for the + * the PDF mandate to the relevant ISO 639-1 + * (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code supported for the * scheme. * * | Scheme | Supported languages | | :--------------- | @@ -52,13 +54,14 @@ public MandatePdfCreateRequest create() { * Generates a PDF mandate and returns its temporary URL. * * Customer and bank account details can be left blank (for a blank mandate), provided manually, - * or inferred from the ID of an existing [mandate](#core-endpoints-mandates). + * or inferred from the ID of an existing mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates). * * By default, we'll generate PDF mandates in English. * * To generate a PDF mandate in another language, set the `Accept-Language` header when creating - * the PDF mandate to the relevant [ISO - * 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code supported for the + * the PDF mandate to the relevant ISO 639-1 + * (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code supported for the * scheme. * * | Scheme | Supported languages | | :--------------- | @@ -100,7 +103,8 @@ public static final class MandatePdfCreateRequest extends PostRequest> list() { return new MandateListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -73,11 +77,11 @@ public MandateCancelRequest cancel(String identity) { } /** - * Reinstates a cancelled or expired mandate to the banks. - * You will receive a `resubmission_requested` webhook, but after that reinstating the mandate - * follows the same process as its initial creation, so you will receive a `submitted` webhook, - * followed by a `reinstated` or `failed` webhook up to two working days later. Any metadata - * supplied to this endpoint will be stored on the `resubmission_requested` event it causes. + * Reinstates a cancelled or expired mandate to the banks. You will receive a + * `resubmission_requested` webhook, but after that reinstating the mandate follows the same + * process as its initial creation, so you will receive a `submitted` webhook, followed by a + * `reinstated` or `failed` webhook up to two working days later. Any metadata supplied to this + * endpoint will be stored on the `resubmission_requested` event it causes. * * This will fail with a `mandate_not_inactive` error if the mandate is already being submitted, * or is active. @@ -102,14 +106,13 @@ public static final class MandateCreateRequest extends IdempotentPostRequestBank payment scheme to which this mandate and associated - * payments are submitted. Can be supplied or automatically detected from the customer's - * bank account. + * Bank payment scheme to which this mandate and associated payments are submitted. Can be + * supplied or automatically detected from the customer's bank account. */ public MandateCreateRequest withScheme(String scheme) { this.scheme = scheme; @@ -262,8 +266,9 @@ public static class Links { private String customerBankAccount; /** - * ID of the associated [creditor](#core-endpoints-creditors). Only required if your - * account manages multiple creditors. + * ID of the associated creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). Only + * required if your account manages multiple creditors. */ public Links withCreditor(String creditor) { this.creditor = creditor; @@ -271,7 +276,8 @@ public Links withCreditor(String creditor) { } /** - * ID of the associated [customer bank account](#core-endpoints-customer-bank-accounts) + * ID of the associated customer bank account + * (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts) * which the mandate is created and submits payments against. */ public Links withCustomerBankAccount(String customerBankAccount) { @@ -284,7 +290,9 @@ public Links withCustomerBankAccount(String customerBankAccount) { /** * Request class for {@link MandateService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your mandates. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * mandates. */ public static final class MandateListRequest extends ListRequest { private CreatedAt createdAt; @@ -362,9 +370,10 @@ public MandateListRequest withCreatedAtLte(String lte) { } /** - * ID of a [creditor](#core-endpoints-creditors). If specified, this endpoint will return - * all mandates for the given creditor. Cannot be used in conjunction with `customer` or - * `customer_bank_account` + * ID of a creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). If specified, + * this endpoint will return all mandates for the given creditor. Cannot be used in + * conjunction with `customer` or `customer_bank_account` */ public MandateListRequest withCreditor(String creditor) { this.creditor = creditor; @@ -372,9 +381,10 @@ public MandateListRequest withCreditor(String creditor) { } /** - * ID of a [customer](#core-endpoints-customers). If specified, this endpoint will return - * all mandates for the given customer. Cannot be used in conjunction with - * `customer_bank_account` or `creditor` + * ID of a customer + * (https://developer.gocardless.com/api-reference/#core-endpoints-customers). If specified, + * this endpoint will return all mandates for the given customer. Cannot be used in + * conjunction with `customer_bank_account` or `creditor` */ public MandateListRequest withCustomer(String customer) { this.customer = customer; @@ -382,9 +392,10 @@ public MandateListRequest withCustomer(String customer) { } /** - * ID of a [customer bank account](#core-endpoints-customer-bank-accounts). If specified, - * this endpoint will return all mandates for the given bank account. Cannot be used in - * conjunction with `customer` or `creditor` + * ID of a customer bank account + * (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts). + * If specified, this endpoint will return all mandates for the given bank account. Cannot + * be used in conjunction with `customer` or `creditor` */ public MandateListRequest withCustomerBankAccount(String customerBankAccount) { this.customerBankAccount = customerBankAccount; @@ -408,9 +419,10 @@ public MandateListRequest withMandateType(String mandateType) { } /** - * Unique reference. Different schemes have different length and [character - * set](#appendix-character-sets) requirements. GoCardless will generate a unique reference - * satisfying the different scheme requirements if this field is left blank. + * Unique reference. Different schemes have different length and character set + * (https://developer.gocardless.com/api-reference/#appendix-character-sets) requirements. + * GoCardless will generate a unique reference satisfying the different scheme requirements + * if this field is left blank. */ public MandateListRequest withReference(String reference) { this.reference = reference; @@ -779,11 +791,11 @@ protected String getRequestEnvelope() { /** * Request class for {@link MandateService#reinstate }. * - * Reinstates a cancelled or expired mandate to the banks. - * You will receive a `resubmission_requested` webhook, but after that reinstating the mandate - * follows the same process as its initial creation, so you will receive a `submitted` webhook, - * followed by a `reinstated` or `failed` webhook up to two working days later. Any metadata - * supplied to this endpoint will be stored on the `resubmission_requested` event it causes. + * Reinstates a cancelled or expired mandate to the banks. You will receive a + * `resubmission_requested` webhook, but after that reinstating the mandate follows the same + * process as its initial creation, so you will receive a `submitted` webhook, followed by a + * `reinstated` or `failed` webhook up to two working days later. Any metadata supplied to this + * endpoint will be stored on the `resubmission_requested` event it causes. * * This will fail with a `mandate_not_inactive` error if the mandate is already being submitted, * or is active. diff --git a/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java b/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java index 75bbbe8e..bb76d2a3 100644 --- a/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java +++ b/src/main/java/com/gocardless/services/NegativeBalanceLimitService.java @@ -14,7 +14,6 @@ * The negative balance limit is a threshold for the creditor balance beyond which refunds are not * permitted. The default limit is zero — refunds are not permitted if the creditor has a negative * balance. The limit can be changed on a per-creditor basis. - * */ public class NegativeBalanceLimitService { private final HttpClient httpClient; @@ -29,7 +28,9 @@ public NegativeBalanceLimitService(HttpClient httpClient) { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of negative balance limits. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of + * negative balance limits. */ public NegativeBalanceLimitListRequest> list() { return new NegativeBalanceLimitListRequest<>(httpClient, @@ -44,7 +45,9 @@ public NegativeBalanceLimitListRequest> all() { /** * Request class for {@link NegativeBalanceLimitService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of negative balance limits. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of + * negative balance limits. */ public static final class NegativeBalanceLimitListRequest extends ListRequest { @@ -76,7 +79,7 @@ public NegativeBalanceLimitListRequest withCreditor(String creditor) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public NegativeBalanceLimitListRequest withCurrency(Currency currency) { diff --git a/src/main/java/com/gocardless/services/OutboundPaymentImportEntryService.java b/src/main/java/com/gocardless/services/OutboundPaymentImportEntryService.java index e4ca2fcd..3e838754 100644 --- a/src/main/java/com/gocardless/services/OutboundPaymentImportEntryService.java +++ b/src/main/java/com/gocardless/services/OutboundPaymentImportEntryService.java @@ -26,8 +26,9 @@ public OutboundPaymentImportEntryService(HttpClient httpClient) { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of the entries for a given - * outbound payment import. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of the + * entries for a given outbound payment import. */ public OutboundPaymentImportEntryListRequest> list() { return new OutboundPaymentImportEntryListRequest<>(httpClient, @@ -42,8 +43,9 @@ public OutboundPaymentImportEntryListRequest extends ListRequest { diff --git a/src/main/java/com/gocardless/services/OutboundPaymentImportService.java b/src/main/java/com/gocardless/services/OutboundPaymentImportService.java index ddec34b4..9b8f116a 100644 --- a/src/main/java/com/gocardless/services/OutboundPaymentImportService.java +++ b/src/main/java/com/gocardless/services/OutboundPaymentImportService.java @@ -14,18 +14,18 @@ * * Outbound Payment Imports allow you to create multiple payments via a single API call. * - * The Workflow: 1. Create the outbound payment import. 2. Retrieve an authorisation link from the - * response. 3. Redirect the user to the link to authorise the import. 4. Once the user authorises - * the import, the individual outbound payments are automatically submitted. + * The Workflow: + * + * 1. Create the outbound payment import. 2. Retrieve an authorisation link from the response. 3. + * Redirect the user to the link to authorise the import. 4. Once the user authorises the import, + * the individual outbound payments are automatically submitted. * * Import entries are not processed as actual payments until they are reviewed and authorised in * GoCardless Dashboard. Upon approval, a unique outbound payment is generated for every entry in * the import. * - *

* Outbound Payment Imports are capped at 1000 entries. If you expect to exceed this limit, please * create multiple smaller imports. - *

*/ public class OutboundPaymentImportService { private final HttpClient httpClient; @@ -54,8 +54,9 @@ public OutboundPaymentImportGetRequest get(String identity) { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your outbound payment - * imports. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * outbound payment imports. */ public OutboundPaymentImportListRequest> list() { return new OutboundPaymentImportListRequest<>(httpClient, @@ -187,9 +188,13 @@ public EntryItems withRecipientBankAccountId(String recipientBankAccountId) { /** * An optional reference that will appear on your customer's bank statement. The - * character limit for this reference is dependent on the scheme.
- * Faster Payments - 18 characters, including: - * "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &-./"
+ * character limit for this reference is dependent on the scheme. + * + * Faster Payments + *
    + *
  • 18 characters, including: + * "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &-./"
  • + *
*/ public EntryItems withReference(String reference) { this.reference = reference; @@ -283,8 +288,9 @@ protected Class getResponseClass() { /** * Request class for {@link OutboundPaymentImportService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your outbound payment - * imports. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * outbound payment imports. */ public static final class OutboundPaymentImportListRequest extends ListRequest { @@ -366,17 +372,12 @@ public OutboundPaymentImportListRequest withLimit(Integer limit) { /** * The status of the outbound payment import. - *
    - *
  • `created`: The initial state of a new import.
  • - *
  • `validating`: Import validation in progress.
  • - *
  • `invalid`: Import validation failed.
  • - *
  • `valid`: Import validation succeeded.
  • - *
  • `processing`: Authorisation received; payments are being generated.
  • - *
  • `processed`: All entries have been successfully converted into outbound - * payments.
  • - *
  • `cancelled`: The import was cancelled by a user or automatically expired by the - * system.
  • - *
+ * + * - `created`: The initial state of a new import. - `validating`: Import validation in + * progress. - `invalid`: Import validation failed. - `valid`: Import validation succeeded. + * - `processing`: Authorisation received; payments are being generated. - `processed`: All + * entries have been successfully converted into outbound payments. - `cancelled`: The + * import was cancelled by a user or automatically expired by the system. */ public OutboundPaymentImportListRequest withStatus(Status status) { this.status = status; diff --git a/src/main/java/com/gocardless/services/OutboundPaymentService.java b/src/main/java/com/gocardless/services/OutboundPaymentService.java index 78e2a716..636e2627 100644 --- a/src/main/java/com/gocardless/services/OutboundPaymentService.java +++ b/src/main/java/com/gocardless/services/OutboundPaymentService.java @@ -12,18 +12,23 @@ /** * Service class for working with outbound payment resources. * - * Outbound Payments represent payments sent from [creditors](#core-endpoints-creditors). + * Outbound Payments represent payments sent from creditors + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). * - * GoCardless will notify you via a [webhook](#appendix-webhooks) when the status of the outbound - * payment [changes](#event-types-outbound-payment). + * GoCardless will notify you via a webhook + * (https://developer.gocardless.com/api-reference/#appendix-webhooks) when the status of the + * outbound payment changes + * (https://developer.gocardless.com/api-reference/#event-types-outbound-payment). * * ####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. + * 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; @@ -75,7 +80,9 @@ public OutboundPaymentGetRequest get(String identity) { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of outbound payments. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of + * outbound payments. */ public OutboundPaymentListRequest> list() { return new OutboundPaymentListRequest<>(httpClient, @@ -204,9 +211,13 @@ public OutboundPaymentCreateRequest withMetadata(String key, String value) { /** * An optional reference that will appear on your customer's bank statement. The character - * limit for this reference is dependent on the scheme.
- * Faster Payments - 18 characters, including: - * "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &-./"
+ * limit for this reference is dependent on the scheme. + * + * Faster Payments + *
    + *
  • 18 characters, including: + * "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &-./"
  • + *
*/ public OutboundPaymentCreateRequest withReference(String reference) { this.reference = reference; @@ -385,9 +396,13 @@ public OutboundPaymentWithdrawRequest withMetadata(String key, String value) { /** * An optional reference that will appear on your customer's bank statement. The character - * limit for this reference is dependent on the scheme.
- * Faster Payments - 18 characters, including: - * "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &-./"
+ * limit for this reference is dependent on the scheme. + * + * Faster Payments + *
    + *
  • 18 characters, including: + * "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &-./"
  • + *
*/ public OutboundPaymentWithdrawRequest withReference(String reference) { this.reference = reference; @@ -635,7 +650,9 @@ protected Class getResponseClass() { /** * Request class for {@link OutboundPaymentService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of outbound payments. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of + * outbound payments. */ public static final class OutboundPaymentListRequest extends ListRequest { @@ -685,25 +702,23 @@ public OutboundPaymentListRequest withLimit(Integer limit) { /** * One of: - *
    - *
  • `verifying`: The payment has been - * [created](#outbound-payments-create-an-outbound-payment) and the verification process has - * begun.
  • - *
  • `pending_approval`: The payment is awaiting - * [approval](#outbound-payments-approve-an-outbound-payment).
  • - *
  • `scheduled`: The payment has passed verification & - * [approval](#outbound-payments-approve-an-outbound-payment), but processing has not yet - * begun.
  • - *
  • `executing`: The execution date has arrived and the payment has been placed in queue - * for processing.
  • - *
  • `executed`: The payment has been accepted by the scheme and is now on its way to the - * recipient.
  • - *
  • `cancelled`: The payment has been - * [cancelled](#outbound-payments-cancel-an-outbound-payment) or was not - * [approved](#outbound-payments-approve-an-outbound-payment) on time.
  • - *
  • `failed`: The payment was not sent, usually due to an error while or after - * executing.
  • - *
+ * + * - `verifying`: The payment has been created + * (https://developer.gocardless.com/api-reference/#outbound-payments-create-an-outbound-payment) + * and the verification process has begun. - `pending_approval`: The payment is awaiting + * approval + * (https://developer.gocardless.com/api-reference/#outbound-payments-approve-an-outbound-payment). + * - `scheduled`: The payment has passed verification & approval + * (https://developer.gocardless.com/api-reference/#outbound-payments-approve-an-outbound-payment), + * but processing has not yet begun. - `executing`: The execution date has arrived and the + * payment has been placed in queue for processing. - `executed`: The payment has been + * accepted by the scheme and is now on its way to the recipient. - `cancelled`: The payment + * has been cancelled + * (https://developer.gocardless.com/api-reference/#outbound-payments-cancel-an-outbound-payment) + * or was not approved + * (https://developer.gocardless.com/api-reference/#outbound-payments-approve-an-outbound-payment) + * on time. - `failed`: The payment was not sent, usually due to an error while or after + * executing. */ public OutboundPaymentListRequest withStatus(Status status) { this.status = status; diff --git a/src/main/java/com/gocardless/services/PayerAuthorisationService.java b/src/main/java/com/gocardless/services/PayerAuthorisationService.java index 7319d697..1b6d724b 100644 --- a/src/main/java/com/gocardless/services/PayerAuthorisationService.java +++ b/src/main/java/com/gocardless/services/PayerAuthorisationService.java @@ -9,11 +9,11 @@ /** * Service class for working with payer authorisation resources. * - *

+ * * Don't use Payer Authorisations for new integrations. It is deprecated in favour of - * Billing - * Requests. Use Billing Requests to build any future integrations. - *

+ * + * Billing Requests (https://developer.gocardless.com/getting-started/billing-requests/overview/). + * Use Billing Requests to build any future integrations. * * Payer Authorisation resource acts as a wrapper for creating customer, bank account and mandate * details in a single request. PayerAuthorisation API enables the integrators to build their own @@ -31,26 +31,24 @@ * asynchronous process. * * To retrieve the status and ID of the linked resources you can do one of the following: - *
    - *
  1. Listen to payer_authorisation_completed - * webhook (recommended)
  2. - *
  3. Poll the GET - * endpoint
  4. - *
  5. Poll the GET events API - * https://api.gocardless.com/events?payer_authorisation={id}&action=completed
  6. - *
* - *

+ * 1. Listen to payer_authorisation_completed webhook + * (https://developer.gocardless.com/api-reference/#appendix-webhooks) (recommended) 2. Poll the GET + * endpoint + * (https://developer.gocardless.com/api-reference/#payer-authorisations-get-a-single-payer-authorisation) + * 3. Poll the GET events API + * https://api.gocardless.com/events?payer_authorisation={id}&action=completed + * * Note that the `create` and `update` endpoints behave differently than other existing `create` and * `update` endpoints. The Payer Authorisation is still saved if incomplete data is provided. We * return the list of incomplete data in the `incomplete_fields` along with the resources in the * body of the response. The bank account details(account_number, bank_code & branch_code) must be * sent together rather than splitting across different request for both `create` and `update` - * endpoints.
- *
+ * endpoints. + * + * * The API is designed to be flexible and allows you to collect information in multiple steps * without storing any sensitive data in the browser or in your servers. - *

*/ public class PayerAuthorisationService { private final HttpClient httpClient; @@ -88,11 +86,9 @@ public PayerAuthorisationCreateRequest create() { * invoked as many times as needed. Only fields present in the request will be modified. An * empty array of incomplete_fields means that the resource is valid. This endpoint has been * designed this way so you do not need to save any payer data on your servers or the browser - * while still being able to implement a progressive solution, such a multi-step form. - *

- * Note that in order to update the `metadata` attribute values it must be sent completely as it - * overrides the previously existing values. - *

+ * while still being able to implement a progressive solution, such a multi-step form. Note that + * in order to update the `metadata` attribute values it must be sent completely as it overrides + * the previously existing values. */ public PayerAuthorisationUpdateRequest update(String identity) { return new PayerAuthorisationUpdateRequest(httpClient, identity); @@ -112,12 +108,10 @@ public PayerAuthorisationSubmitRequest submit(String identity) { * Confirms the Payer Authorisation, indicating that the resources are ready to be created. A * Payer Authorisation cannot be confirmed if it hasn't been submitted yet. * - *

* The main use of the confirm endpoint is to enable integrators to acknowledge the end of the * setup process. They might want to make the payers go through some other steps after they go * through our flow or make them go through the necessary verification mechanism (upcoming * feature). - *

*/ public PayerAuthorisationConfirmRequest confirm(String identity) { return new PayerAuthorisationConfirmRequest(httpClient, identity); @@ -182,8 +176,8 @@ public static final class PayerAuthorisationCreateRequest private Mandate mandate; /** - * All details required for the creation of a [Customer Bank - * Account](#core-endpoints-customer-bank-accounts). + * All details required for the creation of a Customer Bank Account + * (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts). */ public PayerAuthorisationCreateRequest withBankAccount(BankAccount bankAccount) { this.bankAccount = bankAccount; @@ -194,8 +188,8 @@ public PayerAuthorisationCreateRequest withBankAccount(BankAccount bankAccount) * 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). + * unless the request includes a customer bank account token + * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens). */ public PayerAuthorisationCreateRequest withBankAccountAccountHolderName( String accountHolderName) { @@ -207,7 +201,8 @@ public PayerAuthorisationCreateRequest withBankAccountAccountHolderName( } /** - * Bank account number - see [local details](#appendix-local-bank-details) for more + * Bank account number - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more * information. Alternatively you can provide an `iban`. */ public PayerAuthorisationCreateRequest withBankAccountAccountNumber(String accountNumber) { @@ -232,8 +227,9 @@ public PayerAuthorisationCreateRequest withBankAccountAccountNumberEnding( } /** - * Account number suffix (only for bank accounts denominated in NZD) - see [local - * details](#local-bank-details-new-zealand) for more information. + * Account number suffix (only for bank accounts denominated in NZD) - see local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-new-zealand) for more + * information. */ public PayerAuthorisationCreateRequest withBankAccountAccountNumberSuffix( String accountNumberSuffix) { @@ -246,8 +242,9 @@ public PayerAuthorisationCreateRequest withBankAccountAccountNumberSuffix( /** * Bank account type. Required for USD-denominated bank accounts. Must not be provided for - * bank accounts in other currencies. See [local details](#local-bank-details-united-states) - * for more information. + * bank accounts in other currencies. See local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) for + * more information. */ public PayerAuthorisationCreateRequest withBankAccountAccountType( BankAccount.AccountType accountType) { @@ -259,8 +256,9 @@ public PayerAuthorisationCreateRequest withBankAccountAccountType( } /** - * Bank code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Bank code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more + * information. Alternatively you can provide an `iban`. */ public PayerAuthorisationCreateRequest withBankAccountBankCode(String bankCode) { if (bankAccount == null) { @@ -271,8 +269,9 @@ public PayerAuthorisationCreateRequest withBankAccountBankCode(String bankCode) } /** - * Branch code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Branch code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more + * information. Alternatively you can provide an `iban`. */ public PayerAuthorisationCreateRequest withBankAccountBranchCode(String branchCode) { if (bankAccount == null) { @@ -283,8 +282,8 @@ public PayerAuthorisationCreateRequest withBankAccountBranchCode(String branchCo } /** - * [ISO 3166-1 alpha-2 - * code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + * ISO 3166-1 alpha-2 code + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). * Defaults to the country code of the `iban` if supplied, otherwise is required. */ public PayerAuthorisationCreateRequest withBankAccountCountryCode(String countryCode) { @@ -296,7 +295,7 @@ public PayerAuthorisationCreateRequest withBankAccountCountryCode(String country } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public PayerAuthorisationCreateRequest withBankAccountCurrency(String currency) { @@ -308,9 +307,10 @@ public PayerAuthorisationCreateRequest withBankAccountCurrency(String currency) } /** - * International Bank Account Number. Alternatively you can provide [local - * details](#appendix-local-bank-details). IBANs are not accepted for Swedish bank accounts - * denominated in SEK - you must supply [local details](#local-bank-details-sweden). + * International Bank Account Number. Alternatively you can provide local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details). IBANs are + * not accepted for Swedish bank accounts denominated in SEK - you must supply local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-sweden). */ public PayerAuthorisationCreateRequest withBankAccountIban(String iban) { if (bankAccount == null) { @@ -334,7 +334,8 @@ public PayerAuthorisationCreateRequest withBankAccountMetadata( } /** - * All details required for the creation of a [Customer](#core-endpoints-customers). + * All details required for the creation of a Customer + * (https://developer.gocardless.com/api-reference/#core-endpoints-customers). */ public PayerAuthorisationCreateRequest withCustomer(Customer customer) { this.customer = customer; @@ -400,8 +401,8 @@ public PayerAuthorisationCreateRequest withCustomerCompanyName(String companyNam } /** - * [ISO 3166-1 alpha-2 - * code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 alpha-2 code. + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) */ public PayerAuthorisationCreateRequest withCustomerCountryCode(String countryCode) { if (customer == null) { @@ -459,9 +460,8 @@ public PayerAuthorisationCreateRequest withCustomerGivenName(String givenName) { } /** - * An [IETF Language Tag](https://tools.ietf.org/html/rfc5646), used for both language and + * An IETF Language Tag (https://tools.ietf.org/html/rfc5646), used for both language and * regional variations of our product. - * */ public PayerAuthorisationCreateRequest withCustomerLocale(String locale) { if (customer == null) { @@ -496,7 +496,7 @@ public PayerAuthorisationCreateRequest withCustomerPostalCode(String postalCode) /** * The customer's address region, county or department. For US customers a 2 letter - * [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required (e.g. + * ISO3166-2:US (https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required (e.g. * `CA` for California). */ public PayerAuthorisationCreateRequest withCustomerRegion(String region) { @@ -522,7 +522,8 @@ public PayerAuthorisationCreateRequest withCustomerSwedishIdentityNumber( } /** - * All details required for the creation of a [Mandate](#core-endpoints-mandates). + * All details required for the creation of a Mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates). */ public PayerAuthorisationCreateRequest withMandate(Mandate mandate) { this.mandate = mandate; @@ -548,7 +549,6 @@ public PayerAuthorisationCreateRequest withMandateMetadata(Map m * * Not required for creating offline mandates where `authorisation_source` is set to * telephone or paper. - * */ public PayerAuthorisationCreateRequest withMandatePayerIpAddress(String payerIpAddress) { if (mandate == null) { @@ -559,9 +559,10 @@ public PayerAuthorisationCreateRequest withMandatePayerIpAddress(String payerIpA } /** - * Unique reference. Different schemes have different length and [character - * set](#appendix-character-sets) requirements. GoCardless will generate a unique reference - * satisfying the different scheme requirements if this field is left blank. + * Unique reference. Different schemes have different length and character set + * (https://developer.gocardless.com/api-reference/#appendix-character-sets) requirements. + * GoCardless will generate a unique reference satisfying the different scheme requirements + * if this field is left blank. */ public PayerAuthorisationCreateRequest withMandateReference(String reference) { if (mandate == null) { @@ -643,8 +644,8 @@ public static class BankAccount { * 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). + * unless the request includes a customer bank account token + * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens). */ public BankAccount withAccountHolderName(String accountHolderName) { this.accountHolderName = accountHolderName; @@ -652,8 +653,9 @@ public BankAccount withAccountHolderName(String accountHolderName) { } /** - * Bank account number - see [local details](#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Bank account number - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for + * more information. Alternatively you can provide an `iban`. */ public BankAccount withAccountNumber(String accountNumber) { this.accountNumber = accountNumber; @@ -670,8 +672,9 @@ public BankAccount withAccountNumberEnding(String accountNumberEnding) { } /** - * Account number suffix (only for bank accounts denominated in NZD) - see [local - * details](#local-bank-details-new-zealand) for more information. + * Account number suffix (only for bank accounts denominated in NZD) - see local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-new-zealand) for + * more information. */ public BankAccount withAccountNumberSuffix(String accountNumberSuffix) { this.accountNumberSuffix = accountNumberSuffix; @@ -680,8 +683,9 @@ public BankAccount withAccountNumberSuffix(String accountNumberSuffix) { /** * Bank account type. Required for USD-denominated bank accounts. Must not be provided - * for bank accounts in other currencies. See [local - * details](#local-bank-details-united-states) for more information. + * for bank accounts in other currencies. See local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) + * for more information. */ public BankAccount withAccountType(AccountType accountType) { this.accountType = accountType; @@ -689,8 +693,9 @@ public BankAccount withAccountType(AccountType accountType) { } /** - * Bank code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Bank code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for + * more information. Alternatively you can provide an `iban`. */ public BankAccount withBankCode(String bankCode) { this.bankCode = bankCode; @@ -698,8 +703,9 @@ public BankAccount withBankCode(String bankCode) { } /** - * Branch code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Branch code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for + * more information. Alternatively you can provide an `iban`. */ public BankAccount withBranchCode(String branchCode) { this.branchCode = branchCode; @@ -707,8 +713,8 @@ public BankAccount withBranchCode(String branchCode) { } /** - * [ISO 3166-1 alpha-2 - * code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + * ISO 3166-1 alpha-2 code + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). * Defaults to the country code of the `iban` if supplied, otherwise is required. */ public BankAccount withCountryCode(String countryCode) { @@ -717,7 +723,7 @@ public BankAccount withCountryCode(String countryCode) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public BankAccount withCurrency(String currency) { @@ -726,10 +732,10 @@ public BankAccount withCurrency(String currency) { } /** - * International Bank Account Number. Alternatively you can provide [local - * details](#appendix-local-bank-details). IBANs are not accepted for Swedish bank - * accounts denominated in SEK - you must supply [local - * details](#local-bank-details-sweden). + * International Bank Account Number. Alternatively you can provide local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details). IBANs + * are not accepted for Swedish bank accounts denominated in SEK - you must supply local + * details (https://developer.gocardless.com/api-reference/#local-bank-details-sweden). */ public BankAccount withIban(String iban) { this.iban = iban; @@ -819,8 +825,8 @@ public Customer withCompanyName(String companyName) { } /** - * [ISO 3166-1 alpha-2 - * code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 alpha-2 code. + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) */ public Customer withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -862,9 +868,8 @@ public Customer withGivenName(String givenName) { } /** - * An [IETF Language Tag](https://tools.ietf.org/html/rfc5646), used for both language + * An IETF Language Tag (https://tools.ietf.org/html/rfc5646), used for both language * and regional variations of our product. - * */ public Customer withLocale(String locale) { this.locale = locale; @@ -890,7 +895,7 @@ public Customer withPostalCode(String postalCode) { /** * The customer's address region, county or department. For US customers a 2 letter - * [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required + * ISO3166-2:US (https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required * (e.g. `CA` for California). */ public Customer withRegion(String region) { @@ -932,7 +937,6 @@ public Mandate withMetadata(Map metadata) { * * Not required for creating offline mandates where `authorisation_source` is set to * telephone or paper. - * */ public Mandate withPayerIpAddress(String payerIpAddress) { this.payerIpAddress = payerIpAddress; @@ -940,9 +944,10 @@ public Mandate withPayerIpAddress(String payerIpAddress) { } /** - * Unique reference. Different schemes have different length and [character - * set](#appendix-character-sets) requirements. GoCardless will generate a unique - * reference satisfying the different scheme requirements if this field is left blank. + * Unique reference. Different schemes have different length and character set + * (https://developer.gocardless.com/api-reference/#appendix-character-sets) + * requirements. GoCardless will generate a unique reference satisfying the different + * scheme requirements if this field is left blank. */ public Mandate withReference(String reference) { this.reference = reference; @@ -987,11 +992,9 @@ public String toString() { * invoked as many times as needed. Only fields present in the request will be modified. An * empty array of incomplete_fields means that the resource is valid. This endpoint has been * designed this way so you do not need to save any payer data on your servers or the browser - * while still being able to implement a progressive solution, such a multi-step form. - *

- * Note that in order to update the `metadata` attribute values it must be sent completely as it - * overrides the previously existing values. - *

+ * while still being able to implement a progressive solution, such a multi-step form. Note that + * in order to update the `metadata` attribute values it must be sent completely as it overrides + * the previously existing values. */ public static final class PayerAuthorisationUpdateRequest extends PutRequest { @@ -1002,8 +1005,8 @@ public static final class PayerAuthorisationUpdateRequest private Mandate mandate; /** - * All details required for the creation of a [Customer Bank - * Account](#core-endpoints-customer-bank-accounts). + * All details required for the creation of a Customer Bank Account + * (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts). */ public PayerAuthorisationUpdateRequest withBankAccount(BankAccount bankAccount) { this.bankAccount = bankAccount; @@ -1014,8 +1017,8 @@ public PayerAuthorisationUpdateRequest withBankAccount(BankAccount bankAccount) * 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). + * unless the request includes a customer bank account token + * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens). */ public PayerAuthorisationUpdateRequest withBankAccountAccountHolderName( String accountHolderName) { @@ -1027,7 +1030,8 @@ public PayerAuthorisationUpdateRequest withBankAccountAccountHolderName( } /** - * Bank account number - see [local details](#appendix-local-bank-details) for more + * Bank account number - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more * information. Alternatively you can provide an `iban`. */ public PayerAuthorisationUpdateRequest withBankAccountAccountNumber(String accountNumber) { @@ -1052,8 +1056,9 @@ public PayerAuthorisationUpdateRequest withBankAccountAccountNumberEnding( } /** - * Account number suffix (only for bank accounts denominated in NZD) - see [local - * details](#local-bank-details-new-zealand) for more information. + * Account number suffix (only for bank accounts denominated in NZD) - see local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-new-zealand) for more + * information. */ public PayerAuthorisationUpdateRequest withBankAccountAccountNumberSuffix( String accountNumberSuffix) { @@ -1066,8 +1071,9 @@ public PayerAuthorisationUpdateRequest withBankAccountAccountNumberSuffix( /** * Bank account type. Required for USD-denominated bank accounts. Must not be provided for - * bank accounts in other currencies. See [local details](#local-bank-details-united-states) - * for more information. + * bank accounts in other currencies. See local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) for + * more information. */ public PayerAuthorisationUpdateRequest withBankAccountAccountType( BankAccount.AccountType accountType) { @@ -1079,8 +1085,9 @@ public PayerAuthorisationUpdateRequest withBankAccountAccountType( } /** - * Bank code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Bank code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more + * information. Alternatively you can provide an `iban`. */ public PayerAuthorisationUpdateRequest withBankAccountBankCode(String bankCode) { if (bankAccount == null) { @@ -1091,8 +1098,9 @@ public PayerAuthorisationUpdateRequest withBankAccountBankCode(String bankCode) } /** - * Branch code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Branch code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for more + * information. Alternatively you can provide an `iban`. */ public PayerAuthorisationUpdateRequest withBankAccountBranchCode(String branchCode) { if (bankAccount == null) { @@ -1103,8 +1111,8 @@ public PayerAuthorisationUpdateRequest withBankAccountBranchCode(String branchCo } /** - * [ISO 3166-1 alpha-2 - * code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + * ISO 3166-1 alpha-2 code + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). * Defaults to the country code of the `iban` if supplied, otherwise is required. */ public PayerAuthorisationUpdateRequest withBankAccountCountryCode(String countryCode) { @@ -1116,7 +1124,7 @@ public PayerAuthorisationUpdateRequest withBankAccountCountryCode(String country } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public PayerAuthorisationUpdateRequest withBankAccountCurrency(String currency) { @@ -1128,9 +1136,10 @@ public PayerAuthorisationUpdateRequest withBankAccountCurrency(String currency) } /** - * International Bank Account Number. Alternatively you can provide [local - * details](#appendix-local-bank-details). IBANs are not accepted for Swedish bank accounts - * denominated in SEK - you must supply [local details](#local-bank-details-sweden). + * International Bank Account Number. Alternatively you can provide local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details). IBANs are + * not accepted for Swedish bank accounts denominated in SEK - you must supply local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-sweden). */ public PayerAuthorisationUpdateRequest withBankAccountIban(String iban) { if (bankAccount == null) { @@ -1154,7 +1163,8 @@ public PayerAuthorisationUpdateRequest withBankAccountMetadata( } /** - * All details required for the creation of a [Customer](#core-endpoints-customers). + * All details required for the creation of a Customer + * (https://developer.gocardless.com/api-reference/#core-endpoints-customers). */ public PayerAuthorisationUpdateRequest withCustomer(Customer customer) { this.customer = customer; @@ -1220,8 +1230,8 @@ public PayerAuthorisationUpdateRequest withCustomerCompanyName(String companyNam } /** - * [ISO 3166-1 alpha-2 - * code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 alpha-2 code. + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) */ public PayerAuthorisationUpdateRequest withCustomerCountryCode(String countryCode) { if (customer == null) { @@ -1279,9 +1289,8 @@ public PayerAuthorisationUpdateRequest withCustomerGivenName(String givenName) { } /** - * An [IETF Language Tag](https://tools.ietf.org/html/rfc5646), used for both language and + * An IETF Language Tag (https://tools.ietf.org/html/rfc5646), used for both language and * regional variations of our product. - * */ public PayerAuthorisationUpdateRequest withCustomerLocale(String locale) { if (customer == null) { @@ -1316,7 +1325,7 @@ public PayerAuthorisationUpdateRequest withCustomerPostalCode(String postalCode) /** * The customer's address region, county or department. For US customers a 2 letter - * [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required (e.g. + * ISO3166-2:US (https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required (e.g. * `CA` for California). */ public PayerAuthorisationUpdateRequest withCustomerRegion(String region) { @@ -1342,7 +1351,8 @@ public PayerAuthorisationUpdateRequest withCustomerSwedishIdentityNumber( } /** - * All details required for the creation of a [Mandate](#core-endpoints-mandates). + * All details required for the creation of a Mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates). */ public PayerAuthorisationUpdateRequest withMandate(Mandate mandate) { this.mandate = mandate; @@ -1368,7 +1378,6 @@ public PayerAuthorisationUpdateRequest withMandateMetadata(Map m * * Not required for creating offline mandates where `authorisation_source` is set to * telephone or paper. - * */ public PayerAuthorisationUpdateRequest withMandatePayerIpAddress(String payerIpAddress) { if (mandate == null) { @@ -1379,9 +1388,10 @@ public PayerAuthorisationUpdateRequest withMandatePayerIpAddress(String payerIpA } /** - * Unique reference. Different schemes have different length and [character - * set](#appendix-character-sets) requirements. GoCardless will generate a unique reference - * satisfying the different scheme requirements if this field is left blank. + * Unique reference. Different schemes have different length and character set + * (https://developer.gocardless.com/api-reference/#appendix-character-sets) requirements. + * GoCardless will generate a unique reference satisfying the different scheme requirements + * if this field is left blank. */ public PayerAuthorisationUpdateRequest withMandateReference(String reference) { if (mandate == null) { @@ -1457,8 +1467,8 @@ public static class BankAccount { * 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). + * unless the request includes a customer bank account token + * (https://developer.gocardless.com/api-reference/#javascript-flow-customer-bank-account-tokens). */ public BankAccount withAccountHolderName(String accountHolderName) { this.accountHolderName = accountHolderName; @@ -1466,8 +1476,9 @@ public BankAccount withAccountHolderName(String accountHolderName) { } /** - * Bank account number - see [local details](#appendix-local-bank-details) for more - * information. Alternatively you can provide an `iban`. + * Bank account number - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for + * more information. Alternatively you can provide an `iban`. */ public BankAccount withAccountNumber(String accountNumber) { this.accountNumber = accountNumber; @@ -1484,8 +1495,9 @@ public BankAccount withAccountNumberEnding(String accountNumberEnding) { } /** - * Account number suffix (only for bank accounts denominated in NZD) - see [local - * details](#local-bank-details-new-zealand) for more information. + * Account number suffix (only for bank accounts denominated in NZD) - see local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-new-zealand) for + * more information. */ public BankAccount withAccountNumberSuffix(String accountNumberSuffix) { this.accountNumberSuffix = accountNumberSuffix; @@ -1494,8 +1506,9 @@ public BankAccount withAccountNumberSuffix(String accountNumberSuffix) { /** * Bank account type. Required for USD-denominated bank accounts. Must not be provided - * for bank accounts in other currencies. See [local - * details](#local-bank-details-united-states) for more information. + * for bank accounts in other currencies. See local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) + * for more information. */ public BankAccount withAccountType(AccountType accountType) { this.accountType = accountType; @@ -1503,8 +1516,9 @@ public BankAccount withAccountType(AccountType accountType) { } /** - * Bank code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Bank code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for + * more information. Alternatively you can provide an `iban`. */ public BankAccount withBankCode(String bankCode) { this.bankCode = bankCode; @@ -1512,8 +1526,9 @@ public BankAccount withBankCode(String bankCode) { } /** - * Branch code - see [local details](#appendix-local-bank-details) for more information. - * Alternatively you can provide an `iban`. + * Branch code - see local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details) for + * more information. Alternatively you can provide an `iban`. */ public BankAccount withBranchCode(String branchCode) { this.branchCode = branchCode; @@ -1521,8 +1536,8 @@ public BankAccount withBranchCode(String branchCode) { } /** - * [ISO 3166-1 alpha-2 - * code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + * ISO 3166-1 alpha-2 code + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). * Defaults to the country code of the `iban` if supplied, otherwise is required. */ public BankAccount withCountryCode(String countryCode) { @@ -1531,7 +1546,7 @@ public BankAccount withCountryCode(String countryCode) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. * Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public BankAccount withCurrency(String currency) { @@ -1540,10 +1555,10 @@ public BankAccount withCurrency(String currency) { } /** - * International Bank Account Number. Alternatively you can provide [local - * details](#appendix-local-bank-details). IBANs are not accepted for Swedish bank - * accounts denominated in SEK - you must supply [local - * details](#local-bank-details-sweden). + * International Bank Account Number. Alternatively you can provide local details + * (https://developer.gocardless.com/api-reference/#appendix-local-bank-details). IBANs + * are not accepted for Swedish bank accounts denominated in SEK - you must supply local + * details (https://developer.gocardless.com/api-reference/#local-bank-details-sweden). */ public BankAccount withIban(String iban) { this.iban = iban; @@ -1633,8 +1648,8 @@ public Customer withCompanyName(String companyName) { } /** - * [ISO 3166-1 alpha-2 - * code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 alpha-2 code. + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) */ public Customer withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -1676,9 +1691,8 @@ public Customer withGivenName(String givenName) { } /** - * An [IETF Language Tag](https://tools.ietf.org/html/rfc5646), used for both language + * An IETF Language Tag (https://tools.ietf.org/html/rfc5646), used for both language * and regional variations of our product. - * */ public Customer withLocale(String locale) { this.locale = locale; @@ -1704,7 +1718,7 @@ public Customer withPostalCode(String postalCode) { /** * The customer's address region, county or department. For US customers a 2 letter - * [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required + * ISO3166-2:US (https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required * (e.g. `CA` for California). */ public Customer withRegion(String region) { @@ -1746,7 +1760,6 @@ public Mandate withMetadata(Map metadata) { * * Not required for creating offline mandates where `authorisation_source` is set to * telephone or paper. - * */ public Mandate withPayerIpAddress(String payerIpAddress) { this.payerIpAddress = payerIpAddress; @@ -1754,9 +1767,10 @@ public Mandate withPayerIpAddress(String payerIpAddress) { } /** - * Unique reference. Different schemes have different length and [character - * set](#appendix-character-sets) requirements. GoCardless will generate a unique - * reference satisfying the different scheme requirements if this field is left blank. + * Unique reference. Different schemes have different length and character set + * (https://developer.gocardless.com/api-reference/#appendix-character-sets) + * requirements. GoCardless will generate a unique reference satisfying the different + * scheme requirements if this field is left blank. */ public Mandate withReference(String reference) { this.reference = reference; @@ -1851,12 +1865,10 @@ protected boolean hasBody() { * Confirms the Payer Authorisation, indicating that the resources are ready to be created. A * Payer Authorisation cannot be confirmed if it hasn't been submitted yet. * - *

* The main use of the confirm endpoint is to enable integrators to acknowledge the end of the * setup process. They might want to make the payers go through some other steps after they go * through our flow or make them go through the necessary verification mechanism (upcoming * feature). - *

*/ public static final class PayerAuthorisationConfirmRequest extends PostRequest { diff --git a/src/main/java/com/gocardless/services/PaymentAccountService.java b/src/main/java/com/gocardless/services/PaymentAccountService.java index 266edf4b..d1943430 100644 --- a/src/main/java/com/gocardless/services/PaymentAccountService.java +++ b/src/main/java/com/gocardless/services/PaymentAccountService.java @@ -10,8 +10,8 @@ /** * 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). + * Access the details of bank accounts provided for you by GoCardless that are used to fund Outbound + * Payments (https://developer.gocardless.com/api-reference/#core-endpoints-outbound-payments). */ public class PaymentAccountService { private final HttpClient httpClient; @@ -32,7 +32,9 @@ public PaymentAccountGetRequest get(String identity) { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your payment accounts. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * payment accounts. */ public PaymentAccountListRequest> list() { return new PaymentAccountListRequest<>(httpClient, @@ -89,7 +91,9 @@ protected Class getResponseClass() { /** * Request class for {@link PaymentAccountService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your payment accounts. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * payment accounts. */ public static final class PaymentAccountListRequest extends ListRequest { /** diff --git a/src/main/java/com/gocardless/services/PaymentAccountTransactionService.java b/src/main/java/com/gocardless/services/PaymentAccountTransactionService.java index 5283f25a..61baf703 100644 --- a/src/main/java/com/gocardless/services/PaymentAccountTransactionService.java +++ b/src/main/java/com/gocardless/services/PaymentAccountTransactionService.java @@ -12,8 +12,8 @@ * 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). + * account is provisioned by GoCardless and is used to fund outbound payments + * (https://developer.gocardless.com/api-reference/#core-endpoints-outbound-payments). */ public class PaymentAccountTransactionService { private final HttpClient httpClient; diff --git a/src/main/java/com/gocardless/services/PaymentService.java b/src/main/java/com/gocardless/services/PaymentService.java index 8c7a5a3d..fd59591b 100644 --- a/src/main/java/com/gocardless/services/PaymentService.java +++ b/src/main/java/com/gocardless/services/PaymentService.java @@ -12,12 +12,14 @@ /** * Service class for working with payment resources. * - * Payment objects represent payments from a [customer](#core-endpoints-customers) to a - * [creditor](#core-endpoints-creditors), taken against a Direct Debit - * [mandate](#core-endpoints-mandates). + * Payment objects represent payments from a customer + * (https://developer.gocardless.com/api-reference/#core-endpoints-customers) to a creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors), taken against a + * Direct Debit mandate (https://developer.gocardless.com/api-reference/#core-endpoints-mandates). * - * GoCardless will notify you via a [webhook](#appendix-webhooks) whenever the state of a payment - * changes. + * GoCardless will notify you via a webhook + * (https://developer.gocardless.com/api-reference/#appendix-webhooks) whenever the state of a + * payment changes. */ public class PaymentService { private final HttpClient httpClient; @@ -31,19 +33,21 @@ public PaymentService(HttpClient httpClient) { } /** - * Creates a new payment object. + * Creates a new payment object. * - * This fails with a `mandate_is_inactive` error if the linked - * [mandate](#core-endpoints-mandates) is cancelled or has failed. Payments can be created - * against mandates with status of: `pending_customer_approval`, `pending_submission`, - * `submitted`, and `active`. + * This fails with a `mandate_is_inactive` error if the linked mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) is cancelled or has + * failed. Payments can be created against mandates with status of: `pending_customer_approval`, + * `pending_submission`, `submitted`, and `active`. */ public PaymentCreateRequest create() { return new PaymentCreateRequest(httpClient); } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your payments. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * payments. */ public PaymentListRequest> list() { return new PaymentListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -79,11 +83,11 @@ public PaymentCancelRequest cancel(String identity) { } /** - * Retries a failed payment if the underlying mandate is active. You - * will receive a `resubmission_requested` webhook, but after that retrying the payment follows - * the same process as its initial creation, so you will receive a `submitted` webhook, followed - * by a `confirmed` or `failed` event. Any metadata supplied to this endpoint will be stored - * against the payment submission event it causes. + * Retries a failed payment if the underlying mandate is active. You will receive a + * `resubmission_requested` webhook, but after that retrying the payment follows the same + * process as its initial creation, so you will receive a `submitted` webhook, followed by a + * `confirmed` or `failed` event. Any metadata supplied to this endpoint will be stored against + * the payment submission event it causes. * * This will return a `retry_failed` error if the payment has not failed. * @@ -96,12 +100,12 @@ public PaymentRetryRequest retry(String identity) { /** * Request class for {@link PaymentService#create }. * - * Creates a new payment object. + * Creates a new payment object. * - * This fails with a `mandate_is_inactive` error if the linked - * [mandate](#core-endpoints-mandates) is cancelled or has failed. Payments can be created - * against mandates with status of: `pending_customer_approval`, `pending_submission`, - * `submitted`, and `active`. + * This fails with a `mandate_is_inactive` error if the linked mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) is cancelled or has + * failed. Payments can be created against mandates with status of: `pending_customer_approval`, + * `pending_submission`, `submitted`, and `active`. */ public static final class PaymentCreateRequest extends IdempotentPostRequest { private Integer amount; @@ -138,9 +142,10 @@ public PaymentCreateRequest withAppFee(Integer appFee) { /** * A future date on which the payment should be collected. If not specified, the payment - * will be collected as soon as possible. If the value is before the - * [mandate](#core-endpoints-mandates)'s `next_possible_charge_date` creation will fail. If - * the value is not a working day it will be rolled forwards to the next available one. + * will be collected as soon as possible. If the value is before the mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates)'s + * `next_possible_charge_date` creation will fail. If the value is not a working day it will + * be rolled forwards to the next available one. */ public PaymentCreateRequest withChargeDate(String chargeDate) { this.chargeDate = chargeDate; @@ -148,7 +153,7 @@ public PaymentCreateRequest withChargeDate(String chargeDate) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public PaymentCreateRequest withCurrency(Currency currency) { @@ -159,7 +164,8 @@ public PaymentCreateRequest withCurrency(Currency currency) { /** * A human-readable description of the payment. This will be included in the notification * email GoCardless sends to your customer if your organisation does not send its own - * notifications (see [compliance requirements](#appendix-compliance-requirements)). + * notifications (see compliance requirements + * (https://developer.gocardless.com/api-reference/#appendix-compliance-requirements)). */ public PaymentCreateRequest withDescription(String description) { this.description = description; @@ -182,8 +188,9 @@ public PaymentCreateRequest withLinks(Links links) { } /** - * ID of the [mandate](#core-endpoints-mandates) against which this payment should be - * collected. + * ID of the mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) against which + * this payment should be collected. */ public PaymentCreateRequest withLinksMandate(String mandate) { if (links == null) { @@ -217,13 +224,11 @@ public PaymentCreateRequest withMetadata(String key, String value) { /** * Indicates how a Variable Recurring Payment (VRP) is initiated, by or on behalf of the * payer. - *
    - *
  • `in_session`: The payer is actively participating in the payment creation - * session.
  • - *
  • `off_session`: The payer is not present during the transaction, and the payment is + * + * - `in_session`: The payer is actively participating in the payment creation session. - + * `off_session`: The payer is not present during the transaction, and the payment is * initiated by the merchant based on an established consent (e.g., a recurring subscription - * payment).
  • - *
+ * payment). */ public PaymentCreateRequest withPsuInteractionType(PsuInteractionType psuInteractionType) { this.psuInteractionType = psuInteractionType; @@ -232,27 +237,51 @@ public PaymentCreateRequest withPsuInteractionType(PsuInteractionType psuInterac /** * An optional reference that will appear on your customer's bank statement. The character - * limit for this reference is dependent on the scheme.
- * ACH - 10 characters
- * Autogiro - 11 characters
- * Bacs - 10 characters
- * BECS - 30 characters
- * BECS NZ - 12 characters
- * Betalingsservice - 30 characters
- * Faster Payments - 18 characters
- * PAD - scheme doesn't offer references
- * PayTo - 18 characters
- * SEPA - 140 characters
+ * limit for this reference is dependent on the scheme. ACH + *
    + *
  • 10 characters
  • + *
+ * Autogiro + *
    + *
  • 11 characters
  • + *
+ * Bacs + *
    + *
  • 10 characters
  • + *
+ * BECS + *
    + *
  • 30 characters
  • + *
+ * BECS NZ + *
    + *
  • 12 characters
  • + *
+ * Betalingsservice + *
    + *
  • 30 characters
  • + *
+ * Faster Payments + *
    + *
  • 18 characters
  • + *
+ * PAD + *
    + *
  • scheme doesn't offer references
  • + *
+ * PayTo + *
    + *
  • 18 characters
  • + *
+ * SEPA + *
    + *
  • 140 characters
  • + *
* Note that this reference must be unique (for each merchant) for the BECS scheme as it is - * a scheme requirement. - *

- * Restricted: You can only specify a payment reference for Bacs payments - * (that is, when collecting from the UK) if you're on the - * GoCardless Plus, Pro or Enterprise packages. - *

- *

- * Restricted: You can not specify a payment reference for Faster Payments. - *

+ * a scheme requirement. Restricted: You can only specify a payment reference for Bacs + * payments (that is, when collecting from the UK) if you're on the GoCardless Plus, Pro or + * Enterprise packages (https://gocardless.com/pricing). Restricted: You can not specify a + * payment reference for Faster Payments. */ public PaymentCreateRequest withReference(String reference) { this.reference = reference; @@ -260,12 +289,10 @@ public PaymentCreateRequest withReference(String reference) { } /** - * On failure, automatically retry the payment 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). - *

+ * On failure, automatically retry the payment using intelligent retries + * (https://developer.gocardless.com/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). */ public PaymentCreateRequest withRetryIfPossible(Boolean retryIfPossible) { this.retryIfPossible = retryIfPossible; @@ -349,8 +376,9 @@ public static class Links { private String mandate; /** - * ID of the [mandate](#core-endpoints-mandates) against which this payment should be - * collected. + * ID of the mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) against + * which this payment should be collected. */ public Links withMandate(String mandate) { this.mandate = mandate; @@ -362,7 +390,9 @@ public Links withMandate(String mandate) { /** * Request class for {@link PaymentService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your payments. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * payments. */ public static final class PaymentListRequest extends ListRequest { private ChargeDate chargeDate; @@ -505,7 +535,7 @@ public PaymentListRequest withCreditor(String creditor) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public PaymentListRequest withCurrency(Currency currency) { @@ -551,10 +581,8 @@ public PaymentListRequest withScheme(String scheme) { /** * The direction to sort in. One of: - *
    - *
  • `asc`
  • - *
  • `desc`
  • - *
+ * + * - `asc` - `desc` */ public PaymentListRequest withSortDirection(SortDirection sortDirection) { this.sortDirection = sortDirection; @@ -563,10 +591,8 @@ public PaymentListRequest withSortDirection(SortDirection sortDirection) { /** * Field by which to sort records. One of: - *
    - *
  • `charge_date`
  • - *
  • `amount`
  • - *
+ * + * - `charge_date` - `amount` */ public PaymentListRequest withSortField(SortField sortField) { this.sortField = sortField; @@ -575,21 +601,17 @@ public PaymentListRequest withSortField(SortField sortField) { /** * One of: - *
    - *
  • `pending_customer_approval`: we're waiting for the customer to approve this - * payment
  • - *
  • `pending_submission`: the payment has been created, but not yet submitted to the - * banks
  • - *
  • `submitted`: the payment has been submitted to the banks
  • - *
  • `confirmed`: the payment has been confirmed as collected
  • - *
  • `paid_out`: the payment has been included in a [payout](#core-endpoints-payouts)
  • - *
  • `cancelled`: the payment has been cancelled
  • - *
  • `customer_approval_denied`: the customer has denied approval for the payment. You - * should contact the customer directly
  • - *
  • `failed`: the payment failed to be processed. Note that payments can fail after being - * confirmed if the failure message is sent late by the banks.
  • - *
  • `charged_back`: the payment has been charged back
  • - *
+ * + * - `pending_customer_approval`: we're waiting for the customer to approve this payment - + * `pending_submission`: the payment has been created, but not yet submitted to the banks - + * `submitted`: the payment has been submitted to the banks - `confirmed`: the payment has + * been confirmed as collected - `paid_out`: the payment has been included in a payout + * (https://developer.gocardless.com/api-reference/#core-endpoints-payouts) - `cancelled`: + * the payment has been cancelled - `customer_approval_denied`: the customer has denied + * approval for the payment. You should contact the customer directly - `failed`: the + * payment failed to be processed. Note that payments can fail after being confirmed if the + * failure message is sent late by the banks. - `charged_back`: the payment has been charged + * back */ public PaymentListRequest withStatus(Status status) { this.status = status; @@ -922,12 +944,10 @@ public PaymentUpdateRequest withMetadata(String key, String value) { } /** - * On failure, automatically retry the payment 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). - *

+ * On failure, automatically retry the payment using intelligent retries + * (https://developer.gocardless.com/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). */ public PaymentUpdateRequest withRetryIfPossible(Boolean retryIfPossible) { this.retryIfPossible = retryIfPossible; @@ -1053,11 +1073,11 @@ protected String getRequestEnvelope() { /** * Request class for {@link PaymentService#retry }. * - * Retries a failed payment if the underlying mandate is active. You - * will receive a `resubmission_requested` webhook, but after that retrying the payment follows - * the same process as its initial creation, so you will receive a `submitted` webhook, followed - * by a `confirmed` or `failed` event. Any metadata supplied to this endpoint will be stored - * against the payment submission event it causes. + * Retries a failed payment if the underlying mandate is active. You will receive a + * `resubmission_requested` webhook, but after that retrying the payment follows the same + * process as its initial creation, so you will receive a `submitted` webhook, followed by a + * `confirmed` or `failed` event. Any metadata supplied to this endpoint will be stored against + * the payment submission event it causes. * * This will return a `retry_failed` error if the payment has not failed. * @@ -1071,9 +1091,10 @@ public static final class PaymentRetryRequest extends PostRequest { /** * A future date on which the payment should be collected. If not specified, the payment - * will be collected as soon as possible. If the value is before the - * [mandate](#core-endpoints-mandates)'s `next_possible_charge_date` creation will fail. If - * the value is not a working day it will be rolled forwards to the next available one. + * will be collected as soon as possible. If the value is before the mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates)'s + * `next_possible_charge_date` creation will fail. If the value is not a working day it will + * be rolled forwards to the next available one. */ public PaymentRetryRequest withChargeDate(String chargeDate) { this.chargeDate = chargeDate; diff --git a/src/main/java/com/gocardless/services/PayoutItemService.java b/src/main/java/com/gocardless/services/PayoutItemService.java index 94ebcc44..0bd467c5 100644 --- a/src/main/java/com/gocardless/services/PayoutItemService.java +++ b/src/main/java/com/gocardless/services/PayoutItemService.java @@ -21,8 +21,7 @@ * * The Payout Items API allows you to view, on a per-payout basis, the credit and debit items that * make up that payout's amount. Payout items can only be retrieved for payouts created in the last - * 6 months. Requests for older payouts will return an HTTP status 410 Gone. - * + * 6 months. Requests for older payouts will return an HTTP status 410 Gone. */ public class PayoutItemService { private final HttpClient httpClient; @@ -36,11 +35,12 @@ public PayoutItemService(HttpClient httpClient) { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of items in the payout. - * - * This endpoint only serves requests for payouts created in the last 6 months. Requests - * for older payouts will return an HTTP status 410 Gone. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of items + * in the payout. * + * This endpoint only serves requests for payouts created in the last 6 months. Requests for + * older payouts will return an HTTP status 410 Gone. */ public PayoutItemListRequest> list() { return new PayoutItemListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -53,11 +53,12 @@ public PayoutItemListRequest> all() { /** * Request class for {@link PayoutItemService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of items in the payout. - * - * This endpoint only serves requests for payouts created in the last 6 months. Requests - * for older payouts will return an HTTP status 410 Gone. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of items + * in the payout. * + * This endpoint only serves requests for payouts created in the last 6 months. Requests for + * older payouts will return an HTTP status 410 Gone. */ public static final class PayoutItemListRequest extends ListRequest { private Include2020TaxCutover include2020TaxCutover; diff --git a/src/main/java/com/gocardless/services/PayoutService.java b/src/main/java/com/gocardless/services/PayoutService.java index f297a9ac..0a82560d 100644 --- a/src/main/java/com/gocardless/services/PayoutService.java +++ b/src/main/java/com/gocardless/services/PayoutService.java @@ -12,10 +12,12 @@ /** * Service class for working with payout resources. * - * Payouts represent transfers from GoCardless to a [creditor](#core-endpoints-creditors). Each - * payout contains the funds collected from one or many [payments](#core-endpoints-payments). All - * the payments in a payout will have been collected in the same currency. Payouts are created - * automatically after a payment has been successfully collected. + * Payouts represent transfers from GoCardless to a creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). Each payout contains + * the funds collected from one or many payments + * (https://developer.gocardless.com/api-reference/#core-endpoints-payments). All the payments in a + * payout will have been collected in the same currency. Payouts are created automatically after a + * payment has been successfully collected. */ public class PayoutService { private final HttpClient httpClient; @@ -29,7 +31,9 @@ public PayoutService(HttpClient httpClient) { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your payouts. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * payouts. */ public PayoutListRequest> list() { return new PayoutListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -41,7 +45,8 @@ public PayoutListRequest> all() { /** * Retrieves the details of a single payout. For an example of how to reconcile the transactions - * in a payout, see [this guide](#events-reconciling-payouts-with-events). + * in a payout, see this guide + * (https://developer.gocardless.com/api-reference/#events-reconciling-payouts-with-events). */ public PayoutGetRequest get(String identity) { return new PayoutGetRequest(httpClient, identity); @@ -57,7 +62,9 @@ public PayoutUpdateRequest update(String identity) { /** * Request class for {@link PayoutService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your payouts. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * payouts. */ public static final class PayoutListRequest extends ListRequest { private CreatedAt createdAt; @@ -151,7 +158,7 @@ public PayoutListRequest withCreditorBankAccount(String creditorBankAccount) } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public PayoutListRequest withCurrency(Currency currency) { @@ -169,8 +176,8 @@ public PayoutListRequest withLimit(Integer limit) { /** * Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 - * characters and values up to 500 characters. _Note:_ This should not be used for storing - * PII data. + * characters and values up to 500 characters. Note: This should not be used for storing PII + * data. */ public PayoutListRequest withMetadata(Map metadata) { this.metadata = metadata; @@ -179,8 +186,8 @@ public PayoutListRequest withMetadata(Map metadata) { /** * Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 - * characters and values up to 500 characters. _Note:_ This should not be used for storing - * PII data. + * characters and values up to 500 characters. Note: This should not be used for storing PII + * data. */ public PayoutListRequest withMetadata(String key, String value) { if (metadata == null) { @@ -208,13 +215,11 @@ public PayoutListRequest withReference(String reference) { /** * One of: - *
    - *
  • `pending`: the payout has been created, but not yet sent to your bank or it is in the - * process of being exchanged through our FX provider.
  • - *
  • `paid`: the payout has been sent to the your bank. FX payouts will become `paid` - * after we emit the `fx_rate_confirmed` webhook.
  • - *
  • `bounced`: the payout bounced when sent, the payout can be retried.
  • - *
+ * + * - `pending`: the payout has been created, but not yet sent to your bank or it is in the + * process of being exchanged through our FX provider. - `paid`: the payout has been sent to + * the your bank. FX payouts will become `paid` after we emit the `fx_rate_confirmed` + * webhook. - `bounced`: the payout bounced when sent, the payout can be retried. */ public PayoutListRequest withStatus(Status status) { this.status = status; @@ -380,7 +385,8 @@ public Map getQueryParams() { * Request class for {@link PayoutService#get }. * * Retrieves the details of a single payout. For an example of how to reconcile the transactions - * in a payout, see [this guide](#events-reconciling-payouts-with-events). + * in a payout, see this guide + * (https://developer.gocardless.com/api-reference/#events-reconciling-payouts-with-events). */ public static final class PayoutGetRequest extends GetRequest { @PathParam diff --git a/src/main/java/com/gocardless/services/RedirectFlowService.java b/src/main/java/com/gocardless/services/RedirectFlowService.java index 482c4432..1127109f 100644 --- a/src/main/java/com/gocardless/services/RedirectFlowService.java +++ b/src/main/java/com/gocardless/services/RedirectFlowService.java @@ -10,37 +10,38 @@ /** * Service class for working with redirect flow resources. * - *

- * Deprecated: Redirect Flows are legacy APIs and cannot be used by new - * integrators. The [Billing Request flow](#billing-requests) API should be used for your payment - * flows. - *

+ * Deprecated: Redirect Flows are legacy APIs and cannot be used by new integrators. The Billing + * Request flow (https://developer.gocardless.com/api-reference/#billing-requests) API should be + * used for your payment flows. * - * Redirect flows enable you to use GoCardless' [hosted payment - * pages](https://pay-sandbox.gocardless.com/AL000000AKFPFF) to set up mandates with your customers. - * These pages are fully compliant and have been translated into Danish, Dutch, French, German, - * Italian, Norwegian, Portuguese, Slovak, Spanish and Swedish. + * Redirect flows enable you to use GoCardless' hosted payment pages + * (https://pay-sandbox.gocardless.com/AL000000AKFPFF) to set up mandates with your customers. These + * pages are fully compliant and have been translated into Danish, Dutch, French, German, Italian, + * Norwegian, Portuguese, Slovak, Spanish and Swedish. * * The overall flow is: * - * 1. You [create](#redirect-flows-create-a-redirect-flow) a redirect flow for your customer, and - * redirect them to the returned redirect url, e.g. `https://pay.gocardless.com/flow/RE123`. + * 1. You create + * (https://developer.gocardless.com/api-reference/#redirect-flows-create-a-redirect-flow) a + * redirect flow for your customer, and redirect them to the returned redirect url, e.g. + * `https://pay.gocardless.com/flow/RE123`. 2. Your customer supplies their name, email, address, + * and bank account details, and submits the form. This securely stores their details, and redirects + * them back to your `success_redirect_url` with `redirect_flow_id=RE123` in the querystring. 3. You + * complete + * (https://developer.gocardless.com/api-reference/#redirect-flows-complete-a-redirect-flow) the + * redirect flow, which creates a customer + * (https://developer.gocardless.com/api-reference/#core-endpoints-customers), customer bank account + * (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts), and + * mandate (https://developer.gocardless.com/api-reference/#core-endpoints-mandates), and returns + * the ID of the mandate. You may wish to create a subscription + * (https://developer.gocardless.com/api-reference/#core-endpoints-subscriptions) or payment + * (https://developer.gocardless.com/api-reference/#core-endpoints-payments) at this point. * - * 2. Your customer supplies their name, email, address, and bank account details, and submits the - * form. This securely stores their details, and redirects them back to your `success_redirect_url` - * with `redirect_flow_id=RE123` in the querystring. - * - * 3. You [complete](#redirect-flows-complete-a-redirect-flow) the redirect flow, which creates a - * [customer](#core-endpoints-customers), [customer bank - * account](#core-endpoints-customer-bank-accounts), and [mandate](#core-endpoints-mandates), and - * returns the ID of the mandate. You may wish to create a - * [subscription](#core-endpoints-subscriptions) or [payment](#core-endpoints-payments) at this - * point. - * - * Once you have [completed](#redirect-flows-complete-a-redirect-flow) the redirect flow via the - * API, you should display a confirmation page to your customer, confirming that their Direct Debit - * has been set up. You can build your own page, or redirect to the one we provide in the - * `confirmation_url` attribute of the redirect flow. + * Once you have completed + * (https://developer.gocardless.com/api-reference/#redirect-flows-complete-a-redirect-flow) the + * redirect flow via the API, you should display a confirmation page to your customer, confirming + * that their Direct Debit has been set up. You can build your own page, or redirect to the one we + * provide in the `confirmation_url` attribute of the redirect flow. * * Redirect flows expire 30 minutes after they are first created. You cannot complete an expired * redirect flow. For an integrator this is shorter and they will expire after 10 minutes. @@ -72,9 +73,12 @@ public RedirectFlowGetRequest get(String identity) { } /** - * This creates a [customer](#core-endpoints-customers), [customer bank - * account](#core-endpoints-customer-bank-accounts), and [mandate](#core-endpoints-mandates) - * using the details supplied by your customer and returns the ID of the created mandate. + * This creates a customer + * (https://developer.gocardless.com/api-reference/#core-endpoints-customers), customer bank + * account + * (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts), and + * mandate (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) using the + * details supplied by your customer and returns the ID of the created mandate. * * This will return a `redirect_flow_incomplete` error if your customer has not yet been * redirected back to your site, and a `redirect_flow_already_completed` error if your @@ -117,9 +121,9 @@ public RedirectFlowCreateRequest withLinks(Links links) { } /** - * The [creditor](#core-endpoints-creditors) for whom the mandate will be created. The - * `name` of the creditor will be displayed on the payment page. Required if your account - * manages multiple creditors. + * The creditor (https://developer.gocardless.com/api-reference/#core-endpoints-creditors) + * for whom the mandate will be created. The `name` of the creditor will be displayed on the + * payment page. Required if your account manages multiple creditors. */ public RedirectFlowCreateRequest withLinksCreditor(String creditor) { if (links == null) { @@ -131,8 +135,8 @@ public RedirectFlowCreateRequest withLinksCreditor(String creditor) { /** * Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 - * characters and values up to 500 characters. _Note:_ This should not be used for storing - * PII data. + * characters and values up to 500 characters. Note: This should not be used for storing PII + * data. */ public RedirectFlowCreateRequest withMetadata(Map metadata) { this.metadata = metadata; @@ -141,8 +145,8 @@ public RedirectFlowCreateRequest withMetadata(Map metadata) { /** * Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 - * characters and values up to 500 characters. _Note:_ This should not be used for storing - * PII data. + * characters and values up to 500 characters. Note: This should not be used for storing PII + * data. */ public RedirectFlowCreateRequest withMetadata(String key, String value) { if (metadata == null) { @@ -165,7 +169,8 @@ public RedirectFlowCreateRequest withPrefilledBankAccount( /** * Bank account type for USD-denominated bank accounts. Must not be provided for bank - * accounts in other currencies. See [local details](#local-bank-details-united-states) for + * accounts in other currencies. See local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) for * more information. */ public RedirectFlowCreateRequest withPrefilledBankAccountAccountType( @@ -245,8 +250,8 @@ public RedirectFlowCreateRequest withPrefilledCustomerCompanyName(String company } /** - * [ISO 3166-1 alpha-2 - * code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 alpha-2 code. + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) */ public RedirectFlowCreateRequest withPrefilledCustomerCountryCode(String countryCode) { if (prefilledCustomer == null) { @@ -302,7 +307,7 @@ public RedirectFlowCreateRequest withPrefilledCustomerGivenName(String givenName } /** - * [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + * ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. */ public RedirectFlowCreateRequest withPrefilledCustomerLanguage(String language) { if (prefilledCustomer == null) { @@ -452,9 +457,10 @@ public static class Links { private String creditor; /** - * The [creditor](#core-endpoints-creditors) for whom the mandate will be created. The - * `name` of the creditor will be displayed on the payment page. Required if your - * account manages multiple creditors. + * The creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors) for whom + * the mandate will be created. The `name` of the creditor will be displayed on the + * payment page. Required if your account manages multiple creditors. */ public Links withCreditor(String creditor) { this.creditor = creditor; @@ -467,7 +473,8 @@ public static class PrefilledBankAccount { /** * Bank account type for USD-denominated bank accounts. Must not be provided for bank - * accounts in other currencies. See [local details](#local-bank-details-united-states) + * accounts in other currencies. See local details + * (https://developer.gocardless.com/api-reference/#local-bank-details-united-states) * for more information. */ public PrefilledBankAccount withAccountType(AccountType accountType) { @@ -547,8 +554,8 @@ public PrefilledCustomer withCompanyName(String companyName) { } /** - * [ISO 3166-1 alpha-2 - * code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 alpha-2 code. + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) */ public PrefilledCustomer withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -588,7 +595,7 @@ public PrefilledCustomer withGivenName(String givenName) { } /** - * [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + * ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. */ public PrefilledCustomer withLanguage(String language) { this.language = language; @@ -675,9 +682,12 @@ protected Class getResponseClass() { /** * Request class for {@link RedirectFlowService#complete }. * - * This creates a [customer](#core-endpoints-customers), [customer bank - * account](#core-endpoints-customer-bank-accounts), and [mandate](#core-endpoints-mandates) - * using the details supplied by your customer and returns the ID of the created mandate. + * This creates a customer + * (https://developer.gocardless.com/api-reference/#core-endpoints-customers), customer bank + * account + * (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts), and + * mandate (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) using the + * details supplied by your customer and returns the ID of the created mandate. * * This will return a `redirect_flow_incomplete` error if your customer has not yet been * redirected back to your site, and a `redirect_flow_already_completed` error if your diff --git a/src/main/java/com/gocardless/services/RefundService.java b/src/main/java/com/gocardless/services/RefundService.java index 6f0c2efe..481d6983 100644 --- a/src/main/java/com/gocardless/services/RefundService.java +++ b/src/main/java/com/gocardless/services/RefundService.java @@ -12,11 +12,13 @@ /** * Service class for working with refund resources. * - * Refund objects represent (partial) refunds of a [payment](#core-endpoints-payments) back to the - * [customer](#core-endpoints-customers). + * Refund objects represent (partial) refunds of a payment + * (https://developer.gocardless.com/api-reference/#core-endpoints-payments) back to the customer + * (https://developer.gocardless.com/api-reference/#core-endpoints-customers). * - * GoCardless will notify you via a [webhook](#appendix-webhooks) whenever a refund is created, and - * will update the `amount_refunded` property of the payment. + * GoCardless will notify you via a webhook + * (https://developer.gocardless.com/api-reference/#appendix-webhooks) whenever a refund is created, + * and will update the `amount_refunded` property of the payment. */ public class RefundService { private final HttpClient httpClient; @@ -32,23 +34,22 @@ public RefundService(HttpClient httpClient) { /** * Creates a new refund object. * - * This fails with: + * This fails with: * * - `total_amount_confirmation_invalid` if the confirmation amount doesn't match the total * amount refunded for the payment. This safeguard is there to prevent two processes from - * creating refunds without awareness of each other. - * - * - `available_refund_amount_insufficient` if the creditor does not have sufficient balance for - * refunds available to cover the cost of the requested refund. - * + * creating refunds without awareness of each other. - `available_refund_amount_insufficient` if + * the creditor does not have sufficient balance for refunds available to cover the cost of the + * requested refund. */ public RefundCreateRequest create() { return new RefundCreateRequest(httpClient); } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your refunds. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * refunds. */ public RefundListRequest> list() { return new RefundListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -77,16 +78,13 @@ public RefundUpdateRequest update(String identity) { * * Creates a new refund object. * - * This fails with: + * This fails with: * * - `total_amount_confirmation_invalid` if the confirmation amount doesn't match the total * amount refunded for the payment. This safeguard is there to prevent two processes from - * creating refunds without awareness of each other. - * - * - `available_refund_amount_insufficient` if the creditor does not have sufficient balance for - * refunds available to cover the cost of the requested refund. - * + * creating refunds without awareness of each other. - `available_refund_amount_insufficient` if + * the creditor does not have sufficient balance for refunds available to cover the cost of the + * requested refund. */ public static final class RefundCreateRequest extends IdempotentPostRequest { private Integer amount; @@ -109,12 +107,10 @@ public RefundCreateRequest withLinks(Links links) { } /** - * ID of the [mandate](#core-endpoints-mandates) against which the refund is being made. - *
- *

- * Restricted: You must request access to Mandate Refunds by contacting - * our support team. - *

+ * ID of the mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) against which + * the refund is being made. Restricted: You must request access to Mandate Refunds by + * contacting our support team (mailto:support@gocardless.com). */ public RefundCreateRequest withLinksMandate(String mandate) { if (links == null) { @@ -125,7 +121,9 @@ public RefundCreateRequest withLinksMandate(String mandate) { } /** - * ID of the [payment](#core-endpoints-payments) against which the refund is being made. + * ID of the payment + * (https://developer.gocardless.com/api-reference/#core-endpoints-payments) against which + * the refund is being made. */ public RefundCreateRequest withLinksPayment(String payment) { if (links == null) { @@ -158,27 +156,51 @@ public RefundCreateRequest withMetadata(String key, String value) { /** * An optional reference that will appear on your customer's bank statement. The character - * limit for this reference is dependent on the scheme.
- * ACH - 10 characters
- * Autogiro - 11 characters
- * Bacs - 10 characters
- * BECS - 30 characters
- * BECS NZ - 12 characters
- * Betalingsservice - 30 characters
- * Faster Payments - 18 characters
- * PAD - scheme doesn't offer references
- * PayTo - 18 characters
- * SEPA - 140 characters
+ * limit for this reference is dependent on the scheme. ACH + *
    + *
  • 10 characters
  • + *
+ * Autogiro + *
    + *
  • 11 characters
  • + *
+ * Bacs + *
    + *
  • 10 characters
  • + *
+ * BECS + *
    + *
  • 30 characters
  • + *
+ * BECS NZ + *
    + *
  • 12 characters
  • + *
+ * Betalingsservice + *
    + *
  • 30 characters
  • + *
+ * Faster Payments + *
    + *
  • 18 characters
  • + *
+ * PAD + *
    + *
  • scheme doesn't offer references
  • + *
+ * PayTo + *
    + *
  • 18 characters
  • + *
+ * SEPA + *
    + *
  • 140 characters
  • + *
* Note that this reference must be unique (for each merchant) for the BECS scheme as it is - * a scheme requirement. - *

- * Restricted: You can only specify a payment reference for Bacs payments - * (that is, when collecting from the UK) if you're on the - * GoCardless Plus, Pro or Enterprise packages. - *

- *

- * Restricted: You can not specify a payment reference for Faster Payments. - *

+ * a scheme requirement. Restricted: You can only specify a payment reference for Bacs + * payments (that is, when collecting from the UK) if you're on the GoCardless Plus, Pro or + * Enterprise packages (https://gocardless.com/pricing). Restricted: You can not specify a + * payment reference for Faster Payments. */ public RefundCreateRequest withReference(String reference) { this.reference = reference; @@ -188,12 +210,12 @@ public RefundCreateRequest withReference(String reference) { /** * Total expected refunded amount in minor unit (e.g. pence/cents/öre). If there are other * partial refunds against this payment, this value should be the sum of the existing - * refunds plus the amount of the refund being created.
+ * refunds plus the amount of the refund being created. + * * Must be supplied if `links[payment]` is present. - *

- * It is possible to opt out of requiring `total_amount_confirmation`, please contact - * our support team for more information. - *

+ * + * It is possible to opt out of requiring `total_amount_confirmation`, please contact our + * support team (mailto:support@gocardless.com) for more information. */ public RefundCreateRequest withTotalAmountConfirmation(Integer totalAmountConfirmation) { this.totalAmountConfirmation = totalAmountConfirmation; @@ -248,12 +270,10 @@ public static class Links { private String payment; /** - * ID of the [mandate](#core-endpoints-mandates) against which the refund is being made. - *
- *

- * Restricted: You must request access to Mandate Refunds by contacting - * our support team. - *

+ * ID of the mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) against + * which the refund is being made. Restricted: You must request access to Mandate + * Refunds by contacting our support team (mailto:support@gocardless.com). */ public Links withMandate(String mandate) { this.mandate = mandate; @@ -261,7 +281,9 @@ public Links withMandate(String mandate) { } /** - * ID of the [payment](#core-endpoints-payments) against which the refund is being made. + * ID of the payment + * (https://developer.gocardless.com/api-reference/#core-endpoints-payments) against + * which the refund is being made. */ public Links withPayment(String payment) { this.payment = payment; @@ -273,7 +295,9 @@ public Links withPayment(String payment) { /** * Request class for {@link RefundService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your refunds. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * refunds. */ public static final class RefundListRequest extends ListRequest { private CreatedAt createdAt; @@ -373,10 +397,9 @@ public RefundListRequest withPayment(String payment) { /** * Whether a refund was issued against a mandate or a payment. One of: - *
    - *
  • `payment`: default returns refunds created against payments only
  • - *
  • `mandate`: returns refunds created against mandates only
  • - *
+ * + * - `payment`: default returns refunds created against payments only - `mandate`: returns + * refunds created against mandates only */ public RefundListRequest withRefundType(RefundType refundType) { this.refundType = refundType; diff --git a/src/main/java/com/gocardless/services/SchemeIdentifierService.java b/src/main/java/com/gocardless/services/SchemeIdentifierService.java index e169019c..7fb66e3a 100644 --- a/src/main/java/com/gocardless/services/SchemeIdentifierService.java +++ b/src/main/java/com/gocardless/services/SchemeIdentifierService.java @@ -13,7 +13,6 @@ * * This represents a scheme identifier (e.g. a SUN in Bacs or a CID in SEPA). Scheme identifiers are * used to specify the beneficiary name that appears on customers' bank statements. - * */ public class SchemeIdentifierService { private final HttpClient httpClient; @@ -35,14 +34,14 @@ public SchemeIdentifierService(HttpClient httpClient) { * working days for a scheme identifier to become active. On other schemes, including SEPA, this * happens instantly. * - * #### Scheme identifier name validations + * Scheme identifier name validations * * The `name` field of a scheme identifier can contain alphanumeric characters, spaces and * special characters. * * Its maximum length and the special characters it supports depend on the scheme: * - * | __scheme__ | __maximum length__ | __special characters allowed__ | | :---------------- | + * | scheme | maximum length | special characters allowed | | :---------------- | * :----------------- | :-------------------------------------------------- | | `bacs` | 18 * characters | `/` `.` `&` `-` | | `sepa` | 70 characters | `/` `?` `:` `(` `)` `.` `,` `+` `&` * `<` `>` `'` `"` | | `ach` | 16 characters | `/` `?` `:` `(` `)` `.` `,` `'` `+` `-` | | @@ -53,14 +52,15 @@ public SchemeIdentifierService(HttpClient httpClient) { * * You should ensure that the name you set matches the legal name or the trading name of the * creditor, otherwise, there is an increased risk of chargeback. - * */ public SchemeIdentifierCreateRequest create() { return new SchemeIdentifierCreateRequest(httpClient); } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your scheme identifiers. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * scheme identifiers. */ public SchemeIdentifierListRequest> list() { return new SchemeIdentifierListRequest<>(httpClient, @@ -89,14 +89,14 @@ public SchemeIdentifierGetRequest get(String identity) { * working days for a scheme identifier to become active. On other schemes, including SEPA, this * happens instantly. * - * #### Scheme identifier name validations + * Scheme identifier name validations * * The `name` field of a scheme identifier can contain alphanumeric characters, spaces and * special characters. * * Its maximum length and the special characters it supports depend on the scheme: * - * | __scheme__ | __maximum length__ | __special characters allowed__ | | :---------------- | + * | scheme | maximum length | special characters allowed | | :---------------- | * :----------------- | :-------------------------------------------------- | | `bacs` | 18 * characters | `/` `.` `&` `-` | | `sepa` | 70 characters | `/` `?` `:` `(` `)` `.` `,` `+` `&` * `<` `>` `'` `"` | | `ach` | 16 characters | `/` `?` `:` `(` `)` `.` `,` `'` `+` `-` | | @@ -107,7 +107,6 @@ public SchemeIdentifierGetRequest get(String identity) { * * You should ensure that the name you set matches the legal name or the trading name of the * creditor, otherwise, there is an increased risk of chargeback. - * */ public static final class SchemeIdentifierCreateRequest extends IdempotentPostRequest { @@ -121,8 +120,8 @@ public SchemeIdentifierCreateRequest withLinks(Links links) { } /** - * required ID of the associated [creditor](#core-endpoints-creditors). - * + * required ID of the associated creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). */ public SchemeIdentifierCreateRequest withLinksCreditor(String creditor) { if (links == null) { @@ -218,8 +217,8 @@ public static class Links { private String creditor; /** - * required ID of the associated [creditor](#core-endpoints-creditors). - * + * required ID of the associated creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). */ public Links withCreditor(String creditor) { this.creditor = creditor; @@ -231,7 +230,9 @@ public Links withCreditor(String creditor) { /** * Request class for {@link SchemeIdentifierService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your scheme identifiers. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * scheme identifiers. */ public static final class SchemeIdentifierListRequest extends ListRequest { diff --git a/src/main/java/com/gocardless/services/SubscriptionService.java b/src/main/java/com/gocardless/services/SubscriptionService.java index cef96c9f..ddccf798 100644 --- a/src/main/java/com/gocardless/services/SubscriptionService.java +++ b/src/main/java/com/gocardless/services/SubscriptionService.java @@ -14,39 +14,40 @@ /** * Service class for working with subscription resources. * - * Subscriptions create [payments](#core-endpoints-payments) according to a schedule. + * Subscriptions create payments + * (https://developer.gocardless.com/api-reference/#core-endpoints-payments) according to a + * schedule. * - * ### Recurrence Rules + * Recurrence Rules * * The following rules apply when specifying recurrence: * - * - If `day_of_month` and `start_date` are not provided `start_date` will be the - * [mandate](#core-endpoints-mandates)'s `next_possible_charge_date` and the subscription will then - * recur based on the `interval` & `interval_unit` - If `month` or `day_of_month` are present the - * following validations apply: + * - If `day_of_month` and `start_date` are not provided `start_date` will be the mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates)'s + * `next_possible_charge_date` and the subscription will then recur based on the `interval` & + * `interval_unit` - If `month` or `day_of_month` are present the following validations apply: * - * | __interval_unit__ | __month__ | __day_of_month__ | | :---------------- | + * | interval_unit | month | day_of_month | | :---------------- | * :--------------------------------------------- | :----------------------------------------- | | * yearly | optional (required if `day_of_month` provided) | optional (invalid if `month` not * provided) | | monthly | invalid | optional | | weekly | invalid | invalid | * * Examples: * - * | __interval_unit__ | __interval__ | __month__ | __day_of_month__ | valid? | | :---------------- - * | :----------- | :-------- | :--------------- | - * :------------------------------------------------- | | yearly | 1 | january | -1 | valid | | - * monthly | 6 | | | valid | | monthly | 6 | | 12 | valid | | weekly | 2 | | | valid | | yearly | 1 - * | march | | invalid - missing `day_of_month` | | yearly | 1 | | 2 | invalid - missing `month` | | - * monthly | 6 | august | 12 | invalid - `month` must be blank | | weekly | 2 | october | 10 | - * invalid - `month` and `day_of_month` must be blank | + * | interval_unit | interval | month | day_of_month | valid? | | :---------------- | :----------- | + * :-------- | :--------------- | :------------------------------------------------- | | yearly | 1 + * | january | -1 | valid | | monthly | 6 | | | valid | | monthly | 6 | | 12 | valid | | weekly | 2 + * | | | valid | | yearly | 1 | march | | invalid - missing `day_of_month` | | yearly | 1 | | 2 | + * invalid - missing `month` | | monthly | 6 | august | 12 | invalid - `month` must be blank | | + * weekly | 2 | october | 10 | invalid - `month` and `day_of_month` must be blank | * - * ### Rolling dates + * Rolling dates * * When a charge date falls on a non-business day, one of two things will happen: * * - if the recurrence rule specified `-1` as the `day_of_month`, the charge date will be rolled - * __backwards__ to the previous business day (i.e., the last working day of the month). - otherwise - * the charge date will be rolled __forwards__ to the next business day. + * backwards to the previous business day (i.e., the last working day of the month). - otherwise the + * charge date will be rolled forwards to the next business day. */ public class SubscriptionService { private final HttpClient httpClient; @@ -67,9 +68,10 @@ public SubscriptionCreateRequest create() { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your subscriptions. Please - * note if the subscriptions are related to customers who have been removed, they will not be - * shown in the response. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * subscriptions. Please note if the subscriptions are related to customers who have been + * removed, they will not be shown in the response. */ public SubscriptionListRequest> list() { return new SubscriptionListRequest<>(httpClient, @@ -93,25 +95,16 @@ public SubscriptionGetRequest get(String identity) { * * This fails with: * - * - `validation_failed` if invalid data is provided when attempting to update a subscription. - * - * - `subscription_not_active` if the subscription is no longer active. - * - * - `subscription_already_ended` if the subscription has taken all payments. - * - * - `mandate_payments_require_approval` if the amount is being changed and the mandate requires - * approval. - * - * - `number_of_subscription_amendments_exceeded` error if the subscription amount has already - * been changed 10 times. - * - * - `forbidden` if the amount is being changed, and the subscription was created by an app and - * you are not authenticated as that app, or if the subscription was not created by an app and - * you are authenticated as an app - * - * - `resource_created_by_another_app` if the app fee is being changed, and the subscription was + * - `validation_failed` if invalid data is provided when attempting to update a subscription. - + * `subscription_not_active` if the subscription is no longer active. - + * `subscription_already_ended` if the subscription has taken all payments. - + * `mandate_payments_require_approval` if the amount is being changed and the mandate requires + * approval. - `number_of_subscription_amendments_exceeded` error if the subscription amount has + * already been changed 10 times. - `forbidden` if the amount is being changed, and the + * subscription was created by an app and you are not authenticated as that app, or if the + * subscription was not created by an app and you are authenticated as an app - + * `resource_created_by_another_app` if the app fee is being changed, and the subscription was * created by an app other than the app you are authenticated as - * */ public SubscriptionUpdateRequest update(String identity) { return new SubscriptionUpdateRequest(httpClient, identity); @@ -124,10 +117,10 @@ public SubscriptionUpdateRequest update(String identity) { * using `count`), when they continue forever (created without `count` or `end_date`) or the * subscription is already paused for a number of cycles. * - * When `pause_cycles` is omitted the subscription is paused until the [resume - * endpoint](#subscriptions-resume-a-subscription) is called. If the subscription is collecting - * a fixed number of payments, `end_date` will be set to `null`. When paused indefinitely, - * `upcoming_payments` will be empty. + * When `pause_cycles` is omitted the subscription is paused until the resume endpoint + * (https://developer.gocardless.com/api-reference/#subscriptions-resume-a-subscription) is + * called. If the subscription is collecting a fixed number of payments, `end_date` will be set + * to `null`. When paused indefinitely, `upcoming_payments` will be empty. * * When `pause_cycles` is provided the subscription will be paused for the number of cycles * requested. If the subscription is collecting a fixed number of payments, `end_date` will be @@ -137,18 +130,13 @@ public SubscriptionUpdateRequest update(String identity) { * This fails with: * * - `forbidden` if the subscription was created by an app and you are not authenticated as that - * app, or if the subscription was not created by an app and you are authenticated as an app - * - * - `validation_failed` if invalid data is provided when attempting to pause a subscription. - * - * - `subscription_paused_cannot_update_cycles` if the subscription is already paused for a - * number of cycles and the request provides a value for `pause_cycle`. - * - * - `subscription_cannot_be_paused` if the subscription cannot be paused. - * - * - `subscription_already_ended` if the subscription has taken all payments. - * - * - `pause_cycles_must_be_greater_than_or_equal_to` if the provided value for `pause_cycles` + * app, or if the subscription was not created by an app and you are authenticated as an app - + * `validation_failed` if invalid data is provided when attempting to pause a subscription. - + * `subscription_paused_cannot_update_cycles` if the subscription is already paused for a number + * of cycles and the request provides a value for `pause_cycle`. - + * `subscription_cannot_be_paused` if the subscription cannot be paused. - + * `subscription_already_ended` if the subscription has taken all payments. - + * `pause_cycles_must_be_greater_than_or_equal_to` if the provided value for `pause_cycles` * cannot be satisfied. */ public SubscriptionPauseRequest pause(String identity) { @@ -163,12 +151,9 @@ public SubscriptionPauseRequest pause(String identity) { * This fails with: * * - `forbidden` if the subscription was created by an app and you are not authenticated as that - * app, or if the subscription was not created by an app and you are authenticated as an app - * - * - `validation_failed` if invalid data is provided when attempting to resume a subscription. - * - * - `subscription_not_paused` if the subscription is not paused. - * + * app, or if the subscription was not created by an app and you are authenticated as an app - + * `validation_failed` if invalid data is provided when attempting to resume a subscription. - + * `subscription_not_paused` if the subscription is not paused. */ public SubscriptionResumeRequest resume(String identity) { return new SubscriptionResumeRequest(httpClient, identity); @@ -235,7 +220,7 @@ public SubscriptionCreateRequest withCount(Integer count) { } /** - * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + * ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently * "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. */ public SubscriptionCreateRequest withCurrency(String currency) { @@ -253,13 +238,13 @@ public SubscriptionCreateRequest withDayOfMonth(Integer dayOfMonth) { } /** - * Date on or after which no further payments should be created.
+ * Date on or after which no further payments should be created. + * * If this field is blank and `count` is not specified, the subscription will continue - * forever.
- *

- * Deprecated: This field will be removed in a future API version. Use - * `count` to specify a number of payments instead. - *

+ * forever. + * + * Deprecated: This field will be removed in a future API version. Use `count` to specify a + * number of payments instead. */ public SubscriptionCreateRequest withEndDate(String endDate) { this.endDate = endDate; @@ -289,8 +274,9 @@ public SubscriptionCreateRequest withLinks(Links links) { } /** - * ID of the associated [mandate](#core-endpoints-mandates) which the subscription will - * create payments against. + * ID of the associated mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) which the + * subscription will create payments against. */ public SubscriptionCreateRequest withLinksMandate(String mandate) { if (links == null) { @@ -324,7 +310,6 @@ public SubscriptionCreateRequest withMetadata(String key, String value) { /** * Name of the month on which to charge a customer. Must be lowercase. Only applies when the * interval_unit is `yearly`. - * */ public SubscriptionCreateRequest withMonth(Month month) { this.month = month; @@ -342,12 +327,13 @@ public SubscriptionCreateRequest withName(String name) { /** * An optional payment reference. This will be set as the reference on each payment created - * and will appear on your customer's bank statement. See the documentation for the [create - * payment endpoint](#payments-create-a-payment) for more details.
- *

- * Restricted: You need your own Service User Number to specify a payment - * reference for Bacs payments. - *

+ * and will appear on your customer's bank statement. See the documentation for the create + * payment endpoint + * (https://developer.gocardless.com/api-reference/#payments-create-a-payment) for more + * details. + * + * Restricted: You need your own Service User Number to specify a payment reference for Bacs + * payments. */ public SubscriptionCreateRequest withPaymentReference(String paymentReference) { this.paymentReference = paymentReference; @@ -355,12 +341,10 @@ public SubscriptionCreateRequest withPaymentReference(String paymentReference) { } /** - * 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). - *

+ * On failure, automatically retry payments using intelligent retries + * (https://developer.gocardless.com/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). */ public SubscriptionCreateRequest withRetryIfPossible(Boolean retryIfPossible) { this.retryIfPossible = retryIfPossible; @@ -368,11 +352,11 @@ public SubscriptionCreateRequest withRetryIfPossible(Boolean retryIfPossible) { } /** - * The date on which the first payment should be charged. Must be on or after the - * [mandate](#core-endpoints-mandates)'s `next_possible_charge_date`. When left blank and - * `month` or `day_of_month` are provided, this will be set to the date of the first - * payment. If created without `month` or `day_of_month` this will be set as the mandate's - * `next_possible_charge_date` + * The date on which the first payment should be charged. Must be on or after the mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates)'s + * `next_possible_charge_date`. When left blank and `month` or `day_of_month` are provided, + * this will be set to the date of the first payment. If created without `month` or + * `day_of_month` this will be set as the mandate's `next_possible_charge_date` */ public SubscriptionCreateRequest withStartDate(String startDate) { this.startDate = startDate; @@ -461,8 +445,9 @@ public static class Links { private String mandate; /** - * ID of the associated [mandate](#core-endpoints-mandates) which the subscription will - * create payments against. + * ID of the associated mandate + * (https://developer.gocardless.com/api-reference/#core-endpoints-mandates) which the + * subscription will create payments against. */ public Links withMandate(String mandate) { this.mandate = mandate; @@ -474,9 +459,10 @@ public Links withMandate(String mandate) { /** * Request class for {@link SubscriptionService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your subscriptions. Please - * note if the subscriptions are related to customers who have been removed, they will not be - * shown in the response. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * subscriptions. Please note if the subscriptions are related to customers who have been + * removed, they will not be shown in the response. */ public static final class SubscriptionListRequest extends ListRequest { private CreatedAt createdAt; @@ -576,14 +562,10 @@ public SubscriptionListRequest withMandate(String mandate) { /** * Upto 5 of: - *
    - *
  • `pending_customer_approval`
  • - *
  • `customer_approval_denied`
  • - *
  • `active`
  • - *
  • `finished`
  • - *
  • `cancelled`
  • - *
  • `paused`
  • - *
+ * + * - `pending_customer_approval` - `customer_approval_denied` - `active` - `finished` - + * `cancelled` - `paused` + * * Omit entirely to include subscriptions in all states. */ public SubscriptionListRequest withStatus(List status) { @@ -593,14 +575,10 @@ public SubscriptionListRequest withStatus(List status) { /** * Upto 5 of: - *
    - *
  • `pending_customer_approval`
  • - *
  • `customer_approval_denied`
  • - *
  • `active`
  • - *
  • `finished`
  • - *
  • `cancelled`
  • - *
  • `paused`
  • - *
+ * + * - `pending_customer_approval` - `customer_approval_denied` - `active` - `finished` - + * `cancelled` - `paused` + * * Omit entirely to include subscriptions in all states. */ public SubscriptionListRequest withStatus(String status) { @@ -761,25 +739,16 @@ protected Class getResponseClass() { * * This fails with: * - * - `validation_failed` if invalid data is provided when attempting to update a subscription. - * - * - `subscription_not_active` if the subscription is no longer active. - * - * - `subscription_already_ended` if the subscription has taken all payments. - * - * - `mandate_payments_require_approval` if the amount is being changed and the mandate requires - * approval. - * - * - `number_of_subscription_amendments_exceeded` error if the subscription amount has already - * been changed 10 times. - * - * - `forbidden` if the amount is being changed, and the subscription was created by an app and - * you are not authenticated as that app, or if the subscription was not created by an app and - * you are authenticated as an app - * - * - `resource_created_by_another_app` if the app fee is being changed, and the subscription was + * - `validation_failed` if invalid data is provided when attempting to update a subscription. - + * `subscription_not_active` if the subscription is no longer active. - + * `subscription_already_ended` if the subscription has taken all payments. - + * `mandate_payments_require_approval` if the amount is being changed and the mandate requires + * approval. - `number_of_subscription_amendments_exceeded` error if the subscription amount has + * already been changed 10 times. - `forbidden` if the amount is being changed, and the + * subscription was created by an app and you are not authenticated as that app, or if the + * subscription was not created by an app and you are authenticated as an app - + * `resource_created_by_another_app` if the app fee is being changed, and the subscription was * created by an app other than the app you are authenticated as - * */ public static final class SubscriptionUpdateRequest extends PutRequest { @PathParam @@ -841,12 +810,13 @@ public SubscriptionUpdateRequest withName(String name) { /** * An optional payment reference. This will be set as the reference on each payment created - * and will appear on your customer's bank statement. See the documentation for the [create - * payment endpoint](#payments-create-a-payment) for more details.
- *

- * Restricted: You need your own Service User Number to specify a payment - * reference for Bacs payments. - *

+ * and will appear on your customer's bank statement. See the documentation for the create + * payment endpoint + * (https://developer.gocardless.com/api-reference/#payments-create-a-payment) for more + * details. + * + * Restricted: You need your own Service User Number to specify a payment reference for Bacs + * payments. */ public SubscriptionUpdateRequest withPaymentReference(String paymentReference) { this.paymentReference = paymentReference; @@ -854,12 +824,10 @@ public SubscriptionUpdateRequest withPaymentReference(String paymentReference) { } /** - * 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). - *

+ * On failure, automatically retry payments using intelligent retries + * (https://developer.gocardless.com/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). */ public SubscriptionUpdateRequest withRetryIfPossible(Boolean retryIfPossible) { this.retryIfPossible = retryIfPossible; @@ -913,10 +881,10 @@ protected boolean hasBody() { * using `count`), when they continue forever (created without `count` or `end_date`) or the * subscription is already paused for a number of cycles. * - * When `pause_cycles` is omitted the subscription is paused until the [resume - * endpoint](#subscriptions-resume-a-subscription) is called. If the subscription is collecting - * a fixed number of payments, `end_date` will be set to `null`. When paused indefinitely, - * `upcoming_payments` will be empty. + * When `pause_cycles` is omitted the subscription is paused until the resume endpoint + * (https://developer.gocardless.com/api-reference/#subscriptions-resume-a-subscription) is + * called. If the subscription is collecting a fixed number of payments, `end_date` will be set + * to `null`. When paused indefinitely, `upcoming_payments` will be empty. * * When `pause_cycles` is provided the subscription will be paused for the number of cycles * requested. If the subscription is collecting a fixed number of payments, `end_date` will be @@ -926,18 +894,13 @@ protected boolean hasBody() { * This fails with: * * - `forbidden` if the subscription was created by an app and you are not authenticated as that - * app, or if the subscription was not created by an app and you are authenticated as an app - * - * - `validation_failed` if invalid data is provided when attempting to pause a subscription. - * - * - `subscription_paused_cannot_update_cycles` if the subscription is already paused for a - * number of cycles and the request provides a value for `pause_cycle`. - * - * - `subscription_cannot_be_paused` if the subscription cannot be paused. - * - * - `subscription_already_ended` if the subscription has taken all payments. - * - * - `pause_cycles_must_be_greater_than_or_equal_to` if the provided value for `pause_cycles` + * app, or if the subscription was not created by an app and you are authenticated as an app - + * `validation_failed` if invalid data is provided when attempting to pause a subscription. - + * `subscription_paused_cannot_update_cycles` if the subscription is already paused for a number + * of cycles and the request provides a value for `pause_cycle`. - + * `subscription_cannot_be_paused` if the subscription cannot be paused. - + * `subscription_already_ended` if the subscription has taken all payments. - + * `pause_cycles_must_be_greater_than_or_equal_to` if the provided value for `pause_cycles` * cannot be satisfied. */ public static final class SubscriptionPauseRequest extends PostRequest { @@ -971,9 +934,11 @@ public SubscriptionPauseRequest withMetadata(String key, String value) { * The number of cycles to pause a subscription for. A cycle is one duration of `interval` * and `interval_unit`. This should be a non zero positive value. For AUD subscriptions with * `interval_unit: weekly` the minimum value varies between `3` & `4` because of the - * [mandatory minimum waiting period](#subscriptions-resume-a-subscription). For NZD - * subscriptions with `interval_unit: weekly` the minimum value is `2` because of the - * [mandatory minimum waiting period](#subscriptions-resume-a-subscription). + * mandatory minimum waiting period + * (https://developer.gocardless.com/api-reference/#subscriptions-resume-a-subscription). + * For NZD subscriptions with `interval_unit: weekly` the minimum value is `2` because of + * the mandatory minimum waiting period + * (https://developer.gocardless.com/api-reference/#subscriptions-resume-a-subscription). */ public SubscriptionPauseRequest withPauseCycles(Integer pauseCycles) { this.pauseCycles = pauseCycles; @@ -1033,12 +998,9 @@ protected String getRequestEnvelope() { * This fails with: * * - `forbidden` if the subscription was created by an app and you are not authenticated as that - * app, or if the subscription was not created by an app and you are authenticated as an app - * - * - `validation_failed` if invalid data is provided when attempting to resume a subscription. - * - * - `subscription_not_paused` if the subscription is not paused. - * + * app, or if the subscription was not created by an app and you are authenticated as an app - + * `validation_failed` if invalid data is provided when attempting to resume a subscription. - + * `subscription_not_paused` if the subscription is not paused. */ public static final class SubscriptionResumeRequest extends PostRequest { @PathParam diff --git a/src/main/java/com/gocardless/services/TaxRateService.java b/src/main/java/com/gocardless/services/TaxRateService.java index 8e1222c4..45b5d4e2 100644 --- a/src/main/java/com/gocardless/services/TaxRateService.java +++ b/src/main/java/com/gocardless/services/TaxRateService.java @@ -12,7 +12,8 @@ * * Tax rates from tax authority. * - * We also maintain a [static list of the tax rates for each jurisdiction](#appendix-tax-rates). + * We also maintain a static list of the tax rates for each jurisdiction + * (https://developer.gocardless.com/api-reference/#appendix-tax-rates). */ public class TaxRateService { private final HttpClient httpClient; @@ -26,7 +27,9 @@ public TaxRateService(HttpClient httpClient) { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of all tax rates. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of all tax + * rates. */ public TaxRateListRequest> list() { return new TaxRateListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -46,7 +49,9 @@ public TaxRateGetRequest get(String identity) { /** * Request class for {@link TaxRateService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of all tax rates. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of all tax + * rates. */ public static final class TaxRateListRequest extends ListRequest { private String jurisdiction; diff --git a/src/main/java/com/gocardless/services/VerificationDetailService.java b/src/main/java/com/gocardless/services/VerificationDetailService.java index 859f6a82..baddc400 100644 --- a/src/main/java/com/gocardless/services/VerificationDetailService.java +++ b/src/main/java/com/gocardless/services/VerificationDetailService.java @@ -13,11 +13,9 @@ * * Verification details represent any information needed by GoCardless to verify a creditor. * - *

- * Restricted: These endpoints are restricted to customers who want to collect - * their merchant's verification details and pass them to GoCardless via our API. Please [get in - * touch](mailto:help@gocardless.com) if you wish to enable this feature on your account. - *

+ * Restricted: These endpoints are restricted to customers who want to collect their merchant's + * verification details and pass them to GoCardless via our API. Please get in touch + * (mailto:help@gocardless.com) if you wish to enable this feature on your account. */ public class VerificationDetailService { private final HttpClient httpClient; @@ -142,7 +140,8 @@ public VerificationDetailCreateRequest withLinks(Links links) { } /** - * ID of the associated [creditor](#core-endpoints-creditors). + * ID of the associated creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). */ public VerificationDetailCreateRequest withLinksCreditor(String creditor) { if (links == null) { @@ -215,8 +214,8 @@ public Directors withCity(String city) { } /** - * [ISO 3166-1 alpha-2 - * code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * ISO 3166-1 alpha-2 code. + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) */ public Directors withCountryCode(String countryCode) { this.countryCode = countryCode; @@ -268,7 +267,8 @@ public static class Links { private String creditor; /** - * ID of the associated [creditor](#core-endpoints-creditors). + * ID of the associated creditor + * (https://developer.gocardless.com/api-reference/#core-endpoints-creditors). */ public Links withCreditor(String creditor) { this.creditor = creditor; diff --git a/src/main/java/com/gocardless/services/WebhookService.java b/src/main/java/com/gocardless/services/WebhookService.java index 8198a920..50e39f96 100644 --- a/src/main/java/com/gocardless/services/WebhookService.java +++ b/src/main/java/com/gocardless/services/WebhookService.java @@ -24,7 +24,9 @@ public WebhookService(HttpClient httpClient) { } /** - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your webhooks. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * webhooks. */ public WebhookListRequest> list() { return new WebhookListRequest<>(httpClient, ListRequest.pagingExecutor()); @@ -51,7 +53,9 @@ public WebhookRetryRequest retry(String identity) { /** * Request class for {@link WebhookService#list }. * - * Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your webhooks. + * Returns a cursor-paginated + * (https://developer.gocardless.com/api-reference/#api-usage-cursor-pagination) list of your + * webhooks. */ public static final class WebhookListRequest extends ListRequest { private CreatedAt createdAt; From 4dddb42cc49b29ad34a6428989abbef353f04a9a Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2026 09:50:45 +0000 Subject: [PATCH 7/9] Changes generated by 0447966dbc7deb4a368eb115ca363fe1cfcfbd16 This commit was automatically created from gocardless/client-library-templates@0447966dbc7deb4a368eb115ca363fe1cfcfbd16 by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/29819672690 --- src/main/java/com/gocardless/resources/Institution.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/com/gocardless/resources/Institution.java b/src/main/java/com/gocardless/resources/Institution.java index 78c30860..e6f38aa2 100644 --- a/src/main/java/com/gocardless/resources/Institution.java +++ b/src/main/java/com/gocardless/resources/Institution.java @@ -1,6 +1,7 @@ package com.gocardless.resources; import com.google.gson.annotations.SerializedName; +import java.util.List; import java.util.Map; /** @@ -24,6 +25,7 @@ private Institution() { private Limits limits; private String logoUrl; private String name; + private List roles; private Status status; /** @@ -80,6 +82,13 @@ public String getName() { return name; } + /** + * The roles assigned to this institution, representing the open banking features it supports. + */ + public List getRoles() { + return roles; + } + /** * The status of the institution */ From eb66848c7d55114dd69c4f70cf99de102d6d238c Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2026 09:59:29 +0000 Subject: [PATCH 8/9] Changes generated by d044d660596f0b07477534a07153e6117105c550 This commit was automatically created from gocardless/client-library-templates@d044d660596f0b07477534a07153e6117105c550 by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/29820258946 --- src/main/java/com/gocardless/resources/BillingRequest.java | 4 ++++ .../com/gocardless/resources/BillingRequestWithAction.java | 4 ++++ src/main/java/com/gocardless/resources/Payment.java | 3 +++ .../java/com/gocardless/services/BillingRequestService.java | 4 ++++ .../com/gocardless/services/InstalmentScheduleService.java | 4 ++++ src/main/java/com/gocardless/services/PaymentService.java | 3 +++ 6 files changed, 22 insertions(+) diff --git a/src/main/java/com/gocardless/resources/BillingRequest.java b/src/main/java/com/gocardless/resources/BillingRequest.java index 39c3524f..17330ff7 100644 --- a/src/main/java/com/gocardless/resources/BillingRequest.java +++ b/src/main/java/com/gocardless/resources/BillingRequest.java @@ -589,6 +589,10 @@ private InstalmentsWithDate() { * Amount, in the lowest denomination for the currency (e.g. pence in GBP, cents in * EUR). * + * Minimum and maximum amounts vary by payment scheme. For more information, see + * [Transaction + * limits](https://support.gocardless.com/hc/en-gb/articles/115000309245-Transaction-limits) + * * For Variable Recurring Payments (VRP), this must not exceed the mandate's * `max_amount_per_payment` constraint. */ diff --git a/src/main/java/com/gocardless/resources/BillingRequestWithAction.java b/src/main/java/com/gocardless/resources/BillingRequestWithAction.java index cece102a..2e732e74 100644 --- a/src/main/java/com/gocardless/resources/BillingRequestWithAction.java +++ b/src/main/java/com/gocardless/resources/BillingRequestWithAction.java @@ -791,6 +791,10 @@ private InstalmentsWithDate() { * Amount, in the lowest denomination for the currency (e.g. pence in GBP, cents in * EUR). * + * Minimum and maximum amounts vary by payment scheme. For more information, see + * [Transaction + * limits](https://support.gocardless.com/hc/en-gb/articles/115000309245-Transaction-limits) + * * For Variable Recurring Payments (VRP), this must not exceed the mandate's * `max_amount_per_payment` constraint. */ diff --git a/src/main/java/com/gocardless/resources/Payment.java b/src/main/java/com/gocardless/resources/Payment.java index 0b402a73..1e15be86 100644 --- a/src/main/java/com/gocardless/resources/Payment.java +++ b/src/main/java/com/gocardless/resources/Payment.java @@ -37,6 +37,9 @@ private Payment() { /** * Amount, in the lowest denomination for the currency (e.g. pence in GBP, cents in EUR). * + * Minimum and maximum amounts vary by payment scheme. For more information, see [Transaction + * limits](https://support.gocardless.com/hc/en-gb/articles/115000309245-Transaction-limits) + * * For Variable Recurring Payments (VRP), this must not exceed the mandate's * `max_amount_per_payment` constraint. */ diff --git a/src/main/java/com/gocardless/services/BillingRequestService.java b/src/main/java/com/gocardless/services/BillingRequestService.java index 45a86848..ade9535a 100644 --- a/src/main/java/com/gocardless/services/BillingRequestService.java +++ b/src/main/java/com/gocardless/services/BillingRequestService.java @@ -1026,6 +1026,10 @@ public static class InstalmentsWithDates { * Amount, in the lowest denomination for the currency (e.g. pence in GBP, cents in * EUR). * + * Minimum and maximum amounts vary by payment scheme. For more information, see + * Transaction limits + * (https://support.gocardless.com/hc/en-gb/articles/115000309245-Transaction-limits) + * * For Variable Recurring Payments (VRP), this must not exceed the mandate's * `max_amount_per_payment` constraint. */ diff --git a/src/main/java/com/gocardless/services/InstalmentScheduleService.java b/src/main/java/com/gocardless/services/InstalmentScheduleService.java index 79101c8f..c4888653 100644 --- a/src/main/java/com/gocardless/services/InstalmentScheduleService.java +++ b/src/main/java/com/gocardless/services/InstalmentScheduleService.java @@ -374,6 +374,10 @@ public static class Instalments { * Amount, in the lowest denomination for the currency (e.g. pence in GBP, cents in * EUR). * + * Minimum and maximum amounts vary by payment scheme. For more information, see + * Transaction limits + * (https://support.gocardless.com/hc/en-gb/articles/115000309245-Transaction-limits) + * * For Variable Recurring Payments (VRP), this must not exceed the mandate's * `max_amount_per_payment` constraint. */ diff --git a/src/main/java/com/gocardless/services/PaymentService.java b/src/main/java/com/gocardless/services/PaymentService.java index fd59591b..86b624e1 100644 --- a/src/main/java/com/gocardless/services/PaymentService.java +++ b/src/main/java/com/gocardless/services/PaymentService.java @@ -123,6 +123,9 @@ public static final class PaymentCreateRequest extends IdempotentPostRequest Date: Tue, 21 Jul 2026 10:28:21 +0000 Subject: [PATCH 9/9] Changes generated by 9d9ff143689ee009c9124b148c0c3d597e5060c2 This commit was automatically created from gocardless/client-library-templates@9d9ff143689ee009c9124b148c0c3d597e5060c2 by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/29822142088 --- .../code_samples/CustomerNotificationsHandleCodeSampleTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/gocardless/code_samples/CustomerNotificationsHandleCodeSampleTest.java b/src/test/java/com/gocardless/code_samples/CustomerNotificationsHandleCodeSampleTest.java index 041f19ef..55422809 100644 --- a/src/test/java/com/gocardless/code_samples/CustomerNotificationsHandleCodeSampleTest.java +++ b/src/test/java/com/gocardless/code_samples/CustomerNotificationsHandleCodeSampleTest.java @@ -46,7 +46,7 @@ public void testHandleCodeSample() throws Exception { System.setOut(new PrintStream(new ByteArrayOutputStream())); try { CustomerNotification customerNotification = - client.customerNotifications().handle("PCN123").execute(); + client.customerNotifications().handle("EV1D18JEXAMPLE").execute(); } finally { System.setOut(originalOut); }